From 17d7c813838b57467afda8249079c075a5d19ed5 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 25 Mar 2026 21:21:42 +0000 Subject: [PATCH 1/2] feat: publish client batch config schema feat: publish new error reasons docs: fix documentation formatting docs: update various comments docs: update license year PiperOrigin-RevId: 889289393 Source-Link: https://github.com/googleapis/googleapis/commit/94bc991b3f1df58bc841801631715894a7ac5e28 Source-Link: https://github.com/googleapis/googleapis-gen/commit/db7143a338a7c75839b4698cb3ea6f1013b4c3c7 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXRhbGVudC12NGJldGExLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXRhc2tzLXYyLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXRhc2tzLXYyYmV0YTIvLk93bEJvdC55YW1sIiwiaCI6ImRiNzE0M2EzMzhhN2M3NTgzOWI0Njk4Y2IzZWE2ZjEwMTNiNGMzYzcifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXRhc2tzLXYyYmV0YTMvLk93bEJvdC55YW1sIiwiaCI6ImRiNzE0M2EzMzhhN2M3NTgzOWI0Njk4Y2IzZWE2ZjEwMTNiNGMzYzcifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXRlbGNvX2F1dG9tYXRpb24tdjEvLk93bEJvdC55YW1sIiwiaCI6ImRiNzE0M2EzMzhhN2M3NTgzOWI0Njk4Y2IzZWE2ZjEwMTNiNGMzYzcifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXRleHRfdG9fc3BlZWNoLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXRleHRfdG9fc3BlZWNoLXYxYmV0YTEvLk93bEJvdC55YW1sIiwiaCI6ImRiNzE0M2EzMzhhN2M3NTgzOWI0Njk4Y2IzZWE2ZjEwMTNiNGMzYzcifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXRwdS12MS8uT3dsQm90LnlhbWwiLCJoIjoiZGI3MTQzYTMzOGE3Yzc1ODM5YjQ2OThjYjNlYTZmMTAxM2I0YzNjNyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXRyYWNlLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXRyYWNlLXYyLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXRyYW5zbGF0ZS12My8uT3dsQm90LnlhbWwiLCJoIjoiZGI3MTQzYTMzOGE3Yzc1ODM5YjQ2OThjYjNlYTZmMTAxM2I0YzNjNyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXZpZGVvLWxpdmVfc3RyZWFtLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXZpZGVvLXN0aXRjaGVyLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXZpZGVvLXRyYW5zY29kZXItdjEvLk93bEJvdC55YW1sIiwiaCI6ImRiNzE0M2EzMzhhN2M3NTgzOWI0Njk4Y2IzZWE2ZjEwMTNiNGMzYzcifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXZpZGVvX2ludGVsbGlnZW5jZS12MS8uT3dsQm90LnlhbWwiLCJoIjoiZGI3MTQzYTMzOGE3Yzc1ODM5YjQ2OThjYjNlYTZmMTAxM2I0YzNjNyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXZpZGVvX2ludGVsbGlnZW5jZS12MWJldGEyLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXZpZGVvX2ludGVsbGlnZW5jZS12MXAxYmV0YTEvLk93bEJvdC55YW1sIiwiaCI6ImRiNzE0M2EzMzhhN2M3NTgzOWI0Njk4Y2IzZWE2ZjEwMTNiNGMzYzcifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXZpZGVvX2ludGVsbGlnZW5jZS12MXAyYmV0YTEvLk93bEJvdC55YW1sIiwiaCI6ImRiNzE0M2EzMzhhN2M3NTgzOWI0Njk4Y2IzZWE2ZjEwMTNiNGMzYzcifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXZpZGVvX2ludGVsbGlnZW5jZS12MXAzYmV0YTEvLk93bEJvdC55YW1sIiwiaCI6ImRiNzE0M2EzMzhhN2M3NTgzOWI0Njk4Y2IzZWE2ZjEwMTNiNGMzYzcifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXZpc2lvbi12MS8uT3dsQm90LnlhbWwiLCJoIjoiZGI3MTQzYTMzOGE3Yzc1ODM5YjQ2OThjYjNlYTZmMTAxM2I0YzNjNyJ9 --- .../google-cloud-talent-v4beta1/.gitignore | 22 + .../.repo-metadata.json | 18 + .../google-cloud-talent-v4beta1/.rubocop.yml | 33 + .../google-cloud-talent-v4beta1/.toys.rb | 28 + .../google-cloud-talent-v4beta1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-talent-v4beta1/CHANGELOG.md | 2 + .../google-cloud-talent-v4beta1/Gemfile | 14 + .../google-cloud-talent-v4beta1/LICENSE.md | 201 + .../google-cloud-talent-v4beta1/README.md | 154 + .../google-cloud-talent-v4beta1/Rakefile | 169 + .../gapic_metadata.json | 164 + .../google-cloud-talent-v4beta1.gemspec | 28 + .../lib/google-cloud-talent-v4beta1.rb | 21 + .../lib/google/cloud/talent/v4beta1.rb | 49 + .../google/cloud/talent/v4beta1/batch_pb.rb | 20 + .../google/cloud/talent/v4beta1/common_pb.rb | 53 + .../google/cloud/talent/v4beta1/company_pb.rb | 26 + .../cloud/talent/v4beta1/company_service.rb | 55 + .../talent/v4beta1/company_service/client.rb | 920 ++++ .../v4beta1/company_service/credentials.rb | 52 + .../talent/v4beta1/company_service/paths.rb | 105 + .../talent/v4beta1/company_service/rest.rb | 52 + .../v4beta1/company_service/rest/client.rb | 842 +++ .../company_service/rest/service_stub.rb | 425 ++ .../talent/v4beta1/company_service_pb.rb | 35 + .../v4beta1/company_service_services_pb.rb | 54 + .../google/cloud/talent/v4beta1/completion.rb | 55 + .../cloud/talent/v4beta1/completion/client.rb | 516 ++ .../talent/v4beta1/completion/credentials.rb | 52 + .../cloud/talent/v4beta1/completion/paths.rb | 105 + .../cloud/talent/v4beta1/completion/rest.rb | 52 + .../talent/v4beta1/completion/rest/client.rb | 466 ++ .../v4beta1/completion/rest/service_stub.rb | 149 + .../talent/v4beta1/completion_service_pb.rb | 31 + .../v4beta1/completion_service_services_pb.rb | 46 + .../google/cloud/talent/v4beta1/event_pb.rb | 26 + .../cloud/talent/v4beta1/event_service.rb | 55 + .../talent/v4beta1/event_service/client.rb | 489 ++ .../v4beta1/event_service/credentials.rb | 52 + .../talent/v4beta1/event_service/paths.rb | 64 + .../talent/v4beta1/event_service/rest.rb | 52 + .../v4beta1/event_service/rest/client.rb | 439 ++ .../event_service/rest/service_stub.rb | 151 + .../cloud/talent/v4beta1/event_service_pb.rb | 27 + .../v4beta1/event_service_services_pb.rb | 51 + .../google/cloud/talent/v4beta1/filters_pb.rb | 33 + .../cloud/talent/v4beta1/histogram_pb.rb | 22 + .../lib/google/cloud/talent/v4beta1/job_pb.rb | 29 + .../cloud/talent/v4beta1/job_service.rb | 56 + .../talent/v4beta1/job_service/client.rb | 2083 ++++++++ .../talent/v4beta1/job_service/credentials.rb | 52 + .../talent/v4beta1/job_service/operations.rb | 841 +++ .../cloud/talent/v4beta1/job_service/paths.rb | 146 + .../cloud/talent/v4beta1/job_service/rest.rb | 53 + .../talent/v4beta1/job_service/rest/client.rb | 1970 +++++++ .../v4beta1/job_service/rest/operations.rb | 925 ++++ .../v4beta1/job_service/rest/service_stub.rb | 774 +++ .../cloud/talent/v4beta1/job_service_pb.rb | 56 + .../talent/v4beta1/job_service_services_pb.rb | 90 + .../lib/google/cloud/talent/v4beta1/rest.rb | 41 + .../google/cloud/talent/v4beta1/tenant_pb.rb | 25 + .../cloud/talent/v4beta1/tenant_service.rb | 55 + .../talent/v4beta1/tenant_service/client.rb | 899 ++++ .../v4beta1/tenant_service/credentials.rb | 52 + .../talent/v4beta1/tenant_service/paths.rb | 64 + .../talent/v4beta1/tenant_service/rest.rb | 52 + .../v4beta1/tenant_service/rest/client.rb | 821 +++ .../tenant_service/rest/service_stub.rb | 388 ++ .../cloud/talent/v4beta1/tenant_service_pb.rb | 35 + .../v4beta1/tenant_service_services_pb.rb | 53 + .../google/cloud/talent/v4beta1/version.rb | 28 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../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/talent/v4beta1/common.rb | 955 ++++ .../google/cloud/talent/v4beta1/company.rb | 126 + .../cloud/talent/v4beta1/company_service.rb | 144 + .../talent/v4beta1/completion_service.rb | 154 + .../google/cloud/talent/v4beta1/event.rb | 188 + .../cloud/talent/v4beta1/event_service.rb | 43 + .../google/cloud/talent/v4beta1/filters.rb | 404 ++ .../google/cloud/talent/v4beta1/histogram.rb | 74 + .../google/cloud/talent/v4beta1/job.rb | 389 ++ .../cloud/talent/v4beta1/job_service.rb | 914 ++++ .../google/cloud/talent/v4beta1/tenant.rb | 81 + .../cloud/talent/v4beta1/tenant_service.rb | 123 + .../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 | 148 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/latlng.rb | 38 + .../proto_docs/google/type/money.rb | 43 + .../proto_docs/google/type/postal_address.rb | 135 + .../proto_docs/google/type/timeofday.rb | 45 + .../snippets/Gemfile | 32 + .../company_service/create_company.rb | 47 + .../company_service/delete_company.rb | 47 + .../snippets/company_service/get_company.rb | 47 + .../company_service/list_companies.rb | 51 + .../company_service/update_company.rb | 47 + .../snippets/completion/complete_query.rb | 47 + .../event_service/create_client_event.rb | 47 + .../snippets/job_service/batch_create_jobs.rb | 54 + .../snippets/job_service/batch_delete_jobs.rb | 47 + .../snippets/job_service/batch_update_jobs.rb | 54 + .../snippets/job_service/create_job.rb | 47 + .../snippets/job_service/delete_job.rb | 47 + .../snippets/job_service/get_job.rb | 47 + .../snippets/job_service/list_jobs.rb | 51 + .../snippets/job_service/search_jobs.rb | 47 + .../job_service/search_jobs_for_alert.rb | 47 + .../snippets/job_service/update_job.rb | 47 + ..._metadata_google.cloud.talent.v4beta1.json | 895 ++++ .../snippets/tenant_service/create_tenant.rb | 47 + .../snippets/tenant_service/delete_tenant.rb | 47 + .../snippets/tenant_service/get_tenant.rb | 47 + .../snippets/tenant_service/list_tenants.rb | 51 + .../snippets/tenant_service/update_tenant.rb | 47 + .../v4beta1/company_service_paths_test.rb | 82 + .../v4beta1/company_service_rest_test.rb | 374 ++ .../talent/v4beta1/company_service_test.rb | 409 ++ .../talent/v4beta1/completion_paths_test.rb | 82 + .../talent/v4beta1/completion_rest_test.rb | 159 + .../cloud/talent/v4beta1/completion_test.rb | 174 + .../v4beta1/event_service_paths_test.rb | 67 + .../talent/v4beta1/event_service_rest_test.rb | 154 + .../talent/v4beta1/event_service_test.rb | 164 + .../v4beta1/job_service_operations_test.rb | 400 ++ .../talent/v4beta1/job_service_paths_test.rb | 97 + .../talent/v4beta1/job_service_rest_test.rb | 681 +++ .../cloud/talent/v4beta1/job_service_test.rb | 797 +++ .../v4beta1/tenant_service_paths_test.rb | 67 + .../v4beta1/tenant_service_rest_test.rb | 373 ++ .../talent/v4beta1/tenant_service_test.rb | 407 ++ .../test/helper.rb | 26 + .../google-cloud-tasks-v2/.gitignore | 22 + .../google-cloud-tasks-v2/.repo-metadata.json | 18 + .../google-cloud-tasks-v2/.rubocop.yml | 33 + .../google-cloud-tasks-v2/.toys.rb | 28 + .../google-cloud-tasks-v2/.yardopts | 12 + .../google-cloud-tasks-v2/AUTHENTICATION.md | 122 + .../google-cloud-tasks-v2/CHANGELOG.md | 2 + owl-bot-staging/google-cloud-tasks-v2/Gemfile | 14 + .../google-cloud-tasks-v2/LICENSE.md | 201 + .../google-cloud-tasks-v2/README.md | 154 + .../google-cloud-tasks-v2/Rakefile | 169 + .../google-cloud-tasks-v2/gapic_metadata.json | 98 + .../google-cloud-tasks-v2.gemspec | 30 + .../lib/google-cloud-tasks-v2.rb | 21 + .../lib/google/cloud/tasks/v2.rb | 45 + .../cloud/tasks/v2/bindings_override.rb | 75 + .../lib/google/cloud/tasks/v2/cloud_tasks.rb | 56 + .../cloud/tasks/v2/cloud_tasks/client.rb | 2259 ++++++++ .../cloud/tasks/v2/cloud_tasks/credentials.rb | 51 + .../cloud/tasks/v2/cloud_tasks/paths.rb | 90 + .../google/cloud/tasks/v2/cloud_tasks/rest.rb | 54 + .../cloud/tasks/v2/cloud_tasks/rest/client.rb | 2112 ++++++++ .../tasks/v2/cloud_tasks/rest/service_stub.rb | 1067 ++++ .../google/cloud/tasks/v2/cloudtasks_pb.rb | 46 + .../cloud/tasks/v2/cloudtasks_services_pb.rb | 206 + .../lib/google/cloud/tasks/v2/queue_pb.rb | 30 + .../lib/google/cloud/tasks/v2/rest.rb | 38 + .../lib/google/cloud/tasks/v2/target_pb.rb | 28 + .../lib/google/cloud/tasks/v2/task_pb.rb | 29 + .../lib/google/cloud/tasks/v2/version.rb | 28 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../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/tasks/v2/cloudtasks.rb | 375 ++ .../proto_docs/google/cloud/tasks/v2/queue.rb | 376 ++ .../google/cloud/tasks/v2/target.rb | 466 ++ .../proto_docs/google/cloud/tasks/v2/task.rb | 196 + .../proto_docs/google/iam/v1/iam_policy.rb | 87 + .../proto_docs/google/iam/v1/options.rb | 50 + .../proto_docs/google/iam/v1/policy.rb | 426 ++ .../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 + .../google-cloud-tasks-v2/snippets/Gemfile | 32 + .../snippets/cloud_tasks/create_queue.rb | 47 + .../snippets/cloud_tasks/create_task.rb | 47 + .../snippets/cloud_tasks/delete_queue.rb | 47 + .../snippets/cloud_tasks/delete_task.rb | 47 + .../snippets/cloud_tasks/get_iam_policy.rb | 47 + .../snippets/cloud_tasks/get_queue.rb | 47 + .../snippets/cloud_tasks/get_task.rb | 47 + .../snippets/cloud_tasks/list_queues.rb | 51 + .../snippets/cloud_tasks/list_tasks.rb | 51 + .../snippets/cloud_tasks/pause_queue.rb | 47 + .../snippets/cloud_tasks/purge_queue.rb | 47 + .../snippets/cloud_tasks/resume_queue.rb | 47 + .../snippets/cloud_tasks/run_task.rb | 47 + .../snippets/cloud_tasks/set_iam_policy.rb | 47 + .../cloud_tasks/test_iam_permissions.rb | 47 + .../snippets/cloud_tasks/update_queue.rb | 47 + ...nippet_metadata_google.cloud.tasks.v2.json | 655 +++ .../cloud/tasks/v2/cloud_tasks_paths_test.rb | 79 + .../cloud/tasks/v2/cloud_tasks_rest_test.rb | 979 ++++ .../google/cloud/tasks/v2/cloud_tasks_test.rb | 1074 ++++ .../google-cloud-tasks-v2/test/helper.rb | 26 + .../google-cloud-tasks-v2beta2/.gitignore | 22 + .../.repo-metadata.json | 18 + .../google-cloud-tasks-v2beta2/.rubocop.yml | 33 + .../google-cloud-tasks-v2beta2/.toys.rb | 28 + .../google-cloud-tasks-v2beta2/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-tasks-v2beta2/CHANGELOG.md | 2 + .../google-cloud-tasks-v2beta2/Gemfile | 14 + .../google-cloud-tasks-v2beta2/LICENSE.md | 201 + .../google-cloud-tasks-v2beta2/README.md | 154 + .../google-cloud-tasks-v2beta2/Rakefile | 169 + .../gapic_metadata.json | 123 + .../google-cloud-tasks-v2beta2.gemspec | 30 + .../lib/google-cloud-tasks-v2beta2.rb | 21 + .../lib/google/cloud/tasks/v2beta2.rb | 45 + .../cloud/tasks/v2beta2/bindings_override.rb | 75 + .../google/cloud/tasks/v2beta2/cloud_tasks.rb | 56 + .../cloud/tasks/v2beta2/cloud_tasks/client.rb | 2936 +++++++++++ .../tasks/v2beta2/cloud_tasks/credentials.rb | 51 + .../cloud/tasks/v2beta2/cloud_tasks/paths.rb | 90 + .../cloud/tasks/v2beta2/cloud_tasks/rest.rb | 54 + .../tasks/v2beta2/cloud_tasks/rest/client.rb | 2667 ++++++++++ .../v2beta2/cloud_tasks/rest/service_stub.rb | 1315 +++++ .../cloud/tasks/v2beta2/cloudtasks_pb.rb | 55 + .../tasks/v2beta2/cloudtasks_services_pb.rb | 274 + .../cloud/tasks/v2beta2/old_target_pb.rb | 20 + .../google/cloud/tasks/v2beta2/queue_pb.rb | 31 + .../lib/google/cloud/tasks/v2beta2/rest.rb | 38 + .../google/cloud/tasks/v2beta2/target_pb.rb | 39 + .../lib/google/cloud/tasks/v2beta2/task_pb.rb | 29 + .../lib/google/cloud/tasks/v2beta2/version.rb | 28 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/httpbody.rb | 80 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../google/cloud/tasks/v2beta2/cloudtasks.rb | 608 +++ .../google/cloud/tasks/v2beta2/queue.rb | 448 ++ .../google/cloud/tasks/v2beta2/target.rb | 775 +++ .../google/cloud/tasks/v2beta2/task.rb | 208 + .../proto_docs/google/iam/v1/iam_policy.rb | 87 + .../proto_docs/google/iam/v1/options.rb | 50 + .../proto_docs/google/iam/v1/policy.rb | 426 ++ .../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 + .../snippets/cloud_tasks/acknowledge_task.rb | 47 + .../snippets/cloud_tasks/cancel_lease.rb | 47 + .../snippets/cloud_tasks/create_queue.rb | 47 + .../snippets/cloud_tasks/create_task.rb | 47 + .../snippets/cloud_tasks/delete_queue.rb | 47 + .../snippets/cloud_tasks/delete_task.rb | 47 + .../snippets/cloud_tasks/get_iam_policy.rb | 47 + .../snippets/cloud_tasks/get_queue.rb | 47 + .../snippets/cloud_tasks/get_task.rb | 47 + .../snippets/cloud_tasks/lease_tasks.rb | 47 + .../snippets/cloud_tasks/list_queues.rb | 51 + .../snippets/cloud_tasks/list_tasks.rb | 51 + .../snippets/cloud_tasks/pause_queue.rb | 47 + .../snippets/cloud_tasks/purge_queue.rb | 47 + .../snippets/cloud_tasks/renew_lease.rb | 47 + .../snippets/cloud_tasks/resume_queue.rb | 47 + .../snippets/cloud_tasks/run_task.rb | 47 + .../snippets/cloud_tasks/set_iam_policy.rb | 47 + .../cloud_tasks/test_iam_permissions.rb | 47 + .../snippets/cloud_tasks/update_queue.rb | 47 + .../snippets/cloud_tasks/upload_queue_yaml.rb | 47 + ...t_metadata_google.cloud.tasks.v2beta2.json | 855 +++ .../tasks/v2beta2/cloud_tasks_paths_test.rb | 79 + .../tasks/v2beta2/cloud_tasks_rest_test.rb | 1207 +++++ .../cloud/tasks/v2beta2/cloud_tasks_test.rb | 1391 +++++ .../google-cloud-tasks-v2beta2/test/helper.rb | 26 + .../google-cloud-tasks-v2beta3/.gitignore | 22 + .../.repo-metadata.json | 18 + .../google-cloud-tasks-v2beta3/.rubocop.yml | 33 + .../google-cloud-tasks-v2beta3/.toys.rb | 28 + .../google-cloud-tasks-v2beta3/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-tasks-v2beta3/CHANGELOG.md | 2 + .../google-cloud-tasks-v2beta3/Gemfile | 14 + .../google-cloud-tasks-v2beta3/LICENSE.md | 201 + .../google-cloud-tasks-v2beta3/README.md | 154 + .../google-cloud-tasks-v2beta3/Rakefile | 169 + .../gapic_metadata.json | 98 + .../google-cloud-tasks-v2beta3.gemspec | 30 + .../lib/google-cloud-tasks-v2beta3.rb | 21 + .../lib/google/cloud/tasks/v2beta3.rb | 45 + .../cloud/tasks/v2beta3/bindings_override.rb | 75 + .../google/cloud/tasks/v2beta3/cloud_tasks.rb | 56 + .../cloud/tasks/v2beta3/cloud_tasks/client.rb | 2277 ++++++++ .../tasks/v2beta3/cloud_tasks/credentials.rb | 51 + .../cloud/tasks/v2beta3/cloud_tasks/paths.rb | 90 + .../cloud/tasks/v2beta3/cloud_tasks/rest.rb | 54 + .../tasks/v2beta3/cloud_tasks/rest/client.rb | 2130 ++++++++ .../v2beta3/cloud_tasks/rest/service_stub.rb | 1067 ++++ .../cloud/tasks/v2beta3/cloudtasks_pb.rb | 46 + .../tasks/v2beta3/cloudtasks_services_pb.rb | 208 + .../google/cloud/tasks/v2beta3/queue_pb.rb | 33 + .../lib/google/cloud/tasks/v2beta3/rest.rb | 38 + .../google/cloud/tasks/v2beta3/target_pb.rb | 36 + .../lib/google/cloud/tasks/v2beta3/task_pb.rb | 29 + .../lib/google/cloud/tasks/v2beta3/version.rb | 28 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../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/tasks/v2beta3/cloudtasks.rb | 396 ++ .../google/cloud/tasks/v2beta3/queue.rb | 462 ++ .../google/cloud/tasks/v2beta3/target.rb | 728 +++ .../google/cloud/tasks/v2beta3/task.rb | 213 + .../proto_docs/google/iam/v1/iam_policy.rb | 87 + .../proto_docs/google/iam/v1/options.rb | 50 + .../proto_docs/google/iam/v1/policy.rb | 426 ++ .../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 + .../snippets/cloud_tasks/create_queue.rb | 47 + .../snippets/cloud_tasks/create_task.rb | 47 + .../snippets/cloud_tasks/delete_queue.rb | 47 + .../snippets/cloud_tasks/delete_task.rb | 47 + .../snippets/cloud_tasks/get_iam_policy.rb | 47 + .../snippets/cloud_tasks/get_queue.rb | 47 + .../snippets/cloud_tasks/get_task.rb | 47 + .../snippets/cloud_tasks/list_queues.rb | 51 + .../snippets/cloud_tasks/list_tasks.rb | 51 + .../snippets/cloud_tasks/pause_queue.rb | 47 + .../snippets/cloud_tasks/purge_queue.rb | 47 + .../snippets/cloud_tasks/resume_queue.rb | 47 + .../snippets/cloud_tasks/run_task.rb | 47 + .../snippets/cloud_tasks/set_iam_policy.rb | 47 + .../cloud_tasks/test_iam_permissions.rb | 47 + .../snippets/cloud_tasks/update_queue.rb | 47 + ...t_metadata_google.cloud.tasks.v2beta3.json | 655 +++ .../tasks/v2beta3/cloud_tasks_paths_test.rb | 79 + .../tasks/v2beta3/cloud_tasks_rest_test.rb | 981 ++++ .../cloud/tasks/v2beta3/cloud_tasks_test.rb | 1078 ++++ .../google-cloud-tasks-v2beta3/test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../google-cloud-telco_automation-v1/.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-telco_automation-v1/Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 153 + .../google-cloud-telco_automation-v1/Rakefile | 169 + .../gapic_metadata.json | 198 + .../google-cloud-telco_automation-v1.gemspec | 29 + .../lib/google-cloud-telco_automation-v1.rb | 21 + .../lib/google/cloud/telco_automation/v1.rb | 45 + .../telco_automation/v1/bindings_override.rb | 75 + .../google/cloud/telco_automation/v1/rest.rb | 38 + .../telco_automation/v1/telco_automation.rb | 60 + .../v1/telco_automation/client.rb | 4039 +++++++++++++++ .../v1/telco_automation/credentials.rb | 47 + .../v1/telco_automation/operations.rb | 841 +++ .../v1/telco_automation/paths.rb | 172 + .../v1/telco_automation/rest.rb | 58 + .../v1/telco_automation/rest/client.rb | 3752 ++++++++++++++ .../v1/telco_automation/rest/operations.rb | 925 ++++ .../v1/telco_automation/rest/service_stub.rb | 2293 ++++++++ .../cloud/telco_automation/v1/version.rb | 28 + .../telcoautomation/v1/telcoautomation_pb.rb | 108 + .../v1/telcoautomation_services_pb.rb | 126 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../telcoautomation/v1/telcoautomation.rb | 1551 ++++++ .../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 + .../snippets/Gemfile | 32 + ...adata_google.cloud.telcoautomation.v1.json | 1455 ++++++ .../telco_automation/apply_deployment.rb | 47 + .../apply_hydrated_deployment.rb | 47 + .../telco_automation/approve_blueprint.rb | 47 + .../compute_deployment_status.rb | 47 + .../telco_automation/create_blueprint.rb | 47 + .../telco_automation/create_deployment.rb | 47 + .../telco_automation/create_edge_slm.rb | 54 + .../create_orchestration_cluster.rb | 54 + .../telco_automation/delete_blueprint.rb | 47 + .../telco_automation/delete_edge_slm.rb | 54 + .../delete_orchestration_cluster.rb | 54 + .../discard_blueprint_changes.rb | 47 + .../discard_deployment_changes.rb | 47 + .../telco_automation/get_blueprint.rb | 47 + .../telco_automation/get_deployment.rb | 47 + .../snippets/telco_automation/get_edge_slm.rb | 47 + .../get_hydrated_deployment.rb | 47 + .../get_orchestration_cluster.rb | 47 + .../telco_automation/get_public_blueprint.rb | 47 + .../list_blueprint_revisions.rb | 51 + .../telco_automation/list_blueprints.rb | 51 + .../list_deployment_revisions.rb | 51 + .../telco_automation/list_deployments.rb | 51 + .../telco_automation/list_edge_slms.rb | 51 + .../list_hydrated_deployments.rb | 51 + .../list_orchestration_clusters.rb | 51 + .../list_public_blueprints.rb | 51 + .../telco_automation/propose_blueprint.rb | 47 + .../telco_automation/reject_blueprint.rb | 47 + .../telco_automation/remove_deployment.rb | 47 + .../telco_automation/rollback_deployment.rb | 47 + .../search_blueprint_revisions.rb | 51 + .../search_deployment_revisions.rb | 51 + .../telco_automation/update_blueprint.rb | 47 + .../telco_automation/update_deployment.rb | 47 + .../update_hydrated_deployment.rb | 47 + .../v1/telco_automation_operations_test.rb | 400 ++ .../v1/telco_automation_paths_test.rb | 127 + .../v1/telco_automation_rest_test.rb | 2089 ++++++++ .../v1/telco_automation_test.rb | 2368 +++++++++ .../test/helper.rb | 26 + .../google-cloud-text_to_speech-v1/.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../google-cloud-text_to_speech-v1/.toys.rb | 28 + .../google-cloud-text_to_speech-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-text_to_speech-v1/Gemfile | 14 + .../google-cloud-text_to_speech-v1/LICENSE.md | 201 + .../google-cloud-text_to_speech-v1/README.md | 154 + .../google-cloud-text_to_speech-v1/Rakefile | 169 + .../gapic_metadata.json | 47 + .../google-cloud-text_to_speech-v1.gemspec | 28 + .../lib/google-cloud-text_to_speech-v1.rb | 21 + .../lib/google/cloud/text_to_speech/v1.rb | 46 + .../google/cloud/text_to_speech/v1/rest.rb | 38 + .../cloud/text_to_speech/v1/text_to_speech.rb | 55 + .../v1/text_to_speech/client.rb | 655 +++ .../v1/text_to_speech/credentials.rb | 51 + .../text_to_speech/v1/text_to_speech/paths.rb | 52 + .../text_to_speech/v1/text_to_speech/rest.rb | 52 + .../v1/text_to_speech/rest/client.rb | 528 ++ .../v1/text_to_speech/rest/service_stub.rb | 200 + .../text_to_speech_long_audio_synthesize.rb | 56 + .../client.rb | 510 ++ .../credentials.rb | 51 + .../operations.rb | 841 +++ .../paths.rb | 52 + .../rest.rb | 53 + .../rest/client.rb | 460 ++ .../rest/operations.rb | 925 ++++ .../rest/service_stub.rb | 143 + .../google/cloud/text_to_speech/v1/version.rb | 28 + .../cloud/texttospeech/v1/cloud_tts_lrs_pb.rb | 30 + .../v1/cloud_tts_lrs_services_pb.rb | 45 + .../cloud/texttospeech/v1/cloud_tts_pb.rb | 51 + .../texttospeech/v1/cloud_tts_services_pb.rb | 51 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../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/texttospeech/v1/cloud_tts.rb | 583 +++ .../cloud/texttospeech/v1/cloud_tts_lrs.rb | 73 + .../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/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + ...metadata_google.cloud.texttospeech.v1.json | 175 + .../snippets/text_to_speech/list_voices.rb | 47 + .../text_to_speech/streaming_synthesize.rb | 56 + .../text_to_speech/synthesize_speech.rb | 47 + .../synthesize_long_audio.rb | 54 + ...h_long_audio_synthesize_operations_test.rb | 400 ++ ...speech_long_audio_synthesize_paths_test.rb | 55 + ..._speech_long_audio_synthesize_rest_test.rb | 157 + ...xt_to_speech_long_audio_synthesize_test.rb | 189 + .../v1/text_to_speech_paths_test.rb | 55 + .../v1/text_to_speech_rest_test.rb | 210 + .../text_to_speech/v1/text_to_speech_test.rb | 316 ++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 47 + ...oogle-cloud-text_to_speech-v1beta1.gemspec | 28 + .../google-cloud-text_to_speech-v1beta1.rb | 21 + .../google/cloud/text_to_speech/v1beta1.rb | 46 + .../cloud/text_to_speech/v1beta1/rest.rb | 38 + .../text_to_speech/v1beta1/text_to_speech.rb | 55 + .../v1beta1/text_to_speech/client.rb | 657 +++ .../v1beta1/text_to_speech/credentials.rb | 51 + .../v1beta1/text_to_speech/paths.rb | 52 + .../v1beta1/text_to_speech/rest.rb | 52 + .../v1beta1/text_to_speech/rest/client.rb | 530 ++ .../text_to_speech/rest/service_stub.rb | 200 + .../text_to_speech_long_audio_synthesize.rb | 56 + .../client.rb | 510 ++ .../credentials.rb | 51 + .../operations.rb | 841 +++ .../paths.rb | 52 + .../rest.rb | 53 + .../rest/client.rb | 460 ++ .../rest/operations.rb | 925 ++++ .../rest/service_stub.rb | 143 + .../cloud/text_to_speech/v1beta1/version.rb | 28 + .../texttospeech/v1beta1/cloud_tts_lrs_pb.rb | 30 + .../v1beta1/cloud_tts_lrs_services_pb.rb | 45 + .../texttospeech/v1beta1/cloud_tts_pb.rb | 53 + .../v1beta1/cloud_tts_services_pb.rb | 51 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../cloud/texttospeech/v1beta1/cloud_tts.rb | 618 +++ .../texttospeech/v1beta1/cloud_tts_lrs.rb | 73 + .../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/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + ...ata_google.cloud.texttospeech.v1beta1.json | 175 + .../snippets/text_to_speech/list_voices.rb | 47 + .../text_to_speech/streaming_synthesize.rb | 56 + .../text_to_speech/synthesize_speech.rb | 47 + .../synthesize_long_audio.rb | 54 + ...h_long_audio_synthesize_operations_test.rb | 400 ++ ...speech_long_audio_synthesize_paths_test.rb | 55 + ..._speech_long_audio_synthesize_rest_test.rb | 157 + ...xt_to_speech_long_audio_synthesize_test.rb | 189 + .../v1beta1/text_to_speech_paths_test.rb | 55 + .../v1beta1/text_to_speech_rest_test.rb | 211 + .../v1beta1/text_to_speech_test.rb | 318 ++ .../test/helper.rb | 26 + .../google-cloud-tpu-v1/.gitignore | 22 + .../google-cloud-tpu-v1/.repo-metadata.json | 18 + .../google-cloud-tpu-v1/.rubocop.yml | 33 + owl-bot-staging/google-cloud-tpu-v1/.toys.rb | 28 + owl-bot-staging/google-cloud-tpu-v1/.yardopts | 12 + .../google-cloud-tpu-v1/AUTHENTICATION.md | 122 + .../google-cloud-tpu-v1/CHANGELOG.md | 2 + owl-bot-staging/google-cloud-tpu-v1/Gemfile | 14 + .../google-cloud-tpu-v1/LICENSE.md | 201 + owl-bot-staging/google-cloud-tpu-v1/README.md | 154 + owl-bot-staging/google-cloud-tpu-v1/Rakefile | 169 + .../google-cloud-tpu-v1/gapic_metadata.json | 73 + .../google-cloud-tpu-v1.gemspec | 29 + .../lib/google-cloud-tpu-v1.rb | 21 + .../lib/google/cloud/tpu/v1.rb | 40 + .../lib/google/cloud/tpu/v1/cloud_tpu_pb.rb | 52 + .../cloud/tpu/v1/cloud_tpu_services_pb.rb | 67 + .../lib/google/cloud/tpu/v1/tpu.rb | 52 + .../lib/google/cloud/tpu/v1/tpu/client.rb | 1517 ++++++ .../google/cloud/tpu/v1/tpu/credentials.rb | 51 + .../lib/google/cloud/tpu/v1/tpu/operations.rb | 841 +++ .../lib/google/cloud/tpu/v1/tpu/paths.rb | 107 + .../lib/google/cloud/tpu/v1/version.rb | 28 + .../google-cloud-tpu-v1/proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../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/tpu/v1/cloud_tpu.rb | 521 ++ .../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/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../google-cloud-tpu-v1/snippets/Gemfile | 32 + .../snippet_metadata_google.cloud.tpu.v1.json | 455 ++ .../snippets/tpu/create_node.rb | 54 + .../snippets/tpu/delete_node.rb | 54 + .../snippets/tpu/get_accelerator_type.rb | 47 + .../snippets/tpu/get_node.rb | 47 + .../snippets/tpu/get_tensor_flow_version.rb | 47 + .../snippets/tpu/list_accelerator_types.rb | 51 + .../snippets/tpu/list_nodes.rb | 51 + .../snippets/tpu/list_tensor_flow_versions.rb | 51 + .../snippets/tpu/reimage_node.rb | 54 + .../snippets/tpu/start_node.rb | 54 + .../snippets/tpu/stop_node.rb | 54 + .../cloud/tpu/v1/tpu_operations_test.rb | 400 ++ .../google/cloud/tpu/v1/tpu_paths_test.rb | 91 + .../test/google/cloud/tpu/v1/tpu_test.rb | 822 +++ .../google-cloud-tpu-v1/test/helper.rb | 26 + .../google-cloud-trace-v1/.gitignore | 22 + .../google-cloud-trace-v1/.repo-metadata.json | 18 + .../google-cloud-trace-v1/.rubocop.yml | 33 + .../google-cloud-trace-v1/.toys.rb | 28 + .../google-cloud-trace-v1/.yardopts | 12 + .../google-cloud-trace-v1/AUTHENTICATION.md | 122 + .../google-cloud-trace-v1/CHANGELOG.md | 2 + owl-bot-staging/google-cloud-trace-v1/Gemfile | 14 + .../google-cloud-trace-v1/LICENSE.md | 201 + .../google-cloud-trace-v1/README.md | 154 + .../google-cloud-trace-v1/Rakefile | 169 + .../google-cloud-trace-v1/gapic_metadata.json | 33 + .../google-cloud-trace-v1.gemspec | 28 + .../lib/google-cloud-trace-v1.rb | 21 + .../lib/google/cloud/trace/v1.rb | 45 + .../lib/google/cloud/trace/v1/rest.rb | 37 + .../google/cloud/trace/v1/trace_service.rb | 58 + .../cloud/trace/v1/trace_service/client.rb | 753 +++ .../trace/v1/trace_service/credentials.rb | 53 + .../cloud/trace/v1/trace_service/rest.rb | 55 + .../trace/v1/trace_service/rest/client.rb | 686 +++ .../v1/trace_service/rest/service_stub.rb | 266 + .../lib/google/cloud/trace/v1/version.rb | 28 + .../google/devtools/cloudtrace/v1/trace_pb.rb | 35 + .../cloudtrace/v1/trace_services_pb.rb | 57 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../google/devtools/cloudtrace/v1/trace.rb | 287 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../google-cloud-trace-v1/snippets/Gemfile | 32 + ...etadata_google.devtools.cloudtrace.v1.json | 135 + .../snippets/trace_service/get_trace.rb | 47 + .../snippets/trace_service/list_traces.rb | 51 + .../snippets/trace_service/patch_traces.rb | 47 + .../cloud/trace/v1/trace_service_rest_test.rb | 270 + .../cloud/trace/v1/trace_service_test.rb | 301 ++ .../google-cloud-trace-v1/test/helper.rb | 26 + .../google-cloud-trace-v2/.gitignore | 22 + .../google-cloud-trace-v2/.repo-metadata.json | 18 + .../google-cloud-trace-v2/.rubocop.yml | 33 + .../google-cloud-trace-v2/.toys.rb | 28 + .../google-cloud-trace-v2/.yardopts | 12 + .../google-cloud-trace-v2/AUTHENTICATION.md | 122 + .../google-cloud-trace-v2/CHANGELOG.md | 2 + owl-bot-staging/google-cloud-trace-v2/Gemfile | 14 + .../google-cloud-trace-v2/LICENSE.md | 201 + .../google-cloud-trace-v2/README.md | 154 + .../google-cloud-trace-v2/Rakefile | 169 + .../google-cloud-trace-v2/gapic_metadata.json | 28 + .../google-cloud-trace-v2.gemspec | 28 + .../lib/google-cloud-trace-v2.rb | 21 + .../lib/google/cloud/trace/v2.rb | 45 + .../lib/google/cloud/trace/v2/rest.rb | 37 + .../google/cloud/trace/v2/trace_service.rb | 61 + .../cloud/trace/v2/trace_service/client.rb | 643 +++ .../trace/v2/trace_service/credentials.rb | 52 + .../cloud/trace/v2/trace_service/paths.rb | 66 + .../cloud/trace/v2/trace_service/rest.rb | 58 + .../trace/v2/trace_service/rest/client.rb | 586 +++ .../v2/trace_service/rest/service_stub.rb | 205 + .../lib/google/cloud/trace/v2/version.rb | 28 + .../google/devtools/cloudtrace/v2/trace_pb.rb | 43 + .../devtools/cloudtrace/v2/tracing_pb.rb | 28 + .../cloudtrace/v2/tracing_services_pb.rb | 54 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../google/devtools/cloudtrace/v2/trace.rb | 427 ++ .../google/devtools/cloudtrace/v2/tracing.rb | 40 + .../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/timestamp.rb | 127 + .../proto_docs/google/protobuf/wrappers.rb | 148 + .../proto_docs/google/rpc/status.rb | 48 + .../google-cloud-trace-v2/snippets/Gemfile | 32 + ...etadata_google.devtools.cloudtrace.v2.json | 95 + .../trace_service/batch_write_spans.rb | 47 + .../snippets/trace_service/create_span.rb | 47 + .../trace/v2/trace_service_paths_test.rb | 67 + .../cloud/trace/v2/trace_service_rest_test.rb | 221 + .../cloud/trace/v2/trace_service_test.rb | 248 + .../google-cloud-trace-v2/test/helper.rb | 26 + .../google-cloud-translate-v3/.gitignore | 22 + .../.repo-metadata.json | 18 + .../google-cloud-translate-v3/.rubocop.yml | 33 + .../google-cloud-translate-v3/.toys.rb | 28 + .../google-cloud-translate-v3/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-translate-v3/CHANGELOG.md | 2 + .../google-cloud-translate-v3/Gemfile | 14 + .../google-cloud-translate-v3/LICENSE.md | 201 + .../google-cloud-translate-v3/README.md | 154 + .../google-cloud-translate-v3/Rakefile | 169 + .../gapic_metadata.json | 208 + .../google-cloud-translate-v3.gemspec | 30 + .../lib/google-cloud-translate-v3.rb | 21 + .../lib/google/cloud/translate/v3.rb | 45 + .../cloud/translate/v3/adaptive_mt_pb.rb | 48 + .../translate/v3/automl_translation_pb.rb | 54 + .../cloud/translate/v3/bindings_override.rb | 75 + .../google/cloud/translate/v3/common_pb.rb | 31 + .../lib/google/cloud/translate/v3/rest.rb | 38 + .../cloud/translate/v3/translation_service.rb | 56 + .../v3/translation_service/client.rb | 4614 +++++++++++++++++ .../v3/translation_service/credentials.rb | 52 + .../v3/translation_service/operations.rb | 849 +++ .../translate/v3/translation_service/paths.rb | 168 + .../translate/v3/translation_service/rest.rb | 54 + .../v3/translation_service/rest/client.rb | 4313 +++++++++++++++ .../v3/translation_service/rest/operations.rb | 1093 ++++ .../translation_service/rest/service_stub.rb | 2454 +++++++++ .../translate/v3/translation_service_pb.rb | 88 + .../v3/translation_service_services_pb.rb | 141 + .../lib/google/cloud/translate/v3/version.rb | 28 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../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/translate/v3/adaptive_mt.rb | 405 ++ .../cloud/translate/v3/automl_translation.rb | 487 ++ .../google/cloud/translate/v3/common.rb | 143 + .../cloud/translate/v3/translation_service.rb | 1657 ++++++ .../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 + .../snippets/Gemfile | 32 + ..._metadata_google.cloud.translation.v3.json | 1535 ++++++ .../adaptive_mt_translate.rb | 47 + .../batch_translate_document.rb | 54 + .../batch_translate_text.rb | 54 + .../create_adaptive_mt_dataset.rb | 47 + .../translation_service/create_dataset.rb | 54 + .../translation_service/create_glossary.rb | 54 + .../create_glossary_entry.rb | 47 + .../translation_service/create_model.rb | 54 + .../delete_adaptive_mt_dataset.rb | 47 + .../delete_adaptive_mt_file.rb | 47 + .../translation_service/delete_dataset.rb | 54 + .../translation_service/delete_glossary.rb | 54 + .../delete_glossary_entry.rb | 47 + .../translation_service/delete_model.rb | 54 + .../translation_service/detect_language.rb | 47 + .../translation_service/export_data.rb | 54 + .../get_adaptive_mt_dataset.rb | 47 + .../get_adaptive_mt_file.rb | 47 + .../translation_service/get_dataset.rb | 47 + .../translation_service/get_glossary.rb | 47 + .../translation_service/get_glossary_entry.rb | 47 + .../snippets/translation_service/get_model.rb | 47 + .../get_supported_languages.rb | 47 + .../import_adaptive_mt_file.rb | 47 + .../translation_service/import_data.rb | 54 + .../list_adaptive_mt_datasets.rb | 51 + .../list_adaptive_mt_files.rb | 51 + .../list_adaptive_mt_sentences.rb | 51 + .../translation_service/list_datasets.rb | 51 + .../translation_service/list_examples.rb | 51 + .../translation_service/list_glossaries.rb | 51 + .../list_glossary_entries.rb | 51 + .../translation_service/list_models.rb | 51 + .../translation_service/romanize_text.rb | 47 + .../translation_service/translate_document.rb | 47 + .../translation_service/translate_text.rb | 47 + .../translation_service/update_glossary.rb | 54 + .../update_glossary_entry.rb | 47 + .../v3/translation_service_operations_test.rb | 400 ++ .../v3/translation_service_paths_test.rb | 127 + .../v3/translation_service_rest_test.rb | 2228 ++++++++ .../translate/v3/translation_service_test.rb | 2575 +++++++++ .../google-cloud-translate-v3/test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-video-live_stream-v1/Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 188 + .../google-cloud-video-live_stream-v1.gemspec | 29 + .../lib/google-cloud-video-live_stream-v1.rb | 21 + .../lib/google/cloud/video/live_stream/v1.rb | 47 + .../video/live_stream/v1/bindings_override.rb | 77 + .../live_stream/v1/livestream_service.rb | 62 + .../v1/livestream_service/client.rb | 4350 ++++++++++++++++ .../v1/livestream_service/credentials.rb | 49 + .../v1/livestream_service/operations.rb | 843 +++ .../v1/livestream_service/paths.rb | 227 + .../live_stream/v1/livestream_service/rest.rb | 60 + .../v1/livestream_service/rest/client.rb | 4077 +++++++++++++++ .../v1/livestream_service/rest/operations.rb | 927 ++++ .../livestream_service/rest/service_stub.rb | 2172 ++++++++ .../google/cloud/video/live_stream/v1/rest.rb | 40 + .../cloud/video/live_stream/v1/version.rb | 30 + .../cloud/video/livestream/v1/outputs_pb.rb | 52 + .../cloud/video/livestream/v1/resources_pb.rb | 91 + .../cloud/video/livestream/v1/service_pb.rb | 76 + .../livestream/v1/service_services_pb.rb | 123 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../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 + .../cloud/video/livestream/v1/outputs.rb | 788 +++ .../cloud/video/livestream/v1/resources.rb | 1294 +++++ .../cloud/video/livestream/v1/service.rb | 1032 ++++ .../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 + .../snippets/Gemfile | 32 + .../livestream_service/create_asset.rb | 54 + .../livestream_service/create_channel.rb | 54 + .../livestream_service/create_clip.rb | 54 + .../livestream_service/create_dvr_session.rb | 54 + .../livestream_service/create_event.rb | 47 + .../livestream_service/create_input.rb | 54 + .../livestream_service/delete_asset.rb | 54 + .../livestream_service/delete_channel.rb | 54 + .../livestream_service/delete_clip.rb | 54 + .../livestream_service/delete_dvr_session.rb | 54 + .../livestream_service/delete_event.rb | 47 + .../livestream_service/delete_input.rb | 54 + .../snippets/livestream_service/get_asset.rb | 47 + .../livestream_service/get_channel.rb | 47 + .../snippets/livestream_service/get_clip.rb | 47 + .../livestream_service/get_dvr_session.rb | 47 + .../snippets/livestream_service/get_event.rb | 47 + .../snippets/livestream_service/get_input.rb | 47 + .../snippets/livestream_service/get_pool.rb | 47 + .../livestream_service/list_assets.rb | 51 + .../livestream_service/list_channels.rb | 51 + .../snippets/livestream_service/list_clips.rb | 51 + .../livestream_service/list_dvr_sessions.rb | 51 + .../livestream_service/list_events.rb | 51 + .../livestream_service/list_inputs.rb | 51 + .../livestream_service/preview_input.rb | 47 + .../livestream_service/start_channel.rb | 54 + .../livestream_service/start_distribution.rb | 54 + .../livestream_service/stop_channel.rb | 54 + .../livestream_service/stop_distribution.rb | 54 + .../livestream_service/update_channel.rb | 54 + .../livestream_service/update_dvr_session.rb | 54 + .../livestream_service/update_input.rb | 54 + .../livestream_service/update_pool.rb | 54 + ...data_google.cloud.video.livestream.v1.json | 1375 +++++ .../v1/livestream_service_operations_test.rb | 400 ++ .../v1/livestream_service_paths_test.rb | 163 + .../v1/livestream_service_rest_test.rb | 1998 +++++++ .../live_stream/v1/livestream_service_test.rb | 2336 +++++++++ .../test/helper.rb | 26 + .../google-cloud-video-stitcher-v1/.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../google-cloud-video-stitcher-v1/.toys.rb | 28 + .../google-cloud-video-stitcher-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-video-stitcher-v1/Gemfile | 14 + .../google-cloud-video-stitcher-v1/LICENSE.md | 201 + .../google-cloud-video-stitcher-v1/README.md | 154 + .../google-cloud-video-stitcher-v1/Rakefile | 169 + .../gapic_metadata.json | 168 + .../google-cloud-video-stitcher-v1.gemspec | 28 + .../lib/google-cloud-video-stitcher-v1.rb | 21 + .../lib/google/cloud/video/stitcher/v1.rb | 42 + .../video/stitcher/v1/ad_tag_details_pb.rb | 31 + .../cloud/video/stitcher/v1/cdn_keys_pb.rb | 30 + .../cloud/video/stitcher/v1/companions_pb.rb | 30 + .../cloud/video/stitcher/v1/events_pb.rb | 27 + .../video/stitcher/v1/fetch_options_pb.rb | 23 + .../video/stitcher/v1/live_configs_pb.rb | 33 + .../cloud/video/stitcher/v1/sessions_pb.rb | 40 + .../cloud/video/stitcher/v1/slates_pb.rb | 27 + .../video/stitcher/v1/stitch_details_pb.rb | 29 + .../google/cloud/video/stitcher/v1/version.rb | 30 + .../stitcher/v1/video_stitcher_service.rb | 56 + .../v1/video_stitcher_service/client.rb | 3545 +++++++++++++ .../v1/video_stitcher_service/credentials.rb | 49 + .../v1/video_stitcher_service/operations.rb | 843 +++ .../v1/video_stitcher_service/paths.rb | 229 + .../stitcher/v1/video_stitcher_service_pb.rb | 76 + .../v1/video_stitcher_service_services_pb.rb | 121 + .../cloud/video/stitcher/v1/vod_configs_pb.rb | 29 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../cloud/video/stitcher/v1/ad_tag_details.rb | 106 + .../cloud/video/stitcher/v1/cdn_keys.rb | 112 + .../cloud/video/stitcher/v1/companions.rb | 135 + .../google/cloud/video/stitcher/v1/events.rb | 141 + .../cloud/video/stitcher/v1/fetch_options.rb | 49 + .../cloud/video/stitcher/v1/live_configs.rb | 145 + .../cloud/video/stitcher/v1/sessions.rb | 285 + .../google/cloud/video/stitcher/v1/slates.rb | 58 + .../cloud/video/stitcher/v1/stitch_details.rb | 73 + .../stitcher/v1/video_stitcher_service.rb | 619 +++ .../cloud/video/stitcher/v1/vod_configs.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/struct.rb | 108 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + ...tadata_google.cloud.video.stitcher.v1.json | 1215 +++++ .../video_stitcher_service/create_cdn_key.rb | 54 + .../create_live_config.rb | 54 + .../create_live_session.rb | 47 + .../video_stitcher_service/create_slate.rb | 54 + .../create_vod_config.rb | 54 + .../create_vod_session.rb | 47 + .../video_stitcher_service/delete_cdn_key.rb | 54 + .../delete_live_config.rb | 54 + .../video_stitcher_service/delete_slate.rb | 54 + .../delete_vod_config.rb | 54 + .../video_stitcher_service/get_cdn_key.rb | 47 + .../get_live_ad_tag_detail.rb | 47 + .../video_stitcher_service/get_live_config.rb | 47 + .../get_live_session.rb | 47 + .../video_stitcher_service/get_slate.rb | 47 + .../get_vod_ad_tag_detail.rb | 47 + .../video_stitcher_service/get_vod_config.rb | 47 + .../video_stitcher_service/get_vod_session.rb | 47 + .../get_vod_stitch_detail.rb | 47 + .../video_stitcher_service/list_cdn_keys.rb | 51 + .../list_live_ad_tag_details.rb | 51 + .../list_live_configs.rb | 51 + .../video_stitcher_service/list_slates.rb | 51 + .../list_vod_ad_tag_details.rb | 51 + .../list_vod_configs.rb | 51 + .../list_vod_stitch_details.rb | 51 + .../video_stitcher_service/update_cdn_key.rb | 54 + .../update_live_config.rb | 54 + .../video_stitcher_service/update_slate.rb | 54 + .../update_vod_config.rb | 54 + .../video_stitcher_service_operations_test.rb | 400 ++ .../v1/video_stitcher_service_paths_test.rb | 163 + .../v1/video_stitcher_service_test.rb | 2031 ++++++++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../google-cloud-video-transcoder-v1/.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-video-transcoder-v1/Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 154 + .../google-cloud-video-transcoder-v1/Rakefile | 169 + .../gapic_metadata.json | 58 + .../google-cloud-video-transcoder-v1.gemspec | 28 + .../lib/google-cloud-video-transcoder-v1.rb | 21 + .../lib/google/cloud/video/transcoder/v1.rb | 47 + .../cloud/video/transcoder/v1/resources_pb.rb | 94 + .../google/cloud/video/transcoder/v1/rest.rb | 39 + .../cloud/video/transcoder/v1/services_pb.rb | 39 + .../transcoder/v1/services_services_pb.rb | 66 + .../video/transcoder/v1/transcoder_service.rb | 62 + .../v1/transcoder_service/client.rb | 1211 +++++ .../v1/transcoder_service/credentials.rb | 53 + .../transcoder/v1/transcoder_service/paths.rb | 90 + .../transcoder/v1/transcoder_service/rest.rb | 59 + .../v1/transcoder_service/rest/client.rb | 1112 ++++ .../transcoder_service/rest/service_stub.rb | 573 ++ .../cloud/video/transcoder/v1/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../cloud/video/transcoder/v1/resources.rb | 1763 +++++++ .../cloud/video/transcoder/v1/services.rb | 190 + .../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/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + ...data_google.cloud.video.transcoder.v1.json | 335 ++ .../snippets/transcoder_service/create_job.rb | 47 + .../transcoder_service/create_job_template.rb | 47 + .../snippets/transcoder_service/delete_job.rb | 47 + .../transcoder_service/delete_job_template.rb | 47 + .../snippets/transcoder_service/get_job.rb | 47 + .../transcoder_service/get_job_template.rb | 47 + .../transcoder_service/list_job_templates.rb | 51 + .../snippets/transcoder_service/list_jobs.rb | 51 + .../v1/transcoder_service_paths_test.rb | 79 + .../v1/transcoder_service_rest_test.rb | 544 ++ .../transcoder/v1/transcoder_service_test.rb | 604 +++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 153 + .../Rakefile | 169 + .../gapic_metadata.json | 23 + ...google-cloud-video_intelligence-v1.gemspec | 28 + .../lib/google-cloud-video_intelligence-v1.rb | 21 + .../lib/google/cloud/video_intelligence/v1.rb | 45 + .../cloud/video_intelligence/v1/rest.rb | 37 + .../cloud/video_intelligence/v1/version.rb | 28 + .../v1/video_intelligence_service.rb | 55 + .../v1/video_intelligence_service/client.rb | 526 ++ .../video_intelligence_service/credentials.rb | 51 + .../video_intelligence_service/operations.rb | 841 +++ .../v1/video_intelligence_service/rest.rb | 52 + .../video_intelligence_service/rest/client.rb | 484 ++ .../rest/operations.rb | 946 ++++ .../rest/service_stub.rb | 141 + .../v1/video_intelligence_pb.rb | 74 + .../v1/video_intelligence_services_pb.rb | 48 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../v1/video_intelligence.rb | 998 ++++ .../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/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + ...ata_google.cloud.videointelligence.v1.json | 55 + .../annotate_video.rb | 54 + ...eo_intelligence_service_operations_test.rb | 400 ++ .../video_intelligence_service_rest_test.rb | 158 + .../v1/video_intelligence_service_test.rb | 191 + .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 153 + .../Rakefile | 169 + .../gapic_metadata.json | 23 + ...e-cloud-video_intelligence-v1beta2.gemspec | 28 + ...google-cloud-video_intelligence-v1beta2.rb | 21 + .../cloud/video_intelligence/v1beta2.rb | 45 + .../cloud/video_intelligence/v1beta2/rest.rb | 37 + .../video_intelligence/v1beta2/version.rb | 28 + .../v1beta2/video_intelligence_service.rb | 55 + .../video_intelligence_service/client.rb | 525 ++ .../video_intelligence_service/credentials.rb | 51 + .../video_intelligence_service/operations.rb | 841 +++ .../video_intelligence_service/rest.rb | 52 + .../video_intelligence_service/rest/client.rb | 483 ++ .../rest/operations.rb | 946 ++++ .../rest/service_stub.rb | 141 + .../v1beta2/video_intelligence_pb.rb | 52 + .../v1beta2/video_intelligence_services_pb.rb | 49 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../v1beta2/video_intelligence.rb | 441 ++ .../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/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + ...oogle.cloud.videointelligence.v1beta2.json | 55 + .../annotate_video.rb | 54 + ...eo_intelligence_service_operations_test.rb | 400 ++ .../video_intelligence_service_rest_test.rb | 158 + .../video_intelligence_service_test.rb | 191 + .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 153 + .../Rakefile | 169 + .../gapic_metadata.json | 23 + ...cloud-video_intelligence-v1p1beta1.gemspec | 28 + ...ogle-cloud-video_intelligence-v1p1beta1.rb | 21 + .../cloud/video_intelligence/v1p1beta1.rb | 45 + .../video_intelligence/v1p1beta1/rest.rb | 37 + .../video_intelligence/v1p1beta1/version.rb | 28 + .../v1p1beta1/video_intelligence_service.rb | 55 + .../video_intelligence_service/client.rb | 525 ++ .../video_intelligence_service/credentials.rb | 51 + .../video_intelligence_service/operations.rb | 841 +++ .../video_intelligence_service/rest.rb | 52 + .../video_intelligence_service/rest/client.rb | 483 ++ .../rest/operations.rb | 946 ++++ .../rest/service_stub.rb | 141 + .../v1p1beta1/video_intelligence_pb.rb | 52 + .../video_intelligence_services_pb.rb | 49 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../v1p1beta1/video_intelligence.rb | 479 ++ .../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/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + ...gle.cloud.videointelligence.v1p1beta1.json | 55 + .../annotate_video.rb | 54 + ...eo_intelligence_service_operations_test.rb | 400 ++ .../video_intelligence_service_rest_test.rb | 158 + .../video_intelligence_service_test.rb | 191 + .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 153 + .../Rakefile | 169 + .../gapic_metadata.json | 23 + ...cloud-video_intelligence-v1p2beta1.gemspec | 28 + ...ogle-cloud-video_intelligence-v1p2beta1.rb | 21 + .../cloud/video_intelligence/v1p2beta1.rb | 45 + .../video_intelligence/v1p2beta1/rest.rb | 37 + .../video_intelligence/v1p2beta1/version.rb | 28 + .../v1p2beta1/video_intelligence_service.rb | 55 + .../video_intelligence_service/client.rb | 523 ++ .../video_intelligence_service/credentials.rb | 51 + .../video_intelligence_service/operations.rb | 841 +++ .../video_intelligence_service/rest.rb | 52 + .../video_intelligence_service/rest/client.rb | 481 ++ .../rest/operations.rb | 946 ++++ .../rest/service_stub.rb | 141 + .../v1p2beta1/video_intelligence_pb.rb | 56 + .../video_intelligence_services_pb.rb | 49 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../v1p2beta1/video_intelligence.rb | 534 ++ .../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/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + ...gle.cloud.videointelligence.v1p2beta1.json | 55 + .../annotate_video.rb | 54 + ...eo_intelligence_service_operations_test.rb | 400 ++ .../video_intelligence_service_rest_test.rb | 158 + .../video_intelligence_service_test.rb | 191 + .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 153 + .../Rakefile | 169 + .../gapic_metadata.json | 37 + ...cloud-video_intelligence-v1p3beta1.gemspec | 28 + ...ogle-cloud-video_intelligence-v1p3beta1.rb | 21 + .../cloud/video_intelligence/v1p3beta1.rb | 46 + .../video_intelligence/v1p3beta1/rest.rb | 37 + .../streaming_video_intelligence_service.rb | 48 + .../client.rb | 472 ++ .../credentials.rb | 51 + .../video_intelligence/v1p3beta1/version.rb | 28 + .../v1p3beta1/video_intelligence_service.rb | 55 + .../video_intelligence_service/client.rb | 526 ++ .../video_intelligence_service/credentials.rb | 51 + .../video_intelligence_service/operations.rb | 841 +++ .../video_intelligence_service/rest.rb | 52 + .../video_intelligence_service/rest/client.rb | 484 ++ .../rest/operations.rb | 925 ++++ .../rest/service_stub.rb | 141 + .../v1p3beta1/video_intelligence_pb.rb | 88 + .../video_intelligence_services_pb.rb | 66 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../v1p3beta1/video_intelligence.rb | 1218 +++++ .../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/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + ...gle.cloud.videointelligence.v1p3beta1.json | 95 + .../streaming_annotate_video.rb | 56 + .../annotate_video.rb | 54 + ...reaming_video_intelligence_service_test.rb | 193 + ...eo_intelligence_service_operations_test.rb | 400 ++ .../video_intelligence_service_rest_test.rb | 158 + .../video_intelligence_service_test.rb | 191 + .../test/helper.rb | 26 + .../google-cloud-vision-v1/.gitignore | 22 + .../.repo-metadata.json | 18 + .../google-cloud-vision-v1/.rubocop.yml | 33 + .../google-cloud-vision-v1/.toys.rb | 28 + .../google-cloud-vision-v1/.yardopts | 12 + .../google-cloud-vision-v1/AUTHENTICATION.md | 122 + .../google-cloud-vision-v1/CHANGELOG.md | 2 + .../google-cloud-vision-v1/Gemfile | 14 + .../google-cloud-vision-v1/LICENSE.md | 201 + .../google-cloud-vision-v1/README.md | 154 + .../google-cloud-vision-v1/Rakefile | 169 + .../gapic_metadata.json | 142 + .../google-cloud-vision-v1.gemspec | 28 + .../lib/google-cloud-vision-v1.rb | 21 + .../lib/google/cloud/vision/v1.rb | 46 + .../lib/google/cloud/vision/v1/geometry_pb.rb | 24 + .../google/cloud/vision/v1/image_annotator.rb | 58 + .../cloud/vision/v1/image_annotator/client.rb | 874 ++++ .../vision/v1/image_annotator/credentials.rb | 52 + .../vision/v1/image_annotator/operations.rb | 841 +++ .../cloud/vision/v1/image_annotator/paths.rb | 52 + .../cloud/vision/v1/image_annotator/rest.rb | 55 + .../vision/v1/image_annotator/rest/client.rb | 835 +++ .../v1/image_annotator/rest/operations.rb | 946 ++++ .../v1/image_annotator/rest/service_stub.rb | 385 ++ .../cloud/vision/v1/image_annotator_pb.rb | 77 + .../vision/v1/image_annotator_services_pb.rb | 72 + .../google/cloud/vision/v1/product_search.rb | 71 + .../cloud/vision/v1/product_search/client.rb | 2559 +++++++++ .../vision/v1/product_search/credentials.rb | 52 + .../vision/v1/product_search/operations.rb | 841 +++ .../cloud/vision/v1/product_search/paths.rb | 109 + .../cloud/vision/v1/product_search/rest.rb | 68 + .../vision/v1/product_search/rest/client.rb | 2383 +++++++++ .../v1/product_search/rest/operations.rb | 946 ++++ .../v1/product_search/rest/service_stub.rb | 1249 +++++ .../cloud/vision/v1/product_search_pb.rb | 30 + .../vision/v1/product_search_service_pb.rb | 64 + .../v1/product_search_service_services_pb.rb | 233 + .../lib/google/cloud/vision/v1/rest.rb | 38 + .../cloud/vision/v1/text_annotation_pb.rb | 33 + .../lib/google/cloud/vision/v1/version.rb | 28 + .../cloud/vision/v1/web_detection_pb.rb | 25 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../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/vision/v1/geometry.rb | 82 + .../google/cloud/vision/v1/image_annotator.rb | 1126 ++++ .../google/cloud/vision/v1/product_search.rb | 135 + .../cloud/vision/v1/product_search_service.rb | 678 +++ .../google/cloud/vision/v1/text_annotation.rb | 286 + .../google/cloud/vision/v1/web_detection.rb | 121 + .../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 | 148 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/color.rb | 173 + .../proto_docs/google/type/latlng.rb | 38 + .../google-cloud-vision-v1/snippets/Gemfile | 32 + .../async_batch_annotate_files.rb | 54 + .../async_batch_annotate_images.rb | 54 + .../image_annotator/batch_annotate_files.rb | 47 + .../image_annotator/batch_annotate_images.rb | 47 + .../add_product_to_product_set.rb | 47 + .../snippets/product_search/create_product.rb | 47 + .../product_search/create_product_set.rb | 47 + .../product_search/create_reference_image.rb | 47 + .../snippets/product_search/delete_product.rb | 47 + .../product_search/delete_product_set.rb | 47 + .../product_search/delete_reference_image.rb | 47 + .../snippets/product_search/get_product.rb | 47 + .../product_search/get_product_set.rb | 47 + .../product_search/get_reference_image.rb | 47 + .../product_search/import_product_sets.rb | 54 + .../product_search/list_product_sets.rb | 51 + .../snippets/product_search/list_products.rb | 51 + .../list_products_in_product_set.rb | 51 + .../product_search/list_reference_images.rb | 51 + .../snippets/product_search/purge_products.rb | 54 + .../remove_product_from_product_set.rb | 47 + .../snippets/product_search/update_product.rb | 47 + .../product_search/update_product_set.rb | 47 + ...ippet_metadata_google.cloud.vision.v1.json | 935 ++++ .../v1/image_annotator_operations_test.rb | 400 ++ .../vision/v1/image_annotator_paths_test.rb | 55 + .../vision/v1/image_annotator_rest_test.rb | 324 ++ .../cloud/vision/v1/image_annotator_test.rb | 378 ++ .../v1/product_search_operations_test.rb | 400 ++ .../vision/v1/product_search_paths_test.rb | 91 + .../vision/v1/product_search_rest_test.rb | 1146 ++++ .../cloud/vision/v1/product_search_test.rb | 1293 +++++ .../google-cloud-vision-v1/test/helper.rb | 26 + 1378 files changed, 284166 insertions(+) create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/.gitignore create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/.yardopts create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/Gemfile create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/README.md create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/Rakefile create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/google-cloud-talent-v4beta1.gemspec create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google-cloud-talent-v4beta1.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/batch_pb.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/common_pb.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_pb.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/client.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/client.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/credentials.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/paths.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/rest.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_pb.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/client.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/filters_pb.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/histogram_pb.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_pb.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/client.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/rest.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_pb.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/client.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/version.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/common.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/company.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/company_service.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/completion_service.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/event.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/event_service.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/filters.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/histogram.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/job.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/job_service.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/tenant.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/tenant_service.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/type/latlng.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/type/money.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/type/postal_address.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/type/timeofday.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/create_company.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/delete_company.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/get_company.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/list_companies.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/update_company.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/completion/complete_query.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/event_service/create_client_event.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/batch_create_jobs.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/batch_delete_jobs.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/batch_update_jobs.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/create_job.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/delete_job.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/get_job.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/list_jobs.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/search_jobs.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/search_jobs_for_alert.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/update_job.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/snippet_metadata_google.cloud.talent.v4beta1.json create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/create_tenant.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/delete_tenant.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/get_tenant.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/list_tenants.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/update_tenant.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/company_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/company_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/company_service_test.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/completion_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/completion_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/completion_test.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/event_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/event_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/event_service_test.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_test.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/tenant_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/tenant_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/tenant_service_test.rb create mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/.gitignore create mode 100644 owl-bot-staging/google-cloud-tasks-v2/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-tasks-v2/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-tasks-v2/.toys.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/.yardopts create mode 100644 owl-bot-staging/google-cloud-tasks-v2/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-tasks-v2/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-tasks-v2/Gemfile create mode 100644 owl-bot-staging/google-cloud-tasks-v2/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-tasks-v2/README.md create mode 100644 owl-bot-staging/google-cloud-tasks-v2/Rakefile create mode 100644 owl-bot-staging/google-cloud-tasks-v2/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-tasks-v2/google-cloud-tasks-v2.gemspec create mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google-cloud-tasks-v2.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/client.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/credentials.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/paths.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/rest.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloudtasks_pb.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloudtasks_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/queue_pb.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/rest.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/target_pb.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/task_pb.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/version.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/cloudtasks.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/queue.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/target.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/task.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/create_queue.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/create_task.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/delete_queue.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/delete_task.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/get_queue.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/get_task.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/list_queues.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/list_tasks.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/pause_queue.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/purge_queue.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/resume_queue.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/run_task.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/update_queue.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/snippet_metadata_google.cloud.tasks.v2.json create mode 100644 owl-bot-staging/google-cloud-tasks-v2/test/google/cloud/tasks/v2/cloud_tasks_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/test/google/cloud/tasks/v2/cloud_tasks_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/test/google/cloud/tasks/v2/cloud_tasks_test.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/.gitignore create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/.toys.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/.yardopts create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/Gemfile create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/README.md create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/Rakefile create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/google-cloud-tasks-v2beta2.gemspec create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google-cloud-tasks-v2beta2.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/client.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/credentials.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/paths.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/rest.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloudtasks_pb.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloudtasks_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/old_target_pb.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/queue_pb.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/rest.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/target_pb.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/task_pb.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/version.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/httpbody.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/cloudtasks.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/queue.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/target.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/task.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/acknowledge_task.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/cancel_lease.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/create_queue.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/create_task.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/delete_queue.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/delete_task.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/get_queue.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/get_task.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/lease_tasks.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/list_queues.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/list_tasks.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/pause_queue.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/purge_queue.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/renew_lease.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/resume_queue.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/run_task.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/update_queue.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/upload_queue_yaml.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/snippet_metadata_google.cloud.tasks.v2beta2.json create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/test/google/cloud/tasks/v2beta2/cloud_tasks_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/test/google/cloud/tasks/v2beta2/cloud_tasks_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/test/google/cloud/tasks/v2beta2/cloud_tasks_test.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/.gitignore create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/.toys.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/.yardopts create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/Gemfile create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/README.md create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/Rakefile create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/google-cloud-tasks-v2beta3.gemspec create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google-cloud-tasks-v2beta3.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/client.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/credentials.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/paths.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/rest.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloudtasks_pb.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloudtasks_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/queue_pb.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/rest.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/target_pb.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/task_pb.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/version.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/cloudtasks.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/queue.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/target.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/task.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/create_queue.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/create_task.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/delete_queue.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/delete_task.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/get_queue.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/get_task.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/list_queues.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/list_tasks.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/pause_queue.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/purge_queue.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/resume_queue.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/run_task.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/update_queue.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/snippet_metadata_google.cloud.tasks.v2beta3.json create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/test/google/cloud/tasks/v2beta3/cloud_tasks_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/test/google/cloud/tasks/v2beta3/cloud_tasks_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/test/google/cloud/tasks/v2beta3/cloud_tasks_test.rb create mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/README.md create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/google-cloud-telco_automation-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google-cloud-telco_automation-v1.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/client.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/credentials.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/operations.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/paths.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telcoautomation/v1/telcoautomation_pb.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telcoautomation/v1/telcoautomation_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/cloud/telcoautomation/v1/telcoautomation.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/snippet_metadata_google.cloud.telcoautomation.v1.json create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/apply_deployment.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/apply_hydrated_deployment.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/approve_blueprint.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/compute_deployment_status.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_blueprint.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_deployment.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_edge_slm.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_orchestration_cluster.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/delete_blueprint.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/delete_edge_slm.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/delete_orchestration_cluster.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/discard_blueprint_changes.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/discard_deployment_changes.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_blueprint.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_deployment.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_edge_slm.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_hydrated_deployment.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_orchestration_cluster.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_public_blueprint.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_blueprint_revisions.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_blueprints.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_deployment_revisions.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_deployments.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_edge_slms.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_hydrated_deployments.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_orchestration_clusters.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_public_blueprints.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/propose_blueprint.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/reject_blueprint.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/remove_deployment.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/rollback_deployment.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/search_blueprint_revisions.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/search_deployment_revisions.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/update_blueprint.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/update_deployment.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/update_hydrated_deployment.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_test.rb create mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/README.md create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/google-cloud-text_to_speech-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google-cloud-text_to_speech-v1.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/client.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/credentials.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/paths.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/rest.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/client.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/credentials.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/operations.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/paths.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_lrs_pb.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_lrs_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_pb.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/cloud/texttospeech/v1/cloud_tts.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/cloud/texttospeech/v1/cloud_tts_lrs.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/snippets/snippet_metadata_google.cloud.texttospeech.v1.json create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech/list_voices.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech/streaming_synthesize.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech/synthesize_speech.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech_long_audio_synthesize/synthesize_long_audio.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_test.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_test.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/.gitignore create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/.yardopts create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/Gemfile create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/README.md create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/Rakefile create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/google-cloud-text_to_speech-v1beta1.gemspec create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google-cloud-text_to_speech-v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/rest.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/client.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/credentials.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/paths.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/rest.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/client.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/credentials.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/operations.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/paths.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/version.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/texttospeech/v1beta1/cloud_tts_lrs_pb.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/texttospeech/v1beta1/cloud_tts_lrs_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/texttospeech/v1beta1/cloud_tts_pb.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/texttospeech/v1beta1/cloud_tts_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/cloud/texttospeech/v1beta1/cloud_tts.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/cloud/texttospeech/v1beta1/cloud_tts_lrs.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/snippet_metadata_google.cloud.texttospeech.v1beta1.json create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech/list_voices.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech/streaming_synthesize.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech/synthesize_speech.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech_long_audio_synthesize/synthesize_long_audio.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_test.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_test.rb create mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-tpu-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-tpu-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-tpu-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-tpu-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-tpu-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-tpu-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-tpu-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-tpu-v1/README.md create mode 100644 owl-bot-staging/google-cloud-tpu-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-tpu-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-tpu-v1/google-cloud-tpu-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-tpu-v1/lib/google-cloud-tpu-v1.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/cloud_tpu_pb.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/cloud_tpu_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/client.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/credentials.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/operations.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/paths.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/cloud/tpu/v1/cloud_tpu.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/snippet_metadata_google.cloud.tpu.v1.json create mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/create_node.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/delete_node.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/get_accelerator_type.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/get_node.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/get_tensor_flow_version.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/list_accelerator_types.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/list_nodes.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/list_tensor_flow_versions.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/reimage_node.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/start_node.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/stop_node.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/test/google/cloud/tpu/v1/tpu_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/test/google/cloud/tpu/v1/tpu_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/test/google/cloud/tpu/v1/tpu_test.rb create mode 100644 owl-bot-staging/google-cloud-tpu-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-trace-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-trace-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-trace-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-trace-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-trace-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-trace-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-trace-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-trace-v1/README.md create mode 100644 owl-bot-staging/google-cloud-trace-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-trace-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-trace-v1/google-cloud-trace-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-trace-v1/lib/google-cloud-trace-v1.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/client.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/lib/google/devtools/cloudtrace/v1/trace_pb.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/lib/google/devtools/cloudtrace/v1/trace_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-trace-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/proto_docs/google/devtools/cloudtrace/v1/trace.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-trace-v1/snippets/snippet_metadata_google.devtools.cloudtrace.v1.json create mode 100644 owl-bot-staging/google-cloud-trace-v1/snippets/trace_service/get_trace.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/snippets/trace_service/list_traces.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/snippets/trace_service/patch_traces.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/test/google/cloud/trace/v1/trace_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/test/google/cloud/trace/v1/trace_service_test.rb create mode 100644 owl-bot-staging/google-cloud-trace-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/.gitignore create mode 100644 owl-bot-staging/google-cloud-trace-v2/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-trace-v2/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-trace-v2/.toys.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/.yardopts create mode 100644 owl-bot-staging/google-cloud-trace-v2/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-trace-v2/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-trace-v2/Gemfile create mode 100644 owl-bot-staging/google-cloud-trace-v2/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-trace-v2/README.md create mode 100644 owl-bot-staging/google-cloud-trace-v2/Rakefile create mode 100644 owl-bot-staging/google-cloud-trace-v2/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-trace-v2/google-cloud-trace-v2.gemspec create mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google-cloud-trace-v2.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/rest.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/client.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/version.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/devtools/cloudtrace/v2/trace_pb.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/devtools/cloudtrace/v2/tracing_pb.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/devtools/cloudtrace/v2/tracing_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/google/devtools/cloudtrace/v2/trace.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/google/devtools/cloudtrace/v2/tracing.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-trace-v2/snippets/snippet_metadata_google.devtools.cloudtrace.v2.json create mode 100644 owl-bot-staging/google-cloud-trace-v2/snippets/trace_service/batch_write_spans.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/snippets/trace_service/create_span.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/test/google/cloud/trace/v2/trace_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/test/google/cloud/trace/v2/trace_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/test/google/cloud/trace/v2/trace_service_test.rb create mode 100644 owl-bot-staging/google-cloud-trace-v2/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/.gitignore create mode 100644 owl-bot-staging/google-cloud-translate-v3/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-translate-v3/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-translate-v3/.toys.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/.yardopts create mode 100644 owl-bot-staging/google-cloud-translate-v3/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-translate-v3/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-translate-v3/Gemfile create mode 100644 owl-bot-staging/google-cloud-translate-v3/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-translate-v3/README.md create mode 100644 owl-bot-staging/google-cloud-translate-v3/Rakefile create mode 100644 owl-bot-staging/google-cloud-translate-v3/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-translate-v3/google-cloud-translate-v3.gemspec create mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google-cloud-translate-v3.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/adaptive_mt_pb.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/automl_translation_pb.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/common_pb.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/rest.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/client.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/version.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/adaptive_mt.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/automl_translation.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/common.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/translation_service.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/snippet_metadata_google.cloud.translation.v3.json create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/adaptive_mt_translate.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/batch_translate_document.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/batch_translate_text.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_adaptive_mt_dataset.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_dataset.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_glossary.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_glossary_entry.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_model.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_adaptive_mt_dataset.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_adaptive_mt_file.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_dataset.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_glossary.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_glossary_entry.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_model.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/detect_language.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/export_data.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_adaptive_mt_dataset.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_adaptive_mt_file.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_dataset.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_glossary.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_glossary_entry.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_model.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_supported_languages.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/import_adaptive_mt_file.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/import_data.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_adaptive_mt_datasets.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_adaptive_mt_files.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_adaptive_mt_sentences.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_datasets.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_examples.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_glossaries.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_glossary_entries.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_models.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/romanize_text.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/translate_document.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/translate_text.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/update_glossary.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/update_glossary_entry.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_test.rb create mode 100644 owl-bot-staging/google-cloud-translate-v3/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/README.md create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/google-cloud-video-live_stream-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google-cloud-video-live_stream-v1.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/client.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/outputs_pb.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/resources_pb.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/cloud/video/livestream/v1/outputs.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/cloud/video/livestream/v1/resources.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/cloud/video/livestream/v1/service.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/type/datetime.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_asset.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_channel.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_clip.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_dvr_session.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_event.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_input.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_asset.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_channel.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_clip.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_dvr_session.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_event.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_input.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_asset.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_channel.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_clip.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_dvr_session.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_event.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_input.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_pool.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_assets.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_channels.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_clips.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_dvr_sessions.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_events.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_inputs.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/preview_input.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/start_channel.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/start_distribution.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/stop_channel.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/stop_distribution.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_channel.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_dvr_session.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_input.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_pool.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/snippet_metadata_google.cloud.video.livestream.v1.json create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_test.rb create mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/README.md create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/google-cloud-video-stitcher-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google-cloud-video-stitcher-v1.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/ad_tag_details_pb.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/cdn_keys_pb.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/companions_pb.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/events_pb.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/fetch_options_pb.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/live_configs_pb.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/sessions_pb.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/slates_pb.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/stitch_details_pb.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/client.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/vod_configs_pb.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/ad_tag_details.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/cdn_keys.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/companions.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/events.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/fetch_options.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/live_configs.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/sessions.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/slates.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/stitch_details.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/video_stitcher_service.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/vod_configs.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/snippet_metadata_google.cloud.video.stitcher.v1.json create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_cdn_key.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_live_config.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_live_session.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_slate.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_vod_config.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_vod_session.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_cdn_key.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_live_config.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_slate.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_vod_config.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_cdn_key.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_live_ad_tag_detail.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_live_config.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_live_session.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_slate.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_ad_tag_detail.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_config.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_session.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_stitch_detail.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_cdn_keys.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_live_ad_tag_details.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_live_configs.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_slates.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_vod_ad_tag_details.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_vod_configs.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_vod_stitch_details.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_cdn_key.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_live_config.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_slate.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_vod_config.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/test/google/cloud/video/stitcher/v1/video_stitcher_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/test/google/cloud/video/stitcher/v1/video_stitcher_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/test/google/cloud/video/stitcher/v1/video_stitcher_service_test.rb create mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/README.md create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/google-cloud-video-transcoder-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google-cloud-video-transcoder-v1.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/resources_pb.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/services_pb.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/services_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/client.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/cloud/video/transcoder/v1/resources.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/cloud/video/transcoder/v1/services.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/snippets/snippet_metadata_google.cloud.video.transcoder.v1.json create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/create_job.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/create_job_template.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/delete_job.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/delete_job_template.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/get_job.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/get_job_template.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/list_job_templates.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/list_jobs.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/test/google/cloud/video/transcoder/v1/transcoder_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/test/google/cloud/video/transcoder/v1/transcoder_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/test/google/cloud/video/transcoder/v1/transcoder_service_test.rb create mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/README.md create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/google-cloud-video_intelligence-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google-cloud-video_intelligence-v1.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/client.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/videointelligence/v1/video_intelligence_pb.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/videointelligence/v1/video_intelligence_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/cloud/videointelligence/v1/video_intelligence.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/snippets/snippet_metadata_google.cloud.videointelligence.v1.json create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/snippets/video_intelligence_service/annotate_video.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/test/google/cloud/video_intelligence/v1/video_intelligence_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/test/google/cloud/video_intelligence/v1/video_intelligence_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/test/google/cloud/video_intelligence/v1/video_intelligence_service_test.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/.gitignore create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/.toys.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/.yardopts create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/Gemfile create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/README.md create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/Rakefile create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/google-cloud-video_intelligence-v1beta2.gemspec create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google-cloud-video_intelligence-v1beta2.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/rest.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/version.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/client.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/videointelligence/v1beta2/video_intelligence_pb.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/videointelligence/v1beta2/video_intelligence_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/cloud/videointelligence/v1beta2/video_intelligence.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/snippets/snippet_metadata_google.cloud.videointelligence.v1beta2.json create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/snippets/video_intelligence_service/annotate_video.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/google/cloud/video_intelligence/v1beta2/video_intelligence_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/google/cloud/video_intelligence/v1beta2/video_intelligence_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/google/cloud/video_intelligence/v1beta2/video_intelligence_service_test.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.gitignore create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.yardopts create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/Gemfile create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/README.md create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/Rakefile create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/google-cloud-video_intelligence-v1p1beta1.gemspec create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google-cloud-video_intelligence-v1p1beta1.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/rest.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/version.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/client.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/videointelligence/v1p1beta1/video_intelligence_pb.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/videointelligence/v1p1beta1/video_intelligence_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/cloud/videointelligence/v1p1beta1/video_intelligence.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/snippets/snippet_metadata_google.cloud.videointelligence.v1p1beta1.json create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/snippets/video_intelligence_service/annotate_video.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_test.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.gitignore create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.yardopts create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/Gemfile create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/README.md create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/Rakefile create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/google-cloud-video_intelligence-v1p2beta1.gemspec create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google-cloud-video_intelligence-v1p2beta1.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/rest.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/version.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/client.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/videointelligence/v1p2beta1/video_intelligence_pb.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/videointelligence/v1p2beta1/video_intelligence_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/cloud/videointelligence/v1p2beta1/video_intelligence.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/snippets/snippet_metadata_google.cloud.videointelligence.v1p2beta1.json create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/snippets/video_intelligence_service/annotate_video.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_test.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.gitignore create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.yardopts create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/Gemfile create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/README.md create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/Rakefile create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/google-cloud-video_intelligence-v1p3beta1.gemspec create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google-cloud-video_intelligence-v1p3beta1.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/rest.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service/client.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/version.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/client.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/videointelligence/v1p3beta1/video_intelligence_pb.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/videointelligence/v1p3beta1/video_intelligence_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/cloud/videointelligence/v1p3beta1/video_intelligence.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/snippet_metadata_google.cloud.videointelligence.v1p3beta1.json create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/streaming_video_intelligence_service/streaming_annotate_video.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/video_intelligence_service/annotate_video.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service_test.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service_test.rb create mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-vision-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-vision-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-vision-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-vision-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-vision-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-vision-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-vision-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-vision-v1/README.md create mode 100644 owl-bot-staging/google-cloud-vision-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-vision-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-vision-v1/google-cloud-vision-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google-cloud-vision-v1.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/geometry_pb.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/client.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/credentials.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/operations.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/paths.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator_pb.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/client.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/credentials.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/operations.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/paths.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search_pb.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/text_annotation_pb.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/web_detection_pb.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/geometry.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/image_annotator.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/product_search.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/product_search_service.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/text_annotation.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/web_detection.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/type/color.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/type/latlng.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/async_batch_annotate_files.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/async_batch_annotate_images.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/batch_annotate_files.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/batch_annotate_images.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/add_product_to_product_set.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/create_product.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/create_product_set.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/create_reference_image.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/delete_product.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/delete_product_set.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/delete_reference_image.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/get_product.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/get_product_set.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/get_reference_image.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/import_product_sets.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_product_sets.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_products.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_products_in_product_set.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_reference_images.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/purge_products.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/remove_product_from_product_set.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/update_product.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/update_product_set.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/snippet_metadata_google.cloud.vision.v1.json create mode 100644 owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_test.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_test.rb create mode 100644 owl-bot-staging/google-cloud-vision-v1/test/helper.rb diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/.gitignore b/owl-bot-staging/google-cloud-talent-v4beta1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/.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-talent-v4beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-talent-v4beta1/.repo-metadata.json new file mode 100644 index 000000000000..64fc84b59ea7 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "jobs.googleapis.com", + "api_shortname": "jobs", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-talent-v4beta1/latest", + "distribution_name": "google-cloud-talent-v4beta1", + "is_cloud": true, + "language": "ruby", + "name": "jobs", + "name_pretty": "Cloud Talent Solution V4beta1 API", + "product_documentation": "https://cloud.google.com/solutions/talent-solution", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Transform your job search and candidate matching capabilities with Cloud Talent Solution, designed to support enterprise talent acquisition technology and evolve with your growing needs. This AI solution includes features such as Job Search and Profile Search to provide candidates and employers with an enhanced talent acquisition experience. Note that google-cloud-talent-v4beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-talent instead. See the readme for more details.", + "ruby-cloud-env-prefix": "TALENT", + "ruby-cloud-product-url": "https://cloud.google.com/solutions/talent-solution", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/.rubocop.yml b/owl-bot-staging/google-cloud-talent-v4beta1/.rubocop.yml new file mode 100644 index 000000000000..8fe2d7ec9ecd --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-talent-v4beta1.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-talent-v4beta1.rb" diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/.toys.rb b/owl-bot-staging/google-cloud-talent-v4beta1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/.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-talent-v4beta1/.yardopts b/owl-bot-staging/google-cloud-talent-v4beta1/.yardopts new file mode 100644 index 000000000000..72b9d2c72c9c --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Talent Solution V4beta1 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-talent-v4beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-talent-v4beta1/AUTHENTICATION.md new file mode 100644 index 000000000000..26b135cba9b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-talent-v4beta1 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-talent-v4beta1 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/talent/v4beta1" + +client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/talent/v4beta1" + +::Google::Cloud::Talent::V4beta1::CompanyService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Talent::V4beta1::CompanyService::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-talent-v4beta1 +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/talent/v4beta1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Talent::V4beta1::CompanyService::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-talent-v4beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-talent-v4beta1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/Gemfile b/owl-bot-staging/google-cloud-talent-v4beta1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/LICENSE.md b/owl-bot-staging/google-cloud-talent-v4beta1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/README.md b/owl-bot-staging/google-cloud-talent-v4beta1/README.md new file mode 100644 index 000000000000..5a72cfcb8d08 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Talent Solution V4beta1 API + +Cloud Talent Solution provides the capability to create, read, update, and delete job postings, as well as search jobs based on keywords and filters. + +Transform your job search and candidate matching capabilities with Cloud Talent Solution, designed to support enterprise talent acquisition technology and evolve with your growing needs. This AI solution includes features such as Job Search and Profile Search to provide candidates and employers with an enhanced talent acquisition experience. + +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 Talent Solution V4beta1 API. Most users should consider using +the main client gem, +[google-cloud-talent](https://rubygems.org/gems/google-cloud-talent). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-talent-v4beta1 +``` + +## 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/jobs.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/talent/v4beta1" + +client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new +request = ::Google::Cloud::Talent::V4beta1::CreateCompanyRequest.new # (request fields as keyword arguments...) +response = client.create_company request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-talent-v4beta1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/solutions/talent-solution) +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/talent/v4beta1" +require "logger" + +client = ::Google::Cloud::Talent::V4beta1::CompanyService::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-talent`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-talent-v4beta1`. +_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-talent`. +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-talent-v4beta1`. + +### 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-talent-v4beta1/Rakefile b/owl-bot-staging/google-cloud-talent-v4beta1/Rakefile new file mode 100644 index 000000000000..fa2bfbd46707 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["TALENT_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["TALENT_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["TALENT_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 TALENT_TEST_PROJECT=test123 TALENT_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/talent/v4beta1/company_service/credentials" + ::Google::Cloud::Talent::V4beta1::CompanyService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["TALENT_PROJECT"] = project + ENV["TALENT_TEST_PROJECT"] = project + ENV["TALENT_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-talent-v4beta1 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-talent-v4beta1 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-talent-v4beta1 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-talent-v4beta1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-talent-v4beta1" + header "google-cloud-talent-v4beta1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-talent-v4beta1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-talent-v4beta1 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-talent-v4beta1 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-talent-v4beta1 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-talent-v4beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-talent-v4beta1/gapic_metadata.json new file mode 100644 index 000000000000..91c70fb53d53 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/gapic_metadata.json @@ -0,0 +1,164 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.talent.v4beta1", + "libraryPackage": "::Google::Cloud::Talent::V4beta1", + "services": { + "CompanyService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Talent::V4beta1::CompanyService::Client", + "rpcs": { + "CreateCompany": { + "methods": [ + "create_company" + ] + }, + "GetCompany": { + "methods": [ + "get_company" + ] + }, + "UpdateCompany": { + "methods": [ + "update_company" + ] + }, + "DeleteCompany": { + "methods": [ + "delete_company" + ] + }, + "ListCompanies": { + "methods": [ + "list_companies" + ] + } + } + } + } + }, + "Completion": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Talent::V4beta1::Completion::Client", + "rpcs": { + "CompleteQuery": { + "methods": [ + "complete_query" + ] + } + } + } + } + }, + "EventService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Talent::V4beta1::EventService::Client", + "rpcs": { + "CreateClientEvent": { + "methods": [ + "create_client_event" + ] + } + } + } + } + }, + "JobService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Talent::V4beta1::JobService::Client", + "rpcs": { + "CreateJob": { + "methods": [ + "create_job" + ] + }, + "BatchCreateJobs": { + "methods": [ + "batch_create_jobs" + ] + }, + "GetJob": { + "methods": [ + "get_job" + ] + }, + "UpdateJob": { + "methods": [ + "update_job" + ] + }, + "BatchUpdateJobs": { + "methods": [ + "batch_update_jobs" + ] + }, + "DeleteJob": { + "methods": [ + "delete_job" + ] + }, + "BatchDeleteJobs": { + "methods": [ + "batch_delete_jobs" + ] + }, + "ListJobs": { + "methods": [ + "list_jobs" + ] + }, + "SearchJobs": { + "methods": [ + "search_jobs" + ] + }, + "SearchJobsForAlert": { + "methods": [ + "search_jobs_for_alert" + ] + } + } + } + } + }, + "TenantService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Talent::V4beta1::TenantService::Client", + "rpcs": { + "CreateTenant": { + "methods": [ + "create_tenant" + ] + }, + "GetTenant": { + "methods": [ + "get_tenant" + ] + }, + "UpdateTenant": { + "methods": [ + "update_tenant" + ] + }, + "DeleteTenant": { + "methods": [ + "delete_tenant" + ] + }, + "ListTenants": { + "methods": [ + "list_tenants" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/google-cloud-talent-v4beta1.gemspec b/owl-bot-staging/google-cloud-talent-v4beta1/google-cloud-talent-v4beta1.gemspec new file mode 100644 index 000000000000..9a1086bd8796 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/google-cloud-talent-v4beta1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/talent/v4beta1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-talent-v4beta1" + gem.version = Google::Cloud::Talent::V4beta1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Transform your job search and candidate matching capabilities with Cloud Talent Solution, designed to support enterprise talent acquisition technology and evolve with your growing needs. This AI solution includes features such as Job Search and Profile Search to provide candidates and employers with an enhanced talent acquisition experience. Note that google-cloud-talent-v4beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-talent instead. See the readme for more details." + gem.summary = "Cloud Talent Solution provides the capability to create, read, update, and delete job postings, as well as search jobs based on keywords and filters." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google-cloud-talent-v4beta1.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google-cloud-talent-v4beta1.rb new file mode 100644 index 000000000000..53968619b7a8 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google-cloud-talent-v4beta1.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/talent/v4beta1" diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1.rb new file mode 100644 index 000000000000..52a7a7baa5bd --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/talent/v4beta1/company_service" +require "google/cloud/talent/v4beta1/completion" +require "google/cloud/talent/v4beta1/event_service" +require "google/cloud/talent/v4beta1/job_service" +require "google/cloud/talent/v4beta1/tenant_service" +require "google/cloud/talent/v4beta1/version" + +module Google + module Cloud + module Talent + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/talent/v4beta1" + # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/talent/v4beta1" + # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new + # + module V4beta1 + end + end + end +end + +helper_path = ::File.join __dir__, "v4beta1", "_helpers.rb" +require "google/cloud/talent/v4beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/batch_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/batch_pb.rb new file mode 100644 index 000000000000..ca865c4b1ff8 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/batch_pb.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/talent/v4beta1/batch.proto + +require 'google/protobuf' + + +descriptor_data = "\n\'google/cloud/talent/v4beta1/batch.proto\x12\x1bgoogle.cloud.talent.v4beta1Bn\n\x1f\x63om.google.cloud.talent.v4beta1B\nBatchProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Talent + module V4beta1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/common_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/common_pb.rb new file mode 100644 index 000000000000..960540b73407 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/common_pb.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/talent/v4beta1/common.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' +require 'google/type/latlng_pb' +require 'google/type/money_pb' +require 'google/type/postal_address_pb' + + +descriptor_data = "\n(google/cloud/talent/v4beta1/common.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\x1a\x17google/type/money.proto\x1a google/type/postal_address.proto\"n\n\x0eTimestampRange\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\"\xb7\x03\n\x08Location\x12I\n\rlocation_type\x18\x01 \x01(\x0e\x32\x32.google.cloud.talent.v4beta1.Location.LocationType\x12\x32\n\x0epostal_address\x18\x02 \x01(\x0b\x32\x1a.google.type.PostalAddress\x12$\n\x07lat_lng\x18\x03 \x01(\x0b\x32\x13.google.type.LatLng\x12\x14\n\x0cradius_miles\x18\x04 \x01(\x01\"\xef\x01\n\x0cLocationType\x12\x1d\n\x19LOCATION_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43OUNTRY\x10\x01\x12\x17\n\x13\x41\x44MINISTRATIVE_AREA\x10\x02\x12\x1b\n\x17SUB_ADMINISTRATIVE_AREA\x10\x03\x12\x0c\n\x08LOCALITY\x10\x04\x12\x0f\n\x0bPOSTAL_CODE\x10\x05\x12\x10\n\x0cSUB_LOCALITY\x10\x06\x12\x12\n\x0eSUB_LOCALITY_1\x10\x07\x12\x12\n\x0eSUB_LOCALITY_2\x10\x08\x12\x10\n\x0cNEIGHBORHOOD\x10\t\x12\x12\n\x0eSTREET_ADDRESS\x10\n\"\x9f\x01\n\x0fRequestMetadata\x12\x0e\n\x06\x64omain\x18\x01 \x01(\t\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12\x0f\n\x07user_id\x18\x03 \x01(\t\x12\x19\n\x11\x61llow_missing_ids\x18\x04 \x01(\x08\x12<\n\x0b\x64\x65vice_info\x18\x05 \x01(\x0b\x32\'.google.cloud.talent.v4beta1.DeviceInfo\"&\n\x10ResponseMetadata\x12\x12\n\nrequest_id\x18\x01 \x01(\t\"\xcf\x01\n\nDeviceInfo\x12G\n\x0b\x64\x65vice_type\x18\x01 \x01(\x0e\x32\x32.google.cloud.talent.v4beta1.DeviceInfo.DeviceType\x12\n\n\x02id\x18\x02 \x01(\t\"l\n\nDeviceType\x12\x1b\n\x17\x44\x45VICE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03WEB\x10\x01\x12\x0e\n\nMOBILE_WEB\x10\x02\x12\x0b\n\x07\x41NDROID\x10\x03\x12\x07\n\x03IOS\x10\x04\x12\x07\n\x03\x42OT\x10\x05\x12\t\n\x05OTHER\x10\x06\"m\n\x0f\x43ustomAttribute\x12\x15\n\rstring_values\x18\x01 \x03(\t\x12\x13\n\x0blong_values\x18\x02 \x03(\x03\x12\x12\n\nfilterable\x18\x03 \x01(\x08\x12\x1a\n\x12keyword_searchable\x18\x04 \x01(\x08\"W\n\x12SpellingCorrection\x12\x11\n\tcorrected\x18\x01 \x01(\x08\x12\x16\n\x0e\x63orrected_text\x18\x02 \x01(\t\x12\x16\n\x0e\x63orrected_html\x18\x03 \x01(\t\"\xa6\t\n\x10\x43ompensationInfo\x12P\n\x07\x65ntries\x18\x01 \x03(\x0b\x32?.google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry\x12p\n\"annualized_base_compensation_range\x18\x02 \x01(\x0b\x32?.google.cloud.talent.v4beta1.CompensationInfo.CompensationRangeB\x03\xe0\x41\x03\x12q\n#annualized_total_compensation_range\x18\x03 \x01(\x0b\x32?.google.cloud.talent.v4beta1.CompensationInfo.CompensationRangeB\x03\xe0\x41\x03\x1a\x92\x03\n\x11\x43ompensationEntry\x12L\n\x04type\x18\x01 \x01(\x0e\x32>.google.cloud.talent.v4beta1.CompensationInfo.CompensationType\x12L\n\x04unit\x18\x02 \x01(\x0e\x32>.google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit\x12$\n\x06\x61mount\x18\x03 \x01(\x0b\x32\x12.google.type.MoneyH\x00\x12P\n\x05range\x18\x04 \x01(\x0b\x32?.google.cloud.talent.v4beta1.CompensationInfo.CompensationRangeH\x00\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x12=\n\x17\x65xpected_units_per_year\x18\x06 \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x15\n\x13\x63ompensation_amount\x1ao\n\x11\x43ompensationRange\x12,\n\x10max_compensation\x18\x02 \x01(\x0b\x32\x12.google.type.Money\x12,\n\x10min_compensation\x18\x01 \x01(\x0b\x32\x12.google.type.Money\"\xb5\x01\n\x10\x43ompensationType\x12!\n\x1d\x43OMPENSATION_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x42\x41SE\x10\x01\x12\t\n\x05\x42ONUS\x10\x02\x12\x11\n\rSIGNING_BONUS\x10\x03\x12\n\n\x06\x45QUITY\x10\x04\x12\x12\n\x0ePROFIT_SHARING\x10\x05\x12\x0f\n\x0b\x43OMMISSIONS\x10\x06\x12\x08\n\x04TIPS\x10\x07\x12\x1b\n\x17OTHER_COMPENSATION_TYPE\x10\x08\"\x9c\x01\n\x10\x43ompensationUnit\x12!\n\x1d\x43OMPENSATION_UNIT_UNSPECIFIED\x10\x00\x12\n\n\x06HOURLY\x10\x01\x12\t\n\x05\x44\x41ILY\x10\x02\x12\n\n\x06WEEKLY\x10\x03\x12\x0b\n\x07MONTHLY\x10\x04\x12\n\n\x06YEARLY\x10\x05\x12\x0c\n\x08ONE_TIME\x10\x06\x12\x1b\n\x17OTHER_COMPENSATION_UNIT\x10\x07\"\xcc\x03\n\x16\x42\x61tchOperationMetadata\x12H\n\x05state\x18\x01 \x01(\x0e\x32\x39.google.cloud.talent.v4beta1.BatchOperationMetadata.State\x12\x19\n\x11state_description\x18\x02 \x01(\t\x12\x15\n\rsuccess_count\x18\x03 \x01(\x05\x12\x15\n\rfailure_count\x18\x04 \x01(\x05\x12\x13\n\x0btotal_count\x18\x05 \x01(\x05\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"z\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cINITIALIZING\x10\x01\x12\x0e\n\nPROCESSING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0e\n\nCANCELLING\x10\x05\x12\r\n\tCANCELLED\x10\x06*y\n\x0b\x43ompanySize\x12\x1c\n\x18\x43OMPANY_SIZE_UNSPECIFIED\x10\x00\x12\x08\n\x04MINI\x10\x01\x12\t\n\x05SMALL\x10\x02\x12\x0b\n\x07SMEDIUM\x10\x03\x12\n\n\x06MEDIUM\x10\x04\x12\x07\n\x03\x42IG\x10\x05\x12\n\n\x06\x42IGGER\x10\x06\x12\t\n\x05GIANT\x10\x07*\xe2\x01\n\nJobBenefit\x12\x1b\n\x17JOB_BENEFIT_UNSPECIFIED\x10\x00\x12\x0e\n\nCHILD_CARE\x10\x01\x12\n\n\x06\x44\x45NTAL\x10\x02\x12\x14\n\x10\x44OMESTIC_PARTNER\x10\x03\x12\x12\n\x0e\x46LEXIBLE_HOURS\x10\x04\x12\x0b\n\x07MEDICAL\x10\x05\x12\x12\n\x0eLIFE_INSURANCE\x10\x06\x12\x12\n\x0ePARENTAL_LEAVE\x10\x07\x12\x13\n\x0fRETIREMENT_PLAN\x10\x08\x12\r\n\tSICK_DAYS\x10\t\x12\x0c\n\x08VACATION\x10\n\x12\n\n\x06VISION\x10\x0b*\x8e\x02\n\nDegreeType\x12\x1b\n\x17\x44\x45GREE_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11PRIMARY_EDUCATION\x10\x01\x12\x1d\n\x19LOWER_SECONDARY_EDUCATION\x10\x02\x12\x1d\n\x19UPPER_SECONDARY_EDUCATION\x10\x03\x12\x1c\n\x18\x41\x44ULT_REMEDIAL_EDUCATION\x10\x04\x12\x1c\n\x18\x41SSOCIATES_OR_EQUIVALENT\x10\x05\x12\x1b\n\x17\x42\x41\x43HELORS_OR_EQUIVALENT\x10\x06\x12\x19\n\x15MASTERS_OR_EQUIVALENT\x10\x07\x12\x1a\n\x16\x44OCTORAL_OR_EQUIVALENT\x10\x08*\xdc\x01\n\x0e\x45mploymentType\x12\x1f\n\x1b\x45MPLOYMENT_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tFULL_TIME\x10\x01\x12\r\n\tPART_TIME\x10\x02\x12\x0e\n\nCONTRACTOR\x10\x03\x12\x14\n\x10\x43ONTRACT_TO_HIRE\x10\x04\x12\r\n\tTEMPORARY\x10\x05\x12\n\n\x06INTERN\x10\x06\x12\r\n\tVOLUNTEER\x10\x07\x12\x0c\n\x08PER_DIEM\x10\x08\x12\x12\n\x0e\x46LY_IN_FLY_OUT\x10\t\x12\x19\n\x15OTHER_EMPLOYMENT_TYPE\x10\n*q\n\x08JobLevel\x12\x19\n\x15JOB_LEVEL_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x45NTRY_LEVEL\x10\x01\x12\x0f\n\x0b\x45XPERIENCED\x10\x02\x12\x0b\n\x07MANAGER\x10\x03\x12\x0c\n\x08\x44IRECTOR\x10\x04\x12\r\n\tEXECUTIVE\x10\x05*\xba\x06\n\x0bJobCategory\x12\x1c\n\x18JOB_CATEGORY_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x41\x43\x43OUNTING_AND_FINANCE\x10\x01\x12\x1d\n\x19\x41\x44MINISTRATIVE_AND_OFFICE\x10\x02\x12\x1d\n\x19\x41\x44VERTISING_AND_MARKETING\x10\x03\x12\x0f\n\x0b\x41NIMAL_CARE\x10\x04\x12\x1a\n\x16\x41RT_FASHION_AND_DESIGN\x10\x05\x12\x17\n\x13\x42USINESS_OPERATIONS\x10\x06\x12\x1b\n\x17\x43LEANING_AND_FACILITIES\x10\x07\x12\x13\n\x0f\x43OMPUTER_AND_IT\x10\x08\x12\x10\n\x0c\x43ONSTRUCTION\x10\t\x12\x14\n\x10\x43USTOMER_SERVICE\x10\n\x12\r\n\tEDUCATION\x10\x0b\x12\x1c\n\x18\x45NTERTAINMENT_AND_TRAVEL\x10\x0c\x12\x18\n\x14\x46\x41RMING_AND_OUTDOORS\x10\r\x12\x0e\n\nHEALTHCARE\x10\x0e\x12\x13\n\x0fHUMAN_RESOURCES\x10\x0f\x12\'\n#INSTALLATION_MAINTENANCE_AND_REPAIR\x10\x10\x12\t\n\x05LEGAL\x10\x11\x12\x0e\n\nMANAGEMENT\x10\x12\x12\x1f\n\x1bMANUFACTURING_AND_WAREHOUSE\x10\x13\x12$\n MEDIA_COMMUNICATIONS_AND_WRITING\x10\x14\x12\x16\n\x12OIL_GAS_AND_MINING\x10\x15\x12\x1e\n\x1aPERSONAL_CARE_AND_SERVICES\x10\x16\x12\x17\n\x13PROTECTIVE_SERVICES\x10\x17\x12\x0f\n\x0bREAL_ESTATE\x10\x18\x12\x1e\n\x1aRESTAURANT_AND_HOSPITALITY\x10\x19\x12\x14\n\x10SALES_AND_RETAIL\x10\x1a\x12\x1b\n\x17SCIENCE_AND_ENGINEERING\x10\x1b\x12\"\n\x1eSOCIAL_SERVICES_AND_NON_PROFIT\x10\x1c\x12!\n\x1dSPORTS_FITNESS_AND_RECREATION\x10\x1d\x12 \n\x1cTRANSPORTATION_AND_LOGISTICS\x10\x1e*e\n\rPostingRegion\x12\x1e\n\x1aPOSTING_REGION_UNSPECIFIED\x10\x00\x12\x17\n\x13\x41\x44MINISTRATIVE_AREA\x10\x01\x12\n\n\x06NATION\x10\x02\x12\x0f\n\x0bTELECOMMUTE\x10\x03*n\n\nVisibility\x12\x1a\n\x16VISIBILITY_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x41\x43\x43OUNT_ONLY\x10\x01\x12\x16\n\x12SHARED_WITH_GOOGLE\x10\x02\x12\x16\n\x12SHARED_WITH_PUBLIC\x10\x03\x1a\x02\x18\x01*q\n\x10HtmlSanitization\x12!\n\x1dHTML_SANITIZATION_UNSPECIFIED\x10\x00\x12\x1e\n\x1aHTML_SANITIZATION_DISABLED\x10\x01\x12\x1a\n\x16SIMPLE_FORMATTING_ONLY\x10\x02*c\n\rCommuteMethod\x12\x1e\n\x1a\x43OMMUTE_METHOD_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44RIVING\x10\x01\x12\x0b\n\x07TRANSIT\x10\x02\x12\x0b\n\x07WALKING\x10\x03\x12\x0b\n\x07\x43YCLING\x10\x04\x42o\n\x1f\x63om.google.cloud.talent.v4beta1B\x0b\x43ommonProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Talent + module V4beta1 + TimestampRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.TimestampRange").msgclass + Location = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Location").msgclass + Location::LocationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Location.LocationType").enummodule + RequestMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.RequestMetadata").msgclass + ResponseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.ResponseMetadata").msgclass + DeviceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.DeviceInfo").msgclass + DeviceInfo::DeviceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.DeviceInfo.DeviceType").enummodule + CustomAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CustomAttribute").msgclass + SpellingCorrection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.SpellingCorrection").msgclass + CompensationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompensationInfo").msgclass + CompensationInfo::CompensationEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry").msgclass + CompensationInfo::CompensationRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompensationInfo.CompensationRange").msgclass + CompensationInfo::CompensationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompensationInfo.CompensationType").enummodule + CompensationInfo::CompensationUnit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit").enummodule + BatchOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.BatchOperationMetadata").msgclass + BatchOperationMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.BatchOperationMetadata.State").enummodule + CompanySize = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompanySize").enummodule + JobBenefit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.JobBenefit").enummodule + DegreeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.DegreeType").enummodule + EmploymentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.EmploymentType").enummodule + JobLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.JobLevel").enummodule + JobCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.JobCategory").enummodule + PostingRegion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.PostingRegion").enummodule + Visibility = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Visibility").enummodule + HtmlSanitization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.HtmlSanitization").enummodule + CommuteMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CommuteMethod").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_pb.rb new file mode 100644 index 000000000000..8ba3ad3f3e98 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/talent/v4beta1/company.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/talent/v4beta1/common_pb' + + +descriptor_data = "\n)google/cloud/talent/v4beta1/company.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/talent/v4beta1/common.proto\"\x80\x05\n\x07\x43ompany\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x65xternal_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x04size\x18\x04 \x01(\x0e\x32(.google.cloud.talent.v4beta1.CompanySize\x12\x1c\n\x14headquarters_address\x18\x05 \x01(\t\x12\x15\n\rhiring_agency\x18\x06 \x01(\x08\x12\x10\n\x08\x65\x65o_text\x18\x07 \x01(\t\x12\x13\n\x0bwebsite_uri\x18\x08 \x01(\t\x12\x17\n\x0f\x63\x61reer_site_uri\x18\t \x01(\t\x12\x11\n\timage_uri\x18\n \x01(\t\x12\x34\n(keyword_searchable_job_custom_attributes\x18\x0b \x03(\tB\x02\x18\x01\x12K\n\x0c\x64\x65rived_info\x18\x0c \x01(\x0b\x32\x30.google.cloud.talent.v4beta1.Company.DerivedInfoB\x03\xe0\x41\x03\x12\x16\n\tsuspended\x18\r \x01(\x08\x42\x03\xe0\x41\x03\x1aS\n\x0b\x44\x65rivedInfo\x12\x44\n\x15headquarters_location\x18\x01 \x01(\x0b\x32%.google.cloud.talent.v4beta1.Location:\x81\x01\xea\x41~\n\x1bjobs.googleapis.com/Company\x12\x37projects/{project}/tenants/{tenant}/companies/{company}\x12&projects/{project}/companies/{company}Bx\n\x1f\x63om.google.cloud.talent.v4beta1B\x14\x43ompanyResourceProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Talent + module V4beta1 + Company = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Company").msgclass + Company::DerivedInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Company.DerivedInfo").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service.rb new file mode 100644 index 000000000000..4478c38d82e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service.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/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/talent/v4beta1/version" + +require "google/cloud/talent/v4beta1/company_service/credentials" +require "google/cloud/talent/v4beta1/company_service/paths" +require "google/cloud/talent/v4beta1/company_service/client" +require "google/cloud/talent/v4beta1/company_service/rest" + +module Google + module Cloud + module Talent + module V4beta1 + ## + # A service that handles company management, including CRUD and enumeration. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/talent/v4beta1/company_service" + # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/talent/v4beta1/company_service/rest" + # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new + # + module CompanyService + end + end + end + end +end + +helper_path = ::File.join __dir__, "company_service", "helpers.rb" +require "google/cloud/talent/v4beta1/company_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/client.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/client.rb new file mode 100644 index 000000000000..9763c82b34b0 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/client.rb @@ -0,0 +1,920 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/talent/v4beta1/company_service_pb" + +module Google + module Cloud + module Talent + module V4beta1 + module CompanyService + ## + # Client for the CompanyService service. + # + # A service that handles company management, including CRUD and enumeration. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :company_service_stub + + ## + # Configure the CompanyService Client class. + # + # See {::Google::Cloud::Talent::V4beta1::CompanyService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CompanyService clients + # ::Google::Cloud::Talent::V4beta1::CompanyService::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", "Talent", "V4beta1"] + 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_company.timeout = 30.0 + + default_config.rpcs.get_company.timeout = 30.0 + default_config.rpcs.get_company.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_company.timeout = 30.0 + + default_config.rpcs.delete_company.timeout = 30.0 + default_config.rpcs.delete_company.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_companies.timeout = 30.0 + default_config.rpcs.list_companies.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CompanyService 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::Talent::V4beta1::CompanyService::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 + @company_service_stub.universe_domain + end + + ## + # Create a new CompanyService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CompanyService 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/talent/v4beta1/company_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 + + @company_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Talent::V4beta1::CompanyService::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 + ) + + @company_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 + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @company_service_stub.logger + end + + # Service calls + + ## + # Creates a new company entity. + # + # @overload create_company(request, options = nil) + # Pass arguments to `create_company` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::CreateCompanyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::CreateCompanyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_company(parent: nil, company: nil) + # Pass arguments to `create_company` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the tenant under which the company is created. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, + # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + # is created, for example, "projects/foo". + # @param company [::Google::Cloud::Talent::V4beta1::Company, ::Hash] + # Required. The company to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Talent::V4beta1::Company] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Talent::V4beta1::Company] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::CompanyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::CreateCompanyRequest.new + # + # # Call the create_company method. + # result = client.create_company request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::Company. + # p result + # + def create_company request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::CreateCompanyRequest + + # Converts hash and nil to 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_company.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_company.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_company.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @company_service_stub.call_rpc :create_company, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves specified company. + # + # @overload get_company(request, options = nil) + # Pass arguments to `get_company` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::GetCompanyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::GetCompanyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_company(name: nil) + # Pass arguments to `get_company` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the company to be retrieved. + # + # The format is + # "projects/\\{project_id}/tenants/\\{tenant_id}/companies/\\{company_id}", for + # example, "projects/api-test-project/tenants/foo/companies/bar". + # + # If tenant id is unspecified, the default tenant is used, for + # example, "projects/api-test-project/companies/bar". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Talent::V4beta1::Company] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Talent::V4beta1::Company] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::CompanyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::GetCompanyRequest.new + # + # # Call the get_company method. + # result = client.get_company request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::Company. + # p result + # + def get_company request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::GetCompanyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_company.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_company.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_company.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @company_service_stub.call_rpc :get_company, request, 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 specified company. + # + # @overload update_company(request, options = nil) + # Pass arguments to `update_company` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_company(company: nil, update_mask: nil) + # Pass arguments to `update_company` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param company [::Google::Cloud::Talent::V4beta1::Company, ::Hash] + # Required. The company resource to replace the current resource in the + # system. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Strongly recommended for the best service experience. + # + # If + # {::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest#update_mask update_mask} + # is provided, only the specified fields in + # {::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest#company company} are + # updated. Otherwise all the fields are updated. + # + # A field mask to specify the company fields to be updated. Only + # top level fields of {::Google::Cloud::Talent::V4beta1::Company Company} are + # supported. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Talent::V4beta1::Company] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Talent::V4beta1::Company] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::CompanyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::UpdateCompanyRequest.new + # + # # Call the update_company method. + # result = client.update_company request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::Company. + # p result + # + def update_company request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest + + # Converts hash and nil to 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_company.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.company&.name + header_params["company.name"] = request.company.name + end + + request_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_company.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_company.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @company_service_stub.call_rpc :update_company, request, 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 specified company. + # Prerequisite: The company has no jobs associated with it. + # + # @overload delete_company(request, options = nil) + # Pass arguments to `delete_company` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_company(name: nil) + # Pass arguments to `delete_company` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the company to be deleted. + # + # The format is + # "projects/\\{project_id}/tenants/\\{tenant_id}/companies/\\{company_id}", for + # example, "projects/foo/tenants/bar/companies/baz". + # + # If tenant id is unspecified, the default tenant is used, for + # example, "projects/foo/companies/bar". + # + # @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/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::CompanyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::DeleteCompanyRequest.new + # + # # Call the delete_company method. + # result = client.delete_company request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_company request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest + + # Converts hash and nil to 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_company.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_company.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_company.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @company_service_stub.call_rpc :delete_company, request, 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 companies associated with the project. + # + # @overload list_companies(request, options = nil) + # Pass arguments to `list_companies` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::ListCompaniesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::ListCompaniesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_companies(parent: nil, page_token: nil, page_size: nil, require_open_jobs: nil) + # Pass arguments to `list_companies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the tenant under which the company is created. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, + # "projects/foo/tenant/bar". + # + # If tenant id is unspecified, the default tenant will be used, for + # example, "projects/foo". + # @param page_token [::String] + # The starting indicator from which to return results. + # @param page_size [::Integer] + # The maximum number of companies to be returned, at most 100. + # Default is 100 if a non-positive number is provided. + # @param require_open_jobs [::Boolean] + # Set to true if the companies requested must have open jobs. + # + # Defaults to false. + # + # If true, at most + # {::Google::Cloud::Talent::V4beta1::ListCompaniesRequest#page_size page_size} of + # companies are fetched, among which only those with open jobs are returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Company>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Company>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::CompanyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::ListCompaniesRequest.new + # + # # Call the list_companies method. + # result = client.list_companies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Talent::V4beta1::Company. + # p item + # end + # + def list_companies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::ListCompaniesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_companies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_companies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_companies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @company_service_stub.call_rpc :list_companies, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @company_service_stub, :list_companies, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CompanyService API. + # + # This class represents the configuration for CompanyService, + # 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::Talent::V4beta1::CompanyService::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_company to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Talent::V4beta1::CompanyService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_company.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_company.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::Talent::V4beta1::CompanyService::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 = "jobs.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 CompanyService 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_company` + # @return [::Gapic::Config::Method] + # + attr_reader :create_company + ## + # RPC-specific configuration for `get_company` + # @return [::Gapic::Config::Method] + # + attr_reader :get_company + ## + # RPC-specific configuration for `update_company` + # @return [::Gapic::Config::Method] + # + attr_reader :update_company + ## + # RPC-specific configuration for `delete_company` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_company + ## + # RPC-specific configuration for `list_companies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_companies + + # @private + def initialize parent_rpcs = nil + create_company_config = parent_rpcs.create_company if parent_rpcs.respond_to? :create_company + @create_company = ::Gapic::Config::Method.new create_company_config + get_company_config = parent_rpcs.get_company if parent_rpcs.respond_to? :get_company + @get_company = ::Gapic::Config::Method.new get_company_config + update_company_config = parent_rpcs.update_company if parent_rpcs.respond_to? :update_company + @update_company = ::Gapic::Config::Method.new update_company_config + delete_company_config = parent_rpcs.delete_company if parent_rpcs.respond_to? :delete_company + @delete_company = ::Gapic::Config::Method.new delete_company_config + list_companies_config = parent_rpcs.list_companies if parent_rpcs.respond_to? :list_companies + @list_companies = ::Gapic::Config::Method.new list_companies_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/credentials.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/credentials.rb new file mode 100644 index 000000000000..9856588eab54 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/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 Talent + module V4beta1 + module CompanyService + # Credentials for the CompanyService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/jobs" + ] + self.env_vars = [ + "TALENT_CREDENTIALS", + "TALENT_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "TALENT_CREDENTIALS_JSON", + "TALENT_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-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/paths.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/paths.rb new file mode 100644 index 000000000000..dee2daa131de --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/paths.rb @@ -0,0 +1,105 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Talent + module V4beta1 + module CompanyService + # Path helper methods for the CompanyService API. + module Paths + ## + # Create a fully-qualified Company resource string. + # + # @overload company_path(project:, tenant:, company:) + # The resource will be in the following format: + # + # `projects/{project}/tenants/{tenant}/companies/{company}` + # + # @param project [String] + # @param tenant [String] + # @param company [String] + # + # @overload company_path(project:, company:) + # The resource will be in the following format: + # + # `projects/{project}/companies/{company}` + # + # @param project [String] + # @param company [String] + # + # @return [::String] + def company_path **args + resources = { + "company:project:tenant" => (proc do |project:, tenant:, company:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "tenant cannot contain /" if tenant.to_s.include? "/" + + "projects/#{project}/tenants/#{tenant}/companies/#{company}" + end), + "company:project" => (proc do |project:, company:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/companies/#{company}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + 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 Tenant resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/tenants/{tenant}` + # + # @param project [String] + # @param tenant [String] + # + # @return [::String] + def tenant_path project:, tenant: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/tenants/#{tenant}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/rest.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/rest.rb new file mode 100644 index 000000000000..e0bde75185ad --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/rest.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 "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/talent/v4beta1/version" + +require "google/cloud/talent/v4beta1/company_service/credentials" +require "google/cloud/talent/v4beta1/company_service/paths" +require "google/cloud/talent/v4beta1/company_service/rest/client" + +module Google + module Cloud + module Talent + module V4beta1 + ## + # A service that handles company management, including CRUD and enumeration. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/talent/v4beta1/company_service/rest" + # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new + # + module CompanyService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/talent/v4beta1/company_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/rest/client.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/rest/client.rb new file mode 100644 index 000000000000..df00c372ce9f --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/rest/client.rb @@ -0,0 +1,842 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/talent/v4beta1/company_service_pb" +require "google/cloud/talent/v4beta1/company_service/rest/service_stub" + +module Google + module Cloud + module Talent + module V4beta1 + module CompanyService + module Rest + ## + # REST client for the CompanyService service. + # + # A service that handles company management, including CRUD and enumeration. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :company_service_stub + + ## + # Configure the CompanyService Client class. + # + # See {::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CompanyService clients + # ::Google::Cloud::Talent::V4beta1::CompanyService::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", "Talent", "V4beta1"] + 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_company.timeout = 30.0 + + default_config.rpcs.get_company.timeout = 30.0 + default_config.rpcs.get_company.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_company.timeout = 30.0 + + default_config.rpcs.delete_company.timeout = 30.0 + default_config.rpcs.delete_company.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_companies.timeout = 30.0 + default_config.rpcs.list_companies.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CompanyService 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::Talent::V4beta1::CompanyService::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 + @company_service_stub.universe_domain + end + + ## + # Create a new CompanyService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CompanyService 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 + + @company_service_stub = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @company_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 + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @company_service_stub.logger + end + + # Service calls + + ## + # Creates a new company entity. + # + # @overload create_company(request, options = nil) + # Pass arguments to `create_company` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::CreateCompanyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::CreateCompanyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_company(parent: nil, company: nil) + # Pass arguments to `create_company` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the tenant under which the company is created. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, + # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + # is created, for example, "projects/foo". + # @param company [::Google::Cloud::Talent::V4beta1::Company, ::Hash] + # Required. The company to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::Company] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::Company] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::CreateCompanyRequest.new + # + # # Call the create_company method. + # result = client.create_company request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::Company. + # p result + # + def create_company request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::CreateCompanyRequest + + # Converts hash and nil to an 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_company.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_company.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_company.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @company_service_stub.create_company request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves specified company. + # + # @overload get_company(request, options = nil) + # Pass arguments to `get_company` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::GetCompanyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::GetCompanyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_company(name: nil) + # Pass arguments to `get_company` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the company to be retrieved. + # + # The format is + # "projects/\\{project_id}/tenants/\\{tenant_id}/companies/\\{company_id}", for + # example, "projects/api-test-project/tenants/foo/companies/bar". + # + # If tenant id is unspecified, the default tenant is used, for + # example, "projects/api-test-project/companies/bar". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::Company] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::Company] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::GetCompanyRequest.new + # + # # Call the get_company method. + # result = client.get_company request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::Company. + # p result + # + def get_company request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::GetCompanyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_company.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_company.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_company.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @company_service_stub.get_company request, 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 specified company. + # + # @overload update_company(request, options = nil) + # Pass arguments to `update_company` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_company(company: nil, update_mask: nil) + # Pass arguments to `update_company` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param company [::Google::Cloud::Talent::V4beta1::Company, ::Hash] + # Required. The company resource to replace the current resource in the + # system. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Strongly recommended for the best service experience. + # + # If + # {::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest#update_mask update_mask} + # is provided, only the specified fields in + # {::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest#company company} are + # updated. Otherwise all the fields are updated. + # + # A field mask to specify the company fields to be updated. Only + # top level fields of {::Google::Cloud::Talent::V4beta1::Company Company} are + # supported. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::Company] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::Company] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::UpdateCompanyRequest.new + # + # # Call the update_company method. + # result = client.update_company request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::Company. + # p result + # + def update_company request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest + + # Converts hash and nil to an 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_company.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_company.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_company.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @company_service_stub.update_company request, 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 specified company. + # Prerequisite: The company has no jobs associated with it. + # + # @overload delete_company(request, options = nil) + # Pass arguments to `delete_company` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_company(name: nil) + # Pass arguments to `delete_company` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the company to be deleted. + # + # The format is + # "projects/\\{project_id}/tenants/\\{tenant_id}/companies/\\{company_id}", for + # example, "projects/foo/tenants/bar/companies/baz". + # + # If tenant id is unspecified, the default tenant is used, for + # example, "projects/foo/companies/bar". + # @yield [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/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::DeleteCompanyRequest.new + # + # # Call the delete_company method. + # result = client.delete_company request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_company request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest + + # Converts hash and nil to an 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_company.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_company.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_company.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @company_service_stub.delete_company request, 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 companies associated with the project. + # + # @overload list_companies(request, options = nil) + # Pass arguments to `list_companies` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::ListCompaniesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::ListCompaniesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_companies(parent: nil, page_token: nil, page_size: nil, require_open_jobs: nil) + # Pass arguments to `list_companies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the tenant under which the company is created. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, + # "projects/foo/tenant/bar". + # + # If tenant id is unspecified, the default tenant will be used, for + # example, "projects/foo". + # @param page_token [::String] + # The starting indicator from which to return results. + # @param page_size [::Integer] + # The maximum number of companies to be returned, at most 100. + # Default is 100 if a non-positive number is provided. + # @param require_open_jobs [::Boolean] + # Set to true if the companies requested must have open jobs. + # + # Defaults to false. + # + # If true, at most + # {::Google::Cloud::Talent::V4beta1::ListCompaniesRequest#page_size page_size} of + # companies are fetched, among which only those with open jobs are returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Company>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Company>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::ListCompaniesRequest.new + # + # # Call the list_companies method. + # result = client.list_companies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Talent::V4beta1::Company. + # p item + # end + # + def list_companies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::ListCompaniesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_companies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_companies.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_companies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @company_service_stub.list_companies request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @company_service_stub, :list_companies, "companies", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CompanyService REST API. + # + # This class represents the configuration for CompanyService 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::Talent::V4beta1::CompanyService::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_company to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_company.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_company.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 = "jobs.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 CompanyService 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_company` + # @return [::Gapic::Config::Method] + # + attr_reader :create_company + ## + # RPC-specific configuration for `get_company` + # @return [::Gapic::Config::Method] + # + attr_reader :get_company + ## + # RPC-specific configuration for `update_company` + # @return [::Gapic::Config::Method] + # + attr_reader :update_company + ## + # RPC-specific configuration for `delete_company` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_company + ## + # RPC-specific configuration for `list_companies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_companies + + # @private + def initialize parent_rpcs = nil + create_company_config = parent_rpcs.create_company if parent_rpcs.respond_to? :create_company + @create_company = ::Gapic::Config::Method.new create_company_config + get_company_config = parent_rpcs.get_company if parent_rpcs.respond_to? :get_company + @get_company = ::Gapic::Config::Method.new get_company_config + update_company_config = parent_rpcs.update_company if parent_rpcs.respond_to? :update_company + @update_company = ::Gapic::Config::Method.new update_company_config + delete_company_config = parent_rpcs.delete_company if parent_rpcs.respond_to? :delete_company + @delete_company = ::Gapic::Config::Method.new delete_company_config + list_companies_config = parent_rpcs.list_companies if parent_rpcs.respond_to? :list_companies + @list_companies = ::Gapic::Config::Method.new list_companies_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/rest/service_stub.rb new file mode 100644 index 000000000000..34eb591b219f --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/rest/service_stub.rb @@ -0,0 +1,425 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/talent/v4beta1/company_service_pb" + +module Google + module Cloud + module Talent + module V4beta1 + module CompanyService + module Rest + ## + # REST service stub for the CompanyService 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_company REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::CreateCompanyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::Company] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::Company] + # A result object deserialized from the server's reply + def create_company request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_company_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_company", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Talent::V4beta1::Company.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_company REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::GetCompanyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::Company] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::Company] + # A result object deserialized from the server's reply + def get_company request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_company_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_company", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Talent::V4beta1::Company.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_company REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::Company] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::Company] + # A result object deserialized from the server's reply + def update_company request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_company_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_company", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Talent::V4beta1::Company.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_company REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_company request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_company_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_company", + 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 list_companies REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::ListCompaniesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::ListCompaniesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::ListCompaniesResponse] + # A result object deserialized from the server's reply + def list_companies request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_companies_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_companies", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Talent::V4beta1::ListCompaniesResponse.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_company REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::CreateCompanyRequest] + # 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_company_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v4beta1/{parent}/companies", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v4beta1/{parent}/companies", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_company REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::GetCompanyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_company_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v4beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/tenants/[^/]+/companies/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v4beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/companies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_company REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest] + # 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_company_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v4beta1/{company.name}", + body: "*", + matches: [ + ["company.name", %r{^projects/[^/]+/tenants/[^/]+/companies/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v4beta1/{company.name}", + body: "*", + matches: [ + ["company.name", %r{^projects/[^/]+/companies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_company REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest] + # 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_company_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v4beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/tenants/[^/]+/companies/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v4beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/companies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_companies REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::ListCompaniesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_companies_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v4beta1/{parent}/companies", + matches: [ + ["parent", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v4beta1/{parent}/companies", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service_pb.rb new file mode 100644 index 000000000000..155b3127c68a --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/talent/v4beta1/company_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/talent/v4beta1/common_pb' +require 'google/cloud/talent/v4beta1/company_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n1google/cloud/talent/v4beta1/company_service.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/talent/v4beta1/common.proto\x1a)google/cloud/talent/v4beta1/company.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x87\x01\n\x14\x43reateCompanyRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1bjobs.googleapis.com/Company\x12:\n\x07\x63ompany\x18\x02 \x01(\x0b\x32$.google.cloud.talent.v4beta1.CompanyB\x03\xe0\x41\x02\"F\n\x11GetCompanyRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bjobs.googleapis.com/Company\"\x83\x01\n\x14UpdateCompanyRequest\x12:\n\x07\x63ompany\x18\x01 \x01(\x0b\x32$.google.cloud.talent.v4beta1.CompanyB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"I\n\x14\x44\x65leteCompanyRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bjobs.googleapis.com/Company\"\x8d\x01\n\x14ListCompaniesRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1bjobs.googleapis.com/Company\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x19\n\x11require_open_jobs\x18\x04 \x01(\x08\"\xaa\x01\n\x15ListCompaniesResponse\x12\x37\n\tcompanies\x18\x01 \x03(\x0b\x32$.google.cloud.talent.v4beta1.Company\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12?\n\x08metadata\x18\x03 \x01(\x0b\x32-.google.cloud.talent.v4beta1.ResponseMetadata2\xd2\t\n\x0e\x43ompanyService\x12\xe3\x01\n\rCreateCompany\x12\x31.google.cloud.talent.v4beta1.CreateCompanyRequest\x1a$.google.cloud.talent.v4beta1.Company\"y\xda\x41\x0eparent,company\x82\xd3\xe4\x93\x02\x62\"0/v4beta1/{parent=projects/*/tenants/*}/companies:\x01*Z+\"&/v4beta1/{parent=projects/*}/companies:\x01*\x12\xcd\x01\n\nGetCompany\x12..google.cloud.talent.v4beta1.GetCompanyRequest\x1a$.google.cloud.talent.v4beta1.Company\"i\xda\x41\x04name\x82\xd3\xe4\x93\x02\\\x12\x30/v4beta1/{name=projects/*/tenants/*/companies/*}Z(\x12&/v4beta1/{name=projects/*/companies/*}\x12\xed\x01\n\rUpdateCompany\x12\x31.google.cloud.talent.v4beta1.UpdateCompanyRequest\x1a$.google.cloud.talent.v4beta1.Company\"\x82\x01\xda\x41\x07\x63ompany\x82\xd3\xe4\x93\x02r28/v4beta1/{company.name=projects/*/tenants/*/companies/*}:\x01*Z32./v4beta1/{company.name=projects/*/companies/*}:\x01*\x12\xc5\x01\n\rDeleteCompany\x12\x31.google.cloud.talent.v4beta1.DeleteCompanyRequest\x1a\x16.google.protobuf.Empty\"i\xda\x41\x04name\x82\xd3\xe4\x93\x02\\*0/v4beta1/{name=projects/*/tenants/*/companies/*}Z(*&/v4beta1/{name=projects/*/companies/*}\x12\xe3\x01\n\rListCompanies\x12\x31.google.cloud.talent.v4beta1.ListCompaniesRequest\x1a\x32.google.cloud.talent.v4beta1.ListCompaniesResponse\"k\xda\x41\x06parent\x82\xd3\xe4\x93\x02\\\x12\x30/v4beta1/{parent=projects/*/tenants/*}/companiesZ(\x12&/v4beta1/{parent=projects/*}/companies\x1al\xca\x41\x13jobs.googleapis.com\xd2\x41Shttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobsBw\n\x1f\x63om.google.cloud.talent.v4beta1B\x13\x43ompanyServiceProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Talent + module V4beta1 + CreateCompanyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CreateCompanyRequest").msgclass + GetCompanyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.GetCompanyRequest").msgclass + UpdateCompanyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.UpdateCompanyRequest").msgclass + DeleteCompanyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.DeleteCompanyRequest").msgclass + ListCompaniesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.ListCompaniesRequest").msgclass + ListCompaniesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.ListCompaniesResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service_services_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service_services_pb.rb new file mode 100644 index 000000000000..1ca2bca7f790 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service_services_pb.rb @@ -0,0 +1,54 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/talent/v4beta1/company_service.proto for package 'google.cloud.talent.v4beta1' +# 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/talent/v4beta1/company_service_pb' + +module Google + module Cloud + module Talent + module V4beta1 + module CompanyService + # A service that handles company management, including CRUD and enumeration. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.talent.v4beta1.CompanyService' + + # Creates a new company entity. + rpc :CreateCompany, ::Google::Cloud::Talent::V4beta1::CreateCompanyRequest, ::Google::Cloud::Talent::V4beta1::Company + # Retrieves specified company. + rpc :GetCompany, ::Google::Cloud::Talent::V4beta1::GetCompanyRequest, ::Google::Cloud::Talent::V4beta1::Company + # Updates specified company. + rpc :UpdateCompany, ::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest, ::Google::Cloud::Talent::V4beta1::Company + # Deletes specified company. + # Prerequisite: The company has no jobs associated with it. + rpc :DeleteCompany, ::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest, ::Google::Protobuf::Empty + # Lists all companies associated with the project. + rpc :ListCompanies, ::Google::Cloud::Talent::V4beta1::ListCompaniesRequest, ::Google::Cloud::Talent::V4beta1::ListCompaniesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion.rb new file mode 100644 index 000000000000..962a8cd878ed --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion.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/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/talent/v4beta1/version" + +require "google/cloud/talent/v4beta1/completion/credentials" +require "google/cloud/talent/v4beta1/completion/paths" +require "google/cloud/talent/v4beta1/completion/client" +require "google/cloud/talent/v4beta1/completion/rest" + +module Google + module Cloud + module Talent + module V4beta1 + ## + # A service handles auto completion. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/talent/v4beta1/completion" + # client = ::Google::Cloud::Talent::V4beta1::Completion::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/talent/v4beta1/completion/rest" + # client = ::Google::Cloud::Talent::V4beta1::Completion::Rest::Client.new + # + module Completion + end + end + end + end +end + +helper_path = ::File.join __dir__, "completion", "helpers.rb" +require "google/cloud/talent/v4beta1/completion/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/client.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/client.rb new file mode 100644 index 000000000000..8823298d5537 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/client.rb @@ -0,0 +1,516 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/talent/v4beta1/completion_service_pb" + +module Google + module Cloud + module Talent + module V4beta1 + module Completion + ## + # Client for the Completion service. + # + # A service handles auto completion. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :completion_stub + + ## + # Configure the Completion Client class. + # + # See {::Google::Cloud::Talent::V4beta1::Completion::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Completion clients + # ::Google::Cloud::Talent::V4beta1::Completion::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", "Talent", "V4beta1"] + 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.complete_query.timeout = 30.0 + default_config.rpcs.complete_query.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Completion 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::Talent::V4beta1::Completion::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 + @completion_stub.universe_domain + end + + ## + # Create a new Completion client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Talent::V4beta1::Completion::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Talent::V4beta1::Completion::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Completion 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/talent/v4beta1/completion_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 + + @completion_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Talent::V4beta1::Completion::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 + ) + + @completion_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 + @completion_stub.logger + end + + # Service calls + + ## + # Completes the specified prefix with keyword suggestions. + # Intended for use by a job search auto-complete search box. + # + # @overload complete_query(request, options = nil) + # Pass arguments to `complete_query` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::CompleteQueryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload complete_query(parent: nil, query: nil, language_codes: nil, page_size: nil, company: nil, scope: nil, type: nil) + # Pass arguments to `complete_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. Resource name of tenant the completion is performed within. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, + # "projects/foo/tenant/bar". + # + # If tenant id is unspecified, the default tenant is used, for + # example, "projects/foo". + # @param query [::String] + # Required. The query used to generate suggestions. + # + # The maximum number of allowed characters is 255. + # @param language_codes [::Array<::String>] + # The list of languages of the query. This is + # the BCP-47 language code, such as "en-US" or "sr-Latn". + # For more information, see + # [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). + # + # The maximum number of allowed characters is 255. + # @param page_size [::Integer] + # Required. Completion result count. + # + # The maximum allowed page size is 10. + # @param company [::String] + # If provided, restricts completion to specified company. + # + # The format is + # "projects/\\{project_id}/tenants/\\{tenant_id}/companies/\\{company_id}", for + # example, "projects/foo/tenants/bar/companies/baz". + # + # If tenant id is unspecified, the default tenant is used, for + # example, "projects/foo". + # @param scope [::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionScope] + # The scope of the completion. The defaults is + # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionScope::PUBLIC CompletionScope.PUBLIC}. + # @param type [::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType] + # The completion topic. The default is + # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType::COMBINED CompletionType.COMBINED}. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Talent::V4beta1::CompleteQueryResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Talent::V4beta1::CompleteQueryResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::Completion::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::CompleteQueryRequest.new + # + # # Call the complete_query method. + # result = client.complete_query request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::CompleteQueryResponse. + # p result + # + def complete_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::CompleteQueryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.complete_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::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.complete_query.timeout, + metadata: metadata, + retry_policy: @config.rpcs.complete_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @completion_stub.call_rpc :complete_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 + + ## + # Configuration class for the Completion API. + # + # This class represents the configuration for Completion, + # 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::Talent::V4beta1::Completion::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 + # # complete_query to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Talent::V4beta1::Completion::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.complete_query.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Talent::V4beta1::Completion::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.complete_query.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::Talent::V4beta1::Completion::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 = "jobs.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 Completion 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 `complete_query` + # @return [::Gapic::Config::Method] + # + attr_reader :complete_query + + # @private + def initialize parent_rpcs = nil + complete_query_config = parent_rpcs.complete_query if parent_rpcs.respond_to? :complete_query + @complete_query = ::Gapic::Config::Method.new complete_query_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/credentials.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/credentials.rb new file mode 100644 index 000000000000..1ad8d592642a --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/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 Talent + module V4beta1 + module Completion + # Credentials for the Completion API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/jobs" + ] + self.env_vars = [ + "TALENT_CREDENTIALS", + "TALENT_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "TALENT_CREDENTIALS_JSON", + "TALENT_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-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/paths.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/paths.rb new file mode 100644 index 000000000000..119c1f449fff --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/paths.rb @@ -0,0 +1,105 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Talent + module V4beta1 + module Completion + # Path helper methods for the Completion API. + module Paths + ## + # Create a fully-qualified Company resource string. + # + # @overload company_path(project:, tenant:, company:) + # The resource will be in the following format: + # + # `projects/{project}/tenants/{tenant}/companies/{company}` + # + # @param project [String] + # @param tenant [String] + # @param company [String] + # + # @overload company_path(project:, company:) + # The resource will be in the following format: + # + # `projects/{project}/companies/{company}` + # + # @param project [String] + # @param company [String] + # + # @return [::String] + def company_path **args + resources = { + "company:project:tenant" => (proc do |project:, tenant:, company:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "tenant cannot contain /" if tenant.to_s.include? "/" + + "projects/#{project}/tenants/#{tenant}/companies/#{company}" + end), + "company:project" => (proc do |project:, company:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/companies/#{company}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + 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 Tenant resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/tenants/{tenant}` + # + # @param project [String] + # @param tenant [String] + # + # @return [::String] + def tenant_path project:, tenant: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/tenants/#{tenant}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/rest.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/rest.rb new file mode 100644 index 000000000000..d14c1d1d8a77 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/rest.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 "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/talent/v4beta1/version" + +require "google/cloud/talent/v4beta1/completion/credentials" +require "google/cloud/talent/v4beta1/completion/paths" +require "google/cloud/talent/v4beta1/completion/rest/client" + +module Google + module Cloud + module Talent + module V4beta1 + ## + # A service handles auto completion. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/talent/v4beta1/completion/rest" + # client = ::Google::Cloud::Talent::V4beta1::Completion::Rest::Client.new + # + module Completion + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/talent/v4beta1/completion/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/rest/client.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/rest/client.rb new file mode 100644 index 000000000000..88bd8c435600 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/rest/client.rb @@ -0,0 +1,466 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/talent/v4beta1/completion_service_pb" +require "google/cloud/talent/v4beta1/completion/rest/service_stub" + +module Google + module Cloud + module Talent + module V4beta1 + module Completion + module Rest + ## + # REST client for the Completion service. + # + # A service handles auto completion. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :completion_stub + + ## + # Configure the Completion Client class. + # + # See {::Google::Cloud::Talent::V4beta1::Completion::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Completion clients + # ::Google::Cloud::Talent::V4beta1::Completion::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", "Talent", "V4beta1"] + 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.complete_query.timeout = 30.0 + default_config.rpcs.complete_query.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Completion 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::Talent::V4beta1::Completion::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 + @completion_stub.universe_domain + end + + ## + # Create a new Completion REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Talent::V4beta1::Completion::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Talent::V4beta1::Completion::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Completion 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 + + @completion_stub = ::Google::Cloud::Talent::V4beta1::Completion::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @completion_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 + @completion_stub.logger + end + + # Service calls + + ## + # Completes the specified prefix with keyword suggestions. + # Intended for use by a job search auto-complete search box. + # + # @overload complete_query(request, options = nil) + # Pass arguments to `complete_query` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::CompleteQueryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload complete_query(parent: nil, query: nil, language_codes: nil, page_size: nil, company: nil, scope: nil, type: nil) + # Pass arguments to `complete_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. Resource name of tenant the completion is performed within. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, + # "projects/foo/tenant/bar". + # + # If tenant id is unspecified, the default tenant is used, for + # example, "projects/foo". + # @param query [::String] + # Required. The query used to generate suggestions. + # + # The maximum number of allowed characters is 255. + # @param language_codes [::Array<::String>] + # The list of languages of the query. This is + # the BCP-47 language code, such as "en-US" or "sr-Latn". + # For more information, see + # [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). + # + # The maximum number of allowed characters is 255. + # @param page_size [::Integer] + # Required. Completion result count. + # + # The maximum allowed page size is 10. + # @param company [::String] + # If provided, restricts completion to specified company. + # + # The format is + # "projects/\\{project_id}/tenants/\\{tenant_id}/companies/\\{company_id}", for + # example, "projects/foo/tenants/bar/companies/baz". + # + # If tenant id is unspecified, the default tenant is used, for + # example, "projects/foo". + # @param scope [::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionScope] + # The scope of the completion. The defaults is + # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionScope::PUBLIC CompletionScope.PUBLIC}. + # @param type [::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType] + # The completion topic. The default is + # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType::COMBINED CompletionType.COMBINED}. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::CompleteQueryResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::CompleteQueryResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::Completion::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::CompleteQueryRequest.new + # + # # Call the complete_query method. + # result = client.complete_query request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::CompleteQueryResponse. + # p result + # + def complete_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::CompleteQueryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.complete_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::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.complete_query.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.complete_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @completion_stub.complete_query request, 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 Completion REST API. + # + # This class represents the configuration for Completion 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::Talent::V4beta1::Completion::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 + # # complete_query to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Talent::V4beta1::Completion::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.complete_query.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Talent::V4beta1::Completion::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.complete_query.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 = "jobs.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 Completion 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 `complete_query` + # @return [::Gapic::Config::Method] + # + attr_reader :complete_query + + # @private + def initialize parent_rpcs = nil + complete_query_config = parent_rpcs.complete_query if parent_rpcs.respond_to? :complete_query + @complete_query = ::Gapic::Config::Method.new complete_query_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/rest/service_stub.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/rest/service_stub.rb new file mode 100644 index 000000000000..c6c52bc71a69 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/rest/service_stub.rb @@ -0,0 +1,149 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/talent/v4beta1/completion_service_pb" + +module Google + module Cloud + module Talent + module V4beta1 + module Completion + module Rest + ## + # REST service stub for the Completion 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 complete_query REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::CompleteQueryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::CompleteQueryResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::CompleteQueryResponse] + # A result object deserialized from the server's reply + def complete_query request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_complete_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: "complete_query", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Talent::V4beta1::CompleteQueryResponse.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 complete_query REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::CompleteQueryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_complete_query_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v4beta1/{parent}:complete", + matches: [ + ["parent", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v4beta1/{parent}:complete", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion_service_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion_service_pb.rb new file mode 100644 index 000000000000..1c9866a22bbd --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion_service_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/talent/v4beta1/completion_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/talent/v4beta1/common_pb' + + +descriptor_data = "\n4google/cloud/talent/v4beta1/completion_service.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/talent/v4beta1/common.proto\"\x93\x04\n\x14\x43ompleteQueryRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1bjobs.googleapis.com/Company\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x0elanguage_codes\x18\x03 \x03(\t\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x31\n\x07\x63ompany\x18\x05 \x01(\tB \xfa\x41\x1d\n\x1bjobs.googleapis.com/Company\x12P\n\x05scope\x18\x06 \x01(\x0e\x32\x41.google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionScope\x12N\n\x04type\x18\x07 \x01(\x0e\x32@.google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType\"K\n\x0f\x43ompletionScope\x12 \n\x1c\x43OMPLETION_SCOPE_UNSPECIFIED\x10\x00\x12\n\n\x06TENANT\x10\x01\x12\n\n\x06PUBLIC\x10\x02\"`\n\x0e\x43ompletionType\x12\x1f\n\x1b\x43OMPLETION_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tJOB_TITLE\x10\x01\x12\x10\n\x0c\x43OMPANY_NAME\x10\x02\x12\x0c\n\x08\x43OMBINED\x10\x03\"\xc5\x02\n\x15\x43ompleteQueryResponse\x12_\n\x12\x63ompletion_results\x18\x01 \x03(\x0b\x32\x43.google.cloud.talent.v4beta1.CompleteQueryResponse.CompletionResult\x12?\n\x08metadata\x18\x02 \x01(\x0b\x32-.google.cloud.talent.v4beta1.ResponseMetadata\x1a\x89\x01\n\x10\x43ompletionResult\x12\x12\n\nsuggestion\x18\x01 \x01(\t\x12N\n\x04type\x18\x02 \x01(\x0e\x32@.google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType\x12\x11\n\timage_uri\x18\x03 \x01(\t2\xd5\x02\n\nCompletion\x12\xd8\x01\n\rCompleteQuery\x12\x31.google.cloud.talent.v4beta1.CompleteQueryRequest\x1a\x32.google.cloud.talent.v4beta1.CompleteQueryResponse\"`\x82\xd3\xe4\x93\x02Z\x12//v4beta1/{parent=projects/*/tenants/*}:completeZ\'\x12%/v4beta1/{parent=projects/*}:complete\x1al\xca\x41\x13jobs.googleapis.com\xd2\x41Shttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobsBz\n\x1f\x63om.google.cloud.talent.v4beta1B\x16\x43ompletionServiceProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Talent + module V4beta1 + CompleteQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompleteQueryRequest").msgclass + CompleteQueryRequest::CompletionScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionScope").enummodule + CompleteQueryRequest::CompletionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType").enummodule + CompleteQueryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompleteQueryResponse").msgclass + CompleteQueryResponse::CompletionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompleteQueryResponse.CompletionResult").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion_service_services_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion_service_services_pb.rb new file mode 100644 index 000000000000..cb146eb364f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion_service_services_pb.rb @@ -0,0 +1,46 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/talent/v4beta1/completion_service.proto for package 'google.cloud.talent.v4beta1' +# 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/talent/v4beta1/completion_service_pb' + +module Google + module Cloud + module Talent + module V4beta1 + module Completion + # A service handles auto completion. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.talent.v4beta1.Completion' + + # Completes the specified prefix with keyword suggestions. + # Intended for use by a job search auto-complete search box. + rpc :CompleteQuery, ::Google::Cloud::Talent::V4beta1::CompleteQueryRequest, ::Google::Cloud::Talent::V4beta1::CompleteQueryResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_pb.rb new file mode 100644 index 000000000000..55262042826c --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/talent/v4beta1/event.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n\'google/cloud/talent/v4beta1/event.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x01\n\x0b\x43lientEvent\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\x15\n\x08\x65vent_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12:\n\tjob_event\x18\x05 \x01(\x0b\x32%.google.cloud.talent.v4beta1.JobEventH\x00\x12\x13\n\x0b\x65vent_notes\x18\t \x01(\tB\x07\n\x05\x65vent\"\xf6\x03\n\x08JobEvent\x12\x45\n\x04type\x18\x01 \x01(\x0e\x32\x32.google.cloud.talent.v4beta1.JobEvent.JobEventTypeB\x03\xe0\x41\x02\x12\x11\n\x04jobs\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12\x0f\n\x07profile\x18\x03 \x01(\t\"\xfe\x02\n\x0cJobEventType\x12\x1e\n\x1aJOB_EVENT_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nIMPRESSION\x10\x01\x12\x08\n\x04VIEW\x10\x02\x12\x11\n\rVIEW_REDIRECT\x10\x03\x12\x15\n\x11\x41PPLICATION_START\x10\x04\x12\x16\n\x12\x41PPLICATION_FINISH\x10\x05\x12 \n\x1c\x41PPLICATION_QUICK_SUBMISSION\x10\x06\x12\x18\n\x14\x41PPLICATION_REDIRECT\x10\x07\x12!\n\x1d\x41PPLICATION_START_FROM_SEARCH\x10\x08\x12$\n APPLICATION_REDIRECT_FROM_SEARCH\x10\t\x12\x1e\n\x1a\x41PPLICATION_COMPANY_SUBMIT\x10\n\x12\x0c\n\x08\x42OOKMARK\x10\x0b\x12\x10\n\x0cNOTIFICATION\x10\x0c\x12\t\n\x05HIRED\x10\r\x12\x0b\n\x07SENT_CV\x10\x0e\x12\x15\n\x11INTERVIEW_GRANTED\x10\x0f\x42n\n\x1f\x63om.google.cloud.talent.v4beta1B\nEventProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Talent + module V4beta1 + ClientEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.ClientEvent").msgclass + JobEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.JobEvent").msgclass + JobEvent::JobEventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.JobEvent.JobEventType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service.rb new file mode 100644 index 000000000000..b3704c176961 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service.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/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/talent/v4beta1/version" + +require "google/cloud/talent/v4beta1/event_service/credentials" +require "google/cloud/talent/v4beta1/event_service/paths" +require "google/cloud/talent/v4beta1/event_service/client" +require "google/cloud/talent/v4beta1/event_service/rest" + +module Google + module Cloud + module Talent + module V4beta1 + ## + # A service handles client event report. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/talent/v4beta1/event_service" + # client = ::Google::Cloud::Talent::V4beta1::EventService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/talent/v4beta1/event_service/rest" + # client = ::Google::Cloud::Talent::V4beta1::EventService::Rest::Client.new + # + module EventService + end + end + end + end +end + +helper_path = ::File.join __dir__, "event_service", "helpers.rb" +require "google/cloud/talent/v4beta1/event_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/client.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/client.rb new file mode 100644 index 000000000000..d94cdcbc9010 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/client.rb @@ -0,0 +1,489 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/talent/v4beta1/event_service_pb" + +module Google + module Cloud + module Talent + module V4beta1 + module EventService + ## + # Client for the EventService service. + # + # A service handles client event report. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :event_service_stub + + ## + # Configure the EventService Client class. + # + # See {::Google::Cloud::Talent::V4beta1::EventService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all EventService clients + # ::Google::Cloud::Talent::V4beta1::EventService::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", "Talent", "V4beta1"] + 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_client_event.timeout = 30.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the EventService 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::Talent::V4beta1::EventService::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 + @event_service_stub.universe_domain + end + + ## + # Create a new EventService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Talent::V4beta1::EventService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Talent::V4beta1::EventService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the EventService 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/talent/v4beta1/event_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 + + @event_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Talent::V4beta1::EventService::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 + ) + + @event_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 + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @event_service_stub.logger + end + + # Service calls + + ## + # Report events issued when end user interacts with customer's application + # that uses Cloud Talent Solution. You may inspect the created events in + # [self service + # tools](https://console.cloud.google.com/talent-solution/overview). + # [Learn + # more](https://cloud.google.com/talent-solution/docs/management-tools) + # about self service tools. + # + # @overload create_client_event(request, options = nil) + # Pass arguments to `create_client_event` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::CreateClientEventRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::CreateClientEventRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_client_event(parent: nil, client_event: nil) + # Pass arguments to `create_client_event` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the tenant under which the event is created. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, + # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + # is created, for example, "projects/foo". + # @param client_event [::Google::Cloud::Talent::V4beta1::ClientEvent, ::Hash] + # Required. Events issued when end user interacts with customer's application + # that uses Cloud Talent Solution. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Talent::V4beta1::ClientEvent] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Talent::V4beta1::ClientEvent] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::EventService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::CreateClientEventRequest.new + # + # # Call the create_client_event method. + # result = client.create_client_event request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::ClientEvent. + # p result + # + def create_client_event request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::CreateClientEventRequest + + # Converts hash and nil to 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_client_event.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_client_event.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_client_event.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @event_service_stub.call_rpc :create_client_event, request, 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 EventService API. + # + # This class represents the configuration for EventService, + # 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::Talent::V4beta1::EventService::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_client_event to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Talent::V4beta1::EventService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_client_event.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Talent::V4beta1::EventService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_client_event.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::Talent::V4beta1::EventService::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 = "jobs.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 EventService 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_client_event` + # @return [::Gapic::Config::Method] + # + attr_reader :create_client_event + + # @private + def initialize parent_rpcs = nil + create_client_event_config = parent_rpcs.create_client_event if parent_rpcs.respond_to? :create_client_event + @create_client_event = ::Gapic::Config::Method.new create_client_event_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/credentials.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/credentials.rb new file mode 100644 index 000000000000..052cdab2a579 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/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 Talent + module V4beta1 + module EventService + # Credentials for the EventService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/jobs" + ] + self.env_vars = [ + "TALENT_CREDENTIALS", + "TALENT_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "TALENT_CREDENTIALS_JSON", + "TALENT_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-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/paths.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/paths.rb new file mode 100644 index 000000000000..a4194eda5367 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/paths.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 Talent + module V4beta1 + module EventService + # Path helper methods for the EventService API. + module Paths + ## + # 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 Tenant resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/tenants/{tenant}` + # + # @param project [String] + # @param tenant [String] + # + # @return [::String] + def tenant_path project:, tenant: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/tenants/#{tenant}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/rest.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/rest.rb new file mode 100644 index 000000000000..5239cc30ff54 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/rest.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 "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/talent/v4beta1/version" + +require "google/cloud/talent/v4beta1/event_service/credentials" +require "google/cloud/talent/v4beta1/event_service/paths" +require "google/cloud/talent/v4beta1/event_service/rest/client" + +module Google + module Cloud + module Talent + module V4beta1 + ## + # A service handles client event report. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/talent/v4beta1/event_service/rest" + # client = ::Google::Cloud::Talent::V4beta1::EventService::Rest::Client.new + # + module EventService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/talent/v4beta1/event_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/rest/client.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/rest/client.rb new file mode 100644 index 000000000000..ceb888dfea87 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/rest/client.rb @@ -0,0 +1,439 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/talent/v4beta1/event_service_pb" +require "google/cloud/talent/v4beta1/event_service/rest/service_stub" + +module Google + module Cloud + module Talent + module V4beta1 + module EventService + module Rest + ## + # REST client for the EventService service. + # + # A service handles client event report. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :event_service_stub + + ## + # Configure the EventService Client class. + # + # See {::Google::Cloud::Talent::V4beta1::EventService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all EventService clients + # ::Google::Cloud::Talent::V4beta1::EventService::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", "Talent", "V4beta1"] + 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_client_event.timeout = 30.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the EventService 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::Talent::V4beta1::EventService::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 + @event_service_stub.universe_domain + end + + ## + # Create a new EventService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Talent::V4beta1::EventService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Talent::V4beta1::EventService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the EventService 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 + + @event_service_stub = ::Google::Cloud::Talent::V4beta1::EventService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @event_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 + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @event_service_stub.logger + end + + # Service calls + + ## + # Report events issued when end user interacts with customer's application + # that uses Cloud Talent Solution. You may inspect the created events in + # [self service + # tools](https://console.cloud.google.com/talent-solution/overview). + # [Learn + # more](https://cloud.google.com/talent-solution/docs/management-tools) + # about self service tools. + # + # @overload create_client_event(request, options = nil) + # Pass arguments to `create_client_event` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::CreateClientEventRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::CreateClientEventRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_client_event(parent: nil, client_event: nil) + # Pass arguments to `create_client_event` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the tenant under which the event is created. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, + # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + # is created, for example, "projects/foo". + # @param client_event [::Google::Cloud::Talent::V4beta1::ClientEvent, ::Hash] + # Required. Events issued when end user interacts with customer's application + # that uses Cloud Talent Solution. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::ClientEvent] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::ClientEvent] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::EventService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::CreateClientEventRequest.new + # + # # Call the create_client_event method. + # result = client.create_client_event request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::ClientEvent. + # p result + # + def create_client_event request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::CreateClientEventRequest + + # Converts hash and nil to an 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_client_event.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_client_event.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_client_event.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @event_service_stub.create_client_event request, 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 EventService REST API. + # + # This class represents the configuration for EventService 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::Talent::V4beta1::EventService::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_client_event to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Talent::V4beta1::EventService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_client_event.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Talent::V4beta1::EventService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_client_event.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 = "jobs.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 EventService 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_client_event` + # @return [::Gapic::Config::Method] + # + attr_reader :create_client_event + + # @private + def initialize parent_rpcs = nil + create_client_event_config = parent_rpcs.create_client_event if parent_rpcs.respond_to? :create_client_event + @create_client_event = ::Gapic::Config::Method.new create_client_event_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/rest/service_stub.rb new file mode 100644 index 000000000000..0cc940fc633c --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/rest/service_stub.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 "google/cloud/talent/v4beta1/event_service_pb" + +module Google + module Cloud + module Talent + module V4beta1 + module EventService + module Rest + ## + # REST service stub for the EventService 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_client_event REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::CreateClientEventRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::ClientEvent] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::ClientEvent] + # A result object deserialized from the server's reply + def create_client_event request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_client_event_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_client_event", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Talent::V4beta1::ClientEvent.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_client_event REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::CreateClientEventRequest] + # 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_client_event_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v4beta1/{parent}/clientEvents", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v4beta1/{parent}/clientEvents", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service_pb.rb new file mode 100644 index 000000000000..0ff69657c530 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/talent/v4beta1/event_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/talent/v4beta1/event_pb' + + +descriptor_data = "\n/google/cloud/talent/v4beta1/event_service.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\'google/cloud/talent/v4beta1/event.proto\"\x94\x01\n\x18\x43reateClientEventRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1bjobs.googleapis.com/Company\x12\x43\n\x0c\x63lient_event\x18\x02 \x01(\x0b\x32(.google.cloud.talent.v4beta1.ClientEventB\x03\xe0\x41\x02\x32\xfa\x02\n\x0c\x45ventService\x12\xfb\x01\n\x11\x43reateClientEvent\x12\x35.google.cloud.talent.v4beta1.CreateClientEventRequest\x1a(.google.cloud.talent.v4beta1.ClientEvent\"\x84\x01\xda\x41\x13parent,client_event\x82\xd3\xe4\x93\x02h\"3/v4beta1/{parent=projects/*/tenants/*}/clientEvents:\x01*Z.\")/v4beta1/{parent=projects/*}/clientEvents:\x01*\x1al\xca\x41\x13jobs.googleapis.com\xd2\x41Shttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobsBu\n\x1f\x63om.google.cloud.talent.v4beta1B\x11\x45ventServiceProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Talent + module V4beta1 + CreateClientEventRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CreateClientEventRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service_services_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service_services_pb.rb new file mode 100644 index 000000000000..d4e95cc457ad --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/talent/v4beta1/event_service.proto for package 'google.cloud.talent.v4beta1' +# 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/talent/v4beta1/event_service_pb' + +module Google + module Cloud + module Talent + module V4beta1 + module EventService + # A service handles client event report. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.talent.v4beta1.EventService' + + # Report events issued when end user interacts with customer's application + # that uses Cloud Talent Solution. You may inspect the created events in + # [self service + # tools](https://console.cloud.google.com/talent-solution/overview). + # [Learn + # more](https://cloud.google.com/talent-solution/docs/management-tools) + # about self service tools. + rpc :CreateClientEvent, ::Google::Cloud::Talent::V4beta1::CreateClientEventRequest, ::Google::Cloud::Talent::V4beta1::ClientEvent + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/filters_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/filters_pb.rb new file mode 100644 index 000000000000..d3a12e891611 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/filters_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/talent/v4beta1/filters.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/cloud/talent/v4beta1/common_pb' +require 'google/protobuf/duration_pb' +require 'google/type/latlng_pb' +require 'google/type/timeofday_pb' + + +descriptor_data = "\n)google/cloud/talent/v4beta1/filters.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a(google/cloud/talent/v4beta1/common.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x18google/type/latlng.proto\x1a\x1bgoogle/type/timeofday.proto\"\x80\x05\n\x08JobQuery\x12\r\n\x05query\x18\x01 \x01(\t\x12\x1b\n\x13query_language_code\x18\x0e \x01(\t\x12\x11\n\tcompanies\x18\x02 \x03(\t\x12\x45\n\x10location_filters\x18\x03 \x03(\x0b\x32+.google.cloud.talent.v4beta1.LocationFilter\x12@\n\x0ejob_categories\x18\x04 \x03(\x0e\x32(.google.cloud.talent.v4beta1.JobCategory\x12\x42\n\x0e\x63ommute_filter\x18\x05 \x01(\x0b\x32*.google.cloud.talent.v4beta1.CommuteFilter\x12\x1d\n\x15\x63ompany_display_names\x18\x06 \x03(\t\x12L\n\x13\x63ompensation_filter\x18\x07 \x01(\x0b\x32/.google.cloud.talent.v4beta1.CompensationFilter\x12\x1f\n\x17\x63ustom_attribute_filter\x18\x08 \x01(\t\x12\x1b\n\x13\x64isable_spell_check\x18\t \x01(\x08\x12\x45\n\x10\x65mployment_types\x18\n \x03(\x0e\x32+.google.cloud.talent.v4beta1.EmploymentType\x12\x16\n\x0elanguage_codes\x18\x0b \x03(\t\x12G\n\x12publish_time_range\x18\x0c \x01(\x0b\x32+.google.cloud.talent.v4beta1.TimestampRange\x12\x15\n\rexcluded_jobs\x18\r \x03(\t\"\x83\x03\n\x0eLocationFilter\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12$\n\x07lat_lng\x18\x03 \x01(\x0b\x32\x13.google.type.LatLng\x12\x19\n\x11\x64istance_in_miles\x18\x04 \x01(\x01\x12\x61\n\x16telecommute_preference\x18\x05 \x01(\x0e\x32\x41.google.cloud.talent.v4beta1.LocationFilter.TelecommutePreference\x12\x0f\n\x07negated\x18\x06 \x01(\x08\"\x95\x01\n\x15TelecommutePreference\x12&\n\"TELECOMMUTE_PREFERENCE_UNSPECIFIED\x10\x00\x12\x1c\n\x14TELECOMMUTE_EXCLUDED\x10\x01\x1a\x02\x08\x01\x12\x17\n\x13TELECOMMUTE_ALLOWED\x10\x02\x12\x1d\n\x19TELECOMMUTE_JOBS_EXCLUDED\x10\x03\"\xca\x03\n\x12\x43ompensationFilter\x12M\n\x04type\x18\x01 \x01(\x0e\x32:.google.cloud.talent.v4beta1.CompensationFilter.FilterTypeB\x03\xe0\x41\x02\x12R\n\x05units\x18\x02 \x03(\x0e\x32>.google.cloud.talent.v4beta1.CompensationInfo.CompensationUnitB\x03\xe0\x41\x02\x12N\n\x05range\x18\x03 \x01(\x0b\x32?.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange\x12\x38\n0include_jobs_with_unspecified_compensation_range\x18\x04 \x01(\x08\"\x86\x01\n\nFilterType\x12\x1b\n\x17\x46ILTER_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tUNIT_ONLY\x10\x01\x12\x13\n\x0fUNIT_AND_AMOUNT\x10\x02\x12\x1a\n\x16\x41NNUALIZED_BASE_AMOUNT\x10\x03\x12\x1b\n\x17\x41NNUALIZED_TOTAL_AMOUNT\x10\x04\"\xcb\x03\n\rCommuteFilter\x12G\n\x0e\x63ommute_method\x18\x01 \x01(\x0e\x32*.google.cloud.talent.v4beta1.CommuteMethodB\x03\xe0\x41\x02\x12\x33\n\x11start_coordinates\x18\x02 \x01(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x02\x12\x37\n\x0ftravel_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12!\n\x19\x61llow_imprecise_addresses\x18\x04 \x01(\x08\x12N\n\x0croad_traffic\x18\x05 \x01(\x0e\x32\x36.google.cloud.talent.v4beta1.CommuteFilter.RoadTrafficH\x00\x12\x30\n\x0e\x64\x65parture_time\x18\x06 \x01(\x0b\x32\x16.google.type.TimeOfDayH\x00\"L\n\x0bRoadTraffic\x12\x1c\n\x18ROAD_TRAFFIC_UNSPECIFIED\x10\x00\x12\x10\n\x0cTRAFFIC_FREE\x10\x01\x12\r\n\tBUSY_HOUR\x10\x02\x42\x10\n\x0etraffic_optionBp\n\x1f\x63om.google.cloud.talent.v4beta1B\x0c\x46iltersProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Talent + module V4beta1 + JobQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.JobQuery").msgclass + LocationFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.LocationFilter").msgclass + LocationFilter::TelecommutePreference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.LocationFilter.TelecommutePreference").enummodule + CompensationFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompensationFilter").msgclass + CompensationFilter::FilterType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompensationFilter.FilterType").enummodule + CommuteFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CommuteFilter").msgclass + CommuteFilter::RoadTraffic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CommuteFilter.RoadTraffic").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/histogram_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/histogram_pb.rb new file mode 100644 index 000000000000..6539f05661bc --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/histogram_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/talent/v4beta1/histogram.proto + +require 'google/protobuf' + + +descriptor_data = "\n+google/cloud/talent/v4beta1/histogram.proto\x12\x1bgoogle.cloud.talent.v4beta1\")\n\x0eHistogramQuery\x12\x17\n\x0fhistogram_query\x18\x01 \x01(\t\"\xb6\x01\n\x14HistogramQueryResult\x12\x17\n\x0fhistogram_query\x18\x01 \x01(\t\x12S\n\thistogram\x18\x02 \x03(\x0b\x32@.google.cloud.talent.v4beta1.HistogramQueryResult.HistogramEntry\x1a\x30\n\x0eHistogramEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\x42r\n\x1f\x63om.google.cloud.talent.v4beta1B\x0eHistogramProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Talent + module V4beta1 + HistogramQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.HistogramQuery").msgclass + HistogramQueryResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.HistogramQueryResult").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_pb.rb new file mode 100644 index 000000000000..4245302f71cf --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/talent/v4beta1/job.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/talent/v4beta1/common_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n%google/cloud/talent/v4beta1/job.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/talent/v4beta1/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe0\x0f\n\x03Job\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x07\x63ompany\x18\x02 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bjobs.googleapis.com/Company\x12\x1b\n\x0erequisition_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05title\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\taddresses\x18\x06 \x03(\t\x12J\n\x10\x61pplication_info\x18\x07 \x01(\x0b\x32\x30.google.cloud.talent.v4beta1.Job.ApplicationInfo\x12=\n\x0cjob_benefits\x18\x08 \x03(\x0e\x32\'.google.cloud.talent.v4beta1.JobBenefit\x12H\n\x11\x63ompensation_info\x18\t \x01(\x0b\x32-.google.cloud.talent.v4beta1.CompensationInfo\x12Q\n\x11\x63ustom_attributes\x18\n \x03(\x0b\x32\x36.google.cloud.talent.v4beta1.Job.CustomAttributesEntry\x12=\n\x0c\x64\x65gree_types\x18\x0b \x03(\x0e\x32\'.google.cloud.talent.v4beta1.DegreeType\x12\x12\n\ndepartment\x18\x0c \x01(\t\x12\x45\n\x10\x65mployment_types\x18\r \x03(\x0e\x32+.google.cloud.talent.v4beta1.EmploymentType\x12\x12\n\nincentives\x18\x0e \x01(\t\x12\x15\n\rlanguage_code\x18\x0f \x01(\t\x12\x38\n\tjob_level\x18\x10 \x01(\x0e\x32%.google.cloud.talent.v4beta1.JobLevel\x12\x17\n\x0fpromotion_value\x18\x11 \x01(\x05\x12\x16\n\x0equalifications\x18\x12 \x01(\t\x12\x18\n\x10responsibilities\x18\x13 \x01(\t\x12\x42\n\x0eposting_region\x18\x14 \x01(\x0e\x32*.google.cloud.talent.v4beta1.PostingRegion\x12?\n\nvisibility\x18\x15 \x01(\x0e\x32\'.google.cloud.talent.v4beta1.VisibilityB\x02\x18\x01\x12\x32\n\x0ejob_start_time\x18\x16 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cjob_end_time\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14posting_publish_time\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x13posting_expire_time\x18\x19 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12<\n\x13posting_create_time\x18\x1a \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x13posting_update_time\x18\x1b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12!\n\x14\x63ompany_display_name\x18\x1c \x01(\tB\x03\xe0\x41\x03\x12G\n\x0c\x64\x65rived_info\x18\x1d \x01(\x0b\x32,.google.cloud.talent.v4beta1.Job.DerivedInfoB\x03\xe0\x41\x03\x12N\n\x12processing_options\x18\x1e \x01(\x0b\x32\x32.google.cloud.talent.v4beta1.Job.ProcessingOptions\x1a\x44\n\x0f\x41pplicationInfo\x12\x0e\n\x06\x65mails\x18\x01 \x03(\t\x12\x13\n\x0binstruction\x18\x02 \x01(\t\x12\x0c\n\x04uris\x18\x03 \x03(\t\x1a\x89\x01\n\x0b\x44\x65rivedInfo\x12\x38\n\tlocations\x18\x01 \x03(\x0b\x32%.google.cloud.talent.v4beta1.Location\x12@\n\x0ejob_categories\x18\x03 \x03(\x0e\x32(.google.cloud.talent.v4beta1.JobCategory\x1a\x88\x01\n\x11ProcessingOptions\x12)\n!disable_street_address_resolution\x18\x01 \x01(\x08\x12H\n\x11html_sanitization\x18\x02 \x01(\x0e\x32-.google.cloud.talent.v4beta1.HtmlSanitization\x1a\x65\n\x15\x43ustomAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12;\n\x05value\x18\x02 \x01(\x0b\x32,.google.cloud.talent.v4beta1.CustomAttribute:\x02\x38\x01:k\xea\x41h\n\x17jobs.googleapis.com/Job\x12.projects/{project}/tenants/{tenant}/jobs/{job}\x12\x1dprojects/{project}/jobs/{job}Bt\n\x1f\x63om.google.cloud.talent.v4beta1B\x10JobResourceProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Talent + module V4beta1 + Job = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Job").msgclass + Job::ApplicationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Job.ApplicationInfo").msgclass + Job::DerivedInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Job.DerivedInfo").msgclass + Job::ProcessingOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Job.ProcessingOptions").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service.rb new file mode 100644 index 000000000000..e0b6ed615036 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_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/talent/v4beta1/version" + +require "google/cloud/talent/v4beta1/job_service/credentials" +require "google/cloud/talent/v4beta1/job_service/paths" +require "google/cloud/talent/v4beta1/job_service/operations" +require "google/cloud/talent/v4beta1/job_service/client" +require "google/cloud/talent/v4beta1/job_service/rest" + +module Google + module Cloud + module Talent + module V4beta1 + ## + # A service handles job management, including job CRUD, enumeration and search. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/talent/v4beta1/job_service" + # client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/talent/v4beta1/job_service/rest" + # client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new + # + module JobService + end + end + end + end +end + +helper_path = ::File.join __dir__, "job_service", "helpers.rb" +require "google/cloud/talent/v4beta1/job_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/client.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/client.rb new file mode 100644 index 000000000000..184abd491294 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/client.rb @@ -0,0 +1,2083 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/talent/v4beta1/job_service_pb" + +module Google + module Cloud + module Talent + module V4beta1 + module JobService + ## + # Client for the JobService service. + # + # A service handles job management, including job CRUD, enumeration and search. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :job_service_stub + + ## + # Configure the JobService Client class. + # + # See {::Google::Cloud::Talent::V4beta1::JobService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all JobService clients + # ::Google::Cloud::Talent::V4beta1::JobService::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", "Talent", "V4beta1"] + 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_job.timeout = 30.0 + + default_config.rpcs.batch_create_jobs.timeout = 30.0 + + default_config.rpcs.get_job.timeout = 30.0 + default_config.rpcs.get_job.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_job.timeout = 30.0 + + default_config.rpcs.batch_update_jobs.timeout = 30.0 + + default_config.rpcs.delete_job.timeout = 30.0 + default_config.rpcs.delete_job.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.batch_delete_jobs.timeout = 30.0 + + default_config.rpcs.list_jobs.timeout = 30.0 + default_config.rpcs.list_jobs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.search_jobs.timeout = 30.0 + + default_config.rpcs.search_jobs_for_alert.timeout = 30.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the JobService 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::Talent::V4beta1::JobService::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 + @job_service_stub.universe_domain + end + + ## + # Create a new JobService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the JobService 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/talent/v4beta1/job_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 + + @job_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Talent::V4beta1::JobService::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 + ) + + @job_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 + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Talent::V4beta1::JobService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @job_service_stub.logger + end + + # Service calls + + ## + # Creates a new job. + # + # Typically, the job becomes searchable within 10 seconds, but it may take + # up to 5 minutes. + # + # @overload create_job(request, options = nil) + # Pass arguments to `create_job` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::CreateJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::CreateJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_job(parent: nil, job: nil) + # Pass arguments to `create_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the tenant under which the job is created. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, + # "projects/foo/tenant/bar". If tenant id is unspecified a default tenant + # is created. For example, "projects/foo". + # @param job [::Google::Cloud::Talent::V4beta1::Job, ::Hash] + # Required. The Job to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Talent::V4beta1::Job] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Talent::V4beta1::Job] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::JobService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::CreateJobRequest.new + # + # # Call the create_job method. + # result = client.create_job request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::Job. + # p result + # + def create_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::CreateJobRequest + + # Converts hash and nil to 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_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @job_service_stub.call_rpc :create_job, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Begins executing a batch create jobs operation. + # + # @overload batch_create_jobs(request, options = nil) + # Pass arguments to `batch_create_jobs` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_create_jobs(parent: nil, jobs: nil) + # Pass arguments to `batch_create_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the tenant under which the job is created. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, + # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + # is created. For example, "projects/foo". + # @param jobs [::Array<::Google::Cloud::Talent::V4beta1::Job, ::Hash>] + # Required. The jobs 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/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::JobService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest.new + # + # # Call the batch_create_jobs method. + # result = client.batch_create_jobs request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def batch_create_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest + + # Converts hash and nil to 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_create_jobs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_create_jobs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_create_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @job_service_stub.call_rpc :batch_create_jobs, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: 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 specified job, whose status is OPEN or recently EXPIRED + # within the last 90 days. + # + # @overload get_job(request, options = nil) + # Pass arguments to `get_job` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::GetJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::GetJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_job(name: nil) + # Pass arguments to `get_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the job to retrieve. + # + # The format is + # "projects/\\{project_id}/tenants/\\{tenant_id}/jobs/\\{job_id}". For + # example, "projects/foo/tenants/bar/jobs/baz". + # + # If tenant id is unspecified, the default tenant is used. For + # example, "projects/foo/jobs/bar". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Talent::V4beta1::Job] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Talent::V4beta1::Job] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::JobService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::GetJobRequest.new + # + # # Call the get_job method. + # result = client.get_job request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::Job. + # p result + # + def get_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::GetJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @job_service_stub.call_rpc :get_job, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates specified job. + # + # Typically, updated contents become visible in search results within 10 + # seconds, but it may take up to 5 minutes. + # + # @overload update_job(request, options = nil) + # Pass arguments to `update_job` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::UpdateJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::UpdateJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_job(job: nil, update_mask: nil) + # Pass arguments to `update_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param job [::Google::Cloud::Talent::V4beta1::Job, ::Hash] + # Required. The Job to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Strongly recommended for the best service experience. + # + # If {::Google::Cloud::Talent::V4beta1::UpdateJobRequest#update_mask update_mask} + # is provided, only the specified fields in + # {::Google::Cloud::Talent::V4beta1::UpdateJobRequest#job job} are updated. + # Otherwise all the fields are updated. + # + # A field mask to restrict the fields that are updated. Only + # top level fields of {::Google::Cloud::Talent::V4beta1::Job Job} are supported. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Talent::V4beta1::Job] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Talent::V4beta1::Job] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::JobService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::UpdateJobRequest.new + # + # # Call the update_job method. + # result = client.update_job request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::Job. + # p result + # + def update_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::UpdateJobRequest + + # Converts hash and nil to 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_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.job&.name + header_params["job.name"] = request.job.name + end + + request_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_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @job_service_stub.call_rpc :update_job, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Begins executing a batch update jobs operation. + # + # @overload batch_update_jobs(request, options = nil) + # Pass arguments to `batch_update_jobs` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_update_jobs(parent: nil, jobs: nil, update_mask: nil) + # Pass arguments to `batch_update_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the tenant under which the job is created. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, + # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + # is created. For example, "projects/foo". + # @param jobs [::Array<::Google::Cloud::Talent::V4beta1::Job, ::Hash>] + # Required. The jobs to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Strongly recommended for the best service experience. Be aware that it will + # also increase latency when checking the status of a batch operation. + # + # If + # {::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest#update_mask update_mask} + # is provided, only the specified fields in + # {::Google::Cloud::Talent::V4beta1::Job Job} are updated. Otherwise all the + # fields are updated. + # + # A field mask to restrict the fields that are updated. Only + # top level fields of {::Google::Cloud::Talent::V4beta1::Job Job} are supported. + # + # If + # {::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest#update_mask update_mask} + # is provided, The {::Google::Cloud::Talent::V4beta1::Job Job} inside + # {::Google::Cloud::Talent::V4beta1::JobOperationResult::JobResult JobResult} + # will only contains fields that is updated, plus the Id of the Job. + # Otherwise, {::Google::Cloud::Talent::V4beta1::Job Job} will include all fields, + # which can yield a very large response. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::JobService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest.new + # + # # Call the batch_update_jobs method. + # result = client.batch_update_jobs request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def batch_update_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest + + # Converts hash and nil to 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_update_jobs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_update_jobs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_update_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @job_service_stub.call_rpc :batch_update_jobs, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 the specified job. + # + # Typically, the job becomes unsearchable within 10 seconds, but it may take + # up to 5 minutes. + # + # @overload delete_job(request, options = nil) + # Pass arguments to `delete_job` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::DeleteJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::DeleteJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_job(name: nil) + # Pass arguments to `delete_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the job to be deleted. + # + # The format is + # "projects/\\{project_id}/tenants/\\{tenant_id}/jobs/\\{job_id}". For + # example, "projects/foo/tenants/bar/jobs/baz". + # + # If tenant id is unspecified, the default tenant is used. For + # example, "projects/foo/jobs/bar". + # + # @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/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::JobService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::DeleteJobRequest.new + # + # # Call the delete_job method. + # result = client.delete_job request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::DeleteJobRequest + + # Converts hash and nil to 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_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @job_service_stub.call_rpc :delete_job, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a list of {::Google::Cloud::Talent::V4beta1::Job Job}s by filter. + # + # @overload batch_delete_jobs(request, options = nil) + # Pass arguments to `batch_delete_jobs` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_delete_jobs(parent: nil, filter: nil) + # Pass arguments to `batch_delete_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the tenant under which the job is created. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, + # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + # is created. For example, "projects/foo". + # @param filter [::String] + # Required. The filter string specifies the jobs to be deleted. + # + # Supported operator: =, AND + # + # The fields eligible for filtering are: + # + # * `companyName` (Required) + # * `requisitionId` (Required) + # + # Sample Query: companyName = "projects/foo/companies/bar" AND + # requisitionId = "req-1" + # + # @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/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::JobService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest.new + # + # # Call the batch_delete_jobs method. + # result = client.batch_delete_jobs request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def batch_delete_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest + + # Converts hash and nil to 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_delete_jobs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_delete_jobs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_delete_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @job_service_stub.call_rpc :batch_delete_jobs, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists jobs by filter. + # + # @overload list_jobs(request, options = nil) + # Pass arguments to `list_jobs` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::ListJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::ListJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_jobs(parent: nil, filter: nil, page_token: nil, page_size: nil, job_view: nil) + # Pass arguments to `list_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the tenant under which the job is created. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, + # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + # is created. For example, "projects/foo". + # @param filter [::String] + # Required. The filter string specifies the jobs to be enumerated. + # + # Supported operator: =, AND + # + # The fields eligible for filtering are: + # + # * `companyName` + # * `requisitionId` + # * `status` Available values: OPEN, EXPIRED, ALL. Defaults to + # OPEN if no value is specified. + # + # At least one of `companyName` and `requisitionId` must present or an + # INVALID_ARGUMENT error is thrown. + # + # Sample Query: + # + # * companyName = "projects/foo/tenants/bar/companies/baz" + # * companyName = "projects/foo/tenants/bar/companies/baz" AND + # requisitionId = "req-1" + # * companyName = "projects/foo/tenants/bar/companies/baz" AND + # status = "EXPIRED" + # * requisitionId = "req-1" + # * requisitionId = "req-1" AND status = "EXPIRED" + # @param page_token [::String] + # The starting point of a query result. + # @param page_size [::Integer] + # The maximum number of jobs to be returned per page of results. + # + # If {::Google::Cloud::Talent::V4beta1::ListJobsRequest#job_view job_view} is set + # to + # {::Google::Cloud::Talent::V4beta1::JobView::JOB_VIEW_ID_ONLY JobView.JOB_VIEW_ID_ONLY}, + # the maximum allowed page size is 1000. Otherwise, the maximum allowed page + # size is 100. + # + # Default is 100 if empty or a number < 1 is specified. + # @param job_view [::Google::Cloud::Talent::V4beta1::JobView] + # The desired job attributes returned for jobs in the + # search response. Defaults to + # {::Google::Cloud::Talent::V4beta1::JobView::JOB_VIEW_FULL JobView.JOB_VIEW_FULL} + # if no value is specified. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Job>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Job>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::JobService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::ListJobsRequest.new + # + # # Call the list_jobs method. + # result = client.list_jobs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Talent::V4beta1::Job. + # p item + # end + # + def list_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::ListJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_jobs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_jobs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @job_service_stub.call_rpc :list_jobs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @job_service_stub, :list_jobs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Searches for jobs using the provided + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest SearchJobsRequest}. + # + # This call constrains the + # {::Google::Cloud::Talent::V4beta1::Job#visibility visibility} of jobs present in + # the database, and only returns jobs that the caller has permission to + # search against. + # + # @overload search_jobs(request, options = nil) + # Pass arguments to `search_jobs` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::SearchJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload search_jobs(parent: nil, search_mode: nil, request_metadata: nil, job_query: nil, enable_broadening: nil, require_precise_result_size: nil, histogram_queries: nil, job_view: nil, offset: nil, page_size: nil, page_token: nil, order_by: nil, diversification_level: nil, custom_ranking_info: nil, disable_keyword_match: nil, keyword_match_mode: nil, relevance_threshold: nil) + # Pass arguments to `search_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the tenant to search within. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, + # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + # is created. For example, "projects/foo". + # @param search_mode [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::SearchMode] + # Mode of a search. + # + # Defaults to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::SearchMode::JOB_SEARCH SearchMode.JOB_SEARCH}. + # @param request_metadata [::Google::Cloud::Talent::V4beta1::RequestMetadata, ::Hash] + # Required. The meta information collected about the job searcher, used to + # improve the search quality of the service. The identifiers (such as + # `user_id`) are provided by users, and must be unique and consistent. + # @param job_query [::Google::Cloud::Talent::V4beta1::JobQuery, ::Hash] + # Query used to search against jobs, such as keyword, location filters, etc. + # @param enable_broadening [::Boolean] + # Controls whether to broaden the search when it produces sparse results. + # Broadened queries append results to the end of the matching results + # list. + # + # Defaults to false. + # @param require_precise_result_size [::Boolean] + # This field is deprecated. + # @param histogram_queries [::Array<::Google::Cloud::Talent::V4beta1::HistogramQuery, ::Hash>] + # An expression specifies a histogram request against matching jobs. + # + # Expression syntax is an aggregation function call with histogram facets and + # other options. + # + # Available aggregation function calls are: + # * `count(string_histogram_facet)`: Count the number of matching entities, + # for each distinct attribute value. + # * `count(numeric_histogram_facet, list of buckets)`: Count the number of + # matching entities within each bucket. + # + # A maximum of 200 histogram buckets are supported. + # + # Data types: + # + # * Histogram facet: facet names with format `[a-zA-Z][a-zA-Z0-9_]+`. + # * String: string like "any string with backslash escape for quote(\")." + # * Number: whole number and floating point number like 10, -1 and -0.01. + # * List: list of elements with comma(,) separator surrounded by square + # brackets, for example, [1, 2, 3] and ["one", "two", "three"]. + # + # Built-in constants: + # + # * MIN (minimum number similar to java Double.MIN_VALUE) + # * MAX (maximum number similar to java Double.MAX_VALUE) + # + # Built-in functions: + # + # * bucket(start, end[, label]): bucket built-in function creates a bucket + # with range of [start, end). Note that the end is exclusive, for example, + # bucket(1, MAX, "positive number") or bucket(1, 10). + # + # Job histogram facets: + # + # * company_display_name: histogram by + # {::Google::Cloud::Talent::V4beta1::Job#company_display_name Job.company_display_name}. + # * employment_type: histogram by + # {::Google::Cloud::Talent::V4beta1::Job#employment_types Job.employment_types}, + # for example, + # "FULL_TIME", "PART_TIME". + # * company_size (DEPRECATED): histogram by + # {::Google::Cloud::Talent::V4beta1::CompanySize CompanySize}, for example, + # "SMALL", "MEDIUM", "BIG". + # * publish_time_in_day: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} + # in days. + # Must specify list of numeric buckets in spec. + # * publish_time_in_month: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} + # in months. + # Must specify list of numeric buckets in spec. + # * publish_time_in_year: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} + # in years. + # Must specify list of numeric buckets in spec. + # * degree_types: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#degree_types Job.degree_types}, for + # example, + # "Bachelors", "Masters". + # * job_level: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#job_level Job.job_level}, for example, + # "Entry + # Level". + # * country: histogram by the country code of jobs, for example, "US", "FR". + # * admin1: histogram by the admin1 code of jobs, which is a global + # placeholder referring to the state, province, or the particular term a + # country uses to define the geographic structure below the country level, + # for example, "CA", "IL". + # * city: histogram by a combination of the "city name, admin1 code". For + # example, "Mountain View, CA", "New York, NY". + # * admin1_country: histogram by a combination of the "admin1 code, country", + # for example, "CA, US", "IL, US". + # * city_coordinate: histogram by the city center's GPS coordinates (latitude + # and longitude), for example, 37.4038522,-122.0987765. Since the + # coordinates of a city center can change, customers may need to refresh + # them periodically. + # * locale: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}, for + # example, "en-US", + # "fr-FR". + # * language: histogram by the language subtag of the + # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}, + # for example, "en", "fr". + # * category: histogram by the + # {::Google::Cloud::Talent::V4beta1::JobCategory JobCategory}, for example, + # "COMPUTER_AND_IT", "HEALTHCARE". + # * base_compensation_unit: histogram by the + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationUnit CompensationInfo.CompensationUnit} + # of base salary, for example, "WEEKLY", "MONTHLY". + # * base_compensation: histogram by the base salary. Must specify list of + # numeric buckets to group results by. + # * annualized_base_compensation: histogram by the base annualized salary. + # Must specify list of numeric buckets to group results by. + # * annualized_total_compensation: histogram by the total annualized salary. + # Must specify list of numeric buckets to group results by. + # * string_custom_attribute: histogram by string + # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes}. + # Values can be accessed via square bracket notations like + # string_custom_attribute["key1"]. + # * numeric_custom_attribute: histogram by numeric + # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes}. + # Values can be accessed via square bracket notations like + # numeric_custom_attribute["key1"]. Must specify list of numeric buckets to + # group results by. + # + # Example expressions: + # + # * `count(admin1)` + # * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000), + # bucket(100000, MAX)])` + # * `count(string_custom_attribute["some-string-custom-attribute"])` + # * `count(numeric_custom_attribute["some-numeric-custom-attribute"], + # [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])` + # @param job_view [::Google::Cloud::Talent::V4beta1::JobView] + # The desired job attributes returned for jobs in the search response. + # Defaults to + # {::Google::Cloud::Talent::V4beta1::JobView::JOB_VIEW_SMALL JobView.JOB_VIEW_SMALL} + # if no value is specified. + # @param offset [::Integer] + # An integer that specifies the current offset (that is, starting result + # location, amongst the jobs deemed by the API as relevant) in search + # results. This field is only considered if + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#page_token page_token} is + # unset. + # + # The maximum allowed value is 5000. Otherwise an error is thrown. + # + # For example, 0 means to return results starting from the first matching + # job, and 10 means to return from the 11th job. This can be used for + # pagination, (for example, pageSize = 10 and offset = 10 means to return + # from the second page). + # @param page_size [::Integer] + # A limit on the number of jobs returned in the search results. + # Increasing this value above the default value of 10 can increase search + # response time. The value can be between 1 and 100. + # @param page_token [::String] + # The token specifying the current offset within + # search results. See + # {::Google::Cloud::Talent::V4beta1::SearchJobsResponse#next_page_token SearchJobsResponse.next_page_token} + # for an explanation of how to obtain the next set of query results. + # @param order_by [::String] + # The criteria determining how search results are sorted. Default is + # `"relevance desc"`. + # + # Supported options are: + # + # * `"relevance desc"`: By relevance descending, as determined by the API + # algorithms. Relevance thresholding of query results is only available + # with this ordering. + # * `"posting_publish_time desc"`: By + # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} + # descending. + # * `"posting_update_time desc"`: By + # {::Google::Cloud::Talent::V4beta1::Job#posting_update_time Job.posting_update_time} + # descending. + # * `"title"`: By {::Google::Cloud::Talent::V4beta1::Job#title Job.title} + # ascending. + # * `"title desc"`: By {::Google::Cloud::Talent::V4beta1::Job#title Job.title} + # descending. + # * `"annualized_base_compensation"`: By job's + # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_base_compensation_range CompensationInfo.annualized_base_compensation_range} + # ascending. Jobs whose annualized base compensation is unspecified are put + # at the end of search results. + # * `"annualized_base_compensation desc"`: By job's + # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_base_compensation_range CompensationInfo.annualized_base_compensation_range} + # descending. Jobs whose annualized base compensation is unspecified are + # put at the end of search results. + # * `"annualized_total_compensation"`: By job's + # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_total_compensation_range CompensationInfo.annualized_total_compensation_range} + # ascending. Jobs whose annualized base compensation is unspecified are put + # at the end of search results. + # * `"annualized_total_compensation desc"`: By job's + # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_total_compensation_range CompensationInfo.annualized_total_compensation_range} + # descending. Jobs whose annualized base compensation is unspecified are + # put at the end of search results. + # * `"custom_ranking desc"`: By the relevance score adjusted to the + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#ranking_expression SearchJobsRequest.CustomRankingInfo.ranking_expression} + # with weight factor assigned by + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#importance_level SearchJobsRequest.CustomRankingInfo.importance_level} + # in descending order. + # * Location sorting: Use the special syntax to order jobs by distance:
+ # `"distance_from('Hawaii')"`: Order by distance from Hawaii.
+ # `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.
+ # `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by + # multiple locations. See details below.
+ # `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by + # multiple locations. See details below.
+ # The string can have a maximum of 256 characters. When multiple distance + # centers are provided, a job that is close to any of the distance centers + # would have a high rank. When a job has multiple locations, the job + # location closest to one of the distance centers will be used. Jobs that + # don't have locations will be ranked at the bottom. Distance is calculated + # with a precision of 11.3 meters (37.4 feet). Diversification strategy is + # still applied unless explicitly disabled in + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#diversification_level diversification_level}. + # @param diversification_level [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::DiversificationLevel] + # Controls whether highly similar jobs are returned next to each other in + # the search results. Jobs are identified as highly similar based on + # their titles, job categories, and locations. Highly similar results are + # clustered so that only one representative job of the cluster is + # displayed to the job seeker higher up in the results, with the other jobs + # being displayed lower down in the results. + # + # Defaults to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::DiversificationLevel::SIMPLE DiversificationLevel.SIMPLE} + # if no value is specified. + # @param custom_ranking_info [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo, ::Hash] + # Controls over how job documents get ranked on top of existing relevance + # score (determined by API algorithm). + # @param disable_keyword_match [::Boolean] + # This field is deprecated. Please use + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#keyword_match_mode SearchJobsRequest.keyword_match_mode} + # going forward. + # + # To migrate, disable_keyword_match set to false maps to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_ALL KeywordMatchMode.KEYWORD_MATCH_ALL}, + # and disable_keyword_match set to true maps to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_DISABLED KeywordMatchMode.KEYWORD_MATCH_DISABLED}. + # If + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#keyword_match_mode SearchJobsRequest.keyword_match_mode} + # is set, this field is ignored. + # + # Controls whether to disable exact keyword match on + # {::Google::Cloud::Talent::V4beta1::Job#title Job.title}, + # {::Google::Cloud::Talent::V4beta1::Job#description Job.description}, + # {::Google::Cloud::Talent::V4beta1::Job#company_display_name Job.company_display_name}, + # {::Google::Cloud::Talent::V4beta1::Job#addresses Job.addresses}, + # {::Google::Cloud::Talent::V4beta1::Job#qualifications Job.qualifications}. When + # disable keyword match is turned off, a keyword match returns jobs that do + # not match given category filters when there are matching keywords. For + # example, for the query "program manager," a result is returned even if the + # job posting has the title "software developer," which doesn't fall into + # "program manager" ontology, but does have "program manager" appearing in + # its description. + # + # For queries like "cloud" that don't contain title or + # location specific ontology, jobs with "cloud" keyword matches are returned + # regardless of this flag's value. + # + # Use + # {::Google::Cloud::Talent::V4beta1::Company#keyword_searchable_job_custom_attributes Company.keyword_searchable_job_custom_attributes} + # if company-specific globally matched custom field/attribute string values + # are needed. Enabling keyword match improves recall of subsequent search + # requests. + # + # Defaults to false. + # @param keyword_match_mode [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode] + # Controls what keyword match options to use. + # + # Defaults to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_ALL KeywordMatchMode.KEYWORD_MATCH_ALL} + # if no value is specified. + # @param relevance_threshold [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::RelevanceThreshold] + # Optional. The relevance threshold of the search results. + # + # Default to Google defined threshold, leveraging a balance of + # precision and recall to deliver both highly accurate results and + # comprehensive coverage of relevant information. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Talent::V4beta1::SearchJobsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Talent::V4beta1::SearchJobsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::JobService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::SearchJobsRequest.new + # + # # Call the search_jobs method. + # result = client.search_jobs request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::SearchJobsResponse. + # p result + # + def search_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::SearchJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.search_jobs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.search_jobs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @job_service_stub.call_rpc :search_jobs, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Searches for jobs using the provided + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest SearchJobsRequest}. + # + # This API call is intended for the use case of targeting passive job + # seekers (for example, job seekers who have signed up to receive email + # alerts about potential job opportunities), and has different algorithmic + # adjustments that are targeted to passive job seekers. + # + # This call constrains the + # {::Google::Cloud::Talent::V4beta1::Job#visibility visibility} of jobs present in + # the database, and only returns jobs the caller has permission to search + # against. + # + # @overload search_jobs_for_alert(request, options = nil) + # Pass arguments to `search_jobs_for_alert` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::SearchJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload search_jobs_for_alert(parent: nil, search_mode: nil, request_metadata: nil, job_query: nil, enable_broadening: nil, require_precise_result_size: nil, histogram_queries: nil, job_view: nil, offset: nil, page_size: nil, page_token: nil, order_by: nil, diversification_level: nil, custom_ranking_info: nil, disable_keyword_match: nil, keyword_match_mode: nil, relevance_threshold: nil) + # Pass arguments to `search_jobs_for_alert` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the tenant to search within. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, + # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + # is created. For example, "projects/foo". + # @param search_mode [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::SearchMode] + # Mode of a search. + # + # Defaults to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::SearchMode::JOB_SEARCH SearchMode.JOB_SEARCH}. + # @param request_metadata [::Google::Cloud::Talent::V4beta1::RequestMetadata, ::Hash] + # Required. The meta information collected about the job searcher, used to + # improve the search quality of the service. The identifiers (such as + # `user_id`) are provided by users, and must be unique and consistent. + # @param job_query [::Google::Cloud::Talent::V4beta1::JobQuery, ::Hash] + # Query used to search against jobs, such as keyword, location filters, etc. + # @param enable_broadening [::Boolean] + # Controls whether to broaden the search when it produces sparse results. + # Broadened queries append results to the end of the matching results + # list. + # + # Defaults to false. + # @param require_precise_result_size [::Boolean] + # This field is deprecated. + # @param histogram_queries [::Array<::Google::Cloud::Talent::V4beta1::HistogramQuery, ::Hash>] + # An expression specifies a histogram request against matching jobs. + # + # Expression syntax is an aggregation function call with histogram facets and + # other options. + # + # Available aggregation function calls are: + # * `count(string_histogram_facet)`: Count the number of matching entities, + # for each distinct attribute value. + # * `count(numeric_histogram_facet, list of buckets)`: Count the number of + # matching entities within each bucket. + # + # A maximum of 200 histogram buckets are supported. + # + # Data types: + # + # * Histogram facet: facet names with format `[a-zA-Z][a-zA-Z0-9_]+`. + # * String: string like "any string with backslash escape for quote(\")." + # * Number: whole number and floating point number like 10, -1 and -0.01. + # * List: list of elements with comma(,) separator surrounded by square + # brackets, for example, [1, 2, 3] and ["one", "two", "three"]. + # + # Built-in constants: + # + # * MIN (minimum number similar to java Double.MIN_VALUE) + # * MAX (maximum number similar to java Double.MAX_VALUE) + # + # Built-in functions: + # + # * bucket(start, end[, label]): bucket built-in function creates a bucket + # with range of [start, end). Note that the end is exclusive, for example, + # bucket(1, MAX, "positive number") or bucket(1, 10). + # + # Job histogram facets: + # + # * company_display_name: histogram by + # {::Google::Cloud::Talent::V4beta1::Job#company_display_name Job.company_display_name}. + # * employment_type: histogram by + # {::Google::Cloud::Talent::V4beta1::Job#employment_types Job.employment_types}, + # for example, + # "FULL_TIME", "PART_TIME". + # * company_size (DEPRECATED): histogram by + # {::Google::Cloud::Talent::V4beta1::CompanySize CompanySize}, for example, + # "SMALL", "MEDIUM", "BIG". + # * publish_time_in_day: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} + # in days. + # Must specify list of numeric buckets in spec. + # * publish_time_in_month: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} + # in months. + # Must specify list of numeric buckets in spec. + # * publish_time_in_year: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} + # in years. + # Must specify list of numeric buckets in spec. + # * degree_types: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#degree_types Job.degree_types}, for + # example, + # "Bachelors", "Masters". + # * job_level: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#job_level Job.job_level}, for example, + # "Entry + # Level". + # * country: histogram by the country code of jobs, for example, "US", "FR". + # * admin1: histogram by the admin1 code of jobs, which is a global + # placeholder referring to the state, province, or the particular term a + # country uses to define the geographic structure below the country level, + # for example, "CA", "IL". + # * city: histogram by a combination of the "city name, admin1 code". For + # example, "Mountain View, CA", "New York, NY". + # * admin1_country: histogram by a combination of the "admin1 code, country", + # for example, "CA, US", "IL, US". + # * city_coordinate: histogram by the city center's GPS coordinates (latitude + # and longitude), for example, 37.4038522,-122.0987765. Since the + # coordinates of a city center can change, customers may need to refresh + # them periodically. + # * locale: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}, for + # example, "en-US", + # "fr-FR". + # * language: histogram by the language subtag of the + # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}, + # for example, "en", "fr". + # * category: histogram by the + # {::Google::Cloud::Talent::V4beta1::JobCategory JobCategory}, for example, + # "COMPUTER_AND_IT", "HEALTHCARE". + # * base_compensation_unit: histogram by the + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationUnit CompensationInfo.CompensationUnit} + # of base salary, for example, "WEEKLY", "MONTHLY". + # * base_compensation: histogram by the base salary. Must specify list of + # numeric buckets to group results by. + # * annualized_base_compensation: histogram by the base annualized salary. + # Must specify list of numeric buckets to group results by. + # * annualized_total_compensation: histogram by the total annualized salary. + # Must specify list of numeric buckets to group results by. + # * string_custom_attribute: histogram by string + # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes}. + # Values can be accessed via square bracket notations like + # string_custom_attribute["key1"]. + # * numeric_custom_attribute: histogram by numeric + # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes}. + # Values can be accessed via square bracket notations like + # numeric_custom_attribute["key1"]. Must specify list of numeric buckets to + # group results by. + # + # Example expressions: + # + # * `count(admin1)` + # * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000), + # bucket(100000, MAX)])` + # * `count(string_custom_attribute["some-string-custom-attribute"])` + # * `count(numeric_custom_attribute["some-numeric-custom-attribute"], + # [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])` + # @param job_view [::Google::Cloud::Talent::V4beta1::JobView] + # The desired job attributes returned for jobs in the search response. + # Defaults to + # {::Google::Cloud::Talent::V4beta1::JobView::JOB_VIEW_SMALL JobView.JOB_VIEW_SMALL} + # if no value is specified. + # @param offset [::Integer] + # An integer that specifies the current offset (that is, starting result + # location, amongst the jobs deemed by the API as relevant) in search + # results. This field is only considered if + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#page_token page_token} is + # unset. + # + # The maximum allowed value is 5000. Otherwise an error is thrown. + # + # For example, 0 means to return results starting from the first matching + # job, and 10 means to return from the 11th job. This can be used for + # pagination, (for example, pageSize = 10 and offset = 10 means to return + # from the second page). + # @param page_size [::Integer] + # A limit on the number of jobs returned in the search results. + # Increasing this value above the default value of 10 can increase search + # response time. The value can be between 1 and 100. + # @param page_token [::String] + # The token specifying the current offset within + # search results. See + # {::Google::Cloud::Talent::V4beta1::SearchJobsResponse#next_page_token SearchJobsResponse.next_page_token} + # for an explanation of how to obtain the next set of query results. + # @param order_by [::String] + # The criteria determining how search results are sorted. Default is + # `"relevance desc"`. + # + # Supported options are: + # + # * `"relevance desc"`: By relevance descending, as determined by the API + # algorithms. Relevance thresholding of query results is only available + # with this ordering. + # * `"posting_publish_time desc"`: By + # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} + # descending. + # * `"posting_update_time desc"`: By + # {::Google::Cloud::Talent::V4beta1::Job#posting_update_time Job.posting_update_time} + # descending. + # * `"title"`: By {::Google::Cloud::Talent::V4beta1::Job#title Job.title} + # ascending. + # * `"title desc"`: By {::Google::Cloud::Talent::V4beta1::Job#title Job.title} + # descending. + # * `"annualized_base_compensation"`: By job's + # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_base_compensation_range CompensationInfo.annualized_base_compensation_range} + # ascending. Jobs whose annualized base compensation is unspecified are put + # at the end of search results. + # * `"annualized_base_compensation desc"`: By job's + # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_base_compensation_range CompensationInfo.annualized_base_compensation_range} + # descending. Jobs whose annualized base compensation is unspecified are + # put at the end of search results. + # * `"annualized_total_compensation"`: By job's + # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_total_compensation_range CompensationInfo.annualized_total_compensation_range} + # ascending. Jobs whose annualized base compensation is unspecified are put + # at the end of search results. + # * `"annualized_total_compensation desc"`: By job's + # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_total_compensation_range CompensationInfo.annualized_total_compensation_range} + # descending. Jobs whose annualized base compensation is unspecified are + # put at the end of search results. + # * `"custom_ranking desc"`: By the relevance score adjusted to the + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#ranking_expression SearchJobsRequest.CustomRankingInfo.ranking_expression} + # with weight factor assigned by + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#importance_level SearchJobsRequest.CustomRankingInfo.importance_level} + # in descending order. + # * Location sorting: Use the special syntax to order jobs by distance:
+ # `"distance_from('Hawaii')"`: Order by distance from Hawaii.
+ # `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.
+ # `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by + # multiple locations. See details below.
+ # `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by + # multiple locations. See details below.
+ # The string can have a maximum of 256 characters. When multiple distance + # centers are provided, a job that is close to any of the distance centers + # would have a high rank. When a job has multiple locations, the job + # location closest to one of the distance centers will be used. Jobs that + # don't have locations will be ranked at the bottom. Distance is calculated + # with a precision of 11.3 meters (37.4 feet). Diversification strategy is + # still applied unless explicitly disabled in + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#diversification_level diversification_level}. + # @param diversification_level [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::DiversificationLevel] + # Controls whether highly similar jobs are returned next to each other in + # the search results. Jobs are identified as highly similar based on + # their titles, job categories, and locations. Highly similar results are + # clustered so that only one representative job of the cluster is + # displayed to the job seeker higher up in the results, with the other jobs + # being displayed lower down in the results. + # + # Defaults to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::DiversificationLevel::SIMPLE DiversificationLevel.SIMPLE} + # if no value is specified. + # @param custom_ranking_info [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo, ::Hash] + # Controls over how job documents get ranked on top of existing relevance + # score (determined by API algorithm). + # @param disable_keyword_match [::Boolean] + # This field is deprecated. Please use + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#keyword_match_mode SearchJobsRequest.keyword_match_mode} + # going forward. + # + # To migrate, disable_keyword_match set to false maps to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_ALL KeywordMatchMode.KEYWORD_MATCH_ALL}, + # and disable_keyword_match set to true maps to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_DISABLED KeywordMatchMode.KEYWORD_MATCH_DISABLED}. + # If + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#keyword_match_mode SearchJobsRequest.keyword_match_mode} + # is set, this field is ignored. + # + # Controls whether to disable exact keyword match on + # {::Google::Cloud::Talent::V4beta1::Job#title Job.title}, + # {::Google::Cloud::Talent::V4beta1::Job#description Job.description}, + # {::Google::Cloud::Talent::V4beta1::Job#company_display_name Job.company_display_name}, + # {::Google::Cloud::Talent::V4beta1::Job#addresses Job.addresses}, + # {::Google::Cloud::Talent::V4beta1::Job#qualifications Job.qualifications}. When + # disable keyword match is turned off, a keyword match returns jobs that do + # not match given category filters when there are matching keywords. For + # example, for the query "program manager," a result is returned even if the + # job posting has the title "software developer," which doesn't fall into + # "program manager" ontology, but does have "program manager" appearing in + # its description. + # + # For queries like "cloud" that don't contain title or + # location specific ontology, jobs with "cloud" keyword matches are returned + # regardless of this flag's value. + # + # Use + # {::Google::Cloud::Talent::V4beta1::Company#keyword_searchable_job_custom_attributes Company.keyword_searchable_job_custom_attributes} + # if company-specific globally matched custom field/attribute string values + # are needed. Enabling keyword match improves recall of subsequent search + # requests. + # + # Defaults to false. + # @param keyword_match_mode [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode] + # Controls what keyword match options to use. + # + # Defaults to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_ALL KeywordMatchMode.KEYWORD_MATCH_ALL} + # if no value is specified. + # @param relevance_threshold [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::RelevanceThreshold] + # Optional. The relevance threshold of the search results. + # + # Default to Google defined threshold, leveraging a balance of + # precision and recall to deliver both highly accurate results and + # comprehensive coverage of relevant information. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Talent::V4beta1::SearchJobsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Talent::V4beta1::SearchJobsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::JobService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::SearchJobsRequest.new + # + # # Call the search_jobs_for_alert method. + # result = client.search_jobs_for_alert request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::SearchJobsResponse. + # p result + # + def search_jobs_for_alert request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::SearchJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.search_jobs_for_alert.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.search_jobs_for_alert.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_jobs_for_alert.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @job_service_stub.call_rpc :search_jobs_for_alert, request, 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 JobService API. + # + # This class represents the configuration for JobService, + # 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::Talent::V4beta1::JobService::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_job to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Talent::V4beta1::JobService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_job.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_job.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::Talent::V4beta1::JobService::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 = "jobs.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 JobService 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_job` + # @return [::Gapic::Config::Method] + # + attr_reader :create_job + ## + # RPC-specific configuration for `batch_create_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_create_jobs + ## + # RPC-specific configuration for `get_job` + # @return [::Gapic::Config::Method] + # + attr_reader :get_job + ## + # RPC-specific configuration for `update_job` + # @return [::Gapic::Config::Method] + # + attr_reader :update_job + ## + # RPC-specific configuration for `batch_update_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_update_jobs + ## + # RPC-specific configuration for `delete_job` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_job + ## + # RPC-specific configuration for `batch_delete_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_delete_jobs + ## + # RPC-specific configuration for `list_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_jobs + ## + # RPC-specific configuration for `search_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :search_jobs + ## + # RPC-specific configuration for `search_jobs_for_alert` + # @return [::Gapic::Config::Method] + # + attr_reader :search_jobs_for_alert + + # @private + def initialize parent_rpcs = nil + create_job_config = parent_rpcs.create_job if parent_rpcs.respond_to? :create_job + @create_job = ::Gapic::Config::Method.new create_job_config + batch_create_jobs_config = parent_rpcs.batch_create_jobs if parent_rpcs.respond_to? :batch_create_jobs + @batch_create_jobs = ::Gapic::Config::Method.new batch_create_jobs_config + get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job + @get_job = ::Gapic::Config::Method.new get_job_config + update_job_config = parent_rpcs.update_job if parent_rpcs.respond_to? :update_job + @update_job = ::Gapic::Config::Method.new update_job_config + batch_update_jobs_config = parent_rpcs.batch_update_jobs if parent_rpcs.respond_to? :batch_update_jobs + @batch_update_jobs = ::Gapic::Config::Method.new batch_update_jobs_config + delete_job_config = parent_rpcs.delete_job if parent_rpcs.respond_to? :delete_job + @delete_job = ::Gapic::Config::Method.new delete_job_config + batch_delete_jobs_config = parent_rpcs.batch_delete_jobs if parent_rpcs.respond_to? :batch_delete_jobs + @batch_delete_jobs = ::Gapic::Config::Method.new batch_delete_jobs_config + list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs + @list_jobs = ::Gapic::Config::Method.new list_jobs_config + search_jobs_config = parent_rpcs.search_jobs if parent_rpcs.respond_to? :search_jobs + @search_jobs = ::Gapic::Config::Method.new search_jobs_config + search_jobs_for_alert_config = parent_rpcs.search_jobs_for_alert if parent_rpcs.respond_to? :search_jobs_for_alert + @search_jobs_for_alert = ::Gapic::Config::Method.new search_jobs_for_alert_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/credentials.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/credentials.rb new file mode 100644 index 000000000000..b63aa1a22303 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/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 Talent + module V4beta1 + module JobService + # Credentials for the JobService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/jobs" + ] + self.env_vars = [ + "TALENT_CREDENTIALS", + "TALENT_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "TALENT_CREDENTIALS_JSON", + "TALENT_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-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/operations.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/operations.rb new file mode 100644 index 000000000000..ccad6093971e --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_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 Talent + module V4beta1 + module JobService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the JobService 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 JobService 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::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Talent::V4beta1::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 = "jobs.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-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/paths.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/paths.rb new file mode 100644 index 000000000000..71e690c1552a --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/paths.rb @@ -0,0 +1,146 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Talent + module V4beta1 + module JobService + # Path helper methods for the JobService API. + module Paths + ## + # Create a fully-qualified Company resource string. + # + # @overload company_path(project:, tenant:, company:) + # The resource will be in the following format: + # + # `projects/{project}/tenants/{tenant}/companies/{company}` + # + # @param project [String] + # @param tenant [String] + # @param company [String] + # + # @overload company_path(project:, company:) + # The resource will be in the following format: + # + # `projects/{project}/companies/{company}` + # + # @param project [String] + # @param company [String] + # + # @return [::String] + def company_path **args + resources = { + "company:project:tenant" => (proc do |project:, tenant:, company:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "tenant cannot contain /" if tenant.to_s.include? "/" + + "projects/#{project}/tenants/#{tenant}/companies/#{company}" + end), + "company:project" => (proc do |project:, company:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/companies/#{company}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Job resource string. + # + # @overload job_path(project:, tenant:, job:) + # The resource will be in the following format: + # + # `projects/{project}/tenants/{tenant}/jobs/{job}` + # + # @param project [String] + # @param tenant [String] + # @param job [String] + # + # @overload job_path(project:, job:) + # The resource will be in the following format: + # + # `projects/{project}/jobs/{job}` + # + # @param project [String] + # @param job [String] + # + # @return [::String] + def job_path **args + resources = { + "job:project:tenant" => (proc do |project:, tenant:, job:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "tenant cannot contain /" if tenant.to_s.include? "/" + + "projects/#{project}/tenants/#{tenant}/jobs/#{job}" + end), + "job:project" => (proc do |project:, job:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/jobs/#{job}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + 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 Tenant resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/tenants/{tenant}` + # + # @param project [String] + # @param tenant [String] + # + # @return [::String] + def tenant_path project:, tenant: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/tenants/#{tenant}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest.rb new file mode 100644 index 000000000000..f2f14e59264e --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest.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 "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/talent/v4beta1/version" + +require "google/cloud/talent/v4beta1/job_service/credentials" +require "google/cloud/talent/v4beta1/job_service/paths" +require "google/cloud/talent/v4beta1/job_service/rest/operations" +require "google/cloud/talent/v4beta1/job_service/rest/client" + +module Google + module Cloud + module Talent + module V4beta1 + ## + # A service handles job management, including job CRUD, enumeration and search. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/talent/v4beta1/job_service/rest" + # client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new + # + module JobService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/talent/v4beta1/job_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest/client.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest/client.rb new file mode 100644 index 000000000000..3c6fdb997cbc --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest/client.rb @@ -0,0 +1,1970 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/talent/v4beta1/job_service_pb" +require "google/cloud/talent/v4beta1/job_service/rest/service_stub" + +module Google + module Cloud + module Talent + module V4beta1 + module JobService + module Rest + ## + # REST client for the JobService service. + # + # A service handles job management, including job CRUD, enumeration and search. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :job_service_stub + + ## + # Configure the JobService Client class. + # + # See {::Google::Cloud::Talent::V4beta1::JobService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all JobService clients + # ::Google::Cloud::Talent::V4beta1::JobService::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", "Talent", "V4beta1"] + 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_job.timeout = 30.0 + + default_config.rpcs.batch_create_jobs.timeout = 30.0 + + default_config.rpcs.get_job.timeout = 30.0 + default_config.rpcs.get_job.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_job.timeout = 30.0 + + default_config.rpcs.batch_update_jobs.timeout = 30.0 + + default_config.rpcs.delete_job.timeout = 30.0 + default_config.rpcs.delete_job.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.batch_delete_jobs.timeout = 30.0 + + default_config.rpcs.list_jobs.timeout = 30.0 + default_config.rpcs.list_jobs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.search_jobs.timeout = 30.0 + + default_config.rpcs.search_jobs_for_alert.timeout = 30.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the JobService 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::Talent::V4beta1::JobService::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 + @job_service_stub.universe_domain + end + + ## + # Create a new JobService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the JobService 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::Talent::V4beta1::JobService::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 + + @job_service_stub = ::Google::Cloud::Talent::V4beta1::JobService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @job_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 + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Talent::V4beta1::JobService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @job_service_stub.logger + end + + # Service calls + + ## + # Creates a new job. + # + # Typically, the job becomes searchable within 10 seconds, but it may take + # up to 5 minutes. + # + # @overload create_job(request, options = nil) + # Pass arguments to `create_job` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::CreateJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::CreateJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_job(parent: nil, job: nil) + # Pass arguments to `create_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the tenant under which the job is created. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, + # "projects/foo/tenant/bar". If tenant id is unspecified a default tenant + # is created. For example, "projects/foo". + # @param job [::Google::Cloud::Talent::V4beta1::Job, ::Hash] + # Required. The Job to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::Job] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::Job] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::CreateJobRequest.new + # + # # Call the create_job method. + # result = client.create_job request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::Job. + # p result + # + def create_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::CreateJobRequest + + # Converts hash and nil to an 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_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @job_service_stub.create_job request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Begins executing a batch create jobs operation. + # + # @overload batch_create_jobs(request, options = nil) + # Pass arguments to `batch_create_jobs` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_create_jobs(parent: nil, jobs: nil) + # Pass arguments to `batch_create_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the tenant under which the job is created. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, + # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + # is created. For example, "projects/foo". + # @param jobs [::Array<::Google::Cloud::Talent::V4beta1::Job, ::Hash>] + # Required. The jobs 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/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest.new + # + # # Call the batch_create_jobs method. + # result = client.batch_create_jobs request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def batch_create_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest + + # Converts hash and nil to an 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_create_jobs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_create_jobs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_create_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @job_service_stub.batch_create_jobs request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 specified job, whose status is OPEN or recently EXPIRED + # within the last 90 days. + # + # @overload get_job(request, options = nil) + # Pass arguments to `get_job` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::GetJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::GetJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_job(name: nil) + # Pass arguments to `get_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the job to retrieve. + # + # The format is + # "projects/\\{project_id}/tenants/\\{tenant_id}/jobs/\\{job_id}". For + # example, "projects/foo/tenants/bar/jobs/baz". + # + # If tenant id is unspecified, the default tenant is used. For + # example, "projects/foo/jobs/bar". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::Job] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::Job] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::GetJobRequest.new + # + # # Call the get_job method. + # result = client.get_job request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::Job. + # p result + # + def get_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::GetJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @job_service_stub.get_job request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates specified job. + # + # Typically, updated contents become visible in search results within 10 + # seconds, but it may take up to 5 minutes. + # + # @overload update_job(request, options = nil) + # Pass arguments to `update_job` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::UpdateJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::UpdateJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_job(job: nil, update_mask: nil) + # Pass arguments to `update_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param job [::Google::Cloud::Talent::V4beta1::Job, ::Hash] + # Required. The Job to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Strongly recommended for the best service experience. + # + # If {::Google::Cloud::Talent::V4beta1::UpdateJobRequest#update_mask update_mask} + # is provided, only the specified fields in + # {::Google::Cloud::Talent::V4beta1::UpdateJobRequest#job job} are updated. + # Otherwise all the fields are updated. + # + # A field mask to restrict the fields that are updated. Only + # top level fields of {::Google::Cloud::Talent::V4beta1::Job Job} are supported. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::Job] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::Job] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::UpdateJobRequest.new + # + # # Call the update_job method. + # result = client.update_job request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::Job. + # p result + # + def update_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::UpdateJobRequest + + # Converts hash and nil to an 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_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @job_service_stub.update_job request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Begins executing a batch update jobs operation. + # + # @overload batch_update_jobs(request, options = nil) + # Pass arguments to `batch_update_jobs` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_update_jobs(parent: nil, jobs: nil, update_mask: nil) + # Pass arguments to `batch_update_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the tenant under which the job is created. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, + # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + # is created. For example, "projects/foo". + # @param jobs [::Array<::Google::Cloud::Talent::V4beta1::Job, ::Hash>] + # Required. The jobs to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Strongly recommended for the best service experience. Be aware that it will + # also increase latency when checking the status of a batch operation. + # + # If + # {::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest#update_mask update_mask} + # is provided, only the specified fields in + # {::Google::Cloud::Talent::V4beta1::Job Job} are updated. Otherwise all the + # fields are updated. + # + # A field mask to restrict the fields that are updated. Only + # top level fields of {::Google::Cloud::Talent::V4beta1::Job Job} are supported. + # + # If + # {::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest#update_mask update_mask} + # is provided, The {::Google::Cloud::Talent::V4beta1::Job Job} inside + # {::Google::Cloud::Talent::V4beta1::JobOperationResult::JobResult JobResult} + # will only contains fields that is updated, plus the Id of the Job. + # Otherwise, {::Google::Cloud::Talent::V4beta1::Job Job} will include all fields, + # which can yield a very large response. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest.new + # + # # Call the batch_update_jobs method. + # result = client.batch_update_jobs request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def batch_update_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest + + # Converts hash and nil to an 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_update_jobs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_update_jobs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_update_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @job_service_stub.batch_update_jobs request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 the specified job. + # + # Typically, the job becomes unsearchable within 10 seconds, but it may take + # up to 5 minutes. + # + # @overload delete_job(request, options = nil) + # Pass arguments to `delete_job` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::DeleteJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::DeleteJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_job(name: nil) + # Pass arguments to `delete_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the job to be deleted. + # + # The format is + # "projects/\\{project_id}/tenants/\\{tenant_id}/jobs/\\{job_id}". For + # example, "projects/foo/tenants/bar/jobs/baz". + # + # If tenant id is unspecified, the default tenant is used. For + # example, "projects/foo/jobs/bar". + # @yield [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/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::DeleteJobRequest.new + # + # # Call the delete_job method. + # result = client.delete_job request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::DeleteJobRequest + + # Converts hash and nil to an 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_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @job_service_stub.delete_job request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a list of {::Google::Cloud::Talent::V4beta1::Job Job}s by filter. + # + # @overload batch_delete_jobs(request, options = nil) + # Pass arguments to `batch_delete_jobs` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_delete_jobs(parent: nil, filter: nil) + # Pass arguments to `batch_delete_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the tenant under which the job is created. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, + # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + # is created. For example, "projects/foo". + # @param filter [::String] + # Required. The filter string specifies the jobs to be deleted. + # + # Supported operator: =, AND + # + # The fields eligible for filtering are: + # + # * `companyName` (Required) + # * `requisitionId` (Required) + # + # Sample Query: companyName = "projects/foo/companies/bar" AND + # requisitionId = "req-1" + # @yield [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/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest.new + # + # # Call the batch_delete_jobs method. + # result = client.batch_delete_jobs request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def batch_delete_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest + + # Converts hash and nil to an 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_delete_jobs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_delete_jobs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_delete_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @job_service_stub.batch_delete_jobs request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists jobs by filter. + # + # @overload list_jobs(request, options = nil) + # Pass arguments to `list_jobs` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::ListJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::ListJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_jobs(parent: nil, filter: nil, page_token: nil, page_size: nil, job_view: nil) + # Pass arguments to `list_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the tenant under which the job is created. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, + # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + # is created. For example, "projects/foo". + # @param filter [::String] + # Required. The filter string specifies the jobs to be enumerated. + # + # Supported operator: =, AND + # + # The fields eligible for filtering are: + # + # * `companyName` + # * `requisitionId` + # * `status` Available values: OPEN, EXPIRED, ALL. Defaults to + # OPEN if no value is specified. + # + # At least one of `companyName` and `requisitionId` must present or an + # INVALID_ARGUMENT error is thrown. + # + # Sample Query: + # + # * companyName = "projects/foo/tenants/bar/companies/baz" + # * companyName = "projects/foo/tenants/bar/companies/baz" AND + # requisitionId = "req-1" + # * companyName = "projects/foo/tenants/bar/companies/baz" AND + # status = "EXPIRED" + # * requisitionId = "req-1" + # * requisitionId = "req-1" AND status = "EXPIRED" + # @param page_token [::String] + # The starting point of a query result. + # @param page_size [::Integer] + # The maximum number of jobs to be returned per page of results. + # + # If {::Google::Cloud::Talent::V4beta1::ListJobsRequest#job_view job_view} is set + # to + # {::Google::Cloud::Talent::V4beta1::JobView::JOB_VIEW_ID_ONLY JobView.JOB_VIEW_ID_ONLY}, + # the maximum allowed page size is 1000. Otherwise, the maximum allowed page + # size is 100. + # + # Default is 100 if empty or a number < 1 is specified. + # @param job_view [::Google::Cloud::Talent::V4beta1::JobView] + # The desired job attributes returned for jobs in the + # search response. Defaults to + # {::Google::Cloud::Talent::V4beta1::JobView::JOB_VIEW_FULL JobView.JOB_VIEW_FULL} + # if no value is specified. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Job>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Job>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::ListJobsRequest.new + # + # # Call the list_jobs method. + # result = client.list_jobs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Talent::V4beta1::Job. + # p item + # end + # + def list_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::ListJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_jobs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_jobs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @job_service_stub.list_jobs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @job_service_stub, :list_jobs, "jobs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Searches for jobs using the provided + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest SearchJobsRequest}. + # + # This call constrains the + # {::Google::Cloud::Talent::V4beta1::Job#visibility visibility} of jobs present in + # the database, and only returns jobs that the caller has permission to + # search against. + # + # @overload search_jobs(request, options = nil) + # Pass arguments to `search_jobs` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::SearchJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload search_jobs(parent: nil, search_mode: nil, request_metadata: nil, job_query: nil, enable_broadening: nil, require_precise_result_size: nil, histogram_queries: nil, job_view: nil, offset: nil, page_size: nil, page_token: nil, order_by: nil, diversification_level: nil, custom_ranking_info: nil, disable_keyword_match: nil, keyword_match_mode: nil, relevance_threshold: nil) + # Pass arguments to `search_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the tenant to search within. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, + # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + # is created. For example, "projects/foo". + # @param search_mode [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::SearchMode] + # Mode of a search. + # + # Defaults to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::SearchMode::JOB_SEARCH SearchMode.JOB_SEARCH}. + # @param request_metadata [::Google::Cloud::Talent::V4beta1::RequestMetadata, ::Hash] + # Required. The meta information collected about the job searcher, used to + # improve the search quality of the service. The identifiers (such as + # `user_id`) are provided by users, and must be unique and consistent. + # @param job_query [::Google::Cloud::Talent::V4beta1::JobQuery, ::Hash] + # Query used to search against jobs, such as keyword, location filters, etc. + # @param enable_broadening [::Boolean] + # Controls whether to broaden the search when it produces sparse results. + # Broadened queries append results to the end of the matching results + # list. + # + # Defaults to false. + # @param require_precise_result_size [::Boolean] + # This field is deprecated. + # @param histogram_queries [::Array<::Google::Cloud::Talent::V4beta1::HistogramQuery, ::Hash>] + # An expression specifies a histogram request against matching jobs. + # + # Expression syntax is an aggregation function call with histogram facets and + # other options. + # + # Available aggregation function calls are: + # * `count(string_histogram_facet)`: Count the number of matching entities, + # for each distinct attribute value. + # * `count(numeric_histogram_facet, list of buckets)`: Count the number of + # matching entities within each bucket. + # + # A maximum of 200 histogram buckets are supported. + # + # Data types: + # + # * Histogram facet: facet names with format `[a-zA-Z][a-zA-Z0-9_]+`. + # * String: string like "any string with backslash escape for quote(\")." + # * Number: whole number and floating point number like 10, -1 and -0.01. + # * List: list of elements with comma(,) separator surrounded by square + # brackets, for example, [1, 2, 3] and ["one", "two", "three"]. + # + # Built-in constants: + # + # * MIN (minimum number similar to java Double.MIN_VALUE) + # * MAX (maximum number similar to java Double.MAX_VALUE) + # + # Built-in functions: + # + # * bucket(start, end[, label]): bucket built-in function creates a bucket + # with range of [start, end). Note that the end is exclusive, for example, + # bucket(1, MAX, "positive number") or bucket(1, 10). + # + # Job histogram facets: + # + # * company_display_name: histogram by + # {::Google::Cloud::Talent::V4beta1::Job#company_display_name Job.company_display_name}. + # * employment_type: histogram by + # {::Google::Cloud::Talent::V4beta1::Job#employment_types Job.employment_types}, + # for example, + # "FULL_TIME", "PART_TIME". + # * company_size (DEPRECATED): histogram by + # {::Google::Cloud::Talent::V4beta1::CompanySize CompanySize}, for example, + # "SMALL", "MEDIUM", "BIG". + # * publish_time_in_day: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} + # in days. + # Must specify list of numeric buckets in spec. + # * publish_time_in_month: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} + # in months. + # Must specify list of numeric buckets in spec. + # * publish_time_in_year: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} + # in years. + # Must specify list of numeric buckets in spec. + # * degree_types: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#degree_types Job.degree_types}, for + # example, + # "Bachelors", "Masters". + # * job_level: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#job_level Job.job_level}, for example, + # "Entry + # Level". + # * country: histogram by the country code of jobs, for example, "US", "FR". + # * admin1: histogram by the admin1 code of jobs, which is a global + # placeholder referring to the state, province, or the particular term a + # country uses to define the geographic structure below the country level, + # for example, "CA", "IL". + # * city: histogram by a combination of the "city name, admin1 code". For + # example, "Mountain View, CA", "New York, NY". + # * admin1_country: histogram by a combination of the "admin1 code, country", + # for example, "CA, US", "IL, US". + # * city_coordinate: histogram by the city center's GPS coordinates (latitude + # and longitude), for example, 37.4038522,-122.0987765. Since the + # coordinates of a city center can change, customers may need to refresh + # them periodically. + # * locale: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}, for + # example, "en-US", + # "fr-FR". + # * language: histogram by the language subtag of the + # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}, + # for example, "en", "fr". + # * category: histogram by the + # {::Google::Cloud::Talent::V4beta1::JobCategory JobCategory}, for example, + # "COMPUTER_AND_IT", "HEALTHCARE". + # * base_compensation_unit: histogram by the + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationUnit CompensationInfo.CompensationUnit} + # of base salary, for example, "WEEKLY", "MONTHLY". + # * base_compensation: histogram by the base salary. Must specify list of + # numeric buckets to group results by. + # * annualized_base_compensation: histogram by the base annualized salary. + # Must specify list of numeric buckets to group results by. + # * annualized_total_compensation: histogram by the total annualized salary. + # Must specify list of numeric buckets to group results by. + # * string_custom_attribute: histogram by string + # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes}. + # Values can be accessed via square bracket notations like + # string_custom_attribute["key1"]. + # * numeric_custom_attribute: histogram by numeric + # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes}. + # Values can be accessed via square bracket notations like + # numeric_custom_attribute["key1"]. Must specify list of numeric buckets to + # group results by. + # + # Example expressions: + # + # * `count(admin1)` + # * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000), + # bucket(100000, MAX)])` + # * `count(string_custom_attribute["some-string-custom-attribute"])` + # * `count(numeric_custom_attribute["some-numeric-custom-attribute"], + # [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])` + # @param job_view [::Google::Cloud::Talent::V4beta1::JobView] + # The desired job attributes returned for jobs in the search response. + # Defaults to + # {::Google::Cloud::Talent::V4beta1::JobView::JOB_VIEW_SMALL JobView.JOB_VIEW_SMALL} + # if no value is specified. + # @param offset [::Integer] + # An integer that specifies the current offset (that is, starting result + # location, amongst the jobs deemed by the API as relevant) in search + # results. This field is only considered if + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#page_token page_token} is + # unset. + # + # The maximum allowed value is 5000. Otherwise an error is thrown. + # + # For example, 0 means to return results starting from the first matching + # job, and 10 means to return from the 11th job. This can be used for + # pagination, (for example, pageSize = 10 and offset = 10 means to return + # from the second page). + # @param page_size [::Integer] + # A limit on the number of jobs returned in the search results. + # Increasing this value above the default value of 10 can increase search + # response time. The value can be between 1 and 100. + # @param page_token [::String] + # The token specifying the current offset within + # search results. See + # {::Google::Cloud::Talent::V4beta1::SearchJobsResponse#next_page_token SearchJobsResponse.next_page_token} + # for an explanation of how to obtain the next set of query results. + # @param order_by [::String] + # The criteria determining how search results are sorted. Default is + # `"relevance desc"`. + # + # Supported options are: + # + # * `"relevance desc"`: By relevance descending, as determined by the API + # algorithms. Relevance thresholding of query results is only available + # with this ordering. + # * `"posting_publish_time desc"`: By + # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} + # descending. + # * `"posting_update_time desc"`: By + # {::Google::Cloud::Talent::V4beta1::Job#posting_update_time Job.posting_update_time} + # descending. + # * `"title"`: By {::Google::Cloud::Talent::V4beta1::Job#title Job.title} + # ascending. + # * `"title desc"`: By {::Google::Cloud::Talent::V4beta1::Job#title Job.title} + # descending. + # * `"annualized_base_compensation"`: By job's + # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_base_compensation_range CompensationInfo.annualized_base_compensation_range} + # ascending. Jobs whose annualized base compensation is unspecified are put + # at the end of search results. + # * `"annualized_base_compensation desc"`: By job's + # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_base_compensation_range CompensationInfo.annualized_base_compensation_range} + # descending. Jobs whose annualized base compensation is unspecified are + # put at the end of search results. + # * `"annualized_total_compensation"`: By job's + # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_total_compensation_range CompensationInfo.annualized_total_compensation_range} + # ascending. Jobs whose annualized base compensation is unspecified are put + # at the end of search results. + # * `"annualized_total_compensation desc"`: By job's + # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_total_compensation_range CompensationInfo.annualized_total_compensation_range} + # descending. Jobs whose annualized base compensation is unspecified are + # put at the end of search results. + # * `"custom_ranking desc"`: By the relevance score adjusted to the + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#ranking_expression SearchJobsRequest.CustomRankingInfo.ranking_expression} + # with weight factor assigned by + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#importance_level SearchJobsRequest.CustomRankingInfo.importance_level} + # in descending order. + # * Location sorting: Use the special syntax to order jobs by distance:
+ # `"distance_from('Hawaii')"`: Order by distance from Hawaii.
+ # `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.
+ # `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by + # multiple locations. See details below.
+ # `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by + # multiple locations. See details below.
+ # The string can have a maximum of 256 characters. When multiple distance + # centers are provided, a job that is close to any of the distance centers + # would have a high rank. When a job has multiple locations, the job + # location closest to one of the distance centers will be used. Jobs that + # don't have locations will be ranked at the bottom. Distance is calculated + # with a precision of 11.3 meters (37.4 feet). Diversification strategy is + # still applied unless explicitly disabled in + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#diversification_level diversification_level}. + # @param diversification_level [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::DiversificationLevel] + # Controls whether highly similar jobs are returned next to each other in + # the search results. Jobs are identified as highly similar based on + # their titles, job categories, and locations. Highly similar results are + # clustered so that only one representative job of the cluster is + # displayed to the job seeker higher up in the results, with the other jobs + # being displayed lower down in the results. + # + # Defaults to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::DiversificationLevel::SIMPLE DiversificationLevel.SIMPLE} + # if no value is specified. + # @param custom_ranking_info [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo, ::Hash] + # Controls over how job documents get ranked on top of existing relevance + # score (determined by API algorithm). + # @param disable_keyword_match [::Boolean] + # This field is deprecated. Please use + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#keyword_match_mode SearchJobsRequest.keyword_match_mode} + # going forward. + # + # To migrate, disable_keyword_match set to false maps to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_ALL KeywordMatchMode.KEYWORD_MATCH_ALL}, + # and disable_keyword_match set to true maps to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_DISABLED KeywordMatchMode.KEYWORD_MATCH_DISABLED}. + # If + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#keyword_match_mode SearchJobsRequest.keyword_match_mode} + # is set, this field is ignored. + # + # Controls whether to disable exact keyword match on + # {::Google::Cloud::Talent::V4beta1::Job#title Job.title}, + # {::Google::Cloud::Talent::V4beta1::Job#description Job.description}, + # {::Google::Cloud::Talent::V4beta1::Job#company_display_name Job.company_display_name}, + # {::Google::Cloud::Talent::V4beta1::Job#addresses Job.addresses}, + # {::Google::Cloud::Talent::V4beta1::Job#qualifications Job.qualifications}. When + # disable keyword match is turned off, a keyword match returns jobs that do + # not match given category filters when there are matching keywords. For + # example, for the query "program manager," a result is returned even if the + # job posting has the title "software developer," which doesn't fall into + # "program manager" ontology, but does have "program manager" appearing in + # its description. + # + # For queries like "cloud" that don't contain title or + # location specific ontology, jobs with "cloud" keyword matches are returned + # regardless of this flag's value. + # + # Use + # {::Google::Cloud::Talent::V4beta1::Company#keyword_searchable_job_custom_attributes Company.keyword_searchable_job_custom_attributes} + # if company-specific globally matched custom field/attribute string values + # are needed. Enabling keyword match improves recall of subsequent search + # requests. + # + # Defaults to false. + # @param keyword_match_mode [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode] + # Controls what keyword match options to use. + # + # Defaults to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_ALL KeywordMatchMode.KEYWORD_MATCH_ALL} + # if no value is specified. + # @param relevance_threshold [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::RelevanceThreshold] + # Optional. The relevance threshold of the search results. + # + # Default to Google defined threshold, leveraging a balance of + # precision and recall to deliver both highly accurate results and + # comprehensive coverage of relevant information. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::SearchJobsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::SearchJobsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::SearchJobsRequest.new + # + # # Call the search_jobs method. + # result = client.search_jobs request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::SearchJobsResponse. + # p result + # + def search_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::SearchJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.search_jobs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.search_jobs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @job_service_stub.search_jobs request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Searches for jobs using the provided + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest SearchJobsRequest}. + # + # This API call is intended for the use case of targeting passive job + # seekers (for example, job seekers who have signed up to receive email + # alerts about potential job opportunities), and has different algorithmic + # adjustments that are targeted to passive job seekers. + # + # This call constrains the + # {::Google::Cloud::Talent::V4beta1::Job#visibility visibility} of jobs present in + # the database, and only returns jobs the caller has permission to search + # against. + # + # @overload search_jobs_for_alert(request, options = nil) + # Pass arguments to `search_jobs_for_alert` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::SearchJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload search_jobs_for_alert(parent: nil, search_mode: nil, request_metadata: nil, job_query: nil, enable_broadening: nil, require_precise_result_size: nil, histogram_queries: nil, job_view: nil, offset: nil, page_size: nil, page_token: nil, order_by: nil, diversification_level: nil, custom_ranking_info: nil, disable_keyword_match: nil, keyword_match_mode: nil, relevance_threshold: nil) + # Pass arguments to `search_jobs_for_alert` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the tenant to search within. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, + # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + # is created. For example, "projects/foo". + # @param search_mode [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::SearchMode] + # Mode of a search. + # + # Defaults to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::SearchMode::JOB_SEARCH SearchMode.JOB_SEARCH}. + # @param request_metadata [::Google::Cloud::Talent::V4beta1::RequestMetadata, ::Hash] + # Required. The meta information collected about the job searcher, used to + # improve the search quality of the service. The identifiers (such as + # `user_id`) are provided by users, and must be unique and consistent. + # @param job_query [::Google::Cloud::Talent::V4beta1::JobQuery, ::Hash] + # Query used to search against jobs, such as keyword, location filters, etc. + # @param enable_broadening [::Boolean] + # Controls whether to broaden the search when it produces sparse results. + # Broadened queries append results to the end of the matching results + # list. + # + # Defaults to false. + # @param require_precise_result_size [::Boolean] + # This field is deprecated. + # @param histogram_queries [::Array<::Google::Cloud::Talent::V4beta1::HistogramQuery, ::Hash>] + # An expression specifies a histogram request against matching jobs. + # + # Expression syntax is an aggregation function call with histogram facets and + # other options. + # + # Available aggregation function calls are: + # * `count(string_histogram_facet)`: Count the number of matching entities, + # for each distinct attribute value. + # * `count(numeric_histogram_facet, list of buckets)`: Count the number of + # matching entities within each bucket. + # + # A maximum of 200 histogram buckets are supported. + # + # Data types: + # + # * Histogram facet: facet names with format `[a-zA-Z][a-zA-Z0-9_]+`. + # * String: string like "any string with backslash escape for quote(\")." + # * Number: whole number and floating point number like 10, -1 and -0.01. + # * List: list of elements with comma(,) separator surrounded by square + # brackets, for example, [1, 2, 3] and ["one", "two", "three"]. + # + # Built-in constants: + # + # * MIN (minimum number similar to java Double.MIN_VALUE) + # * MAX (maximum number similar to java Double.MAX_VALUE) + # + # Built-in functions: + # + # * bucket(start, end[, label]): bucket built-in function creates a bucket + # with range of [start, end). Note that the end is exclusive, for example, + # bucket(1, MAX, "positive number") or bucket(1, 10). + # + # Job histogram facets: + # + # * company_display_name: histogram by + # {::Google::Cloud::Talent::V4beta1::Job#company_display_name Job.company_display_name}. + # * employment_type: histogram by + # {::Google::Cloud::Talent::V4beta1::Job#employment_types Job.employment_types}, + # for example, + # "FULL_TIME", "PART_TIME". + # * company_size (DEPRECATED): histogram by + # {::Google::Cloud::Talent::V4beta1::CompanySize CompanySize}, for example, + # "SMALL", "MEDIUM", "BIG". + # * publish_time_in_day: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} + # in days. + # Must specify list of numeric buckets in spec. + # * publish_time_in_month: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} + # in months. + # Must specify list of numeric buckets in spec. + # * publish_time_in_year: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} + # in years. + # Must specify list of numeric buckets in spec. + # * degree_types: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#degree_types Job.degree_types}, for + # example, + # "Bachelors", "Masters". + # * job_level: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#job_level Job.job_level}, for example, + # "Entry + # Level". + # * country: histogram by the country code of jobs, for example, "US", "FR". + # * admin1: histogram by the admin1 code of jobs, which is a global + # placeholder referring to the state, province, or the particular term a + # country uses to define the geographic structure below the country level, + # for example, "CA", "IL". + # * city: histogram by a combination of the "city name, admin1 code". For + # example, "Mountain View, CA", "New York, NY". + # * admin1_country: histogram by a combination of the "admin1 code, country", + # for example, "CA, US", "IL, US". + # * city_coordinate: histogram by the city center's GPS coordinates (latitude + # and longitude), for example, 37.4038522,-122.0987765. Since the + # coordinates of a city center can change, customers may need to refresh + # them periodically. + # * locale: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}, for + # example, "en-US", + # "fr-FR". + # * language: histogram by the language subtag of the + # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}, + # for example, "en", "fr". + # * category: histogram by the + # {::Google::Cloud::Talent::V4beta1::JobCategory JobCategory}, for example, + # "COMPUTER_AND_IT", "HEALTHCARE". + # * base_compensation_unit: histogram by the + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationUnit CompensationInfo.CompensationUnit} + # of base salary, for example, "WEEKLY", "MONTHLY". + # * base_compensation: histogram by the base salary. Must specify list of + # numeric buckets to group results by. + # * annualized_base_compensation: histogram by the base annualized salary. + # Must specify list of numeric buckets to group results by. + # * annualized_total_compensation: histogram by the total annualized salary. + # Must specify list of numeric buckets to group results by. + # * string_custom_attribute: histogram by string + # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes}. + # Values can be accessed via square bracket notations like + # string_custom_attribute["key1"]. + # * numeric_custom_attribute: histogram by numeric + # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes}. + # Values can be accessed via square bracket notations like + # numeric_custom_attribute["key1"]. Must specify list of numeric buckets to + # group results by. + # + # Example expressions: + # + # * `count(admin1)` + # * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000), + # bucket(100000, MAX)])` + # * `count(string_custom_attribute["some-string-custom-attribute"])` + # * `count(numeric_custom_attribute["some-numeric-custom-attribute"], + # [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])` + # @param job_view [::Google::Cloud::Talent::V4beta1::JobView] + # The desired job attributes returned for jobs in the search response. + # Defaults to + # {::Google::Cloud::Talent::V4beta1::JobView::JOB_VIEW_SMALL JobView.JOB_VIEW_SMALL} + # if no value is specified. + # @param offset [::Integer] + # An integer that specifies the current offset (that is, starting result + # location, amongst the jobs deemed by the API as relevant) in search + # results. This field is only considered if + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#page_token page_token} is + # unset. + # + # The maximum allowed value is 5000. Otherwise an error is thrown. + # + # For example, 0 means to return results starting from the first matching + # job, and 10 means to return from the 11th job. This can be used for + # pagination, (for example, pageSize = 10 and offset = 10 means to return + # from the second page). + # @param page_size [::Integer] + # A limit on the number of jobs returned in the search results. + # Increasing this value above the default value of 10 can increase search + # response time. The value can be between 1 and 100. + # @param page_token [::String] + # The token specifying the current offset within + # search results. See + # {::Google::Cloud::Talent::V4beta1::SearchJobsResponse#next_page_token SearchJobsResponse.next_page_token} + # for an explanation of how to obtain the next set of query results. + # @param order_by [::String] + # The criteria determining how search results are sorted. Default is + # `"relevance desc"`. + # + # Supported options are: + # + # * `"relevance desc"`: By relevance descending, as determined by the API + # algorithms. Relevance thresholding of query results is only available + # with this ordering. + # * `"posting_publish_time desc"`: By + # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} + # descending. + # * `"posting_update_time desc"`: By + # {::Google::Cloud::Talent::V4beta1::Job#posting_update_time Job.posting_update_time} + # descending. + # * `"title"`: By {::Google::Cloud::Talent::V4beta1::Job#title Job.title} + # ascending. + # * `"title desc"`: By {::Google::Cloud::Talent::V4beta1::Job#title Job.title} + # descending. + # * `"annualized_base_compensation"`: By job's + # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_base_compensation_range CompensationInfo.annualized_base_compensation_range} + # ascending. Jobs whose annualized base compensation is unspecified are put + # at the end of search results. + # * `"annualized_base_compensation desc"`: By job's + # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_base_compensation_range CompensationInfo.annualized_base_compensation_range} + # descending. Jobs whose annualized base compensation is unspecified are + # put at the end of search results. + # * `"annualized_total_compensation"`: By job's + # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_total_compensation_range CompensationInfo.annualized_total_compensation_range} + # ascending. Jobs whose annualized base compensation is unspecified are put + # at the end of search results. + # * `"annualized_total_compensation desc"`: By job's + # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_total_compensation_range CompensationInfo.annualized_total_compensation_range} + # descending. Jobs whose annualized base compensation is unspecified are + # put at the end of search results. + # * `"custom_ranking desc"`: By the relevance score adjusted to the + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#ranking_expression SearchJobsRequest.CustomRankingInfo.ranking_expression} + # with weight factor assigned by + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#importance_level SearchJobsRequest.CustomRankingInfo.importance_level} + # in descending order. + # * Location sorting: Use the special syntax to order jobs by distance:
+ # `"distance_from('Hawaii')"`: Order by distance from Hawaii.
+ # `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.
+ # `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by + # multiple locations. See details below.
+ # `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by + # multiple locations. See details below.
+ # The string can have a maximum of 256 characters. When multiple distance + # centers are provided, a job that is close to any of the distance centers + # would have a high rank. When a job has multiple locations, the job + # location closest to one of the distance centers will be used. Jobs that + # don't have locations will be ranked at the bottom. Distance is calculated + # with a precision of 11.3 meters (37.4 feet). Diversification strategy is + # still applied unless explicitly disabled in + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#diversification_level diversification_level}. + # @param diversification_level [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::DiversificationLevel] + # Controls whether highly similar jobs are returned next to each other in + # the search results. Jobs are identified as highly similar based on + # their titles, job categories, and locations. Highly similar results are + # clustered so that only one representative job of the cluster is + # displayed to the job seeker higher up in the results, with the other jobs + # being displayed lower down in the results. + # + # Defaults to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::DiversificationLevel::SIMPLE DiversificationLevel.SIMPLE} + # if no value is specified. + # @param custom_ranking_info [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo, ::Hash] + # Controls over how job documents get ranked on top of existing relevance + # score (determined by API algorithm). + # @param disable_keyword_match [::Boolean] + # This field is deprecated. Please use + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#keyword_match_mode SearchJobsRequest.keyword_match_mode} + # going forward. + # + # To migrate, disable_keyword_match set to false maps to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_ALL KeywordMatchMode.KEYWORD_MATCH_ALL}, + # and disable_keyword_match set to true maps to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_DISABLED KeywordMatchMode.KEYWORD_MATCH_DISABLED}. + # If + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#keyword_match_mode SearchJobsRequest.keyword_match_mode} + # is set, this field is ignored. + # + # Controls whether to disable exact keyword match on + # {::Google::Cloud::Talent::V4beta1::Job#title Job.title}, + # {::Google::Cloud::Talent::V4beta1::Job#description Job.description}, + # {::Google::Cloud::Talent::V4beta1::Job#company_display_name Job.company_display_name}, + # {::Google::Cloud::Talent::V4beta1::Job#addresses Job.addresses}, + # {::Google::Cloud::Talent::V4beta1::Job#qualifications Job.qualifications}. When + # disable keyword match is turned off, a keyword match returns jobs that do + # not match given category filters when there are matching keywords. For + # example, for the query "program manager," a result is returned even if the + # job posting has the title "software developer," which doesn't fall into + # "program manager" ontology, but does have "program manager" appearing in + # its description. + # + # For queries like "cloud" that don't contain title or + # location specific ontology, jobs with "cloud" keyword matches are returned + # regardless of this flag's value. + # + # Use + # {::Google::Cloud::Talent::V4beta1::Company#keyword_searchable_job_custom_attributes Company.keyword_searchable_job_custom_attributes} + # if company-specific globally matched custom field/attribute string values + # are needed. Enabling keyword match improves recall of subsequent search + # requests. + # + # Defaults to false. + # @param keyword_match_mode [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode] + # Controls what keyword match options to use. + # + # Defaults to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_ALL KeywordMatchMode.KEYWORD_MATCH_ALL} + # if no value is specified. + # @param relevance_threshold [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::RelevanceThreshold] + # Optional. The relevance threshold of the search results. + # + # Default to Google defined threshold, leveraging a balance of + # precision and recall to deliver both highly accurate results and + # comprehensive coverage of relevant information. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::SearchJobsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::SearchJobsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::SearchJobsRequest.new + # + # # Call the search_jobs_for_alert method. + # result = client.search_jobs_for_alert request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::SearchJobsResponse. + # p result + # + def search_jobs_for_alert request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::SearchJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.search_jobs_for_alert.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.search_jobs_for_alert.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_jobs_for_alert.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @job_service_stub.search_jobs_for_alert request, 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 JobService REST API. + # + # This class represents the configuration for JobService 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::Talent::V4beta1::JobService::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_job to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_job.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_job.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 = "jobs.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 JobService 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_job` + # @return [::Gapic::Config::Method] + # + attr_reader :create_job + ## + # RPC-specific configuration for `batch_create_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_create_jobs + ## + # RPC-specific configuration for `get_job` + # @return [::Gapic::Config::Method] + # + attr_reader :get_job + ## + # RPC-specific configuration for `update_job` + # @return [::Gapic::Config::Method] + # + attr_reader :update_job + ## + # RPC-specific configuration for `batch_update_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_update_jobs + ## + # RPC-specific configuration for `delete_job` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_job + ## + # RPC-specific configuration for `batch_delete_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_delete_jobs + ## + # RPC-specific configuration for `list_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_jobs + ## + # RPC-specific configuration for `search_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :search_jobs + ## + # RPC-specific configuration for `search_jobs_for_alert` + # @return [::Gapic::Config::Method] + # + attr_reader :search_jobs_for_alert + + # @private + def initialize parent_rpcs = nil + create_job_config = parent_rpcs.create_job if parent_rpcs.respond_to? :create_job + @create_job = ::Gapic::Config::Method.new create_job_config + batch_create_jobs_config = parent_rpcs.batch_create_jobs if parent_rpcs.respond_to? :batch_create_jobs + @batch_create_jobs = ::Gapic::Config::Method.new batch_create_jobs_config + get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job + @get_job = ::Gapic::Config::Method.new get_job_config + update_job_config = parent_rpcs.update_job if parent_rpcs.respond_to? :update_job + @update_job = ::Gapic::Config::Method.new update_job_config + batch_update_jobs_config = parent_rpcs.batch_update_jobs if parent_rpcs.respond_to? :batch_update_jobs + @batch_update_jobs = ::Gapic::Config::Method.new batch_update_jobs_config + delete_job_config = parent_rpcs.delete_job if parent_rpcs.respond_to? :delete_job + @delete_job = ::Gapic::Config::Method.new delete_job_config + batch_delete_jobs_config = parent_rpcs.batch_delete_jobs if parent_rpcs.respond_to? :batch_delete_jobs + @batch_delete_jobs = ::Gapic::Config::Method.new batch_delete_jobs_config + list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs + @list_jobs = ::Gapic::Config::Method.new list_jobs_config + search_jobs_config = parent_rpcs.search_jobs if parent_rpcs.respond_to? :search_jobs + @search_jobs = ::Gapic::Config::Method.new search_jobs_config + search_jobs_for_alert_config = parent_rpcs.search_jobs_for_alert if parent_rpcs.respond_to? :search_jobs_for_alert + @search_jobs_for_alert = ::Gapic::Config::Method.new search_jobs_for_alert_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest/operations.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest/operations.rb new file mode 100644 index 000000000000..c761a2506531 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_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 Talent + module V4beta1 + module JobService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the JobService 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 JobService 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::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "jobs.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}", + matches: [ + ["name", %r{^operations/?$}, 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: "/v4beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/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-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest/service_stub.rb new file mode 100644 index 000000000000..34c521a34b94 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest/service_stub.rb @@ -0,0 +1,774 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/talent/v4beta1/job_service_pb" + +module Google + module Cloud + module Talent + module V4beta1 + module JobService + module Rest + ## + # REST service stub for the JobService 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_job REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::CreateJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::Job] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::Job] + # A result object deserialized from the server's reply + def create_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_job", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Talent::V4beta1::Job.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the batch_create_jobs REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def batch_create_jobs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_create_jobs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "batch_create_jobs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_job REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::GetJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::Job] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::Job] + # A result object deserialized from the server's reply + def get_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_job", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Talent::V4beta1::Job.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_job REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::UpdateJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::Job] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::Job] + # A result object deserialized from the server's reply + def update_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_job", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Talent::V4beta1::Job.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the batch_update_jobs REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def batch_update_jobs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_update_jobs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "batch_update_jobs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_job REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::DeleteJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_job", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the batch_delete_jobs REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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 batch_delete_jobs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_delete_jobs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "batch_delete_jobs", + 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 list_jobs REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::ListJobsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::ListJobsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::ListJobsResponse] + # A result object deserialized from the server's reply + def list_jobs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_jobs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_jobs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Talent::V4beta1::ListJobsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the search_jobs REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::SearchJobsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::SearchJobsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::SearchJobsResponse] + # A result object deserialized from the server's reply + def search_jobs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_jobs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "search_jobs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Talent::V4beta1::SearchJobsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the search_jobs_for_alert REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::SearchJobsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::SearchJobsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::SearchJobsResponse] + # A result object deserialized from the server's reply + def search_jobs_for_alert request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_jobs_for_alert_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "search_jobs_for_alert", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Talent::V4beta1::SearchJobsResponse.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_job REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::CreateJobRequest] + # 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_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v4beta1/{parent}/jobs", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v4beta1/{parent}/jobs", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_create_jobs REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest] + # 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_create_jobs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v4beta1/{parent}/jobs:batchCreate", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v4beta1/{parent}/jobs:batchCreate", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_job REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::GetJobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v4beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/tenants/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v4beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_job REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::UpdateJobRequest] + # 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_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v4beta1/{job.name}", + body: "*", + matches: [ + ["job.name", %r{^projects/[^/]+/tenants/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v4beta1/{job.name}", + body: "*", + matches: [ + ["job.name", %r{^projects/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_update_jobs REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest] + # 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_update_jobs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v4beta1/{parent}/jobs:batchUpdate", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v4beta1/{parent}/jobs:batchUpdate", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_job REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::DeleteJobRequest] + # 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_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v4beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/tenants/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v4beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_delete_jobs REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest] + # 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_delete_jobs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v4beta1/{parent}/jobs:batchDelete", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v4beta1/{parent}/jobs:batchDelete", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_jobs REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::ListJobsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_jobs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v4beta1/{parent}/jobs", + matches: [ + ["parent", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v4beta1/{parent}/jobs", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_jobs REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::SearchJobsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_search_jobs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v4beta1/{parent}/jobs:search", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v4beta1/{parent}/jobs:search", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_jobs_for_alert REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::SearchJobsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_search_jobs_for_alert_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v4beta1/{parent}/jobs:searchForAlert", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v4beta1/{parent}/jobs:searchForAlert", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service_pb.rb new file mode 100644 index 000000000000..bcf55d37f5ad --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service_pb.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/talent/v4beta1/job_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/talent/v4beta1/common_pb' +require 'google/cloud/talent/v4beta1/filters_pb' +require 'google/cloud/talent/v4beta1/histogram_pb' +require 'google/cloud/talent/v4beta1/job_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n-google/cloud/talent/v4beta1/job_service.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/talent/v4beta1/common.proto\x1a)google/cloud/talent/v4beta1/filters.proto\x1a+google/cloud/talent/v4beta1/histogram.proto\x1a%google/cloud/talent/v4beta1/job.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"w\n\x10\x43reateJobRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17jobs.googleapis.com/Job\x12\x32\n\x03job\x18\x02 \x01(\x0b\x32 .google.cloud.talent.v4beta1.JobB\x03\xe0\x41\x02\">\n\rGetJobRequest\x12-\n\x04name\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\n\x17jobs.googleapis.com/Job\"w\n\x10UpdateJobRequest\x12\x32\n\x03job\x18\x01 \x01(\x0b\x32 .google.cloud.talent.v4beta1.JobB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"A\n\x10\x44\x65leteJobRequest\x12-\n\x04name\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\n\x17jobs.googleapis.com/Job\"^\n\x16\x42\x61tchDeleteJobsRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17jobs.googleapis.com/Job\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xb6\x01\n\x0fListJobsRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17jobs.googleapis.com/Job\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x36\n\x08job_view\x18\x05 \x01(\x0e\x32$.google.cloud.talent.v4beta1.JobView\"\x9c\x01\n\x10ListJobsResponse\x12.\n\x04jobs\x18\x01 \x03(\x0b\x32 .google.cloud.talent.v4beta1.Job\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12?\n\x08metadata\x18\x03 \x01(\x0b\x32-.google.cloud.talent.v4beta1.ResponseMetadata\"\x86\r\n\x11SearchJobsRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17jobs.googleapis.com/Job\x12N\n\x0bsearch_mode\x18\x02 \x01(\x0e\x32\x39.google.cloud.talent.v4beta1.SearchJobsRequest.SearchMode\x12K\n\x10request_metadata\x18\x03 \x01(\x0b\x32,.google.cloud.talent.v4beta1.RequestMetadataB\x03\xe0\x41\x02\x12\x38\n\tjob_query\x18\x04 \x01(\x0b\x32%.google.cloud.talent.v4beta1.JobQuery\x12\x19\n\x11\x65nable_broadening\x18\x05 \x01(\x08\x12\'\n\x1brequire_precise_result_size\x18\x06 \x01(\x08\x42\x02\x18\x01\x12\x46\n\x11histogram_queries\x18\x07 \x03(\x0b\x32+.google.cloud.talent.v4beta1.HistogramQuery\x12\x36\n\x08job_view\x18\x08 \x01(\x0e\x32$.google.cloud.talent.v4beta1.JobView\x12\x0e\n\x06offset\x18\t \x01(\x05\x12\x11\n\tpage_size\x18\n \x01(\x05\x12\x12\n\npage_token\x18\x0b \x01(\t\x12\x10\n\x08order_by\x18\x0c \x01(\t\x12\x62\n\x15\x64iversification_level\x18\r \x01(\x0e\x32\x43.google.cloud.talent.v4beta1.SearchJobsRequest.DiversificationLevel\x12]\n\x13\x63ustom_ranking_info\x18\x0e \x01(\x0b\x32@.google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo\x12\x1d\n\x15\x64isable_keyword_match\x18\x10 \x01(\x08\x12[\n\x12keyword_match_mode\x18\x12 \x01(\x0e\x32?.google.cloud.talent.v4beta1.SearchJobsRequest.KeywordMatchMode\x12\x63\n\x13relevance_threshold\x18\x13 \x01(\x0e\x32\x41.google.cloud.talent.v4beta1.SearchJobsRequest.RelevanceThresholdB\x03\xe0\x41\x01\x1a\x9a\x02\n\x11\x43ustomRankingInfo\x12o\n\x10importance_level\x18\x01 \x01(\x0e\x32P.google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo.ImportanceLevelB\x03\xe0\x41\x02\x12\x1f\n\x12ranking_expression\x18\x02 \x01(\tB\x03\xe0\x41\x02\"s\n\x0fImportanceLevel\x12 \n\x1cIMPORTANCE_LEVEL_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x07\n\x03LOW\x10\x02\x12\x08\n\x04MILD\x10\x03\x12\n\n\x06MEDIUM\x10\x04\x12\x08\n\x04HIGH\x10\x05\x12\x0b\n\x07\x45XTREME\x10\x06\"R\n\nSearchMode\x12\x1b\n\x17SEARCH_MODE_UNSPECIFIED\x10\x00\x12\x0e\n\nJOB_SEARCH\x10\x01\x12\x17\n\x13\x46\x45\x41TURED_JOB_SEARCH\x10\x02\"W\n\x14\x44iversificationLevel\x12%\n!DIVERSIFICATION_LEVEL_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\n\n\x06SIMPLE\x10\x02\"\x87\x01\n\x10KeywordMatchMode\x12\"\n\x1eKEYWORD_MATCH_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16KEYWORD_MATCH_DISABLED\x10\x01\x12\x15\n\x11KEYWORD_MATCH_ALL\x10\x02\x12\x1c\n\x18KEYWORD_MATCH_TITLE_ONLY\x10\x03\"d\n\x12RelevanceThreshold\x12#\n\x1fRELEVANCE_THRESHOLD_UNSPECIFIED\x10\x00\x12\n\n\x06LOWEST\x10\x01\x12\x07\n\x03LOW\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x08\n\x04HIGH\x10\x04\"\xd7\x06\n\x12SearchJobsResponse\x12R\n\rmatching_jobs\x18\x01 \x03(\x0b\x32;.google.cloud.talent.v4beta1.SearchJobsResponse.MatchingJob\x12R\n\x17histogram_query_results\x18\x02 \x03(\x0b\x32\x31.google.cloud.talent.v4beta1.HistogramQueryResult\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12?\n\x10location_filters\x18\x04 \x03(\x0b\x32%.google.cloud.talent.v4beta1.Location\x12\x1c\n\x14\x65stimated_total_size\x18\x05 \x01(\x05\x12\x12\n\ntotal_size\x18\x06 \x01(\x05\x12?\n\x08metadata\x18\x07 \x01(\x0b\x32-.google.cloud.talent.v4beta1.ResponseMetadata\x12\"\n\x1a\x62roadened_query_jobs_count\x18\x08 \x01(\x05\x12I\n\x10spell_correction\x18\t \x01(\x0b\x32/.google.cloud.talent.v4beta1.SpellingCorrection\x1a\xdc\x01\n\x0bMatchingJob\x12-\n\x03job\x18\x01 \x01(\x0b\x32 .google.cloud.talent.v4beta1.Job\x12\x13\n\x0bjob_summary\x18\x02 \x01(\t\x12\x19\n\x11job_title_snippet\x18\x03 \x01(\t\x12\x1b\n\x13search_text_snippet\x18\x04 \x01(\t\x12Q\n\x0c\x63ommute_info\x18\x05 \x01(\x0b\x32;.google.cloud.talent.v4beta1.SearchJobsResponse.CommuteInfo\x1a~\n\x0b\x43ommuteInfo\x12;\n\x0cjob_location\x18\x01 \x01(\x0b\x32%.google.cloud.talent.v4beta1.Location\x12\x32\n\x0ftravel_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"~\n\x16\x42\x61tchCreateJobsRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17jobs.googleapis.com/Job\x12\x33\n\x04jobs\x18\x02 \x03(\x0b\x32 .google.cloud.talent.v4beta1.JobB\x03\xe0\x41\x02\"\xaf\x01\n\x16\x42\x61tchUpdateJobsRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17jobs.googleapis.com/Job\x12\x33\n\x04jobs\x18\x02 \x03(\x0b\x32 .google.cloud.talent.v4beta1.JobB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xc4\x01\n\x12JobOperationResult\x12N\n\x0bjob_results\x18\x01 \x03(\x0b\x32\x39.google.cloud.talent.v4beta1.JobOperationResult.JobResult\x1a^\n\tJobResult\x12-\n\x03job\x18\x01 \x01(\x0b\x32 .google.cloud.talent.v4beta1.Job\x12\"\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status*v\n\x07JobView\x12\x18\n\x14JOB_VIEW_UNSPECIFIED\x10\x00\x12\x14\n\x10JOB_VIEW_ID_ONLY\x10\x01\x12\x14\n\x10JOB_VIEW_MINIMAL\x10\x02\x12\x12\n\x0eJOB_VIEW_SMALL\x10\x03\x12\x11\n\rJOB_VIEW_FULL\x10\x04\x32\xce\x12\n\nJobService\x12\xc9\x01\n\tCreateJob\x12-.google.cloud.talent.v4beta1.CreateJobRequest\x1a .google.cloud.talent.v4beta1.Job\"k\xda\x41\nparent,job\x82\xd3\xe4\x93\x02X\"+/v4beta1/{parent=projects/*/tenants/*}/jobs:\x01*Z&\"!/v4beta1/{parent=projects/*}/jobs:\x01*\x12\x9b\x02\n\x0f\x42\x61tchCreateJobs\x12\x33.google.cloud.talent.v4beta1.BatchCreateJobsRequest\x1a\x1d.google.longrunning.Operation\"\xb3\x01\xca\x41,\n\x12JobOperationResult\x12\x16\x42\x61tchOperationMetadata\xda\x41\x0bparent,jobs\x82\xd3\xe4\x93\x02p\"7/v4beta1/{parent=projects/*/tenants/*}/jobs:batchCreate:\x01*Z2\"-/v4beta1/{parent=projects/*}/jobs:batchCreate:\x01*\x12\xb7\x01\n\x06GetJob\x12*.google.cloud.talent.v4beta1.GetJobRequest\x1a .google.cloud.talent.v4beta1.Job\"_\xda\x41\x04name\x82\xd3\xe4\x93\x02R\x12+/v4beta1/{name=projects/*/tenants/*/jobs/*}Z#\x12!/v4beta1/{name=projects/*/jobs/*}\x12\xca\x01\n\tUpdateJob\x12-.google.cloud.talent.v4beta1.UpdateJobRequest\x1a .google.cloud.talent.v4beta1.Job\"l\xda\x41\x03job\x82\xd3\xe4\x93\x02`2//v4beta1/{job.name=projects/*/tenants/*/jobs/*}:\x01*Z*2%/v4beta1/{job.name=projects/*/jobs/*}:\x01*\x12\x9b\x02\n\x0f\x42\x61tchUpdateJobs\x12\x33.google.cloud.talent.v4beta1.BatchUpdateJobsRequest\x1a\x1d.google.longrunning.Operation\"\xb3\x01\xca\x41,\n\x12JobOperationResult\x12\x16\x42\x61tchOperationMetadata\xda\x41\x0bparent,jobs\x82\xd3\xe4\x93\x02p\"7/v4beta1/{parent=projects/*/tenants/*}/jobs:batchUpdate:\x01*Z2\"-/v4beta1/{parent=projects/*}/jobs:batchUpdate:\x01*\x12\xb3\x01\n\tDeleteJob\x12-.google.cloud.talent.v4beta1.DeleteJobRequest\x1a\x16.google.protobuf.Empty\"_\xda\x41\x04name\x82\xd3\xe4\x93\x02R*+/v4beta1/{name=projects/*/tenants/*/jobs/*}Z#*!/v4beta1/{name=projects/*/jobs/*}\x12\xe4\x01\n\x0f\x42\x61tchDeleteJobs\x12\x33.google.cloud.talent.v4beta1.BatchDeleteJobsRequest\x1a\x16.google.protobuf.Empty\"\x83\x01\xda\x41\rparent,filter\x82\xd3\xe4\x93\x02m\"7/v4beta1/{parent=projects/*/tenants/*}/jobs:batchDelete:\x01*Z/\"-/v4beta1/{parent=projects/*}/jobs:batchDelete\x12\xd1\x01\n\x08ListJobs\x12,.google.cloud.talent.v4beta1.ListJobsRequest\x1a-.google.cloud.talent.v4beta1.ListJobsResponse\"h\xda\x41\rparent,filter\x82\xd3\xe4\x93\x02R\x12+/v4beta1/{parent=projects/*/tenants/*}/jobsZ#\x12!/v4beta1/{parent=projects/*}/jobs\x12\xdb\x01\n\nSearchJobs\x12..google.cloud.talent.v4beta1.SearchJobsRequest\x1a/.google.cloud.talent.v4beta1.SearchJobsResponse\"l\x82\xd3\xe4\x93\x02\x66\"2/v4beta1/{parent=projects/*/tenants/*}/jobs:search:\x01*Z-\"(/v4beta1/{parent=projects/*}/jobs:search:\x01*\x12\xf3\x01\n\x12SearchJobsForAlert\x12..google.cloud.talent.v4beta1.SearchJobsRequest\x1a/.google.cloud.talent.v4beta1.SearchJobsResponse\"|\x82\xd3\xe4\x93\x02v\":/v4beta1/{parent=projects/*/tenants/*}/jobs:searchForAlert:\x01*Z5\"0/v4beta1/{parent=projects/*}/jobs:searchForAlert:\x01*\x1al\xca\x41\x13jobs.googleapis.com\xd2\x41Shttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobsBs\n\x1f\x63om.google.cloud.talent.v4beta1B\x0fJobServiceProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Talent + module V4beta1 + CreateJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CreateJobRequest").msgclass + GetJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.GetJobRequest").msgclass + UpdateJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.UpdateJobRequest").msgclass + DeleteJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.DeleteJobRequest").msgclass + BatchDeleteJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.BatchDeleteJobsRequest").msgclass + ListJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.ListJobsRequest").msgclass + ListJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.ListJobsResponse").msgclass + SearchJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.SearchJobsRequest").msgclass + SearchJobsRequest::CustomRankingInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo").msgclass + SearchJobsRequest::CustomRankingInfo::ImportanceLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo.ImportanceLevel").enummodule + SearchJobsRequest::SearchMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.SearchJobsRequest.SearchMode").enummodule + SearchJobsRequest::DiversificationLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.SearchJobsRequest.DiversificationLevel").enummodule + SearchJobsRequest::KeywordMatchMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.SearchJobsRequest.KeywordMatchMode").enummodule + SearchJobsRequest::RelevanceThreshold = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.SearchJobsRequest.RelevanceThreshold").enummodule + SearchJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.SearchJobsResponse").msgclass + SearchJobsResponse::MatchingJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.SearchJobsResponse.MatchingJob").msgclass + SearchJobsResponse::CommuteInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.SearchJobsResponse.CommuteInfo").msgclass + BatchCreateJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.BatchCreateJobsRequest").msgclass + BatchUpdateJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.BatchUpdateJobsRequest").msgclass + JobOperationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.JobOperationResult").msgclass + JobOperationResult::JobResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.JobOperationResult.JobResult").msgclass + JobView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.JobView").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service_services_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service_services_pb.rb new file mode 100644 index 000000000000..27cb94167602 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service_services_pb.rb @@ -0,0 +1,90 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/talent/v4beta1/job_service.proto for package 'google.cloud.talent.v4beta1' +# 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/talent/v4beta1/job_service_pb' + +module Google + module Cloud + module Talent + module V4beta1 + module JobService + # A service handles job management, including job CRUD, enumeration and search. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.talent.v4beta1.JobService' + + # Creates a new job. + # + # Typically, the job becomes searchable within 10 seconds, but it may take + # up to 5 minutes. + rpc :CreateJob, ::Google::Cloud::Talent::V4beta1::CreateJobRequest, ::Google::Cloud::Talent::V4beta1::Job + # Begins executing a batch create jobs operation. + rpc :BatchCreateJobs, ::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest, ::Google::Longrunning::Operation + # Retrieves the specified job, whose status is OPEN or recently EXPIRED + # within the last 90 days. + rpc :GetJob, ::Google::Cloud::Talent::V4beta1::GetJobRequest, ::Google::Cloud::Talent::V4beta1::Job + # Updates specified job. + # + # Typically, updated contents become visible in search results within 10 + # seconds, but it may take up to 5 minutes. + rpc :UpdateJob, ::Google::Cloud::Talent::V4beta1::UpdateJobRequest, ::Google::Cloud::Talent::V4beta1::Job + # Begins executing a batch update jobs operation. + rpc :BatchUpdateJobs, ::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest, ::Google::Longrunning::Operation + # Deletes the specified job. + # + # Typically, the job becomes unsearchable within 10 seconds, but it may take + # up to 5 minutes. + rpc :DeleteJob, ::Google::Cloud::Talent::V4beta1::DeleteJobRequest, ::Google::Protobuf::Empty + # Deletes a list of [Job][google.cloud.talent.v4beta1.Job]s by filter. + rpc :BatchDeleteJobs, ::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest, ::Google::Protobuf::Empty + # Lists jobs by filter. + rpc :ListJobs, ::Google::Cloud::Talent::V4beta1::ListJobsRequest, ::Google::Cloud::Talent::V4beta1::ListJobsResponse + # Searches for jobs using the provided + # [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest]. + # + # This call constrains the + # [visibility][google.cloud.talent.v4beta1.Job.visibility] of jobs present in + # the database, and only returns jobs that the caller has permission to + # search against. + rpc :SearchJobs, ::Google::Cloud::Talent::V4beta1::SearchJobsRequest, ::Google::Cloud::Talent::V4beta1::SearchJobsResponse + # Searches for jobs using the provided + # [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest]. + # + # This API call is intended for the use case of targeting passive job + # seekers (for example, job seekers who have signed up to receive email + # alerts about potential job opportunities), and has different algorithmic + # adjustments that are targeted to passive job seekers. + # + # This call constrains the + # [visibility][google.cloud.talent.v4beta1.Job.visibility] of jobs present in + # the database, and only returns jobs the caller has permission to search + # against. + rpc :SearchJobsForAlert, ::Google::Cloud::Talent::V4beta1::SearchJobsRequest, ::Google::Cloud::Talent::V4beta1::SearchJobsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/rest.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/rest.rb new file mode 100644 index 000000000000..c4ff5205d5b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/rest.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! + +require "google/cloud/talent/v4beta1/company_service/rest" +require "google/cloud/talent/v4beta1/completion/rest" +require "google/cloud/talent/v4beta1/event_service/rest" +require "google/cloud/talent/v4beta1/job_service/rest" +require "google/cloud/talent/v4beta1/tenant_service/rest" +require "google/cloud/talent/v4beta1/version" + +module Google + module Cloud + module Talent + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/talent/v4beta1/rest" + # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new + # + module V4beta1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_pb.rb new file mode 100644 index 000000000000..e31d7d239794 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/talent/v4beta1/tenant.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n(google/cloud/talent/v4beta1/tenant.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc3\x02\n\x06Tenant\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0b\x65xternal_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\nusage_type\x18\x03 \x01(\x0e\x32\x31.google.cloud.talent.v4beta1.Tenant.DataUsageType\x12\x34\n,keyword_searchable_profile_custom_attributes\x18\x04 \x03(\t\"N\n\rDataUsageType\x12\x1f\n\x1b\x44\x41TA_USAGE_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nAGGREGATED\x10\x01\x12\x0c\n\x08ISOLATED\x10\x02:D\xea\x41\x41\n\x1ajobs.googleapis.com/Tenant\x12#projects/{project}/tenants/{tenant}Bw\n\x1f\x63om.google.cloud.talent.v4beta1B\x13TenantResourceProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Talent + module V4beta1 + Tenant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Tenant").msgclass + Tenant::DataUsageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Tenant.DataUsageType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service.rb new file mode 100644 index 000000000000..5edb4c257b75 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service.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/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/talent/v4beta1/version" + +require "google/cloud/talent/v4beta1/tenant_service/credentials" +require "google/cloud/talent/v4beta1/tenant_service/paths" +require "google/cloud/talent/v4beta1/tenant_service/client" +require "google/cloud/talent/v4beta1/tenant_service/rest" + +module Google + module Cloud + module Talent + module V4beta1 + ## + # A service that handles tenant management, including CRUD and enumeration. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/talent/v4beta1/tenant_service" + # client = ::Google::Cloud::Talent::V4beta1::TenantService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/talent/v4beta1/tenant_service/rest" + # client = ::Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new + # + module TenantService + end + end + end + end +end + +helper_path = ::File.join __dir__, "tenant_service", "helpers.rb" +require "google/cloud/talent/v4beta1/tenant_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/client.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/client.rb new file mode 100644 index 000000000000..49716d04c024 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/client.rb @@ -0,0 +1,899 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/talent/v4beta1/tenant_service_pb" + +module Google + module Cloud + module Talent + module V4beta1 + module TenantService + ## + # Client for the TenantService service. + # + # A service that handles tenant management, including CRUD and enumeration. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :tenant_service_stub + + ## + # Configure the TenantService Client class. + # + # See {::Google::Cloud::Talent::V4beta1::TenantService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TenantService clients + # ::Google::Cloud::Talent::V4beta1::TenantService::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", "Talent", "V4beta1"] + 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_tenant.timeout = 30.0 + + default_config.rpcs.get_tenant.timeout = 30.0 + default_config.rpcs.get_tenant.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_tenant.timeout = 30.0 + + default_config.rpcs.delete_tenant.timeout = 30.0 + default_config.rpcs.delete_tenant.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_tenants.timeout = 30.0 + default_config.rpcs.list_tenants.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TenantService 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::Talent::V4beta1::TenantService::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 + @tenant_service_stub.universe_domain + end + + ## + # Create a new TenantService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Talent::V4beta1::TenantService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Talent::V4beta1::TenantService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TenantService 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/talent/v4beta1/tenant_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 + + @tenant_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Talent::V4beta1::TenantService::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 + ) + + @tenant_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 + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @tenant_service_stub.logger + end + + # Service calls + + ## + # Creates a new tenant entity. + # + # @overload create_tenant(request, options = nil) + # Pass arguments to `create_tenant` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::CreateTenantRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::CreateTenantRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_tenant(parent: nil, tenant: nil) + # Pass arguments to `create_tenant` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the project under which the tenant is created. + # + # The format is "projects/\\{project_id}", for example, + # "projects/foo". + # @param tenant [::Google::Cloud::Talent::V4beta1::Tenant, ::Hash] + # Required. The tenant to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Talent::V4beta1::Tenant] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Talent::V4beta1::Tenant] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::TenantService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::CreateTenantRequest.new + # + # # Call the create_tenant method. + # result = client.create_tenant request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::Tenant. + # p result + # + def create_tenant request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::CreateTenantRequest + + # Converts hash and nil to 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_tenant.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_tenant.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_tenant.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tenant_service_stub.call_rpc :create_tenant, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves specified tenant. + # + # @overload get_tenant(request, options = nil) + # Pass arguments to `get_tenant` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::GetTenantRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::GetTenantRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_tenant(name: nil) + # Pass arguments to `get_tenant` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the tenant to be retrieved. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, + # "projects/foo/tenants/bar". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Talent::V4beta1::Tenant] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Talent::V4beta1::Tenant] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::TenantService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::GetTenantRequest.new + # + # # Call the get_tenant method. + # result = client.get_tenant request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::Tenant. + # p result + # + def get_tenant request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::GetTenantRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_tenant.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_tenant.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_tenant.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tenant_service_stub.call_rpc :get_tenant, request, 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 specified tenant. + # + # @overload update_tenant(request, options = nil) + # Pass arguments to `update_tenant` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::UpdateTenantRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::UpdateTenantRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_tenant(tenant: nil, update_mask: nil) + # Pass arguments to `update_tenant` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param tenant [::Google::Cloud::Talent::V4beta1::Tenant, ::Hash] + # Required. The tenant resource to replace the current resource in the + # system. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Strongly recommended for the best service experience. + # + # If + # {::Google::Cloud::Talent::V4beta1::UpdateTenantRequest#update_mask update_mask} + # is provided, only the specified fields in + # {::Google::Cloud::Talent::V4beta1::UpdateTenantRequest#tenant tenant} are + # updated. Otherwise all the fields are updated. + # + # A field mask to specify the tenant fields to be updated. Only + # top level fields of {::Google::Cloud::Talent::V4beta1::Tenant Tenant} are + # supported. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Talent::V4beta1::Tenant] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Talent::V4beta1::Tenant] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::TenantService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::UpdateTenantRequest.new + # + # # Call the update_tenant method. + # result = client.update_tenant request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::Tenant. + # p result + # + def update_tenant request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::UpdateTenantRequest + + # Converts hash and nil to 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_tenant.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.tenant&.name + header_params["tenant.name"] = request.tenant.name + end + + request_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_tenant.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_tenant.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tenant_service_stub.call_rpc :update_tenant, request, 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 specified tenant. + # + # @overload delete_tenant(request, options = nil) + # Pass arguments to `delete_tenant` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::DeleteTenantRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::DeleteTenantRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_tenant(name: nil) + # Pass arguments to `delete_tenant` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the tenant to be deleted. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, + # "projects/foo/tenants/bar". + # + # @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/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::TenantService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::DeleteTenantRequest.new + # + # # Call the delete_tenant method. + # result = client.delete_tenant request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_tenant request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::DeleteTenantRequest + + # Converts hash and nil to 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_tenant.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_tenant.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_tenant.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tenant_service_stub.call_rpc :delete_tenant, request, 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 tenants associated with the project. + # + # @overload list_tenants(request, options = nil) + # Pass arguments to `list_tenants` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::ListTenantsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::ListTenantsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_tenants(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_tenants` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the project under which the tenant is created. + # + # The format is "projects/\\{project_id}", for example, + # "projects/foo". + # @param page_token [::String] + # The starting indicator from which to return results. + # @param page_size [::Integer] + # The maximum number of tenants to be returned, at most 100. + # Default is 100 if a non-positive number is provided. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Tenant>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Tenant>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::TenantService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::ListTenantsRequest.new + # + # # Call the list_tenants method. + # result = client.list_tenants request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Talent::V4beta1::Tenant. + # p item + # end + # + def list_tenants request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::ListTenantsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_tenants.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_tenants.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_tenants.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tenant_service_stub.call_rpc :list_tenants, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @tenant_service_stub, :list_tenants, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the TenantService API. + # + # This class represents the configuration for TenantService, + # 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::Talent::V4beta1::TenantService::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_tenant to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Talent::V4beta1::TenantService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_tenant.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Talent::V4beta1::TenantService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_tenant.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::Talent::V4beta1::TenantService::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 = "jobs.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 TenantService 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_tenant` + # @return [::Gapic::Config::Method] + # + attr_reader :create_tenant + ## + # RPC-specific configuration for `get_tenant` + # @return [::Gapic::Config::Method] + # + attr_reader :get_tenant + ## + # RPC-specific configuration for `update_tenant` + # @return [::Gapic::Config::Method] + # + attr_reader :update_tenant + ## + # RPC-specific configuration for `delete_tenant` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_tenant + ## + # RPC-specific configuration for `list_tenants` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tenants + + # @private + def initialize parent_rpcs = nil + create_tenant_config = parent_rpcs.create_tenant if parent_rpcs.respond_to? :create_tenant + @create_tenant = ::Gapic::Config::Method.new create_tenant_config + get_tenant_config = parent_rpcs.get_tenant if parent_rpcs.respond_to? :get_tenant + @get_tenant = ::Gapic::Config::Method.new get_tenant_config + update_tenant_config = parent_rpcs.update_tenant if parent_rpcs.respond_to? :update_tenant + @update_tenant = ::Gapic::Config::Method.new update_tenant_config + delete_tenant_config = parent_rpcs.delete_tenant if parent_rpcs.respond_to? :delete_tenant + @delete_tenant = ::Gapic::Config::Method.new delete_tenant_config + list_tenants_config = parent_rpcs.list_tenants if parent_rpcs.respond_to? :list_tenants + @list_tenants = ::Gapic::Config::Method.new list_tenants_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/credentials.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/credentials.rb new file mode 100644 index 000000000000..7d5457070044 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/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 Talent + module V4beta1 + module TenantService + # Credentials for the TenantService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/jobs" + ] + self.env_vars = [ + "TALENT_CREDENTIALS", + "TALENT_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "TALENT_CREDENTIALS_JSON", + "TALENT_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-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/paths.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/paths.rb new file mode 100644 index 000000000000..8e720c2b714d --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/paths.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 Talent + module V4beta1 + module TenantService + # Path helper methods for the TenantService API. + module Paths + ## + # 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 Tenant resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/tenants/{tenant}` + # + # @param project [String] + # @param tenant [String] + # + # @return [::String] + def tenant_path project:, tenant: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/tenants/#{tenant}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/rest.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/rest.rb new file mode 100644 index 000000000000..7171b337cbab --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/rest.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 "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/talent/v4beta1/version" + +require "google/cloud/talent/v4beta1/tenant_service/credentials" +require "google/cloud/talent/v4beta1/tenant_service/paths" +require "google/cloud/talent/v4beta1/tenant_service/rest/client" + +module Google + module Cloud + module Talent + module V4beta1 + ## + # A service that handles tenant management, including CRUD and enumeration. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/talent/v4beta1/tenant_service/rest" + # client = ::Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new + # + module TenantService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/talent/v4beta1/tenant_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/rest/client.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/rest/client.rb new file mode 100644 index 000000000000..be540584dba9 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/rest/client.rb @@ -0,0 +1,821 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/talent/v4beta1/tenant_service_pb" +require "google/cloud/talent/v4beta1/tenant_service/rest/service_stub" + +module Google + module Cloud + module Talent + module V4beta1 + module TenantService + module Rest + ## + # REST client for the TenantService service. + # + # A service that handles tenant management, including CRUD and enumeration. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :tenant_service_stub + + ## + # Configure the TenantService Client class. + # + # See {::Google::Cloud::Talent::V4beta1::TenantService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TenantService clients + # ::Google::Cloud::Talent::V4beta1::TenantService::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", "Talent", "V4beta1"] + 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_tenant.timeout = 30.0 + + default_config.rpcs.get_tenant.timeout = 30.0 + default_config.rpcs.get_tenant.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_tenant.timeout = 30.0 + + default_config.rpcs.delete_tenant.timeout = 30.0 + default_config.rpcs.delete_tenant.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_tenants.timeout = 30.0 + default_config.rpcs.list_tenants.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TenantService 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::Talent::V4beta1::TenantService::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 + @tenant_service_stub.universe_domain + end + + ## + # Create a new TenantService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TenantService 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 + + @tenant_service_stub = ::Google::Cloud::Talent::V4beta1::TenantService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @tenant_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 + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @tenant_service_stub.logger + end + + # Service calls + + ## + # Creates a new tenant entity. + # + # @overload create_tenant(request, options = nil) + # Pass arguments to `create_tenant` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::CreateTenantRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::CreateTenantRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_tenant(parent: nil, tenant: nil) + # Pass arguments to `create_tenant` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the project under which the tenant is created. + # + # The format is "projects/\\{project_id}", for example, + # "projects/foo". + # @param tenant [::Google::Cloud::Talent::V4beta1::Tenant, ::Hash] + # Required. The tenant to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::Tenant] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::Tenant] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::CreateTenantRequest.new + # + # # Call the create_tenant method. + # result = client.create_tenant request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::Tenant. + # p result + # + def create_tenant request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::CreateTenantRequest + + # Converts hash and nil to an 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_tenant.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_tenant.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_tenant.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tenant_service_stub.create_tenant request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves specified tenant. + # + # @overload get_tenant(request, options = nil) + # Pass arguments to `get_tenant` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::GetTenantRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::GetTenantRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_tenant(name: nil) + # Pass arguments to `get_tenant` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the tenant to be retrieved. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, + # "projects/foo/tenants/bar". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::Tenant] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::Tenant] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::GetTenantRequest.new + # + # # Call the get_tenant method. + # result = client.get_tenant request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::Tenant. + # p result + # + def get_tenant request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::GetTenantRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_tenant.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_tenant.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_tenant.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tenant_service_stub.get_tenant request, 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 specified tenant. + # + # @overload update_tenant(request, options = nil) + # Pass arguments to `update_tenant` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::UpdateTenantRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::UpdateTenantRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_tenant(tenant: nil, update_mask: nil) + # Pass arguments to `update_tenant` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param tenant [::Google::Cloud::Talent::V4beta1::Tenant, ::Hash] + # Required. The tenant resource to replace the current resource in the + # system. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Strongly recommended for the best service experience. + # + # If + # {::Google::Cloud::Talent::V4beta1::UpdateTenantRequest#update_mask update_mask} + # is provided, only the specified fields in + # {::Google::Cloud::Talent::V4beta1::UpdateTenantRequest#tenant tenant} are + # updated. Otherwise all the fields are updated. + # + # A field mask to specify the tenant fields to be updated. Only + # top level fields of {::Google::Cloud::Talent::V4beta1::Tenant Tenant} are + # supported. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::Tenant] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::Tenant] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::UpdateTenantRequest.new + # + # # Call the update_tenant method. + # result = client.update_tenant request + # + # # The returned object is of type Google::Cloud::Talent::V4beta1::Tenant. + # p result + # + def update_tenant request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::UpdateTenantRequest + + # Converts hash and nil to an 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_tenant.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_tenant.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_tenant.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tenant_service_stub.update_tenant request, 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 specified tenant. + # + # @overload delete_tenant(request, options = nil) + # Pass arguments to `delete_tenant` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::DeleteTenantRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::DeleteTenantRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_tenant(name: nil) + # Pass arguments to `delete_tenant` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the tenant to be deleted. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, + # "projects/foo/tenants/bar". + # @yield [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/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::DeleteTenantRequest.new + # + # # Call the delete_tenant method. + # result = client.delete_tenant request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_tenant request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::DeleteTenantRequest + + # Converts hash and nil to an 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_tenant.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_tenant.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_tenant.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tenant_service_stub.delete_tenant request, 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 tenants associated with the project. + # + # @overload list_tenants(request, options = nil) + # Pass arguments to `list_tenants` via a request object, either of type + # {::Google::Cloud::Talent::V4beta1::ListTenantsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Talent::V4beta1::ListTenantsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_tenants(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_tenants` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the project under which the tenant is created. + # + # The format is "projects/\\{project_id}", for example, + # "projects/foo". + # @param page_token [::String] + # The starting indicator from which to return results. + # @param page_size [::Integer] + # The maximum number of tenants to be returned, at most 100. + # Default is 100 if a non-positive number is provided. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Tenant>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Tenant>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/talent/v4beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Talent::V4beta1::ListTenantsRequest.new + # + # # Call the list_tenants method. + # result = client.list_tenants request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Talent::V4beta1::Tenant. + # p item + # end + # + def list_tenants request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::ListTenantsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_tenants.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_tenants.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_tenants.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tenant_service_stub.list_tenants request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @tenant_service_stub, :list_tenants, "tenants", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the TenantService REST API. + # + # This class represents the configuration for TenantService 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::Talent::V4beta1::TenantService::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_tenant to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_tenant.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_tenant.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 = "jobs.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 TenantService 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_tenant` + # @return [::Gapic::Config::Method] + # + attr_reader :create_tenant + ## + # RPC-specific configuration for `get_tenant` + # @return [::Gapic::Config::Method] + # + attr_reader :get_tenant + ## + # RPC-specific configuration for `update_tenant` + # @return [::Gapic::Config::Method] + # + attr_reader :update_tenant + ## + # RPC-specific configuration for `delete_tenant` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_tenant + ## + # RPC-specific configuration for `list_tenants` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tenants + + # @private + def initialize parent_rpcs = nil + create_tenant_config = parent_rpcs.create_tenant if parent_rpcs.respond_to? :create_tenant + @create_tenant = ::Gapic::Config::Method.new create_tenant_config + get_tenant_config = parent_rpcs.get_tenant if parent_rpcs.respond_to? :get_tenant + @get_tenant = ::Gapic::Config::Method.new get_tenant_config + update_tenant_config = parent_rpcs.update_tenant if parent_rpcs.respond_to? :update_tenant + @update_tenant = ::Gapic::Config::Method.new update_tenant_config + delete_tenant_config = parent_rpcs.delete_tenant if parent_rpcs.respond_to? :delete_tenant + @delete_tenant = ::Gapic::Config::Method.new delete_tenant_config + list_tenants_config = parent_rpcs.list_tenants if parent_rpcs.respond_to? :list_tenants + @list_tenants = ::Gapic::Config::Method.new list_tenants_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/rest/service_stub.rb new file mode 100644 index 000000000000..8c0daaca6a92 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/rest/service_stub.rb @@ -0,0 +1,388 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/talent/v4beta1/tenant_service_pb" + +module Google + module Cloud + module Talent + module V4beta1 + module TenantService + module Rest + ## + # REST service stub for the TenantService 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_tenant REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::CreateTenantRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::Tenant] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::Tenant] + # A result object deserialized from the server's reply + def create_tenant request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_tenant_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_tenant", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Talent::V4beta1::Tenant.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_tenant REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::GetTenantRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::Tenant] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::Tenant] + # A result object deserialized from the server's reply + def get_tenant request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_tenant_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_tenant", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Talent::V4beta1::Tenant.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_tenant REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::UpdateTenantRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::Tenant] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::Tenant] + # A result object deserialized from the server's reply + def update_tenant request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_tenant_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_tenant", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Talent::V4beta1::Tenant.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_tenant REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::DeleteTenantRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_tenant request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_tenant_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_tenant", + 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 list_tenants REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::ListTenantsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Talent::V4beta1::ListTenantsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Talent::V4beta1::ListTenantsResponse] + # A result object deserialized from the server's reply + def list_tenants request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_tenants_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_tenants", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Talent::V4beta1::ListTenantsResponse.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_tenant REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::CreateTenantRequest] + # 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_tenant_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v4beta1/{parent}/tenants", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_tenant REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::GetTenantRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_tenant_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v4beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_tenant REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::UpdateTenantRequest] + # 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_tenant_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v4beta1/{tenant.name}", + body: "*", + matches: [ + ["tenant.name", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_tenant REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::DeleteTenantRequest] + # 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_tenant_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v4beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_tenants REST call + # + # @param request_pb [::Google::Cloud::Talent::V4beta1::ListTenantsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_tenants_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v4beta1/{parent}/tenants", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service_pb.rb new file mode 100644 index 000000000000..93cd521880c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/talent/v4beta1/tenant_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/talent/v4beta1/common_pb' +require 'google/cloud/talent/v4beta1/tenant_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n0google/cloud/talent/v4beta1/tenant_service.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/talent/v4beta1/common.proto\x1a(google/cloud/talent/v4beta1/tenant.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x94\x01\n\x13\x43reateTenantRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x38\n\x06tenant\x18\x02 \x01(\x0b\x32#.google.cloud.talent.v4beta1.TenantB\x03\xe0\x41\x02\"D\n\x10GetTenantRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1ajobs.googleapis.com/Tenant\"\x80\x01\n\x13UpdateTenantRequest\x12\x38\n\x06tenant\x18\x01 \x01(\x0b\x32#.google.cloud.talent.v4beta1.TenantB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"G\n\x13\x44\x65leteTenantRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1ajobs.googleapis.com/Tenant\"\x80\x01\n\x12ListTenantsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\xa5\x01\n\x13ListTenantsResponse\x12\x34\n\x07tenants\x18\x01 \x03(\x0b\x32#.google.cloud.talent.v4beta1.Tenant\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12?\n\x08metadata\x18\x03 \x01(\x0b\x32-.google.cloud.talent.v4beta1.ResponseMetadata2\xa0\x07\n\rTenantService\x12\xa6\x01\n\x0c\x43reateTenant\x12\x30.google.cloud.talent.v4beta1.CreateTenantRequest\x1a#.google.cloud.talent.v4beta1.Tenant\"?\xda\x41\rparent,tenant\x82\xd3\xe4\x93\x02)\"$/v4beta1/{parent=projects/*}/tenants:\x01*\x12\x94\x01\n\tGetTenant\x12-.google.cloud.talent.v4beta1.GetTenantRequest\x1a#.google.cloud.talent.v4beta1.Tenant\"3\xda\x41\x04name\x82\xd3\xe4\x93\x02&\x12$/v4beta1/{name=projects/*/tenants/*}\x12\xa6\x01\n\x0cUpdateTenant\x12\x30.google.cloud.talent.v4beta1.UpdateTenantRequest\x1a#.google.cloud.talent.v4beta1.Tenant\"?\xda\x41\x06tenant\x82\xd3\xe4\x93\x02\x30\x32+/v4beta1/{tenant.name=projects/*/tenants/*}:\x01*\x12\x8d\x01\n\x0c\x44\x65leteTenant\x12\x30.google.cloud.talent.v4beta1.DeleteTenantRequest\x1a\x16.google.protobuf.Empty\"3\xda\x41\x04name\x82\xd3\xe4\x93\x02&*$/v4beta1/{name=projects/*/tenants/*}\x12\xa7\x01\n\x0bListTenants\x12/.google.cloud.talent.v4beta1.ListTenantsRequest\x1a\x30.google.cloud.talent.v4beta1.ListTenantsResponse\"5\xda\x41\x06parent\x82\xd3\xe4\x93\x02&\x12$/v4beta1/{parent=projects/*}/tenants\x1al\xca\x41\x13jobs.googleapis.com\xd2\x41Shttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobsBv\n\x1f\x63om.google.cloud.talent.v4beta1B\x12TenantServiceProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Talent + module V4beta1 + CreateTenantRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CreateTenantRequest").msgclass + GetTenantRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.GetTenantRequest").msgclass + UpdateTenantRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.UpdateTenantRequest").msgclass + DeleteTenantRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.DeleteTenantRequest").msgclass + ListTenantsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.ListTenantsRequest").msgclass + ListTenantsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.ListTenantsResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service_services_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service_services_pb.rb new file mode 100644 index 000000000000..39df63566326 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service_services_pb.rb @@ -0,0 +1,53 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/talent/v4beta1/tenant_service.proto for package 'google.cloud.talent.v4beta1' +# 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/talent/v4beta1/tenant_service_pb' + +module Google + module Cloud + module Talent + module V4beta1 + module TenantService + # A service that handles tenant management, including CRUD and enumeration. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.talent.v4beta1.TenantService' + + # Creates a new tenant entity. + rpc :CreateTenant, ::Google::Cloud::Talent::V4beta1::CreateTenantRequest, ::Google::Cloud::Talent::V4beta1::Tenant + # Retrieves specified tenant. + rpc :GetTenant, ::Google::Cloud::Talent::V4beta1::GetTenantRequest, ::Google::Cloud::Talent::V4beta1::Tenant + # Updates specified tenant. + rpc :UpdateTenant, ::Google::Cloud::Talent::V4beta1::UpdateTenantRequest, ::Google::Cloud::Talent::V4beta1::Tenant + # Deletes specified tenant. + rpc :DeleteTenant, ::Google::Cloud::Talent::V4beta1::DeleteTenantRequest, ::Google::Protobuf::Empty + # Lists all tenants associated with the project. + rpc :ListTenants, ::Google::Cloud::Talent::V4beta1::ListTenantsRequest, ::Google::Cloud::Talent::V4beta1::ListTenantsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/version.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/version.rb new file mode 100644 index 000000000000..aacd2f027ae5 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/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 Talent + module V4beta1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/README.md new file mode 100644 index 000000000000..287a6b375f8f --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Talent Solution V4beta1 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-talent-v4beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # 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. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + # + # Example: + # + # 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 + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # 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 + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # 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 + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/common.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/common.rb new file mode 100644 index 000000000000..cea1d3a59a72 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/common.rb @@ -0,0 +1,955 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Talent + module V4beta1 + # Message representing a period of time between two timestamps. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Begin of the period (inclusive). + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # End of the period (exclusive). + class TimestampRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A resource that represents a location with full geographic information. + # @!attribute [rw] location_type + # @return [::Google::Cloud::Talent::V4beta1::Location::LocationType] + # The type of a location, which corresponds to the address lines field of + # {::Google::Type::PostalAddress google.type.PostalAddress}. For example, + # "Downtown, Atlanta, GA, USA" has a type of + # {::Google::Cloud::Talent::V4beta1::Location::LocationType::NEIGHBORHOOD LocationType.NEIGHBORHOOD}, + # and "Kansas City, KS, USA" has a type of + # {::Google::Cloud::Talent::V4beta1::Location::LocationType::LOCALITY LocationType.LOCALITY}. + # @!attribute [rw] postal_address + # @return [::Google::Type::PostalAddress] + # Postal address of the location that includes human readable information, + # such as postal delivery and payments addresses. Given a postal address, + # a postal service can deliver items to a premises, P.O. Box, or other + # delivery location. + # @!attribute [rw] lat_lng + # @return [::Google::Type::LatLng] + # An object representing a latitude/longitude pair. + # @!attribute [rw] radius_miles + # @return [::Float] + # Radius in miles of the job location. This value is derived from the + # location bounding box in which a circle with the specified radius + # centered from {::Google::Type::LatLng google.type.LatLng} covers the area + # associated with the job location. For example, currently, "Mountain View, + # CA, USA" has a radius of 6.17 miles. + class Location + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An enum which represents the type of a location. + module LocationType + # Default value if the type isn't specified. + LOCATION_TYPE_UNSPECIFIED = 0 + + # A country level location. + COUNTRY = 1 + + # A state or equivalent level location. + ADMINISTRATIVE_AREA = 2 + + # A county or equivalent level location. + SUB_ADMINISTRATIVE_AREA = 3 + + # A city or equivalent level location. + LOCALITY = 4 + + # A postal code level location. + POSTAL_CODE = 5 + + # A sublocality is a subdivision of a locality, for example a city borough, + # ward, or arrondissement. Sublocalities are usually recognized by a local + # political authority. For example, Manhattan and Brooklyn are recognized + # as boroughs by the City of New York, and are therefore modeled as + # sublocalities. + SUB_LOCALITY = 6 + + # A district or equivalent level location. + SUB_LOCALITY_1 = 7 + + # A smaller district or equivalent level display. + SUB_LOCALITY_2 = 8 + + # A neighborhood level location. + NEIGHBORHOOD = 9 + + # A street address level location. + STREET_ADDRESS = 10 + end + end + + # Meta information related to the job searcher or entity + # conducting the job search. This information is used to improve the + # performance of the service. + # @!attribute [rw] domain + # @return [::String] + # Required if + # {::Google::Cloud::Talent::V4beta1::RequestMetadata#allow_missing_ids allow_missing_ids} + # is unset or `false`. + # + # The client-defined scope or source of the service call, which typically + # is the domain on + # which the service has been implemented and is currently being run. + # + # For example, if the service is being run by client Foo, Inc., on + # job board www.foo.com and career site www.bar.com, then this field is + # set to "foo.com" for use on the job board, and "bar.com" for use on the + # career site. + # + # Note that any improvements to the model for a particular tenant site rely + # on this field being set correctly to a unique domain. + # + # The maximum number of allowed characters is 255. + # @!attribute [rw] session_id + # @return [::String] + # Required if + # {::Google::Cloud::Talent::V4beta1::RequestMetadata#allow_missing_ids allow_missing_ids} + # is unset or `false`. + # + # A unique session identification string. A session is defined as the + # duration of an end user's interaction with the service over a certain + # period. + # Obfuscate this field for privacy concerns before + # providing it to the service. + # + # Note that any improvements to the model for a particular tenant site rely + # on this field being set correctly to a unique session ID. + # + # The maximum number of allowed characters is 255. + # @!attribute [rw] user_id + # @return [::String] + # Required if + # {::Google::Cloud::Talent::V4beta1::RequestMetadata#allow_missing_ids allow_missing_ids} + # is unset or `false`. + # + # A unique user identification string, as determined by the client. + # To have the strongest positive impact on search quality + # make sure the client-level is unique. + # Obfuscate this field for privacy concerns before + # providing it to the service. + # + # Note that any improvements to the model for a particular tenant site rely + # on this field being set correctly to a unique user ID. + # + # The maximum number of allowed characters is 255. + # @!attribute [rw] allow_missing_ids + # @return [::Boolean] + # Only set when any of + # {::Google::Cloud::Talent::V4beta1::RequestMetadata#domain domain}, + # {::Google::Cloud::Talent::V4beta1::RequestMetadata#session_id session_id} and + # {::Google::Cloud::Talent::V4beta1::RequestMetadata#user_id user_id} isn't + # available for some reason. It is highly recommended not to set this field + # and provide accurate + # {::Google::Cloud::Talent::V4beta1::RequestMetadata#domain domain}, + # {::Google::Cloud::Talent::V4beta1::RequestMetadata#session_id session_id} and + # {::Google::Cloud::Talent::V4beta1::RequestMetadata#user_id user_id} for the best + # service experience. + # @!attribute [rw] device_info + # @return [::Google::Cloud::Talent::V4beta1::DeviceInfo] + # The type of device used by the job seeker at the time of the call to the + # service. + class RequestMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Additional information returned to client, such as debugging information. + # @!attribute [rw] request_id + # @return [::String] + # A unique id associated with this call. + # This id is logged for tracking purposes. + class ResponseMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Device information collected from the job seeker, candidate, or + # other entity conducting the job search. Providing this information improves + # the quality of the search results across devices. + # @!attribute [rw] device_type + # @return [::Google::Cloud::Talent::V4beta1::DeviceInfo::DeviceType] + # Type of the device. + # @!attribute [rw] id + # @return [::String] + # A device-specific ID. The ID must be a unique identifier that + # distinguishes the device from other devices. + class DeviceInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An enumeration describing an API access portal and exposure mechanism. + module DeviceType + # The device type isn't specified. + DEVICE_TYPE_UNSPECIFIED = 0 + + # A desktop web browser, such as, Chrome, Firefox, Safari, or Internet + # Explorer) + WEB = 1 + + # A mobile device web browser, such as a phone or tablet with a Chrome + # browser. + MOBILE_WEB = 2 + + # An Android device native application. + ANDROID = 3 + + # An iOS device native application. + IOS = 4 + + # A bot, as opposed to a device operated by human beings, such as a web + # crawler. + BOT = 5 + + # Other devices types. + OTHER = 6 + end + end + + # Custom attribute values that are either filterable or non-filterable. + # @!attribute [rw] string_values + # @return [::Array<::String>] + # Exactly one of + # {::Google::Cloud::Talent::V4beta1::CustomAttribute#string_values string_values} + # or {::Google::Cloud::Talent::V4beta1::CustomAttribute#long_values long_values} + # must be specified. + # + # This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or + # `CASE_INSENSITIVE_MATCH`) search. + # For filterable `string_value`s, a maximum total number of 200 values + # is allowed, with each `string_value` has a byte size of no more than + # 500B. For unfilterable `string_values`, the maximum total byte size of + # unfilterable `string_values` is 50KB. + # + # Empty string isn't allowed. + # @!attribute [rw] long_values + # @return [::Array<::Integer>] + # Exactly one of + # {::Google::Cloud::Talent::V4beta1::CustomAttribute#string_values string_values} + # or {::Google::Cloud::Talent::V4beta1::CustomAttribute#long_values long_values} + # must be specified. + # + # This field is used to perform number range search. + # (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`. + # + # Currently at most 1 + # {::Google::Cloud::Talent::V4beta1::CustomAttribute#long_values long_values} is + # supported. + # @!attribute [rw] filterable + # @return [::Boolean] + # If the `filterable` flag is true, the custom field values may be used for + # custom attribute filters + # {::Google::Cloud::Talent::V4beta1::JobQuery#custom_attribute_filter JobQuery.custom_attribute_filter}. + # If false, these values may not be used for custom attribute filters. + # + # Default is false. + # @!attribute [rw] keyword_searchable + # @return [::Boolean] + # If the `keyword_searchable` flag is true, the keywords in custom fields are + # searchable by keyword match. + # If false, the values are not searchable by keyword match. + # + # Default is false. + class CustomAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Spell check result. + # @!attribute [rw] corrected + # @return [::Boolean] + # Indicates if the query was corrected by the spell checker. + # @!attribute [rw] corrected_text + # @return [::String] + # Correction output consisting of the corrected keyword string. + # @!attribute [rw] corrected_html + # @return [::String] + # Corrected output with html tags to highlight the corrected words. + # Corrected words are called out with the "..." html tags. + # + # For example, the user input query is "software enginear", where the second + # word, "enginear," is incorrect. It should be "engineer". When spelling + # correction is enabled, this value is + # "software engineer". + class SpellingCorrection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Job compensation details. + # @!attribute [rw] entries + # @return [::Array<::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry>] + # Job compensation information. + # + # At most one entry can be of type + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationType::BASE CompensationInfo.CompensationType.BASE}, + # which is referred as **base compensation entry** for the job. + # @!attribute [r] annualized_base_compensation_range + # @return [::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationRange] + # Output only. Annualized base compensation range. Computed as base + # compensation entry's + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#amount CompensationEntry.amount} + # times + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#expected_units_per_year CompensationEntry.expected_units_per_year}. + # + # See + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry CompensationEntry} + # for explanation on compensation annualization. + # @!attribute [r] annualized_total_compensation_range + # @return [::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationRange] + # Output only. Annualized total compensation range. Computed as all + # compensation entries' + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#amount CompensationEntry.amount} + # times + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#expected_units_per_year CompensationEntry.expected_units_per_year}. + # + # See + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry CompensationEntry} + # for explanation on compensation annualization. + class CompensationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A compensation entry that represents one component of compensation, such + # as base pay, bonus, or other compensation type. + # + # Annualization: One compensation entry can be annualized if + # - it contains valid + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#amount amount} + # or + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#range range}. + # - and its + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#expected_units_per_year expected_units_per_year} + # is set or can be derived. Its annualized range is determined as + # ({::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#amount amount} + # or + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#range range}) + # times + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#expected_units_per_year expected_units_per_year}. + # @!attribute [rw] type + # @return [::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationType] + # Compensation type. + # + # Default is + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationType::COMPENSATION_TYPE_UNSPECIFIED CompensationType.COMPENSATION_TYPE_UNSPECIFIED}. + # @!attribute [rw] unit + # @return [::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationUnit] + # Frequency of the specified amount. + # + # Default is + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationUnit::COMPENSATION_UNIT_UNSPECIFIED CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED}. + # @!attribute [rw] amount + # @return [::Google::Type::Money] + # Compensation amount. + # + # Note: The following fields are mutually exclusive: `amount`, `range`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] range + # @return [::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationRange] + # Compensation range. + # + # Note: The following fields are mutually exclusive: `range`, `amount`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] description + # @return [::String] + # Compensation description. For example, could + # indicate equity terms or provide additional context to an estimated + # bonus. + # @!attribute [rw] expected_units_per_year + # @return [::Google::Protobuf::DoubleValue] + # Expected number of units paid each year. If not specified, when + # {::Google::Cloud::Talent::V4beta1::Job#employment_types Job.employment_types} + # is FULLTIME, a default value is inferred based on + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#unit unit}. + # Default values: + # - HOURLY: 2080 + # - DAILY: 260 + # - WEEKLY: 52 + # - MONTHLY: 12 + # - ANNUAL: 1 + class CompensationEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Compensation range. + # @!attribute [rw] max_compensation + # @return [::Google::Type::Money] + # The maximum amount of compensation. If left empty, the value is set + # to a maximal compensation value and the currency code is set to + # match the {::Google::Type::Money#currency_code currency code} of + # min_compensation. + # @!attribute [rw] min_compensation + # @return [::Google::Type::Money] + # The minimum amount of compensation. If left empty, the value is set + # to zero and the currency code is set to match the + # {::Google::Type::Money#currency_code currency code} of max_compensation. + class CompensationRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of compensation. + # + # For compensation amounts specified in non-monetary amounts, + # describe the compensation scheme in the + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#description CompensationEntry.description}. + # + # For example, tipping format is described in + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#description CompensationEntry.description} + # (for example, "expect 15-20% tips based on customer bill.") and an estimate + # of the tips provided in + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#amount CompensationEntry.amount} + # or + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#range CompensationEntry.range} + # ($10 per hour). + # + # For example, equity is described in + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#description CompensationEntry.description} + # (for example, "1% - 2% equity vesting over 4 years, 1 year cliff") and + # value estimated in + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#amount CompensationEntry.amount} + # or + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#range CompensationEntry.range}. + # If no value estimate is possible, units are + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationUnit::COMPENSATION_UNIT_UNSPECIFIED CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED} + # and then further clarified in + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#description CompensationEntry.description} + # field. + module CompensationType + # Default value. + COMPENSATION_TYPE_UNSPECIFIED = 0 + + # Base compensation: Refers to the fixed amount of money paid to an + # employee by an employer in return for work performed. Base compensation + # does not include benefits, bonuses or any other potential compensation + # from an employer. + BASE = 1 + + # Bonus. + BONUS = 2 + + # Signing bonus. + SIGNING_BONUS = 3 + + # Equity. + EQUITY = 4 + + # Profit sharing. + PROFIT_SHARING = 5 + + # Commission. + COMMISSIONS = 6 + + # Tips. + TIPS = 7 + + # Other compensation type. + OTHER_COMPENSATION_TYPE = 8 + end + + # Pay frequency. + module CompensationUnit + # Default value. + COMPENSATION_UNIT_UNSPECIFIED = 0 + + # Hourly. + HOURLY = 1 + + # Daily. + DAILY = 2 + + # Weekly + WEEKLY = 3 + + # Monthly. + MONTHLY = 4 + + # Yearly. + YEARLY = 5 + + # One time. + ONE_TIME = 6 + + # Other compensation units. + OTHER_COMPENSATION_UNIT = 7 + end + end + + # Metadata used for long running operations returned by CTS batch APIs. + # It's used to replace + # {::Google::Longrunning::Operation#metadata google.longrunning.Operation.metadata}. + # @!attribute [rw] state + # @return [::Google::Cloud::Talent::V4beta1::BatchOperationMetadata::State] + # The state of a long running operation. + # @!attribute [rw] state_description + # @return [::String] + # More detailed information about operation state. + # @!attribute [rw] success_count + # @return [::Integer] + # Count of successful item(s) inside an operation. + # @!attribute [rw] failure_count + # @return [::Integer] + # Count of failed item(s) inside an operation. + # @!attribute [rw] total_count + # @return [::Integer] + # Count of total item(s) inside an operation. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time when the batch operation is created. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time when the batch operation status is updated. The metadata and the + # {::Google::Cloud::Talent::V4beta1::BatchOperationMetadata#update_time update_time} + # is refreshed every minute otherwise cached data is returned. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time when the batch operation is finished and + # {::Google::Longrunning::Operation#done google.longrunning.Operation.done} is + # set to `true`. + class BatchOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + module State + # Default value. + STATE_UNSPECIFIED = 0 + + # The batch operation is being prepared for processing. + INITIALIZING = 1 + + # The batch operation is actively being processed. + PROCESSING = 2 + + # The batch operation is processed, and at least one item has been + # successfully processed. + SUCCEEDED = 3 + + # The batch operation is done and no item has been successfully processed. + FAILED = 4 + + # The batch operation is in the process of cancelling after + # google.longrunning.Operations.CancelOperation + # is called. + CANCELLING = 5 + + # The batch operation is done after + # google.longrunning.Operations.CancelOperation + # is called. Any items processed before cancelling are returned in the + # response. + CANCELLED = 6 + end + end + + # An enum that represents the size of the company. + module CompanySize + # Default value if the size isn't specified. + COMPANY_SIZE_UNSPECIFIED = 0 + + # The company has less than 50 employees. + MINI = 1 + + # The company has between 50 and 99 employees. + SMALL = 2 + + # The company has between 100 and 499 employees. + SMEDIUM = 3 + + # The company has between 500 and 999 employees. + MEDIUM = 4 + + # The company has between 1,000 and 4,999 employees. + BIG = 5 + + # The company has between 5,000 and 9,999 employees. + BIGGER = 6 + + # The company has 10,000 or more employees. + GIANT = 7 + end + + # An enum that represents employee benefits included with the job. + module JobBenefit + # Default value if the type isn't specified. + JOB_BENEFIT_UNSPECIFIED = 0 + + # The job includes access to programs that support child care, such + # as daycare. + CHILD_CARE = 1 + + # The job includes dental services covered by a dental + # insurance plan. + DENTAL = 2 + + # The job offers specific benefits to domestic partners. + DOMESTIC_PARTNER = 3 + + # The job allows for a flexible work schedule. + FLEXIBLE_HOURS = 4 + + # The job includes health services covered by a medical insurance plan. + MEDICAL = 5 + + # The job includes a life insurance plan provided by the employer or + # available for purchase by the employee. + LIFE_INSURANCE = 6 + + # The job allows for a leave of absence to a parent to care for a newborn + # child. + PARENTAL_LEAVE = 7 + + # The job includes a workplace retirement plan provided by the + # employer or available for purchase by the employee. + RETIREMENT_PLAN = 8 + + # The job allows for paid time off due to illness. + SICK_DAYS = 9 + + # The job includes paid time off for vacation. + VACATION = 10 + + # The job includes vision services covered by a vision + # insurance plan. + VISION = 11 + end + + # Educational degree level defined in International Standard Classification + # of Education (ISCED). + module DegreeType + # Default value. Represents no degree, or early childhood education. + # Maps to ISCED code 0. + # Ex) Kindergarten + DEGREE_TYPE_UNSPECIFIED = 0 + + # Primary education which is typically the first stage of compulsory + # education. ISCED code 1. + # Ex) Elementary school + PRIMARY_EDUCATION = 1 + + # Lower secondary education; First stage of secondary education building on + # primary education, typically with a more subject-oriented curriculum. + # ISCED code 2. + # Ex) Middle school + LOWER_SECONDARY_EDUCATION = 2 + + # Middle education; Second/final stage of secondary education preparing for + # tertiary education and/or providing skills relevant to employment. + # Usually with an increased range of subject options and streams. ISCED + # code 3. + # Ex) High school + UPPER_SECONDARY_EDUCATION = 3 + + # Adult Remedial Education; Programmes providing learning experiences that + # build on secondary education and prepare for labour market entry and/or + # tertiary education. The content is broader than secondary but not as + # complex as tertiary education. ISCED code 4. + ADULT_REMEDIAL_EDUCATION = 4 + + # Associate's or equivalent; Short first tertiary programmes that are + # typically practically-based, occupationally-specific and prepare for + # labour market entry. These programmes may also provide a pathway to other + # tertiary programmes. ISCED code 5. + ASSOCIATES_OR_EQUIVALENT = 5 + + # Bachelor's or equivalent; Programmes designed to provide intermediate + # academic and/or professional knowledge, skills and competencies leading + # to a first tertiary degree or equivalent qualification. ISCED code 6. + BACHELORS_OR_EQUIVALENT = 6 + + # Master's or equivalent; Programmes designed to provide advanced academic + # and/or professional knowledge, skills and competencies leading to a + # second tertiary degree or equivalent qualification. ISCED code 7. + MASTERS_OR_EQUIVALENT = 7 + + # Doctoral or equivalent; Programmes designed primarily to lead to an + # advanced research qualification, usually concluding with the submission + # and defense of a substantive dissertation of publishable quality based on + # original research. ISCED code 8. + DOCTORAL_OR_EQUIVALENT = 8 + end + + # An enum that represents the employment type of a job. + module EmploymentType + # The default value if the employment type isn't specified. + EMPLOYMENT_TYPE_UNSPECIFIED = 0 + + # The job requires working a number of hours that constitute full + # time employment, typically 40 or more hours per week. + FULL_TIME = 1 + + # The job entails working fewer hours than a full time job, + # typically less than 40 hours a week. + PART_TIME = 2 + + # The job is offered as a contracted, as opposed to a salaried employee, + # position. + CONTRACTOR = 3 + + # The job is offered as a contracted position with the understanding + # that it's converted into a full-time position at the end of the + # contract. Jobs of this type are also returned by a search for + # {::Google::Cloud::Talent::V4beta1::EmploymentType::CONTRACTOR EmploymentType.CONTRACTOR} + # jobs. + CONTRACT_TO_HIRE = 4 + + # The job is offered as a temporary employment opportunity, usually + # a short-term engagement. + TEMPORARY = 5 + + # The job is a fixed-term opportunity for students or entry-level job + # seekers to obtain on-the-job training, typically offered as a summer + # position. + INTERN = 6 + + # The is an opportunity for an individual to volunteer, where there's no + # expectation of compensation for the provided services. + VOLUNTEER = 7 + + # The job requires an employee to work on an as-needed basis with a + # flexible schedule. + PER_DIEM = 8 + + # The job involves employing people in remote areas and flying them + # temporarily to the work site instead of relocating employees and their + # families permanently. + FLY_IN_FLY_OUT = 9 + + # The job does not fit any of the other listed types. + OTHER_EMPLOYMENT_TYPE = 10 + end + + # An enum that represents the required experience level required for the job. + module JobLevel + # The default value if the level isn't specified. + JOB_LEVEL_UNSPECIFIED = 0 + + # Entry-level individual contributors, typically with less than 2 years of + # experience in a similar role. Includes interns. + ENTRY_LEVEL = 1 + + # Experienced individual contributors, typically with 2+ years of + # experience in a similar role. + EXPERIENCED = 2 + + # Entry- to mid-level managers responsible for managing a team of people. + MANAGER = 3 + + # Senior-level managers responsible for managing teams of managers. + DIRECTOR = 4 + + # Executive-level managers and above, including C-level positions. + EXECUTIVE = 5 + end + + # An enum that represents the categorization or primary focus of specific + # role. This value is different than the "industry" associated with a role, + # which is related to the categorization of the company listing the job. + module JobCategory + # The default value if the category isn't specified. + JOB_CATEGORY_UNSPECIFIED = 0 + + # An accounting and finance job, such as an Accountant. + ACCOUNTING_AND_FINANCE = 1 + + # An administrative and office job, such as an Administrative Assistant. + ADMINISTRATIVE_AND_OFFICE = 2 + + # An advertising and marketing job, such as Marketing Manager. + ADVERTISING_AND_MARKETING = 3 + + # An animal care job, such as Veterinarian. + ANIMAL_CARE = 4 + + # An art, fashion, or design job, such as Designer. + ART_FASHION_AND_DESIGN = 5 + + # A business operations job, such as Business Operations Manager. + BUSINESS_OPERATIONS = 6 + + # A cleaning and facilities job, such as Custodial Staff. + CLEANING_AND_FACILITIES = 7 + + # A computer and IT job, such as Systems Administrator. + COMPUTER_AND_IT = 8 + + # A construction job, such as General Laborer. + CONSTRUCTION = 9 + + # A customer service job, such s Cashier. + CUSTOMER_SERVICE = 10 + + # An education job, such as School Teacher. + EDUCATION = 11 + + # An entertainment and travel job, such as Flight Attendant. + ENTERTAINMENT_AND_TRAVEL = 12 + + # A farming or outdoor job, such as Park Ranger. + FARMING_AND_OUTDOORS = 13 + + # A healthcare job, such as Registered Nurse. + HEALTHCARE = 14 + + # A human resources job, such as Human Resources Director. + HUMAN_RESOURCES = 15 + + # An installation, maintenance, or repair job, such as Electrician. + INSTALLATION_MAINTENANCE_AND_REPAIR = 16 + + # A legal job, such as Law Clerk. + LEGAL = 17 + + # A management job, often used in conjunction with another category, + # such as Store Manager. + MANAGEMENT = 18 + + # A manufacturing or warehouse job, such as Assembly Technician. + MANUFACTURING_AND_WAREHOUSE = 19 + + # A media, communications, or writing job, such as Media Relations. + MEDIA_COMMUNICATIONS_AND_WRITING = 20 + + # An oil, gas or mining job, such as Offshore Driller. + OIL_GAS_AND_MINING = 21 + + # A personal care and services job, such as Hair Stylist. + PERSONAL_CARE_AND_SERVICES = 22 + + # A protective services job, such as Security Guard. + PROTECTIVE_SERVICES = 23 + + # A real estate job, such as Buyer's Agent. + REAL_ESTATE = 24 + + # A restaurant and hospitality job, such as Restaurant Server. + RESTAURANT_AND_HOSPITALITY = 25 + + # A sales and/or retail job, such Sales Associate. + SALES_AND_RETAIL = 26 + + # A science and engineering job, such as Lab Technician. + SCIENCE_AND_ENGINEERING = 27 + + # A social services or non-profit job, such as Case Worker. + SOCIAL_SERVICES_AND_NON_PROFIT = 28 + + # A sports, fitness, or recreation job, such as Personal Trainer. + SPORTS_FITNESS_AND_RECREATION = 29 + + # A transportation or logistics job, such as Truck Driver. + TRANSPORTATION_AND_LOGISTICS = 30 + end + + # An enum that represents the job posting region. In most cases, job postings + # don't need to specify a region. If a region is given, jobs are + # eligible for searches in the specified region. + module PostingRegion + # If the region is unspecified, the job is only returned if it + # matches the {::Google::Cloud::Talent::V4beta1::LocationFilter LocationFilter}. + POSTING_REGION_UNSPECIFIED = 0 + + # In addition to exact location matching, job posting is returned when the + # {::Google::Cloud::Talent::V4beta1::LocationFilter LocationFilter} in the search + # query is in the same administrative area as the returned job posting. For + # example, if a `ADMINISTRATIVE_AREA` job is posted in "CA, USA", it's + # returned if {::Google::Cloud::Talent::V4beta1::LocationFilter LocationFilter} + # has "Mountain View". + # + # Administrative area refers to top-level administrative subdivision of this + # country. For example, US state, IT region, UK constituent nation and + # JP prefecture. + ADMINISTRATIVE_AREA = 1 + + # In addition to exact location matching, job is returned when + # {::Google::Cloud::Talent::V4beta1::LocationFilter LocationFilter} in search + # query is in the same country as this job. For example, if a `NATION_WIDE` + # job is posted in "USA", it's returned if + # {::Google::Cloud::Talent::V4beta1::LocationFilter LocationFilter} has 'Mountain + # View'. + NATION = 2 + + # Job allows employees to work remotely (telecommute). + # If locations are provided with this value, the job is + # considered as having a location, but telecommuting is allowed. + TELECOMMUTE = 3 + end + + # Deprecated. All resources are only visible to the owner. + # + # An enum that represents who has view access to the resource. + # @deprecated This enum is deprecated and may be removed in the next major version update. + module Visibility + # Default value. + VISIBILITY_UNSPECIFIED = 0 + + # The resource is only visible to the GCP account who owns it. + ACCOUNT_ONLY = 1 + + # The resource is visible to the owner and may be visible to other + # applications and processes at Google. + SHARED_WITH_GOOGLE = 2 + + # The resource is visible to the owner and may be visible to all other API + # clients. + SHARED_WITH_PUBLIC = 3 + end + + # Option for HTML content sanitization on user input fields, for example, job + # description. By setting this option, user can determine whether and how + # sanitization is performed on these fields. + module HtmlSanitization + # Default value. + HTML_SANITIZATION_UNSPECIFIED = 0 + + # Disables sanitization on HTML input. + HTML_SANITIZATION_DISABLED = 1 + + # Sanitizes HTML input, only accepts bold, italic, ordered list, and + # unordered list markup tags. + SIMPLE_FORMATTING_ONLY = 2 + end + + # Method for commute. + module CommuteMethod + # Commute method isn't specified. + COMMUTE_METHOD_UNSPECIFIED = 0 + + # Commute time is calculated based on driving time. + DRIVING = 1 + + # Commute time is calculated based on public transit including bus, metro, + # subway, and so on. + TRANSIT = 2 + + # Commute time is calculated based on walking time. + WALKING = 3 + + # Commute time is calculated based on biking time. + CYCLING = 4 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/company.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/company.rb new file mode 100644 index 000000000000..d6890a73d259 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/company.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 Talent + module V4beta1 + # A Company resource represents a company in the service. A company is the + # entity that owns job postings, that is, the hiring entity responsible for + # employing applicants for the job position. + # @!attribute [rw] name + # @return [::String] + # Required during company update. + # + # The resource name for a company. This is generated by the service when a + # company is created. + # + # The format is + # "projects/\\{project_id}/tenants/\\{tenant_id}/companies/\\{company_id}", for + # example, "projects/foo/tenants/bar/companies/baz". + # + # If tenant id is unspecified, the default tenant is used. For + # example, "projects/foo/companies/bar". + # @!attribute [rw] display_name + # @return [::String] + # Required. The display name of the company, for example, "Google LLC". + # @!attribute [rw] external_id + # @return [::String] + # Required. Client side company identifier, used to uniquely identify the + # company. + # + # The maximum number of allowed characters is 255. + # @!attribute [rw] size + # @return [::Google::Cloud::Talent::V4beta1::CompanySize] + # The employer's company size. + # @!attribute [rw] headquarters_address + # @return [::String] + # The street address of the company's main headquarters, which may be + # different from the job location. The service attempts + # to geolocate the provided address, and populates a more specific + # location wherever possible in + # {::Google::Cloud::Talent::V4beta1::Company::DerivedInfo#headquarters_location DerivedInfo.headquarters_location}. + # @!attribute [rw] hiring_agency + # @return [::Boolean] + # Set to true if it is the hiring agency that post jobs for other + # employers. + # + # Defaults to false if not provided. + # @!attribute [rw] eeo_text + # @return [::String] + # Equal Employment Opportunity legal disclaimer text to be + # associated with all jobs, and typically to be displayed in all + # roles. + # + # The maximum number of allowed characters is 500. + # @!attribute [rw] website_uri + # @return [::String] + # The URI representing the company's primary web site or home page, + # for example, "https://www.google.com". + # + # The maximum number of allowed characters is 255. + # @!attribute [rw] career_site_uri + # @return [::String] + # The URI to employer's career site or careers page on the employer's web + # site, for example, "https://careers.google.com". + # @!attribute [rw] image_uri + # @return [::String] + # A URI that hosts the employer's company logo. + # @!attribute [rw] keyword_searchable_job_custom_attributes + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Array<::String>] + # This field is deprecated. Please set the searchability of the custom + # attribute in the + # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes} + # going forward. + # + # A list of keys of filterable + # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes}, + # whose corresponding `string_values` are used in keyword searches. Jobs with + # `string_values` under these specified field keys are returned if any + # of the values match the search keyword. Custom field values with + # parenthesis, brackets and special symbols are not searchable as-is, + # and those keyword queries must be surrounded by quotes. + # @!attribute [r] derived_info + # @return [::Google::Cloud::Talent::V4beta1::Company::DerivedInfo] + # Output only. Derived details about the company. + # @!attribute [r] suspended + # @return [::Boolean] + # Output only. Indicates whether a company is flagged to be suspended from + # public availability by the service when job content appears suspicious, + # abusive, or spammy. + class Company + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Derived details about the company. + # @!attribute [rw] headquarters_location + # @return [::Google::Cloud::Talent::V4beta1::Location] + # A structured headquarters location of the company, resolved from + # {::Google::Cloud::Talent::V4beta1::Company#headquarters_address Company.headquarters_address} + # if provided. + class DerivedInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/company_service.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/company_service.rb new file mode 100644 index 000000000000..d4047c822aef --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/company_service.rb @@ -0,0 +1,144 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Talent + module V4beta1 + # The Request of the CreateCompany method. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the tenant under which the company is created. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, + # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + # is created, for example, "projects/foo". + # @!attribute [rw] company + # @return [::Google::Cloud::Talent::V4beta1::Company] + # Required. The company to be created. + class CreateCompanyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for getting a company by name. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the company to be retrieved. + # + # The format is + # "projects/\\{project_id}/tenants/\\{tenant_id}/companies/\\{company_id}", for + # example, "projects/api-test-project/tenants/foo/companies/bar". + # + # If tenant id is unspecified, the default tenant is used, for + # example, "projects/api-test-project/companies/bar". + class GetCompanyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for updating a specified company. + # @!attribute [rw] company + # @return [::Google::Cloud::Talent::V4beta1::Company] + # Required. The company resource to replace the current resource in the + # system. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Strongly recommended for the best service experience. + # + # If + # {::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest#update_mask update_mask} + # is provided, only the specified fields in + # {::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest#company company} are + # updated. Otherwise all the fields are updated. + # + # A field mask to specify the company fields to be updated. Only + # top level fields of {::Google::Cloud::Talent::V4beta1::Company Company} are + # supported. + class UpdateCompanyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to delete a company. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the company to be deleted. + # + # The format is + # "projects/\\{project_id}/tenants/\\{tenant_id}/companies/\\{company_id}", for + # example, "projects/foo/tenants/bar/companies/baz". + # + # If tenant id is unspecified, the default tenant is used, for + # example, "projects/foo/companies/bar". + class DeleteCompanyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List companies for which the client has ACL visibility. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the tenant under which the company is created. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, + # "projects/foo/tenant/bar". + # + # If tenant id is unspecified, the default tenant will be used, for + # example, "projects/foo". + # @!attribute [rw] page_token + # @return [::String] + # The starting indicator from which to return results. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of companies to be returned, at most 100. + # Default is 100 if a non-positive number is provided. + # @!attribute [rw] require_open_jobs + # @return [::Boolean] + # Set to true if the companies requested must have open jobs. + # + # Defaults to false. + # + # If true, at most + # {::Google::Cloud::Talent::V4beta1::ListCompaniesRequest#page_size page_size} of + # companies are fetched, among which only those with open jobs are returned. + class ListCompaniesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The List companies response object. + # @!attribute [rw] companies + # @return [::Array<::Google::Cloud::Talent::V4beta1::Company>] + # Companies for the current client. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. + # @!attribute [rw] metadata + # @return [::Google::Cloud::Talent::V4beta1::ResponseMetadata] + # Additional information for the API invocation, such as the request + # tracking id. + class ListCompaniesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/completion_service.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/completion_service.rb new file mode 100644 index 000000000000..dea145e5da33 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/completion_service.rb @@ -0,0 +1,154 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Talent + module V4beta1 + # Auto-complete parameters. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of tenant the completion is performed within. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, + # "projects/foo/tenant/bar". + # + # If tenant id is unspecified, the default tenant is used, for + # example, "projects/foo". + # @!attribute [rw] query + # @return [::String] + # Required. The query used to generate suggestions. + # + # The maximum number of allowed characters is 255. + # @!attribute [rw] language_codes + # @return [::Array<::String>] + # The list of languages of the query. This is + # the BCP-47 language code, such as "en-US" or "sr-Latn". + # For more information, see + # [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). + # + # The maximum number of allowed characters is 255. + # @!attribute [rw] page_size + # @return [::Integer] + # Required. Completion result count. + # + # The maximum allowed page size is 10. + # @!attribute [rw] company + # @return [::String] + # If provided, restricts completion to specified company. + # + # The format is + # "projects/\\{project_id}/tenants/\\{tenant_id}/companies/\\{company_id}", for + # example, "projects/foo/tenants/bar/companies/baz". + # + # If tenant id is unspecified, the default tenant is used, for + # example, "projects/foo". + # @!attribute [rw] scope + # @return [::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionScope] + # The scope of the completion. The defaults is + # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionScope::PUBLIC CompletionScope.PUBLIC}. + # @!attribute [rw] type + # @return [::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType] + # The completion topic. The default is + # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType::COMBINED CompletionType.COMBINED}. + class CompleteQueryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum to specify the scope of completion. + module CompletionScope + # Default value. + COMPLETION_SCOPE_UNSPECIFIED = 0 + + # Suggestions are based only on the data provided by the client. + TENANT = 1 + + # Suggestions are based on all jobs data in the system that's visible to + # the client + PUBLIC = 2 + end + + # Enum to specify auto-completion topics. + module CompletionType + # Default value. + COMPLETION_TYPE_UNSPECIFIED = 0 + + # Suggest job titles for jobs autocomplete. + # + # For + # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType::JOB_TITLE CompletionType.JOB_TITLE} + # type, only open jobs with the same + # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest#language_codes language_codes} + # are returned. + JOB_TITLE = 1 + + # Suggest company names for jobs autocomplete. + # + # For + # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType::COMPANY_NAME CompletionType.COMPANY_NAME} + # type, only companies having open jobs with the same + # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest#language_codes language_codes} + # are returned. + COMPANY_NAME = 2 + + # Suggest both job titles and company names for jobs autocomplete. + # + # For + # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType::COMBINED CompletionType.COMBINED} + # type, only open jobs with the same + # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest#language_codes language_codes} + # or companies having open jobs with the same + # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest#language_codes language_codes} + # are returned. + COMBINED = 3 + end + end + + # Response of auto-complete query. + # @!attribute [rw] completion_results + # @return [::Array<::Google::Cloud::Talent::V4beta1::CompleteQueryResponse::CompletionResult>] + # Results of the matching job/company candidates. + # @!attribute [rw] metadata + # @return [::Google::Cloud::Talent::V4beta1::ResponseMetadata] + # Additional information for the API invocation, such as the request + # tracking id. + class CompleteQueryResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Resource that represents completion results. + # @!attribute [rw] suggestion + # @return [::String] + # The suggestion for the query. + # @!attribute [rw] type + # @return [::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType] + # The completion topic. + # @!attribute [rw] image_uri + # @return [::String] + # The URI of the company image for + # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType::COMPANY_NAME COMPANY_NAME}. + class CompletionResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/event.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/event.rb new file mode 100644 index 000000000000..c38408da15b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/event.rb @@ -0,0 +1,188 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Talent + module V4beta1 + # An event issued when an end user interacts with the application that + # implements Cloud Talent Solution. Providing this information improves the + # quality of results for the API clients, enabling the + # service to perform optimally. The number of events sent must be consistent + # with other calls, such as job searches, issued to the service by the client. + # @!attribute [rw] request_id + # @return [::String] + # Strongly recommended for the best service experience. + # + # A unique ID generated in the API responses. It can be found in + # {::Google::Cloud::Talent::V4beta1::ResponseMetadata#request_id ResponseMetadata.request_id}. + # @!attribute [rw] event_id + # @return [::String] + # Required. A unique identifier, generated by the client application. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Required. The timestamp of the event. + # @!attribute [rw] job_event + # @return [::Google::Cloud::Talent::V4beta1::JobEvent] + # An event issued when a job seeker interacts with the application that + # implements Cloud Talent Solution. + # @!attribute [rw] event_notes + # @return [::String] + # Notes about the event provided by recruiters or other users, for example, + # feedback on why a profile was bookmarked. + class ClientEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An event issued when a job seeker interacts with the application that + # implements Cloud Talent Solution. + # @!attribute [rw] type + # @return [::Google::Cloud::Talent::V4beta1::JobEvent::JobEventType] + # Required. The type of the event (see + # {::Google::Cloud::Talent::V4beta1::JobEvent::JobEventType JobEventType}). + # @!attribute [rw] jobs + # @return [::Array<::String>] + # Required. The [job name(s)][google.cloud.talent.v4beta1.Job.name] + # associated with this event. For example, if this is an + # {::Google::Cloud::Talent::V4beta1::JobEvent::JobEventType::IMPRESSION impression} + # event, this field contains the identifiers of all jobs shown to the job + # seeker. If this was a + # {::Google::Cloud::Talent::V4beta1::JobEvent::JobEventType::VIEW view} event, this + # field contains the identifier of the viewed job. + # + # The format is + # "projects/\\{project_id}/tenants/\\{tenant_id}/jobs/\\{job_id}", for + # example, "projects/foo/tenants/bar/jobs/baz". + # @!attribute [rw] profile + # @return [::String] + # The [profile name][google.cloud.talent.v4beta1.Profile.name] associated + # with this client event. + # + # The format is + # "projects/\\{project_id}/tenants/\\{tenant_id}/profiles/\\{profile_id}", + # for example, "projects/foo/tenants/bar/profiles/baz". + class JobEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An enumeration of an event attributed to the behavior of the end user, + # such as a job seeker. + module JobEventType + # The event is unspecified by other provided values. + JOB_EVENT_TYPE_UNSPECIFIED = 0 + + # The job seeker or other entity interacting with the service has + # had a job rendered in their view, such as in a list of search results in + # a compressed or clipped format. This event is typically associated with + # the viewing of a jobs list on a single page by a job seeker. + IMPRESSION = 1 + + # The job seeker, or other entity interacting with the service, has + # viewed the details of a job, including the full description. This + # event doesn't apply to the viewing a snippet of a job appearing as a + # part of the job search results. Viewing a snippet is associated with an + # {::Google::Cloud::Talent::V4beta1::JobEvent::JobEventType::IMPRESSION impression}). + VIEW = 2 + + # The job seeker or other entity interacting with the service + # performed an action to view a job and was redirected to a different + # website for job. + VIEW_REDIRECT = 3 + + # The job seeker or other entity interacting with the service + # began the process or demonstrated the intention of applying for a job. + APPLICATION_START = 4 + + # The job seeker or other entity interacting with the service + # submitted an application for a job. + APPLICATION_FINISH = 5 + + # The job seeker or other entity interacting with the service + # submitted an application for a job with a single click without + # entering information. If a job seeker performs this action, send only + # this event to the service. Do not also send + # {::Google::Cloud::Talent::V4beta1::JobEvent::JobEventType::APPLICATION_START JobEventType.APPLICATION_START} + # or + # {::Google::Cloud::Talent::V4beta1::JobEvent::JobEventType::APPLICATION_FINISH JobEventType.APPLICATION_FINISH} + # events. + APPLICATION_QUICK_SUBMISSION = 6 + + # The job seeker or other entity interacting with the service + # performed an action to apply to a job and was redirected to a different + # website to complete the application. + APPLICATION_REDIRECT = 7 + + # The job seeker or other entity interacting with the service began the + # process or demonstrated the intention of applying for a job from the + # search results page without viewing the details of the job posting. + # If sending this event, JobEventType.VIEW event shouldn't be sent. + APPLICATION_START_FROM_SEARCH = 8 + + # The job seeker, or other entity interacting with the service, performs an + # action with a single click from the search results page to apply to a job + # (without viewing the details of the job posting), and is redirected + # to a different website to complete the application. If a candidate + # performs this action, send only this event to the service. Do not also + # send + # {::Google::Cloud::Talent::V4beta1::JobEvent::JobEventType::APPLICATION_START JobEventType.APPLICATION_START}, + # {::Google::Cloud::Talent::V4beta1::JobEvent::JobEventType::APPLICATION_FINISH JobEventType.APPLICATION_FINISH} + # or + # {::Google::Cloud::Talent::V4beta1::JobEvent::JobEventType::VIEW JobEventType.VIEW} + # events. + APPLICATION_REDIRECT_FROM_SEARCH = 9 + + # This event should be used when a company submits an application + # on behalf of a job seeker. This event is intended for use by staffing + # agencies attempting to place candidates. + APPLICATION_COMPANY_SUBMIT = 10 + + # The job seeker or other entity interacting with the service demonstrated + # an interest in a job by bookmarking or saving it. + BOOKMARK = 11 + + # The job seeker or other entity interacting with the service was + # sent a notification, such as an email alert or device notification, + # containing one or more jobs listings generated by the service. + NOTIFICATION = 12 + + # The job seeker or other entity interacting with the service was + # employed by the hiring entity (employer). Send this event + # only if the job seeker was hired through an application that was + # initiated by a search conducted through the Cloud Talent Solution + # service. + HIRED = 13 + + # A recruiter or staffing agency submitted an application on behalf of the + # candidate after interacting with the service to identify a suitable job + # posting. + SENT_CV = 14 + + # The entity interacting with the service (for example, the job seeker), + # was granted an initial interview by the hiring entity (employer). This + # event should only be sent if the job seeker was granted an interview as + # part of an application that was initiated by a search conducted through / + # recommendation provided by the Cloud Talent Solution service. + INTERVIEW_GRANTED = 15 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/event_service.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/event_service.rb new file mode 100644 index 000000000000..4423eac5eaf4 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/event_service.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Talent + module V4beta1 + # The report event request. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the tenant under which the event is created. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, + # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + # is created, for example, "projects/foo". + # @!attribute [rw] client_event + # @return [::Google::Cloud::Talent::V4beta1::ClientEvent] + # Required. Events issued when end user interacts with customer's application + # that uses Cloud Talent Solution. + class CreateClientEventRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/filters.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/filters.rb new file mode 100644 index 000000000000..70809323a188 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/filters.rb @@ -0,0 +1,404 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Talent + module V4beta1 + # The query required to perform a search query. + # @!attribute [rw] query + # @return [::String] + # The query string that matches against the job title, description, and + # location fields. + # + # The maximum number of allowed characters is 255. + # @!attribute [rw] query_language_code + # @return [::String] + # The language code of {::Google::Cloud::Talent::V4beta1::JobQuery#query query}. + # For example, "en-US". This field helps to better interpret the query. + # + # If a value isn't specified, the query language code is automatically + # detected, which may not be accurate. + # + # Language code should be in BCP-47 format, such as "en-US" or "sr-Latn". + # For more information, see + # [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). + # @!attribute [rw] companies + # @return [::Array<::String>] + # This filter specifies the company entities to search against. + # + # If a value isn't specified, jobs are searched for against all + # companies. + # + # If multiple values are specified, jobs are searched against the + # companies specified. + # + # The format is + # "projects/\\{project_id}/tenants/\\{tenant_id}/companies/\\{company_id}". For + # example, "projects/foo/tenants/bar/companies/baz". + # + # If tenant id is unspecified, the default tenant is used. For + # example, "projects/foo/companies/bar". + # + # At most 20 company filters are allowed. + # @!attribute [rw] location_filters + # @return [::Array<::Google::Cloud::Talent::V4beta1::LocationFilter>] + # The location filter specifies geo-regions containing the jobs to + # search against. See + # {::Google::Cloud::Talent::V4beta1::LocationFilter LocationFilter} for more + # information. + # + # If a location value isn't specified, jobs fitting the other search + # criteria are retrieved regardless of where they're located. + # + # If multiple values are specified, jobs are retrieved from any of the + # specified locations. If different values are specified for the + # {::Google::Cloud::Talent::V4beta1::LocationFilter#distance_in_miles LocationFilter.distance_in_miles} + # parameter, the maximum provided distance is used for all locations. + # + # At most 5 location filters are allowed. + # @!attribute [rw] job_categories + # @return [::Array<::Google::Cloud::Talent::V4beta1::JobCategory>] + # The category filter specifies the categories of jobs to search against. + # See {::Google::Cloud::Talent::V4beta1::JobCategory JobCategory} for more + # information. + # + # If a value isn't specified, jobs from any category are searched against. + # + # If multiple values are specified, jobs from any of the specified + # categories are searched against. + # @!attribute [rw] commute_filter + # @return [::Google::Cloud::Talent::V4beta1::CommuteFilter] + # Allows filtering jobs by commute time with different travel methods (for + # example, driving or public transit). + # + # Note: This only works when you specify a + # {::Google::Cloud::Talent::V4beta1::CommuteMethod CommuteMethod}. In this case, + # {::Google::Cloud::Talent::V4beta1::JobQuery#location_filters location_filters} + # is ignored. + # + # Currently we don't support sorting by commute time. + # @!attribute [rw] company_display_names + # @return [::Array<::String>] + # This filter specifies the company + # {::Google::Cloud::Talent::V4beta1::Company#display_name Company.display_name} of + # the jobs to search against. The company name must match the value exactly. + # + # Alternatively, the value being searched for can be wrapped in different + # match operators. + # `SUBSTRING_MATCH([value])` + # The company name must contain a case insensitive substring match of the + # value. Using this function may increase latency. + # + # Sample Value: `SUBSTRING_MATCH(google)` + # + # `MULTI_WORD_TOKEN_MATCH([value])` + # The value will be treated as a multi word token and the company name must + # contain a case insensitive match of the value. Using this function may + # increase latency. + # + # Sample Value: `MULTI_WORD_TOKEN_MATCH(google)` + # + # If a value isn't specified, jobs within the search results are + # associated with any company. + # + # If multiple values are specified, jobs within the search results may be + # associated with any of the specified companies. + # + # At most 20 company display name filters are allowed. + # @!attribute [rw] compensation_filter + # @return [::Google::Cloud::Talent::V4beta1::CompensationFilter] + # This search filter is applied only to + # {::Google::Cloud::Talent::V4beta1::Job#compensation_info Job.compensation_info}. + # For example, if the filter is specified as "Hourly job with per-hour + # compensation > $15", only jobs meeting these criteria are searched. If a + # filter isn't defined, all open jobs are searched. + # @!attribute [rw] custom_attribute_filter + # @return [::String] + # This filter specifies a structured syntax to match against the + # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes} + # marked as `filterable`. + # + # The syntax for this expression is a subset of SQL syntax. + # + # Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the + # left of the operator is a custom field key and the right of the operator + # is a number or a quoted string. You must escape backslash (\\) and + # quote (\") characters. + # + # Supported functions are `LOWER([field_name])` to + # perform a case insensitive match and `EMPTY([field_name])` to filter on the + # existence of a key. + # + # Boolean expressions (AND/OR/NOT) are supported up to 3 levels of + # nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100 + # comparisons or functions are allowed in the expression. The expression + # must be < 10000 bytes in length. + # + # Sample Query: + # `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND + # driving_years > 10` + # @!attribute [rw] disable_spell_check + # @return [::Boolean] + # This flag controls the spell-check feature. If false, the + # service attempts to correct a misspelled query, + # for example, "enginee" is corrected to "engineer". + # + # Defaults to false: a spell check is performed. + # @!attribute [rw] employment_types + # @return [::Array<::Google::Cloud::Talent::V4beta1::EmploymentType>] + # The employment type filter specifies the employment type of jobs to + # search against, such as + # {::Google::Cloud::Talent::V4beta1::EmploymentType::FULL_TIME EmploymentType.FULL_TIME}. + # + # If a value isn't specified, jobs in the search results includes any + # employment type. + # + # If multiple values are specified, jobs in the search results include + # any of the specified employment types. + # @!attribute [rw] language_codes + # @return [::Array<::String>] + # This filter specifies the locale of jobs to search against, + # for example, "en-US". + # + # If a value isn't specified, the search results can contain jobs in any + # locale. + # + # + # Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn". + # For more information, see + # [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). + # + # At most 10 language code filters are allowed. + # @!attribute [rw] publish_time_range + # @return [::Google::Cloud::Talent::V4beta1::TimestampRange] + # Jobs published within a range specified by this filter are searched + # against. + # @!attribute [rw] excluded_jobs + # @return [::Array<::String>] + # This filter specifies a list of job names to be excluded during search. + # + # At most 400 excluded job names are allowed. + class JobQuery + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Geographic region of the search. + # @!attribute [rw] address + # @return [::String] + # The address name, such as "Mountain View" or "Bay Area". + # @!attribute [rw] region_code + # @return [::String] + # CLDR region code of the country/region. This field may be used in two ways: + # + # 1) If telecommute preference is not set, this field is used address + # ambiguity of the user-input address. For example, "Liverpool" may refer to + # "Liverpool, NY, US" or "Liverpool, UK". This region code biases the + # address resolution toward a specific country or territory. If this field is + # not set, address resolution is biased toward the United States by default. + # + # 2) If telecommute preference is set to TELECOMMUTE_ALLOWED, the + # telecommute location filter will be limited to the region specified in this + # field. If this field is not set, the telecommute job locations will not be + # + # See + # https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/territory_information.html + # for details. Example: "CH" for Switzerland. + # @!attribute [rw] lat_lng + # @return [::Google::Type::LatLng] + # The latitude and longitude of the geographic center to search from. This + # field is ignored if `address` is provided. + # @!attribute [rw] distance_in_miles + # @return [::Float] + # The distance_in_miles is applied when the location being searched for is + # identified as a city or smaller. This field is ignored if the location + # being searched for is a state or larger. + # @!attribute [rw] telecommute_preference + # @return [::Google::Cloud::Talent::V4beta1::LocationFilter::TelecommutePreference] + # Allows the client to return jobs without a + # set location, specifically, telecommuting jobs (telecommuting is considered + # by the service as a special location). + # {::Google::Cloud::Talent::V4beta1::Job#posting_region Job.posting_region} + # indicates if a job permits telecommuting. If this field is set to + # {::Google::Cloud::Talent::V4beta1::LocationFilter::TelecommutePreference::TELECOMMUTE_ALLOWED TelecommutePreference.TELECOMMUTE_ALLOWED}, + # telecommuting jobs are searched, and + # {::Google::Cloud::Talent::V4beta1::LocationFilter#address address} and + # {::Google::Cloud::Talent::V4beta1::LocationFilter#lat_lng lat_lng} are ignored. + # If not set or set to + # {::Google::Cloud::Talent::V4beta1::LocationFilter::TelecommutePreference::TELECOMMUTE_EXCLUDED TelecommutePreference.TELECOMMUTE_EXCLUDED}, + # the telecommute status of the jobs is ignored. Jobs that have + # {::Google::Cloud::Talent::V4beta1::PostingRegion::TELECOMMUTE PostingRegion.TELECOMMUTE} + # and have additional + # {::Google::Cloud::Talent::V4beta1::Job#addresses Job.addresses} may still be + # matched based on other location filters using + # {::Google::Cloud::Talent::V4beta1::LocationFilter#address address} or + # [latlng][]. + # + # This filter can be used by itself to search exclusively for telecommuting + # jobs, or it can be combined with another location + # filter to search for a combination of job locations, + # such as "Mountain View" or "telecommuting" jobs. However, when used in + # combination with other location filters, telecommuting jobs can be + # treated as less relevant than other jobs in the search response. + # + # This field is only used for job search requests. + # @!attribute [rw] negated + # @return [::Boolean] + # Whether to apply negation to the filter so profiles matching the filter + # are excluded. + class LocationFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specify whether to include telecommute jobs. + module TelecommutePreference + # Default value if the telecommute preference isn't specified. + TELECOMMUTE_PREFERENCE_UNSPECIFIED = 0 + + # Deprecated: Ignore telecommute status of jobs. Use + # TELECOMMUTE_JOBS_EXCLUDED if want to exclude telecommute jobs. + TELECOMMUTE_EXCLUDED = 1 + + # Allow telecommute jobs. + TELECOMMUTE_ALLOWED = 2 + + # Exclude telecommute jobs. + TELECOMMUTE_JOBS_EXCLUDED = 3 + end + end + + # Filter on job compensation type and amount. + # @!attribute [rw] type + # @return [::Google::Cloud::Talent::V4beta1::CompensationFilter::FilterType] + # Required. Type of filter. + # @!attribute [rw] units + # @return [::Array<::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationUnit>] + # Required. Specify desired `base compensation entry's` + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationUnit CompensationInfo.CompensationUnit}. + # @!attribute [rw] range + # @return [::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationRange] + # Compensation range. + # @!attribute [rw] include_jobs_with_unspecified_compensation_range + # @return [::Boolean] + # If set to true, jobs with unspecified compensation range fields are + # included. + class CompensationFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specify the type of filtering. + module FilterType + # Filter type unspecified. Position holder, INVALID, should never be used. + FILTER_TYPE_UNSPECIFIED = 0 + + # Filter by `base compensation entry's` unit. A job is a match if and + # only if the job contains a base CompensationEntry and the base + # CompensationEntry's unit matches provided + # {::Google::Cloud::Talent::V4beta1::CompensationFilter#units units}. Populate + # one or more + # {::Google::Cloud::Talent::V4beta1::CompensationFilter#units units}. + # + # See + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry CompensationInfo.CompensationEntry} + # for definition of base compensation entry. + UNIT_ONLY = 1 + + # Filter by `base compensation entry's` unit and amount / range. A job + # is a match if and only if the job contains a base CompensationEntry, and + # the base entry's unit matches provided + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationUnit CompensationUnit} + # and amount or range overlaps with provided + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationRange CompensationRange}. + # + # See + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry CompensationInfo.CompensationEntry} + # for definition of base compensation entry. + # + # Set exactly one + # {::Google::Cloud::Talent::V4beta1::CompensationFilter#units units} and + # populate {::Google::Cloud::Talent::V4beta1::CompensationFilter#range range}. + UNIT_AND_AMOUNT = 2 + + # Filter by annualized base compensation amount and `base compensation + # entry's` unit. Populate + # {::Google::Cloud::Talent::V4beta1::CompensationFilter#range range} and zero or + # more {::Google::Cloud::Talent::V4beta1::CompensationFilter#units units}. + ANNUALIZED_BASE_AMOUNT = 3 + + # Filter by annualized total compensation amount and `base compensation + # entry's` unit . Populate + # {::Google::Cloud::Talent::V4beta1::CompensationFilter#range range} and zero or + # more {::Google::Cloud::Talent::V4beta1::CompensationFilter#units units}. + ANNUALIZED_TOTAL_AMOUNT = 4 + end + end + + # Parameters needed for commute search. + # @!attribute [rw] commute_method + # @return [::Google::Cloud::Talent::V4beta1::CommuteMethod] + # Required. The method of transportation to calculate the commute time for. + # @!attribute [rw] start_coordinates + # @return [::Google::Type::LatLng] + # Required. The latitude and longitude of the location to calculate the + # commute time from. + # @!attribute [rw] travel_duration + # @return [::Google::Protobuf::Duration] + # Required. The maximum travel time in seconds. The maximum allowed value is + # `3600s` (one hour). Format is `123s`. + # @!attribute [rw] allow_imprecise_addresses + # @return [::Boolean] + # If `true`, jobs without street level addresses may also be returned. + # For city level addresses, the city center is used. For state and coarser + # level addresses, text matching is used. + # If this field is set to `false` or isn't specified, only jobs that include + # street level addresses will be returned by commute search. + # @!attribute [rw] road_traffic + # @return [::Google::Cloud::Talent::V4beta1::CommuteFilter::RoadTraffic] + # Specifies the traffic density to use when calculating commute time. + # + # Note: The following fields are mutually exclusive: `road_traffic`, `departure_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] departure_time + # @return [::Google::Type::TimeOfDay] + # The departure time used to calculate traffic impact, represented as + # {::Google::Type::TimeOfDay google.type.TimeOfDay} in local time zone. + # + # Currently traffic model is restricted to hour level resolution. + # + # Note: The following fields are mutually exclusive: `departure_time`, `road_traffic`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class CommuteFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The traffic density to use when calculating commute time. + module RoadTraffic + # Road traffic situation isn't specified. + ROAD_TRAFFIC_UNSPECIFIED = 0 + + # Optimal commute time without considering any traffic impact. + TRAFFIC_FREE = 1 + + # Commute time calculation takes in account the peak traffic impact. + BUSY_HOUR = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/histogram.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/histogram.rb new file mode 100644 index 000000000000..1762ad476d9f --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/histogram.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! + + +module Google + module Cloud + module Talent + module V4beta1 + # The histogram request. + # @!attribute [rw] histogram_query + # @return [::String] + # An expression specifies a histogram request against matching resources + # (for example, jobs, profiles) for searches. + # + # See + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#histogram_queries SearchJobsRequest.histogram_queries} + # and + # [SearchProfilesRequest.histogram_queries][google.cloud.talent.v4beta1.SearchProfilesRequest.histogram_queries] + # for details about syntax. + class HistogramQuery + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Histogram result that matches + # {::Google::Cloud::Talent::V4beta1::HistogramQuery HistogramQuery} specified in + # searches. + # @!attribute [rw] histogram_query + # @return [::String] + # Requested histogram expression. + # @!attribute [rw] histogram + # @return [::Google::Protobuf::Map{::String => ::Integer}] + # A map from the values of the facet associated with distinct values to the + # number of matching entries with corresponding value. + # + # The key format is: + # + # * (for string histogram) string values stored in the field. + # * (for named numeric bucket) name specified in `bucket()` function, like + # for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`. + # * (for anonymous numeric bucket) range formatted as `-`, for + # example, `0-1000`, `MIN-0`, and `0-MAX`. + class HistogramQueryResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Integer] + class HistogramEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/job.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/job.rb new file mode 100644 index 000000000000..9790455fe3f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/job.rb @@ -0,0 +1,389 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Talent + module V4beta1 + # A Job resource represents a job posting (also referred to as a "job listing" + # or "job requisition"). A job belongs to a + # {::Google::Cloud::Talent::V4beta1::Company Company}, which is the hiring entity + # responsible for the job. + # @!attribute [rw] name + # @return [::String] + # Required during job update. + # + # The resource name for the job. This is generated by the service when a + # job is created. + # + # The format is + # "projects/\\{project_id}/tenants/\\{tenant_id}/jobs/\\{job_id}". For + # example, "projects/foo/tenants/bar/jobs/baz". + # + # If tenant id is unspecified, the default tenant is used. For + # example, "projects/foo/jobs/bar". + # + # Use of this field in job queries and API calls is preferred over the use of + # {::Google::Cloud::Talent::V4beta1::Job#requisition_id requisition_id} since this + # value is unique. + # @!attribute [rw] company + # @return [::String] + # Required. The resource name of the company listing the job. + # + # The format is + # "projects/\\{project_id}/tenants/\\{tenant_id}/companies/\\{company_id}". For + # example, "projects/foo/tenants/bar/companies/baz". + # + # If tenant id is unspecified, the default tenant is used. For + # example, "projects/foo/companies/bar". + # @!attribute [rw] requisition_id + # @return [::String] + # Required. The requisition ID, also referred to as the posting ID, is + # assigned by the client to identify a job. This field is intended to be used + # by clients for client identification and tracking of postings. A job isn't + # allowed to be created if there is another job with the same + # {::Google::Cloud::Talent::V4beta1::Job#name company}, + # {::Google::Cloud::Talent::V4beta1::Job#language_code language_code} and + # {::Google::Cloud::Talent::V4beta1::Job#requisition_id requisition_id}. + # + # The maximum number of allowed characters is 255. + # @!attribute [rw] title + # @return [::String] + # Required. The title of the job, such as "Software Engineer" + # + # The maximum number of allowed characters is 500. + # @!attribute [rw] description + # @return [::String] + # Required. The description of the job, which typically includes a + # multi-paragraph description of the company and related information. + # Separate fields are provided on the job object for + # {::Google::Cloud::Talent::V4beta1::Job#responsibilities responsibilities}, + # {::Google::Cloud::Talent::V4beta1::Job#qualifications qualifications}, and other + # job characteristics. Use of these separate job fields is recommended. + # + # This field accepts and sanitizes HTML input, and also accepts + # bold, italic, ordered list, and unordered list markup tags. + # + # The maximum number of allowed characters is 100,000. + # @!attribute [rw] addresses + # @return [::Array<::String>] + # Strongly recommended for the best service experience. + # + # Location(s) where the employer is looking to hire for this job posting. + # + # Specifying the full street address(es) of the hiring location enables + # better API results, especially job searches by commute time. + # + # At most 50 locations are allowed for best search performance. If a job has + # more locations, it is suggested to split it into multiple jobs with unique + # {::Google::Cloud::Talent::V4beta1::Job#requisition_id requisition_id}s (e.g. + # 'ReqA' becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the + # same {::Google::Cloud::Talent::V4beta1::Job#company company}, + # {::Google::Cloud::Talent::V4beta1::Job#language_code language_code} and + # {::Google::Cloud::Talent::V4beta1::Job#requisition_id requisition_id} are not + # allowed. If the original + # {::Google::Cloud::Talent::V4beta1::Job#requisition_id requisition_id} must be + # preserved, a custom field should be used for storage. It is also suggested + # to group the locations that close to each other in the same job for better + # search experience. + # + # The maximum number of allowed characters is 500. + # @!attribute [rw] application_info + # @return [::Google::Cloud::Talent::V4beta1::Job::ApplicationInfo] + # Job application information. + # @!attribute [rw] job_benefits + # @return [::Array<::Google::Cloud::Talent::V4beta1::JobBenefit>] + # The benefits included with the job. + # @!attribute [rw] compensation_info + # @return [::Google::Cloud::Talent::V4beta1::CompensationInfo] + # Job compensation information (a.k.a. "pay rate") i.e., the compensation + # that will paid to the employee. + # @!attribute [rw] custom_attributes + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Talent::V4beta1::CustomAttribute}] + # A map of fields to hold both filterable and non-filterable custom job + # attributes that are not covered by the provided structured fields. + # + # The keys of the map are strings up to 64 bytes and must match the + # pattern: `[a-zA-Z][a-zA-Z0-9_]*`. For example, key0LikeThis or + # KEY_1_LIKE_THIS. + # + # At most 100 filterable and at most 100 unfilterable keys are supported. + # For filterable `string_values`, across all keys at most 200 values are + # allowed, with each string no more than 255 characters. For unfilterable + # `string_values`, the maximum total size of `string_values` across all keys + # is 50KB. + # @!attribute [rw] degree_types + # @return [::Array<::Google::Cloud::Talent::V4beta1::DegreeType>] + # The desired education degrees for the job, such as Bachelors, Masters. + # @!attribute [rw] department + # @return [::String] + # The department or functional area within the company with the open + # position. + # + # The maximum number of allowed characters is 255. + # @!attribute [rw] employment_types + # @return [::Array<::Google::Cloud::Talent::V4beta1::EmploymentType>] + # The employment type(s) of a job, for example, + # {::Google::Cloud::Talent::V4beta1::EmploymentType::FULL_TIME full time} or + # {::Google::Cloud::Talent::V4beta1::EmploymentType::PART_TIME part time}. + # @!attribute [rw] incentives + # @return [::String] + # A description of bonus, commission, and other compensation + # incentives associated with the job not including salary or pay. + # + # The maximum number of allowed characters is 10,000. + # @!attribute [rw] language_code + # @return [::String] + # The language of the posting. This field is distinct from + # any requirements for fluency that are associated with the job. + # + # Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn". + # For more information, see + # [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47){: + # class="external" target="_blank" }. + # + # If this field is unspecified and + # {::Google::Cloud::Talent::V4beta1::Job#description Job.description} is present, + # detected language code based on + # {::Google::Cloud::Talent::V4beta1::Job#description Job.description} is assigned, + # otherwise defaults to 'en_US'. + # @!attribute [rw] job_level + # @return [::Google::Cloud::Talent::V4beta1::JobLevel] + # The experience level associated with the job, such as "Entry Level". + # @!attribute [rw] promotion_value + # @return [::Integer] + # A promotion value of the job, as determined by the client. + # The value determines the sort order of the jobs returned when searching for + # jobs using the featured jobs search call, with higher promotional values + # being returned first and ties being resolved by relevance sort. Only the + # jobs with a promotionValue >0 are returned in a FEATURED_JOB_SEARCH. + # + # Default value is 0, and negative values are treated as 0. + # @!attribute [rw] qualifications + # @return [::String] + # A description of the qualifications required to perform the + # job. The use of this field is recommended + # as an alternative to using the more general + # {::Google::Cloud::Talent::V4beta1::Job#description description} field. + # + # This field accepts and sanitizes HTML input, and also accepts + # bold, italic, ordered list, and unordered list markup tags. + # + # The maximum number of allowed characters is 10,000. + # @!attribute [rw] responsibilities + # @return [::String] + # A description of job responsibilities. The use of this field is + # recommended as an alternative to using the more general + # {::Google::Cloud::Talent::V4beta1::Job#description description} field. + # + # This field accepts and sanitizes HTML input, and also accepts + # bold, italic, ordered list, and unordered list markup tags. + # + # The maximum number of allowed characters is 10,000. + # @!attribute [rw] posting_region + # @return [::Google::Cloud::Talent::V4beta1::PostingRegion] + # The job {::Google::Cloud::Talent::V4beta1::PostingRegion PostingRegion} (for + # example, state, country) throughout which the job is available. If this + # field is set, a + # {::Google::Cloud::Talent::V4beta1::LocationFilter LocationFilter} in a search + # query within the job region finds this job posting if an exact location + # match isn't specified. If this field is set to + # {::Google::Cloud::Talent::V4beta1::PostingRegion::NATION PostingRegion.NATION} or + # {::Google::Cloud::Talent::V4beta1::PostingRegion::ADMINISTRATIVE_AREA PostingRegion.ADMINISTRATIVE_AREA}, + # setting job {::Google::Cloud::Talent::V4beta1::Job#addresses Job.addresses} to + # the same location level as this field is strongly recommended. + # @!attribute [rw] visibility + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Talent::V4beta1::Visibility] + # Deprecated. The job is only visible to the owner. + # + # The visibility of the job. + # + # Defaults to + # {::Google::Cloud::Talent::V4beta1::Visibility::ACCOUNT_ONLY Visibility.ACCOUNT_ONLY} + # if not specified. + # @!attribute [rw] job_start_time + # @return [::Google::Protobuf::Timestamp] + # The start timestamp of the job in UTC time zone. Typically this field + # is used for contracting engagements. Invalid timestamps are ignored. + # @!attribute [rw] job_end_time + # @return [::Google::Protobuf::Timestamp] + # The end timestamp of the job. Typically this field is used for contracting + # engagements. Invalid timestamps are ignored. + # @!attribute [rw] posting_publish_time + # @return [::Google::Protobuf::Timestamp] + # The timestamp this job posting was most recently published. The default + # value is the time the request arrives at the server. Invalid timestamps are + # ignored. + # @!attribute [rw] posting_expire_time + # @return [::Google::Protobuf::Timestamp] + # Strongly recommended for the best service experience. + # + # The expiration timestamp of the job. After this timestamp, the + # job is marked as expired, and it no longer appears in search results. The + # expired job can't be listed by the + # {::Google::Cloud::Talent::V4beta1::JobService::Client#list_jobs ListJobs} API, but it can + # be retrieved with the + # {::Google::Cloud::Talent::V4beta1::JobService::Client#get_job GetJob} API or updated with + # the {::Google::Cloud::Talent::V4beta1::JobService::Client#update_job UpdateJob} API or + # deleted with the + # {::Google::Cloud::Talent::V4beta1::JobService::Client#delete_job DeleteJob} API. An + # expired job can be updated and opened again by using a future expiration + # timestamp. Updating an expired job fails if there is another existing open + # job with same {::Google::Cloud::Talent::V4beta1::Job#company company}, + # {::Google::Cloud::Talent::V4beta1::Job#language_code language_code} and + # {::Google::Cloud::Talent::V4beta1::Job#requisition_id requisition_id}. + # + # The expired jobs are retained in our system for 90 days. However, the + # overall expired job count cannot exceed 3 times the maximum number of + # open jobs over previous 7 days. If this threshold is exceeded, + # expired jobs are cleaned out in order of earliest expire time. + # Expired jobs are no longer accessible after they are cleaned + # out. + # + # Invalid timestamps are ignored, and treated as expire time not provided. + # + # If the timestamp is before the instant request is made, the job + # is treated as expired immediately on creation. This kind of job can + # not be updated. And when creating a job with past timestamp, the + # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time posting_publish_time} + # must be set before + # {::Google::Cloud::Talent::V4beta1::Job#posting_expire_time posting_expire_time}. + # The purpose of this feature is to allow other objects, such as + # [Application][google.cloud.talent.v4beta1.Application], to refer a job that + # didn't exist in the system prior to becoming expired. If you want to modify + # a job that was expired on creation, delete it and create a new one. + # + # If this value isn't provided at the time of job creation or is invalid, + # the job posting expires after 30 days from the job's creation time. For + # example, if the job was created on 2017/01/01 13:00AM UTC with an + # unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC. + # + # If this value isn't provided on job update, it depends on the field masks + # set by + # {::Google::Cloud::Talent::V4beta1::UpdateJobRequest#update_mask UpdateJobRequest.update_mask}. + # If the field masks include + # {::Google::Cloud::Talent::V4beta1::Job#job_end_time job_end_time}, or the masks + # are empty meaning that every field is updated, the job posting expires + # after 30 days from the job's last update time. Otherwise the expiration + # date isn't updated. + # @!attribute [r] posting_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this job posting was created. + # @!attribute [r] posting_update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this job posting was last updated. + # @!attribute [r] company_display_name + # @return [::String] + # Output only. Display name of the company listing the job. + # @!attribute [r] derived_info + # @return [::Google::Cloud::Talent::V4beta1::Job::DerivedInfo] + # Output only. Derived details about the job posting. + # @!attribute [rw] processing_options + # @return [::Google::Cloud::Talent::V4beta1::Job::ProcessingOptions] + # Options for job processing. + class Job + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Application related details of a job posting. + # @!attribute [rw] emails + # @return [::Array<::String>] + # Use this field to specify email address(es) to which resumes or + # applications can be sent. + # + # The maximum number of allowed characters for each entry is 255. + # @!attribute [rw] instruction + # @return [::String] + # Use this field to provide instructions, such as "Mail your application + # to ...", that a candidate can follow to apply for the job. + # + # This field accepts and sanitizes HTML input, and also accepts + # bold, italic, ordered list, and unordered list markup tags. + # + # The maximum number of allowed characters is 3,000. + # @!attribute [rw] uris + # @return [::Array<::String>] + # Use this URI field to direct an applicant to a website, for example to + # link to an online application form. + # + # The maximum number of allowed characters for each entry is 2,000. + class ApplicationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Derived details about the job posting. + # @!attribute [rw] locations + # @return [::Array<::Google::Cloud::Talent::V4beta1::Location>] + # Structured locations of the job, resolved from + # {::Google::Cloud::Talent::V4beta1::Job#addresses Job.addresses}. + # + # {::Google::Cloud::Talent::V4beta1::Job::DerivedInfo#locations locations} are + # exactly matched to + # {::Google::Cloud::Talent::V4beta1::Job#addresses Job.addresses} in the same + # order. + # @!attribute [rw] job_categories + # @return [::Array<::Google::Cloud::Talent::V4beta1::JobCategory>] + # Job categories derived from + # {::Google::Cloud::Talent::V4beta1::Job#title Job.title} and + # {::Google::Cloud::Talent::V4beta1::Job#description Job.description}. + class DerivedInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Options for job processing. + # @!attribute [rw] disable_street_address_resolution + # @return [::Boolean] + # If set to `true`, the service does not attempt to resolve a + # more precise address for the job. + # @!attribute [rw] html_sanitization + # @return [::Google::Cloud::Talent::V4beta1::HtmlSanitization] + # Option for job HTML content sanitization. Applied fields are: + # + # * description + # * applicationInfo.instruction + # * incentives + # * qualifications + # * responsibilities + # + # HTML tags in these fields may be stripped if sanitiazation isn't + # disabled. + # + # Defaults to + # {::Google::Cloud::Talent::V4beta1::HtmlSanitization::SIMPLE_FORMATTING_ONLY HtmlSanitization.SIMPLE_FORMATTING_ONLY}. + class ProcessingOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Talent::V4beta1::CustomAttribute] + class CustomAttributesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/job_service.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/job_service.rb new file mode 100644 index 000000000000..82110737d6ce --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/job_service.rb @@ -0,0 +1,914 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Talent + module V4beta1 + # Create job request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the tenant under which the job is created. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, + # "projects/foo/tenant/bar". If tenant id is unspecified a default tenant + # is created. For example, "projects/foo". + # @!attribute [rw] job + # @return [::Google::Cloud::Talent::V4beta1::Job] + # Required. The Job to be created. + class CreateJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get job request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the job to retrieve. + # + # The format is + # "projects/\\{project_id}/tenants/\\{tenant_id}/jobs/\\{job_id}". For + # example, "projects/foo/tenants/bar/jobs/baz". + # + # If tenant id is unspecified, the default tenant is used. For + # example, "projects/foo/jobs/bar". + class GetJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update job request. + # @!attribute [rw] job + # @return [::Google::Cloud::Talent::V4beta1::Job] + # Required. The Job to be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Strongly recommended for the best service experience. + # + # If {::Google::Cloud::Talent::V4beta1::UpdateJobRequest#update_mask update_mask} + # is provided, only the specified fields in + # {::Google::Cloud::Talent::V4beta1::UpdateJobRequest#job job} are updated. + # Otherwise all the fields are updated. + # + # A field mask to restrict the fields that are updated. Only + # top level fields of {::Google::Cloud::Talent::V4beta1::Job Job} are supported. + class UpdateJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete job request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the job to be deleted. + # + # The format is + # "projects/\\{project_id}/tenants/\\{tenant_id}/jobs/\\{job_id}". For + # example, "projects/foo/tenants/bar/jobs/baz". + # + # If tenant id is unspecified, the default tenant is used. For + # example, "projects/foo/jobs/bar". + class DeleteJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Batch delete jobs request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the tenant under which the job is created. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, + # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + # is created. For example, "projects/foo". + # @!attribute [rw] filter + # @return [::String] + # Required. The filter string specifies the jobs to be deleted. + # + # Supported operator: =, AND + # + # The fields eligible for filtering are: + # + # * `companyName` (Required) + # * `requisitionId` (Required) + # + # Sample Query: companyName = "projects/foo/companies/bar" AND + # requisitionId = "req-1" + class BatchDeleteJobsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List jobs request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the tenant under which the job is created. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, + # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + # is created. For example, "projects/foo". + # @!attribute [rw] filter + # @return [::String] + # Required. The filter string specifies the jobs to be enumerated. + # + # Supported operator: =, AND + # + # The fields eligible for filtering are: + # + # * `companyName` + # * `requisitionId` + # * `status` Available values: OPEN, EXPIRED, ALL. Defaults to + # OPEN if no value is specified. + # + # At least one of `companyName` and `requisitionId` must present or an + # INVALID_ARGUMENT error is thrown. + # + # Sample Query: + # + # * companyName = "projects/foo/tenants/bar/companies/baz" + # * companyName = "projects/foo/tenants/bar/companies/baz" AND + # requisitionId = "req-1" + # * companyName = "projects/foo/tenants/bar/companies/baz" AND + # status = "EXPIRED" + # * requisitionId = "req-1" + # * requisitionId = "req-1" AND status = "EXPIRED" + # @!attribute [rw] page_token + # @return [::String] + # The starting point of a query result. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of jobs to be returned per page of results. + # + # If {::Google::Cloud::Talent::V4beta1::ListJobsRequest#job_view job_view} is set + # to + # {::Google::Cloud::Talent::V4beta1::JobView::JOB_VIEW_ID_ONLY JobView.JOB_VIEW_ID_ONLY}, + # the maximum allowed page size is 1000. Otherwise, the maximum allowed page + # size is 100. + # + # Default is 100 if empty or a number < 1 is specified. + # @!attribute [rw] job_view + # @return [::Google::Cloud::Talent::V4beta1::JobView] + # The desired job attributes returned for jobs in the + # search response. Defaults to + # {::Google::Cloud::Talent::V4beta1::JobView::JOB_VIEW_FULL JobView.JOB_VIEW_FULL} + # if no value is specified. + class ListJobsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List jobs response. + # @!attribute [rw] jobs + # @return [::Array<::Google::Cloud::Talent::V4beta1::Job>] + # The Jobs for a given company. + # + # The maximum number of items returned is based on the limit field + # provided in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. + # @!attribute [rw] metadata + # @return [::Google::Cloud::Talent::V4beta1::ResponseMetadata] + # Additional information for the API invocation, such as the request + # tracking id. + class ListJobsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The Request body of the `SearchJobs` call. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the tenant to search within. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, + # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + # is created. For example, "projects/foo". + # @!attribute [rw] search_mode + # @return [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::SearchMode] + # Mode of a search. + # + # Defaults to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::SearchMode::JOB_SEARCH SearchMode.JOB_SEARCH}. + # @!attribute [rw] request_metadata + # @return [::Google::Cloud::Talent::V4beta1::RequestMetadata] + # Required. The meta information collected about the job searcher, used to + # improve the search quality of the service. The identifiers (such as + # `user_id`) are provided by users, and must be unique and consistent. + # @!attribute [rw] job_query + # @return [::Google::Cloud::Talent::V4beta1::JobQuery] + # Query used to search against jobs, such as keyword, location filters, etc. + # @!attribute [rw] enable_broadening + # @return [::Boolean] + # Controls whether to broaden the search when it produces sparse results. + # Broadened queries append results to the end of the matching results + # list. + # + # Defaults to false. + # @!attribute [rw] require_precise_result_size + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Boolean] + # This field is deprecated. + # @!attribute [rw] histogram_queries + # @return [::Array<::Google::Cloud::Talent::V4beta1::HistogramQuery>] + # An expression specifies a histogram request against matching jobs. + # + # Expression syntax is an aggregation function call with histogram facets and + # other options. + # + # Available aggregation function calls are: + # * `count(string_histogram_facet)`: Count the number of matching entities, + # for each distinct attribute value. + # * `count(numeric_histogram_facet, list of buckets)`: Count the number of + # matching entities within each bucket. + # + # A maximum of 200 histogram buckets are supported. + # + # Data types: + # + # * Histogram facet: facet names with format `[a-zA-Z][a-zA-Z0-9_]+`. + # * String: string like "any string with backslash escape for quote(\")." + # * Number: whole number and floating point number like 10, -1 and -0.01. + # * List: list of elements with comma(,) separator surrounded by square + # brackets, for example, [1, 2, 3] and ["one", "two", "three"]. + # + # Built-in constants: + # + # * MIN (minimum number similar to java Double.MIN_VALUE) + # * MAX (maximum number similar to java Double.MAX_VALUE) + # + # Built-in functions: + # + # * bucket(start, end[, label]): bucket built-in function creates a bucket + # with range of [start, end). Note that the end is exclusive, for example, + # bucket(1, MAX, "positive number") or bucket(1, 10). + # + # Job histogram facets: + # + # * company_display_name: histogram by + # {::Google::Cloud::Talent::V4beta1::Job#company_display_name Job.company_display_name}. + # * employment_type: histogram by + # {::Google::Cloud::Talent::V4beta1::Job#employment_types Job.employment_types}, + # for example, + # "FULL_TIME", "PART_TIME". + # * company_size (DEPRECATED): histogram by + # {::Google::Cloud::Talent::V4beta1::CompanySize CompanySize}, for example, + # "SMALL", "MEDIUM", "BIG". + # * publish_time_in_day: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} + # in days. + # Must specify list of numeric buckets in spec. + # * publish_time_in_month: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} + # in months. + # Must specify list of numeric buckets in spec. + # * publish_time_in_year: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} + # in years. + # Must specify list of numeric buckets in spec. + # * degree_types: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#degree_types Job.degree_types}, for + # example, + # "Bachelors", "Masters". + # * job_level: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#job_level Job.job_level}, for example, + # "Entry + # Level". + # * country: histogram by the country code of jobs, for example, "US", "FR". + # * admin1: histogram by the admin1 code of jobs, which is a global + # placeholder referring to the state, province, or the particular term a + # country uses to define the geographic structure below the country level, + # for example, "CA", "IL". + # * city: histogram by a combination of the "city name, admin1 code". For + # example, "Mountain View, CA", "New York, NY". + # * admin1_country: histogram by a combination of the "admin1 code, country", + # for example, "CA, US", "IL, US". + # * city_coordinate: histogram by the city center's GPS coordinates (latitude + # and longitude), for example, 37.4038522,-122.0987765. Since the + # coordinates of a city center can change, customers may need to refresh + # them periodically. + # * locale: histogram by the + # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}, for + # example, "en-US", + # "fr-FR". + # * language: histogram by the language subtag of the + # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}, + # for example, "en", "fr". + # * category: histogram by the + # {::Google::Cloud::Talent::V4beta1::JobCategory JobCategory}, for example, + # "COMPUTER_AND_IT", "HEALTHCARE". + # * base_compensation_unit: histogram by the + # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationUnit CompensationInfo.CompensationUnit} + # of base salary, for example, "WEEKLY", "MONTHLY". + # * base_compensation: histogram by the base salary. Must specify list of + # numeric buckets to group results by. + # * annualized_base_compensation: histogram by the base annualized salary. + # Must specify list of numeric buckets to group results by. + # * annualized_total_compensation: histogram by the total annualized salary. + # Must specify list of numeric buckets to group results by. + # * string_custom_attribute: histogram by string + # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes}. + # Values can be accessed via square bracket notations like + # string_custom_attribute["key1"]. + # * numeric_custom_attribute: histogram by numeric + # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes}. + # Values can be accessed via square bracket notations like + # numeric_custom_attribute["key1"]. Must specify list of numeric buckets to + # group results by. + # + # Example expressions: + # + # * `count(admin1)` + # * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000), + # bucket(100000, MAX)])` + # * `count(string_custom_attribute["some-string-custom-attribute"])` + # * `count(numeric_custom_attribute["some-numeric-custom-attribute"], + # [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])` + # @!attribute [rw] job_view + # @return [::Google::Cloud::Talent::V4beta1::JobView] + # The desired job attributes returned for jobs in the search response. + # Defaults to + # {::Google::Cloud::Talent::V4beta1::JobView::JOB_VIEW_SMALL JobView.JOB_VIEW_SMALL} + # if no value is specified. + # @!attribute [rw] offset + # @return [::Integer] + # An integer that specifies the current offset (that is, starting result + # location, amongst the jobs deemed by the API as relevant) in search + # results. This field is only considered if + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#page_token page_token} is + # unset. + # + # The maximum allowed value is 5000. Otherwise an error is thrown. + # + # For example, 0 means to return results starting from the first matching + # job, and 10 means to return from the 11th job. This can be used for + # pagination, (for example, pageSize = 10 and offset = 10 means to return + # from the second page). + # @!attribute [rw] page_size + # @return [::Integer] + # A limit on the number of jobs returned in the search results. + # Increasing this value above the default value of 10 can increase search + # response time. The value can be between 1 and 100. + # @!attribute [rw] page_token + # @return [::String] + # The token specifying the current offset within + # search results. See + # {::Google::Cloud::Talent::V4beta1::SearchJobsResponse#next_page_token SearchJobsResponse.next_page_token} + # for an explanation of how to obtain the next set of query results. + # @!attribute [rw] order_by + # @return [::String] + # The criteria determining how search results are sorted. Default is + # `"relevance desc"`. + # + # Supported options are: + # + # * `"relevance desc"`: By relevance descending, as determined by the API + # algorithms. Relevance thresholding of query results is only available + # with this ordering. + # * `"posting_publish_time desc"`: By + # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} + # descending. + # * `"posting_update_time desc"`: By + # {::Google::Cloud::Talent::V4beta1::Job#posting_update_time Job.posting_update_time} + # descending. + # * `"title"`: By {::Google::Cloud::Talent::V4beta1::Job#title Job.title} + # ascending. + # * `"title desc"`: By {::Google::Cloud::Talent::V4beta1::Job#title Job.title} + # descending. + # * `"annualized_base_compensation"`: By job's + # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_base_compensation_range CompensationInfo.annualized_base_compensation_range} + # ascending. Jobs whose annualized base compensation is unspecified are put + # at the end of search results. + # * `"annualized_base_compensation desc"`: By job's + # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_base_compensation_range CompensationInfo.annualized_base_compensation_range} + # descending. Jobs whose annualized base compensation is unspecified are + # put at the end of search results. + # * `"annualized_total_compensation"`: By job's + # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_total_compensation_range CompensationInfo.annualized_total_compensation_range} + # ascending. Jobs whose annualized base compensation is unspecified are put + # at the end of search results. + # * `"annualized_total_compensation desc"`: By job's + # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_total_compensation_range CompensationInfo.annualized_total_compensation_range} + # descending. Jobs whose annualized base compensation is unspecified are + # put at the end of search results. + # * `"custom_ranking desc"`: By the relevance score adjusted to the + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#ranking_expression SearchJobsRequest.CustomRankingInfo.ranking_expression} + # with weight factor assigned by + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#importance_level SearchJobsRequest.CustomRankingInfo.importance_level} + # in descending order. + # * Location sorting: Use the special syntax to order jobs by distance:
+ # `"distance_from('Hawaii')"`: Order by distance from Hawaii.
+ # `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.
+ # `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by + # multiple locations. See details below.
+ # `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by + # multiple locations. See details below.
+ # The string can have a maximum of 256 characters. When multiple distance + # centers are provided, a job that is close to any of the distance centers + # would have a high rank. When a job has multiple locations, the job + # location closest to one of the distance centers will be used. Jobs that + # don't have locations will be ranked at the bottom. Distance is calculated + # with a precision of 11.3 meters (37.4 feet). Diversification strategy is + # still applied unless explicitly disabled in + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#diversification_level diversification_level}. + # @!attribute [rw] diversification_level + # @return [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::DiversificationLevel] + # Controls whether highly similar jobs are returned next to each other in + # the search results. Jobs are identified as highly similar based on + # their titles, job categories, and locations. Highly similar results are + # clustered so that only one representative job of the cluster is + # displayed to the job seeker higher up in the results, with the other jobs + # being displayed lower down in the results. + # + # Defaults to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::DiversificationLevel::SIMPLE DiversificationLevel.SIMPLE} + # if no value is specified. + # @!attribute [rw] custom_ranking_info + # @return [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo] + # Controls over how job documents get ranked on top of existing relevance + # score (determined by API algorithm). + # @!attribute [rw] disable_keyword_match + # @return [::Boolean] + # This field is deprecated. Please use + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#keyword_match_mode SearchJobsRequest.keyword_match_mode} + # going forward. + # + # To migrate, disable_keyword_match set to false maps to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_ALL KeywordMatchMode.KEYWORD_MATCH_ALL}, + # and disable_keyword_match set to true maps to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_DISABLED KeywordMatchMode.KEYWORD_MATCH_DISABLED}. + # If + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#keyword_match_mode SearchJobsRequest.keyword_match_mode} + # is set, this field is ignored. + # + # Controls whether to disable exact keyword match on + # {::Google::Cloud::Talent::V4beta1::Job#title Job.title}, + # {::Google::Cloud::Talent::V4beta1::Job#description Job.description}, + # {::Google::Cloud::Talent::V4beta1::Job#company_display_name Job.company_display_name}, + # {::Google::Cloud::Talent::V4beta1::Job#addresses Job.addresses}, + # {::Google::Cloud::Talent::V4beta1::Job#qualifications Job.qualifications}. When + # disable keyword match is turned off, a keyword match returns jobs that do + # not match given category filters when there are matching keywords. For + # example, for the query "program manager," a result is returned even if the + # job posting has the title "software developer," which doesn't fall into + # "program manager" ontology, but does have "program manager" appearing in + # its description. + # + # For queries like "cloud" that don't contain title or + # location specific ontology, jobs with "cloud" keyword matches are returned + # regardless of this flag's value. + # + # Use + # {::Google::Cloud::Talent::V4beta1::Company#keyword_searchable_job_custom_attributes Company.keyword_searchable_job_custom_attributes} + # if company-specific globally matched custom field/attribute string values + # are needed. Enabling keyword match improves recall of subsequent search + # requests. + # + # Defaults to false. + # @!attribute [rw] keyword_match_mode + # @return [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode] + # Controls what keyword match options to use. + # + # Defaults to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_ALL KeywordMatchMode.KEYWORD_MATCH_ALL} + # if no value is specified. + # @!attribute [rw] relevance_threshold + # @return [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::RelevanceThreshold] + # Optional. The relevance threshold of the search results. + # + # Default to Google defined threshold, leveraging a balance of + # precision and recall to deliver both highly accurate results and + # comprehensive coverage of relevant information. + class SearchJobsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Custom ranking information for + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest SearchJobsRequest}. + # @!attribute [rw] importance_level + # @return [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo::ImportanceLevel] + # Required. Controls over how important the score of + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#ranking_expression CustomRankingInfo.ranking_expression} + # gets applied to job's final ranking position. + # + # An error is thrown if not specified. + # @!attribute [rw] ranking_expression + # @return [::String] + # Required. Controls over how job documents get ranked on top of existing + # relevance score (determined by API algorithm). A combination of the + # ranking expression and relevance score is used to determine job's final + # ranking position. + # + # The syntax for this expression is a subset of Google SQL syntax. + # + # Supported operators are: +, -, *, /, where the left and right side of + # the operator is either a numeric + # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes} + # key, integer/double value or an expression that can be evaluated to a + # number. + # + # Parenthesis are supported to adjust calculation precedence. The + # expression must be < 200 characters in length. + # + # The expression is considered invalid for a job if the expression + # references custom attributes that are not populated on the job or if the + # expression results in a divide by zero. If an expression is invalid for a + # job, that job is demoted to the end of the results. + # + # Sample ranking expression + # (year + 25) * 0.25 - (freshness / 0.5) + class CustomRankingInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The importance level for + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#ranking_expression CustomRankingInfo.ranking_expression}. + module ImportanceLevel + # Default value if the importance level isn't specified. + IMPORTANCE_LEVEL_UNSPECIFIED = 0 + + # The given ranking expression is of None importance, existing relevance + # score (determined by API algorithm) dominates job's final ranking + # position. + NONE = 1 + + # The given ranking expression is of Low importance in terms of job's + # final ranking position compared to existing relevance + # score (determined by API algorithm). + LOW = 2 + + # The given ranking expression is of Mild importance in terms of job's + # final ranking position compared to existing relevance + # score (determined by API algorithm). + MILD = 3 + + # The given ranking expression is of Medium importance in terms of job's + # final ranking position compared to existing relevance + # score (determined by API algorithm). + MEDIUM = 4 + + # The given ranking expression is of High importance in terms of job's + # final ranking position compared to existing relevance + # score (determined by API algorithm). + HIGH = 5 + + # The given ranking expression is of Extreme importance, and dominates + # job's final ranking position with existing relevance + # score (determined by API algorithm) ignored. + EXTREME = 6 + end + end + + # A string-represented enumeration of the job search mode. The service + # operate differently for different modes of service. + module SearchMode + # The mode of the search method isn't specified. The default search + # behavior is identical to JOB_SEARCH search behavior. + SEARCH_MODE_UNSPECIFIED = 0 + + # The job search matches against all jobs, and featured jobs + # (jobs with promotionValue > 0) are not specially handled. + JOB_SEARCH = 1 + + # The job search matches only against featured jobs (jobs with a + # promotionValue > 0). This method doesn't return any jobs having a + # promotionValue <= 0. The search results order is determined by the + # promotionValue (jobs with a higher promotionValue are returned higher up + # in the search results), with relevance being used as a tiebreaker. + FEATURED_JOB_SEARCH = 2 + end + + # Controls whether highly similar jobs are returned next to each other in + # the search results. Jobs are identified as highly similar based on + # their titles, job categories, and locations. Highly similar results are + # clustered so that only one representative job of the cluster is + # displayed to the job seeker higher up in the results, with the other jobs + # being displayed lower down in the results. + module DiversificationLevel + # The diversification level isn't specified. + DIVERSIFICATION_LEVEL_UNSPECIFIED = 0 + + # Disables diversification. Jobs that would normally be pushed to the last + # page would not have their positions altered. This may result in highly + # similar jobs appearing in sequence in the search results. + DISABLED = 1 + + # Default diversifying behavior. The result list is ordered so that + # highly similar results are pushed to the end of the last page of search + # results. If you are using pageToken to page through the result set, + # latency might be lower but we can't guarantee that all results are + # returned. If you are using page offset, latency might be higher but all + # results are returned. + SIMPLE = 2 + end + + # Controls what keyword matching behavior the search has. When keyword + # matching is enabled, a keyword match returns jobs that may not match given + # category filters when there are matching keywords. For example, for the + # query "program manager" with KeywordMatchMode set to KEYWORD_MATCH_ALL, a + # job posting with the title "software developer," which doesn't fall into + # "program manager" ontology, and "program manager" appearing in its + # description will be surfaced. + # + # For queries like "cloud" that don't contain title or + # location specific ontology, jobs with "cloud" keyword matches are returned + # regardless of this enum's value. + # + # Use + # {::Google::Cloud::Talent::V4beta1::Company#keyword_searchable_job_custom_attributes Company.keyword_searchable_job_custom_attributes} + # if company-specific globally matched custom field/attribute string values + # are needed. Enabling keyword match improves recall of subsequent search + # requests. + module KeywordMatchMode + # The keyword match option isn't specified. Defaults to + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_ALL KeywordMatchMode.KEYWORD_MATCH_ALL} + # behavior. + KEYWORD_MATCH_MODE_UNSPECIFIED = 0 + + # Disables keyword matching. + KEYWORD_MATCH_DISABLED = 1 + + # Enable keyword matching over + # {::Google::Cloud::Talent::V4beta1::Job#title Job.title}, + # {::Google::Cloud::Talent::V4beta1::Job#description Job.description}, + # {::Google::Cloud::Talent::V4beta1::Job#company_display_name Job.company_display_name}, + # {::Google::Cloud::Talent::V4beta1::Job#addresses Job.addresses}, + # {::Google::Cloud::Talent::V4beta1::Job#qualifications Job.qualifications}, and + # keyword searchable + # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes} + # fields. + KEYWORD_MATCH_ALL = 2 + + # Only enable keyword matching over + # {::Google::Cloud::Talent::V4beta1::Job#title Job.title}. + KEYWORD_MATCH_TITLE_ONLY = 3 + end + + # The relevance threshold of the search results. The higher relevance + # threshold is, the higher relevant results are shown and the less number of + # results are returned. + module RelevanceThreshold + # Default value. In this case, server behavior defaults to Google defined + # threshold. + RELEVANCE_THRESHOLD_UNSPECIFIED = 0 + + # Lowest relevance threshold. + LOWEST = 1 + + # Low relevance threshold. + LOW = 2 + + # Medium relevance threshold. + MEDIUM = 3 + + # High relevance threshold. + HIGH = 4 + end + end + + # Response for SearchJob method. + # @!attribute [rw] matching_jobs + # @return [::Array<::Google::Cloud::Talent::V4beta1::SearchJobsResponse::MatchingJob>] + # The Job entities that match the specified + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest SearchJobsRequest}. + # @!attribute [rw] histogram_query_results + # @return [::Array<::Google::Cloud::Talent::V4beta1::HistogramQueryResult>] + # The histogram results that match with specified + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#histogram_queries SearchJobsRequest.histogram_queries}. + # @!attribute [rw] next_page_token + # @return [::String] + # The token that specifies the starting position of the next page of results. + # This field is empty if there are no more results. + # @!attribute [rw] location_filters + # @return [::Array<::Google::Cloud::Talent::V4beta1::Location>] + # The location filters that the service applied to the specified query. If + # any filters are lat-lng based, the + # {::Google::Cloud::Talent::V4beta1::Location#location_type Location.location_type} + # is + # {::Google::Cloud::Talent::V4beta1::Location::LocationType::LOCATION_TYPE_UNSPECIFIED Location.LocationType.LOCATION_TYPE_UNSPECIFIED}. + # @!attribute [rw] estimated_total_size + # @return [::Integer] + # An estimation of the number of jobs that match the specified query. + # + # This number isn't guaranteed to be accurate. For accurate results, + # see + # {::Google::Cloud::Talent::V4beta1::SearchJobsResponse#total_size SearchJobsResponse.total_size}. + # @!attribute [rw] total_size + # @return [::Integer] + # The precise result count with limit 100,000. + # @!attribute [rw] metadata + # @return [::Google::Cloud::Talent::V4beta1::ResponseMetadata] + # Additional information for the API invocation, such as the request + # tracking id. + # @!attribute [rw] broadened_query_jobs_count + # @return [::Integer] + # If query broadening is enabled, we may append additional results from the + # broadened query. This number indicates how many of the jobs returned in the + # jobs field are from the broadened query. These results are always at the + # end of the jobs list. In particular, a value of 0, or if the field isn't + # set, all the jobs in the jobs list are from the original + # (without broadening) query. If this field is non-zero, subsequent requests + # with offset after this result set should contain all broadened results. + # @!attribute [rw] spell_correction + # @return [::Google::Cloud::Talent::V4beta1::SpellingCorrection] + # The spell checking result, and correction. + class SearchJobsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Job entry with metadata inside + # {::Google::Cloud::Talent::V4beta1::SearchJobsResponse SearchJobsResponse}. + # @!attribute [rw] job + # @return [::Google::Cloud::Talent::V4beta1::Job] + # Job resource that matches the specified + # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest SearchJobsRequest}. + # @!attribute [rw] job_summary + # @return [::String] + # A summary of the job with core information that's displayed on the search + # results listing page. + # @!attribute [rw] job_title_snippet + # @return [::String] + # Contains snippets of text from the + # {::Google::Cloud::Talent::V4beta1::Job#title Job.title} field most closely + # matching a search query's keywords, if available. The matching query + # keywords are enclosed in HTML bold tags. + # @!attribute [rw] search_text_snippet + # @return [::String] + # Contains snippets of text from the + # {::Google::Cloud::Talent::V4beta1::Job#description Job.description} and + # similar fields that most closely match a search query's keywords, if + # available. All HTML tags in the original fields are stripped when + # returned in this field, and matching query keywords are enclosed in HTML + # bold tags. + # @!attribute [rw] commute_info + # @return [::Google::Cloud::Talent::V4beta1::SearchJobsResponse::CommuteInfo] + # Commute information which is generated based on specified + # {::Google::Cloud::Talent::V4beta1::CommuteFilter CommuteFilter}. + class MatchingJob + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Commute details related to this job. + # @!attribute [rw] job_location + # @return [::Google::Cloud::Talent::V4beta1::Location] + # Location used as the destination in the commute calculation. + # @!attribute [rw] travel_duration + # @return [::Google::Protobuf::Duration] + # The number of seconds required to travel to the job location from the + # query location. A duration of 0 seconds indicates that the job isn't + # reachable within the requested duration, but was returned as part of an + # expanded query. + class CommuteInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request to create a batch of jobs. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the tenant under which the job is created. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, + # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + # is created. For example, "projects/foo". + # @!attribute [rw] jobs + # @return [::Array<::Google::Cloud::Talent::V4beta1::Job>] + # Required. The jobs to be created. + class BatchCreateJobsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to update a batch of jobs. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the tenant under which the job is created. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, + # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant + # is created. For example, "projects/foo". + # @!attribute [rw] jobs + # @return [::Array<::Google::Cloud::Talent::V4beta1::Job>] + # Required. The jobs to be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Strongly recommended for the best service experience. Be aware that it will + # also increase latency when checking the status of a batch operation. + # + # If + # {::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest#update_mask update_mask} + # is provided, only the specified fields in + # {::Google::Cloud::Talent::V4beta1::Job Job} are updated. Otherwise all the + # fields are updated. + # + # A field mask to restrict the fields that are updated. Only + # top level fields of {::Google::Cloud::Talent::V4beta1::Job Job} are supported. + # + # If + # {::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest#update_mask update_mask} + # is provided, The {::Google::Cloud::Talent::V4beta1::Job Job} inside + # {::Google::Cloud::Talent::V4beta1::JobOperationResult::JobResult JobResult} + # will only contains fields that is updated, plus the Id of the Job. + # Otherwise, {::Google::Cloud::Talent::V4beta1::Job Job} will include all fields, + # which can yield a very large response. + class BatchUpdateJobsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The result of + # {::Google::Cloud::Talent::V4beta1::JobService::Client#batch_create_jobs JobService.BatchCreateJobs} + # or + # {::Google::Cloud::Talent::V4beta1::JobService::Client#batch_update_jobs JobService.BatchUpdateJobs} + # APIs. It's used to replace + # {::Google::Longrunning::Operation#response google.longrunning.Operation.response} + # in case of success. + # @!attribute [rw] job_results + # @return [::Array<::Google::Cloud::Talent::V4beta1::JobOperationResult::JobResult>] + # List of job mutation results from a batch mutate operation. It can change + # until operation status is FINISHED, FAILED or CANCELLED. + class JobOperationResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Mutation result of a job. + # @!attribute [rw] job + # @return [::Google::Cloud::Talent::V4beta1::Job] + # Here {::Google::Cloud::Talent::V4beta1::Job Job} only contains basic + # information including {::Google::Cloud::Talent::V4beta1::Job#name name}, + # {::Google::Cloud::Talent::V4beta1::Job#company company}, + # {::Google::Cloud::Talent::V4beta1::Job#language_code language_code} and + # {::Google::Cloud::Talent::V4beta1::Job#requisition_id requisition_id}, use + # getJob method to retrieve detailed information of the created/updated + # job. + # @!attribute [rw] status + # @return [::Google::Rpc::Status] + # The status of the job processed. This field is populated if the + # processing of the + # {::Google::Cloud::Talent::V4beta1::JobOperationResult::JobResult#job job} + # fails. + class JobResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # An enum that specifies the job attributes that are returned in the + # {::Google::Cloud::Talent::V4beta1::SearchJobsResponse::MatchingJob#job MatchingJob.job} + # or {::Google::Cloud::Talent::V4beta1::ListJobsResponse#jobs ListJobsResponse.jobs} + # fields. + module JobView + # Default value. + JOB_VIEW_UNSPECIFIED = 0 + + # A ID only view of job, with following attributes: + # {::Google::Cloud::Talent::V4beta1::Job#name Job.name}, + # {::Google::Cloud::Talent::V4beta1::Job#requisition_id Job.requisition_id}, + # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}. + JOB_VIEW_ID_ONLY = 1 + + # A minimal view of the job, with the following attributes: + # {::Google::Cloud::Talent::V4beta1::Job#name Job.name}, + # {::Google::Cloud::Talent::V4beta1::Job#requisition_id Job.requisition_id}, + # {::Google::Cloud::Talent::V4beta1::Job#title Job.title}, + # {::Google::Cloud::Talent::V4beta1::Job#company Job.company}, + # {::Google::Cloud::Talent::V4beta1::Job::DerivedInfo#locations Job.DerivedInfo.locations}, + # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}. + JOB_VIEW_MINIMAL = 2 + + # A small view of the job, with the following attributes in the search + # results: {::Google::Cloud::Talent::V4beta1::Job#name Job.name}, + # {::Google::Cloud::Talent::V4beta1::Job#requisition_id Job.requisition_id}, + # {::Google::Cloud::Talent::V4beta1::Job#title Job.title}, + # {::Google::Cloud::Talent::V4beta1::Job#company Job.company}, + # {::Google::Cloud::Talent::V4beta1::Job::DerivedInfo#locations Job.DerivedInfo.locations}, + # {::Google::Cloud::Talent::V4beta1::Job#visibility Job.visibility}, + # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}, + # {::Google::Cloud::Talent::V4beta1::Job#description Job.description}. + JOB_VIEW_SMALL = 3 + + # All available attributes are included in the search results. + JOB_VIEW_FULL = 4 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/tenant.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/tenant.rb new file mode 100644 index 000000000000..753ca78ba193 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/tenant.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! + + +module Google + module Cloud + module Talent + module V4beta1 + # A Tenant resource represents a tenant in the service. A tenant is a group or + # entity that shares common access with specific privileges for resources like + # profiles. Customer may create multiple tenants to provide data isolation for + # different groups. + # @!attribute [rw] name + # @return [::String] + # Required during tenant update. + # + # The resource name for a tenant. This is generated by the service when a + # tenant is created. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, + # "projects/foo/tenants/bar". + # @!attribute [rw] external_id + # @return [::String] + # Required. Client side tenant identifier, used to uniquely identify the + # tenant. + # + # The maximum number of allowed characters is 255. + # @!attribute [rw] usage_type + # @return [::Google::Cloud::Talent::V4beta1::Tenant::DataUsageType] + # Indicates whether data owned by this tenant may be used to provide product + # improvements across other tenants. + # + # Defaults behavior is + # {::Google::Cloud::Talent::V4beta1::Tenant::DataUsageType::ISOLATED DataUsageType.ISOLATED} + # if it's unset. + # @!attribute [rw] keyword_searchable_profile_custom_attributes + # @return [::Array<::String>] + # A list of keys of filterable + # [Profile.custom_attributes][google.cloud.talent.v4beta1.Profile.custom_attributes], + # whose corresponding `string_values` are used in keyword searches. Profiles + # with `string_values` under these specified field keys are returned if any + # of the values match the search keyword. Custom field values with + # parenthesis, brackets and special symbols are not searchable as-is, + # and must be surrounded by quotes. + class Tenant + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum that represents how user data owned by the tenant is used. + module DataUsageType + # Default value. + DATA_USAGE_TYPE_UNSPECIFIED = 0 + + # Data owned by this tenant is used to improve search/recommendation + # quality across tenants. + AGGREGATED = 1 + + # Data owned by this tenant is used to improve search/recommendation + # quality for this tenant only. + ISOLATED = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/tenant_service.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/tenant_service.rb new file mode 100644 index 000000000000..25d9ffc34d5c --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/tenant_service.rb @@ -0,0 +1,123 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Talent + module V4beta1 + # The Request of the CreateTenant method. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the project under which the tenant is created. + # + # The format is "projects/\\{project_id}", for example, + # "projects/foo". + # @!attribute [rw] tenant + # @return [::Google::Cloud::Talent::V4beta1::Tenant] + # Required. The tenant to be created. + class CreateTenantRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for getting a tenant by name. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the tenant to be retrieved. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, + # "projects/foo/tenants/bar". + class GetTenantRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for updating a specified tenant. + # @!attribute [rw] tenant + # @return [::Google::Cloud::Talent::V4beta1::Tenant] + # Required. The tenant resource to replace the current resource in the + # system. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Strongly recommended for the best service experience. + # + # If + # {::Google::Cloud::Talent::V4beta1::UpdateTenantRequest#update_mask update_mask} + # is provided, only the specified fields in + # {::Google::Cloud::Talent::V4beta1::UpdateTenantRequest#tenant tenant} are + # updated. Otherwise all the fields are updated. + # + # A field mask to specify the tenant fields to be updated. Only + # top level fields of {::Google::Cloud::Talent::V4beta1::Tenant Tenant} are + # supported. + class UpdateTenantRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to delete a tenant. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the tenant to be deleted. + # + # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, + # "projects/foo/tenants/bar". + class DeleteTenantRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List tenants for which the client has ACL visibility. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the project under which the tenant is created. + # + # The format is "projects/\\{project_id}", for example, + # "projects/foo". + # @!attribute [rw] page_token + # @return [::String] + # The starting indicator from which to return results. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of tenants to be returned, at most 100. + # Default is 100 if a non-positive number is provided. + class ListTenantsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The List tenants response object. + # @!attribute [rw] tenants + # @return [::Array<::Google::Cloud::Talent::V4beta1::Tenant>] + # Tenants for the current client. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. + # @!attribute [rw] metadata + # @return [::Google::Cloud::Talent::V4beta1::ResponseMetadata] + # Additional information for the API invocation, such as the request + # tracking id. + class ListTenantsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..9a7c0269fa42 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/wrappers.rb @@ -0,0 +1,148 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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`. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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-talent-v4beta1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/proto_docs/google/type/latlng.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/type/latlng.rb new file mode 100644 index 000000000000..c15e78a39a56 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/proto_docs/google/type/money.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/type/money.rb new file mode 100644 index 000000000000..56a32eee300d --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/type/money.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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 an amount of money with its currency type. + # @!attribute [rw] currency_code + # @return [::String] + # The three-letter currency code defined in ISO 4217. + # @!attribute [rw] units + # @return [::Integer] + # The whole units of the amount. + # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. + # @!attribute [rw] nanos + # @return [::Integer] + # Number of nano (10^-9) units of the amount. + # The value must be between -999,999,999 and +999,999,999 inclusive. + # If `units` is positive, `nanos` must be positive or zero. + # If `units` is zero, `nanos` can be positive, zero, or negative. + # If `units` is negative, `nanos` must be negative or zero. + # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. + class Money + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/type/postal_address.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/type/postal_address.rb new file mode 100644 index 000000000000..9cd0c16495dd --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/proto_docs/google/type/timeofday.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/type/timeofday.rb new file mode 100644 index 000000000000..8372dad8beb8 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/Gemfile new file mode 100644 index 000000000000..4f040c286bc0 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1", path: "../" +else + gem "google-cloud-talent-v4beta1" +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-talent-v4beta1/snippets/company_service/create_company.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/create_company.rb new file mode 100644 index 000000000000..6b8b2dacf42b --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/create_company.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 jobs_v4beta1_generated_CompanyService_CreateCompany_sync] +require "google/cloud/talent/v4beta1" + +## +# Snippet for the create_company call in the CompanyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Talent::V4beta1::CompanyService::Client#create_company. +# +def create_company + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Talent::V4beta1::CompanyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Talent::V4beta1::CreateCompanyRequest.new + + # Call the create_company method. + result = client.create_company request + + # The returned object is of type Google::Cloud::Talent::V4beta1::Company. + p result +end +# [END jobs_v4beta1_generated_CompanyService_CreateCompany_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/delete_company.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/delete_company.rb new file mode 100644 index 000000000000..e48c9d498ed6 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/delete_company.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 jobs_v4beta1_generated_CompanyService_DeleteCompany_sync] +require "google/cloud/talent/v4beta1" + +## +# Snippet for the delete_company call in the CompanyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Talent::V4beta1::CompanyService::Client#delete_company. +# +def delete_company + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Talent::V4beta1::CompanyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Talent::V4beta1::DeleteCompanyRequest.new + + # Call the delete_company method. + result = client.delete_company request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END jobs_v4beta1_generated_CompanyService_DeleteCompany_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/get_company.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/get_company.rb new file mode 100644 index 000000000000..3e959944036d --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/get_company.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 jobs_v4beta1_generated_CompanyService_GetCompany_sync] +require "google/cloud/talent/v4beta1" + +## +# Snippet for the get_company call in the CompanyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Talent::V4beta1::CompanyService::Client#get_company. +# +def get_company + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Talent::V4beta1::CompanyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Talent::V4beta1::GetCompanyRequest.new + + # Call the get_company method. + result = client.get_company request + + # The returned object is of type Google::Cloud::Talent::V4beta1::Company. + p result +end +# [END jobs_v4beta1_generated_CompanyService_GetCompany_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/list_companies.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/list_companies.rb new file mode 100644 index 000000000000..b54cf08a88ea --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/list_companies.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 jobs_v4beta1_generated_CompanyService_ListCompanies_sync] +require "google/cloud/talent/v4beta1" + +## +# Snippet for the list_companies call in the CompanyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Talent::V4beta1::CompanyService::Client#list_companies. +# +def list_companies + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Talent::V4beta1::CompanyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Talent::V4beta1::ListCompaniesRequest.new + + # Call the list_companies method. + result = client.list_companies request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Talent::V4beta1::Company. + p item + end +end +# [END jobs_v4beta1_generated_CompanyService_ListCompanies_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/update_company.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/update_company.rb new file mode 100644 index 000000000000..76f7dfb2fd71 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/update_company.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 jobs_v4beta1_generated_CompanyService_UpdateCompany_sync] +require "google/cloud/talent/v4beta1" + +## +# Snippet for the update_company call in the CompanyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Talent::V4beta1::CompanyService::Client#update_company. +# +def update_company + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Talent::V4beta1::CompanyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Talent::V4beta1::UpdateCompanyRequest.new + + # Call the update_company method. + result = client.update_company request + + # The returned object is of type Google::Cloud::Talent::V4beta1::Company. + p result +end +# [END jobs_v4beta1_generated_CompanyService_UpdateCompany_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/completion/complete_query.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/completion/complete_query.rb new file mode 100644 index 000000000000..115a3726dcbb --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/completion/complete_query.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 jobs_v4beta1_generated_Completion_CompleteQuery_sync] +require "google/cloud/talent/v4beta1" + +## +# Snippet for the complete_query call in the Completion service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Talent::V4beta1::Completion::Client#complete_query. +# +def complete_query + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Talent::V4beta1::Completion::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Talent::V4beta1::CompleteQueryRequest.new + + # Call the complete_query method. + result = client.complete_query request + + # The returned object is of type Google::Cloud::Talent::V4beta1::CompleteQueryResponse. + p result +end +# [END jobs_v4beta1_generated_Completion_CompleteQuery_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/event_service/create_client_event.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/event_service/create_client_event.rb new file mode 100644 index 000000000000..8bb1b5d44021 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/event_service/create_client_event.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 jobs_v4beta1_generated_EventService_CreateClientEvent_sync] +require "google/cloud/talent/v4beta1" + +## +# Snippet for the create_client_event call in the EventService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Talent::V4beta1::EventService::Client#create_client_event. +# +def create_client_event + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Talent::V4beta1::EventService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Talent::V4beta1::CreateClientEventRequest.new + + # Call the create_client_event method. + result = client.create_client_event request + + # The returned object is of type Google::Cloud::Talent::V4beta1::ClientEvent. + p result +end +# [END jobs_v4beta1_generated_EventService_CreateClientEvent_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/batch_create_jobs.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/batch_create_jobs.rb new file mode 100644 index 000000000000..52410b1d37e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/batch_create_jobs.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 jobs_v4beta1_generated_JobService_BatchCreateJobs_sync] +require "google/cloud/talent/v4beta1" + +## +# Snippet for the batch_create_jobs call in the JobService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Talent::V4beta1::JobService::Client#batch_create_jobs. +# +def batch_create_jobs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Talent::V4beta1::JobService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest.new + + # Call the batch_create_jobs method. + result = client.batch_create_jobs request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END jobs_v4beta1_generated_JobService_BatchCreateJobs_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/batch_delete_jobs.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/batch_delete_jobs.rb new file mode 100644 index 000000000000..f3027a6f9bab --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/batch_delete_jobs.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 jobs_v4beta1_generated_JobService_BatchDeleteJobs_sync] +require "google/cloud/talent/v4beta1" + +## +# Snippet for the batch_delete_jobs call in the JobService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Talent::V4beta1::JobService::Client#batch_delete_jobs. +# +def batch_delete_jobs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Talent::V4beta1::JobService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest.new + + # Call the batch_delete_jobs method. + result = client.batch_delete_jobs request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END jobs_v4beta1_generated_JobService_BatchDeleteJobs_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/batch_update_jobs.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/batch_update_jobs.rb new file mode 100644 index 000000000000..705897a8a222 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/batch_update_jobs.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 jobs_v4beta1_generated_JobService_BatchUpdateJobs_sync] +require "google/cloud/talent/v4beta1" + +## +# Snippet for the batch_update_jobs call in the JobService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Talent::V4beta1::JobService::Client#batch_update_jobs. +# +def batch_update_jobs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Talent::V4beta1::JobService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest.new + + # Call the batch_update_jobs method. + result = client.batch_update_jobs request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END jobs_v4beta1_generated_JobService_BatchUpdateJobs_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/create_job.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/create_job.rb new file mode 100644 index 000000000000..2bc55828df04 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/create_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START jobs_v4beta1_generated_JobService_CreateJob_sync] +require "google/cloud/talent/v4beta1" + +## +# Snippet for the create_job call in the JobService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Talent::V4beta1::JobService::Client#create_job. +# +def create_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Talent::V4beta1::JobService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Talent::V4beta1::CreateJobRequest.new + + # Call the create_job method. + result = client.create_job request + + # The returned object is of type Google::Cloud::Talent::V4beta1::Job. + p result +end +# [END jobs_v4beta1_generated_JobService_CreateJob_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/delete_job.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/delete_job.rb new file mode 100644 index 000000000000..3ae4c08f0537 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/delete_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START jobs_v4beta1_generated_JobService_DeleteJob_sync] +require "google/cloud/talent/v4beta1" + +## +# Snippet for the delete_job call in the JobService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Talent::V4beta1::JobService::Client#delete_job. +# +def delete_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Talent::V4beta1::JobService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Talent::V4beta1::DeleteJobRequest.new + + # Call the delete_job method. + result = client.delete_job request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END jobs_v4beta1_generated_JobService_DeleteJob_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/get_job.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/get_job.rb new file mode 100644 index 000000000000..5791d265581b --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/get_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START jobs_v4beta1_generated_JobService_GetJob_sync] +require "google/cloud/talent/v4beta1" + +## +# Snippet for the get_job call in the JobService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Talent::V4beta1::JobService::Client#get_job. +# +def get_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Talent::V4beta1::JobService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Talent::V4beta1::GetJobRequest.new + + # Call the get_job method. + result = client.get_job request + + # The returned object is of type Google::Cloud::Talent::V4beta1::Job. + p result +end +# [END jobs_v4beta1_generated_JobService_GetJob_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/list_jobs.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/list_jobs.rb new file mode 100644 index 000000000000..3f3c15a1a8a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/list_jobs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START jobs_v4beta1_generated_JobService_ListJobs_sync] +require "google/cloud/talent/v4beta1" + +## +# Snippet for the list_jobs call in the JobService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Talent::V4beta1::JobService::Client#list_jobs. +# +def list_jobs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Talent::V4beta1::JobService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Talent::V4beta1::ListJobsRequest.new + + # Call the list_jobs method. + result = client.list_jobs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Talent::V4beta1::Job. + p item + end +end +# [END jobs_v4beta1_generated_JobService_ListJobs_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/search_jobs.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/search_jobs.rb new file mode 100644 index 000000000000..fa31d7955f21 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/search_jobs.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 jobs_v4beta1_generated_JobService_SearchJobs_sync] +require "google/cloud/talent/v4beta1" + +## +# Snippet for the search_jobs call in the JobService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Talent::V4beta1::JobService::Client#search_jobs. +# +def search_jobs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Talent::V4beta1::JobService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Talent::V4beta1::SearchJobsRequest.new + + # Call the search_jobs method. + result = client.search_jobs request + + # The returned object is of type Google::Cloud::Talent::V4beta1::SearchJobsResponse. + p result +end +# [END jobs_v4beta1_generated_JobService_SearchJobs_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/search_jobs_for_alert.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/search_jobs_for_alert.rb new file mode 100644 index 000000000000..1407454f27d0 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/search_jobs_for_alert.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 jobs_v4beta1_generated_JobService_SearchJobsForAlert_sync] +require "google/cloud/talent/v4beta1" + +## +# Snippet for the search_jobs_for_alert call in the JobService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Talent::V4beta1::JobService::Client#search_jobs_for_alert. +# +def search_jobs_for_alert + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Talent::V4beta1::JobService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Talent::V4beta1::SearchJobsRequest.new + + # Call the search_jobs_for_alert method. + result = client.search_jobs_for_alert request + + # The returned object is of type Google::Cloud::Talent::V4beta1::SearchJobsResponse. + p result +end +# [END jobs_v4beta1_generated_JobService_SearchJobsForAlert_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/update_job.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/update_job.rb new file mode 100644 index 000000000000..4e67dd7eb051 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/update_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START jobs_v4beta1_generated_JobService_UpdateJob_sync] +require "google/cloud/talent/v4beta1" + +## +# Snippet for the update_job call in the JobService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Talent::V4beta1::JobService::Client#update_job. +# +def update_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Talent::V4beta1::JobService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Talent::V4beta1::UpdateJobRequest.new + + # Call the update_job method. + result = client.update_job request + + # The returned object is of type Google::Cloud::Talent::V4beta1::Job. + p result +end +# [END jobs_v4beta1_generated_JobService_UpdateJob_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/snippet_metadata_google.cloud.talent.v4beta1.json b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/snippet_metadata_google.cloud.talent.v4beta1.json new file mode 100644 index 000000000000..d2cdb2a5f735 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/snippet_metadata_google.cloud.talent.v4beta1.json @@ -0,0 +1,895 @@ +{ + "client_library": { + "name": "google-cloud-talent-v4beta1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.talent.v4beta1", + "version": "v4beta1" + } + ] + }, + "snippets": [ + { + "region_tag": "jobs_v4beta1_generated_CompanyService_CreateCompany_sync", + "title": "Snippet for the create_company call in the CompanyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::CompanyService::Client#create_company.", + "file": "company_service/create_company.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_company", + "full_name": "::Google::Cloud::Talent::V4beta1::CompanyService::Client#create_company", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Talent::V4beta1::CreateCompanyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Talent::V4beta1::Company", + "client": { + "short_name": "CompanyService::Client", + "full_name": "::Google::Cloud::Talent::V4beta1::CompanyService::Client" + }, + "method": { + "short_name": "CreateCompany", + "full_name": "google.cloud.talent.v4beta1.CompanyService.CreateCompany", + "service": { + "short_name": "CompanyService", + "full_name": "google.cloud.talent.v4beta1.CompanyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "jobs_v4beta1_generated_CompanyService_GetCompany_sync", + "title": "Snippet for the get_company call in the CompanyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::CompanyService::Client#get_company.", + "file": "company_service/get_company.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_company", + "full_name": "::Google::Cloud::Talent::V4beta1::CompanyService::Client#get_company", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Talent::V4beta1::GetCompanyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Talent::V4beta1::Company", + "client": { + "short_name": "CompanyService::Client", + "full_name": "::Google::Cloud::Talent::V4beta1::CompanyService::Client" + }, + "method": { + "short_name": "GetCompany", + "full_name": "google.cloud.talent.v4beta1.CompanyService.GetCompany", + "service": { + "short_name": "CompanyService", + "full_name": "google.cloud.talent.v4beta1.CompanyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "jobs_v4beta1_generated_CompanyService_UpdateCompany_sync", + "title": "Snippet for the update_company call in the CompanyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::CompanyService::Client#update_company.", + "file": "company_service/update_company.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_company", + "full_name": "::Google::Cloud::Talent::V4beta1::CompanyService::Client#update_company", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Talent::V4beta1::Company", + "client": { + "short_name": "CompanyService::Client", + "full_name": "::Google::Cloud::Talent::V4beta1::CompanyService::Client" + }, + "method": { + "short_name": "UpdateCompany", + "full_name": "google.cloud.talent.v4beta1.CompanyService.UpdateCompany", + "service": { + "short_name": "CompanyService", + "full_name": "google.cloud.talent.v4beta1.CompanyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "jobs_v4beta1_generated_CompanyService_DeleteCompany_sync", + "title": "Snippet for the delete_company call in the CompanyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::CompanyService::Client#delete_company.", + "file": "company_service/delete_company.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_company", + "full_name": "::Google::Cloud::Talent::V4beta1::CompanyService::Client#delete_company", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "CompanyService::Client", + "full_name": "::Google::Cloud::Talent::V4beta1::CompanyService::Client" + }, + "method": { + "short_name": "DeleteCompany", + "full_name": "google.cloud.talent.v4beta1.CompanyService.DeleteCompany", + "service": { + "short_name": "CompanyService", + "full_name": "google.cloud.talent.v4beta1.CompanyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "jobs_v4beta1_generated_CompanyService_ListCompanies_sync", + "title": "Snippet for the list_companies call in the CompanyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::CompanyService::Client#list_companies.", + "file": "company_service/list_companies.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_companies", + "full_name": "::Google::Cloud::Talent::V4beta1::CompanyService::Client#list_companies", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Talent::V4beta1::ListCompaniesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Talent::V4beta1::ListCompaniesResponse", + "client": { + "short_name": "CompanyService::Client", + "full_name": "::Google::Cloud::Talent::V4beta1::CompanyService::Client" + }, + "method": { + "short_name": "ListCompanies", + "full_name": "google.cloud.talent.v4beta1.CompanyService.ListCompanies", + "service": { + "short_name": "CompanyService", + "full_name": "google.cloud.talent.v4beta1.CompanyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "jobs_v4beta1_generated_Completion_CompleteQuery_sync", + "title": "Snippet for the complete_query call in the Completion service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::Completion::Client#complete_query.", + "file": "completion/complete_query.rb", + "language": "RUBY", + "client_method": { + "short_name": "complete_query", + "full_name": "::Google::Cloud::Talent::V4beta1::Completion::Client#complete_query", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Talent::V4beta1::CompleteQueryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Talent::V4beta1::CompleteQueryResponse", + "client": { + "short_name": "Completion::Client", + "full_name": "::Google::Cloud::Talent::V4beta1::Completion::Client" + }, + "method": { + "short_name": "CompleteQuery", + "full_name": "google.cloud.talent.v4beta1.Completion.CompleteQuery", + "service": { + "short_name": "Completion", + "full_name": "google.cloud.talent.v4beta1.Completion" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "jobs_v4beta1_generated_EventService_CreateClientEvent_sync", + "title": "Snippet for the create_client_event call in the EventService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::EventService::Client#create_client_event.", + "file": "event_service/create_client_event.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_client_event", + "full_name": "::Google::Cloud::Talent::V4beta1::EventService::Client#create_client_event", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Talent::V4beta1::CreateClientEventRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Talent::V4beta1::ClientEvent", + "client": { + "short_name": "EventService::Client", + "full_name": "::Google::Cloud::Talent::V4beta1::EventService::Client" + }, + "method": { + "short_name": "CreateClientEvent", + "full_name": "google.cloud.talent.v4beta1.EventService.CreateClientEvent", + "service": { + "short_name": "EventService", + "full_name": "google.cloud.talent.v4beta1.EventService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "jobs_v4beta1_generated_JobService_CreateJob_sync", + "title": "Snippet for the create_job call in the JobService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::JobService::Client#create_job.", + "file": "job_service/create_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_job", + "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client#create_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Talent::V4beta1::CreateJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Talent::V4beta1::Job", + "client": { + "short_name": "JobService::Client", + "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client" + }, + "method": { + "short_name": "CreateJob", + "full_name": "google.cloud.talent.v4beta1.JobService.CreateJob", + "service": { + "short_name": "JobService", + "full_name": "google.cloud.talent.v4beta1.JobService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "jobs_v4beta1_generated_JobService_BatchCreateJobs_sync", + "title": "Snippet for the batch_create_jobs call in the JobService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::JobService::Client#batch_create_jobs.", + "file": "job_service/batch_create_jobs.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_create_jobs", + "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client#batch_create_jobs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "JobService::Client", + "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client" + }, + "method": { + "short_name": "BatchCreateJobs", + "full_name": "google.cloud.talent.v4beta1.JobService.BatchCreateJobs", + "service": { + "short_name": "JobService", + "full_name": "google.cloud.talent.v4beta1.JobService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "jobs_v4beta1_generated_JobService_GetJob_sync", + "title": "Snippet for the get_job call in the JobService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::JobService::Client#get_job.", + "file": "job_service/get_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_job", + "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client#get_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Talent::V4beta1::GetJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Talent::V4beta1::Job", + "client": { + "short_name": "JobService::Client", + "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client" + }, + "method": { + "short_name": "GetJob", + "full_name": "google.cloud.talent.v4beta1.JobService.GetJob", + "service": { + "short_name": "JobService", + "full_name": "google.cloud.talent.v4beta1.JobService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "jobs_v4beta1_generated_JobService_UpdateJob_sync", + "title": "Snippet for the update_job call in the JobService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::JobService::Client#update_job.", + "file": "job_service/update_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_job", + "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client#update_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Talent::V4beta1::UpdateJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Talent::V4beta1::Job", + "client": { + "short_name": "JobService::Client", + "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client" + }, + "method": { + "short_name": "UpdateJob", + "full_name": "google.cloud.talent.v4beta1.JobService.UpdateJob", + "service": { + "short_name": "JobService", + "full_name": "google.cloud.talent.v4beta1.JobService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "jobs_v4beta1_generated_JobService_BatchUpdateJobs_sync", + "title": "Snippet for the batch_update_jobs call in the JobService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::JobService::Client#batch_update_jobs.", + "file": "job_service/batch_update_jobs.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_update_jobs", + "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client#batch_update_jobs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "JobService::Client", + "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client" + }, + "method": { + "short_name": "BatchUpdateJobs", + "full_name": "google.cloud.talent.v4beta1.JobService.BatchUpdateJobs", + "service": { + "short_name": "JobService", + "full_name": "google.cloud.talent.v4beta1.JobService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "jobs_v4beta1_generated_JobService_DeleteJob_sync", + "title": "Snippet for the delete_job call in the JobService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::JobService::Client#delete_job.", + "file": "job_service/delete_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_job", + "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client#delete_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Talent::V4beta1::DeleteJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "JobService::Client", + "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client" + }, + "method": { + "short_name": "DeleteJob", + "full_name": "google.cloud.talent.v4beta1.JobService.DeleteJob", + "service": { + "short_name": "JobService", + "full_name": "google.cloud.talent.v4beta1.JobService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "jobs_v4beta1_generated_JobService_BatchDeleteJobs_sync", + "title": "Snippet for the batch_delete_jobs call in the JobService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::JobService::Client#batch_delete_jobs.", + "file": "job_service/batch_delete_jobs.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_delete_jobs", + "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client#batch_delete_jobs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "JobService::Client", + "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client" + }, + "method": { + "short_name": "BatchDeleteJobs", + "full_name": "google.cloud.talent.v4beta1.JobService.BatchDeleteJobs", + "service": { + "short_name": "JobService", + "full_name": "google.cloud.talent.v4beta1.JobService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "jobs_v4beta1_generated_JobService_ListJobs_sync", + "title": "Snippet for the list_jobs call in the JobService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::JobService::Client#list_jobs.", + "file": "job_service/list_jobs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_jobs", + "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client#list_jobs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Talent::V4beta1::ListJobsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Talent::V4beta1::ListJobsResponse", + "client": { + "short_name": "JobService::Client", + "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client" + }, + "method": { + "short_name": "ListJobs", + "full_name": "google.cloud.talent.v4beta1.JobService.ListJobs", + "service": { + "short_name": "JobService", + "full_name": "google.cloud.talent.v4beta1.JobService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "jobs_v4beta1_generated_JobService_SearchJobs_sync", + "title": "Snippet for the search_jobs call in the JobService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::JobService::Client#search_jobs.", + "file": "job_service/search_jobs.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_jobs", + "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client#search_jobs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Talent::V4beta1::SearchJobsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Talent::V4beta1::SearchJobsResponse", + "client": { + "short_name": "JobService::Client", + "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client" + }, + "method": { + "short_name": "SearchJobs", + "full_name": "google.cloud.talent.v4beta1.JobService.SearchJobs", + "service": { + "short_name": "JobService", + "full_name": "google.cloud.talent.v4beta1.JobService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "jobs_v4beta1_generated_JobService_SearchJobsForAlert_sync", + "title": "Snippet for the search_jobs_for_alert call in the JobService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::JobService::Client#search_jobs_for_alert.", + "file": "job_service/search_jobs_for_alert.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_jobs_for_alert", + "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client#search_jobs_for_alert", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Talent::V4beta1::SearchJobsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Talent::V4beta1::SearchJobsResponse", + "client": { + "short_name": "JobService::Client", + "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client" + }, + "method": { + "short_name": "SearchJobsForAlert", + "full_name": "google.cloud.talent.v4beta1.JobService.SearchJobsForAlert", + "service": { + "short_name": "JobService", + "full_name": "google.cloud.talent.v4beta1.JobService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "jobs_v4beta1_generated_TenantService_CreateTenant_sync", + "title": "Snippet for the create_tenant call in the TenantService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::TenantService::Client#create_tenant.", + "file": "tenant_service/create_tenant.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_tenant", + "full_name": "::Google::Cloud::Talent::V4beta1::TenantService::Client#create_tenant", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Talent::V4beta1::CreateTenantRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Talent::V4beta1::Tenant", + "client": { + "short_name": "TenantService::Client", + "full_name": "::Google::Cloud::Talent::V4beta1::TenantService::Client" + }, + "method": { + "short_name": "CreateTenant", + "full_name": "google.cloud.talent.v4beta1.TenantService.CreateTenant", + "service": { + "short_name": "TenantService", + "full_name": "google.cloud.talent.v4beta1.TenantService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "jobs_v4beta1_generated_TenantService_GetTenant_sync", + "title": "Snippet for the get_tenant call in the TenantService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::TenantService::Client#get_tenant.", + "file": "tenant_service/get_tenant.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_tenant", + "full_name": "::Google::Cloud::Talent::V4beta1::TenantService::Client#get_tenant", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Talent::V4beta1::GetTenantRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Talent::V4beta1::Tenant", + "client": { + "short_name": "TenantService::Client", + "full_name": "::Google::Cloud::Talent::V4beta1::TenantService::Client" + }, + "method": { + "short_name": "GetTenant", + "full_name": "google.cloud.talent.v4beta1.TenantService.GetTenant", + "service": { + "short_name": "TenantService", + "full_name": "google.cloud.talent.v4beta1.TenantService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "jobs_v4beta1_generated_TenantService_UpdateTenant_sync", + "title": "Snippet for the update_tenant call in the TenantService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::TenantService::Client#update_tenant.", + "file": "tenant_service/update_tenant.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_tenant", + "full_name": "::Google::Cloud::Talent::V4beta1::TenantService::Client#update_tenant", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Talent::V4beta1::UpdateTenantRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Talent::V4beta1::Tenant", + "client": { + "short_name": "TenantService::Client", + "full_name": "::Google::Cloud::Talent::V4beta1::TenantService::Client" + }, + "method": { + "short_name": "UpdateTenant", + "full_name": "google.cloud.talent.v4beta1.TenantService.UpdateTenant", + "service": { + "short_name": "TenantService", + "full_name": "google.cloud.talent.v4beta1.TenantService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "jobs_v4beta1_generated_TenantService_DeleteTenant_sync", + "title": "Snippet for the delete_tenant call in the TenantService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::TenantService::Client#delete_tenant.", + "file": "tenant_service/delete_tenant.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_tenant", + "full_name": "::Google::Cloud::Talent::V4beta1::TenantService::Client#delete_tenant", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Talent::V4beta1::DeleteTenantRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "TenantService::Client", + "full_name": "::Google::Cloud::Talent::V4beta1::TenantService::Client" + }, + "method": { + "short_name": "DeleteTenant", + "full_name": "google.cloud.talent.v4beta1.TenantService.DeleteTenant", + "service": { + "short_name": "TenantService", + "full_name": "google.cloud.talent.v4beta1.TenantService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "jobs_v4beta1_generated_TenantService_ListTenants_sync", + "title": "Snippet for the list_tenants call in the TenantService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::TenantService::Client#list_tenants.", + "file": "tenant_service/list_tenants.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_tenants", + "full_name": "::Google::Cloud::Talent::V4beta1::TenantService::Client#list_tenants", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Talent::V4beta1::ListTenantsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Talent::V4beta1::ListTenantsResponse", + "client": { + "short_name": "TenantService::Client", + "full_name": "::Google::Cloud::Talent::V4beta1::TenantService::Client" + }, + "method": { + "short_name": "ListTenants", + "full_name": "google.cloud.talent.v4beta1.TenantService.ListTenants", + "service": { + "short_name": "TenantService", + "full_name": "google.cloud.talent.v4beta1.TenantService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/create_tenant.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/create_tenant.rb new file mode 100644 index 000000000000..cfe7e22a91f5 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/create_tenant.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 jobs_v4beta1_generated_TenantService_CreateTenant_sync] +require "google/cloud/talent/v4beta1" + +## +# Snippet for the create_tenant call in the TenantService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Talent::V4beta1::TenantService::Client#create_tenant. +# +def create_tenant + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Talent::V4beta1::TenantService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Talent::V4beta1::CreateTenantRequest.new + + # Call the create_tenant method. + result = client.create_tenant request + + # The returned object is of type Google::Cloud::Talent::V4beta1::Tenant. + p result +end +# [END jobs_v4beta1_generated_TenantService_CreateTenant_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/delete_tenant.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/delete_tenant.rb new file mode 100644 index 000000000000..33b7ae2f4b24 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/delete_tenant.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 jobs_v4beta1_generated_TenantService_DeleteTenant_sync] +require "google/cloud/talent/v4beta1" + +## +# Snippet for the delete_tenant call in the TenantService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Talent::V4beta1::TenantService::Client#delete_tenant. +# +def delete_tenant + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Talent::V4beta1::TenantService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Talent::V4beta1::DeleteTenantRequest.new + + # Call the delete_tenant method. + result = client.delete_tenant request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END jobs_v4beta1_generated_TenantService_DeleteTenant_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/get_tenant.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/get_tenant.rb new file mode 100644 index 000000000000..e4b463bf9e47 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/get_tenant.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 jobs_v4beta1_generated_TenantService_GetTenant_sync] +require "google/cloud/talent/v4beta1" + +## +# Snippet for the get_tenant call in the TenantService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Talent::V4beta1::TenantService::Client#get_tenant. +# +def get_tenant + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Talent::V4beta1::TenantService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Talent::V4beta1::GetTenantRequest.new + + # Call the get_tenant method. + result = client.get_tenant request + + # The returned object is of type Google::Cloud::Talent::V4beta1::Tenant. + p result +end +# [END jobs_v4beta1_generated_TenantService_GetTenant_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/list_tenants.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/list_tenants.rb new file mode 100644 index 000000000000..c79441100dcd --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/list_tenants.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 jobs_v4beta1_generated_TenantService_ListTenants_sync] +require "google/cloud/talent/v4beta1" + +## +# Snippet for the list_tenants call in the TenantService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Talent::V4beta1::TenantService::Client#list_tenants. +# +def list_tenants + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Talent::V4beta1::TenantService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Talent::V4beta1::ListTenantsRequest.new + + # Call the list_tenants method. + result = client.list_tenants request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Talent::V4beta1::Tenant. + p item + end +end +# [END jobs_v4beta1_generated_TenantService_ListTenants_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/update_tenant.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/update_tenant.rb new file mode 100644 index 000000000000..e2ec529755a4 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/update_tenant.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 jobs_v4beta1_generated_TenantService_UpdateTenant_sync] +require "google/cloud/talent/v4beta1" + +## +# Snippet for the update_tenant call in the TenantService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Talent::V4beta1::TenantService::Client#update_tenant. +# +def update_tenant + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Talent::V4beta1::TenantService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Talent::V4beta1::UpdateTenantRequest.new + + # Call the update_tenant method. + result = client.update_tenant request + + # The returned object is of type Google::Cloud::Talent::V4beta1::Tenant. + p result +end +# [END jobs_v4beta1_generated_TenantService_UpdateTenant_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/company_service_paths_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/company_service_paths_test.rb new file mode 100644 index 000000000000..df4661f2e50d --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/company_service_paths_test.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 "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/talent/v4beta1/company_service" + +class ::Google::Cloud::Talent::V4beta1::CompanyService::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_company_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.company_path project: "value0", tenant: "value1", company: "value2" + assert_equal "projects/value0/tenants/value1/companies/value2", path + + path = client.company_path project: "value0", company: "value1" + assert_equal "projects/value0/companies/value1", path + end + end + + def test_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_tenant_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.tenant_path project: "value0", tenant: "value1" + assert_equal "projects/value0/tenants/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/company_service_rest_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/company_service_rest_test.rb new file mode 100644 index 000000000000..ffe14d2e9497 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/company_service_rest_test.rb @@ -0,0 +1,374 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/talent/v4beta1/company_service_pb" +require "google/cloud/talent/v4beta1/company_service/rest" + + +class ::Google::Cloud::Talent::V4beta1::CompanyService::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_company + # Create test objects. + client_result = ::Google::Cloud::Talent::V4beta1::Company.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + company = {} + + create_company_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::ServiceStub.stub :transcode_create_company_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_company_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_company({ parent: parent, company: company }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_company parent: parent, company: company do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_company ::Google::Cloud::Talent::V4beta1::CreateCompanyRequest.new(parent: parent, company: company) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_company({ parent: parent, company: company }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_company(::Google::Cloud::Talent::V4beta1::CreateCompanyRequest.new(parent: parent, company: company), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_company_client_stub.call_count + end + end + end + + def test_get_company + # Create test objects. + client_result = ::Google::Cloud::Talent::V4beta1::Company.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_company_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::ServiceStub.stub :transcode_get_company_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_company_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_company({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_company name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_company ::Google::Cloud::Talent::V4beta1::GetCompanyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_company({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_company(::Google::Cloud::Talent::V4beta1::GetCompanyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_company_client_stub.call_count + end + end + end + + def test_update_company + # Create test objects. + client_result = ::Google::Cloud::Talent::V4beta1::Company.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + company = {} + update_mask = {} + + update_company_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::ServiceStub.stub :transcode_update_company_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_company_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_company({ company: company, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_company company: company, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_company ::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest.new(company: company, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_company({ company: company, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_company(::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest.new(company: company, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_company_client_stub.call_count + end + end + end + + def test_delete_company + # 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_company_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::ServiceStub.stub :transcode_delete_company_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_company_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_company({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_company name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_company ::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_company({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_company(::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_company_client_stub.call_count + end + end + end + + def test_list_companies + # Create test objects. + client_result = ::Google::Cloud::Talent::V4beta1::ListCompaniesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + require_open_jobs = true + + list_companies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::ServiceStub.stub :transcode_list_companies_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_companies_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_companies({ parent: parent, page_token: page_token, page_size: page_size, require_open_jobs: require_open_jobs }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_companies parent: parent, page_token: page_token, page_size: page_size, require_open_jobs: require_open_jobs do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_companies ::Google::Cloud::Talent::V4beta1::ListCompaniesRequest.new(parent: parent, page_token: page_token, page_size: page_size, require_open_jobs: require_open_jobs) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_companies({ parent: parent, page_token: page_token, page_size: page_size, require_open_jobs: require_open_jobs }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_companies(::Google::Cloud::Talent::V4beta1::ListCompaniesRequest.new(parent: parent, page_token: page_token, page_size: page_size, require_open_jobs: require_open_jobs), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_companies_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::Talent::V4beta1::CompanyService::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::Talent::V4beta1::CompanyService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/company_service_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/company_service_test.rb new file mode 100644 index 000000000000..326db3adc85c --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/company_service_test.rb @@ -0,0 +1,409 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/talent/v4beta1/company_service_pb" +require "google/cloud/talent/v4beta1/company_service" + +class ::Google::Cloud::Talent::V4beta1::CompanyService::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_company + # Create GRPC objects. + grpc_response = ::Google::Cloud::Talent::V4beta1::Company.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + company = {} + + create_company_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_company, name + assert_kind_of ::Google::Cloud::Talent::V4beta1::CreateCompanyRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::Company), request["company"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_company_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_company({ parent: parent, company: company }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_company parent: parent, company: company do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_company ::Google::Cloud::Talent::V4beta1::CreateCompanyRequest.new(parent: parent, company: company) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_company({ parent: parent, company: company }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_company(::Google::Cloud::Talent::V4beta1::CreateCompanyRequest.new(parent: parent, company: company), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_company_client_stub.call_rpc_count + end + end + + def test_get_company + # Create GRPC objects. + grpc_response = ::Google::Cloud::Talent::V4beta1::Company.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_company_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_company, name + assert_kind_of ::Google::Cloud::Talent::V4beta1::GetCompanyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_company_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_company({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_company name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_company ::Google::Cloud::Talent::V4beta1::GetCompanyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_company({ 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_company(::Google::Cloud::Talent::V4beta1::GetCompanyRequest.new(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_company_client_stub.call_rpc_count + end + end + + def test_update_company + # Create GRPC objects. + grpc_response = ::Google::Cloud::Talent::V4beta1::Company.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + company = {} + update_mask = {} + + update_company_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_company, name + assert_kind_of ::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::Company), request["company"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_company_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_company({ company: company, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_company company: company, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_company ::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest.new(company: company, 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_company({ company: company, 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_company(::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest.new(company: company, 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_company_client_stub.call_rpc_count + end + end + + def test_delete_company + # 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_company_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_company, name + assert_kind_of ::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_company_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_company({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_company name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_company ::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_company({ 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_company(::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest.new(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_company_client_stub.call_rpc_count + end + end + + def test_list_companies + # Create GRPC objects. + grpc_response = ::Google::Cloud::Talent::V4beta1::ListCompaniesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_token = "hello world" + page_size = 42 + require_open_jobs = true + + list_companies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_companies, name + assert_kind_of ::Google::Cloud::Talent::V4beta1::ListCompaniesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + assert_equal true, request["require_open_jobs"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_companies_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_companies({ parent: parent, page_token: page_token, page_size: page_size, require_open_jobs: require_open_jobs }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_companies parent: parent, page_token: page_token, page_size: page_size, require_open_jobs: require_open_jobs do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_companies ::Google::Cloud::Talent::V4beta1::ListCompaniesRequest.new(parent: parent, page_token: page_token, page_size: page_size, require_open_jobs: require_open_jobs) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_companies({ parent: parent, page_token: page_token, page_size: page_size, require_open_jobs: require_open_jobs }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_companies(::Google::Cloud::Talent::V4beta1::ListCompaniesRequest.new(parent: parent, page_token: page_token, page_size: page_size, require_open_jobs: require_open_jobs), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_companies_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::Talent::V4beta1::CompanyService::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::Talent::V4beta1::CompanyService::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::Talent::V4beta1::CompanyService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Talent::V4beta1::CompanyService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/completion_paths_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/completion_paths_test.rb new file mode 100644 index 000000000000..79274afedf5b --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/completion_paths_test.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 "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/talent/v4beta1/completion" + +class ::Google::Cloud::Talent::V4beta1::Completion::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_company_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Talent::V4beta1::Completion::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.company_path project: "value0", tenant: "value1", company: "value2" + assert_equal "projects/value0/tenants/value1/companies/value2", path + + path = client.company_path project: "value0", company: "value1" + assert_equal "projects/value0/companies/value1", path + end + end + + def test_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Talent::V4beta1::Completion::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_tenant_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Talent::V4beta1::Completion::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.tenant_path project: "value0", tenant: "value1" + assert_equal "projects/value0/tenants/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/completion_rest_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/completion_rest_test.rb new file mode 100644 index 000000000000..805eb4d0755b --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/completion_rest_test.rb @@ -0,0 +1,159 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/talent/v4beta1/completion_service_pb" +require "google/cloud/talent/v4beta1/completion/rest" + + +class ::Google::Cloud::Talent::V4beta1::Completion::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_complete_query + # Create test objects. + client_result = ::Google::Cloud::Talent::V4beta1::CompleteQueryResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + query = "hello world" + language_codes = ["hello world"] + page_size = 42 + company = "hello world" + scope = :COMPLETION_SCOPE_UNSPECIFIED + type = :COMPLETION_TYPE_UNSPECIFIED + + complete_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::Talent::V4beta1::Completion::Rest::ServiceStub.stub :transcode_complete_query_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, complete_query_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::Completion::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.complete_query({ parent: parent, query: query, language_codes: language_codes, page_size: page_size, company: company, scope: scope, type: type }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.complete_query parent: parent, query: query, language_codes: language_codes, page_size: page_size, company: company, scope: scope, type: type do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.complete_query ::Google::Cloud::Talent::V4beta1::CompleteQueryRequest.new(parent: parent, query: query, language_codes: language_codes, page_size: page_size, company: company, scope: scope, type: type) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.complete_query({ parent: parent, query: query, language_codes: language_codes, page_size: page_size, company: company, scope: scope, type: type }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.complete_query(::Google::Cloud::Talent::V4beta1::CompleteQueryRequest.new(parent: parent, query: query, language_codes: language_codes, page_size: page_size, company: company, scope: scope, type: type), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, complete_query_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::Talent::V4beta1::Completion::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::Talent::V4beta1::Completion::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/completion_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/completion_test.rb new file mode 100644 index 000000000000..7c545fda4a14 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/completion_test.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 "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/talent/v4beta1/completion_service_pb" +require "google/cloud/talent/v4beta1/completion" + +class ::Google::Cloud::Talent::V4beta1::Completion::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_complete_query + # Create GRPC objects. + grpc_response = ::Google::Cloud::Talent::V4beta1::CompleteQueryResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + query = "hello world" + language_codes = ["hello world"] + page_size = 42 + company = "hello world" + scope = :COMPLETION_SCOPE_UNSPECIFIED + type = :COMPLETION_TYPE_UNSPECIFIED + + complete_query_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :complete_query, name + assert_kind_of ::Google::Cloud::Talent::V4beta1::CompleteQueryRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["query"] + assert_equal ["hello world"], request["language_codes"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["company"] + assert_equal :COMPLETION_SCOPE_UNSPECIFIED, request["scope"] + assert_equal :COMPLETION_TYPE_UNSPECIFIED, request["type"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, complete_query_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::Completion::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.complete_query({ parent: parent, query: query, language_codes: language_codes, page_size: page_size, company: company, scope: scope, type: type }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.complete_query parent: parent, query: query, language_codes: language_codes, page_size: page_size, company: company, scope: scope, type: type do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.complete_query ::Google::Cloud::Talent::V4beta1::CompleteQueryRequest.new(parent: parent, query: query, language_codes: language_codes, page_size: page_size, company: company, scope: scope, type: type) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.complete_query({ parent: parent, query: query, language_codes: language_codes, page_size: page_size, company: company, scope: scope, type: type }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.complete_query(::Google::Cloud::Talent::V4beta1::CompleteQueryRequest.new(parent: parent, query: query, language_codes: language_codes, page_size: page_size, company: company, scope: scope, type: type), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, complete_query_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::Talent::V4beta1::Completion::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::Talent::V4beta1::Completion::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::Talent::V4beta1::Completion::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Talent::V4beta1::Completion::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/event_service_paths_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/event_service_paths_test.rb new file mode 100644 index 000000000000..62494d741f26 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/event_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/talent/v4beta1/event_service" + +class ::Google::Cloud::Talent::V4beta1::EventService::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_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::Talent::V4beta1::EventService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_tenant_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Talent::V4beta1::EventService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.tenant_path project: "value0", tenant: "value1" + assert_equal "projects/value0/tenants/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/event_service_rest_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/event_service_rest_test.rb new file mode 100644 index 000000000000..367e17cac38c --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/event_service_rest_test.rb @@ -0,0 +1,154 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/talent/v4beta1/event_service_pb" +require "google/cloud/talent/v4beta1/event_service/rest" + + +class ::Google::Cloud::Talent::V4beta1::EventService::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_client_event + # Create test objects. + client_result = ::Google::Cloud::Talent::V4beta1::ClientEvent.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + client_event = {} + + create_client_event_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Talent::V4beta1::EventService::Rest::ServiceStub.stub :transcode_create_client_event_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_client_event_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::EventService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_client_event({ parent: parent, client_event: client_event }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_client_event parent: parent, client_event: client_event do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_client_event ::Google::Cloud::Talent::V4beta1::CreateClientEventRequest.new(parent: parent, client_event: client_event) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_client_event({ parent: parent, client_event: client_event }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_client_event(::Google::Cloud::Talent::V4beta1::CreateClientEventRequest.new(parent: parent, client_event: client_event), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_client_event_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::Talent::V4beta1::EventService::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::Talent::V4beta1::EventService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/event_service_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/event_service_test.rb new file mode 100644 index 000000000000..3c1fe220a445 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/event_service_test.rb @@ -0,0 +1,164 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/talent/v4beta1/event_service_pb" +require "google/cloud/talent/v4beta1/event_service" + +class ::Google::Cloud::Talent::V4beta1::EventService::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_client_event + # Create GRPC objects. + grpc_response = ::Google::Cloud::Talent::V4beta1::ClientEvent.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + client_event = {} + + create_client_event_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_client_event, name + assert_kind_of ::Google::Cloud::Talent::V4beta1::CreateClientEventRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::ClientEvent), request["client_event"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_client_event_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::EventService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_client_event({ parent: parent, client_event: client_event }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_client_event parent: parent, client_event: client_event do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_client_event ::Google::Cloud::Talent::V4beta1::CreateClientEventRequest.new(parent: parent, client_event: client_event) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_client_event({ parent: parent, client_event: client_event }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_client_event(::Google::Cloud::Talent::V4beta1::CreateClientEventRequest.new(parent: parent, client_event: client_event), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_client_event_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::Talent::V4beta1::EventService::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::Talent::V4beta1::EventService::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::Talent::V4beta1::EventService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Talent::V4beta1::EventService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_operations_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_operations_test.rb new file mode 100644 index 000000000000..c9ea942034fd --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_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/talent/v4beta1/job_service_pb" +require "google/cloud/talent/v4beta1/job_service_services_pb" +require "google/cloud/talent/v4beta1/job_service" + +class ::Google::Cloud::Talent::V4beta1::JobService::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::Talent::V4beta1::JobService::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::Talent::V4beta1::JobService::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::Talent::V4beta1::JobService::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::Talent::V4beta1::JobService::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::Talent::V4beta1::JobService::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::Talent::V4beta1::JobService::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::Talent::V4beta1::JobService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_paths_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_paths_test.rb new file mode 100644 index 000000000000..6905c8128013 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_paths_test.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 "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/talent/v4beta1/job_service" + +class ::Google::Cloud::Talent::V4beta1::JobService::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_company_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.company_path project: "value0", tenant: "value1", company: "value2" + assert_equal "projects/value0/tenants/value1/companies/value2", path + + path = client.company_path project: "value0", company: "value1" + assert_equal "projects/value0/companies/value1", path + end + end + + def test_job_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.job_path project: "value0", tenant: "value1", job: "value2" + assert_equal "projects/value0/tenants/value1/jobs/value2", path + + path = client.job_path project: "value0", job: "value1" + assert_equal "projects/value0/jobs/value1", path + end + end + + def test_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_tenant_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.tenant_path project: "value0", tenant: "value1" + assert_equal "projects/value0/tenants/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_rest_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_rest_test.rb new file mode 100644 index 000000000000..b5233fe24bbf --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_rest_test.rb @@ -0,0 +1,681 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/talent/v4beta1/job_service_pb" +require "google/cloud/talent/v4beta1/job_service/rest" + + +class ::Google::Cloud::Talent::V4beta1::JobService::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_job + # Create test objects. + client_result = ::Google::Cloud::Talent::V4beta1::Job.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + job = {} + + create_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Talent::V4beta1::JobService::Rest::ServiceStub.stub :transcode_create_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_job_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_job({ parent: parent, job: job }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_job parent: parent, job: job do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_job ::Google::Cloud::Talent::V4beta1::CreateJobRequest.new(parent: parent, job: job) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_job({ parent: parent, job: job }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_job(::Google::Cloud::Talent::V4beta1::CreateJobRequest.new(parent: parent, job: job), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_job_client_stub.call_count + end + end + end + + def test_batch_create_jobs + # Create test objects. + 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" + jobs = [{}] + + batch_create_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Talent::V4beta1::JobService::Rest::ServiceStub.stub :transcode_batch_create_jobs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_create_jobs_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.batch_create_jobs({ parent: parent, jobs: jobs }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.batch_create_jobs parent: parent, jobs: jobs do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.batch_create_jobs ::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest.new(parent: parent, jobs: jobs) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.batch_create_jobs({ parent: parent, jobs: jobs }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.batch_create_jobs(::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest.new(parent: parent, jobs: jobs), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_create_jobs_client_stub.call_count + end + end + end + + def test_get_job + # Create test objects. + client_result = ::Google::Cloud::Talent::V4beta1::Job.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Talent::V4beta1::JobService::Rest::ServiceStub.stub :transcode_get_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_job_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_job({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_job name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_job ::Google::Cloud::Talent::V4beta1::GetJobRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_job({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_job(::Google::Cloud::Talent::V4beta1::GetJobRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_job_client_stub.call_count + end + end + end + + def test_update_job + # Create test objects. + client_result = ::Google::Cloud::Talent::V4beta1::Job.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + job = {} + update_mask = {} + + update_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Talent::V4beta1::JobService::Rest::ServiceStub.stub :transcode_update_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_job_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_job({ job: job, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_job job: job, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_job ::Google::Cloud::Talent::V4beta1::UpdateJobRequest.new(job: job, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_job({ job: job, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_job(::Google::Cloud::Talent::V4beta1::UpdateJobRequest.new(job: job, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_job_client_stub.call_count + end + end + end + + def test_batch_update_jobs + # Create test objects. + 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" + jobs = [{}] + update_mask = {} + + batch_update_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Talent::V4beta1::JobService::Rest::ServiceStub.stub :transcode_batch_update_jobs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_update_jobs_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.batch_update_jobs({ parent: parent, jobs: jobs, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.batch_update_jobs parent: parent, jobs: jobs, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.batch_update_jobs ::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest.new(parent: parent, jobs: jobs, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.batch_update_jobs({ parent: parent, jobs: jobs, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.batch_update_jobs(::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest.new(parent: parent, jobs: jobs, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_update_jobs_client_stub.call_count + end + end + end + + def test_delete_job + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Talent::V4beta1::JobService::Rest::ServiceStub.stub :transcode_delete_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_job_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_job({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_job name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_job ::Google::Cloud::Talent::V4beta1::DeleteJobRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_job({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_job(::Google::Cloud::Talent::V4beta1::DeleteJobRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_job_client_stub.call_count + end + end + end + + def test_batch_delete_jobs + # 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. + parent = "hello world" + filter = "hello world" + + batch_delete_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Talent::V4beta1::JobService::Rest::ServiceStub.stub :transcode_batch_delete_jobs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_delete_jobs_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.batch_delete_jobs({ parent: parent, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.batch_delete_jobs parent: parent, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.batch_delete_jobs ::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest.new(parent: parent, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.batch_delete_jobs({ parent: parent, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.batch_delete_jobs(::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest.new(parent: parent, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_delete_jobs_client_stub.call_count + end + end + end + + def test_list_jobs + # Create test objects. + client_result = ::Google::Cloud::Talent::V4beta1::ListJobsResponse.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_token = "hello world" + page_size = 42 + job_view = :JOB_VIEW_UNSPECIFIED + + list_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Talent::V4beta1::JobService::Rest::ServiceStub.stub :transcode_list_jobs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_jobs_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_jobs({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, job_view: job_view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_jobs parent: parent, filter: filter, page_token: page_token, page_size: page_size, job_view: job_view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_jobs ::Google::Cloud::Talent::V4beta1::ListJobsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, job_view: job_view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_jobs({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, job_view: job_view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_jobs(::Google::Cloud::Talent::V4beta1::ListJobsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, job_view: job_view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_jobs_client_stub.call_count + end + end + end + + def test_search_jobs + # Create test objects. + client_result = ::Google::Cloud::Talent::V4beta1::SearchJobsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + search_mode = :SEARCH_MODE_UNSPECIFIED + request_metadata = {} + job_query = {} + enable_broadening = true + require_precise_result_size = true + histogram_queries = [{}] + job_view = :JOB_VIEW_UNSPECIFIED + offset = 42 + page_size = 42 + page_token = "hello world" + order_by = "hello world" + diversification_level = :DIVERSIFICATION_LEVEL_UNSPECIFIED + custom_ranking_info = {} + disable_keyword_match = true + keyword_match_mode = :KEYWORD_MATCH_MODE_UNSPECIFIED + relevance_threshold = :RELEVANCE_THRESHOLD_UNSPECIFIED + + search_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Talent::V4beta1::JobService::Rest::ServiceStub.stub :transcode_search_jobs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_jobs_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.search_jobs({ parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.search_jobs parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.search_jobs ::Google::Cloud::Talent::V4beta1::SearchJobsRequest.new(parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.search_jobs({ parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.search_jobs(::Google::Cloud::Talent::V4beta1::SearchJobsRequest.new(parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_jobs_client_stub.call_count + end + end + end + + def test_search_jobs_for_alert + # Create test objects. + client_result = ::Google::Cloud::Talent::V4beta1::SearchJobsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + search_mode = :SEARCH_MODE_UNSPECIFIED + request_metadata = {} + job_query = {} + enable_broadening = true + require_precise_result_size = true + histogram_queries = [{}] + job_view = :JOB_VIEW_UNSPECIFIED + offset = 42 + page_size = 42 + page_token = "hello world" + order_by = "hello world" + diversification_level = :DIVERSIFICATION_LEVEL_UNSPECIFIED + custom_ranking_info = {} + disable_keyword_match = true + keyword_match_mode = :KEYWORD_MATCH_MODE_UNSPECIFIED + relevance_threshold = :RELEVANCE_THRESHOLD_UNSPECIFIED + + search_jobs_for_alert_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Talent::V4beta1::JobService::Rest::ServiceStub.stub :transcode_search_jobs_for_alert_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_jobs_for_alert_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.search_jobs_for_alert({ parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.search_jobs_for_alert parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.search_jobs_for_alert ::Google::Cloud::Talent::V4beta1::SearchJobsRequest.new(parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.search_jobs_for_alert({ parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.search_jobs_for_alert(::Google::Cloud::Talent::V4beta1::SearchJobsRequest.new(parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_jobs_for_alert_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::Talent::V4beta1::JobService::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::Talent::V4beta1::JobService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_test.rb new file mode 100644 index 000000000000..1ad88b2a3848 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_test.rb @@ -0,0 +1,797 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/talent/v4beta1/job_service_pb" +require "google/cloud/talent/v4beta1/job_service" + +class ::Google::Cloud::Talent::V4beta1::JobService::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_job + # Create GRPC objects. + grpc_response = ::Google::Cloud::Talent::V4beta1::Job.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + job = {} + + create_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_job, name + assert_kind_of ::Google::Cloud::Talent::V4beta1::CreateJobRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::Job), request["job"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_job_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_job({ parent: parent, job: job }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_job parent: parent, job: job do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_job ::Google::Cloud::Talent::V4beta1::CreateJobRequest.new(parent: parent, job: job) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_job({ parent: parent, job: job }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_job(::Google::Cloud::Talent::V4beta1::CreateJobRequest.new(parent: parent, job: job), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_job_client_stub.call_rpc_count + end + end + + def test_batch_create_jobs + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + jobs = [{}] + + batch_create_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_create_jobs, name + assert_kind_of ::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Cloud::Talent::V4beta1::Job, request["jobs"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_create_jobs_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_create_jobs({ parent: parent, jobs: jobs }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.batch_create_jobs parent: parent, jobs: jobs do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.batch_create_jobs ::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest.new(parent: parent, jobs: jobs) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.batch_create_jobs({ parent: parent, jobs: jobs }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.batch_create_jobs(::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest.new(parent: parent, jobs: jobs), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_create_jobs_client_stub.call_rpc_count + end + end + + def test_get_job + # Create GRPC objects. + grpc_response = ::Google::Cloud::Talent::V4beta1::Job.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_job, name + assert_kind_of ::Google::Cloud::Talent::V4beta1::GetJobRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_job_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_job({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_job name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_job ::Google::Cloud::Talent::V4beta1::GetJobRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_job({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_job(::Google::Cloud::Talent::V4beta1::GetJobRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_job_client_stub.call_rpc_count + end + end + + def test_update_job + # Create GRPC objects. + grpc_response = ::Google::Cloud::Talent::V4beta1::Job.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + job = {} + update_mask = {} + + update_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_job, name + assert_kind_of ::Google::Cloud::Talent::V4beta1::UpdateJobRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::Job), request["job"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_job_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_job({ job: job, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_job job: job, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_job ::Google::Cloud::Talent::V4beta1::UpdateJobRequest.new(job: job, 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_job({ job: job, 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_job(::Google::Cloud::Talent::V4beta1::UpdateJobRequest.new(job: job, 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_job_client_stub.call_rpc_count + end + end + + def test_batch_update_jobs + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + jobs = [{}] + update_mask = {} + + batch_update_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_update_jobs, name + assert_kind_of ::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Cloud::Talent::V4beta1::Job, request["jobs"].first + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_update_jobs_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_update_jobs({ parent: parent, jobs: jobs, 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.batch_update_jobs parent: parent, jobs: jobs, 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.batch_update_jobs ::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest.new(parent: parent, jobs: jobs, 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.batch_update_jobs({ parent: parent, jobs: jobs, 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.batch_update_jobs(::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest.new(parent: parent, jobs: jobs, 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, batch_update_jobs_client_stub.call_rpc_count + end + end + + def test_delete_job + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_job, name + assert_kind_of ::Google::Cloud::Talent::V4beta1::DeleteJobRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_job_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_job({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_job name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_job ::Google::Cloud::Talent::V4beta1::DeleteJobRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_job({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_job(::Google::Cloud::Talent::V4beta1::DeleteJobRequest.new(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_job_client_stub.call_rpc_count + end + end + + def test_batch_delete_jobs + # 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. + parent = "hello world" + filter = "hello world" + + batch_delete_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_delete_jobs, name + assert_kind_of ::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_delete_jobs_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_delete_jobs({ parent: parent, filter: filter }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.batch_delete_jobs parent: parent, filter: filter do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.batch_delete_jobs ::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest.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.batch_delete_jobs({ 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.batch_delete_jobs(::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest.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, batch_delete_jobs_client_stub.call_rpc_count + end + end + + def test_list_jobs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Talent::V4beta1::ListJobsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_token = "hello world" + page_size = 42 + job_view = :JOB_VIEW_UNSPECIFIED + + list_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_jobs, name + assert_kind_of ::Google::Cloud::Talent::V4beta1::ListJobsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + assert_equal :JOB_VIEW_UNSPECIFIED, request["job_view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_jobs_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_jobs({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, job_view: job_view }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_jobs parent: parent, filter: filter, page_token: page_token, page_size: page_size, job_view: job_view do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_jobs ::Google::Cloud::Talent::V4beta1::ListJobsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, job_view: job_view) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_jobs({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, job_view: job_view }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_jobs(::Google::Cloud::Talent::V4beta1::ListJobsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, job_view: job_view), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_jobs_client_stub.call_rpc_count + end + end + + def test_search_jobs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Talent::V4beta1::SearchJobsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + search_mode = :SEARCH_MODE_UNSPECIFIED + request_metadata = {} + job_query = {} + enable_broadening = true + require_precise_result_size = true + histogram_queries = [{}] + job_view = :JOB_VIEW_UNSPECIFIED + offset = 42 + page_size = 42 + page_token = "hello world" + order_by = "hello world" + diversification_level = :DIVERSIFICATION_LEVEL_UNSPECIFIED + custom_ranking_info = {} + disable_keyword_match = true + keyword_match_mode = :KEYWORD_MATCH_MODE_UNSPECIFIED + relevance_threshold = :RELEVANCE_THRESHOLD_UNSPECIFIED + + search_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_jobs, name + assert_kind_of ::Google::Cloud::Talent::V4beta1::SearchJobsRequest, request + assert_equal "hello world", request["parent"] + assert_equal :SEARCH_MODE_UNSPECIFIED, request["search_mode"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::RequestMetadata), request["request_metadata"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::JobQuery), request["job_query"] + assert_equal true, request["enable_broadening"] + assert_equal true, request["require_precise_result_size"] + assert_kind_of ::Google::Cloud::Talent::V4beta1::HistogramQuery, request["histogram_queries"].first + assert_equal :JOB_VIEW_UNSPECIFIED, request["job_view"] + assert_equal 42, request["offset"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["order_by"] + assert_equal :DIVERSIFICATION_LEVEL_UNSPECIFIED, request["diversification_level"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo), request["custom_ranking_info"] + assert_equal true, request["disable_keyword_match"] + assert_equal :KEYWORD_MATCH_MODE_UNSPECIFIED, request["keyword_match_mode"] + assert_equal :RELEVANCE_THRESHOLD_UNSPECIFIED, request["relevance_threshold"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_jobs_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.search_jobs({ parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.search_jobs parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.search_jobs ::Google::Cloud::Talent::V4beta1::SearchJobsRequest.new(parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.search_jobs({ parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.search_jobs(::Google::Cloud::Talent::V4beta1::SearchJobsRequest.new(parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, search_jobs_client_stub.call_rpc_count + end + end + + def test_search_jobs_for_alert + # Create GRPC objects. + grpc_response = ::Google::Cloud::Talent::V4beta1::SearchJobsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + search_mode = :SEARCH_MODE_UNSPECIFIED + request_metadata = {} + job_query = {} + enable_broadening = true + require_precise_result_size = true + histogram_queries = [{}] + job_view = :JOB_VIEW_UNSPECIFIED + offset = 42 + page_size = 42 + page_token = "hello world" + order_by = "hello world" + diversification_level = :DIVERSIFICATION_LEVEL_UNSPECIFIED + custom_ranking_info = {} + disable_keyword_match = true + keyword_match_mode = :KEYWORD_MATCH_MODE_UNSPECIFIED + relevance_threshold = :RELEVANCE_THRESHOLD_UNSPECIFIED + + search_jobs_for_alert_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_jobs_for_alert, name + assert_kind_of ::Google::Cloud::Talent::V4beta1::SearchJobsRequest, request + assert_equal "hello world", request["parent"] + assert_equal :SEARCH_MODE_UNSPECIFIED, request["search_mode"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::RequestMetadata), request["request_metadata"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::JobQuery), request["job_query"] + assert_equal true, request["enable_broadening"] + assert_equal true, request["require_precise_result_size"] + assert_kind_of ::Google::Cloud::Talent::V4beta1::HistogramQuery, request["histogram_queries"].first + assert_equal :JOB_VIEW_UNSPECIFIED, request["job_view"] + assert_equal 42, request["offset"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["order_by"] + assert_equal :DIVERSIFICATION_LEVEL_UNSPECIFIED, request["diversification_level"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo), request["custom_ranking_info"] + assert_equal true, request["disable_keyword_match"] + assert_equal :KEYWORD_MATCH_MODE_UNSPECIFIED, request["keyword_match_mode"] + assert_equal :RELEVANCE_THRESHOLD_UNSPECIFIED, request["relevance_threshold"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_jobs_for_alert_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.search_jobs_for_alert({ parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.search_jobs_for_alert parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.search_jobs_for_alert ::Google::Cloud::Talent::V4beta1::SearchJobsRequest.new(parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.search_jobs_for_alert({ parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.search_jobs_for_alert(::Google::Cloud::Talent::V4beta1::SearchJobsRequest.new(parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, search_jobs_for_alert_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::Talent::V4beta1::JobService::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::Talent::V4beta1::JobService::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::Talent::V4beta1::JobService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Talent::V4beta1::JobService::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::Talent::V4beta1::JobService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Talent::V4beta1::JobService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/tenant_service_paths_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/tenant_service_paths_test.rb new file mode 100644 index 000000000000..ca6ff0d05b1b --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/tenant_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/talent/v4beta1/tenant_service" + +class ::Google::Cloud::Talent::V4beta1::TenantService::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_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::Talent::V4beta1::TenantService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_tenant_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Talent::V4beta1::TenantService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.tenant_path project: "value0", tenant: "value1" + assert_equal "projects/value0/tenants/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/tenant_service_rest_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/tenant_service_rest_test.rb new file mode 100644 index 000000000000..e84949a6e6c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/tenant_service_rest_test.rb @@ -0,0 +1,373 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/talent/v4beta1/tenant_service_pb" +require "google/cloud/talent/v4beta1/tenant_service/rest" + + +class ::Google::Cloud::Talent::V4beta1::TenantService::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_tenant + # Create test objects. + client_result = ::Google::Cloud::Talent::V4beta1::Tenant.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + tenant = {} + + create_tenant_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Talent::V4beta1::TenantService::Rest::ServiceStub.stub :transcode_create_tenant_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_tenant_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_tenant({ parent: parent, tenant: tenant }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_tenant parent: parent, tenant: tenant do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_tenant ::Google::Cloud::Talent::V4beta1::CreateTenantRequest.new(parent: parent, tenant: tenant) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_tenant({ parent: parent, tenant: tenant }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_tenant(::Google::Cloud::Talent::V4beta1::CreateTenantRequest.new(parent: parent, tenant: tenant), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_tenant_client_stub.call_count + end + end + end + + def test_get_tenant + # Create test objects. + client_result = ::Google::Cloud::Talent::V4beta1::Tenant.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_tenant_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Talent::V4beta1::TenantService::Rest::ServiceStub.stub :transcode_get_tenant_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_tenant_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_tenant({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_tenant name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_tenant ::Google::Cloud::Talent::V4beta1::GetTenantRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_tenant({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_tenant(::Google::Cloud::Talent::V4beta1::GetTenantRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_tenant_client_stub.call_count + end + end + end + + def test_update_tenant + # Create test objects. + client_result = ::Google::Cloud::Talent::V4beta1::Tenant.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + tenant = {} + update_mask = {} + + update_tenant_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Talent::V4beta1::TenantService::Rest::ServiceStub.stub :transcode_update_tenant_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_tenant_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_tenant({ tenant: tenant, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_tenant tenant: tenant, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_tenant ::Google::Cloud::Talent::V4beta1::UpdateTenantRequest.new(tenant: tenant, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_tenant({ tenant: tenant, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_tenant(::Google::Cloud::Talent::V4beta1::UpdateTenantRequest.new(tenant: tenant, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_tenant_client_stub.call_count + end + end + end + + def test_delete_tenant + # 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_tenant_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Talent::V4beta1::TenantService::Rest::ServiceStub.stub :transcode_delete_tenant_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_tenant_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_tenant({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_tenant name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_tenant ::Google::Cloud::Talent::V4beta1::DeleteTenantRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_tenant({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_tenant(::Google::Cloud::Talent::V4beta1::DeleteTenantRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_tenant_client_stub.call_count + end + end + end + + def test_list_tenants + # Create test objects. + client_result = ::Google::Cloud::Talent::V4beta1::ListTenantsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_tenants_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Talent::V4beta1::TenantService::Rest::ServiceStub.stub :transcode_list_tenants_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_tenants_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_tenants({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_tenants parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_tenants ::Google::Cloud::Talent::V4beta1::ListTenantsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_tenants({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_tenants(::Google::Cloud::Talent::V4beta1::ListTenantsRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_tenants_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::Talent::V4beta1::TenantService::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::Talent::V4beta1::TenantService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/tenant_service_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/tenant_service_test.rb new file mode 100644 index 000000000000..a90e6bf14b95 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/tenant_service_test.rb @@ -0,0 +1,407 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/talent/v4beta1/tenant_service_pb" +require "google/cloud/talent/v4beta1/tenant_service" + +class ::Google::Cloud::Talent::V4beta1::TenantService::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_tenant + # Create GRPC objects. + grpc_response = ::Google::Cloud::Talent::V4beta1::Tenant.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + tenant = {} + + create_tenant_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_tenant, name + assert_kind_of ::Google::Cloud::Talent::V4beta1::CreateTenantRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::Tenant), request["tenant"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_tenant_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::TenantService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_tenant({ parent: parent, tenant: tenant }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_tenant parent: parent, tenant: tenant do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_tenant ::Google::Cloud::Talent::V4beta1::CreateTenantRequest.new(parent: parent, tenant: tenant) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_tenant({ parent: parent, tenant: tenant }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_tenant(::Google::Cloud::Talent::V4beta1::CreateTenantRequest.new(parent: parent, tenant: tenant), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_tenant_client_stub.call_rpc_count + end + end + + def test_get_tenant + # Create GRPC objects. + grpc_response = ::Google::Cloud::Talent::V4beta1::Tenant.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_tenant_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_tenant, name + assert_kind_of ::Google::Cloud::Talent::V4beta1::GetTenantRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_tenant_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::TenantService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_tenant({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_tenant name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_tenant ::Google::Cloud::Talent::V4beta1::GetTenantRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_tenant({ 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_tenant(::Google::Cloud::Talent::V4beta1::GetTenantRequest.new(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_tenant_client_stub.call_rpc_count + end + end + + def test_update_tenant + # Create GRPC objects. + grpc_response = ::Google::Cloud::Talent::V4beta1::Tenant.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + tenant = {} + update_mask = {} + + update_tenant_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_tenant, name + assert_kind_of ::Google::Cloud::Talent::V4beta1::UpdateTenantRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::Tenant), request["tenant"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_tenant_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::TenantService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_tenant({ tenant: tenant, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_tenant tenant: tenant, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_tenant ::Google::Cloud::Talent::V4beta1::UpdateTenantRequest.new(tenant: tenant, 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_tenant({ tenant: tenant, 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_tenant(::Google::Cloud::Talent::V4beta1::UpdateTenantRequest.new(tenant: tenant, 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_tenant_client_stub.call_rpc_count + end + end + + def test_delete_tenant + # 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_tenant_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_tenant, name + assert_kind_of ::Google::Cloud::Talent::V4beta1::DeleteTenantRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_tenant_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::TenantService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_tenant({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_tenant name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_tenant ::Google::Cloud::Talent::V4beta1::DeleteTenantRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_tenant({ 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_tenant(::Google::Cloud::Talent::V4beta1::DeleteTenantRequest.new(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_tenant_client_stub.call_rpc_count + end + end + + def test_list_tenants + # Create GRPC objects. + grpc_response = ::Google::Cloud::Talent::V4beta1::ListTenantsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_token = "hello world" + page_size = 42 + + list_tenants_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_tenants, name + assert_kind_of ::Google::Cloud::Talent::V4beta1::ListTenantsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_tenants_client_stub do + # Create client + client = ::Google::Cloud::Talent::V4beta1::TenantService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_tenants({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_tenants parent: parent, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_tenants ::Google::Cloud::Talent::V4beta1::ListTenantsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_tenants({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_tenants(::Google::Cloud::Talent::V4beta1::ListTenantsRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_tenants_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::Talent::V4beta1::TenantService::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::Talent::V4beta1::TenantService::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::Talent::V4beta1::TenantService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Talent::V4beta1::TenantService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/helper.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-talent-v4beta1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-tasks-v2/.gitignore b/owl-bot-staging/google-cloud-tasks-v2/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-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-tasks-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-tasks-v2/.repo-metadata.json new file mode 100644 index 000000000000..9f20ac72dea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "cloudtasks.googleapis.com", + "api_shortname": "cloudtasks", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2/latest", + "distribution_name": "google-cloud-tasks-v2", + "is_cloud": true, + "language": "ruby", + "name": "cloudtasks", + "name_pretty": "Cloud Tasks V2 API", + "product_documentation": "https://cloud.google.com/tasks", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Cloud Tasks is a fully managed service that allows you to manage the execution, dispatch and delivery of a large number of distributed tasks. You can asynchronously perform work outside of a user request. Your tasks can be executed on App Engine or any arbitrary HTTP endpoint. Note that google-cloud-tasks-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-tasks instead. See the readme for more details.", + "ruby-cloud-env-prefix": "TASKS", + "ruby-cloud-product-url": "https://cloud.google.com/tasks", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-tasks-v2/.rubocop.yml b/owl-bot-staging/google-cloud-tasks-v2/.rubocop.yml new file mode 100644 index 000000000000..c73aa9c3a62f --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-tasks-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-tasks-v2.rb" diff --git a/owl-bot-staging/google-cloud-tasks-v2/.toys.rb b/owl-bot-staging/google-cloud-tasks-v2/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-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-tasks-v2/.yardopts b/owl-bot-staging/google-cloud-tasks-v2/.yardopts new file mode 100644 index 000000000000..61acd5d300ad --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Tasks 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-tasks-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-tasks-v2/AUTHENTICATION.md new file mode 100644 index 000000000000..17282377935b --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-tasks-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-tasks-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/tasks/v2" + +client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/tasks/v2" + +::Google::Cloud::Tasks::V2::CloudTasks::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Tasks::V2::CloudTasks::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-tasks-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/tasks/v2" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Tasks::V2::CloudTasks::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-tasks-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-tasks-v2/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-tasks-v2/Gemfile b/owl-bot-staging/google-cloud-tasks-v2/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-tasks-v2/LICENSE.md b/owl-bot-staging/google-cloud-tasks-v2/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-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-tasks-v2/README.md b/owl-bot-staging/google-cloud-tasks-v2/README.md new file mode 100644 index 000000000000..3acb58b85bcb --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Tasks V2 API + +Manages the execution of large numbers of distributed requests. + +Cloud Tasks is a fully managed service that allows you to manage the execution, dispatch and delivery of a large number of distributed tasks. You can asynchronously perform work outside of a user request. Your tasks can be executed on App Engine or any arbitrary HTTP endpoint. + +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 Tasks V2 API. Most users should consider using +the main client gem, +[google-cloud-tasks](https://rubygems.org/gems/google-cloud-tasks). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-tasks-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/cloudtasks.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/tasks/v2" + +client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new +request = ::Google::Cloud::Tasks::V2::ListQueuesRequest.new # (request fields as keyword arguments...) +response = client.list_queues request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/tasks) +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/tasks/v2" +require "logger" + +client = ::Google::Cloud::Tasks::V2::CloudTasks::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-tasks`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-tasks-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-tasks`. +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-tasks-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-tasks-v2/Rakefile b/owl-bot-staging/google-cloud-tasks-v2/Rakefile new file mode 100644 index 000000000000..2339c75f47d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-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-tasks-v2 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["TASKS_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["TASKS_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["TASKS_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 TASKS_TEST_PROJECT=test123 TASKS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/tasks/v2/cloud_tasks/credentials" + ::Google::Cloud::Tasks::V2::CloudTasks::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["TASKS_PROJECT"] = project + ENV["TASKS_TEST_PROJECT"] = project + ENV["TASKS_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-tasks-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-tasks-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-tasks-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-tasks-v2 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-tasks-v2" + header "google-cloud-tasks-v2 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-tasks-v2 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-tasks-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-tasks-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-tasks-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-tasks-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-tasks-v2/gapic_metadata.json new file mode 100644 index 000000000000..2f95f7bab9cd --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/gapic_metadata.json @@ -0,0 +1,98 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.tasks.v2", + "libraryPackage": "::Google::Cloud::Tasks::V2", + "services": { + "CloudTasks": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Tasks::V2::CloudTasks::Client", + "rpcs": { + "ListQueues": { + "methods": [ + "list_queues" + ] + }, + "GetQueue": { + "methods": [ + "get_queue" + ] + }, + "CreateQueue": { + "methods": [ + "create_queue" + ] + }, + "UpdateQueue": { + "methods": [ + "update_queue" + ] + }, + "DeleteQueue": { + "methods": [ + "delete_queue" + ] + }, + "PurgeQueue": { + "methods": [ + "purge_queue" + ] + }, + "PauseQueue": { + "methods": [ + "pause_queue" + ] + }, + "ResumeQueue": { + "methods": [ + "resume_queue" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + }, + "ListTasks": { + "methods": [ + "list_tasks" + ] + }, + "GetTask": { + "methods": [ + "get_task" + ] + }, + "CreateTask": { + "methods": [ + "create_task" + ] + }, + "DeleteTask": { + "methods": [ + "delete_task" + ] + }, + "RunTask": { + "methods": [ + "run_task" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-tasks-v2/google-cloud-tasks-v2.gemspec b/owl-bot-staging/google-cloud-tasks-v2/google-cloud-tasks-v2.gemspec new file mode 100644 index 000000000000..a53d67e47dc5 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/google-cloud-tasks-v2.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/tasks/v2/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-tasks-v2" + gem.version = Google::Cloud::Tasks::V2::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Cloud Tasks is a fully managed service that allows you to manage the execution, dispatch and delivery of a large number of distributed tasks. You can asynchronously perform work outside of a user request. Your tasks can be executed on App Engine or any arbitrary HTTP endpoint. Note that google-cloud-tasks-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-tasks instead. See the readme for more details." + gem.summary = "Manages the execution of large numbers of distributed requests." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google-cloud-tasks-v2.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google-cloud-tasks-v2.rb new file mode 100644 index 000000000000..c0bfa1f74ccc --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/lib/google-cloud-tasks-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/tasks/v2" diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2.rb new file mode 100644 index 000000000000..28eb8e8f1dd1 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/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/tasks/v2/cloud_tasks" +require "google/cloud/tasks/v2/version" + +module Google + module Cloud + module Tasks + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/tasks/v2" + # client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/tasks/v2" + # client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new + # + module V2 + end + end + end +end + +helper_path = ::File.join __dir__, "v2", "_helpers.rb" +require "google/cloud/tasks/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/bindings_override.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/bindings_override.rb new file mode 100644 index 000000000000..0d1044729505 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/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 Tasks + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/tasks/v2/rest" + # client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new + # + module V2 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Tasks"] + 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: "/v2/{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: "/v2/{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-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks.rb new file mode 100644 index 000000000000..8cec3f1cb14f --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks.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/tasks/v2/version" + +require "google/cloud/tasks/v2/cloud_tasks/credentials" +require "google/cloud/tasks/v2/cloud_tasks/paths" +require "google/cloud/tasks/v2/cloud_tasks/client" +require "google/cloud/tasks/v2/cloud_tasks/rest" + +module Google + module Cloud + module Tasks + module V2 + ## + # Cloud Tasks allows developers to manage the execution of background + # work in their applications. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/tasks/v2/cloud_tasks" + # client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/tasks/v2/cloud_tasks/rest" + # client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new + # + module CloudTasks + end + end + end + end +end + +helper_path = ::File.join __dir__, "cloud_tasks", "helpers.rb" +require "google/cloud/tasks/v2/cloud_tasks/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/client.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/client.rb new file mode 100644 index 000000000000..ec1c5ab6a70a --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/client.rb @@ -0,0 +1,2259 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/tasks/v2/cloudtasks_pb" +require "google/cloud/location" + +module Google + module Cloud + module Tasks + module V2 + module CloudTasks + ## + # Client for the CloudTasks service. + # + # Cloud Tasks allows developers to manage the execution of background + # work in their applications. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudtasks.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_tasks_stub + + ## + # Configure the CloudTasks Client class. + # + # See {::Google::Cloud::Tasks::V2::CloudTasks::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudTasks clients + # ::Google::Cloud::Tasks::V2::CloudTasks::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", "Tasks", "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.rpcs.list_queues.timeout = 20.0 + default_config.rpcs.list_queues.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_queue.timeout = 20.0 + default_config.rpcs.get_queue.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_queue.timeout = 20.0 + + default_config.rpcs.update_queue.timeout = 20.0 + + default_config.rpcs.delete_queue.timeout = 20.0 + default_config.rpcs.delete_queue.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.purge_queue.timeout = 20.0 + + default_config.rpcs.pause_queue.timeout = 20.0 + + default_config.rpcs.resume_queue.timeout = 20.0 + + default_config.rpcs.get_iam_policy.timeout = 20.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.set_iam_policy.timeout = 20.0 + + default_config.rpcs.test_iam_permissions.timeout = 20.0 + default_config.rpcs.test_iam_permissions.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_tasks.timeout = 20.0 + default_config.rpcs.list_tasks.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_task.timeout = 20.0 + default_config.rpcs.get_task.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_task.timeout = 20.0 + + default_config.rpcs.delete_task.timeout = 20.0 + default_config.rpcs.delete_task.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.run_task.timeout = 20.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudTasks 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::Tasks::V2::CloudTasks::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_tasks_stub.universe_domain + end + + ## + # Create a new CloudTasks client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudTasks 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/tasks/v2/cloudtasks_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 + + @cloud_tasks_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Tasks::V2::CloudTasks::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_tasks_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_tasks_stub.endpoint + config.universe_domain = @cloud_tasks_stub.universe_domain + config.logger = @cloud_tasks_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 + @cloud_tasks_stub.logger + end + + # Service calls + + ## + # Lists queues. + # + # Queues are returned in lexicographical order. + # + # @overload list_queues(request, options = nil) + # Pass arguments to `list_queues` via a request object, either of type + # {::Google::Cloud::Tasks::V2::ListQueuesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::ListQueuesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_queues(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_queues` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 name. + # For example: `projects/PROJECT_ID/locations/LOCATION_ID` + # @param filter [::String] + # `filter` can be used to specify a subset of queues. Any + # {::Google::Cloud::Tasks::V2::Queue Queue} field can be used as a filter and + # several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + # filter syntax is the same as described in [Stackdriver's Advanced Logs + # Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + # + # Sample filter "state: PAUSED". + # + # Note that using filters might cause fewer queues than the + # requested page_size to be returned. + # @param page_size [::Integer] + # Requested page size. + # + # The maximum page size is 9800. If unspecified, the page size will + # be the maximum. Fewer queues than requested might be returned, + # even if more queues exist; use the + # {::Google::Cloud::Tasks::V2::ListQueuesResponse#next_page_token next_page_token} + # in the response to determine if more queues exist. + # @param page_token [::String] + # A token identifying the page of results to return. + # + # To request the first page results, page_token must be empty. To + # request the next page of results, page_token must be the value of + # {::Google::Cloud::Tasks::V2::ListQueuesResponse#next_page_token next_page_token} + # returned from the previous call to + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#list_queues ListQueues} method. It is an + # error to switch the value of the + # {::Google::Cloud::Tasks::V2::ListQueuesRequest#filter filter} while iterating + # through pages. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2::Queue>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2::Queue>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::ListQueuesRequest.new + # + # # Call the list_queues method. + # result = client.list_queues request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Tasks::V2::Queue. + # p item + # end + # + def list_queues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::ListQueuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_queues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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_queues.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_queues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :list_queues, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_tasks_stub, :list_queues, 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 queue. + # + # @overload get_queue(request, options = nil) + # Pass arguments to `get_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2::GetQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::GetQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_queue(name: nil) + # Pass arguments to `get_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the queue. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2::Queue] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2::Queue] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::GetQueueRequest.new + # + # # Call the get_queue method. + # result = client.get_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2::Queue. + # p result + # + def get_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::GetQueueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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_queue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :get_queue, request, 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 queue. + # + # Queues created with this method allow tasks to live for a maximum of 31 + # days. After a task is 31 days old, the task will be deleted regardless of + # whether it was dispatched or not. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + # + # @overload create_queue(request, options = nil) + # Pass arguments to `create_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2::CreateQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::CreateQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_queue(parent: nil, queue: nil) + # Pass arguments to `create_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 name in which the queue will be created. + # For example: `projects/PROJECT_ID/locations/LOCATION_ID` + # + # The list of allowed locations can be obtained by calling Cloud + # Tasks' implementation of + # [ListLocations][google.cloud.location.Locations.ListLocations]. + # @param queue [::Google::Cloud::Tasks::V2::Queue, ::Hash] + # Required. The queue to create. + # + # [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an + # existing queue. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2::Queue] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2::Queue] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::CreateQueueRequest.new + # + # # Call the create_queue method. + # result = client.create_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2::Queue. + # p result + # + def create_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::CreateQueueRequest + + # Converts hash and nil to 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_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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_queue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :create_queue, request, 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 queue. + # + # This method creates the queue if it does not exist and updates + # the queue if it does exist. + # + # Queues created with this method allow tasks to live for a maximum of 31 + # days. After a task is 31 days old, the task will be deleted regardless of + # whether it was dispatched or not. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + # + # @overload update_queue(request, options = nil) + # Pass arguments to `update_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2::UpdateQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::UpdateQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_queue(queue: nil, update_mask: nil) + # Pass arguments to `update_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param queue [::Google::Cloud::Tasks::V2::Queue, ::Hash] + # Required. The queue to create or update. + # + # The queue's {::Google::Cloud::Tasks::V2::Queue#name name} must be specified. + # + # Output only fields cannot be modified using UpdateQueue. + # Any value specified for an output only field will be ignored. + # The queue's {::Google::Cloud::Tasks::V2::Queue#name name} cannot be changed. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # A mask used to specify which fields of the queue are being updated. + # + # If empty, then all fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2::Queue] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2::Queue] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::UpdateQueueRequest.new + # + # # Call the update_queue method. + # result = client.update_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2::Queue. + # p result + # + def update_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::UpdateQueueRequest + + # Converts hash and nil to 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_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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.queue&.name + header_params["queue.name"] = request.queue.name + end + + request_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_queue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :update_queue, request, 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 queue. + # + # This command will delete the queue even if it has tasks in it. + # + # Note: If you delete a queue, a queue with the same name can't be created + # for 7 days. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + # + # @overload delete_queue(request, options = nil) + # Pass arguments to `delete_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2::DeleteQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::DeleteQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_queue(name: nil) + # Pass arguments to `delete_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::DeleteQueueRequest.new + # + # # Call the delete_queue method. + # result = client.delete_queue request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::DeleteQueueRequest + + # Converts hash and nil to 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_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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_queue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :delete_queue, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Purges a queue by deleting all of its tasks. + # + # All tasks created before this method is called are permanently deleted. + # + # Purge operations can take up to one minute to take effect. Tasks + # might be dispatched before the purge takes effect. A purge is irreversible. + # + # @overload purge_queue(request, options = nil) + # Pass arguments to `purge_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2::PurgeQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::PurgeQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload purge_queue(name: nil) + # Pass arguments to `purge_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2::Queue] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2::Queue] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::PurgeQueueRequest.new + # + # # Call the purge_queue method. + # result = client.purge_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2::Queue. + # p result + # + def purge_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::PurgeQueueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.purge_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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.purge_queue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.purge_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :purge_queue, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Pauses the queue. + # + # If a queue is paused then the system will stop dispatching tasks + # until the queue is resumed via + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#resume_queue ResumeQueue}. Tasks can + # still be added when the queue is paused. A queue is paused if its + # {::Google::Cloud::Tasks::V2::Queue#state state} is + # {::Google::Cloud::Tasks::V2::Queue::State::PAUSED PAUSED}. + # + # @overload pause_queue(request, options = nil) + # Pass arguments to `pause_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2::PauseQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::PauseQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload pause_queue(name: nil) + # Pass arguments to `pause_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2::Queue] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2::Queue] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::PauseQueueRequest.new + # + # # Call the pause_queue method. + # result = client.pause_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2::Queue. + # p result + # + def pause_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::PauseQueueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.pause_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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.pause_queue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.pause_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :pause_queue, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Resume a queue. + # + # This method resumes a queue after it has been + # {::Google::Cloud::Tasks::V2::Queue::State::PAUSED PAUSED} or + # {::Google::Cloud::Tasks::V2::Queue::State::DISABLED DISABLED}. The state of a + # queue is stored in the queue's {::Google::Cloud::Tasks::V2::Queue#state state}; + # after calling this method it will be set to + # {::Google::Cloud::Tasks::V2::Queue::State::RUNNING RUNNING}. + # + # WARNING: Resuming many high-QPS queues at the same time can + # lead to target overloading. If you are resuming high-QPS + # queues, follow the 500/50/5 pattern described in + # [Managing Cloud Tasks Scaling + # Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). + # + # @overload resume_queue(request, options = nil) + # Pass arguments to `resume_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2::ResumeQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::ResumeQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload resume_queue(name: nil) + # Pass arguments to `resume_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2::Queue] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2::Queue] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::ResumeQueueRequest.new + # + # # Call the resume_queue method. + # result = client.resume_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2::Queue. + # p result + # + def resume_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::ResumeQueueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.resume_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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.resume_queue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.resume_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :resume_queue, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy for a {::Google::Cloud::Tasks::V2::Queue Queue}. + # Returns an empty policy if the resource exists and does not have a policy + # set. + # + # Authorization requires the following + # [Google IAM](https://cloud.google.com/iam) permission on the specified + # resource parent: + # + # * `cloudtasks.queues.getIamPolicy` + # + # @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/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::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::Tasks::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.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_tasks_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy for a {::Google::Cloud::Tasks::V2::Queue Queue}. + # Replaces any existing policy. + # + # Note: The Cloud Console does not check queue-level IAM permissions yet. + # Project-level permissions are required to use the Cloud Console. + # + # Authorization requires the following + # [Google IAM](https://cloud.google.com/iam) permission on the specified + # resource parent: + # + # * `cloudtasks.queues.setIamPolicy` + # + # @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/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::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::Tasks::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.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_tasks_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns permissions that a caller has on a + # {::Google::Cloud::Tasks::V2::Queue Queue}. If the resource does not exist, this + # will return an empty set of permissions, not a + # [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + # + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::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::Tasks::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.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_tasks_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 + + ## + # Lists the tasks in a queue. + # + # By default, only the {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC} view is + # retrieved due to performance considerations; + # {::Google::Cloud::Tasks::V2::ListTasksRequest#response_view response_view} + # controls the subset of information which is returned. + # + # The tasks may be returned in any order. The ordering may change at any + # time. + # + # @overload list_tasks(request, options = nil) + # Pass arguments to `list_tasks` via a request object, either of type + # {::Google::Cloud::Tasks::V2::ListTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::ListTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_tasks(parent: nil, response_view: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_tasks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # @param response_view [::Google::Cloud::Tasks::V2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2::Task Task} will be returned. + # + # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; + # not all information is retrieved by default because some data, such as + # payloads, might be desirable to return only when needed because + # of its large size or because of the sensitivity of data that it + # contains. + # + # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires + # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + # permission on the {::Google::Cloud::Tasks::V2::Task Task} resource. + # @param page_size [::Integer] + # Maximum page size. + # + # Fewer tasks than requested might be returned, even if more tasks exist; use + # {::Google::Cloud::Tasks::V2::ListTasksResponse#next_page_token next_page_token} + # in the response to determine if more tasks exist. + # + # The maximum page size is 1000. If unspecified, the page size will be the + # maximum. + # @param page_token [::String] + # A token identifying the page of results to return. + # + # To request the first page results, page_token must be empty. To + # request the next page of results, page_token must be the value of + # {::Google::Cloud::Tasks::V2::ListTasksResponse#next_page_token next_page_token} + # returned from the previous call to + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#list_tasks ListTasks} method. + # + # The page token is valid for only 2 hours. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2::Task>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2::Task>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::ListTasksRequest.new + # + # # Call the list_tasks method. + # result = client.list_tasks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Tasks::V2::Task. + # p item + # end + # + def list_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::ListTasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_tasks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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_tasks.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_tasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :list_tasks, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_tasks_stub, :list_tasks, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a task. + # + # @overload get_task(request, options = nil) + # Pass arguments to `get_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2::GetTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::GetTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_task(name: nil, response_view: nil) + # Pass arguments to `get_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @param response_view [::Google::Cloud::Tasks::V2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2::Task Task} will be returned. + # + # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; + # not all information is retrieved by default because some data, such as + # payloads, might be desirable to return only when needed because + # of its large size or because of the sensitivity of data that it + # contains. + # + # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires + # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + # permission on the {::Google::Cloud::Tasks::V2::Task Task} resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2::Task] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2::Task] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::GetTaskRequest.new + # + # # Call the get_task method. + # result = client.get_task request + # + # # The returned object is of type Google::Cloud::Tasks::V2::Task. + # p result + # + def get_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::GetTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :get_task, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a task and adds it to a queue. + # + # Tasks cannot be updated after creation; there is no UpdateTask command. + # + # * The maximum task size is 100KB. + # + # @overload create_task(request, options = nil) + # Pass arguments to `create_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2::CreateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::CreateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_task(parent: nil, task: nil, response_view: nil) + # Pass arguments to `create_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # + # The queue must already exist. + # @param task [::Google::Cloud::Tasks::V2::Task, ::Hash] + # Required. The task to add. + # + # Task names have the following format: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + # The user can optionally specify a task + # {::Google::Cloud::Tasks::V2::Task#name name}. If a name is not specified then + # the system will generate a random unique task id, which will be set in the + # task returned in the {::Google::Cloud::Tasks::V2::Task#name response}. + # + # If {::Google::Cloud::Tasks::V2::Task#schedule_time schedule_time} is not set or + # is in the past then Cloud Tasks will set it to the current time. + # + # Task De-duplication: + # + # Explicitly specifying a task ID enables task de-duplication. If + # a task's ID is identical to that of an existing task or a task + # that was deleted or executed recently then the call will fail + # with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + # If the task's queue was created using Cloud Tasks, then another task with + # the same name can't be created for ~1hour after the original task was + # deleted or executed. If the task's queue was created using queue.yaml or + # queue.xml, then another task with the same name can't be created + # for ~9days after the original task was deleted or executed. + # + # Because there is an extra lookup cost to identify duplicate task + # names, these {::Google::Cloud::Tasks::V2::CloudTasks::Client#create_task CreateTask} + # calls have significantly increased latency. Using hashed strings for the + # task id or for the prefix of the task id is recommended. Choosing task ids + # that are sequential or have sequential prefixes, for example using a + # timestamp, causes an increase in latency and error rates in all + # task commands. The infrastructure relies on an approximately + # uniform distribution of task ids to store and serve tasks + # efficiently. + # @param response_view [::Google::Cloud::Tasks::V2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2::Task Task} will be returned. + # + # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; + # not all information is retrieved by default because some data, such as + # payloads, might be desirable to return only when needed because + # of its large size or because of the sensitivity of data that it + # contains. + # + # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires + # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + # permission on the {::Google::Cloud::Tasks::V2::Task Task} resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2::Task] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2::Task] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::CreateTaskRequest.new + # + # # Call the create_task method. + # result = client.create_task request + # + # # The returned object is of type Google::Cloud::Tasks::V2::Task. + # p result + # + def create_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::CreateTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :create_task, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a task. + # + # A task can be deleted if it is scheduled or dispatched. A task + # cannot be deleted if it has executed successfully or permanently + # failed. + # + # @overload delete_task(request, options = nil) + # Pass arguments to `delete_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2::DeleteTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::DeleteTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_task(name: nil) + # Pass arguments to `delete_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::DeleteTaskRequest.new + # + # # Call the delete_task method. + # result = client.delete_task request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::DeleteTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :delete_task, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Forces a task to run now. + # + # When this method is called, Cloud Tasks will dispatch the task, even if + # the task is already running, the queue has reached its + # {::Google::Cloud::Tasks::V2::RateLimits RateLimits} or is + # {::Google::Cloud::Tasks::V2::Queue::State::PAUSED PAUSED}. + # + # This command is meant to be used for manual debugging. For + # example, {::Google::Cloud::Tasks::V2::CloudTasks::Client#run_task RunTask} can be used to + # retry a failed task after a fix has been made or to manually force a task + # to be dispatched now. + # + # The dispatched task is returned. That is, the task that is returned + # contains the [status][Task.status] after the task is dispatched but + # before the task is received by its target. + # + # If Cloud Tasks receives a successful response from the task's + # target, then the task will be deleted; otherwise the task's + # {::Google::Cloud::Tasks::V2::Task#schedule_time schedule_time} will be reset to + # the time that {::Google::Cloud::Tasks::V2::CloudTasks::Client#run_task RunTask} was + # called plus the retry delay specified in the queue's + # {::Google::Cloud::Tasks::V2::RetryConfig RetryConfig}. + # + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#run_task RunTask} returns + # [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a + # task that has already succeeded or permanently failed. + # + # @overload run_task(request, options = nil) + # Pass arguments to `run_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2::RunTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::RunTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload run_task(name: nil, response_view: nil) + # Pass arguments to `run_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @param response_view [::Google::Cloud::Tasks::V2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2::Task Task} will be returned. + # + # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; + # not all information is retrieved by default because some data, such as + # payloads, might be desirable to return only when needed because + # of its large size or because of the sensitivity of data that it + # contains. + # + # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires + # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + # permission on the {::Google::Cloud::Tasks::V2::Task Task} resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2::Task] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2::Task] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::RunTaskRequest.new + # + # # Call the run_task method. + # result = client.run_task request + # + # # The returned object is of type Google::Cloud::Tasks::V2::Task. + # p result + # + def run_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::RunTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.run_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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.run_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.run_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :run_task, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CloudTasks API. + # + # This class represents the configuration for CloudTasks, + # 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::Tasks::V2::CloudTasks::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_queues to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Tasks::V2::CloudTasks::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_queues.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_queues.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::Tasks::V2::CloudTasks::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 = "cloudtasks.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 CloudTasks 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_queues` + # @return [::Gapic::Config::Method] + # + attr_reader :list_queues + ## + # RPC-specific configuration for `get_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :get_queue + ## + # RPC-specific configuration for `create_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :create_queue + ## + # RPC-specific configuration for `update_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :update_queue + ## + # RPC-specific configuration for `delete_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_queue + ## + # RPC-specific configuration for `purge_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :purge_queue + ## + # RPC-specific configuration for `pause_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :pause_queue + ## + # RPC-specific configuration for `resume_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :resume_queue + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `list_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tasks + ## + # RPC-specific configuration for `get_task` + # @return [::Gapic::Config::Method] + # + attr_reader :get_task + ## + # RPC-specific configuration for `create_task` + # @return [::Gapic::Config::Method] + # + attr_reader :create_task + ## + # RPC-specific configuration for `delete_task` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_task + ## + # RPC-specific configuration for `run_task` + # @return [::Gapic::Config::Method] + # + attr_reader :run_task + + # @private + def initialize parent_rpcs = nil + list_queues_config = parent_rpcs.list_queues if parent_rpcs.respond_to? :list_queues + @list_queues = ::Gapic::Config::Method.new list_queues_config + get_queue_config = parent_rpcs.get_queue if parent_rpcs.respond_to? :get_queue + @get_queue = ::Gapic::Config::Method.new get_queue_config + create_queue_config = parent_rpcs.create_queue if parent_rpcs.respond_to? :create_queue + @create_queue = ::Gapic::Config::Method.new create_queue_config + update_queue_config = parent_rpcs.update_queue if parent_rpcs.respond_to? :update_queue + @update_queue = ::Gapic::Config::Method.new update_queue_config + delete_queue_config = parent_rpcs.delete_queue if parent_rpcs.respond_to? :delete_queue + @delete_queue = ::Gapic::Config::Method.new delete_queue_config + purge_queue_config = parent_rpcs.purge_queue if parent_rpcs.respond_to? :purge_queue + @purge_queue = ::Gapic::Config::Method.new purge_queue_config + pause_queue_config = parent_rpcs.pause_queue if parent_rpcs.respond_to? :pause_queue + @pause_queue = ::Gapic::Config::Method.new pause_queue_config + resume_queue_config = parent_rpcs.resume_queue if parent_rpcs.respond_to? :resume_queue + @resume_queue = ::Gapic::Config::Method.new resume_queue_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks + @list_tasks = ::Gapic::Config::Method.new list_tasks_config + get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task + @get_task = ::Gapic::Config::Method.new get_task_config + create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task + @create_task = ::Gapic::Config::Method.new create_task_config + delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task + @delete_task = ::Gapic::Config::Method.new delete_task_config + run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task + @run_task = ::Gapic::Config::Method.new run_task_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/credentials.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/credentials.rb new file mode 100644 index 000000000000..f34da6642695 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/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 Tasks + module V2 + module CloudTasks + # Credentials for the CloudTasks API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "TASKS_CREDENTIALS", + "TASKS_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "TASKS_CREDENTIALS_JSON", + "TASKS_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-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/paths.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/paths.rb new file mode 100644 index 000000000000..06a5c7d8a9b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/paths.rb @@ -0,0 +1,90 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Tasks + module V2 + module CloudTasks + # Path helper methods for the CloudTasks API. + module Paths + ## + # 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 Queue resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/queues/{queue}` + # + # @param project [String] + # @param location [String] + # @param queue [String] + # + # @return [::String] + def queue_path project:, location:, queue: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/queues/#{queue}" + end + + ## + # Create a fully-qualified Task resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/queues/{queue}/tasks/{task}` + # + # @param project [String] + # @param location [String] + # @param queue [String] + # @param task [String] + # + # @return [::String] + def task_path project:, location:, queue:, task: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "queue cannot contain /" if queue.to_s.include? "/" + + "projects/#{project}/locations/#{location}/queues/#{queue}/tasks/#{task}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/rest.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/rest.rb new file mode 100644 index 000000000000..a78a827e9ee6 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/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/tasks/v2/version" +require "google/cloud/tasks/v2/bindings_override" + +require "google/cloud/tasks/v2/cloud_tasks/credentials" +require "google/cloud/tasks/v2/cloud_tasks/paths" +require "google/cloud/tasks/v2/cloud_tasks/rest/client" + +module Google + module Cloud + module Tasks + module V2 + ## + # Cloud Tasks allows developers to manage the execution of background + # work in their applications. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/tasks/v2/cloud_tasks/rest" + # client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new + # + module CloudTasks + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/tasks/v2/cloud_tasks/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/rest/client.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/rest/client.rb new file mode 100644 index 000000000000..3075391070f5 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/rest/client.rb @@ -0,0 +1,2112 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/tasks/v2/cloudtasks_pb" +require "google/cloud/tasks/v2/cloud_tasks/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module Tasks + module V2 + module CloudTasks + module Rest + ## + # REST client for the CloudTasks service. + # + # Cloud Tasks allows developers to manage the execution of background + # work in their applications. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudtasks.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_tasks_stub + + ## + # Configure the CloudTasks Client class. + # + # See {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudTasks clients + # ::Google::Cloud::Tasks::V2::CloudTasks::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", "Tasks", "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.rpcs.list_queues.timeout = 20.0 + default_config.rpcs.list_queues.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_queue.timeout = 20.0 + default_config.rpcs.get_queue.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_queue.timeout = 20.0 + + default_config.rpcs.update_queue.timeout = 20.0 + + default_config.rpcs.delete_queue.timeout = 20.0 + default_config.rpcs.delete_queue.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.purge_queue.timeout = 20.0 + + default_config.rpcs.pause_queue.timeout = 20.0 + + default_config.rpcs.resume_queue.timeout = 20.0 + + default_config.rpcs.get_iam_policy.timeout = 20.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.set_iam_policy.timeout = 20.0 + + default_config.rpcs.test_iam_permissions.timeout = 20.0 + default_config.rpcs.test_iam_permissions.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_tasks.timeout = 20.0 + default_config.rpcs.list_tasks.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_task.timeout = 20.0 + default_config.rpcs.get_task.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_task.timeout = 20.0 + + default_config.rpcs.delete_task.timeout = 20.0 + default_config.rpcs.delete_task.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.run_task.timeout = 20.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudTasks 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::Tasks::V2::CloudTasks::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_tasks_stub.universe_domain + end + + ## + # Create a new CloudTasks REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudTasks 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 + + @cloud_tasks_stub = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @cloud_tasks_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_tasks_stub.endpoint + config.universe_domain = @cloud_tasks_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @cloud_tasks_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 + @cloud_tasks_stub.logger + end + + # Service calls + + ## + # Lists queues. + # + # Queues are returned in lexicographical order. + # + # @overload list_queues(request, options = nil) + # Pass arguments to `list_queues` via a request object, either of type + # {::Google::Cloud::Tasks::V2::ListQueuesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::ListQueuesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_queues(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_queues` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 name. + # For example: `projects/PROJECT_ID/locations/LOCATION_ID` + # @param filter [::String] + # `filter` can be used to specify a subset of queues. Any + # {::Google::Cloud::Tasks::V2::Queue Queue} field can be used as a filter and + # several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + # filter syntax is the same as described in [Stackdriver's Advanced Logs + # Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + # + # Sample filter "state: PAUSED". + # + # Note that using filters might cause fewer queues than the + # requested page_size to be returned. + # @param page_size [::Integer] + # Requested page size. + # + # The maximum page size is 9800. If unspecified, the page size will + # be the maximum. Fewer queues than requested might be returned, + # even if more queues exist; use the + # {::Google::Cloud::Tasks::V2::ListQueuesResponse#next_page_token next_page_token} + # in the response to determine if more queues exist. + # @param page_token [::String] + # A token identifying the page of results to return. + # + # To request the first page results, page_token must be empty. To + # request the next page of results, page_token must be the value of + # {::Google::Cloud::Tasks::V2::ListQueuesResponse#next_page_token next_page_token} + # returned from the previous call to + # {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#list_queues ListQueues} method. It is an + # error to switch the value of the + # {::Google::Cloud::Tasks::V2::ListQueuesRequest#filter filter} while iterating + # through pages. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2::Queue>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2::Queue>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::ListQueuesRequest.new + # + # # Call the list_queues method. + # result = client.list_queues request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Tasks::V2::Queue. + # p item + # end + # + def list_queues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::ListQueuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_queues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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_queues.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_queues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.list_queues request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_tasks_stub, :list_queues, "queues", 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 queue. + # + # @overload get_queue(request, options = nil) + # Pass arguments to `get_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2::GetQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::GetQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_queue(name: nil) + # Pass arguments to `get_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the queue. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2::Queue] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::GetQueueRequest.new + # + # # Call the get_queue method. + # result = client.get_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2::Queue. + # p result + # + def get_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::GetQueueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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_queue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.get_queue request, 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 queue. + # + # Queues created with this method allow tasks to live for a maximum of 31 + # days. After a task is 31 days old, the task will be deleted regardless of + # whether it was dispatched or not. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + # + # @overload create_queue(request, options = nil) + # Pass arguments to `create_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2::CreateQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::CreateQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_queue(parent: nil, queue: nil) + # Pass arguments to `create_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 name in which the queue will be created. + # For example: `projects/PROJECT_ID/locations/LOCATION_ID` + # + # The list of allowed locations can be obtained by calling Cloud + # Tasks' implementation of + # [ListLocations][google.cloud.location.Locations.ListLocations]. + # @param queue [::Google::Cloud::Tasks::V2::Queue, ::Hash] + # Required. The queue to create. + # + # [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an + # existing queue. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2::Queue] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::CreateQueueRequest.new + # + # # Call the create_queue method. + # result = client.create_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2::Queue. + # p result + # + def create_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::CreateQueueRequest + + # Converts hash and nil to an 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_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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_queue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.create_queue request, 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 queue. + # + # This method creates the queue if it does not exist and updates + # the queue if it does exist. + # + # Queues created with this method allow tasks to live for a maximum of 31 + # days. After a task is 31 days old, the task will be deleted regardless of + # whether it was dispatched or not. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + # + # @overload update_queue(request, options = nil) + # Pass arguments to `update_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2::UpdateQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::UpdateQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_queue(queue: nil, update_mask: nil) + # Pass arguments to `update_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param queue [::Google::Cloud::Tasks::V2::Queue, ::Hash] + # Required. The queue to create or update. + # + # The queue's {::Google::Cloud::Tasks::V2::Queue#name name} must be specified. + # + # Output only fields cannot be modified using UpdateQueue. + # Any value specified for an output only field will be ignored. + # The queue's {::Google::Cloud::Tasks::V2::Queue#name name} cannot be changed. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # A mask used to specify which fields of the queue are being updated. + # + # If empty, then all fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2::Queue] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::UpdateQueueRequest.new + # + # # Call the update_queue method. + # result = client.update_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2::Queue. + # p result + # + def update_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::UpdateQueueRequest + + # Converts hash and nil to an 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_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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_queue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.update_queue request, 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 queue. + # + # This command will delete the queue even if it has tasks in it. + # + # Note: If you delete a queue, a queue with the same name can't be created + # for 7 days. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + # + # @overload delete_queue(request, options = nil) + # Pass arguments to `delete_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2::DeleteQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::DeleteQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_queue(name: nil) + # Pass arguments to `delete_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::DeleteQueueRequest.new + # + # # Call the delete_queue method. + # result = client.delete_queue request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::DeleteQueueRequest + + # Converts hash and nil to an 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_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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_queue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.delete_queue request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Purges a queue by deleting all of its tasks. + # + # All tasks created before this method is called are permanently deleted. + # + # Purge operations can take up to one minute to take effect. Tasks + # might be dispatched before the purge takes effect. A purge is irreversible. + # + # @overload purge_queue(request, options = nil) + # Pass arguments to `purge_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2::PurgeQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::PurgeQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload purge_queue(name: nil) + # Pass arguments to `purge_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2::Queue] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::PurgeQueueRequest.new + # + # # Call the purge_queue method. + # result = client.purge_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2::Queue. + # p result + # + def purge_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::PurgeQueueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.purge_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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.purge_queue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.purge_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.purge_queue request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Pauses the queue. + # + # If a queue is paused then the system will stop dispatching tasks + # until the queue is resumed via + # {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#resume_queue ResumeQueue}. Tasks can + # still be added when the queue is paused. A queue is paused if its + # {::Google::Cloud::Tasks::V2::Queue#state state} is + # {::Google::Cloud::Tasks::V2::Queue::State::PAUSED PAUSED}. + # + # @overload pause_queue(request, options = nil) + # Pass arguments to `pause_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2::PauseQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::PauseQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload pause_queue(name: nil) + # Pass arguments to `pause_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2::Queue] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::PauseQueueRequest.new + # + # # Call the pause_queue method. + # result = client.pause_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2::Queue. + # p result + # + def pause_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::PauseQueueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.pause_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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.pause_queue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.pause_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.pause_queue request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Resume a queue. + # + # This method resumes a queue after it has been + # {::Google::Cloud::Tasks::V2::Queue::State::PAUSED PAUSED} or + # {::Google::Cloud::Tasks::V2::Queue::State::DISABLED DISABLED}. The state of a + # queue is stored in the queue's {::Google::Cloud::Tasks::V2::Queue#state state}; + # after calling this method it will be set to + # {::Google::Cloud::Tasks::V2::Queue::State::RUNNING RUNNING}. + # + # WARNING: Resuming many high-QPS queues at the same time can + # lead to target overloading. If you are resuming high-QPS + # queues, follow the 500/50/5 pattern described in + # [Managing Cloud Tasks Scaling + # Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). + # + # @overload resume_queue(request, options = nil) + # Pass arguments to `resume_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2::ResumeQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::ResumeQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload resume_queue(name: nil) + # Pass arguments to `resume_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2::Queue] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::ResumeQueueRequest.new + # + # # Call the resume_queue method. + # result = client.resume_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2::Queue. + # p result + # + def resume_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::ResumeQueueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.resume_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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.resume_queue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.resume_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.resume_queue request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy for a {::Google::Cloud::Tasks::V2::Queue Queue}. + # Returns an empty policy if the resource exists and does not have a policy + # set. + # + # Authorization requires the following + # [Google IAM](https://cloud.google.com/iam) permission on the specified + # resource parent: + # + # * `cloudtasks.queues.getIamPolicy` + # + # @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/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::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::Tasks::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_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_tasks_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy for a {::Google::Cloud::Tasks::V2::Queue Queue}. + # Replaces any existing policy. + # + # Note: The Cloud Console does not check queue-level IAM permissions yet. + # Project-level permissions are required to use the Cloud Console. + # + # Authorization requires the following + # [Google IAM](https://cloud.google.com/iam) permission on the specified + # resource parent: + # + # * `cloudtasks.queues.setIamPolicy` + # + # @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/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::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::Tasks::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.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_tasks_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns permissions that a caller has on a + # {::Google::Cloud::Tasks::V2::Queue Queue}. If the resource does not exist, this + # will return an empty set of permissions, not a + # [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + # + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::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::Tasks::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.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_tasks_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 + + ## + # Lists the tasks in a queue. + # + # By default, only the {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC} view is + # retrieved due to performance considerations; + # {::Google::Cloud::Tasks::V2::ListTasksRequest#response_view response_view} + # controls the subset of information which is returned. + # + # The tasks may be returned in any order. The ordering may change at any + # time. + # + # @overload list_tasks(request, options = nil) + # Pass arguments to `list_tasks` via a request object, either of type + # {::Google::Cloud::Tasks::V2::ListTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::ListTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_tasks(parent: nil, response_view: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_tasks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # @param response_view [::Google::Cloud::Tasks::V2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2::Task Task} will be returned. + # + # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; + # not all information is retrieved by default because some data, such as + # payloads, might be desirable to return only when needed because + # of its large size or because of the sensitivity of data that it + # contains. + # + # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires + # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + # permission on the {::Google::Cloud::Tasks::V2::Task Task} resource. + # @param page_size [::Integer] + # Maximum page size. + # + # Fewer tasks than requested might be returned, even if more tasks exist; use + # {::Google::Cloud::Tasks::V2::ListTasksResponse#next_page_token next_page_token} + # in the response to determine if more tasks exist. + # + # The maximum page size is 1000. If unspecified, the page size will be the + # maximum. + # @param page_token [::String] + # A token identifying the page of results to return. + # + # To request the first page results, page_token must be empty. To + # request the next page of results, page_token must be the value of + # {::Google::Cloud::Tasks::V2::ListTasksResponse#next_page_token next_page_token} + # returned from the previous call to + # {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#list_tasks ListTasks} method. + # + # The page token is valid for only 2 hours. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2::Task>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2::Task>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::ListTasksRequest.new + # + # # Call the list_tasks method. + # result = client.list_tasks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Tasks::V2::Task. + # p item + # end + # + def list_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::ListTasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_tasks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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_tasks.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_tasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.list_tasks request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_tasks_stub, :list_tasks, "tasks", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a task. + # + # @overload get_task(request, options = nil) + # Pass arguments to `get_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2::GetTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::GetTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_task(name: nil, response_view: nil) + # Pass arguments to `get_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @param response_view [::Google::Cloud::Tasks::V2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2::Task Task} will be returned. + # + # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; + # not all information is retrieved by default because some data, such as + # payloads, might be desirable to return only when needed because + # of its large size or because of the sensitivity of data that it + # contains. + # + # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires + # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + # permission on the {::Google::Cloud::Tasks::V2::Task Task} resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2::Task] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::GetTaskRequest.new + # + # # Call the get_task method. + # result = client.get_task request + # + # # The returned object is of type Google::Cloud::Tasks::V2::Task. + # p result + # + def get_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::GetTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.get_task request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a task and adds it to a queue. + # + # Tasks cannot be updated after creation; there is no UpdateTask command. + # + # * The maximum task size is 100KB. + # + # @overload create_task(request, options = nil) + # Pass arguments to `create_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2::CreateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::CreateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_task(parent: nil, task: nil, response_view: nil) + # Pass arguments to `create_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # + # The queue must already exist. + # @param task [::Google::Cloud::Tasks::V2::Task, ::Hash] + # Required. The task to add. + # + # Task names have the following format: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + # The user can optionally specify a task + # {::Google::Cloud::Tasks::V2::Task#name name}. If a name is not specified then + # the system will generate a random unique task id, which will be set in the + # task returned in the {::Google::Cloud::Tasks::V2::Task#name response}. + # + # If {::Google::Cloud::Tasks::V2::Task#schedule_time schedule_time} is not set or + # is in the past then Cloud Tasks will set it to the current time. + # + # Task De-duplication: + # + # Explicitly specifying a task ID enables task de-duplication. If + # a task's ID is identical to that of an existing task or a task + # that was deleted or executed recently then the call will fail + # with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + # If the task's queue was created using Cloud Tasks, then another task with + # the same name can't be created for ~1hour after the original task was + # deleted or executed. If the task's queue was created using queue.yaml or + # queue.xml, then another task with the same name can't be created + # for ~9days after the original task was deleted or executed. + # + # Because there is an extra lookup cost to identify duplicate task + # names, these {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#create_task CreateTask} + # calls have significantly increased latency. Using hashed strings for the + # task id or for the prefix of the task id is recommended. Choosing task ids + # that are sequential or have sequential prefixes, for example using a + # timestamp, causes an increase in latency and error rates in all + # task commands. The infrastructure relies on an approximately + # uniform distribution of task ids to store and serve tasks + # efficiently. + # @param response_view [::Google::Cloud::Tasks::V2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2::Task Task} will be returned. + # + # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; + # not all information is retrieved by default because some data, such as + # payloads, might be desirable to return only when needed because + # of its large size or because of the sensitivity of data that it + # contains. + # + # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires + # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + # permission on the {::Google::Cloud::Tasks::V2::Task Task} resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2::Task] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::CreateTaskRequest.new + # + # # Call the create_task method. + # result = client.create_task request + # + # # The returned object is of type Google::Cloud::Tasks::V2::Task. + # p result + # + def create_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::CreateTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.create_task request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a task. + # + # A task can be deleted if it is scheduled or dispatched. A task + # cannot be deleted if it has executed successfully or permanently + # failed. + # + # @overload delete_task(request, options = nil) + # Pass arguments to `delete_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2::DeleteTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::DeleteTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_task(name: nil) + # Pass arguments to `delete_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::DeleteTaskRequest.new + # + # # Call the delete_task method. + # result = client.delete_task request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::DeleteTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.delete_task request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Forces a task to run now. + # + # When this method is called, Cloud Tasks will dispatch the task, even if + # the task is already running, the queue has reached its + # {::Google::Cloud::Tasks::V2::RateLimits RateLimits} or is + # {::Google::Cloud::Tasks::V2::Queue::State::PAUSED PAUSED}. + # + # This command is meant to be used for manual debugging. For + # example, {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#run_task RunTask} can be used to + # retry a failed task after a fix has been made or to manually force a task + # to be dispatched now. + # + # The dispatched task is returned. That is, the task that is returned + # contains the [status][Task.status] after the task is dispatched but + # before the task is received by its target. + # + # If Cloud Tasks receives a successful response from the task's + # target, then the task will be deleted; otherwise the task's + # {::Google::Cloud::Tasks::V2::Task#schedule_time schedule_time} will be reset to + # the time that {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#run_task RunTask} was + # called plus the retry delay specified in the queue's + # {::Google::Cloud::Tasks::V2::RetryConfig RetryConfig}. + # + # {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#run_task RunTask} returns + # [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a + # task that has already succeeded or permanently failed. + # + # @overload run_task(request, options = nil) + # Pass arguments to `run_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2::RunTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2::RunTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload run_task(name: nil, response_view: nil) + # Pass arguments to `run_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @param response_view [::Google::Cloud::Tasks::V2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2::Task Task} will be returned. + # + # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; + # not all information is retrieved by default because some data, such as + # payloads, might be desirable to return only when needed because + # of its large size or because of the sensitivity of data that it + # contains. + # + # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires + # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + # permission on the {::Google::Cloud::Tasks::V2::Task Task} resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2::Task] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2::RunTaskRequest.new + # + # # Call the run_task method. + # result = client.run_task request + # + # # The returned object is of type Google::Cloud::Tasks::V2::Task. + # p result + # + def run_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::RunTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.run_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::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.run_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.run_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.run_task request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CloudTasks REST API. + # + # This class represents the configuration for CloudTasks 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::Tasks::V2::CloudTasks::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_queues to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_queues.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_queues.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 = "cloudtasks.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 CloudTasks 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_queues` + # @return [::Gapic::Config::Method] + # + attr_reader :list_queues + ## + # RPC-specific configuration for `get_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :get_queue + ## + # RPC-specific configuration for `create_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :create_queue + ## + # RPC-specific configuration for `update_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :update_queue + ## + # RPC-specific configuration for `delete_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_queue + ## + # RPC-specific configuration for `purge_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :purge_queue + ## + # RPC-specific configuration for `pause_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :pause_queue + ## + # RPC-specific configuration for `resume_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :resume_queue + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `list_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tasks + ## + # RPC-specific configuration for `get_task` + # @return [::Gapic::Config::Method] + # + attr_reader :get_task + ## + # RPC-specific configuration for `create_task` + # @return [::Gapic::Config::Method] + # + attr_reader :create_task + ## + # RPC-specific configuration for `delete_task` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_task + ## + # RPC-specific configuration for `run_task` + # @return [::Gapic::Config::Method] + # + attr_reader :run_task + + # @private + def initialize parent_rpcs = nil + list_queues_config = parent_rpcs.list_queues if parent_rpcs.respond_to? :list_queues + @list_queues = ::Gapic::Config::Method.new list_queues_config + get_queue_config = parent_rpcs.get_queue if parent_rpcs.respond_to? :get_queue + @get_queue = ::Gapic::Config::Method.new get_queue_config + create_queue_config = parent_rpcs.create_queue if parent_rpcs.respond_to? :create_queue + @create_queue = ::Gapic::Config::Method.new create_queue_config + update_queue_config = parent_rpcs.update_queue if parent_rpcs.respond_to? :update_queue + @update_queue = ::Gapic::Config::Method.new update_queue_config + delete_queue_config = parent_rpcs.delete_queue if parent_rpcs.respond_to? :delete_queue + @delete_queue = ::Gapic::Config::Method.new delete_queue_config + purge_queue_config = parent_rpcs.purge_queue if parent_rpcs.respond_to? :purge_queue + @purge_queue = ::Gapic::Config::Method.new purge_queue_config + pause_queue_config = parent_rpcs.pause_queue if parent_rpcs.respond_to? :pause_queue + @pause_queue = ::Gapic::Config::Method.new pause_queue_config + resume_queue_config = parent_rpcs.resume_queue if parent_rpcs.respond_to? :resume_queue + @resume_queue = ::Gapic::Config::Method.new resume_queue_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks + @list_tasks = ::Gapic::Config::Method.new list_tasks_config + get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task + @get_task = ::Gapic::Config::Method.new get_task_config + create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task + @create_task = ::Gapic::Config::Method.new create_task_config + delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task + @delete_task = ::Gapic::Config::Method.new delete_task_config + run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task + @run_task = ::Gapic::Config::Method.new run_task_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/rest/service_stub.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/rest/service_stub.rb new file mode 100644 index 000000000000..1ca3b143b8ed --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/rest/service_stub.rb @@ -0,0 +1,1067 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/tasks/v2/cloudtasks_pb" + +module Google + module Cloud + module Tasks + module V2 + module CloudTasks + module Rest + ## + # REST service stub for the CloudTasks 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_queues REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::ListQueuesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2::ListQueuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2::ListQueuesResponse] + # A result object deserialized from the server's reply + def list_queues request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_queues_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_queues", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2::ListQueuesResponse.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_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::GetQueueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2::Queue] + # A result object deserialized from the server's reply + def get_queue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_queue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_queue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2::Queue.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_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::CreateQueueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2::Queue] + # A result object deserialized from the server's reply + def create_queue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_queue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_queue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2::Queue.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_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::UpdateQueueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2::Queue] + # A result object deserialized from the server's reply + def update_queue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_queue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_queue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2::Queue.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_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::DeleteQueueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_queue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_queue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_queue", + 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 purge_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::PurgeQueueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2::Queue] + # A result object deserialized from the server's reply + def purge_queue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_purge_queue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "purge_queue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2::Queue.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the pause_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::PauseQueueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2::Queue] + # A result object deserialized from the server's reply + def pause_queue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_pause_queue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "pause_queue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2::Queue.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the resume_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::ResumeQueueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2::Queue] + # A result object deserialized from the server's reply + def resume_queue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_resume_queue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "resume_queue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2::Queue.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_tasks REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::ListTasksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2::ListTasksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2::ListTasksResponse] + # A result object deserialized from the server's reply + def list_tasks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_tasks_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_tasks", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2::ListTasksResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::GetTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2::Task] + # A result object deserialized from the server's reply + def get_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_task", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2::Task.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::CreateTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2::Task] + # A result object deserialized from the server's reply + def create_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_task", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2::Task.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::DeleteTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_task", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::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_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::RunTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2::Task] + # A result object deserialized from the server's reply + def run_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_run_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "run_task", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2::Task.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_queues REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::ListQueuesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_queues_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/queues", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::GetQueueRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_queue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::CreateQueueRequest] + # 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_queue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/queues", + body: "queue", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::UpdateQueueRequest] + # 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_queue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{queue.name}", + body: "queue", + matches: [ + ["queue.name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::DeleteQueueRequest] + # 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_queue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the purge_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::PurgeQueueRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_purge_queue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:purge", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the pause_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::PauseQueueRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_pause_queue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:pause", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the resume_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::ResumeQueueRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_resume_queue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:resume", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, 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: :post, + uri_template: "/v2/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, 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: "/v2/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, 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: "/v2/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_tasks REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::ListTasksRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_tasks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/tasks", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::GetTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::CreateTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/tasks", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::DeleteTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the run_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2::RunTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_run_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:run", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloudtasks_pb.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloudtasks_pb.rb new file mode 100644 index 000000000000..99c9c50bb333 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloudtasks_pb.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/tasks/v2/cloudtasks.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/tasks/v2/queue_pb' +require 'google/cloud/tasks/v2/task_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n&google/cloud/tasks/v2/cloudtasks.proto\x12\x15google.cloud.tasks.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a!google/cloud/tasks/v2/queue.proto\x1a google/cloud/tasks/v2/task.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x83\x01\n\x11ListQueuesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudtasks.googleapis.com/Queue\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\x12ListQueuesResponse\x12,\n\x06queues\x18\x01 \x03(\x0b\x32\x1c.google.cloud.tasks.v2.Queue\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"H\n\x0fGetQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"\x7f\n\x12\x43reateQueueRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudtasks.googleapis.com/Queue\x12\x30\n\x05queue\x18\x02 \x01(\x0b\x32\x1c.google.cloud.tasks.v2.QueueB\x03\xe0\x41\x02\"w\n\x12UpdateQueueRequest\x12\x30\n\x05queue\x18\x01 \x01(\x0b\x32\x1c.google.cloud.tasks.v2.QueueB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"K\n\x12\x44\x65leteQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"J\n\x11PurgeQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"J\n\x11PauseQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"K\n\x12ResumeQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"\xaa\x01\n\x10ListTasksRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x63loudtasks.googleapis.com/Task\x12\x37\n\rresponse_view\x18\x02 \x01(\x0e\x32 .google.cloud.tasks.v2.Task.View\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"X\n\x11ListTasksResponse\x12*\n\x05tasks\x18\x01 \x03(\x0b\x32\x1b.google.cloud.tasks.v2.Task\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x7f\n\x0eGetTaskRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudtasks.googleapis.com/Task\x12\x37\n\rresponse_view\x18\x02 \x01(\x0e\x32 .google.cloud.tasks.v2.Task.View\"\xb4\x01\n\x11\x43reateTaskRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x63loudtasks.googleapis.com/Task\x12.\n\x04task\x18\x02 \x01(\x0b\x32\x1b.google.cloud.tasks.v2.TaskB\x03\xe0\x41\x02\x12\x37\n\rresponse_view\x18\x03 \x01(\x0e\x32 .google.cloud.tasks.v2.Task.View\"I\n\x11\x44\x65leteTaskRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudtasks.googleapis.com/Task\"\x7f\n\x0eRunTaskRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudtasks.googleapis.com/Task\x12\x37\n\rresponse_view\x18\x02 \x01(\x0e\x32 .google.cloud.tasks.v2.Task.View2\xdd\x14\n\nCloudTasks\x12\x9e\x01\n\nListQueues\x12(.google.cloud.tasks.v2.ListQueuesRequest\x1a).google.cloud.tasks.v2.ListQueuesResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v2/{parent=projects/*/locations/*}/queues\x12\x8b\x01\n\x08GetQueue\x12&.google.cloud.tasks.v2.GetQueueRequest\x1a\x1c.google.cloud.tasks.v2.Queue\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v2/{name=projects/*/locations/*/queues/*}\x12\xa0\x01\n\x0b\x43reateQueue\x12).google.cloud.tasks.v2.CreateQueueRequest\x1a\x1c.google.cloud.tasks.v2.Queue\"H\xda\x41\x0cparent,queue\x82\xd3\xe4\x93\x02\x33\"*/v2/{parent=projects/*/locations/*}/queues:\x05queue\x12\xab\x01\n\x0bUpdateQueue\x12).google.cloud.tasks.v2.UpdateQueueRequest\x1a\x1c.google.cloud.tasks.v2.Queue\"S\xda\x41\x11queue,update_mask\x82\xd3\xe4\x93\x02\x39\x32\x30/v2/{queue.name=projects/*/locations/*/queues/*}:\x05queue\x12\x8b\x01\n\x0b\x44\x65leteQueue\x12).google.cloud.tasks.v2.DeleteQueueRequest\x1a\x16.google.protobuf.Empty\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v2/{name=projects/*/locations/*/queues/*}\x12\x98\x01\n\nPurgeQueue\x12(.google.cloud.tasks.v2.PurgeQueueRequest\x1a\x1c.google.cloud.tasks.v2.Queue\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\"0/v2/{name=projects/*/locations/*/queues/*}:purge:\x01*\x12\x98\x01\n\nPauseQueue\x12(.google.cloud.tasks.v2.PauseQueueRequest\x1a\x1c.google.cloud.tasks.v2.Queue\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\"0/v2/{name=projects/*/locations/*/queues/*}:pause:\x01*\x12\x9b\x01\n\x0bResumeQueue\x12).google.cloud.tasks.v2.ResumeQueueRequest\x1a\x1c.google.cloud.tasks.v2.Queue\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v2/{name=projects/*/locations/*/queues/*}:resume:\x01*\x12\x9c\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"Q\xda\x41\x08resource\x82\xd3\xe4\x93\x02@\";/v2/{resource=projects/*/locations/*/queues/*}:getIamPolicy:\x01*\x12\xa3\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"X\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02@\";/v2/{resource=projects/*/locations/*/queues/*}:setIamPolicy:\x01*\x12\xce\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"c\xda\x41\x14resource,permissions\x82\xd3\xe4\x93\x02\x46\"A/v2/{resource=projects/*/locations/*/queues/*}:testIamPermissions:\x01*\x12\xa3\x01\n\tListTasks\x12\'.google.cloud.tasks.v2.ListTasksRequest\x1a(.google.cloud.tasks.v2.ListTasksResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v2/{parent=projects/*/locations/*/queues/*}/tasks\x12\x90\x01\n\x07GetTask\x12%.google.cloud.tasks.v2.GetTaskRequest\x1a\x1b.google.cloud.tasks.v2.Task\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v2/{name=projects/*/locations/*/queues/*/tasks/*}\x12\xa0\x01\n\nCreateTask\x12(.google.cloud.tasks.v2.CreateTaskRequest\x1a\x1b.google.cloud.tasks.v2.Task\"K\xda\x41\x0bparent,task\x82\xd3\xe4\x93\x02\x37\"2/v2/{parent=projects/*/locations/*/queues/*}/tasks:\x01*\x12\x91\x01\n\nDeleteTask\x12(.google.cloud.tasks.v2.DeleteTaskRequest\x1a\x16.google.protobuf.Empty\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v2/{name=projects/*/locations/*/queues/*/tasks/*}\x12\x97\x01\n\x07RunTask\x12%.google.cloud.tasks.v2.RunTaskRequest\x1a\x1b.google.cloud.tasks.v2.Task\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\"6/v2/{name=projects/*/locations/*/queues/*/tasks/*}:run:\x01*\x1aM\xca\x41\x19\x63loudtasks.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBv\n\x19\x63om.google.cloud.tasks.v2B\x0f\x43loudTasksProtoP\x01Z>cloud.google.com/go/cloudtasks/apiv2/cloudtaskspb;cloudtaskspb\xa2\x02\x05TASKSb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Tasks + module V2 + ListQueuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.ListQueuesRequest").msgclass + ListQueuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.ListQueuesResponse").msgclass + GetQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.GetQueueRequest").msgclass + CreateQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.CreateQueueRequest").msgclass + UpdateQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.UpdateQueueRequest").msgclass + DeleteQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.DeleteQueueRequest").msgclass + PurgeQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.PurgeQueueRequest").msgclass + PauseQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.PauseQueueRequest").msgclass + ResumeQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.ResumeQueueRequest").msgclass + ListTasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.ListTasksRequest").msgclass + ListTasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.ListTasksResponse").msgclass + GetTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.GetTaskRequest").msgclass + CreateTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.CreateTaskRequest").msgclass + DeleteTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.DeleteTaskRequest").msgclass + RunTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.RunTaskRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloudtasks_services_pb.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloudtasks_services_pb.rb new file mode 100644 index 000000000000..cb4e06b079fc --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloudtasks_services_pb.rb @@ -0,0 +1,206 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/tasks/v2/cloudtasks.proto for package 'google.cloud.tasks.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/tasks/v2/cloudtasks_pb' + +module Google + module Cloud + module Tasks + module V2 + module CloudTasks + # Cloud Tasks allows developers to manage the execution of background + # work in their applications. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.tasks.v2.CloudTasks' + + # Lists queues. + # + # Queues are returned in lexicographical order. + rpc :ListQueues, ::Google::Cloud::Tasks::V2::ListQueuesRequest, ::Google::Cloud::Tasks::V2::ListQueuesResponse + # Gets a queue. + rpc :GetQueue, ::Google::Cloud::Tasks::V2::GetQueueRequest, ::Google::Cloud::Tasks::V2::Queue + # Creates a queue. + # + # Queues created with this method allow tasks to live for a maximum of 31 + # days. After a task is 31 days old, the task will be deleted regardless of + # whether it was dispatched or not. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + rpc :CreateQueue, ::Google::Cloud::Tasks::V2::CreateQueueRequest, ::Google::Cloud::Tasks::V2::Queue + # Updates a queue. + # + # This method creates the queue if it does not exist and updates + # the queue if it does exist. + # + # Queues created with this method allow tasks to live for a maximum of 31 + # days. After a task is 31 days old, the task will be deleted regardless of + # whether it was dispatched or not. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + rpc :UpdateQueue, ::Google::Cloud::Tasks::V2::UpdateQueueRequest, ::Google::Cloud::Tasks::V2::Queue + # Deletes a queue. + # + # This command will delete the queue even if it has tasks in it. + # + # Note: If you delete a queue, a queue with the same name can't be created + # for 7 days. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + rpc :DeleteQueue, ::Google::Cloud::Tasks::V2::DeleteQueueRequest, ::Google::Protobuf::Empty + # Purges a queue by deleting all of its tasks. + # + # All tasks created before this method is called are permanently deleted. + # + # Purge operations can take up to one minute to take effect. Tasks + # might be dispatched before the purge takes effect. A purge is irreversible. + rpc :PurgeQueue, ::Google::Cloud::Tasks::V2::PurgeQueueRequest, ::Google::Cloud::Tasks::V2::Queue + # Pauses the queue. + # + # If a queue is paused then the system will stop dispatching tasks + # until the queue is resumed via + # [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. Tasks can + # still be added when the queue is paused. A queue is paused if its + # [state][google.cloud.tasks.v2.Queue.state] is + # [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. + rpc :PauseQueue, ::Google::Cloud::Tasks::V2::PauseQueueRequest, ::Google::Cloud::Tasks::V2::Queue + # Resume a queue. + # + # This method resumes a queue after it has been + # [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED] or + # [DISABLED][google.cloud.tasks.v2.Queue.State.DISABLED]. The state of a + # queue is stored in the queue's [state][google.cloud.tasks.v2.Queue.state]; + # after calling this method it will be set to + # [RUNNING][google.cloud.tasks.v2.Queue.State.RUNNING]. + # + # WARNING: Resuming many high-QPS queues at the same time can + # lead to target overloading. If you are resuming high-QPS + # queues, follow the 500/50/5 pattern described in + # [Managing Cloud Tasks Scaling + # Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). + rpc :ResumeQueue, ::Google::Cloud::Tasks::V2::ResumeQueueRequest, ::Google::Cloud::Tasks::V2::Queue + # Gets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. + # Returns an empty policy if the resource exists and does not have a policy + # set. + # + # Authorization requires the following + # [Google IAM](https://cloud.google.com/iam) permission on the specified + # resource parent: + # + # * `cloudtasks.queues.getIamPolicy` + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. + # Replaces any existing policy. + # + # Note: The Cloud Console does not check queue-level IAM permissions yet. + # Project-level permissions are required to use the Cloud Console. + # + # Authorization requires the following + # [Google IAM](https://cloud.google.com/iam) permission on the specified + # resource parent: + # + # * `cloudtasks.queues.setIamPolicy` + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Returns permissions that a caller has on a + # [Queue][google.cloud.tasks.v2.Queue]. If the resource does not exist, this + # will return an empty set of permissions, not a + # [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + # + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + # Lists the tasks in a queue. + # + # By default, only the [BASIC][google.cloud.tasks.v2.Task.View.BASIC] view is + # retrieved due to performance considerations; + # [response_view][google.cloud.tasks.v2.ListTasksRequest.response_view] + # controls the subset of information which is returned. + # + # The tasks may be returned in any order. The ordering may change at any + # time. + rpc :ListTasks, ::Google::Cloud::Tasks::V2::ListTasksRequest, ::Google::Cloud::Tasks::V2::ListTasksResponse + # Gets a task. + rpc :GetTask, ::Google::Cloud::Tasks::V2::GetTaskRequest, ::Google::Cloud::Tasks::V2::Task + # Creates a task and adds it to a queue. + # + # Tasks cannot be updated after creation; there is no UpdateTask command. + # + # * The maximum task size is 100KB. + rpc :CreateTask, ::Google::Cloud::Tasks::V2::CreateTaskRequest, ::Google::Cloud::Tasks::V2::Task + # Deletes a task. + # + # A task can be deleted if it is scheduled or dispatched. A task + # cannot be deleted if it has executed successfully or permanently + # failed. + rpc :DeleteTask, ::Google::Cloud::Tasks::V2::DeleteTaskRequest, ::Google::Protobuf::Empty + # Forces a task to run now. + # + # When this method is called, Cloud Tasks will dispatch the task, even if + # the task is already running, the queue has reached its + # [RateLimits][google.cloud.tasks.v2.RateLimits] or is + # [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. + # + # This command is meant to be used for manual debugging. For + # example, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] can be used to + # retry a failed task after a fix has been made or to manually force a task + # to be dispatched now. + # + # The dispatched task is returned. That is, the task that is returned + # contains the [status][Task.status] after the task is dispatched but + # before the task is received by its target. + # + # If Cloud Tasks receives a successful response from the task's + # target, then the task will be deleted; otherwise the task's + # [schedule_time][google.cloud.tasks.v2.Task.schedule_time] will be reset to + # the time that [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] was + # called plus the retry delay specified in the queue's + # [RetryConfig][google.cloud.tasks.v2.RetryConfig]. + # + # [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] returns + # [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a + # task that has already succeeded or permanently failed. + rpc :RunTask, ::Google::Cloud::Tasks::V2::RunTaskRequest, ::Google::Cloud::Tasks::V2::Task + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/queue_pb.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/queue_pb.rb new file mode 100644 index 000000000000..c9d91a1c7647 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/queue_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/tasks/v2/queue.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/tasks/v2/target_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n!google/cloud/tasks/v2/queue.proto\x12\x15google.cloud.tasks.v2\x1a\x19google/api/resource.proto\x1a\"google/cloud/tasks/v2/target.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb2\x04\n\x05Queue\x12\x0c\n\x04name\x18\x01 \x01(\t\x12L\n\x1b\x61pp_engine_routing_override\x18\x02 \x01(\x0b\x32\'.google.cloud.tasks.v2.AppEngineRouting\x12\x36\n\x0brate_limits\x18\x03 \x01(\x0b\x32!.google.cloud.tasks.v2.RateLimits\x12\x38\n\x0cretry_config\x18\x04 \x01(\x0b\x32\".google.cloud.tasks.v2.RetryConfig\x12\x31\n\x05state\x18\x05 \x01(\x0e\x32\".google.cloud.tasks.v2.Queue.State\x12.\n\npurge_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12S\n\x1astackdriver_logging_config\x18\t \x01(\x0b\x32/.google.cloud.tasks.v2.StackdriverLoggingConfig\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\n\n\x06PAUSED\x10\x02\x12\x0c\n\x08\x44ISABLED\x10\x03:\\\xea\x41Y\n\x1f\x63loudtasks.googleapis.com/Queue\x12\x36projects/{project}/locations/{location}/queues/{queue}\"j\n\nRateLimits\x12!\n\x19max_dispatches_per_second\x18\x01 \x01(\x01\x12\x16\n\x0emax_burst_size\x18\x02 \x01(\x05\x12!\n\x19max_concurrent_dispatches\x18\x03 \x01(\x05\"\xd1\x01\n\x0bRetryConfig\x12\x14\n\x0cmax_attempts\x18\x01 \x01(\x05\x12\x35\n\x12max_retry_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\x0bmin_backoff\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\x0bmax_backoff\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\rmax_doublings\x18\x05 \x01(\x05\"2\n\x18StackdriverLoggingConfig\x12\x16\n\x0esampling_ratio\x18\x01 \x01(\x01\x42i\n\x19\x63om.google.cloud.tasks.v2B\nQueueProtoP\x01Z>cloud.google.com/go/cloudtasks/apiv2/cloudtaskspb;cloudtaskspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Tasks + module V2 + Queue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.Queue").msgclass + Queue::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.Queue.State").enummodule + RateLimits = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.RateLimits").msgclass + RetryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.RetryConfig").msgclass + StackdriverLoggingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.StackdriverLoggingConfig").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/rest.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/rest.rb new file mode 100644 index 000000000000..4c702f14da87 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/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/tasks/v2/cloud_tasks/rest" +require "google/cloud/tasks/v2/bindings_override" +require "google/cloud/tasks/v2/version" + +module Google + module Cloud + module Tasks + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/tasks/v2/rest" + # client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new + # + module V2 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/target_pb.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/target_pb.rb new file mode 100644 index 000000000000..61fde3cfe768 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/target_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/tasks/v2/target.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n\"google/cloud/tasks/v2/target.proto\x12\x15google.cloud.tasks.v2\x1a\x1fgoogle/api/field_behavior.proto\"\xe1\x02\n\x0bHttpRequest\x12\x10\n\x03url\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x0bhttp_method\x18\x02 \x01(\x0e\x32!.google.cloud.tasks.v2.HttpMethod\x12@\n\x07headers\x18\x03 \x03(\x0b\x32/.google.cloud.tasks.v2.HttpRequest.HeadersEntry\x12\x0c\n\x04\x62ody\x18\x04 \x01(\x0c\x12\x38\n\x0boauth_token\x18\x05 \x01(\x0b\x32!.google.cloud.tasks.v2.OAuthTokenH\x00\x12\x36\n\noidc_token\x18\x06 \x01(\x0b\x32 .google.cloud.tasks.v2.OidcTokenH\x00\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x16\n\x14\x61uthorization_header\"\xb2\x02\n\x14\x41ppEngineHttpRequest\x12\x36\n\x0bhttp_method\x18\x01 \x01(\x0e\x32!.google.cloud.tasks.v2.HttpMethod\x12\x43\n\x12\x61pp_engine_routing\x18\x02 \x01(\x0b\x32\'.google.cloud.tasks.v2.AppEngineRouting\x12\x14\n\x0crelative_uri\x18\x03 \x01(\t\x12I\n\x07headers\x18\x04 \x03(\x0b\x32\x38.google.cloud.tasks.v2.AppEngineHttpRequest.HeadersEntry\x12\x0c\n\x04\x62ody\x18\x05 \x01(\x0c\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"T\n\x10\x41ppEngineRouting\x12\x0f\n\x07service\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x10\n\x08instance\x18\x03 \x01(\t\x12\x0c\n\x04host\x18\x04 \x01(\t\":\n\nOAuthToken\x12\x1d\n\x15service_account_email\x18\x01 \x01(\t\x12\r\n\x05scope\x18\x02 \x01(\t\"<\n\tOidcToken\x12\x1d\n\x15service_account_email\x18\x01 \x01(\t\x12\x10\n\x08\x61udience\x18\x02 \x01(\t*s\n\nHttpMethod\x12\x1b\n\x17HTTP_METHOD_UNSPECIFIED\x10\x00\x12\x08\n\x04POST\x10\x01\x12\x07\n\x03GET\x10\x02\x12\x08\n\x04HEAD\x10\x03\x12\x07\n\x03PUT\x10\x04\x12\n\n\x06\x44\x45LETE\x10\x05\x12\t\n\x05PATCH\x10\x06\x12\x0b\n\x07OPTIONS\x10\x07\x42j\n\x19\x63om.google.cloud.tasks.v2B\x0bTargetProtoP\x01Z>cloud.google.com/go/cloudtasks/apiv2/cloudtaskspb;cloudtaskspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Tasks + module V2 + HttpRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.HttpRequest").msgclass + AppEngineHttpRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.AppEngineHttpRequest").msgclass + AppEngineRouting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.AppEngineRouting").msgclass + OAuthToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.OAuthToken").msgclass + OidcToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.OidcToken").msgclass + HttpMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.HttpMethod").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/task_pb.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/task_pb.rb new file mode 100644 index 000000000000..a9960364f8d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/task_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/tasks/v2/task.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/tasks/v2/target_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n google/cloud/tasks/v2/task.proto\x12\x15google.cloud.tasks.v2\x1a\x19google/api/resource.proto\x1a\"google/cloud/tasks/v2/target.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xb4\x05\n\x04Task\x12\x0c\n\x04name\x18\x01 \x01(\t\x12N\n\x17\x61pp_engine_http_request\x18\x02 \x01(\x0b\x32+.google.cloud.tasks.v2.AppEngineHttpRequestH\x00\x12:\n\x0chttp_request\x18\x03 \x01(\x0b\x32\".google.cloud.tasks.v2.HttpRequestH\x00\x12\x31\n\rschedule_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11\x64ispatch_deadline\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x16\n\x0e\x64ispatch_count\x18\x07 \x01(\x05\x12\x16\n\x0eresponse_count\x18\x08 \x01(\x05\x12\x35\n\rfirst_attempt\x18\t \x01(\x0b\x32\x1e.google.cloud.tasks.v2.Attempt\x12\x34\n\x0clast_attempt\x18\n \x01(\x0b\x32\x1e.google.cloud.tasks.v2.Attempt\x12.\n\x04view\x18\x0b \x01(\x0e\x32 .google.cloud.tasks.v2.Task.View\"1\n\x04View\x12\x14\n\x10VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02:h\xea\x41\x65\n\x1e\x63loudtasks.googleapis.com/Task\x12\x43projects/{project}/locations/{location}/queues/{queue}/tasks/{task}B\x0e\n\x0cmessage_type\"\xcf\x01\n\x07\x41ttempt\x12\x31\n\rschedule_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rdispatch_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rresponse_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12+\n\x0fresponse_status\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusBh\n\x19\x63om.google.cloud.tasks.v2B\tTaskProtoP\x01Z>cloud.google.com/go/cloudtasks/apiv2/cloudtaskspb;cloudtaskspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Tasks + module V2 + Task = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.Task").msgclass + Task::View = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.Task.View").enummodule + Attempt = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.Attempt").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/version.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/version.rb new file mode 100644 index 000000000000..f4f62b513076 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/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 Tasks + module V2 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/README.md new file mode 100644 index 000000000000..4412e67816f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Tasks 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-tasks-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # 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. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + # + # Example: + # + # 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 + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # 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 + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # 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 + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-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-tasks-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-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-tasks-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-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-tasks-v2/proto_docs/google/cloud/tasks/v2/cloudtasks.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/cloudtasks.rb new file mode 100644 index 000000000000..d756876962c9 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/cloudtasks.rb @@ -0,0 +1,375 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Tasks + module V2 + # Request message for + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#list_queues ListQueues}. + # @!attribute [rw] parent + # @return [::String] + # Required. The location name. + # For example: `projects/PROJECT_ID/locations/LOCATION_ID` + # @!attribute [rw] filter + # @return [::String] + # `filter` can be used to specify a subset of queues. Any + # {::Google::Cloud::Tasks::V2::Queue Queue} field can be used as a filter and + # several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + # filter syntax is the same as described in [Stackdriver's Advanced Logs + # Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + # + # Sample filter "state: PAUSED". + # + # Note that using filters might cause fewer queues than the + # requested page_size to be returned. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. + # + # The maximum page size is 9800. If unspecified, the page size will + # be the maximum. Fewer queues than requested might be returned, + # even if more queues exist; use the + # {::Google::Cloud::Tasks::V2::ListQueuesResponse#next_page_token next_page_token} + # in the response to determine if more queues exist. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying the page of results to return. + # + # To request the first page results, page_token must be empty. To + # request the next page of results, page_token must be the value of + # {::Google::Cloud::Tasks::V2::ListQueuesResponse#next_page_token next_page_token} + # returned from the previous call to + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#list_queues ListQueues} method. It is an + # error to switch the value of the + # {::Google::Cloud::Tasks::V2::ListQueuesRequest#filter filter} while iterating + # through pages. + class ListQueuesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#list_queues ListQueues}. + # @!attribute [rw] queues + # @return [::Array<::Google::Cloud::Tasks::V2::Queue>] + # The list of queues. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. + # + # To return the next page of results, call + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#list_queues ListQueues} with this value + # as the {::Google::Cloud::Tasks::V2::ListQueuesRequest#page_token page_token}. + # + # If the next_page_token is empty, there are no more results. + # + # The page token is valid for only 2 hours. + class ListQueuesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::Tasks::V2::CloudTasks::Client#get_queue GetQueue}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the queue. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + class GetQueueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#create_queue CreateQueue}. + # @!attribute [rw] parent + # @return [::String] + # Required. The location name in which the queue will be created. + # For example: `projects/PROJECT_ID/locations/LOCATION_ID` + # + # The list of allowed locations can be obtained by calling Cloud + # Tasks' implementation of + # [ListLocations][google.cloud.location.Locations.ListLocations]. + # @!attribute [rw] queue + # @return [::Google::Cloud::Tasks::V2::Queue] + # Required. The queue to create. + # + # [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an + # existing queue. + class CreateQueueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#update_queue UpdateQueue}. + # @!attribute [rw] queue + # @return [::Google::Cloud::Tasks::V2::Queue] + # Required. The queue to create or update. + # + # The queue's {::Google::Cloud::Tasks::V2::Queue#name name} must be specified. + # + # Output only fields cannot be modified using UpdateQueue. + # Any value specified for an output only field will be ignored. + # The queue's {::Google::Cloud::Tasks::V2::Queue#name name} cannot be changed. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # A mask used to specify which fields of the queue are being updated. + # + # If empty, then all fields will be updated. + class UpdateQueueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#delete_queue DeleteQueue}. + # @!attribute [rw] name + # @return [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + class DeleteQueueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#purge_queue PurgeQueue}. + # @!attribute [rw] name + # @return [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + class PurgeQueueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#pause_queue PauseQueue}. + # @!attribute [rw] name + # @return [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + class PauseQueueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#resume_queue ResumeQueue}. + # @!attribute [rw] name + # @return [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + class ResumeQueueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing tasks using + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#list_tasks ListTasks}. + # @!attribute [rw] parent + # @return [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # @!attribute [rw] response_view + # @return [::Google::Cloud::Tasks::V2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2::Task Task} will be returned. + # + # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; + # not all information is retrieved by default because some data, such as + # payloads, might be desirable to return only when needed because + # of its large size or because of the sensitivity of data that it + # contains. + # + # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires + # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + # permission on the {::Google::Cloud::Tasks::V2::Task Task} resource. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum page size. + # + # Fewer tasks than requested might be returned, even if more tasks exist; use + # {::Google::Cloud::Tasks::V2::ListTasksResponse#next_page_token next_page_token} + # in the response to determine if more tasks exist. + # + # The maximum page size is 1000. If unspecified, the page size will be the + # maximum. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying the page of results to return. + # + # To request the first page results, page_token must be empty. To + # request the next page of results, page_token must be the value of + # {::Google::Cloud::Tasks::V2::ListTasksResponse#next_page_token next_page_token} + # returned from the previous call to + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#list_tasks ListTasks} method. + # + # The page token is valid for only 2 hours. + class ListTasksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing tasks using + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#list_tasks ListTasks}. + # @!attribute [rw] tasks + # @return [::Array<::Google::Cloud::Tasks::V2::Task>] + # The list of tasks. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. + # + # To return the next page of results, call + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#list_tasks ListTasks} with this value as + # the {::Google::Cloud::Tasks::V2::ListTasksRequest#page_token page_token}. + # + # If the next_page_token is empty, there are no more results. + class ListTasksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a task using + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#get_task GetTask}. + # @!attribute [rw] name + # @return [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @!attribute [rw] response_view + # @return [::Google::Cloud::Tasks::V2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2::Task Task} will be returned. + # + # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; + # not all information is retrieved by default because some data, such as + # payloads, might be desirable to return only when needed because + # of its large size or because of the sensitivity of data that it + # contains. + # + # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires + # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + # permission on the {::Google::Cloud::Tasks::V2::Task Task} resource. + class GetTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#create_task CreateTask}. + # @!attribute [rw] parent + # @return [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # + # The queue must already exist. + # @!attribute [rw] task + # @return [::Google::Cloud::Tasks::V2::Task] + # Required. The task to add. + # + # Task names have the following format: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + # The user can optionally specify a task + # {::Google::Cloud::Tasks::V2::Task#name name}. If a name is not specified then + # the system will generate a random unique task id, which will be set in the + # task returned in the {::Google::Cloud::Tasks::V2::Task#name response}. + # + # If {::Google::Cloud::Tasks::V2::Task#schedule_time schedule_time} is not set or + # is in the past then Cloud Tasks will set it to the current time. + # + # Task De-duplication: + # + # Explicitly specifying a task ID enables task de-duplication. If + # a task's ID is identical to that of an existing task or a task + # that was deleted or executed recently then the call will fail + # with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + # If the task's queue was created using Cloud Tasks, then another task with + # the same name can't be created for ~1hour after the original task was + # deleted or executed. If the task's queue was created using queue.yaml or + # queue.xml, then another task with the same name can't be created + # for ~9days after the original task was deleted or executed. + # + # Because there is an extra lookup cost to identify duplicate task + # names, these {::Google::Cloud::Tasks::V2::CloudTasks::Client#create_task CreateTask} + # calls have significantly increased latency. Using hashed strings for the + # task id or for the prefix of the task id is recommended. Choosing task ids + # that are sequential or have sequential prefixes, for example using a + # timestamp, causes an increase in latency and error rates in all + # task commands. The infrastructure relies on an approximately + # uniform distribution of task ids to store and serve tasks + # efficiently. + # @!attribute [rw] response_view + # @return [::Google::Cloud::Tasks::V2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2::Task Task} will be returned. + # + # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; + # not all information is retrieved by default because some data, such as + # payloads, might be desirable to return only when needed because + # of its large size or because of the sensitivity of data that it + # contains. + # + # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires + # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + # permission on the {::Google::Cloud::Tasks::V2::Task Task} resource. + class CreateTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting a task using + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#delete_task DeleteTask}. + # @!attribute [rw] name + # @return [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + class DeleteTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for forcing a task to run now using + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#run_task RunTask}. + # @!attribute [rw] name + # @return [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @!attribute [rw] response_view + # @return [::Google::Cloud::Tasks::V2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2::Task Task} will be returned. + # + # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; + # not all information is retrieved by default because some data, such as + # payloads, might be desirable to return only when needed because + # of its large size or because of the sensitivity of data that it + # contains. + # + # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires + # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + # permission on the {::Google::Cloud::Tasks::V2::Task Task} resource. + class RunTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/queue.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/queue.rb new file mode 100644 index 000000000000..48b30becd0e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/queue.rb @@ -0,0 +1,376 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Tasks + module V2 + # A queue is a container of related tasks. Queues are configured to manage + # how those tasks are dispatched. Configurable properties include rate limits, + # retry options, queue types, and others. + # @!attribute [rw] name + # @return [::String] + # Caller-specified and required in + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#create_queue CreateQueue}, after which it + # becomes output only. + # + # The queue name. + # + # The queue name must have the following format: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # + # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + # hyphens (-), colons (:), or periods (.). + # For more information, see + # [Identifying + # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + # * `LOCATION_ID` is the canonical ID for the queue's location. + # The list of available locations can be obtained by calling + # [ListLocations][google.cloud.location.Locations.ListLocations]. + # For more information, see https://cloud.google.com/about/locations/. + # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + # hyphens (-). The maximum length is 100 characters. + # @!attribute [rw] app_engine_routing_override + # @return [::Google::Cloud::Tasks::V2::AppEngineRouting] + # Overrides for + # [task-level + # app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. + # These settings apply only to + # {::Google::Cloud::Tasks::V2::AppEngineHttpRequest App Engine tasks} in this + # queue. {::Google::Cloud::Tasks::V2::HttpRequest Http tasks} are not affected. + # + # If set, `app_engine_routing_override` is used for all + # {::Google::Cloud::Tasks::V2::AppEngineHttpRequest App Engine tasks} in the + # queue, no matter what the setting is for the [task-level + # app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. + # @!attribute [rw] rate_limits + # @return [::Google::Cloud::Tasks::V2::RateLimits] + # Rate limits for task dispatches. + # + # {::Google::Cloud::Tasks::V2::Queue#rate_limits rate_limits} and + # {::Google::Cloud::Tasks::V2::Queue#retry_config retry_config} are related + # because they both control task attempts. However they control task attempts + # in different ways: + # + # * {::Google::Cloud::Tasks::V2::Queue#rate_limits rate_limits} controls the total + # rate of + # dispatches from a queue (i.e. all traffic dispatched from the + # queue, regardless of whether the dispatch is from a first + # attempt or a retry). + # * {::Google::Cloud::Tasks::V2::Queue#retry_config retry_config} controls what + # happens to + # particular a task after its first attempt fails. That is, + # {::Google::Cloud::Tasks::V2::Queue#retry_config retry_config} controls task + # retries (the second attempt, third attempt, etc). + # + # The queue's actual dispatch rate is the result of: + # + # * Number of tasks in the queue + # * User-specified throttling: + # {::Google::Cloud::Tasks::V2::Queue#rate_limits rate_limits}, + # {::Google::Cloud::Tasks::V2::Queue#retry_config retry_config}, and the + # [queue's state][google.cloud.tasks.v2.Queue.state]. + # * System throttling due to `429` (Too Many Requests) or `503` (Service + # Unavailable) responses from the worker, high error rates, or to smooth + # sudden large traffic spikes. + # @!attribute [rw] retry_config + # @return [::Google::Cloud::Tasks::V2::RetryConfig] + # Settings that determine the retry behavior. + # + # * For tasks created using Cloud Tasks: the queue-level retry settings + # apply to all tasks in the queue that were created using Cloud Tasks. + # Retry settings cannot be set on individual tasks. + # * For tasks created using the App Engine SDK: the queue-level retry + # settings apply to all tasks in the queue which do not have retry settings + # explicitly set on the task and were created by the App Engine SDK. See + # [App Engine + # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). + # @!attribute [rw] state + # @return [::Google::Cloud::Tasks::V2::Queue::State] + # Output only. The state of the queue. + # + # `state` can only be changed by calling + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#pause_queue PauseQueue}, + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#resume_queue ResumeQueue}, or uploading + # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#update_queue UpdateQueue} cannot be used + # to change `state`. + # @!attribute [rw] purge_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last time this queue was purged. + # + # All tasks that were {::Google::Cloud::Tasks::V2::Task#create_time created} + # before this time were purged. + # + # A queue can be purged using + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#purge_queue PurgeQueue}, the [App Engine + # Task Queue SDK, or the Cloud + # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). + # + # Purge time will be truncated to the nearest microsecond. Purge + # time will be unset if the queue has never been purged. + # @!attribute [rw] stackdriver_logging_config + # @return [::Google::Cloud::Tasks::V2::StackdriverLoggingConfig] + # Configuration options for writing logs to + # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + # field is unset, then no logs are written. + class Queue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # State of the queue. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # The queue is running. Tasks can be dispatched. + # + # If the queue was created using Cloud Tasks and the queue has + # had no activity (method calls or task dispatches) for 30 days, + # the queue may take a few minutes to re-activate. Some method + # calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and + # tasks may not be dispatched for a few minutes until the queue + # has been re-activated. + RUNNING = 1 + + # Tasks are paused by the user. If the queue is paused then Cloud + # Tasks will stop delivering tasks from it, but more tasks can + # still be added to it by the user. + PAUSED = 2 + + # The queue is disabled. + # + # A queue becomes `DISABLED` when + # [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) + # or + # [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) + # is uploaded which does not contain the queue. You cannot directly disable + # a queue. + # + # When a queue is disabled, tasks can still be added to a queue + # but the tasks are not dispatched. + # + # To permanently delete this queue and all of its tasks, call + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#delete_queue DeleteQueue}. + DISABLED = 3 + end + end + + # Rate limits. + # + # This message determines the maximum rate that tasks can be dispatched by a + # queue, regardless of whether the dispatch is a first task attempt or a retry. + # + # Note: The debugging command, + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#run_task RunTask}, will run a task even if + # the queue has reached its {::Google::Cloud::Tasks::V2::RateLimits RateLimits}. + # @!attribute [rw] max_dispatches_per_second + # @return [::Float] + # The maximum rate at which tasks are dispatched from this queue. + # + # If unspecified when the queue is created, Cloud Tasks will pick the + # default. + # + # * The maximum allowed value is 500. + # + # + # This field has the same meaning as + # [rate in + # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). + # @!attribute [rw] max_burst_size + # @return [::Integer] + # Output only. The max burst size. + # + # Max burst size limits how fast tasks in queue are processed when + # many tasks are in the queue and the rate is high. This field + # allows the queue to have a high rate so processing starts shortly + # after a task is enqueued, but still limits resource usage when + # many tasks are enqueued in a short period of time. + # + # The [token bucket](https://wikipedia.org/wiki/Token_Bucket) + # algorithm is used to control the rate of task dispatches. Each + # queue has a token bucket that holds tokens, up to the maximum + # specified by `max_burst_size`. Each time a task is dispatched, a + # token is removed from the bucket. Tasks will be dispatched until + # the queue's bucket runs out of tokens. The bucket will be + # continuously refilled with new tokens based on + # {::Google::Cloud::Tasks::V2::RateLimits#max_dispatches_per_second max_dispatches_per_second}. + # + # Cloud Tasks will pick the value of `max_burst_size` based on the + # value of + # {::Google::Cloud::Tasks::V2::RateLimits#max_dispatches_per_second max_dispatches_per_second}. + # + # For queues that were created or updated using + # `queue.yaml/xml`, `max_burst_size` is equal to + # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). + # Since `max_burst_size` is output only, if + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#update_queue UpdateQueue} is called on a + # queue created by `queue.yaml/xml`, `max_burst_size` will be reset based on + # the value of + # {::Google::Cloud::Tasks::V2::RateLimits#max_dispatches_per_second max_dispatches_per_second}, + # regardless of whether + # {::Google::Cloud::Tasks::V2::RateLimits#max_dispatches_per_second max_dispatches_per_second} + # is updated. + # @!attribute [rw] max_concurrent_dispatches + # @return [::Integer] + # The maximum number of concurrent tasks that Cloud Tasks allows + # to be dispatched for this queue. After this threshold has been + # reached, Cloud Tasks stops dispatching tasks until the number of + # concurrent requests decreases. + # + # If unspecified when the queue is created, Cloud Tasks will pick the + # default. + # + # + # The maximum allowed value is 5,000. + # + # + # This field has the same meaning as + # [max_concurrent_requests in + # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). + class RateLimits + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Retry config. + # + # These settings determine when a failed task attempt is retried. + # @!attribute [rw] max_attempts + # @return [::Integer] + # Number of attempts per task. + # + # Cloud Tasks will attempt the task `max_attempts` times (that is, if the + # first attempt fails, then there will be `max_attempts - 1` retries). Must + # be >= -1. + # + # If unspecified when the queue is created, Cloud Tasks will pick the + # default. + # + # -1 indicates unlimited attempts. + # + # This field has the same meaning as + # [task_retry_limit in + # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + # @!attribute [rw] max_retry_duration + # @return [::Google::Protobuf::Duration] + # If positive, `max_retry_duration` specifies the time limit for + # retrying a failed task, measured from when the task was first + # attempted. Once `max_retry_duration` time has passed *and* the + # task has been attempted + # {::Google::Cloud::Tasks::V2::RetryConfig#max_attempts max_attempts} times, no + # further attempts will be made and the task will be deleted. + # + # If zero, then the task age is unlimited. + # + # If unspecified when the queue is created, Cloud Tasks will pick the + # default. + # + # + # `max_retry_duration` will be truncated to the nearest second. + # + # This field has the same meaning as + # [task_age_limit in + # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + # @!attribute [rw] min_backoff + # @return [::Google::Protobuf::Duration] + # A task will be {::Google::Cloud::Tasks::V2::Task#schedule_time scheduled} for + # retry between {::Google::Cloud::Tasks::V2::RetryConfig#min_backoff min_backoff} + # and {::Google::Cloud::Tasks::V2::RetryConfig#max_backoff max_backoff} duration + # after it fails, if the queue's + # {::Google::Cloud::Tasks::V2::RetryConfig RetryConfig} specifies that the task + # should be retried. + # + # If unspecified when the queue is created, Cloud Tasks will pick the + # default. + # + # + # `min_backoff` will be truncated to the nearest second. + # + # This field has the same meaning as + # [min_backoff_seconds in + # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + # @!attribute [rw] max_backoff + # @return [::Google::Protobuf::Duration] + # A task will be {::Google::Cloud::Tasks::V2::Task#schedule_time scheduled} for + # retry between {::Google::Cloud::Tasks::V2::RetryConfig#min_backoff min_backoff} + # and {::Google::Cloud::Tasks::V2::RetryConfig#max_backoff max_backoff} duration + # after it fails, if the queue's + # {::Google::Cloud::Tasks::V2::RetryConfig RetryConfig} specifies that the task + # should be retried. + # + # If unspecified when the queue is created, Cloud Tasks will pick the + # default. + # + # + # `max_backoff` will be truncated to the nearest second. + # + # This field has the same meaning as + # [max_backoff_seconds in + # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + # @!attribute [rw] max_doublings + # @return [::Integer] + # The time between retries will double `max_doublings` times. + # + # A task's retry interval starts at + # {::Google::Cloud::Tasks::V2::RetryConfig#min_backoff min_backoff}, then doubles + # `max_doublings` times, then increases linearly, and finally + # retries at intervals of + # {::Google::Cloud::Tasks::V2::RetryConfig#max_backoff max_backoff} up to + # {::Google::Cloud::Tasks::V2::RetryConfig#max_attempts max_attempts} times. + # + # For example, if + # {::Google::Cloud::Tasks::V2::RetryConfig#min_backoff min_backoff} is 10s, + # {::Google::Cloud::Tasks::V2::RetryConfig#max_backoff max_backoff} is 300s, and + # `max_doublings` is 3, then the a task will first be retried in + # 10s. The retry interval will double three times, and then + # increase linearly by 2^3 * 10s. Finally, the task will retry at + # intervals of {::Google::Cloud::Tasks::V2::RetryConfig#max_backoff max_backoff} + # until the task has been attempted + # {::Google::Cloud::Tasks::V2::RetryConfig#max_attempts max_attempts} times. Thus, + # the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, .... + # + # If unspecified when the queue is created, Cloud Tasks will pick the + # default. + # + # + # This field has the same meaning as + # [max_doublings in + # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + class RetryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration options for writing logs to + # [Stackdriver Logging](https://cloud.google.com/logging/docs/). + # @!attribute [rw] sampling_ratio + # @return [::Float] + # Specifies the fraction of operations to write to + # [Stackdriver Logging](https://cloud.google.com/logging/docs/). + # This field may contain any value between 0.0 and 1.0, inclusive. + # 0.0 is the default and means that no operations are logged. + class StackdriverLoggingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/target.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/target.rb new file mode 100644 index 000000000000..fdee342780f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/target.rb @@ -0,0 +1,466 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Tasks + module V2 + # HTTP request. + # + # The task will be pushed to the worker as an HTTP request. If the worker + # or the redirected worker acknowledges the task by returning a successful HTTP + # response code ([`200` - `299`]), the task will be removed from the queue. If + # any other HTTP response code is returned or no response is received, the + # task will be retried according to the following: + # + # * User-specified throttling: [retry + # configuration][google.cloud.tasks.v2.Queue.retry_config], + # {::Google::Cloud::Tasks::V2::Queue#rate_limits rate limits}, and the [queue's + # state][google.cloud.tasks.v2.Queue.state]. + # + # * System throttling: To prevent the worker from overloading, Cloud Tasks may + # temporarily reduce the queue's effective rate. User-specified settings + # will not be changed. + # + # System throttling happens because: + # + # * Cloud Tasks backs off on all errors. Normally the backoff specified in + # {::Google::Cloud::Tasks::V2::Queue#rate_limits rate limits} will be used. But + # if the worker returns `429` (Too Many Requests), `503` (Service + # Unavailable), or the rate of errors is high, Cloud Tasks will use a + # higher backoff rate. The retry specified in the `Retry-After` HTTP + # response header is considered. + # + # * To prevent traffic spikes and to smooth sudden increases in traffic, + # dispatches ramp up slowly when the queue is newly created or idle and + # if large numbers of tasks suddenly become available to dispatch (due to + # spikes in create task rates, the queue being unpaused, or many tasks + # that are scheduled at the same time). + # @!attribute [rw] url + # @return [::String] + # Required. The full url path that the request will be sent to. + # + # This string must begin with either "http://" or "https://". Some examples + # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will + # encode some characters for safety and compatibility. The maximum allowed + # URL length is 2083 characters after encoding. + # + # The `Location` header response from a redirect response [`300` - `399`] + # may be followed. The redirect is not counted as a separate attempt. + # @!attribute [rw] http_method + # @return [::Google::Cloud::Tasks::V2::HttpMethod] + # The HTTP method to use for the request. The default is POST. + # @!attribute [rw] headers + # @return [::Google::Protobuf::Map{::String => ::String}] + # HTTP request headers. + # + # This map contains the header field names and values. + # Headers can be set when the + # [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + # + # These headers represent a subset of the headers that will accompany the + # task's HTTP request. Some HTTP request headers will be ignored or replaced. + # + # A partial list of headers that will be ignored or replaced is: + # + # * Host: This will be computed by Cloud Tasks and derived from + # {::Google::Cloud::Tasks::V2::HttpRequest#url HttpRequest.url}. + # * Content-Length: This will be computed by Cloud Tasks. + # * User-Agent: This will be set to `"Google-Cloud-Tasks"`. + # * `X-Google-*`: Google use only. + # * `X-AppEngine-*`: Google use only. + # + # `Content-Type` won't be set by Cloud Tasks. You can explicitly set + # `Content-Type` to a media type when the + # [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + # For example, `Content-Type` can be set to `"application/octet-stream"` or + # `"application/json"`. + # + # Headers which can have multiple values (according to RFC2616) can be + # specified using comma-separated values. + # + # The size of the headers must be less than 80KB. + # @!attribute [rw] body + # @return [::String] + # HTTP request body. + # + # A request body is allowed only if the + # {::Google::Cloud::Tasks::V2::HttpRequest#http_method HTTP method} is POST, PUT, + # or PATCH. It is an error to set body on a task with an incompatible + # {::Google::Cloud::Tasks::V2::HttpMethod HttpMethod}. + # @!attribute [rw] oauth_token + # @return [::Google::Cloud::Tasks::V2::OAuthToken] + # 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`, `oidc_token`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] oidc_token + # @return [::Google::Cloud::Tasks::V2::OidcToken] + # If specified, an + # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + # token will be generated and attached as an `Authorization` header in the + # HTTP request. + # + # This type of authorization can be used for many scenarios, including + # calling Cloud Run, or endpoints where you intend to validate the token + # yourself. + # + # Note: The following fields are mutually exclusive: `oidc_token`, `oauth_token`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class HttpRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class HeadersEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # App Engine HTTP request. + # + # The message defines the HTTP request that is sent to an App Engine app when + # the task is dispatched. + # + # Using {::Google::Cloud::Tasks::V2::AppEngineHttpRequest AppEngineHttpRequest} + # requires + # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) + # Google IAM permission for the project + # and the following scope: + # + # `https://www.googleapis.com/auth/cloud-platform` + # + # The task will be delivered to the App Engine app which belongs to the same + # project as the queue. For more information, see + # [How Requests are + # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) + # and how routing is affected by + # [dispatch + # files](https://cloud.google.com/appengine/docs/python/config/dispatchref). + # Traffic is encrypted during transport and never leaves Google datacenters. + # Because this traffic is carried over a communication mechanism internal to + # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS). + # The request to the handler, however, will appear to have used the HTTP + # protocol. + # + # The {::Google::Cloud::Tasks::V2::AppEngineRouting AppEngineRouting} used to + # construct the URL that the task is delivered to can be set at the queue-level + # or task-level: + # + # * If [app_engine_routing_override is set on the + # queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this value + # is used for all tasks in the queue, no matter what the setting is for the + # [task-level + # app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. + # + # + # The `url` that the task will be sent to is: + # + # * `url =` {::Google::Cloud::Tasks::V2::AppEngineRouting#host host} `+` + # {::Google::Cloud::Tasks::V2::AppEngineHttpRequest#relative_uri relative_uri} + # + # Tasks can be dispatched to secure app handlers, unsecure app handlers, and + # URIs restricted with + # [`login: + # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref). + # Because tasks are not run as any user, they cannot be dispatched to URIs + # restricted with + # [`login: + # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) + # Task dispatches also do not follow redirects. + # + # The task attempt has succeeded if the app's request handler returns an HTTP + # response code in the range [`200` - `299`]. The task attempt has failed if + # the app's handler returns a non-2xx response code or Cloud Tasks does + # not receive response before the + # {::Google::Cloud::Tasks::V2::Task#dispatch_deadline deadline}. Failed tasks will + # be retried according to the [retry + # configuration][google.cloud.tasks.v2.Queue.retry_config]. `503` (Service + # Unavailable) is considered an App Engine system error instead of an + # application error and will cause Cloud Tasks' traffic congestion control to + # temporarily throttle the queue's dispatches. Unlike other types of task + # targets, a `429` (Too Many Requests) response from an app handler does not + # cause traffic congestion control to throttle the queue. + # @!attribute [rw] http_method + # @return [::Google::Cloud::Tasks::V2::HttpMethod] + # The HTTP method to use for the request. The default is POST. + # + # The app's request handler for the task's target URL must be able to handle + # HTTP requests with this http_method, otherwise the task attempt fails with + # error code 405 (Method Not Allowed). See [Writing a push task request + # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) + # and the App Engine documentation for your runtime on [How Requests are + # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). + # @!attribute [rw] app_engine_routing + # @return [::Google::Cloud::Tasks::V2::AppEngineRouting] + # Task-level setting for App Engine routing. + # + # * If [app_engine_routing_override is set on the + # queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this + # value is used for all tasks in the queue, no matter what the setting is + # for the [task-level + # app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. + # @!attribute [rw] relative_uri + # @return [::String] + # The relative URI. + # + # The relative URI must begin with "/" and must be a valid HTTP relative URI. + # It can contain a path and query string arguments. + # If the relative URI is empty, then the root path "/" will be used. + # No spaces are allowed, and the maximum length allowed is 2083 characters. + # @!attribute [rw] headers + # @return [::Google::Protobuf::Map{::String => ::String}] + # HTTP request headers. + # + # This map contains the header field names and values. + # Headers can be set when the + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#create_task task is created}. + # Repeated headers are not supported but a header value can contain commas. + # + # Cloud Tasks sets some headers to default values: + # + # * `User-Agent`: By default, this header is + # `"AppEngine-Google; (+http://code.google.com/appengine)"`. + # This header can be modified, but Cloud Tasks will append + # `"AppEngine-Google; (+http://code.google.com/appengine)"` to the + # modified `User-Agent`. + # + # If the task has a {::Google::Cloud::Tasks::V2::AppEngineHttpRequest#body body}, + # Cloud Tasks sets the following headers: + # + # * `Content-Type`: By default, the `Content-Type` header is set to + # `"application/octet-stream"`. The default can be overridden by explicitly + # setting `Content-Type` to a particular media type when the + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#create_task task is created}. + # For example, `Content-Type` can be set to `"application/json"`. + # * `Content-Length`: This is computed by Cloud Tasks. This value is + # output only. It cannot be changed. + # + # The headers below cannot be set or overridden: + # + # * `Host` + # * `X-Google-*` + # * `X-AppEngine-*` + # + # In addition, Cloud Tasks sets some headers when the task is dispatched, + # such as headers containing information about the task; see + # [request + # headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers). + # These headers are set only when the task is dispatched, so they are not + # visible when the task is returned in a Cloud Tasks response. + # + # Although there is no specific limit for the maximum number of headers or + # the size, there is a limit on the maximum size of the + # {::Google::Cloud::Tasks::V2::Task Task}. For more information, see the + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#create_task CreateTask} documentation. + # @!attribute [rw] body + # @return [::String] + # HTTP request body. + # + # A request body is allowed only if the HTTP method is POST or PUT. It is + # an error to set a body on a task with an incompatible + # {::Google::Cloud::Tasks::V2::HttpMethod HttpMethod}. + class AppEngineHttpRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class HeadersEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # App Engine Routing. + # + # Defines routing characteristics specific to App Engine - service, version, + # and instance. + # + # For more information about services, versions, and instances see + # [An Overview of App + # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), + # [Microservices Architecture on Google App + # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), + # [App Engine Standard request + # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), + # and [App Engine Flex request + # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). + # + # Using {::Google::Cloud::Tasks::V2::AppEngineRouting AppEngineRouting} requires + # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) + # Google IAM permission for the project + # and the following scope: + # + # `https://www.googleapis.com/auth/cloud-platform` + # @!attribute [rw] service + # @return [::String] + # App service. + # + # By default, the task is sent to the service which is the default + # service when the task is attempted. + # + # For some queues or tasks which were created using the App Engine + # Task Queue API, {::Google::Cloud::Tasks::V2::AppEngineRouting#host host} is not + # parsable into {::Google::Cloud::Tasks::V2::AppEngineRouting#service service}, + # {::Google::Cloud::Tasks::V2::AppEngineRouting#version version}, and + # {::Google::Cloud::Tasks::V2::AppEngineRouting#instance instance}. For example, + # some tasks which were created using the App Engine SDK use a custom domain + # name; custom domains are not parsed by Cloud Tasks. If + # {::Google::Cloud::Tasks::V2::AppEngineRouting#host host} is not parsable, then + # {::Google::Cloud::Tasks::V2::AppEngineRouting#service service}, + # {::Google::Cloud::Tasks::V2::AppEngineRouting#version version}, and + # {::Google::Cloud::Tasks::V2::AppEngineRouting#instance instance} are the empty + # string. + # @!attribute [rw] version + # @return [::String] + # App version. + # + # By default, the task is sent to the version which is the default + # version when the task is attempted. + # + # For some queues or tasks which were created using the App Engine + # Task Queue API, {::Google::Cloud::Tasks::V2::AppEngineRouting#host host} is not + # parsable into {::Google::Cloud::Tasks::V2::AppEngineRouting#service service}, + # {::Google::Cloud::Tasks::V2::AppEngineRouting#version version}, and + # {::Google::Cloud::Tasks::V2::AppEngineRouting#instance instance}. For example, + # some tasks which were created using the App Engine SDK use a custom domain + # name; custom domains are not parsed by Cloud Tasks. If + # {::Google::Cloud::Tasks::V2::AppEngineRouting#host host} is not parsable, then + # {::Google::Cloud::Tasks::V2::AppEngineRouting#service service}, + # {::Google::Cloud::Tasks::V2::AppEngineRouting#version version}, and + # {::Google::Cloud::Tasks::V2::AppEngineRouting#instance instance} are the empty + # string. + # @!attribute [rw] instance + # @return [::String] + # App instance. + # + # By default, the task is sent to an instance which is available when + # the task is attempted. + # + # Requests can only be sent to a specific instance if + # [manual scaling is used in App Engine + # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + # App Engine Flex does not support instances. For more information, see + # [App Engine Standard request + # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) + # and [App Engine Flex request + # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). + # @!attribute [rw] host + # @return [::String] + # Output only. The host that the task is sent to. + # + # The host is constructed from the domain name of the app associated with + # the queue's project ID (for example .appspot.com), and the + # {::Google::Cloud::Tasks::V2::AppEngineRouting#service service}, + # {::Google::Cloud::Tasks::V2::AppEngineRouting#version version}, and + # {::Google::Cloud::Tasks::V2::AppEngineRouting#instance instance}. Tasks which + # were created using the App Engine SDK might have a custom domain name. + # + # For more information, see + # [How Requests are + # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). + class AppEngineRouting + 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_email + # @return [::String] + # [Service account email](https://cloud.google.com/iam/docs/service-accounts) + # to be used for generating OAuth token. + # The service account must be within the same project as the queue. The + # caller must have iam.serviceAccounts.actAs permission for the service + # account. + # @!attribute [rw] scope + # @return [::String] + # 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 + + # Contains information needed for generating an + # [OpenID Connect + # token](https://developers.google.com/identity/protocols/OpenIDConnect). + # This type of authorization can be used for many scenarios, including + # calling Cloud Run, or endpoints where you intend to validate the token + # yourself. + # @!attribute [rw] service_account_email + # @return [::String] + # [Service account email](https://cloud.google.com/iam/docs/service-accounts) + # to be used for generating OIDC token. + # The service account must be within the same project as the queue. The + # caller must have iam.serviceAccounts.actAs permission for the service + # account. + # @!attribute [rw] audience + # @return [::String] + # Audience to be used when generating OIDC token. If not specified, the URI + # specified in target will be used. + class OidcToken + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The HTTP method used to deliver the task. + module HttpMethod + # HTTP method unspecified + HTTP_METHOD_UNSPECIFIED = 0 + + # HTTP POST + POST = 1 + + # HTTP GET + GET = 2 + + # HTTP HEAD + HEAD = 3 + + # HTTP PUT + PUT = 4 + + # HTTP DELETE + DELETE = 5 + + # HTTP PATCH + PATCH = 6 + + # HTTP OPTIONS + OPTIONS = 7 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/task.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/task.rb new file mode 100644 index 000000000000..9a48ee97aae1 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/task.rb @@ -0,0 +1,196 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Tasks + module V2 + # A unit of scheduled work. + # @!attribute [rw] name + # @return [::String] + # Optionally caller-specified in + # {::Google::Cloud::Tasks::V2::CloudTasks::Client#create_task CreateTask}. + # + # The task name. + # + # The task name must have the following format: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # + # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + # hyphens (-), colons (:), or periods (.). + # For more information, see + # [Identifying + # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + # * `LOCATION_ID` is the canonical ID for the task's location. + # The list of available locations can be obtained by calling + # [ListLocations][google.cloud.location.Locations.ListLocations]. + # For more information, see https://cloud.google.com/about/locations/. + # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + # hyphens (-). The maximum length is 100 characters. + # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), + # hyphens (-), or underscores (_). The maximum length is 500 characters. + # @!attribute [rw] app_engine_http_request + # @return [::Google::Cloud::Tasks::V2::AppEngineHttpRequest] + # HTTP request that is sent to the App Engine app handler. + # + # An App Engine task is a task that has + # {::Google::Cloud::Tasks::V2::AppEngineHttpRequest AppEngineHttpRequest} set. + # + # Note: The following fields are mutually exclusive: `app_engine_http_request`, `http_request`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] http_request + # @return [::Google::Cloud::Tasks::V2::HttpRequest] + # HTTP request that is sent to the worker. + # + # An HTTP task is a task that has + # {::Google::Cloud::Tasks::V2::HttpRequest HttpRequest} set. + # + # Note: The following fields are mutually exclusive: `http_request`, `app_engine_http_request`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] schedule_time + # @return [::Google::Protobuf::Timestamp] + # The time when the task is scheduled to be attempted or retried. + # + # `schedule_time` will be truncated to the nearest microsecond. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time that the task was created. + # + # `create_time` will be truncated to the nearest second. + # @!attribute [rw] dispatch_deadline + # @return [::Google::Protobuf::Duration] + # The deadline for requests sent to the worker. If the worker does not + # respond by this deadline then the request is cancelled and the attempt + # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the + # task according to the {::Google::Cloud::Tasks::V2::RetryConfig RetryConfig}. + # + # Note that when the request is cancelled, Cloud Tasks will stop listening + # for the response, but whether the worker stops processing depends on the + # worker. For example, if the worker is stuck, it may not react to cancelled + # requests. + # + # The default and maximum values depend on the type of request: + # + # * For {::Google::Cloud::Tasks::V2::HttpRequest HTTP tasks}, the default is 10 + # minutes. The deadline + # must be in the interval [15 seconds, 30 minutes]. + # + # * For {::Google::Cloud::Tasks::V2::AppEngineHttpRequest App Engine tasks}, 0 + # indicates that the + # request has the default deadline. The default deadline depends on the + # [scaling + # type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) + # of the service: 10 minutes for standard apps with automatic scaling, 24 + # hours for standard apps with manual and basic scaling, and 60 minutes for + # flex apps. If the request deadline is set, it must be in the interval [15 + # seconds, 24 hours 15 seconds]. Regardless of the task's + # `dispatch_deadline`, the app handler will not run for longer than than + # the service's timeout. We recommend setting the `dispatch_deadline` to + # at most a few seconds more than the app handler's timeout. For more + # information see + # [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). + # + # `dispatch_deadline` will be truncated to the nearest millisecond. The + # deadline is an approximate deadline. + # @!attribute [rw] dispatch_count + # @return [::Integer] + # Output only. The number of attempts dispatched. + # + # This count includes attempts which have been dispatched but haven't + # received a response. + # @!attribute [rw] response_count + # @return [::Integer] + # Output only. The number of attempts which have received a response. + # @!attribute [rw] first_attempt + # @return [::Google::Cloud::Tasks::V2::Attempt] + # Output only. The status of the task's first attempt. + # + # Only {::Google::Cloud::Tasks::V2::Attempt#dispatch_time dispatch_time} will be + # set. The other {::Google::Cloud::Tasks::V2::Attempt Attempt} information is not + # retained by Cloud Tasks. + # @!attribute [rw] last_attempt + # @return [::Google::Cloud::Tasks::V2::Attempt] + # Output only. The status of the task's last attempt. + # @!attribute [rw] view + # @return [::Google::Cloud::Tasks::V2::Task::View] + # Output only. The view specifies which subset of the + # {::Google::Cloud::Tasks::V2::Task Task} has been returned. + class Task + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The view specifies a subset of {::Google::Cloud::Tasks::V2::Task Task} data. + # + # When a task is returned in a response, not all + # information is retrieved by default because some data, such as + # payloads, might be desirable to return only when needed because + # of its large size or because of the sensitivity of data that it + # contains. + module View + # Unspecified. Defaults to BASIC. + VIEW_UNSPECIFIED = 0 + + # The basic view omits fields which can be large or can contain + # sensitive data. + # + # This view does not include the + # [body in + # AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest.body]. + # Bodies are desirable to return only when needed, because they + # can be large and because of the sensitivity of the data that you + # choose to store in it. + BASIC = 1 + + # All information is returned. + # + # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires + # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + # permission on the {::Google::Cloud::Tasks::V2::Queue Queue} resource. + FULL = 2 + end + end + + # The status of a task attempt. + # @!attribute [rw] schedule_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time that this attempt was scheduled. + # + # `schedule_time` will be truncated to the nearest microsecond. + # @!attribute [rw] dispatch_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time that this attempt was dispatched. + # + # `dispatch_time` will be truncated to the nearest microsecond. + # @!attribute [rw] response_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time that this attempt response was received. + # + # `response_time` will be truncated to the nearest microsecond. + # @!attribute [rw] response_status + # @return [::Google::Rpc::Status] + # Output only. The response from the worker for this attempt. + # + # If `response_time` is unset, then the task has not been attempted or is + # currently running and the `response_status` field is meaningless. + class Attempt + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # 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"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::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). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/iam/v1/options.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! + + +module Google + module Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-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-tasks-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-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-tasks-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-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-tasks-v2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-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-tasks-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-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-tasks-v2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-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-tasks-v2/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-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-tasks-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-tasks-v2/snippets/Gemfile new file mode 100644 index 000000000000..8480a57dc7a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-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-tasks-v2", path: "../" +else + gem "google-cloud-tasks-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-tasks-v2/snippets/cloud_tasks/create_queue.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/create_queue.rb new file mode 100644 index 000000000000..89081d8d2d84 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/create_queue.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 cloudtasks_v2_generated_CloudTasks_CreateQueue_sync] +require "google/cloud/tasks/v2" + +## +# Snippet for the create_queue call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2::CloudTasks::Client#create_queue. +# +def create_queue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2::CreateQueueRequest.new + + # Call the create_queue method. + result = client.create_queue request + + # The returned object is of type Google::Cloud::Tasks::V2::Queue. + p result +end +# [END cloudtasks_v2_generated_CloudTasks_CreateQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/create_task.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/create_task.rb new file mode 100644 index 000000000000..a12a2894529a --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/create_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudtasks_v2_generated_CloudTasks_CreateTask_sync] +require "google/cloud/tasks/v2" + +## +# Snippet for the create_task call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2::CloudTasks::Client#create_task. +# +def create_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2::CreateTaskRequest.new + + # Call the create_task method. + result = client.create_task request + + # The returned object is of type Google::Cloud::Tasks::V2::Task. + p result +end +# [END cloudtasks_v2_generated_CloudTasks_CreateTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/delete_queue.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/delete_queue.rb new file mode 100644 index 000000000000..8b80b0958c9b --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/delete_queue.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 cloudtasks_v2_generated_CloudTasks_DeleteQueue_sync] +require "google/cloud/tasks/v2" + +## +# Snippet for the delete_queue call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2::CloudTasks::Client#delete_queue. +# +def delete_queue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2::DeleteQueueRequest.new + + # Call the delete_queue method. + result = client.delete_queue request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END cloudtasks_v2_generated_CloudTasks_DeleteQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/delete_task.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/delete_task.rb new file mode 100644 index 000000000000..c1e9f301f9ab --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/delete_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudtasks_v2_generated_CloudTasks_DeleteTask_sync] +require "google/cloud/tasks/v2" + +## +# Snippet for the delete_task call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2::CloudTasks::Client#delete_task. +# +def delete_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2::DeleteTaskRequest.new + + # Call the delete_task method. + result = client.delete_task request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END cloudtasks_v2_generated_CloudTasks_DeleteTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/get_iam_policy.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/get_iam_policy.rb new file mode 100644 index 000000000000..8fdd3c8d2cef --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/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 cloudtasks_v2_generated_CloudTasks_GetIamPolicy_sync] +require "google/cloud/tasks/v2" + +## +# Snippet for the get_iam_policy call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2::CloudTasks::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2::CloudTasks::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 cloudtasks_v2_generated_CloudTasks_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/get_queue.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/get_queue.rb new file mode 100644 index 000000000000..c62917b1cb5e --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/get_queue.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 cloudtasks_v2_generated_CloudTasks_GetQueue_sync] +require "google/cloud/tasks/v2" + +## +# Snippet for the get_queue call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2::CloudTasks::Client#get_queue. +# +def get_queue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2::GetQueueRequest.new + + # Call the get_queue method. + result = client.get_queue request + + # The returned object is of type Google::Cloud::Tasks::V2::Queue. + p result +end +# [END cloudtasks_v2_generated_CloudTasks_GetQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/get_task.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/get_task.rb new file mode 100644 index 000000000000..64d71ad03392 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/get_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudtasks_v2_generated_CloudTasks_GetTask_sync] +require "google/cloud/tasks/v2" + +## +# Snippet for the get_task call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2::CloudTasks::Client#get_task. +# +def get_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2::GetTaskRequest.new + + # Call the get_task method. + result = client.get_task request + + # The returned object is of type Google::Cloud::Tasks::V2::Task. + p result +end +# [END cloudtasks_v2_generated_CloudTasks_GetTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/list_queues.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/list_queues.rb new file mode 100644 index 000000000000..833568cefc39 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/list_queues.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 cloudtasks_v2_generated_CloudTasks_ListQueues_sync] +require "google/cloud/tasks/v2" + +## +# Snippet for the list_queues call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2::CloudTasks::Client#list_queues. +# +def list_queues + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2::ListQueuesRequest.new + + # Call the list_queues method. + result = client.list_queues request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Tasks::V2::Queue. + p item + end +end +# [END cloudtasks_v2_generated_CloudTasks_ListQueues_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/list_tasks.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/list_tasks.rb new file mode 100644 index 000000000000..be8504a93b6b --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/list_tasks.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudtasks_v2_generated_CloudTasks_ListTasks_sync] +require "google/cloud/tasks/v2" + +## +# Snippet for the list_tasks call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2::CloudTasks::Client#list_tasks. +# +def list_tasks + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2::ListTasksRequest.new + + # Call the list_tasks method. + result = client.list_tasks request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Tasks::V2::Task. + p item + end +end +# [END cloudtasks_v2_generated_CloudTasks_ListTasks_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/pause_queue.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/pause_queue.rb new file mode 100644 index 000000000000..1f82a9e28be0 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/pause_queue.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 cloudtasks_v2_generated_CloudTasks_PauseQueue_sync] +require "google/cloud/tasks/v2" + +## +# Snippet for the pause_queue call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2::CloudTasks::Client#pause_queue. +# +def pause_queue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2::PauseQueueRequest.new + + # Call the pause_queue method. + result = client.pause_queue request + + # The returned object is of type Google::Cloud::Tasks::V2::Queue. + p result +end +# [END cloudtasks_v2_generated_CloudTasks_PauseQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/purge_queue.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/purge_queue.rb new file mode 100644 index 000000000000..cb87bbc3f976 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/purge_queue.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 cloudtasks_v2_generated_CloudTasks_PurgeQueue_sync] +require "google/cloud/tasks/v2" + +## +# Snippet for the purge_queue call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2::CloudTasks::Client#purge_queue. +# +def purge_queue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2::PurgeQueueRequest.new + + # Call the purge_queue method. + result = client.purge_queue request + + # The returned object is of type Google::Cloud::Tasks::V2::Queue. + p result +end +# [END cloudtasks_v2_generated_CloudTasks_PurgeQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/resume_queue.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/resume_queue.rb new file mode 100644 index 000000000000..7f8d6bd94477 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/resume_queue.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 cloudtasks_v2_generated_CloudTasks_ResumeQueue_sync] +require "google/cloud/tasks/v2" + +## +# Snippet for the resume_queue call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2::CloudTasks::Client#resume_queue. +# +def resume_queue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2::ResumeQueueRequest.new + + # Call the resume_queue method. + result = client.resume_queue request + + # The returned object is of type Google::Cloud::Tasks::V2::Queue. + p result +end +# [END cloudtasks_v2_generated_CloudTasks_ResumeQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/run_task.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/run_task.rb new file mode 100644 index 000000000000..08df0ddafb7e --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/run_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudtasks_v2_generated_CloudTasks_RunTask_sync] +require "google/cloud/tasks/v2" + +## +# Snippet for the run_task call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2::CloudTasks::Client#run_task. +# +def run_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2::RunTaskRequest.new + + # Call the run_task method. + result = client.run_task request + + # The returned object is of type Google::Cloud::Tasks::V2::Task. + p result +end +# [END cloudtasks_v2_generated_CloudTasks_RunTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/set_iam_policy.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/set_iam_policy.rb new file mode 100644 index 000000000000..10fdebb1dcdc --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/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 cloudtasks_v2_generated_CloudTasks_SetIamPolicy_sync] +require "google/cloud/tasks/v2" + +## +# Snippet for the set_iam_policy call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2::CloudTasks::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2::CloudTasks::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 cloudtasks_v2_generated_CloudTasks_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/test_iam_permissions.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/test_iam_permissions.rb new file mode 100644 index 000000000000..abd84456c6c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/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 cloudtasks_v2_generated_CloudTasks_TestIamPermissions_sync] +require "google/cloud/tasks/v2" + +## +# Snippet for the test_iam_permissions call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2::CloudTasks::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2::CloudTasks::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 cloudtasks_v2_generated_CloudTasks_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/update_queue.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/update_queue.rb new file mode 100644 index 000000000000..05400cd443bf --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/update_queue.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 cloudtasks_v2_generated_CloudTasks_UpdateQueue_sync] +require "google/cloud/tasks/v2" + +## +# Snippet for the update_queue call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2::CloudTasks::Client#update_queue. +# +def update_queue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2::UpdateQueueRequest.new + + # Call the update_queue method. + result = client.update_queue request + + # The returned object is of type Google::Cloud::Tasks::V2::Queue. + p result +end +# [END cloudtasks_v2_generated_CloudTasks_UpdateQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/snippet_metadata_google.cloud.tasks.v2.json b/owl-bot-staging/google-cloud-tasks-v2/snippets/snippet_metadata_google.cloud.tasks.v2.json new file mode 100644 index 000000000000..30392ec1961e --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/snippets/snippet_metadata_google.cloud.tasks.v2.json @@ -0,0 +1,655 @@ +{ + "client_library": { + "name": "google-cloud-tasks-v2", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.tasks.v2", + "version": "v2" + } + ] + }, + "snippets": [ + { + "region_tag": "cloudtasks_v2_generated_CloudTasks_ListQueues_sync", + "title": "Snippet for the list_queues call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#list_queues.", + "file": "cloud_tasks/list_queues.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_queues", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#list_queues", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2::ListQueuesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2::ListQueuesResponse", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" + }, + "method": { + "short_name": "ListQueues", + "full_name": "google.cloud.tasks.v2.CloudTasks.ListQueues", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2_generated_CloudTasks_GetQueue_sync", + "title": "Snippet for the get_queue call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#get_queue.", + "file": "cloud_tasks/get_queue.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_queue", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#get_queue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2::GetQueueRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2::Queue", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" + }, + "method": { + "short_name": "GetQueue", + "full_name": "google.cloud.tasks.v2.CloudTasks.GetQueue", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2_generated_CloudTasks_CreateQueue_sync", + "title": "Snippet for the create_queue call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#create_queue.", + "file": "cloud_tasks/create_queue.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_queue", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#create_queue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2::CreateQueueRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2::Queue", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" + }, + "method": { + "short_name": "CreateQueue", + "full_name": "google.cloud.tasks.v2.CloudTasks.CreateQueue", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2_generated_CloudTasks_UpdateQueue_sync", + "title": "Snippet for the update_queue call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#update_queue.", + "file": "cloud_tasks/update_queue.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_queue", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#update_queue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2::UpdateQueueRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2::Queue", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" + }, + "method": { + "short_name": "UpdateQueue", + "full_name": "google.cloud.tasks.v2.CloudTasks.UpdateQueue", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2_generated_CloudTasks_DeleteQueue_sync", + "title": "Snippet for the delete_queue call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#delete_queue.", + "file": "cloud_tasks/delete_queue.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_queue", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#delete_queue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2::DeleteQueueRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" + }, + "method": { + "short_name": "DeleteQueue", + "full_name": "google.cloud.tasks.v2.CloudTasks.DeleteQueue", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2_generated_CloudTasks_PurgeQueue_sync", + "title": "Snippet for the purge_queue call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#purge_queue.", + "file": "cloud_tasks/purge_queue.rb", + "language": "RUBY", + "client_method": { + "short_name": "purge_queue", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#purge_queue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2::PurgeQueueRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2::Queue", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" + }, + "method": { + "short_name": "PurgeQueue", + "full_name": "google.cloud.tasks.v2.CloudTasks.PurgeQueue", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2_generated_CloudTasks_PauseQueue_sync", + "title": "Snippet for the pause_queue call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#pause_queue.", + "file": "cloud_tasks/pause_queue.rb", + "language": "RUBY", + "client_method": { + "short_name": "pause_queue", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#pause_queue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2::PauseQueueRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2::Queue", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" + }, + "method": { + "short_name": "PauseQueue", + "full_name": "google.cloud.tasks.v2.CloudTasks.PauseQueue", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2_generated_CloudTasks_ResumeQueue_sync", + "title": "Snippet for the resume_queue call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#resume_queue.", + "file": "cloud_tasks/resume_queue.rb", + "language": "RUBY", + "client_method": { + "short_name": "resume_queue", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#resume_queue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2::ResumeQueueRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2::Queue", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" + }, + "method": { + "short_name": "ResumeQueue", + "full_name": "google.cloud.tasks.v2.CloudTasks.ResumeQueue", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2_generated_CloudTasks_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#get_iam_policy.", + "file": "cloud_tasks/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.tasks.v2.CloudTasks.GetIamPolicy", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2_generated_CloudTasks_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#set_iam_policy.", + "file": "cloud_tasks/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.tasks.v2.CloudTasks.SetIamPolicy", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2_generated_CloudTasks_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#test_iam_permissions.", + "file": "cloud_tasks/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.tasks.v2.CloudTasks.TestIamPermissions", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2_generated_CloudTasks_ListTasks_sync", + "title": "Snippet for the list_tasks call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#list_tasks.", + "file": "cloud_tasks/list_tasks.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_tasks", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#list_tasks", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2::ListTasksRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2::ListTasksResponse", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" + }, + "method": { + "short_name": "ListTasks", + "full_name": "google.cloud.tasks.v2.CloudTasks.ListTasks", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2_generated_CloudTasks_GetTask_sync", + "title": "Snippet for the get_task call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#get_task.", + "file": "cloud_tasks/get_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_task", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#get_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2::GetTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2::Task", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" + }, + "method": { + "short_name": "GetTask", + "full_name": "google.cloud.tasks.v2.CloudTasks.GetTask", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2_generated_CloudTasks_CreateTask_sync", + "title": "Snippet for the create_task call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#create_task.", + "file": "cloud_tasks/create_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_task", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#create_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2::CreateTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2::Task", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" + }, + "method": { + "short_name": "CreateTask", + "full_name": "google.cloud.tasks.v2.CloudTasks.CreateTask", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2_generated_CloudTasks_DeleteTask_sync", + "title": "Snippet for the delete_task call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#delete_task.", + "file": "cloud_tasks/delete_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_task", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#delete_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2::DeleteTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" + }, + "method": { + "short_name": "DeleteTask", + "full_name": "google.cloud.tasks.v2.CloudTasks.DeleteTask", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2_generated_CloudTasks_RunTask_sync", + "title": "Snippet for the run_task call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#run_task.", + "file": "cloud_tasks/run_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "run_task", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#run_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2::RunTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2::Task", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" + }, + "method": { + "short_name": "RunTask", + "full_name": "google.cloud.tasks.v2.CloudTasks.RunTask", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2.CloudTasks" + } + } + }, + "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-tasks-v2/test/google/cloud/tasks/v2/cloud_tasks_paths_test.rb b/owl-bot-staging/google-cloud-tasks-v2/test/google/cloud/tasks/v2/cloud_tasks_paths_test.rb new file mode 100644 index 000000000000..345d9adc75f2 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/test/google/cloud/tasks/v2/cloud_tasks_paths_test.rb @@ -0,0 +1,79 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/tasks/v2/cloud_tasks" + +class ::Google::Cloud::Tasks::V2::CloudTasks::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_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::Tasks::V2::CloudTasks::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_queue_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.queue_path project: "value0", location: "value1", queue: "value2" + assert_equal "projects/value0/locations/value1/queues/value2", path + end + end + + def test_task_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.task_path project: "value0", location: "value1", queue: "value2", task: "value3" + assert_equal "projects/value0/locations/value1/queues/value2/tasks/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2/test/google/cloud/tasks/v2/cloud_tasks_rest_test.rb b/owl-bot-staging/google-cloud-tasks-v2/test/google/cloud/tasks/v2/cloud_tasks_rest_test.rb new file mode 100644 index 000000000000..5f59bf5f6de1 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/test/google/cloud/tasks/v2/cloud_tasks_rest_test.rb @@ -0,0 +1,979 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/tasks/v2/cloudtasks_pb" +require "google/cloud/tasks/v2/cloud_tasks/rest" + + +class ::Google::Cloud::Tasks::V2::CloudTasks::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_queues + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2::ListQueuesResponse.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_queues_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_list_queues_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_queues_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_queues({ 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_queues 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_queues ::Google::Cloud::Tasks::V2::ListQueuesRequest.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_queues({ 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_queues(::Google::Cloud::Tasks::V2::ListQueuesRequest.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_queues_client_stub.call_count + end + end + end + + def test_get_queue + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2::Queue.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_get_queue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_queue({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_queue name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_queue ::Google::Cloud::Tasks::V2::GetQueueRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_queue({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_queue(::Google::Cloud::Tasks::V2::GetQueueRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_queue_client_stub.call_count + end + end + end + + def test_create_queue + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2::Queue.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + queue = {} + + create_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_create_queue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_queue({ parent: parent, queue: queue }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_queue parent: parent, queue: queue do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_queue ::Google::Cloud::Tasks::V2::CreateQueueRequest.new(parent: parent, queue: queue) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_queue({ parent: parent, queue: queue }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_queue(::Google::Cloud::Tasks::V2::CreateQueueRequest.new(parent: parent, queue: queue), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_queue_client_stub.call_count + end + end + end + + def test_update_queue + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2::Queue.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + queue = {} + update_mask = {} + + update_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_update_queue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_queue({ queue: queue, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_queue queue: queue, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_queue ::Google::Cloud::Tasks::V2::UpdateQueueRequest.new(queue: queue, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_queue({ queue: queue, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_queue(::Google::Cloud::Tasks::V2::UpdateQueueRequest.new(queue: queue, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_queue_client_stub.call_count + end + end + end + + def test_delete_queue + # 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_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_delete_queue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_queue({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_queue name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_queue ::Google::Cloud::Tasks::V2::DeleteQueueRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_queue({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_queue(::Google::Cloud::Tasks::V2::DeleteQueueRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_queue_client_stub.call_count + end + end + end + + def test_purge_queue + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2::Queue.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + purge_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_purge_queue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, purge_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.purge_queue({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.purge_queue name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.purge_queue ::Google::Cloud::Tasks::V2::PurgeQueueRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.purge_queue({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.purge_queue(::Google::Cloud::Tasks::V2::PurgeQueueRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, purge_queue_client_stub.call_count + end + end + end + + def test_pause_queue + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2::Queue.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + pause_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_pause_queue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, pause_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.pause_queue({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.pause_queue name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.pause_queue ::Google::Cloud::Tasks::V2::PauseQueueRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.pause_queue({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.pause_queue(::Google::Cloud::Tasks::V2::PauseQueueRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, pause_queue_client_stub.call_count + end + end + end + + def test_resume_queue + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2::Queue.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + resume_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_resume_queue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, resume_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.resume_queue({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.resume_queue name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.resume_queue ::Google::Cloud::Tasks::V2::ResumeQueueRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.resume_queue({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.resume_queue(::Google::Cloud::Tasks::V2::ResumeQueueRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, resume_queue_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::Tasks::V2::CloudTasks::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::Tasks::V2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2::CloudTasks::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::Tasks::V2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2::CloudTasks::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::Tasks::V2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_count + end + end + end + + def test_list_tasks + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2::ListTasksResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + response_view = :VIEW_UNSPECIFIED + page_size = 42 + page_token = "hello world" + + list_tasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_list_tasks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_tasks_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_tasks({ parent: parent, response_view: response_view, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_tasks parent: parent, response_view: response_view, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_tasks ::Google::Cloud::Tasks::V2::ListTasksRequest.new(parent: parent, response_view: response_view, 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_tasks({ parent: parent, response_view: response_view, 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_tasks(::Google::Cloud::Tasks::V2::ListTasksRequest.new(parent: parent, response_view: response_view, 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_tasks_client_stub.call_count + end + end + end + + def test_get_task + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2::Task.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + response_view = :VIEW_UNSPECIFIED + + get_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_get_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_task({ name: name, response_view: response_view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_task name: name, response_view: response_view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_task ::Google::Cloud::Tasks::V2::GetTaskRequest.new(name: name, response_view: response_view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_task({ name: name, response_view: response_view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_task(::Google::Cloud::Tasks::V2::GetTaskRequest.new(name: name, response_view: response_view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_task_client_stub.call_count + end + end + end + + def test_create_task + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2::Task.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + task = {} + response_view = :VIEW_UNSPECIFIED + + create_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_create_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_task({ parent: parent, task: task, response_view: response_view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_task parent: parent, task: task, response_view: response_view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_task ::Google::Cloud::Tasks::V2::CreateTaskRequest.new(parent: parent, task: task, response_view: response_view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_task({ parent: parent, task: task, response_view: response_view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_task(::Google::Cloud::Tasks::V2::CreateTaskRequest.new(parent: parent, task: task, response_view: response_view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_task_client_stub.call_count + end + end + end + + def test_delete_task + # 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_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_delete_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_task({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_task name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_task ::Google::Cloud::Tasks::V2::DeleteTaskRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_task({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_task(::Google::Cloud::Tasks::V2::DeleteTaskRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_task_client_stub.call_count + end + end + end + + def test_run_task + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2::Task.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + response_view = :VIEW_UNSPECIFIED + + run_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_run_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, run_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.run_task({ name: name, response_view: response_view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.run_task name: name, response_view: response_view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.run_task ::Google::Cloud::Tasks::V2::RunTaskRequest.new(name: name, response_view: response_view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.run_task({ name: name, response_view: response_view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.run_task(::Google::Cloud::Tasks::V2::RunTaskRequest.new(name: name, response_view: response_view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, run_task_client_stub.call_count + end + end + end + + def test_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::Tasks::V2::CloudTasks::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::Tasks::V2::CloudTasks::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2/test/google/cloud/tasks/v2/cloud_tasks_test.rb b/owl-bot-staging/google-cloud-tasks-v2/test/google/cloud/tasks/v2/cloud_tasks_test.rb new file mode 100644 index 000000000000..7f5678b2ed04 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/test/google/cloud/tasks/v2/cloud_tasks_test.rb @@ -0,0 +1,1074 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/tasks/v2/cloudtasks_pb" +require "google/cloud/tasks/v2/cloud_tasks" + +class ::Google::Cloud::Tasks::V2::CloudTasks::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_queues + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2::ListQueuesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_queues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_queues, name + assert_kind_of ::Google::Cloud::Tasks::V2::ListQueuesRequest, 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_queues_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_queues({ 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_queues 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_queues ::Google::Cloud::Tasks::V2::ListQueuesRequest.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_queues({ 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_queues(::Google::Cloud::Tasks::V2::ListQueuesRequest.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_queues_client_stub.call_rpc_count + end + end + + def test_get_queue + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2::Queue.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_queue, name + assert_kind_of ::Google::Cloud::Tasks::V2::GetQueueRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_queue({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_queue name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_queue ::Google::Cloud::Tasks::V2::GetQueueRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_queue({ 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_queue(::Google::Cloud::Tasks::V2::GetQueueRequest.new(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_queue_client_stub.call_rpc_count + end + end + + def test_create_queue + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2::Queue.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + queue = {} + + create_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_queue, name + assert_kind_of ::Google::Cloud::Tasks::V2::CreateQueueRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Tasks::V2::Queue), request["queue"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_queue({ parent: parent, queue: queue }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_queue parent: parent, queue: queue do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_queue ::Google::Cloud::Tasks::V2::CreateQueueRequest.new(parent: parent, queue: queue) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_queue({ parent: parent, queue: queue }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_queue(::Google::Cloud::Tasks::V2::CreateQueueRequest.new(parent: parent, queue: queue), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_queue_client_stub.call_rpc_count + end + end + + def test_update_queue + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2::Queue.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + queue = {} + update_mask = {} + + update_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_queue, name + assert_kind_of ::Google::Cloud::Tasks::V2::UpdateQueueRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Tasks::V2::Queue), request["queue"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_queue({ queue: queue, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_queue queue: queue, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_queue ::Google::Cloud::Tasks::V2::UpdateQueueRequest.new(queue: queue, 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_queue({ queue: queue, 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_queue(::Google::Cloud::Tasks::V2::UpdateQueueRequest.new(queue: queue, 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_queue_client_stub.call_rpc_count + end + end + + def test_delete_queue + # 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_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_queue, name + assert_kind_of ::Google::Cloud::Tasks::V2::DeleteQueueRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_queue({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_queue name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_queue ::Google::Cloud::Tasks::V2::DeleteQueueRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_queue({ 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_queue(::Google::Cloud::Tasks::V2::DeleteQueueRequest.new(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_queue_client_stub.call_rpc_count + end + end + + def test_purge_queue + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2::Queue.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + purge_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :purge_queue, name + assert_kind_of ::Google::Cloud::Tasks::V2::PurgeQueueRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, purge_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.purge_queue({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.purge_queue name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.purge_queue ::Google::Cloud::Tasks::V2::PurgeQueueRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.purge_queue({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.purge_queue(::Google::Cloud::Tasks::V2::PurgeQueueRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, purge_queue_client_stub.call_rpc_count + end + end + + def test_pause_queue + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2::Queue.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + pause_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :pause_queue, name + assert_kind_of ::Google::Cloud::Tasks::V2::PauseQueueRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, pause_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.pause_queue({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.pause_queue name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.pause_queue ::Google::Cloud::Tasks::V2::PauseQueueRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.pause_queue({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.pause_queue(::Google::Cloud::Tasks::V2::PauseQueueRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, pause_queue_client_stub.call_rpc_count + end + end + + def test_resume_queue + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2::Queue.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + resume_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :resume_queue, name + assert_kind_of ::Google::Cloud::Tasks::V2::ResumeQueueRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, resume_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.resume_queue({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.resume_queue name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.resume_queue ::Google::Cloud::Tasks::V2::ResumeQueueRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.resume_queue({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.resume_queue(::Google::Cloud::Tasks::V2::ResumeQueueRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, resume_queue_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::Tasks::V2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_rpc_count + end + end + + def test_list_tasks + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2::ListTasksResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + response_view = :VIEW_UNSPECIFIED + page_size = 42 + page_token = "hello world" + + list_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_tasks, name + assert_kind_of ::Google::Cloud::Tasks::V2::ListTasksRequest, request + assert_equal "hello world", request["parent"] + assert_equal :VIEW_UNSPECIFIED, request["response_view"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_tasks_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_tasks({ parent: parent, response_view: response_view, 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_tasks parent: parent, response_view: response_view, 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_tasks ::Google::Cloud::Tasks::V2::ListTasksRequest.new(parent: parent, response_view: response_view, 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_tasks({ parent: parent, response_view: response_view, 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_tasks(::Google::Cloud::Tasks::V2::ListTasksRequest.new(parent: parent, response_view: response_view, 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_tasks_client_stub.call_rpc_count + end + end + + def test_get_task + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2::Task.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + response_view = :VIEW_UNSPECIFIED + + get_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_task, name + assert_kind_of ::Google::Cloud::Tasks::V2::GetTaskRequest, request + assert_equal "hello world", request["name"] + assert_equal :VIEW_UNSPECIFIED, request["response_view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_task({ name: name, response_view: response_view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_task name: name, response_view: response_view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_task ::Google::Cloud::Tasks::V2::GetTaskRequest.new(name: name, response_view: response_view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_task({ name: name, response_view: response_view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_task(::Google::Cloud::Tasks::V2::GetTaskRequest.new(name: name, response_view: response_view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_task_client_stub.call_rpc_count + end + end + + def test_create_task + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2::Task.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + task = {} + response_view = :VIEW_UNSPECIFIED + + create_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_task, name + assert_kind_of ::Google::Cloud::Tasks::V2::CreateTaskRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Tasks::V2::Task), request["task"] + assert_equal :VIEW_UNSPECIFIED, request["response_view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_task({ parent: parent, task: task, response_view: response_view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_task parent: parent, task: task, response_view: response_view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_task ::Google::Cloud::Tasks::V2::CreateTaskRequest.new(parent: parent, task: task, response_view: response_view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_task({ parent: parent, task: task, response_view: response_view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_task(::Google::Cloud::Tasks::V2::CreateTaskRequest.new(parent: parent, task: task, response_view: response_view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_task_client_stub.call_rpc_count + end + end + + def test_delete_task + # 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_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_task, name + assert_kind_of ::Google::Cloud::Tasks::V2::DeleteTaskRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_task({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_task name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_task ::Google::Cloud::Tasks::V2::DeleteTaskRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_task({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_task(::Google::Cloud::Tasks::V2::DeleteTaskRequest.new(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_task_client_stub.call_rpc_count + end + end + + def test_run_task + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2::Task.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + response_view = :VIEW_UNSPECIFIED + + run_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :run_task, name + assert_kind_of ::Google::Cloud::Tasks::V2::RunTaskRequest, request + assert_equal "hello world", request["name"] + assert_equal :VIEW_UNSPECIFIED, request["response_view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, run_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.run_task({ name: name, response_view: response_view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.run_task name: name, response_view: response_view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.run_task ::Google::Cloud::Tasks::V2::RunTaskRequest.new(name: name, response_view: response_view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.run_task({ name: name, response_view: response_view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.run_task(::Google::Cloud::Tasks::V2::RunTaskRequest.new(name: name, response_view: response_view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, run_task_client_stub.call_rpc_count + end + end + + def test_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::Tasks::V2::CloudTasks::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::Tasks::V2::CloudTasks::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::Tasks::V2::CloudTasks::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Tasks::V2::CloudTasks::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2/test/helper.rb b/owl-bot-staging/google-cloud-tasks-v2/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/.gitignore b/owl-bot-staging/google-cloud-tasks-v2beta2/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/.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-tasks-v2beta2/.repo-metadata.json b/owl-bot-staging/google-cloud-tasks-v2beta2/.repo-metadata.json new file mode 100644 index 000000000000..7f0b625d0a63 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "cloudtasks.googleapis.com", + "api_shortname": "cloudtasks", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest", + "distribution_name": "google-cloud-tasks-v2beta2", + "is_cloud": true, + "language": "ruby", + "name": "cloudtasks", + "name_pretty": "Cloud Tasks V2beta2 API", + "product_documentation": "https://cloud.google.com/tasks", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Cloud Tasks is a fully managed service that allows you to manage the execution, dispatch and delivery of a large number of distributed tasks. You can asynchronously perform work outside of a user request. Your tasks can be executed on App Engine or any arbitrary HTTP endpoint. Note that google-cloud-tasks-v2beta2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-tasks instead. See the readme for more details.", + "ruby-cloud-env-prefix": "TASKS", + "ruby-cloud-product-url": "https://cloud.google.com/tasks", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/.rubocop.yml b/owl-bot-staging/google-cloud-tasks-v2beta2/.rubocop.yml new file mode 100644 index 000000000000..21bca46e5821 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-tasks-v2beta2.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-tasks-v2beta2.rb" diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/.toys.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/.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-tasks-v2beta2/.yardopts b/owl-bot-staging/google-cloud-tasks-v2beta2/.yardopts new file mode 100644 index 000000000000..2480630b8f94 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Tasks V2beta2 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-tasks-v2beta2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-tasks-v2beta2/AUTHENTICATION.md new file mode 100644 index 000000000000..458865effa49 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-tasks-v2beta2 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-tasks-v2beta2 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/tasks/v2beta2" + +client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/tasks/v2beta2" + +::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::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-tasks-v2beta2 +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/tasks/v2beta2" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::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-tasks-v2beta2/CHANGELOG.md b/owl-bot-staging/google-cloud-tasks-v2beta2/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/Gemfile b/owl-bot-staging/google-cloud-tasks-v2beta2/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/LICENSE.md b/owl-bot-staging/google-cloud-tasks-v2beta2/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2/README.md b/owl-bot-staging/google-cloud-tasks-v2beta2/README.md new file mode 100644 index 000000000000..7161ac774944 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Tasks V2beta2 API + +Manages the execution of large numbers of distributed requests. + +Cloud Tasks is a fully managed service that allows you to manage the execution, dispatch and delivery of a large number of distributed tasks. You can asynchronously perform work outside of a user request. Your tasks can be executed on App Engine or any arbitrary HTTP endpoint. + +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 Tasks V2beta2 API. Most users should consider using +the main client gem, +[google-cloud-tasks](https://rubygems.org/gems/google-cloud-tasks). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-tasks-v2beta2 +``` + +## 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/cloudtasks.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/tasks/v2beta2" + +client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new +request = ::Google::Cloud::Tasks::V2beta2::ListQueuesRequest.new # (request fields as keyword arguments...) +response = client.list_queues request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/tasks) +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/tasks/v2beta2" +require "logger" + +client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::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-tasks`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-tasks-v2beta2`. +_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-tasks`. +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-tasks-v2beta2`. + +### 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-tasks-v2beta2/Rakefile b/owl-bot-staging/google-cloud-tasks-v2beta2/Rakefile new file mode 100644 index 000000000000..29d824a23b8e --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["TASKS_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["TASKS_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["TASKS_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 TASKS_TEST_PROJECT=test123 TASKS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/tasks/v2beta2/cloud_tasks/credentials" + ::Google::Cloud::Tasks::V2beta2::CloudTasks::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["TASKS_PROJECT"] = project + ENV["TASKS_TEST_PROJECT"] = project + ENV["TASKS_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-tasks-v2beta2 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-tasks-v2beta2 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-tasks-v2beta2 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-tasks-v2beta2 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-tasks-v2beta2" + header "google-cloud-tasks-v2beta2 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-tasks-v2beta2 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-tasks-v2beta2 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-tasks-v2beta2 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-tasks-v2beta2 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-tasks-v2beta2/gapic_metadata.json b/owl-bot-staging/google-cloud-tasks-v2beta2/gapic_metadata.json new file mode 100644 index 000000000000..61fb01febb7c --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/gapic_metadata.json @@ -0,0 +1,123 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.tasks.v2beta2", + "libraryPackage": "::Google::Cloud::Tasks::V2beta2", + "services": { + "CloudTasks": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client", + "rpcs": { + "ListQueues": { + "methods": [ + "list_queues" + ] + }, + "GetQueue": { + "methods": [ + "get_queue" + ] + }, + "CreateQueue": { + "methods": [ + "create_queue" + ] + }, + "UpdateQueue": { + "methods": [ + "update_queue" + ] + }, + "DeleteQueue": { + "methods": [ + "delete_queue" + ] + }, + "PurgeQueue": { + "methods": [ + "purge_queue" + ] + }, + "PauseQueue": { + "methods": [ + "pause_queue" + ] + }, + "ResumeQueue": { + "methods": [ + "resume_queue" + ] + }, + "UploadQueueYaml": { + "methods": [ + "upload_queue_yaml" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + }, + "ListTasks": { + "methods": [ + "list_tasks" + ] + }, + "GetTask": { + "methods": [ + "get_task" + ] + }, + "CreateTask": { + "methods": [ + "create_task" + ] + }, + "DeleteTask": { + "methods": [ + "delete_task" + ] + }, + "LeaseTasks": { + "methods": [ + "lease_tasks" + ] + }, + "AcknowledgeTask": { + "methods": [ + "acknowledge_task" + ] + }, + "RenewLease": { + "methods": [ + "renew_lease" + ] + }, + "CancelLease": { + "methods": [ + "cancel_lease" + ] + }, + "RunTask": { + "methods": [ + "run_task" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/google-cloud-tasks-v2beta2.gemspec b/owl-bot-staging/google-cloud-tasks-v2beta2/google-cloud-tasks-v2beta2.gemspec new file mode 100644 index 000000000000..cf386b0a026d --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/google-cloud-tasks-v2beta2.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/tasks/v2beta2/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-tasks-v2beta2" + gem.version = Google::Cloud::Tasks::V2beta2::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Cloud Tasks is a fully managed service that allows you to manage the execution, dispatch and delivery of a large number of distributed tasks. You can asynchronously perform work outside of a user request. Your tasks can be executed on App Engine or any arbitrary HTTP endpoint. Note that google-cloud-tasks-v2beta2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-tasks instead. See the readme for more details." + gem.summary = "Manages the execution of large numbers of distributed requests." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google-cloud-tasks-v2beta2.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google-cloud-tasks-v2beta2.rb new file mode 100644 index 000000000000..3679450055ab --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google-cloud-tasks-v2beta2.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/tasks/v2beta2" diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2.rb new file mode 100644 index 000000000000..154f4c62635d --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2.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/tasks/v2beta2/cloud_tasks" +require "google/cloud/tasks/v2beta2/version" + +module Google + module Cloud + module Tasks + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/tasks/v2beta2" + # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/tasks/v2beta2" + # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new + # + module V2beta2 + end + end + end +end + +helper_path = ::File.join __dir__, "v2beta2", "_helpers.rb" +require "google/cloud/tasks/v2beta2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/bindings_override.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/bindings_override.rb new file mode 100644 index 000000000000..2bf75edd4e89 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/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 Tasks + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/tasks/v2beta2/rest" + # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new + # + module V2beta2 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Tasks"] + 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: "/v2beta2/{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: "/v2beta2/{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-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks.rb new file mode 100644 index 000000000000..fb7fda664c77 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks.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/tasks/v2beta2/version" + +require "google/cloud/tasks/v2beta2/cloud_tasks/credentials" +require "google/cloud/tasks/v2beta2/cloud_tasks/paths" +require "google/cloud/tasks/v2beta2/cloud_tasks/client" +require "google/cloud/tasks/v2beta2/cloud_tasks/rest" + +module Google + module Cloud + module Tasks + module V2beta2 + ## + # Cloud Tasks allows developers to manage the execution of background + # work in their applications. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/tasks/v2beta2/cloud_tasks" + # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/tasks/v2beta2/cloud_tasks/rest" + # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new + # + module CloudTasks + end + end + end + end +end + +helper_path = ::File.join __dir__, "cloud_tasks", "helpers.rb" +require "google/cloud/tasks/v2beta2/cloud_tasks/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/client.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/client.rb new file mode 100644 index 000000000000..f69060cfe2e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/client.rb @@ -0,0 +1,2936 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/tasks/v2beta2/cloudtasks_pb" +require "google/cloud/location" + +module Google + module Cloud + module Tasks + module V2beta2 + module CloudTasks + ## + # Client for the CloudTasks service. + # + # Cloud Tasks allows developers to manage the execution of background + # work in their applications. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudtasks.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_tasks_stub + + ## + # Configure the CloudTasks Client class. + # + # See {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudTasks clients + # ::Google::Cloud::Tasks::V2beta2::CloudTasks::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", "Tasks", "V2beta2"] + 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_queues.timeout = 20.0 + default_config.rpcs.list_queues.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_queue.timeout = 20.0 + default_config.rpcs.get_queue.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_queue.timeout = 20.0 + + default_config.rpcs.update_queue.timeout = 20.0 + + default_config.rpcs.delete_queue.timeout = 20.0 + default_config.rpcs.delete_queue.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.purge_queue.timeout = 20.0 + + default_config.rpcs.pause_queue.timeout = 20.0 + + default_config.rpcs.resume_queue.timeout = 20.0 + + default_config.rpcs.upload_queue_yaml.timeout = 20.0 + + default_config.rpcs.get_iam_policy.timeout = 20.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.set_iam_policy.timeout = 20.0 + + default_config.rpcs.test_iam_permissions.timeout = 20.0 + default_config.rpcs.test_iam_permissions.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_tasks.timeout = 20.0 + default_config.rpcs.list_tasks.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_task.timeout = 20.0 + default_config.rpcs.get_task.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_task.timeout = 20.0 + + default_config.rpcs.delete_task.timeout = 20.0 + default_config.rpcs.delete_task.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.lease_tasks.timeout = 20.0 + + default_config.rpcs.acknowledge_task.timeout = 20.0 + + default_config.rpcs.renew_lease.timeout = 20.0 + + default_config.rpcs.cancel_lease.timeout = 20.0 + + default_config.rpcs.run_task.timeout = 20.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudTasks 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::Tasks::V2beta2::CloudTasks::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_tasks_stub.universe_domain + end + + ## + # Create a new CloudTasks client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudTasks 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/tasks/v2beta2/cloudtasks_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 + + @cloud_tasks_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Tasks::V2beta2::CloudTasks::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_tasks_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_tasks_stub.endpoint + config.universe_domain = @cloud_tasks_stub.universe_domain + config.logger = @cloud_tasks_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 + @cloud_tasks_stub.logger + end + + # Service calls + + ## + # Lists queues. + # + # Queues are returned in lexicographical order. + # + # @overload list_queues(request, options = nil) + # Pass arguments to `list_queues` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::ListQueuesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::ListQueuesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_queues(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) + # Pass arguments to `list_queues` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 name. + # For example: `projects/PROJECT_ID/locations/LOCATION_ID` + # @param filter [::String] + # `filter` can be used to specify a subset of queues. Any + # {::Google::Cloud::Tasks::V2beta2::Queue Queue} field can be used as a filter and + # several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + # filter syntax is the same as described in [Stackdriver's Advanced Logs + # Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + # + # Sample filter "app_engine_http_target: *". + # + # Note that using filters might cause fewer queues than the + # requested_page size to be returned. + # @param page_size [::Integer] + # Requested page size. + # + # The maximum page size is 9800. If unspecified, the page size will + # be the maximum. Fewer queues than requested might be returned, + # even if more queues exist; use the + # {::Google::Cloud::Tasks::V2beta2::ListQueuesResponse#next_page_token next_page_token} + # in the response to determine if more queues exist. + # @param page_token [::String] + # A token identifying the page of results to return. + # + # To request the first page results, page_token must be empty. To + # request the next page of results, page_token must be the value of + # {::Google::Cloud::Tasks::V2beta2::ListQueuesResponse#next_page_token next_page_token} + # returned from the previous call to + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_queues ListQueues} method. It + # is an error to switch the value of the + # {::Google::Cloud::Tasks::V2beta2::ListQueuesRequest#filter filter} while + # iterating through pages. + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Read mask is used for a more granular control over what the API + # returns. If the mask is not present all fields will be returned except + # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + # specified in the mask. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2beta2::Queue>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2beta2::Queue>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::ListQueuesRequest.new + # + # # Call the list_queues method. + # result = client.list_queues request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Tasks::V2beta2::Queue. + # p item + # end + # + def list_queues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::ListQueuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_queues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_queues.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_queues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :list_queues, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_tasks_stub, :list_queues, 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 queue. + # + # @overload get_queue(request, options = nil) + # Pass arguments to `get_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::GetQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::GetQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_queue(name: nil, read_mask: nil) + # Pass arguments to `get_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the queue. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Read mask is used for a more granular control over what the API + # returns. If the mask is not present all fields will be returned except + # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + # specified in the mask. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2beta2::Queue] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Queue] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::GetQueueRequest.new + # + # # Call the get_queue method. + # result = client.get_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. + # p result + # + def get_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::GetQueueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_queue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :get_queue, request, 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 queue. + # + # Queues created with this method allow tasks to live for a maximum of 31 + # days. After a task is 31 days old, the task will be deleted regardless of + # whether it was dispatched or not. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + # + # @overload create_queue(request, options = nil) + # Pass arguments to `create_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::CreateQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::CreateQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_queue(parent: nil, queue: nil) + # Pass arguments to `create_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 name in which the queue will be created. + # For example: `projects/PROJECT_ID/locations/LOCATION_ID` + # + # The list of allowed locations can be obtained by calling Cloud + # Tasks' implementation of + # [ListLocations][google.cloud.location.Locations.ListLocations]. + # @param queue [::Google::Cloud::Tasks::V2beta2::Queue, ::Hash] + # Required. The queue to create. + # + # [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as + # an existing queue. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2beta2::Queue] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Queue] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::CreateQueueRequest.new + # + # # Call the create_queue method. + # result = client.create_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. + # p result + # + def create_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::CreateQueueRequest + + # Converts hash and nil to 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_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_queue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :create_queue, request, 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 queue. + # + # This method creates the queue if it does not exist and updates + # the queue if it does exist. + # + # Queues created with this method allow tasks to live for a maximum of 31 + # days. After a task is 31 days old, the task will be deleted regardless of + # whether it was dispatched or not. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + # + # @overload update_queue(request, options = nil) + # Pass arguments to `update_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_queue(queue: nil, update_mask: nil) + # Pass arguments to `update_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param queue [::Google::Cloud::Tasks::V2beta2::Queue, ::Hash] + # Required. The queue to create or update. + # + # The queue's {::Google::Cloud::Tasks::V2beta2::Queue#name name} must be + # specified. + # + # Output only fields cannot be modified using UpdateQueue. + # Any value specified for an output only field will be ignored. + # The queue's {::Google::Cloud::Tasks::V2beta2::Queue#name name} cannot be + # changed. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # A mask used to specify which fields of the queue are being updated. + # + # If empty, then all fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2beta2::Queue] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Queue] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::UpdateQueueRequest.new + # + # # Call the update_queue method. + # result = client.update_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. + # p result + # + def update_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest + + # Converts hash and nil to 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_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.queue&.name + header_params["queue.name"] = request.queue.name + end + + request_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_queue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :update_queue, request, 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 queue. + # + # This command will delete the queue even if it has tasks in it. + # + # Note: If you delete a queue, a queue with the same name can't be created + # for 7 days. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + # + # @overload delete_queue(request, options = nil) + # Pass arguments to `delete_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_queue(name: nil) + # Pass arguments to `delete_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::DeleteQueueRequest.new + # + # # Call the delete_queue method. + # result = client.delete_queue request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest + + # Converts hash and nil to 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_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_queue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :delete_queue, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Purges a queue by deleting all of its tasks. + # + # All tasks created before this method is called are permanently deleted. + # + # Purge operations can take up to one minute to take effect. Tasks + # might be dispatched before the purge takes effect. A purge is irreversible. + # + # @overload purge_queue(request, options = nil) + # Pass arguments to `purge_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload purge_queue(name: nil) + # Pass arguments to `purge_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2beta2::Queue] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Queue] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::PurgeQueueRequest.new + # + # # Call the purge_queue method. + # result = client.purge_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. + # p result + # + def purge_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.purge_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.purge_queue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.purge_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :purge_queue, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Pauses the queue. + # + # If a queue is paused then the system will stop dispatching tasks + # until the queue is resumed via + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#resume_queue ResumeQueue}. Tasks can + # still be added when the queue is paused. A queue is paused if its + # {::Google::Cloud::Tasks::V2beta2::Queue#state state} is + # {::Google::Cloud::Tasks::V2beta2::Queue::State::PAUSED PAUSED}. + # + # @overload pause_queue(request, options = nil) + # Pass arguments to `pause_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::PauseQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::PauseQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload pause_queue(name: nil) + # Pass arguments to `pause_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2beta2::Queue] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Queue] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::PauseQueueRequest.new + # + # # Call the pause_queue method. + # result = client.pause_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. + # p result + # + def pause_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::PauseQueueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.pause_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.pause_queue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.pause_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :pause_queue, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Resume a queue. + # + # This method resumes a queue after it has been + # {::Google::Cloud::Tasks::V2beta2::Queue::State::PAUSED PAUSED} or + # {::Google::Cloud::Tasks::V2beta2::Queue::State::DISABLED DISABLED}. The state of a + # queue is stored in the queue's + # {::Google::Cloud::Tasks::V2beta2::Queue#state state}; after calling this method + # it will be set to + # {::Google::Cloud::Tasks::V2beta2::Queue::State::RUNNING RUNNING}. + # + # WARNING: Resuming many high-QPS queues at the same time can + # lead to target overloading. If you are resuming high-QPS + # queues, follow the 500/50/5 pattern described in + # [Managing Cloud Tasks Scaling + # Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). + # + # @overload resume_queue(request, options = nil) + # Pass arguments to `resume_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload resume_queue(name: nil) + # Pass arguments to `resume_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2beta2::Queue] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Queue] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::ResumeQueueRequest.new + # + # # Call the resume_queue method. + # result = client.resume_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. + # p result + # + def resume_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.resume_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.resume_queue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.resume_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :resume_queue, request, 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 queue list by uploading a queue.yaml file. + # + # The queue.yaml file is supplied in the request body as a YAML encoded + # string. This method was added to support gcloud clients versions before + # 322.0.0. New clients should use CreateQueue instead of this method. + # + # @overload upload_queue_yaml(request, options = nil) + # Pass arguments to `upload_queue_yaml` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::UploadQueueYamlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::UploadQueueYamlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload upload_queue_yaml(app_id: nil, http_body: nil) + # Pass arguments to `upload_queue_yaml` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param app_id [::String] + # Required. The App ID is supplied as an HTTP parameter. Unlike internal + # usage of App ID, it does not include a region prefix. Rather, the App ID + # represents the Project ID against which to make the request. + # @param http_body [::Google::Api::HttpBody, ::Hash] + # The http body contains the queue.yaml file which used to update queue lists + # + # @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/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::UploadQueueYamlRequest.new + # + # # Call the upload_queue_yaml method. + # result = client.upload_queue_yaml request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def upload_queue_yaml request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::UploadQueueYamlRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.upload_queue_yaml.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::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.upload_queue_yaml.timeout, + metadata: metadata, + retry_policy: @config.rpcs.upload_queue_yaml.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :upload_queue_yaml, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy for a + # {::Google::Cloud::Tasks::V2beta2::Queue Queue}. Returns an empty policy if the + # resource exists and does not have a policy set. + # + # Authorization requires the following + # [Google IAM](https://cloud.google.com/iam) permission on the specified + # resource parent: + # + # * `cloudtasks.queues.getIamPolicy` + # + # @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/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::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::Tasks::V2beta2::VERSION + metadata[:"x-goog-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_tasks_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy for a + # {::Google::Cloud::Tasks::V2beta2::Queue Queue}. Replaces any existing policy. + # + # Note: The Cloud Console does not check queue-level IAM permissions yet. + # Project-level permissions are required to use the Cloud Console. + # + # Authorization requires the following + # [Google IAM](https://cloud.google.com/iam) permission on the specified + # resource parent: + # + # * `cloudtasks.queues.setIamPolicy` + # + # @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/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::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::Tasks::V2beta2::VERSION + metadata[:"x-goog-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_tasks_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns permissions that a caller has on a + # {::Google::Cloud::Tasks::V2beta2::Queue Queue}. If the resource does not exist, + # this will return an empty set of permissions, not a + # [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + # + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::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::Tasks::V2beta2::VERSION + metadata[:"x-goog-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_tasks_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 + + ## + # Lists the tasks in a queue. + # + # By default, only the {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC} + # view is retrieved due to performance considerations; + # {::Google::Cloud::Tasks::V2beta2::ListTasksRequest#response_view response_view} + # controls the subset of information which is returned. + # + # The tasks may be returned in any order. The ordering may change at any + # time. + # + # @overload list_tasks(request, options = nil) + # Pass arguments to `list_tasks` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::ListTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::ListTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_tasks(parent: nil, response_view: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_tasks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. + # @param page_size [::Integer] + # Maximum page size. + # + # Fewer tasks than requested might be returned, even if more tasks exist; use + # {::Google::Cloud::Tasks::V2beta2::ListTasksResponse#next_page_token next_page_token} + # in the response to determine if more tasks exist. + # + # The maximum page size is 1000. If unspecified, the page size will be the + # maximum. + # @param page_token [::String] + # A token identifying the page of results to return. + # + # To request the first page results, page_token must be empty. To + # request the next page of results, page_token must be the value of + # {::Google::Cloud::Tasks::V2beta2::ListTasksResponse#next_page_token next_page_token} + # returned from the previous call to + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_tasks ListTasks} method. + # + # The page token is valid for only 2 hours. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2beta2::Task>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2beta2::Task>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::ListTasksRequest.new + # + # # Call the list_tasks method. + # result = client.list_tasks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Tasks::V2beta2::Task. + # p item + # end + # + def list_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::ListTasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_tasks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_tasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :list_tasks, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_tasks_stub, :list_tasks, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a task. + # + # @overload get_task(request, options = nil) + # Pass arguments to `get_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::GetTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::GetTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_task(name: nil, response_view: nil) + # Pass arguments to `get_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2beta2::Task] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Task] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::GetTaskRequest.new + # + # # Call the get_task method. + # result = client.get_task request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. + # p result + # + def get_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::GetTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :get_task, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a task and adds it to a queue. + # + # Tasks cannot be updated after creation; there is no UpdateTask command. + # + # * For {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget App Engine queues}, + # the maximum task size is + # 100KB. + # * For {::Google::Cloud::Tasks::V2beta2::PullTarget pull queues}, the maximum + # task size is 1MB. + # + # @overload create_task(request, options = nil) + # Pass arguments to `create_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::CreateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::CreateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_task(parent: nil, task: nil, response_view: nil) + # Pass arguments to `create_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # + # The queue must already exist. + # @param task [::Google::Cloud::Tasks::V2beta2::Task, ::Hash] + # Required. The task to add. + # + # Task names have the following format: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + # The user can optionally specify a task + # {::Google::Cloud::Tasks::V2beta2::Task#name name}. If a name is not specified + # then the system will generate a random unique task id, which will be set in + # the task returned in the {::Google::Cloud::Tasks::V2beta2::Task#name response}. + # + # If {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} is not + # set or is in the past then Cloud Tasks will set it to the current time. + # + # Task De-duplication: + # + # Explicitly specifying a task ID enables task de-duplication. If + # a task's ID is identical to that of an existing task or a task + # that was deleted or completed recently then the call will fail + # with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + # If the task's queue was created using Cloud Tasks, then another task with + # the same name can't be created for ~1 hour after the original task was + # deleted or completed. If the task's queue was created using queue.yaml or + # queue.xml, then another task with the same name can't be created + # for ~9 days after the original task was deleted or completed. + # + # Because there is an extra lookup cost to identify duplicate task + # names, these {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task CreateTask} + # calls have significantly increased latency. Using hashed strings for the + # task id or for the prefix of the task id is recommended. Choosing task ids + # that are sequential or have sequential prefixes, for example using a + # timestamp, causes an increase in latency and error rates in all + # task commands. The infrastructure relies on an approximately + # uniform distribution of task ids to store and serve tasks + # efficiently. + # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2beta2::Task] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Task] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::CreateTaskRequest.new + # + # # Call the create_task method. + # result = client.create_task request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. + # p result + # + def create_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::CreateTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :create_task, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a task. + # + # A task can be deleted if it is scheduled or dispatched. A task + # cannot be deleted if it has completed successfully or permanently + # failed. + # + # @overload delete_task(request, options = nil) + # Pass arguments to `delete_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_task(name: nil) + # Pass arguments to `delete_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::DeleteTaskRequest.new + # + # # Call the delete_task method. + # result = client.delete_task request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :delete_task, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Leases tasks from a pull queue for + # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#lease_duration lease_duration}. + # + # This method is invoked by the worker to obtain a lease. The + # worker must acknowledge the task via + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#acknowledge_task AcknowledgeTask} + # after they have performed the work associated with the task. + # + # The {::Google::Cloud::Tasks::V2beta2::PullMessage#payload payload} is intended + # to store data that the worker needs to perform the work associated with the + # task. To return the payloads in the + # {::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse response}, set + # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#response_view response_view} + # to {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL}. + # + # A maximum of 10 qps of + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} requests are + # allowed per queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] + # is returned when this limit is + # exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] + # is also returned when + # {::Google::Cloud::Tasks::V2beta2::RateLimits#max_tasks_dispatched_per_second max_tasks_dispatched_per_second} + # is exceeded. + # + # @overload lease_tasks(request, options = nil) + # Pass arguments to `lease_tasks` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload lease_tasks(parent: nil, max_tasks: nil, lease_duration: nil, response_view: nil, filter: nil) + # Pass arguments to `lease_tasks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # @param max_tasks [::Integer] + # The maximum number of tasks to lease. + # + # The system will make a best effort to return as close to as + # `max_tasks` as possible. + # + # The largest that `max_tasks` can be is 1000. + # + # The maximum total size of a [lease tasks + # response][google.cloud.tasks.v2beta2.LeaseTasksResponse] is 32 MB. If the + # sum of all task sizes requested reaches this limit, fewer tasks than + # requested are returned. + # @param lease_duration [::Google::Protobuf::Duration, ::Hash] + # Required. The duration of the lease. + # + # Each task returned in the + # {::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse response} will have its + # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} set to the + # current time plus the `lease_duration`. The task is leased until its + # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}; thus, the + # task will not be returned to another + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} call before + # its {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}. + # + # + # After the worker has successfully finished the work associated + # with the task, the worker must call via + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#acknowledge_task AcknowledgeTask} + # before the {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}. + # Otherwise the task will be returned to a later + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} call so that + # another worker can retry it. + # + # The maximum lease duration is 1 week. + # `lease_duration` will be truncated to the nearest second. + # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. + # @param filter [::String] + # `filter` can be used to specify a subset of tasks to lease. + # + # When `filter` is set to `tag=` then the + # {::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse response} will contain only + # tasks whose {::Google::Cloud::Tasks::V2beta2::PullMessage#tag tag} is equal to + # ``. `` must be less than 500 characters. + # + # When `filter` is set to `tag_function=oldest_tag()`, only tasks which have + # the same tag as the task with the oldest + # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} will be + # returned. + # + # Grammar Syntax: + # + # * `filter = "tag=" tag | "tag_function=" function` + # + # * `tag = string` + # + # * `function = "oldest_tag()"` + # + # The `oldest_tag()` function returns tasks which have the same tag as the + # oldest task (ordered by schedule time). + # + # SDK compatibility: Although the SDK allows tags to be either + # string or + # [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + # only UTF-8 encoded tags can be used in Cloud Tasks. Tag which + # aren't UTF-8 encoded can't be used in the + # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#filter filter} and the + # task's {::Google::Cloud::Tasks::V2beta2::PullMessage#tag tag} will be displayed + # as empty in Cloud Tasks. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::LeaseTasksRequest.new + # + # # Call the lease_tasks method. + # result = client.lease_tasks request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta2::LeaseTasksResponse. + # p result + # + def lease_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.lease_tasks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.lease_tasks.timeout, + metadata: metadata, + retry_policy: @config.rpcs.lease_tasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :lease_tasks, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Acknowledges a pull task. + # + # The worker, that is, the entity that + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks leased} this task must + # call this method to indicate that the work associated with the task has + # finished. + # + # The worker must acknowledge a task within the + # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#lease_duration lease_duration} + # or the lease will expire and the task will become available to be leased + # again. After the task is acknowledged, it will not be returned + # by a later {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks}, + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#get_task GetTask}, or + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_tasks ListTasks}. + # + # @overload acknowledge_task(request, options = nil) + # Pass arguments to `acknowledge_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload acknowledge_task(name: nil, schedule_time: nil) + # Pass arguments to `acknowledge_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @param schedule_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. The task's current schedule time, available in the + # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} response or + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#renew_lease RenewLease} response. + # This restriction is to ensure that your worker currently holds the lease. + # + # @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/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest.new + # + # # Call the acknowledge_task method. + # result = client.acknowledge_task request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def acknowledge_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.acknowledge_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.acknowledge_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.acknowledge_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :acknowledge_task, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Renew the current lease of a pull task. + # + # The worker can use this method to extend the lease by a new + # duration, starting from now. The new task lease will be + # returned in the task's + # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}. + # + # @overload renew_lease(request, options = nil) + # Pass arguments to `renew_lease` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload renew_lease(name: nil, schedule_time: nil, lease_duration: nil, response_view: nil) + # Pass arguments to `renew_lease` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @param schedule_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. The task's current schedule time, available in the + # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} response or + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#renew_lease RenewLease} response. + # This restriction is to ensure that your worker currently holds the lease. + # @param lease_duration [::Google::Protobuf::Duration, ::Hash] + # Required. The desired new lease duration, starting from now. + # + # + # The maximum lease duration is 1 week. + # `lease_duration` will be truncated to the nearest second. + # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2beta2::Task] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Task] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::RenewLeaseRequest.new + # + # # Call the renew_lease method. + # result = client.renew_lease request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. + # p result + # + def renew_lease request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.renew_lease.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.renew_lease.timeout, + metadata: metadata, + retry_policy: @config.rpcs.renew_lease.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :renew_lease, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Cancel a pull task's lease. + # + # The worker can use this method to cancel a task's lease by + # setting its {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} + # to now. This will make the task available to be leased to the next caller + # of {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks}. + # + # @overload cancel_lease(request, options = nil) + # Pass arguments to `cancel_lease` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lease(name: nil, schedule_time: nil, response_view: nil) + # Pass arguments to `cancel_lease` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @param schedule_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. The task's current schedule time, available in the + # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} response or + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#renew_lease RenewLease} response. + # This restriction is to ensure that your worker currently holds the lease. + # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2beta2::Task] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Task] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::CancelLeaseRequest.new + # + # # Call the cancel_lease method. + # result = client.cancel_lease request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. + # p result + # + def cancel_lease request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest + + # Converts hash and nil to 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_lease.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_lease.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_lease.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :cancel_lease, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Forces a task to run now. + # + # When this method is called, Cloud Tasks will dispatch the task, even if + # the task is already running, the queue has reached its + # {::Google::Cloud::Tasks::V2beta2::RateLimits RateLimits} or is + # {::Google::Cloud::Tasks::V2beta2::Queue::State::PAUSED PAUSED}. + # + # This command is meant to be used for manual debugging. For + # example, {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#run_task RunTask} can be + # used to retry a failed task after a fix has been made or to manually force + # a task to be dispatched now. + # + # The dispatched task is returned. That is, the task that is returned + # contains the {::Google::Cloud::Tasks::V2beta2::Task#status status} after the + # task is dispatched but before the task is received by its target. + # + # If Cloud Tasks receives a successful response from the task's + # target, then the task will be deleted; otherwise the task's + # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} will be + # reset to the time that + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#run_task RunTask} was called plus + # the retry delay specified in the queue's + # {::Google::Cloud::Tasks::V2beta2::RetryConfig RetryConfig}. + # + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#run_task RunTask} returns + # [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a + # task that has already succeeded or permanently failed. + # + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#run_task RunTask} cannot be called + # on a {::Google::Cloud::Tasks::V2beta2::PullMessage pull task}. + # + # @overload run_task(request, options = nil) + # Pass arguments to `run_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::RunTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::RunTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload run_task(name: nil, response_view: nil) + # Pass arguments to `run_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2beta2::Task] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Task] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::RunTaskRequest.new + # + # # Call the run_task method. + # result = client.run_task request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. + # p result + # + def run_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::RunTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.run_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.run_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.run_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :run_task, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CloudTasks API. + # + # This class represents the configuration for CloudTasks, + # 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::Tasks::V2beta2::CloudTasks::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_queues to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_queues.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_queues.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::Tasks::V2beta2::CloudTasks::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 = "cloudtasks.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 CloudTasks 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_queues` + # @return [::Gapic::Config::Method] + # + attr_reader :list_queues + ## + # RPC-specific configuration for `get_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :get_queue + ## + # RPC-specific configuration for `create_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :create_queue + ## + # RPC-specific configuration for `update_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :update_queue + ## + # RPC-specific configuration for `delete_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_queue + ## + # RPC-specific configuration for `purge_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :purge_queue + ## + # RPC-specific configuration for `pause_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :pause_queue + ## + # RPC-specific configuration for `resume_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :resume_queue + ## + # RPC-specific configuration for `upload_queue_yaml` + # @return [::Gapic::Config::Method] + # + attr_reader :upload_queue_yaml + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `list_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tasks + ## + # RPC-specific configuration for `get_task` + # @return [::Gapic::Config::Method] + # + attr_reader :get_task + ## + # RPC-specific configuration for `create_task` + # @return [::Gapic::Config::Method] + # + attr_reader :create_task + ## + # RPC-specific configuration for `delete_task` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_task + ## + # RPC-specific configuration for `lease_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :lease_tasks + ## + # RPC-specific configuration for `acknowledge_task` + # @return [::Gapic::Config::Method] + # + attr_reader :acknowledge_task + ## + # RPC-specific configuration for `renew_lease` + # @return [::Gapic::Config::Method] + # + attr_reader :renew_lease + ## + # RPC-specific configuration for `cancel_lease` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_lease + ## + # RPC-specific configuration for `run_task` + # @return [::Gapic::Config::Method] + # + attr_reader :run_task + + # @private + def initialize parent_rpcs = nil + list_queues_config = parent_rpcs.list_queues if parent_rpcs.respond_to? :list_queues + @list_queues = ::Gapic::Config::Method.new list_queues_config + get_queue_config = parent_rpcs.get_queue if parent_rpcs.respond_to? :get_queue + @get_queue = ::Gapic::Config::Method.new get_queue_config + create_queue_config = parent_rpcs.create_queue if parent_rpcs.respond_to? :create_queue + @create_queue = ::Gapic::Config::Method.new create_queue_config + update_queue_config = parent_rpcs.update_queue if parent_rpcs.respond_to? :update_queue + @update_queue = ::Gapic::Config::Method.new update_queue_config + delete_queue_config = parent_rpcs.delete_queue if parent_rpcs.respond_to? :delete_queue + @delete_queue = ::Gapic::Config::Method.new delete_queue_config + purge_queue_config = parent_rpcs.purge_queue if parent_rpcs.respond_to? :purge_queue + @purge_queue = ::Gapic::Config::Method.new purge_queue_config + pause_queue_config = parent_rpcs.pause_queue if parent_rpcs.respond_to? :pause_queue + @pause_queue = ::Gapic::Config::Method.new pause_queue_config + resume_queue_config = parent_rpcs.resume_queue if parent_rpcs.respond_to? :resume_queue + @resume_queue = ::Gapic::Config::Method.new resume_queue_config + upload_queue_yaml_config = parent_rpcs.upload_queue_yaml if parent_rpcs.respond_to? :upload_queue_yaml + @upload_queue_yaml = ::Gapic::Config::Method.new upload_queue_yaml_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks + @list_tasks = ::Gapic::Config::Method.new list_tasks_config + get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task + @get_task = ::Gapic::Config::Method.new get_task_config + create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task + @create_task = ::Gapic::Config::Method.new create_task_config + delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task + @delete_task = ::Gapic::Config::Method.new delete_task_config + lease_tasks_config = parent_rpcs.lease_tasks if parent_rpcs.respond_to? :lease_tasks + @lease_tasks = ::Gapic::Config::Method.new lease_tasks_config + acknowledge_task_config = parent_rpcs.acknowledge_task if parent_rpcs.respond_to? :acknowledge_task + @acknowledge_task = ::Gapic::Config::Method.new acknowledge_task_config + renew_lease_config = parent_rpcs.renew_lease if parent_rpcs.respond_to? :renew_lease + @renew_lease = ::Gapic::Config::Method.new renew_lease_config + cancel_lease_config = parent_rpcs.cancel_lease if parent_rpcs.respond_to? :cancel_lease + @cancel_lease = ::Gapic::Config::Method.new cancel_lease_config + run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task + @run_task = ::Gapic::Config::Method.new run_task_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/credentials.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/credentials.rb new file mode 100644 index 000000000000..6851ba771f0a --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/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 Tasks + module V2beta2 + module CloudTasks + # Credentials for the CloudTasks API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "TASKS_CREDENTIALS", + "TASKS_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "TASKS_CREDENTIALS_JSON", + "TASKS_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-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/paths.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/paths.rb new file mode 100644 index 000000000000..aa8084ac1821 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/paths.rb @@ -0,0 +1,90 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Tasks + module V2beta2 + module CloudTasks + # Path helper methods for the CloudTasks API. + module Paths + ## + # 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 Queue resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/queues/{queue}` + # + # @param project [String] + # @param location [String] + # @param queue [String] + # + # @return [::String] + def queue_path project:, location:, queue: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/queues/#{queue}" + end + + ## + # Create a fully-qualified Task resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/queues/{queue}/tasks/{task}` + # + # @param project [String] + # @param location [String] + # @param queue [String] + # @param task [String] + # + # @return [::String] + def task_path project:, location:, queue:, task: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "queue cannot contain /" if queue.to_s.include? "/" + + "projects/#{project}/locations/#{location}/queues/#{queue}/tasks/#{task}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/rest.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/rest.rb new file mode 100644 index 000000000000..0813806ca563 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/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/tasks/v2beta2/version" +require "google/cloud/tasks/v2beta2/bindings_override" + +require "google/cloud/tasks/v2beta2/cloud_tasks/credentials" +require "google/cloud/tasks/v2beta2/cloud_tasks/paths" +require "google/cloud/tasks/v2beta2/cloud_tasks/rest/client" + +module Google + module Cloud + module Tasks + module V2beta2 + ## + # Cloud Tasks allows developers to manage the execution of background + # work in their applications. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/tasks/v2beta2/cloud_tasks/rest" + # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new + # + module CloudTasks + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/tasks/v2beta2/cloud_tasks/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/rest/client.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/rest/client.rb new file mode 100644 index 000000000000..559c626e3aed --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/rest/client.rb @@ -0,0 +1,2667 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/tasks/v2beta2/cloudtasks_pb" +require "google/cloud/tasks/v2beta2/cloud_tasks/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module Tasks + module V2beta2 + module CloudTasks + module Rest + ## + # REST client for the CloudTasks service. + # + # Cloud Tasks allows developers to manage the execution of background + # work in their applications. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudtasks.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_tasks_stub + + ## + # Configure the CloudTasks Client class. + # + # See {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudTasks clients + # ::Google::Cloud::Tasks::V2beta2::CloudTasks::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", "Tasks", "V2beta2"] + 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_queues.timeout = 20.0 + default_config.rpcs.list_queues.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_queue.timeout = 20.0 + default_config.rpcs.get_queue.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_queue.timeout = 20.0 + + default_config.rpcs.update_queue.timeout = 20.0 + + default_config.rpcs.delete_queue.timeout = 20.0 + default_config.rpcs.delete_queue.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.purge_queue.timeout = 20.0 + + default_config.rpcs.pause_queue.timeout = 20.0 + + default_config.rpcs.resume_queue.timeout = 20.0 + + default_config.rpcs.get_iam_policy.timeout = 20.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.set_iam_policy.timeout = 20.0 + + default_config.rpcs.test_iam_permissions.timeout = 20.0 + default_config.rpcs.test_iam_permissions.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_tasks.timeout = 20.0 + default_config.rpcs.list_tasks.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_task.timeout = 20.0 + default_config.rpcs.get_task.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_task.timeout = 20.0 + + default_config.rpcs.delete_task.timeout = 20.0 + default_config.rpcs.delete_task.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.lease_tasks.timeout = 20.0 + + default_config.rpcs.acknowledge_task.timeout = 20.0 + + default_config.rpcs.renew_lease.timeout = 20.0 + + default_config.rpcs.cancel_lease.timeout = 20.0 + + default_config.rpcs.run_task.timeout = 20.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudTasks 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::Tasks::V2beta2::CloudTasks::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_tasks_stub.universe_domain + end + + ## + # Create a new CloudTasks REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudTasks 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 + + @cloud_tasks_stub = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @cloud_tasks_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_tasks_stub.endpoint + config.universe_domain = @cloud_tasks_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @cloud_tasks_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 + @cloud_tasks_stub.logger + end + + # Service calls + + ## + # Lists queues. + # + # Queues are returned in lexicographical order. + # + # @overload list_queues(request, options = nil) + # Pass arguments to `list_queues` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::ListQueuesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::ListQueuesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_queues(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) + # Pass arguments to `list_queues` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 name. + # For example: `projects/PROJECT_ID/locations/LOCATION_ID` + # @param filter [::String] + # `filter` can be used to specify a subset of queues. Any + # {::Google::Cloud::Tasks::V2beta2::Queue Queue} field can be used as a filter and + # several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + # filter syntax is the same as described in [Stackdriver's Advanced Logs + # Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + # + # Sample filter "app_engine_http_target: *". + # + # Note that using filters might cause fewer queues than the + # requested_page size to be returned. + # @param page_size [::Integer] + # Requested page size. + # + # The maximum page size is 9800. If unspecified, the page size will + # be the maximum. Fewer queues than requested might be returned, + # even if more queues exist; use the + # {::Google::Cloud::Tasks::V2beta2::ListQueuesResponse#next_page_token next_page_token} + # in the response to determine if more queues exist. + # @param page_token [::String] + # A token identifying the page of results to return. + # + # To request the first page results, page_token must be empty. To + # request the next page of results, page_token must be the value of + # {::Google::Cloud::Tasks::V2beta2::ListQueuesResponse#next_page_token next_page_token} + # returned from the previous call to + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#list_queues ListQueues} method. It + # is an error to switch the value of the + # {::Google::Cloud::Tasks::V2beta2::ListQueuesRequest#filter filter} while + # iterating through pages. + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Read mask is used for a more granular control over what the API + # returns. If the mask is not present all fields will be returned except + # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + # specified in the mask. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2beta2::Queue>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2beta2::Queue>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::ListQueuesRequest.new + # + # # Call the list_queues method. + # result = client.list_queues request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Tasks::V2beta2::Queue. + # p item + # end + # + def list_queues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::ListQueuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_queues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_queues.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_queues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.list_queues request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_tasks_stub, :list_queues, "queues", 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 queue. + # + # @overload get_queue(request, options = nil) + # Pass arguments to `get_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::GetQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::GetQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_queue(name: nil, read_mask: nil) + # Pass arguments to `get_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the queue. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Read mask is used for a more granular control over what the API + # returns. If the mask is not present all fields will be returned except + # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + # specified in the mask. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Queue] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::GetQueueRequest.new + # + # # Call the get_queue method. + # result = client.get_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. + # p result + # + def get_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::GetQueueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_queue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.get_queue request, 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 queue. + # + # Queues created with this method allow tasks to live for a maximum of 31 + # days. After a task is 31 days old, the task will be deleted regardless of + # whether it was dispatched or not. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + # + # @overload create_queue(request, options = nil) + # Pass arguments to `create_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::CreateQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::CreateQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_queue(parent: nil, queue: nil) + # Pass arguments to `create_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 name in which the queue will be created. + # For example: `projects/PROJECT_ID/locations/LOCATION_ID` + # + # The list of allowed locations can be obtained by calling Cloud + # Tasks' implementation of + # [ListLocations][google.cloud.location.Locations.ListLocations]. + # @param queue [::Google::Cloud::Tasks::V2beta2::Queue, ::Hash] + # Required. The queue to create. + # + # [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as + # an existing queue. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Queue] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::CreateQueueRequest.new + # + # # Call the create_queue method. + # result = client.create_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. + # p result + # + def create_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::CreateQueueRequest + + # Converts hash and nil to an 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_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_queue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.create_queue request, 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 queue. + # + # This method creates the queue if it does not exist and updates + # the queue if it does exist. + # + # Queues created with this method allow tasks to live for a maximum of 31 + # days. After a task is 31 days old, the task will be deleted regardless of + # whether it was dispatched or not. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + # + # @overload update_queue(request, options = nil) + # Pass arguments to `update_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_queue(queue: nil, update_mask: nil) + # Pass arguments to `update_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param queue [::Google::Cloud::Tasks::V2beta2::Queue, ::Hash] + # Required. The queue to create or update. + # + # The queue's {::Google::Cloud::Tasks::V2beta2::Queue#name name} must be + # specified. + # + # Output only fields cannot be modified using UpdateQueue. + # Any value specified for an output only field will be ignored. + # The queue's {::Google::Cloud::Tasks::V2beta2::Queue#name name} cannot be + # changed. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # A mask used to specify which fields of the queue are being updated. + # + # If empty, then all fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Queue] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::UpdateQueueRequest.new + # + # # Call the update_queue method. + # result = client.update_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. + # p result + # + def update_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest + + # Converts hash and nil to an 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_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_queue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.update_queue request, 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 queue. + # + # This command will delete the queue even if it has tasks in it. + # + # Note: If you delete a queue, a queue with the same name can't be created + # for 7 days. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + # + # @overload delete_queue(request, options = nil) + # Pass arguments to `delete_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_queue(name: nil) + # Pass arguments to `delete_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::DeleteQueueRequest.new + # + # # Call the delete_queue method. + # result = client.delete_queue request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest + + # Converts hash and nil to an 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_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_queue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.delete_queue request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Purges a queue by deleting all of its tasks. + # + # All tasks created before this method is called are permanently deleted. + # + # Purge operations can take up to one minute to take effect. Tasks + # might be dispatched before the purge takes effect. A purge is irreversible. + # + # @overload purge_queue(request, options = nil) + # Pass arguments to `purge_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload purge_queue(name: nil) + # Pass arguments to `purge_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Queue] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::PurgeQueueRequest.new + # + # # Call the purge_queue method. + # result = client.purge_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. + # p result + # + def purge_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.purge_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.purge_queue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.purge_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.purge_queue request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Pauses the queue. + # + # If a queue is paused then the system will stop dispatching tasks + # until the queue is resumed via + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#resume_queue ResumeQueue}. Tasks can + # still be added when the queue is paused. A queue is paused if its + # {::Google::Cloud::Tasks::V2beta2::Queue#state state} is + # {::Google::Cloud::Tasks::V2beta2::Queue::State::PAUSED PAUSED}. + # + # @overload pause_queue(request, options = nil) + # Pass arguments to `pause_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::PauseQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::PauseQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload pause_queue(name: nil) + # Pass arguments to `pause_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Queue] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::PauseQueueRequest.new + # + # # Call the pause_queue method. + # result = client.pause_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. + # p result + # + def pause_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::PauseQueueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.pause_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.pause_queue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.pause_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.pause_queue request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Resume a queue. + # + # This method resumes a queue after it has been + # {::Google::Cloud::Tasks::V2beta2::Queue::State::PAUSED PAUSED} or + # {::Google::Cloud::Tasks::V2beta2::Queue::State::DISABLED DISABLED}. The state of a + # queue is stored in the queue's + # {::Google::Cloud::Tasks::V2beta2::Queue#state state}; after calling this method + # it will be set to + # {::Google::Cloud::Tasks::V2beta2::Queue::State::RUNNING RUNNING}. + # + # WARNING: Resuming many high-QPS queues at the same time can + # lead to target overloading. If you are resuming high-QPS + # queues, follow the 500/50/5 pattern described in + # [Managing Cloud Tasks Scaling + # Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). + # + # @overload resume_queue(request, options = nil) + # Pass arguments to `resume_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload resume_queue(name: nil) + # Pass arguments to `resume_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Queue] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::ResumeQueueRequest.new + # + # # Call the resume_queue method. + # result = client.resume_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. + # p result + # + def resume_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.resume_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.resume_queue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.resume_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.resume_queue request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy for a + # {::Google::Cloud::Tasks::V2beta2::Queue Queue}. Returns an empty policy if the + # resource exists and does not have a policy set. + # + # Authorization requires the following + # [Google IAM](https://cloud.google.com/iam) permission on the specified + # resource parent: + # + # * `cloudtasks.queues.getIamPolicy` + # + # @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/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::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::Tasks::V2beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_tasks_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy for a + # {::Google::Cloud::Tasks::V2beta2::Queue Queue}. Replaces any existing policy. + # + # Note: The Cloud Console does not check queue-level IAM permissions yet. + # Project-level permissions are required to use the Cloud Console. + # + # Authorization requires the following + # [Google IAM](https://cloud.google.com/iam) permission on the specified + # resource parent: + # + # * `cloudtasks.queues.setIamPolicy` + # + # @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/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::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::Tasks::V2beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_tasks_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns permissions that a caller has on a + # {::Google::Cloud::Tasks::V2beta2::Queue Queue}. If the resource does not exist, + # this will return an empty set of permissions, not a + # [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + # + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::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::Tasks::V2beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_tasks_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 + + ## + # Lists the tasks in a queue. + # + # By default, only the {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC} + # view is retrieved due to performance considerations; + # {::Google::Cloud::Tasks::V2beta2::ListTasksRequest#response_view response_view} + # controls the subset of information which is returned. + # + # The tasks may be returned in any order. The ordering may change at any + # time. + # + # @overload list_tasks(request, options = nil) + # Pass arguments to `list_tasks` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::ListTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::ListTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_tasks(parent: nil, response_view: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_tasks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. + # @param page_size [::Integer] + # Maximum page size. + # + # Fewer tasks than requested might be returned, even if more tasks exist; use + # {::Google::Cloud::Tasks::V2beta2::ListTasksResponse#next_page_token next_page_token} + # in the response to determine if more tasks exist. + # + # The maximum page size is 1000. If unspecified, the page size will be the + # maximum. + # @param page_token [::String] + # A token identifying the page of results to return. + # + # To request the first page results, page_token must be empty. To + # request the next page of results, page_token must be the value of + # {::Google::Cloud::Tasks::V2beta2::ListTasksResponse#next_page_token next_page_token} + # returned from the previous call to + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#list_tasks ListTasks} method. + # + # The page token is valid for only 2 hours. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2beta2::Task>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2beta2::Task>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::ListTasksRequest.new + # + # # Call the list_tasks method. + # result = client.list_tasks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Tasks::V2beta2::Task. + # p item + # end + # + def list_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::ListTasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_tasks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_tasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.list_tasks request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_tasks_stub, :list_tasks, "tasks", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a task. + # + # @overload get_task(request, options = nil) + # Pass arguments to `get_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::GetTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::GetTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_task(name: nil, response_view: nil) + # Pass arguments to `get_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Task] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::GetTaskRequest.new + # + # # Call the get_task method. + # result = client.get_task request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. + # p result + # + def get_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::GetTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.get_task request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a task and adds it to a queue. + # + # Tasks cannot be updated after creation; there is no UpdateTask command. + # + # * For {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget App Engine queues}, + # the maximum task size is + # 100KB. + # * For {::Google::Cloud::Tasks::V2beta2::PullTarget pull queues}, the maximum + # task size is 1MB. + # + # @overload create_task(request, options = nil) + # Pass arguments to `create_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::CreateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::CreateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_task(parent: nil, task: nil, response_view: nil) + # Pass arguments to `create_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # + # The queue must already exist. + # @param task [::Google::Cloud::Tasks::V2beta2::Task, ::Hash] + # Required. The task to add. + # + # Task names have the following format: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + # The user can optionally specify a task + # {::Google::Cloud::Tasks::V2beta2::Task#name name}. If a name is not specified + # then the system will generate a random unique task id, which will be set in + # the task returned in the {::Google::Cloud::Tasks::V2beta2::Task#name response}. + # + # If {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} is not + # set or is in the past then Cloud Tasks will set it to the current time. + # + # Task De-duplication: + # + # Explicitly specifying a task ID enables task de-duplication. If + # a task's ID is identical to that of an existing task or a task + # that was deleted or completed recently then the call will fail + # with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + # If the task's queue was created using Cloud Tasks, then another task with + # the same name can't be created for ~1 hour after the original task was + # deleted or completed. If the task's queue was created using queue.yaml or + # queue.xml, then another task with the same name can't be created + # for ~9 days after the original task was deleted or completed. + # + # Because there is an extra lookup cost to identify duplicate task + # names, these {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#create_task CreateTask} + # calls have significantly increased latency. Using hashed strings for the + # task id or for the prefix of the task id is recommended. Choosing task ids + # that are sequential or have sequential prefixes, for example using a + # timestamp, causes an increase in latency and error rates in all + # task commands. The infrastructure relies on an approximately + # uniform distribution of task ids to store and serve tasks + # efficiently. + # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Task] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::CreateTaskRequest.new + # + # # Call the create_task method. + # result = client.create_task request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. + # p result + # + def create_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::CreateTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.create_task request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a task. + # + # A task can be deleted if it is scheduled or dispatched. A task + # cannot be deleted if it has completed successfully or permanently + # failed. + # + # @overload delete_task(request, options = nil) + # Pass arguments to `delete_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_task(name: nil) + # Pass arguments to `delete_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::DeleteTaskRequest.new + # + # # Call the delete_task method. + # result = client.delete_task request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.delete_task request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Leases tasks from a pull queue for + # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#lease_duration lease_duration}. + # + # This method is invoked by the worker to obtain a lease. The + # worker must acknowledge the task via + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#acknowledge_task AcknowledgeTask} + # after they have performed the work associated with the task. + # + # The {::Google::Cloud::Tasks::V2beta2::PullMessage#payload payload} is intended + # to store data that the worker needs to perform the work associated with the + # task. To return the payloads in the + # {::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse response}, set + # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#response_view response_view} + # to {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL}. + # + # A maximum of 10 qps of + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#lease_tasks LeaseTasks} requests are + # allowed per queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] + # is returned when this limit is + # exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] + # is also returned when + # {::Google::Cloud::Tasks::V2beta2::RateLimits#max_tasks_dispatched_per_second max_tasks_dispatched_per_second} + # is exceeded. + # + # @overload lease_tasks(request, options = nil) + # Pass arguments to `lease_tasks` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload lease_tasks(parent: nil, max_tasks: nil, lease_duration: nil, response_view: nil, filter: nil) + # Pass arguments to `lease_tasks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # @param max_tasks [::Integer] + # The maximum number of tasks to lease. + # + # The system will make a best effort to return as close to as + # `max_tasks` as possible. + # + # The largest that `max_tasks` can be is 1000. + # + # The maximum total size of a [lease tasks + # response][google.cloud.tasks.v2beta2.LeaseTasksResponse] is 32 MB. If the + # sum of all task sizes requested reaches this limit, fewer tasks than + # requested are returned. + # @param lease_duration [::Google::Protobuf::Duration, ::Hash] + # Required. The duration of the lease. + # + # Each task returned in the + # {::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse response} will have its + # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} set to the + # current time plus the `lease_duration`. The task is leased until its + # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}; thus, the + # task will not be returned to another + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#lease_tasks LeaseTasks} call before + # its {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}. + # + # + # After the worker has successfully finished the work associated + # with the task, the worker must call via + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#acknowledge_task AcknowledgeTask} + # before the {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}. + # Otherwise the task will be returned to a later + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#lease_tasks LeaseTasks} call so that + # another worker can retry it. + # + # The maximum lease duration is 1 week. + # `lease_duration` will be truncated to the nearest second. + # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. + # @param filter [::String] + # `filter` can be used to specify a subset of tasks to lease. + # + # When `filter` is set to `tag=` then the + # {::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse response} will contain only + # tasks whose {::Google::Cloud::Tasks::V2beta2::PullMessage#tag tag} is equal to + # ``. `` must be less than 500 characters. + # + # When `filter` is set to `tag_function=oldest_tag()`, only tasks which have + # the same tag as the task with the oldest + # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} will be + # returned. + # + # Grammar Syntax: + # + # * `filter = "tag=" tag | "tag_function=" function` + # + # * `tag = string` + # + # * `function = "oldest_tag()"` + # + # The `oldest_tag()` function returns tasks which have the same tag as the + # oldest task (ordered by schedule time). + # + # SDK compatibility: Although the SDK allows tags to be either + # string or + # [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + # only UTF-8 encoded tags can be used in Cloud Tasks. Tag which + # aren't UTF-8 encoded can't be used in the + # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#filter filter} and the + # task's {::Google::Cloud::Tasks::V2beta2::PullMessage#tag tag} will be displayed + # as empty in Cloud Tasks. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::LeaseTasksRequest.new + # + # # Call the lease_tasks method. + # result = client.lease_tasks request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta2::LeaseTasksResponse. + # p result + # + def lease_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.lease_tasks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.lease_tasks.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.lease_tasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.lease_tasks request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Acknowledges a pull task. + # + # The worker, that is, the entity that + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#lease_tasks leased} this task must + # call this method to indicate that the work associated with the task has + # finished. + # + # The worker must acknowledge a task within the + # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#lease_duration lease_duration} + # or the lease will expire and the task will become available to be leased + # again. After the task is acknowledged, it will not be returned + # by a later {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#lease_tasks LeaseTasks}, + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#get_task GetTask}, or + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#list_tasks ListTasks}. + # + # @overload acknowledge_task(request, options = nil) + # Pass arguments to `acknowledge_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload acknowledge_task(name: nil, schedule_time: nil) + # Pass arguments to `acknowledge_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @param schedule_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. The task's current schedule time, available in the + # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#lease_tasks LeaseTasks} response or + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#renew_lease RenewLease} response. + # This restriction is to ensure that your worker currently holds the lease. + # @yield [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/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest.new + # + # # Call the acknowledge_task method. + # result = client.acknowledge_task request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def acknowledge_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.acknowledge_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.acknowledge_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.acknowledge_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.acknowledge_task request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Renew the current lease of a pull task. + # + # The worker can use this method to extend the lease by a new + # duration, starting from now. The new task lease will be + # returned in the task's + # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}. + # + # @overload renew_lease(request, options = nil) + # Pass arguments to `renew_lease` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload renew_lease(name: nil, schedule_time: nil, lease_duration: nil, response_view: nil) + # Pass arguments to `renew_lease` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @param schedule_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. The task's current schedule time, available in the + # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#lease_tasks LeaseTasks} response or + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#renew_lease RenewLease} response. + # This restriction is to ensure that your worker currently holds the lease. + # @param lease_duration [::Google::Protobuf::Duration, ::Hash] + # Required. The desired new lease duration, starting from now. + # + # + # The maximum lease duration is 1 week. + # `lease_duration` will be truncated to the nearest second. + # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Task] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::RenewLeaseRequest.new + # + # # Call the renew_lease method. + # result = client.renew_lease request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. + # p result + # + def renew_lease request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.renew_lease.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.renew_lease.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.renew_lease.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.renew_lease request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Cancel a pull task's lease. + # + # The worker can use this method to cancel a task's lease by + # setting its {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} + # to now. This will make the task available to be leased to the next caller + # of {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#lease_tasks LeaseTasks}. + # + # @overload cancel_lease(request, options = nil) + # Pass arguments to `cancel_lease` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lease(name: nil, schedule_time: nil, response_view: nil) + # Pass arguments to `cancel_lease` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @param schedule_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. The task's current schedule time, available in the + # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#lease_tasks LeaseTasks} response or + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#renew_lease RenewLease} response. + # This restriction is to ensure that your worker currently holds the lease. + # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Task] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::CancelLeaseRequest.new + # + # # Call the cancel_lease method. + # result = client.cancel_lease request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. + # p result + # + def cancel_lease request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest + + # Converts hash and nil to an 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_lease.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_lease.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_lease.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.cancel_lease request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Forces a task to run now. + # + # When this method is called, Cloud Tasks will dispatch the task, even if + # the task is already running, the queue has reached its + # {::Google::Cloud::Tasks::V2beta2::RateLimits RateLimits} or is + # {::Google::Cloud::Tasks::V2beta2::Queue::State::PAUSED PAUSED}. + # + # This command is meant to be used for manual debugging. For + # example, {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#run_task RunTask} can be + # used to retry a failed task after a fix has been made or to manually force + # a task to be dispatched now. + # + # The dispatched task is returned. That is, the task that is returned + # contains the {::Google::Cloud::Tasks::V2beta2::Task#status status} after the + # task is dispatched but before the task is received by its target. + # + # If Cloud Tasks receives a successful response from the task's + # target, then the task will be deleted; otherwise the task's + # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} will be + # reset to the time that + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#run_task RunTask} was called plus + # the retry delay specified in the queue's + # {::Google::Cloud::Tasks::V2beta2::RetryConfig RetryConfig}. + # + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#run_task RunTask} returns + # [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a + # task that has already succeeded or permanently failed. + # + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#run_task RunTask} cannot be called + # on a {::Google::Cloud::Tasks::V2beta2::PullMessage pull task}. + # + # @overload run_task(request, options = nil) + # Pass arguments to `run_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta2::RunTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta2::RunTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload run_task(name: nil, response_view: nil) + # Pass arguments to `run_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Task] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta2::RunTaskRequest.new + # + # # Call the run_task method. + # result = client.run_task request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. + # p result + # + def run_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::RunTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.run_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.run_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.run_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.run_task request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CloudTasks REST API. + # + # This class represents the configuration for CloudTasks 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::Tasks::V2beta2::CloudTasks::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_queues to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_queues.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_queues.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 = "cloudtasks.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 CloudTasks 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_queues` + # @return [::Gapic::Config::Method] + # + attr_reader :list_queues + ## + # RPC-specific configuration for `get_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :get_queue + ## + # RPC-specific configuration for `create_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :create_queue + ## + # RPC-specific configuration for `update_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :update_queue + ## + # RPC-specific configuration for `delete_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_queue + ## + # RPC-specific configuration for `purge_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :purge_queue + ## + # RPC-specific configuration for `pause_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :pause_queue + ## + # RPC-specific configuration for `resume_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :resume_queue + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `list_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tasks + ## + # RPC-specific configuration for `get_task` + # @return [::Gapic::Config::Method] + # + attr_reader :get_task + ## + # RPC-specific configuration for `create_task` + # @return [::Gapic::Config::Method] + # + attr_reader :create_task + ## + # RPC-specific configuration for `delete_task` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_task + ## + # RPC-specific configuration for `lease_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :lease_tasks + ## + # RPC-specific configuration for `acknowledge_task` + # @return [::Gapic::Config::Method] + # + attr_reader :acknowledge_task + ## + # RPC-specific configuration for `renew_lease` + # @return [::Gapic::Config::Method] + # + attr_reader :renew_lease + ## + # RPC-specific configuration for `cancel_lease` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_lease + ## + # RPC-specific configuration for `run_task` + # @return [::Gapic::Config::Method] + # + attr_reader :run_task + + # @private + def initialize parent_rpcs = nil + list_queues_config = parent_rpcs.list_queues if parent_rpcs.respond_to? :list_queues + @list_queues = ::Gapic::Config::Method.new list_queues_config + get_queue_config = parent_rpcs.get_queue if parent_rpcs.respond_to? :get_queue + @get_queue = ::Gapic::Config::Method.new get_queue_config + create_queue_config = parent_rpcs.create_queue if parent_rpcs.respond_to? :create_queue + @create_queue = ::Gapic::Config::Method.new create_queue_config + update_queue_config = parent_rpcs.update_queue if parent_rpcs.respond_to? :update_queue + @update_queue = ::Gapic::Config::Method.new update_queue_config + delete_queue_config = parent_rpcs.delete_queue if parent_rpcs.respond_to? :delete_queue + @delete_queue = ::Gapic::Config::Method.new delete_queue_config + purge_queue_config = parent_rpcs.purge_queue if parent_rpcs.respond_to? :purge_queue + @purge_queue = ::Gapic::Config::Method.new purge_queue_config + pause_queue_config = parent_rpcs.pause_queue if parent_rpcs.respond_to? :pause_queue + @pause_queue = ::Gapic::Config::Method.new pause_queue_config + resume_queue_config = parent_rpcs.resume_queue if parent_rpcs.respond_to? :resume_queue + @resume_queue = ::Gapic::Config::Method.new resume_queue_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks + @list_tasks = ::Gapic::Config::Method.new list_tasks_config + get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task + @get_task = ::Gapic::Config::Method.new get_task_config + create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task + @create_task = ::Gapic::Config::Method.new create_task_config + delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task + @delete_task = ::Gapic::Config::Method.new delete_task_config + lease_tasks_config = parent_rpcs.lease_tasks if parent_rpcs.respond_to? :lease_tasks + @lease_tasks = ::Gapic::Config::Method.new lease_tasks_config + acknowledge_task_config = parent_rpcs.acknowledge_task if parent_rpcs.respond_to? :acknowledge_task + @acknowledge_task = ::Gapic::Config::Method.new acknowledge_task_config + renew_lease_config = parent_rpcs.renew_lease if parent_rpcs.respond_to? :renew_lease + @renew_lease = ::Gapic::Config::Method.new renew_lease_config + cancel_lease_config = parent_rpcs.cancel_lease if parent_rpcs.respond_to? :cancel_lease + @cancel_lease = ::Gapic::Config::Method.new cancel_lease_config + run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task + @run_task = ::Gapic::Config::Method.new run_task_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/rest/service_stub.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/rest/service_stub.rb new file mode 100644 index 000000000000..f7a7c052bb3f --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/rest/service_stub.rb @@ -0,0 +1,1315 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/tasks/v2beta2/cloudtasks_pb" + +module Google + module Cloud + module Tasks + module V2beta2 + module CloudTasks + module Rest + ## + # REST service stub for the CloudTasks 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_queues REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::ListQueuesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::ListQueuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::ListQueuesResponse] + # A result object deserialized from the server's reply + def list_queues request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_queues_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_queues", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2beta2::ListQueuesResponse.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_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::GetQueueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Queue] + # A result object deserialized from the server's reply + def get_queue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_queue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_queue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2beta2::Queue.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_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::CreateQueueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Queue] + # A result object deserialized from the server's reply + def create_queue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_queue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_queue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2beta2::Queue.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_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Queue] + # A result object deserialized from the server's reply + def update_queue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_queue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_queue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2beta2::Queue.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_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_queue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_queue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_queue", + 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 purge_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Queue] + # A result object deserialized from the server's reply + def purge_queue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_purge_queue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "purge_queue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2beta2::Queue.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the pause_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::PauseQueueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Queue] + # A result object deserialized from the server's reply + def pause_queue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_pause_queue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "pause_queue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2beta2::Queue.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the resume_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Queue] + # A result object deserialized from the server's reply + def resume_queue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_resume_queue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "resume_queue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2beta2::Queue.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_tasks REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::ListTasksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::ListTasksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::ListTasksResponse] + # A result object deserialized from the server's reply + def list_tasks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_tasks_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_tasks", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2beta2::ListTasksResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::GetTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Task] + # A result object deserialized from the server's reply + def get_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_task", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2beta2::Task.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::CreateTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Task] + # A result object deserialized from the server's reply + def create_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_task", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2beta2::Task.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_task", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::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 lease_tasks REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse] + # A result object deserialized from the server's reply + def lease_tasks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_lease_tasks_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "lease_tasks", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the acknowledge_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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 acknowledge_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_acknowledge_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "acknowledge_task", + 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 renew_lease REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Task] + # A result object deserialized from the server's reply + def renew_lease request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_renew_lease_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "renew_lease", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2beta2::Task.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_lease REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Task] + # A result object deserialized from the server's reply + def cancel_lease request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_cancel_lease_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_lease", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2beta2::Task.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the run_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::RunTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta2::Task] + # A result object deserialized from the server's reply + def run_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_run_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "run_task", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2beta2::Task.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_queues REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::ListQueuesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_queues_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2beta2/{parent}/queues", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::GetQueueRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_queue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::CreateQueueRequest] + # 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_queue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2beta2/{parent}/queues", + body: "queue", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest] + # 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_queue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2beta2/{queue.name}", + body: "queue", + matches: [ + ["queue.name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest] + # 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_queue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the purge_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_purge_queue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2beta2/{name}:purge", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the pause_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::PauseQueueRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_pause_queue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2beta2/{name}:pause", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the resume_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_resume_queue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2beta2/{name}:resume", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, 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: :post, + uri_template: "/v2beta2/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, 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: "/v2beta2/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, 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: "/v2beta2/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_tasks REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::ListTasksRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_tasks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2beta2/{parent}/tasks", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::GetTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::CreateTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2beta2/{parent}/tasks", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the lease_tasks REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_lease_tasks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2beta2/{parent}/tasks:lease", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the acknowledge_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_acknowledge_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2beta2/{name}:acknowledge", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the renew_lease REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_renew_lease_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2beta2/{name}:renewLease", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_lease REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest] + # 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_lease_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2beta2/{name}:cancelLease", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the run_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta2::RunTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_run_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2beta2/{name}:run", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloudtasks_pb.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloudtasks_pb.rb new file mode 100644 index 000000000000..eaa41069c36a --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloudtasks_pb.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/tasks/v2beta2/cloudtasks.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/httpbody_pb' +require 'google/api/resource_pb' +require 'google/cloud/tasks/v2beta2/queue_pb' +require 'google/cloud/tasks/v2beta2/task_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_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/tasks/v2beta2/cloudtasks.proto\x12\x1agoogle.cloud.tasks.v2beta2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/httpbody.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/tasks/v2beta2/queue.proto\x1a%google/cloud/tasks/v2beta2/task.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb7\x01\n\x11ListQueuesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudtasks.googleapis.com/Queue\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\x12\x32\n\tread_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"`\n\x12ListQueuesResponse\x12\x31\n\x06queues\x18\x01 \x03(\x0b\x32!.google.cloud.tasks.v2beta2.Queue\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"|\n\x0fGetQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\x12\x32\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x84\x01\n\x12\x43reateQueueRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudtasks.googleapis.com/Queue\x12\x35\n\x05queue\x18\x02 \x01(\x0b\x32!.google.cloud.tasks.v2beta2.QueueB\x03\xe0\x41\x02\"|\n\x12UpdateQueueRequest\x12\x35\n\x05queue\x18\x01 \x01(\x0b\x32!.google.cloud.tasks.v2beta2.QueueB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"K\n\x12\x44\x65leteQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"J\n\x11PurgeQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"J\n\x11PauseQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"K\n\x12ResumeQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"i\n\x16UploadQueueYamlRequest\x12\x13\n\x06\x61pp_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12,\n\thttp_body\x18\x02 \x01(\x0b\x32\x14.google.api.HttpBodyH\x00\x88\x01\x01\x42\x0c\n\n_http_body\"\xaf\x01\n\x10ListTasksRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x63loudtasks.googleapis.com/Task\x12<\n\rresponse_view\x18\x02 \x01(\x0e\x32%.google.cloud.tasks.v2beta2.Task.View\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x05 \x01(\t\"]\n\x11ListTasksResponse\x12/\n\x05tasks\x18\x01 \x03(\x0b\x32 .google.cloud.tasks.v2beta2.Task\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x84\x01\n\x0eGetTaskRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudtasks.googleapis.com/Task\x12<\n\rresponse_view\x18\x02 \x01(\x0e\x32%.google.cloud.tasks.v2beta2.Task.View\"\xbe\x01\n\x11\x43reateTaskRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x63loudtasks.googleapis.com/Task\x12\x33\n\x04task\x18\x02 \x01(\x0b\x32 .google.cloud.tasks.v2beta2.TaskB\x03\xe0\x41\x02\x12<\n\rresponse_view\x18\x03 \x01(\x0e\x32%.google.cloud.tasks.v2beta2.Task.View\"I\n\x11\x44\x65leteTaskRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudtasks.googleapis.com/Task\"\xe4\x01\n\x11LeaseTasksRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x63loudtasks.googleapis.com/Task\x12\x11\n\tmax_tasks\x18\x02 \x01(\x05\x12\x36\n\x0elease_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12<\n\rresponse_view\x18\x04 \x01(\x0e\x32%.google.cloud.tasks.v2beta2.Task.View\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"E\n\x12LeaseTasksResponse\x12/\n\x05tasks\x18\x01 \x03(\x0b\x32 .google.cloud.tasks.v2beta2.Task\"\x86\x01\n\x16\x41\x63knowledgeTaskRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudtasks.googleapis.com/Task\x12\x36\n\rschedule_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"\xf7\x01\n\x11RenewLeaseRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudtasks.googleapis.com/Task\x12\x36\n\rschedule_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x36\n\x0elease_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12<\n\rresponse_view\x18\x04 \x01(\x0e\x32%.google.cloud.tasks.v2beta2.Task.View\"\xc0\x01\n\x12\x43\x61ncelLeaseRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudtasks.googleapis.com/Task\x12\x36\n\rschedule_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12<\n\rresponse_view\x18\x03 \x01(\x0e\x32%.google.cloud.tasks.v2beta2.Task.View\"\x84\x01\n\x0eRunTaskRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudtasks.googleapis.com/Task\x12<\n\rresponse_view\x18\x02 \x01(\x0e\x32%.google.cloud.tasks.v2beta2.Task.View2\xb5\x1d\n\nCloudTasks\x12\xad\x01\n\nListQueues\x12-.google.cloud.tasks.v2beta2.ListQueuesRequest\x1a..google.cloud.tasks.v2beta2.ListQueuesResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v2beta2/{parent=projects/*/locations/*}/queues\x12\x9a\x01\n\x08GetQueue\x12+.google.cloud.tasks.v2beta2.GetQueueRequest\x1a!.google.cloud.tasks.v2beta2.Queue\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v2beta2/{name=projects/*/locations/*/queues/*}\x12\xaf\x01\n\x0b\x43reateQueue\x12..google.cloud.tasks.v2beta2.CreateQueueRequest\x1a!.google.cloud.tasks.v2beta2.Queue\"M\xda\x41\x0cparent,queue\x82\xd3\xe4\x93\x02\x38\"//v2beta2/{parent=projects/*/locations/*}/queues:\x05queue\x12\xba\x01\n\x0bUpdateQueue\x12..google.cloud.tasks.v2beta2.UpdateQueueRequest\x1a!.google.cloud.tasks.v2beta2.Queue\"X\xda\x41\x11queue,update_mask\x82\xd3\xe4\x93\x02>25/v2beta2/{queue.name=projects/*/locations/*/queues/*}:\x05queue\x12\x95\x01\n\x0b\x44\x65leteQueue\x12..google.cloud.tasks.v2beta2.DeleteQueueRequest\x1a\x16.google.protobuf.Empty\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v2beta2/{name=projects/*/locations/*/queues/*}\x12\xa7\x01\n\nPurgeQueue\x12-.google.cloud.tasks.v2beta2.PurgeQueueRequest\x1a!.google.cloud.tasks.v2beta2.Queue\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/v2beta2/{name=projects/*/locations/*/queues/*}:purge:\x01*\x12\xa7\x01\n\nPauseQueue\x12-.google.cloud.tasks.v2beta2.PauseQueueRequest\x1a!.google.cloud.tasks.v2beta2.Queue\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/v2beta2/{name=projects/*/locations/*/queues/*}:pause:\x01*\x12\xaa\x01\n\x0bResumeQueue\x12..google.cloud.tasks.v2beta2.ResumeQueueRequest\x1a!.google.cloud.tasks.v2beta2.Queue\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\"6/v2beta2/{name=projects/*/locations/*/queues/*}:resume:\x01*\x12_\n\x0fUploadQueueYaml\x12\x32.google.cloud.tasks.v2beta2.UploadQueueYamlRequest\x1a\x16.google.protobuf.Empty\"\x00\x12\xa1\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"V\xda\x41\x08resource\x82\xd3\xe4\x93\x02\x45\"@/v2beta2/{resource=projects/*/locations/*/queues/*}:getIamPolicy:\x01*\x12\xa8\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"]\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02\x45\"@/v2beta2/{resource=projects/*/locations/*/queues/*}:setIamPolicy:\x01*\x12\xd3\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"h\xda\x41\x14resource,permissions\x82\xd3\xe4\x93\x02K\"F/v2beta2/{resource=projects/*/locations/*/queues/*}:testIamPermissions:\x01*\x12\xb2\x01\n\tListTasks\x12,.google.cloud.tasks.v2beta2.ListTasksRequest\x1a-.google.cloud.tasks.v2beta2.ListTasksResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v2beta2/{parent=projects/*/locations/*/queues/*}/tasks\x12\x9f\x01\n\x07GetTask\x12*.google.cloud.tasks.v2beta2.GetTaskRequest\x1a .google.cloud.tasks.v2beta2.Task\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}\x12\xaf\x01\n\nCreateTask\x12-.google.cloud.tasks.v2beta2.CreateTaskRequest\x1a .google.cloud.tasks.v2beta2.Task\"P\xda\x41\x0bparent,task\x82\xd3\xe4\x93\x02<\"7/v2beta2/{parent=projects/*/locations/*/queues/*}/tasks:\x01*\x12\x9b\x01\n\nDeleteTask\x12-.google.cloud.tasks.v2beta2.DeleteTaskRequest\x1a\x16.google.protobuf.Empty\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}\x12\xcd\x01\n\nLeaseTasks\x12-.google.cloud.tasks.v2beta2.LeaseTasksRequest\x1a..google.cloud.tasks.v2beta2.LeaseTasksResponse\"`\xda\x41\x15parent,lease_duration\x82\xd3\xe4\x93\x02\x42\"=/v2beta2/{parent=projects/*/locations/*/queues/*}/tasks:lease:\x01*\x12\xc2\x01\n\x0f\x41\x63knowledgeTask\x12\x32.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest\x1a\x16.google.protobuf.Empty\"c\xda\x41\x12name,schedule_time\x82\xd3\xe4\x93\x02H\"C/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:acknowledge:\x01*\x12\xd0\x01\n\nRenewLease\x12-.google.cloud.tasks.v2beta2.RenewLeaseRequest\x1a .google.cloud.tasks.v2beta2.Task\"q\xda\x41!name,schedule_time,lease_duration\x82\xd3\xe4\x93\x02G\"B/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:renewLease:\x01*\x12\xc4\x01\n\x0b\x43\x61ncelLease\x12..google.cloud.tasks.v2beta2.CancelLeaseRequest\x1a .google.cloud.tasks.v2beta2.Task\"c\xda\x41\x12name,schedule_time\x82\xd3\xe4\x93\x02H\"C/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:cancelLease:\x01*\x12\xa6\x01\n\x07RunTask\x12*.google.cloud.tasks.v2beta2.RunTaskRequest\x1a .google.cloud.tasks.v2beta2.Task\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\";/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:run:\x01*\x1aM\xca\x41\x19\x63loudtasks.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd0\x01\n\x1e\x63om.google.cloud.tasks.v2beta2B\x0f\x43loudTasksProtoP\x01ZCcloud.google.com/go/cloudtasks/apiv2beta2/cloudtaskspb;cloudtaskspb\xa2\x02\x05TASKS\xea\x41M\n\"cloudtasks.googleapis.com/Location\x12\'projects/{project}/locations/{location}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Tasks + module V2beta2 + ListQueuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.ListQueuesRequest").msgclass + ListQueuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.ListQueuesResponse").msgclass + GetQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.GetQueueRequest").msgclass + CreateQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.CreateQueueRequest").msgclass + UpdateQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.UpdateQueueRequest").msgclass + DeleteQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.DeleteQueueRequest").msgclass + PurgeQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.PurgeQueueRequest").msgclass + PauseQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.PauseQueueRequest").msgclass + ResumeQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.ResumeQueueRequest").msgclass + UploadQueueYamlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.UploadQueueYamlRequest").msgclass + ListTasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.ListTasksRequest").msgclass + ListTasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.ListTasksResponse").msgclass + GetTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.GetTaskRequest").msgclass + CreateTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.CreateTaskRequest").msgclass + DeleteTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.DeleteTaskRequest").msgclass + LeaseTasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.LeaseTasksRequest").msgclass + LeaseTasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.LeaseTasksResponse").msgclass + AcknowledgeTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.AcknowledgeTaskRequest").msgclass + RenewLeaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.RenewLeaseRequest").msgclass + CancelLeaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.CancelLeaseRequest").msgclass + RunTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.RunTaskRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloudtasks_services_pb.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloudtasks_services_pb.rb new file mode 100644 index 000000000000..a80defa38d7a --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloudtasks_services_pb.rb @@ -0,0 +1,274 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/tasks/v2beta2/cloudtasks.proto for package 'google.cloud.tasks.v2beta2' +# 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/tasks/v2beta2/cloudtasks_pb' + +module Google + module Cloud + module Tasks + module V2beta2 + module CloudTasks + # Cloud Tasks allows developers to manage the execution of background + # work in their applications. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.tasks.v2beta2.CloudTasks' + + # Lists queues. + # + # Queues are returned in lexicographical order. + rpc :ListQueues, ::Google::Cloud::Tasks::V2beta2::ListQueuesRequest, ::Google::Cloud::Tasks::V2beta2::ListQueuesResponse + # Gets a queue. + rpc :GetQueue, ::Google::Cloud::Tasks::V2beta2::GetQueueRequest, ::Google::Cloud::Tasks::V2beta2::Queue + # Creates a queue. + # + # Queues created with this method allow tasks to live for a maximum of 31 + # days. After a task is 31 days old, the task will be deleted regardless of + # whether it was dispatched or not. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + rpc :CreateQueue, ::Google::Cloud::Tasks::V2beta2::CreateQueueRequest, ::Google::Cloud::Tasks::V2beta2::Queue + # Updates a queue. + # + # This method creates the queue if it does not exist and updates + # the queue if it does exist. + # + # Queues created with this method allow tasks to live for a maximum of 31 + # days. After a task is 31 days old, the task will be deleted regardless of + # whether it was dispatched or not. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + rpc :UpdateQueue, ::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest, ::Google::Cloud::Tasks::V2beta2::Queue + # Deletes a queue. + # + # This command will delete the queue even if it has tasks in it. + # + # Note: If you delete a queue, a queue with the same name can't be created + # for 7 days. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + rpc :DeleteQueue, ::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest, ::Google::Protobuf::Empty + # Purges a queue by deleting all of its tasks. + # + # All tasks created before this method is called are permanently deleted. + # + # Purge operations can take up to one minute to take effect. Tasks + # might be dispatched before the purge takes effect. A purge is irreversible. + rpc :PurgeQueue, ::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest, ::Google::Cloud::Tasks::V2beta2::Queue + # Pauses the queue. + # + # If a queue is paused then the system will stop dispatching tasks + # until the queue is resumed via + # [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can + # still be added when the queue is paused. A queue is paused if its + # [state][google.cloud.tasks.v2beta2.Queue.state] is + # [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + rpc :PauseQueue, ::Google::Cloud::Tasks::V2beta2::PauseQueueRequest, ::Google::Cloud::Tasks::V2beta2::Queue + # Resume a queue. + # + # This method resumes a queue after it has been + # [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED] or + # [DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a + # queue is stored in the queue's + # [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method + # it will be set to + # [RUNNING][google.cloud.tasks.v2beta2.Queue.State.RUNNING]. + # + # WARNING: Resuming many high-QPS queues at the same time can + # lead to target overloading. If you are resuming high-QPS + # queues, follow the 500/50/5 pattern described in + # [Managing Cloud Tasks Scaling + # Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). + rpc :ResumeQueue, ::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest, ::Google::Cloud::Tasks::V2beta2::Queue + # Update queue list by uploading a queue.yaml file. + # + # The queue.yaml file is supplied in the request body as a YAML encoded + # string. This method was added to support gcloud clients versions before + # 322.0.0. New clients should use CreateQueue instead of this method. + rpc :UploadQueueYaml, ::Google::Cloud::Tasks::V2beta2::UploadQueueYamlRequest, ::Google::Protobuf::Empty + # Gets the access control policy for a + # [Queue][google.cloud.tasks.v2beta2.Queue]. Returns an empty policy if the + # resource exists and does not have a policy set. + # + # Authorization requires the following + # [Google IAM](https://cloud.google.com/iam) permission on the specified + # resource parent: + # + # * `cloudtasks.queues.getIamPolicy` + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Sets the access control policy for a + # [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any existing policy. + # + # Note: The Cloud Console does not check queue-level IAM permissions yet. + # Project-level permissions are required to use the Cloud Console. + # + # Authorization requires the following + # [Google IAM](https://cloud.google.com/iam) permission on the specified + # resource parent: + # + # * `cloudtasks.queues.setIamPolicy` + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Returns permissions that a caller has on a + # [Queue][google.cloud.tasks.v2beta2.Queue]. If the resource does not exist, + # this will return an empty set of permissions, not a + # [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + # + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + # Lists the tasks in a queue. + # + # By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] + # view is retrieved due to performance considerations; + # [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] + # controls the subset of information which is returned. + # + # The tasks may be returned in any order. The ordering may change at any + # time. + rpc :ListTasks, ::Google::Cloud::Tasks::V2beta2::ListTasksRequest, ::Google::Cloud::Tasks::V2beta2::ListTasksResponse + # Gets a task. + rpc :GetTask, ::Google::Cloud::Tasks::V2beta2::GetTaskRequest, ::Google::Cloud::Tasks::V2beta2::Task + # Creates a task and adds it to a queue. + # + # Tasks cannot be updated after creation; there is no UpdateTask command. + # + # * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], + # the maximum task size is + # 100KB. + # * For [pull queues][google.cloud.tasks.v2beta2.PullTarget], the maximum + # task size is 1MB. + rpc :CreateTask, ::Google::Cloud::Tasks::V2beta2::CreateTaskRequest, ::Google::Cloud::Tasks::V2beta2::Task + # Deletes a task. + # + # A task can be deleted if it is scheduled or dispatched. A task + # cannot be deleted if it has completed successfully or permanently + # failed. + rpc :DeleteTask, ::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest, ::Google::Protobuf::Empty + # Leases tasks from a pull queue for + # [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. + # + # This method is invoked by the worker to obtain a lease. The + # worker must acknowledge the task via + # [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] + # after they have performed the work associated with the task. + # + # The [payload][google.cloud.tasks.v2beta2.PullMessage.payload] is intended + # to store data that the worker needs to perform the work associated with the + # task. To return the payloads in the + # [response][google.cloud.tasks.v2beta2.LeaseTasksResponse], set + # [response_view][google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view] + # to [FULL][google.cloud.tasks.v2beta2.Task.View.FULL]. + # + # A maximum of 10 qps of + # [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] requests are + # allowed per queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] + # is returned when this limit is + # exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] + # is also returned when + # [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second] + # is exceeded. + rpc :LeaseTasks, ::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest, ::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse + # Acknowledges a pull task. + # + # The worker, that is, the entity that + # [leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must + # call this method to indicate that the work associated with the task has + # finished. + # + # The worker must acknowledge a task within the + # [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] + # or the lease will expire and the task will become available to be leased + # again. After the task is acknowledged, it will not be returned + # by a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks], + # [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or + # [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. + rpc :AcknowledgeTask, ::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest, ::Google::Protobuf::Empty + # Renew the current lease of a pull task. + # + # The worker can use this method to extend the lease by a new + # duration, starting from now. The new task lease will be + # returned in the task's + # [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + rpc :RenewLease, ::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest, ::Google::Cloud::Tasks::V2beta2::Task + # Cancel a pull task's lease. + # + # The worker can use this method to cancel a task's lease by + # setting its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] + # to now. This will make the task available to be leased to the next caller + # of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. + rpc :CancelLease, ::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest, ::Google::Cloud::Tasks::V2beta2::Task + # Forces a task to run now. + # + # When this method is called, Cloud Tasks will dispatch the task, even if + # the task is already running, the queue has reached its + # [RateLimits][google.cloud.tasks.v2beta2.RateLimits] or is + # [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + # + # This command is meant to be used for manual debugging. For + # example, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] can be + # used to retry a failed task after a fix has been made or to manually force + # a task to be dispatched now. + # + # The dispatched task is returned. That is, the task that is returned + # contains the [status][google.cloud.tasks.v2beta2.Task.status] after the + # task is dispatched but before the task is received by its target. + # + # If Cloud Tasks receives a successful response from the task's + # target, then the task will be deleted; otherwise the task's + # [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be + # reset to the time that + # [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was called plus + # the retry delay specified in the queue's + # [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig]. + # + # [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] returns + # [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a + # task that has already succeeded or permanently failed. + # + # [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called + # on a [pull task][google.cloud.tasks.v2beta2.PullMessage]. + rpc :RunTask, ::Google::Cloud::Tasks::V2beta2::RunTaskRequest, ::Google::Cloud::Tasks::V2beta2::Task + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/old_target_pb.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/old_target_pb.rb new file mode 100644 index 000000000000..ab3a3b82b28c --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/old_target_pb.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/tasks/v2beta2/old_target.proto + +require 'google/protobuf' + + +descriptor_data = "\n+google/cloud/tasks/v2beta2/old_target.proto\x12\x1agoogle.cloud.tasks.v2beta2Bw\n\x1e\x63om.google.cloud.tasks.v2beta2B\x0eOldTargetProtoP\x01ZCcloud.google.com/go/cloudtasks/apiv2beta2/cloudtaskspb;cloudtaskspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Tasks + module V2beta2 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/queue_pb.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/queue_pb.rb new file mode 100644 index 000000000000..f6e32f4bc0f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/queue_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/tasks/v2beta2/queue.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/tasks/v2beta2/target_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n&google/cloud/tasks/v2beta2/queue.proto\x12\x1agoogle.cloud.tasks.v2beta2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\'google/cloud/tasks/v2beta2/target.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x99\x06\n\x05Queue\x12\x0c\n\x04name\x18\x01 \x01(\t\x12Q\n\x16\x61pp_engine_http_target\x18\x03 \x01(\x0b\x32/.google.cloud.tasks.v2beta2.AppEngineHttpTargetH\x00\x12=\n\x0bpull_target\x18\x04 \x01(\x0b\x32&.google.cloud.tasks.v2beta2.PullTargetH\x00\x12=\n\x0bhttp_target\x18\x11 \x01(\x0b\x32&.google.cloud.tasks.v2beta2.HttpTargetH\x00\x12;\n\x0brate_limits\x18\x05 \x01(\x0b\x32&.google.cloud.tasks.v2beta2.RateLimits\x12=\n\x0cretry_config\x18\x06 \x01(\x0b\x32\'.google.cloud.tasks.v2beta2.RetryConfig\x12\x36\n\x05state\x18\x07 \x01(\x0e\x32\'.google.cloud.tasks.v2beta2.Queue.State\x12.\n\npurge_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12+\n\x08task_ttl\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x30\n\rtombstone_ttl\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12:\n\x05stats\x18\x10 \x01(\x0b\x32&.google.cloud.tasks.v2beta2.QueueStatsB\x03\xe0\x41\x03\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\n\n\x06PAUSED\x10\x02\x12\x0c\n\x08\x44ISABLED\x10\x03:\\\xea\x41Y\n\x1f\x63loudtasks.googleapis.com/Queue\x12\x36projects/{project}/locations/{location}/queues/{queue}B\r\n\x0btarget_type\"k\n\nRateLimits\x12\'\n\x1fmax_tasks_dispatched_per_second\x18\x01 \x01(\x01\x12\x16\n\x0emax_burst_size\x18\x02 \x01(\x05\x12\x1c\n\x14max_concurrent_tasks\x18\x03 \x01(\x05\"\x81\x02\n\x0bRetryConfig\x12\x16\n\x0cmax_attempts\x18\x01 \x01(\x05H\x00\x12\x1c\n\x12unlimited_attempts\x18\x02 \x01(\x08H\x00\x12\x35\n\x12max_retry_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\x0bmin_backoff\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\x0bmax_backoff\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\rmax_doublings\x18\x06 \x01(\x05\x42\x0e\n\x0cnum_attempts\"\xe8\x01\n\nQueueStats\x12\x18\n\x0btasks_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x46\n\x1doldest_estimated_arrival_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\'\n\x1a\x65xecuted_last_minute_count\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12(\n\x1b\x63oncurrent_dispatches_count\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12%\n\x18\x65\x66\x66\x65\x63tive_execution_rate\x18\x05 \x01(\x01\x42\x03\xe0\x41\x03\x42s\n\x1e\x63om.google.cloud.tasks.v2beta2B\nQueueProtoP\x01ZCcloud.google.com/go/cloudtasks/apiv2beta2/cloudtaskspb;cloudtaskspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Tasks + module V2beta2 + Queue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.Queue").msgclass + Queue::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.Queue.State").enummodule + RateLimits = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.RateLimits").msgclass + RetryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.RetryConfig").msgclass + QueueStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.QueueStats").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/rest.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/rest.rb new file mode 100644 index 000000000000..d3a2ea31d304 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/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/tasks/v2beta2/cloud_tasks/rest" +require "google/cloud/tasks/v2beta2/bindings_override" +require "google/cloud/tasks/v2beta2/version" + +module Google + module Cloud + module Tasks + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/tasks/v2beta2/rest" + # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new + # + module V2beta2 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/target_pb.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/target_pb.rb new file mode 100644 index 000000000000..ef539b5091f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/target_pb.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/tasks/v2beta2/target.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n\'google/cloud/tasks/v2beta2/target.proto\x12\x1agoogle.cloud.tasks.v2beta2\x1a\x1fgoogle/api/field_behavior.proto\"\x0c\n\nPullTarget\"+\n\x0bPullMessage\x12\x0f\n\x07payload\x18\x01 \x01(\x0c\x12\x0b\n\x03tag\x18\x02 \x01(\t\"h\n\x13\x41ppEngineHttpTarget\x12Q\n\x1b\x61pp_engine_routing_override\x18\x01 \x01(\x0b\x32,.google.cloud.tasks.v2beta2.AppEngineRouting\"\xc4\x02\n\x14\x41ppEngineHttpRequest\x12;\n\x0bhttp_method\x18\x01 \x01(\x0e\x32&.google.cloud.tasks.v2beta2.HttpMethod\x12H\n\x12\x61pp_engine_routing\x18\x02 \x01(\x0b\x32,.google.cloud.tasks.v2beta2.AppEngineRouting\x12\x14\n\x0crelative_url\x18\x03 \x01(\t\x12N\n\x07headers\x18\x04 \x03(\x0b\x32=.google.cloud.tasks.v2beta2.AppEngineHttpRequest.HeadersEntry\x12\x0f\n\x07payload\x18\x05 \x01(\x0c\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"T\n\x10\x41ppEngineRouting\x12\x0f\n\x07service\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x10\n\x08instance\x18\x03 \x01(\t\x12\x0c\n\x04host\x18\x04 \x01(\t\"\xf5\x02\n\x0bHttpRequest\x12\x10\n\x03url\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\x0bhttp_method\x18\x02 \x01(\x0e\x32&.google.cloud.tasks.v2beta2.HttpMethod\x12\x45\n\x07headers\x18\x03 \x03(\x0b\x32\x34.google.cloud.tasks.v2beta2.HttpRequest.HeadersEntry\x12\x0c\n\x04\x62ody\x18\x04 \x01(\x0c\x12=\n\x0boauth_token\x18\x05 \x01(\x0b\x32&.google.cloud.tasks.v2beta2.OAuthTokenH\x00\x12;\n\noidc_token\x18\x06 \x01(\x0b\x32%.google.cloud.tasks.v2beta2.OidcTokenH\x00\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x16\n\x14\x61uthorization_header\"\x1c\n\x0cPathOverride\x12\x0c\n\x04path\x18\x01 \x01(\t\"%\n\rQueryOverride\x12\x14\n\x0cquery_params\x18\x01 \x01(\t\"\x97\x04\n\x0bUriOverride\x12\x43\n\x06scheme\x18\x01 \x01(\x0e\x32..google.cloud.tasks.v2beta2.UriOverride.SchemeH\x00\x88\x01\x01\x12\x11\n\x04host\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04port\x18\x03 \x01(\x03H\x02\x88\x01\x01\x12?\n\rpath_override\x18\x04 \x01(\x0b\x32(.google.cloud.tasks.v2beta2.PathOverride\x12\x41\n\x0equery_override\x18\x05 \x01(\x0b\x32).google.cloud.tasks.v2beta2.QueryOverride\x12\x61\n\x19uri_override_enforce_mode\x18\x06 \x01(\x0e\x32>.google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode\"5\n\x06Scheme\x12\x16\n\x12SCHEME_UNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"b\n\x16UriOverrideEnforceMode\x12)\n%URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED\x10\x00\x12\x11\n\rIF_NOT_EXISTS\x10\x01\x12\n\n\x06\x41LWAYS\x10\x02\x42\t\n\x07_schemeB\x07\n\x05_hostB\x07\n\x05_port\"\xe4\x03\n\nHttpTarget\x12=\n\x0curi_override\x18\x01 \x01(\x0b\x32\'.google.cloud.tasks.v2beta2.UriOverride\x12;\n\x0bhttp_method\x18\x02 \x01(\x0e\x32&.google.cloud.tasks.v2beta2.HttpMethod\x12O\n\x10header_overrides\x18\x03 \x03(\x0b\x32\x35.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride\x12=\n\x0boauth_token\x18\x05 \x01(\x0b\x32&.google.cloud.tasks.v2beta2.OAuthTokenH\x00\x12;\n\noidc_token\x18\x06 \x01(\x0b\x32%.google.cloud.tasks.v2beta2.OidcTokenH\x00\x1a$\n\x06Header\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x1aO\n\x0eHeaderOverride\x12=\n\x06header\x18\x01 \x01(\x0b\x32-.google.cloud.tasks.v2beta2.HttpTarget.HeaderB\x16\n\x14\x61uthorization_header\":\n\nOAuthToken\x12\x1d\n\x15service_account_email\x18\x01 \x01(\t\x12\r\n\x05scope\x18\x02 \x01(\t\"<\n\tOidcToken\x12\x1d\n\x15service_account_email\x18\x01 \x01(\t\x12\x10\n\x08\x61udience\x18\x02 \x01(\t*s\n\nHttpMethod\x12\x1b\n\x17HTTP_METHOD_UNSPECIFIED\x10\x00\x12\x08\n\x04POST\x10\x01\x12\x07\n\x03GET\x10\x02\x12\x08\n\x04HEAD\x10\x03\x12\x07\n\x03PUT\x10\x04\x12\n\n\x06\x44\x45LETE\x10\x05\x12\t\n\x05PATCH\x10\x06\x12\x0b\n\x07OPTIONS\x10\x07\x42t\n\x1e\x63om.google.cloud.tasks.v2beta2B\x0bTargetProtoP\x01ZCcloud.google.com/go/cloudtasks/apiv2beta2/cloudtaskspb;cloudtaskspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Tasks + module V2beta2 + PullTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.PullTarget").msgclass + PullMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.PullMessage").msgclass + AppEngineHttpTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.AppEngineHttpTarget").msgclass + AppEngineHttpRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.AppEngineHttpRequest").msgclass + AppEngineRouting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.AppEngineRouting").msgclass + HttpRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.HttpRequest").msgclass + PathOverride = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.PathOverride").msgclass + QueryOverride = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.QueryOverride").msgclass + UriOverride = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.UriOverride").msgclass + UriOverride::Scheme = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.UriOverride.Scheme").enummodule + UriOverride::UriOverrideEnforceMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode").enummodule + HttpTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.HttpTarget").msgclass + HttpTarget::Header = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.HttpTarget.Header").msgclass + HttpTarget::HeaderOverride = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride").msgclass + OAuthToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.OAuthToken").msgclass + OidcToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.OidcToken").msgclass + HttpMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.HttpMethod").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/task_pb.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/task_pb.rb new file mode 100644 index 000000000000..3f7e4a0f93ae --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/task_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/tasks/v2beta2/task.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/tasks/v2beta2/target_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n%google/cloud/tasks/v2beta2/task.proto\x12\x1agoogle.cloud.tasks.v2beta2\x1a\x19google/api/resource.proto\x1a\'google/cloud/tasks/v2beta2/target.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xe9\x04\n\x04Task\x12\x0c\n\x04name\x18\x01 \x01(\t\x12S\n\x17\x61pp_engine_http_request\x18\x03 \x01(\x0b\x32\x30.google.cloud.tasks.v2beta2.AppEngineHttpRequestH\x00\x12?\n\x0cpull_message\x18\x04 \x01(\x0b\x32\'.google.cloud.tasks.v2beta2.PullMessageH\x00\x12?\n\x0chttp_request\x18\r \x01(\x0b\x32\'.google.cloud.tasks.v2beta2.HttpRequestH\x00\x12\x31\n\rschedule_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x06status\x18\x07 \x01(\x0b\x32&.google.cloud.tasks.v2beta2.TaskStatus\x12\x33\n\x04view\x18\x08 \x01(\x0e\x32%.google.cloud.tasks.v2beta2.Task.View\"1\n\x04View\x12\x14\n\x10VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02:h\xea\x41\x65\n\x1e\x63loudtasks.googleapis.com/Task\x12\x43projects/{project}/locations/{location}/queues/{queue}/tasks/{task}B\x0e\n\x0cpayload_type\"\xdd\x01\n\nTaskStatus\x12\x1e\n\x16\x61ttempt_dispatch_count\x18\x01 \x01(\x05\x12\x1e\n\x16\x61ttempt_response_count\x18\x02 \x01(\x05\x12G\n\x14\x66irst_attempt_status\x18\x03 \x01(\x0b\x32).google.cloud.tasks.v2beta2.AttemptStatus\x12\x46\n\x13last_attempt_status\x18\x04 \x01(\x0b\x32).google.cloud.tasks.v2beta2.AttemptStatus\"\xd5\x01\n\rAttemptStatus\x12\x31\n\rschedule_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rdispatch_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rresponse_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12+\n\x0fresponse_status\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusBr\n\x1e\x63om.google.cloud.tasks.v2beta2B\tTaskProtoP\x01ZCcloud.google.com/go/cloudtasks/apiv2beta2/cloudtaskspb;cloudtaskspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Tasks + module V2beta2 + Task = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.Task").msgclass + Task::View = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.Task.View").enummodule + TaskStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.TaskStatus").msgclass + AttemptStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.AttemptStatus").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/version.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/version.rb new file mode 100644 index 000000000000..fb19c639de63 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/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 Tasks + module V2beta2 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/README.md b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/README.md new file mode 100644 index 000000000000..da33c0281ced --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Tasks V2beta2 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-tasks-v2beta2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # 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. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + # + # Example: + # + # 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 + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # 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 + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # 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 + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2/proto_docs/google/api/httpbody.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/httpbody.rb new file mode 100644 index 000000000000..938f7ac6b2fd --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/httpbody.rb @@ -0,0 +1,80 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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 + # Message that represents an arbitrary HTTP body. It should only be used for + # payload formats that can't be represented as JSON, such as raw binary or + # an HTML page. + # + # + # This message can be used both in streaming and non-streaming API methods in + # the request as well as the response. + # + # It can be used as a top-level request field, which is convenient if one + # wants to extract parameters from either the URL or HTTP template into the + # request fields and also want access to the raw HTTP body. + # + # Example: + # + # message GetResourceRequest { + # // A unique request id. + # string request_id = 1; + # + # // The raw HTTP body is bound to this field. + # google.api.HttpBody http_body = 2; + # + # } + # + # service ResourceService { + # rpc GetResource(GetResourceRequest) + # returns (google.api.HttpBody); + # rpc UpdateResource(google.api.HttpBody) + # returns (google.protobuf.Empty); + # + # } + # + # Example with streaming methods: + # + # service CaldavService { + # rpc GetCalendar(stream google.api.HttpBody) + # returns (stream google.api.HttpBody); + # rpc UpdateCalendar(stream google.api.HttpBody) + # returns (stream google.api.HttpBody); + # + # } + # + # Use of this type only changes how the request and response bodies are + # handled, all other features will continue to work unchanged. + # @!attribute [rw] content_type + # @return [::String] + # The HTTP Content-Type header value specifying the content type of the body. + # @!attribute [rw] data + # @return [::String] + # The HTTP request/response body as raw binary. + # @!attribute [rw] extensions + # @return [::Array<::Google::Protobuf::Any>] + # Application specific response metadata. Must be set in the first response + # for streaming APIs. + class HttpBody + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/cloudtasks.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/cloudtasks.rb new file mode 100644 index 000000000000..91f3d9930425 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/cloudtasks.rb @@ -0,0 +1,608 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Tasks + module V2beta2 + # Request message for + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_queues ListQueues}. + # @!attribute [rw] parent + # @return [::String] + # Required. The location name. + # For example: `projects/PROJECT_ID/locations/LOCATION_ID` + # @!attribute [rw] filter + # @return [::String] + # `filter` can be used to specify a subset of queues. Any + # {::Google::Cloud::Tasks::V2beta2::Queue Queue} field can be used as a filter and + # several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + # filter syntax is the same as described in [Stackdriver's Advanced Logs + # Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + # + # Sample filter "app_engine_http_target: *". + # + # Note that using filters might cause fewer queues than the + # requested_page size to be returned. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. + # + # The maximum page size is 9800. If unspecified, the page size will + # be the maximum. Fewer queues than requested might be returned, + # even if more queues exist; use the + # {::Google::Cloud::Tasks::V2beta2::ListQueuesResponse#next_page_token next_page_token} + # in the response to determine if more queues exist. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying the page of results to return. + # + # To request the first page results, page_token must be empty. To + # request the next page of results, page_token must be the value of + # {::Google::Cloud::Tasks::V2beta2::ListQueuesResponse#next_page_token next_page_token} + # returned from the previous call to + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_queues ListQueues} method. It + # is an error to switch the value of the + # {::Google::Cloud::Tasks::V2beta2::ListQueuesRequest#filter filter} while + # iterating through pages. + # @!attribute [rw] read_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Read mask is used for a more granular control over what the API + # returns. If the mask is not present all fields will be returned except + # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + # specified in the mask. + class ListQueuesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_queues ListQueues}. + # @!attribute [rw] queues + # @return [::Array<::Google::Cloud::Tasks::V2beta2::Queue>] + # The list of queues. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. + # + # To return the next page of results, call + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_queues ListQueues} with this + # value as the + # {::Google::Cloud::Tasks::V2beta2::ListQueuesRequest#page_token page_token}. + # + # If the next_page_token is empty, there are no more results. + # + # The page token is valid for only 2 hours. + class ListQueuesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#get_queue GetQueue}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the queue. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # @!attribute [rw] read_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Read mask is used for a more granular control over what the API + # returns. If the mask is not present all fields will be returned except + # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + # specified in the mask. + class GetQueueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_queue CreateQueue}. + # @!attribute [rw] parent + # @return [::String] + # Required. The location name in which the queue will be created. + # For example: `projects/PROJECT_ID/locations/LOCATION_ID` + # + # The list of allowed locations can be obtained by calling Cloud + # Tasks' implementation of + # [ListLocations][google.cloud.location.Locations.ListLocations]. + # @!attribute [rw] queue + # @return [::Google::Cloud::Tasks::V2beta2::Queue] + # Required. The queue to create. + # + # [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as + # an existing queue. + class CreateQueueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#update_queue UpdateQueue}. + # @!attribute [rw] queue + # @return [::Google::Cloud::Tasks::V2beta2::Queue] + # Required. The queue to create or update. + # + # The queue's {::Google::Cloud::Tasks::V2beta2::Queue#name name} must be + # specified. + # + # Output only fields cannot be modified using UpdateQueue. + # Any value specified for an output only field will be ignored. + # The queue's {::Google::Cloud::Tasks::V2beta2::Queue#name name} cannot be + # changed. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # A mask used to specify which fields of the queue are being updated. + # + # If empty, then all fields will be updated. + class UpdateQueueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#delete_queue DeleteQueue}. + # @!attribute [rw] name + # @return [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + class DeleteQueueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#purge_queue PurgeQueue}. + # @!attribute [rw] name + # @return [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + class PurgeQueueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#pause_queue PauseQueue}. + # @!attribute [rw] name + # @return [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + class PauseQueueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#resume_queue ResumeQueue}. + # @!attribute [rw] name + # @return [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + class ResumeQueueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#upload_queue_yaml UploadQueueYaml}. + # @!attribute [rw] app_id + # @return [::String] + # Required. The App ID is supplied as an HTTP parameter. Unlike internal + # usage of App ID, it does not include a region prefix. Rather, the App ID + # represents the Project ID against which to make the request. + # @!attribute [rw] http_body + # @return [::Google::Api::HttpBody] + # The http body contains the queue.yaml file which used to update queue lists + class UploadQueueYamlRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing tasks using + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_tasks ListTasks}. + # @!attribute [rw] parent + # @return [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # @!attribute [rw] response_view + # @return [::Google::Cloud::Tasks::V2beta2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum page size. + # + # Fewer tasks than requested might be returned, even if more tasks exist; use + # {::Google::Cloud::Tasks::V2beta2::ListTasksResponse#next_page_token next_page_token} + # in the response to determine if more tasks exist. + # + # The maximum page size is 1000. If unspecified, the page size will be the + # maximum. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying the page of results to return. + # + # To request the first page results, page_token must be empty. To + # request the next page of results, page_token must be the value of + # {::Google::Cloud::Tasks::V2beta2::ListTasksResponse#next_page_token next_page_token} + # returned from the previous call to + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_tasks ListTasks} method. + # + # The page token is valid for only 2 hours. + class ListTasksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing tasks using + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_tasks ListTasks}. + # @!attribute [rw] tasks + # @return [::Array<::Google::Cloud::Tasks::V2beta2::Task>] + # The list of tasks. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. + # + # To return the next page of results, call + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_tasks ListTasks} with this + # value as the + # {::Google::Cloud::Tasks::V2beta2::ListTasksRequest#page_token page_token}. + # + # If the next_page_token is empty, there are no more results. + class ListTasksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a task using + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#get_task GetTask}. + # @!attribute [rw] name + # @return [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @!attribute [rw] response_view + # @return [::Google::Cloud::Tasks::V2beta2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. + class GetTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task CreateTask}. + # @!attribute [rw] parent + # @return [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # + # The queue must already exist. + # @!attribute [rw] task + # @return [::Google::Cloud::Tasks::V2beta2::Task] + # Required. The task to add. + # + # Task names have the following format: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + # The user can optionally specify a task + # {::Google::Cloud::Tasks::V2beta2::Task#name name}. If a name is not specified + # then the system will generate a random unique task id, which will be set in + # the task returned in the {::Google::Cloud::Tasks::V2beta2::Task#name response}. + # + # If {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} is not + # set or is in the past then Cloud Tasks will set it to the current time. + # + # Task De-duplication: + # + # Explicitly specifying a task ID enables task de-duplication. If + # a task's ID is identical to that of an existing task or a task + # that was deleted or completed recently then the call will fail + # with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + # If the task's queue was created using Cloud Tasks, then another task with + # the same name can't be created for ~1 hour after the original task was + # deleted or completed. If the task's queue was created using queue.yaml or + # queue.xml, then another task with the same name can't be created + # for ~9 days after the original task was deleted or completed. + # + # Because there is an extra lookup cost to identify duplicate task + # names, these {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task CreateTask} + # calls have significantly increased latency. Using hashed strings for the + # task id or for the prefix of the task id is recommended. Choosing task ids + # that are sequential or have sequential prefixes, for example using a + # timestamp, causes an increase in latency and error rates in all + # task commands. The infrastructure relies on an approximately + # uniform distribution of task ids to store and serve tasks + # efficiently. + # @!attribute [rw] response_view + # @return [::Google::Cloud::Tasks::V2beta2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. + class CreateTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting a task using + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#delete_task DeleteTask}. + # @!attribute [rw] name + # @return [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + class DeleteTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for leasing tasks using + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks}. + # @!attribute [rw] parent + # @return [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # @!attribute [rw] max_tasks + # @return [::Integer] + # The maximum number of tasks to lease. + # + # The system will make a best effort to return as close to as + # `max_tasks` as possible. + # + # The largest that `max_tasks` can be is 1000. + # + # The maximum total size of a [lease tasks + # response][google.cloud.tasks.v2beta2.LeaseTasksResponse] is 32 MB. If the + # sum of all task sizes requested reaches this limit, fewer tasks than + # requested are returned. + # @!attribute [rw] lease_duration + # @return [::Google::Protobuf::Duration] + # Required. The duration of the lease. + # + # Each task returned in the + # {::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse response} will have its + # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} set to the + # current time plus the `lease_duration`. The task is leased until its + # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}; thus, the + # task will not be returned to another + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} call before + # its {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}. + # + # + # After the worker has successfully finished the work associated + # with the task, the worker must call via + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#acknowledge_task AcknowledgeTask} + # before the {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}. + # Otherwise the task will be returned to a later + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} call so that + # another worker can retry it. + # + # The maximum lease duration is 1 week. + # `lease_duration` will be truncated to the nearest second. + # @!attribute [rw] response_view + # @return [::Google::Cloud::Tasks::V2beta2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. + # @!attribute [rw] filter + # @return [::String] + # `filter` can be used to specify a subset of tasks to lease. + # + # When `filter` is set to `tag=` then the + # {::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse response} will contain only + # tasks whose {::Google::Cloud::Tasks::V2beta2::PullMessage#tag tag} is equal to + # ``. `` must be less than 500 characters. + # + # When `filter` is set to `tag_function=oldest_tag()`, only tasks which have + # the same tag as the task with the oldest + # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} will be + # returned. + # + # Grammar Syntax: + # + # * `filter = "tag=" tag | "tag_function=" function` + # + # * `tag = string` + # + # * `function = "oldest_tag()"` + # + # The `oldest_tag()` function returns tasks which have the same tag as the + # oldest task (ordered by schedule time). + # + # SDK compatibility: Although the SDK allows tags to be either + # string or + # [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + # only UTF-8 encoded tags can be used in Cloud Tasks. Tag which + # aren't UTF-8 encoded can't be used in the + # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#filter filter} and the + # task's {::Google::Cloud::Tasks::V2beta2::PullMessage#tag tag} will be displayed + # as empty in Cloud Tasks. + class LeaseTasksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for leasing tasks using + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks}. + # @!attribute [rw] tasks + # @return [::Array<::Google::Cloud::Tasks::V2beta2::Task>] + # The leased tasks. + class LeaseTasksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for acknowledging a task using + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#acknowledge_task AcknowledgeTask}. + # @!attribute [rw] name + # @return [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @!attribute [rw] schedule_time + # @return [::Google::Protobuf::Timestamp] + # Required. The task's current schedule time, available in the + # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} response or + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#renew_lease RenewLease} response. + # This restriction is to ensure that your worker currently holds the lease. + class AcknowledgeTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for renewing a lease using + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#renew_lease RenewLease}. + # @!attribute [rw] name + # @return [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @!attribute [rw] schedule_time + # @return [::Google::Protobuf::Timestamp] + # Required. The task's current schedule time, available in the + # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} response or + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#renew_lease RenewLease} response. + # This restriction is to ensure that your worker currently holds the lease. + # @!attribute [rw] lease_duration + # @return [::Google::Protobuf::Duration] + # Required. The desired new lease duration, starting from now. + # + # + # The maximum lease duration is 1 week. + # `lease_duration` will be truncated to the nearest second. + # @!attribute [rw] response_view + # @return [::Google::Cloud::Tasks::V2beta2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. + class RenewLeaseRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for canceling a lease using + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#cancel_lease CancelLease}. + # @!attribute [rw] name + # @return [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @!attribute [rw] schedule_time + # @return [::Google::Protobuf::Timestamp] + # Required. The task's current schedule time, available in the + # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} response or + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#renew_lease RenewLease} response. + # This restriction is to ensure that your worker currently holds the lease. + # @!attribute [rw] response_view + # @return [::Google::Cloud::Tasks::V2beta2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. + class CancelLeaseRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for forcing a task to run now using + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#run_task RunTask}. + # @!attribute [rw] name + # @return [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @!attribute [rw] response_view + # @return [::Google::Cloud::Tasks::V2beta2::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. + class RunTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/queue.rb new file mode 100644 index 000000000000..c00a2ec7be5e --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/queue.rb @@ -0,0 +1,448 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Tasks + module V2beta2 + # A queue is a container of related tasks. Queues are configured to manage + # how those tasks are dispatched. Configurable properties include rate limits, + # retry options, target types, and others. + # @!attribute [rw] name + # @return [::String] + # Caller-specified and required in + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_queue CreateQueue}, after + # which it becomes output only. + # + # The queue name. + # + # The queue name must have the following format: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # + # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + # hyphens (-), colons (:), or periods (.). + # For more information, see + # [Identifying + # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + # * `LOCATION_ID` is the canonical ID for the queue's location. + # The list of available locations can be obtained by calling + # [ListLocations][google.cloud.location.Locations.ListLocations]. + # For more information, see https://cloud.google.com/about/locations/. + # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + # hyphens (-). The maximum length is 100 characters. + # @!attribute [rw] app_engine_http_target + # @return [::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget] + # App Engine HTTP target. + # + # An App Engine queue is a queue that has an + # {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget AppEngineHttpTarget}. + # + # Note: The following fields are mutually exclusive: `app_engine_http_target`, `pull_target`, `http_target`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] pull_target + # @return [::Google::Cloud::Tasks::V2beta2::PullTarget] + # Pull target. + # + # A pull queue is a queue that has a + # {::Google::Cloud::Tasks::V2beta2::PullTarget PullTarget}. + # + # Note: The following fields are mutually exclusive: `pull_target`, `app_engine_http_target`, `http_target`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] http_target + # @return [::Google::Cloud::Tasks::V2beta2::HttpTarget] + # An http_target is used to override the target values for HTTP tasks. + # + # Note: The following fields are mutually exclusive: `http_target`, `app_engine_http_target`, `pull_target`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] rate_limits + # @return [::Google::Cloud::Tasks::V2beta2::RateLimits] + # Rate limits for task dispatches. + # + # {::Google::Cloud::Tasks::V2beta2::Queue#rate_limits rate_limits} and + # {::Google::Cloud::Tasks::V2beta2::Queue#retry_config retry_config} are related + # because they both control task attempts however they control how tasks are + # attempted in different ways: + # + # * {::Google::Cloud::Tasks::V2beta2::Queue#rate_limits rate_limits} controls the + # total rate of + # dispatches from a queue (i.e. all traffic dispatched from the + # queue, regardless of whether the dispatch is from a first + # attempt or a retry). + # * {::Google::Cloud::Tasks::V2beta2::Queue#retry_config retry_config} controls + # what happens to + # particular a task after its first attempt fails. That is, + # {::Google::Cloud::Tasks::V2beta2::Queue#retry_config retry_config} controls + # task retries (the second attempt, third attempt, etc). + # @!attribute [rw] retry_config + # @return [::Google::Cloud::Tasks::V2beta2::RetryConfig] + # Settings that determine the retry behavior. + # + # * For tasks created using Cloud Tasks: the queue-level retry settings + # apply to all tasks in the queue that were created using Cloud Tasks. + # Retry settings cannot be set on individual tasks. + # * For tasks created using the App Engine SDK: the queue-level retry + # settings apply to all tasks in the queue which do not have retry settings + # explicitly set on the task and were created by the App Engine SDK. See + # [App Engine + # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). + # @!attribute [rw] state + # @return [::Google::Cloud::Tasks::V2beta2::Queue::State] + # Output only. The state of the queue. + # + # `state` can only be changed by called + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#pause_queue PauseQueue}, + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#resume_queue ResumeQueue}, or + # uploading + # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#update_queue UpdateQueue} cannot be + # used to change `state`. + # @!attribute [rw] purge_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last time this queue was purged. + # + # All tasks that were {::Google::Cloud::Tasks::V2beta2::Task#create_time created} + # before this time were purged. + # + # A queue can be purged using + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#purge_queue PurgeQueue}, the [App + # Engine Task Queue SDK, or the Cloud + # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). + # + # Purge time will be truncated to the nearest microsecond. Purge + # time will be unset if the queue has never been purged. + # @!attribute [rw] task_ttl + # @return [::Google::Protobuf::Duration] + # The maximum amount of time that a task will be retained in + # this queue. + # + # Queues created by Cloud Tasks have a default `task_ttl` of 31 days. + # After a task has lived for `task_ttl`, the task will be deleted + # regardless of whether it was dispatched or not. + # + # The `task_ttl` for queues created via queue.yaml/xml is equal to the + # maximum duration because there is a + # [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for + # these queues. To view the maximum valid duration, see the documentation for + # {::Google::Protobuf::Duration Duration}. + # @!attribute [rw] tombstone_ttl + # @return [::Google::Protobuf::Duration] + # The task tombstone time to live (TTL). + # + # After a task is deleted or completed, the task's tombstone is + # retained for the length of time specified by `tombstone_ttl`. + # The tombstone is used by task de-duplication; another task with the same + # name can't be created until the tombstone has expired. For more information + # about task de-duplication, see the documentation for + # {::Google::Cloud::Tasks::V2beta2::CreateTaskRequest#task CreateTaskRequest}. + # + # Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour. + # @!attribute [r] stats + # @return [::Google::Cloud::Tasks::V2beta2::QueueStats] + # Output only. The realtime, informational statistics for a queue. In order + # to receive the statistics the caller should include this field in the + # FieldMask. + class Queue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # State of the queue. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # The queue is running. Tasks can be dispatched. + # + # If the queue was created using Cloud Tasks and the queue has + # had no activity (method calls or task dispatches) for 30 days, + # the queue may take a few minutes to re-activate. Some method + # calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and + # tasks may not be dispatched for a few minutes until the queue + # has been re-activated. + RUNNING = 1 + + # Tasks are paused by the user. If the queue is paused then Cloud + # Tasks will stop delivering tasks from it, but more tasks can + # still be added to it by the user. When a pull queue is paused, + # all {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} calls + # will return a [FAILED_PRECONDITION][google.rpc.Code.FAILED_PRECONDITION]. + PAUSED = 2 + + # The queue is disabled. + # + # A queue becomes `DISABLED` when + # [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) + # or + # [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) + # is uploaded which does not contain the queue. You cannot directly disable + # a queue. + # + # When a queue is disabled, tasks can still be added to a queue + # but the tasks are not dispatched and + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} calls + # return a `FAILED_PRECONDITION` error. + # + # To permanently delete this queue and all of its tasks, call + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#delete_queue DeleteQueue}. + DISABLED = 3 + end + end + + # Rate limits. + # + # This message determines the maximum rate that tasks can be dispatched by a + # queue, regardless of whether the dispatch is a first task attempt or a retry. + # + # Note: The debugging command, + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#run_task RunTask}, will run a task + # even if the queue has reached its + # {::Google::Cloud::Tasks::V2beta2::RateLimits RateLimits}. + # @!attribute [rw] max_tasks_dispatched_per_second + # @return [::Float] + # The maximum rate at which tasks are dispatched from this queue. + # + # If unspecified when the queue is created, Cloud Tasks will pick the + # default. + # + # * For {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget App Engine queues}, + # the maximum allowed value + # is 500. + # * This field is output only for [pull + # queues][google.cloud.tasks.v2beta2.PullTarget]. In addition to the + # `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} requests + # are allowed per pull queue. + # + # + # This field has the same meaning as + # [rate in + # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). + # @!attribute [rw] max_burst_size + # @return [::Integer] + # The max burst size. + # + # Max burst size limits how fast tasks in queue are processed when + # many tasks are in the queue and the rate is high. This field + # allows the queue to have a high rate so processing starts shortly + # after a task is enqueued, but still limits resource usage when + # many tasks are enqueued in a short period of time. + # + # The [token bucket](https://wikipedia.org/wiki/Token_Bucket) + # algorithm is used to control the rate of task dispatches. Each + # queue has a token bucket that holds tokens, up to the maximum + # specified by `max_burst_size`. Each time a task is dispatched, a + # token is removed from the bucket. Tasks will be dispatched until + # the queue's bucket runs out of tokens. The bucket will be + # continuously refilled with new tokens based on + # [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. + # + # The default value of `max_burst_size` is picked by Cloud Tasks + # based on the value of + # [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. + # + # The maximum value of `max_burst_size` is 500. + # + # For App Engine queues that were created or updated using + # `queue.yaml/xml`, `max_burst_size` is equal to + # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). + # If + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#update_queue UpdateQueue} is called + # on a queue without explicitly setting a value for `max_burst_size`, + # `max_burst_size` value will get updated if + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#update_queue UpdateQueue} is + # updating [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. + # @!attribute [rw] max_concurrent_tasks + # @return [::Integer] + # The maximum number of concurrent tasks that Cloud Tasks allows + # to be dispatched for this queue. After this threshold has been + # reached, Cloud Tasks stops dispatching tasks until the number of + # concurrent requests decreases. + # + # If unspecified when the queue is created, Cloud Tasks will pick the + # default. + # + # + # The maximum allowed value is 5,000. + # + # This field is output only for + # {::Google::Cloud::Tasks::V2beta2::PullTarget pull queues} and always -1, which + # indicates no limit. No other queue types can have `max_concurrent_tasks` + # set to -1. + # + # + # This field has the same meaning as + # [max_concurrent_requests in + # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). + class RateLimits + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Retry config. + # + # These settings determine how a failed task attempt is retried. + # @!attribute [rw] max_attempts + # @return [::Integer] + # The maximum number of attempts for a task. + # + # Cloud Tasks will attempt the task `max_attempts` times (that + # is, if the first attempt fails, then there will be + # `max_attempts - 1` retries). Must be > 0. + # + # Note: The following fields are mutually exclusive: `max_attempts`, `unlimited_attempts`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] unlimited_attempts + # @return [::Boolean] + # If true, then the number of attempts is unlimited. + # + # Note: The following fields are mutually exclusive: `unlimited_attempts`, `max_attempts`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] max_retry_duration + # @return [::Google::Protobuf::Duration] + # If positive, `max_retry_duration` specifies the time limit for + # retrying a failed task, measured from when the task was first + # attempted. Once `max_retry_duration` time has passed *and* the + # task has been attempted + # {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_attempts max_attempts} times, + # no further attempts will be made and the task will be deleted. + # + # If zero, then the task age is unlimited. + # + # If unspecified when the queue is created, Cloud Tasks will pick the + # default. + # + # This field is output only for [pull + # queues][google.cloud.tasks.v2beta2.PullTarget]. + # + # + # `max_retry_duration` will be truncated to the nearest second. + # + # This field has the same meaning as + # [task_age_limit in + # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + # @!attribute [rw] min_backoff + # @return [::Google::Protobuf::Duration] + # A task will be {::Google::Cloud::Tasks::V2beta2::Task#schedule_time scheduled} + # for retry between + # {::Google::Cloud::Tasks::V2beta2::RetryConfig#min_backoff min_backoff} and + # {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_backoff max_backoff} duration + # after it fails, if the queue's + # {::Google::Cloud::Tasks::V2beta2::RetryConfig RetryConfig} specifies that the + # task should be retried. + # + # If unspecified when the queue is created, Cloud Tasks will pick the + # default. + # + # This field is output only for [pull + # queues][google.cloud.tasks.v2beta2.PullTarget]. + # + # + # `min_backoff` will be truncated to the nearest second. + # + # This field has the same meaning as + # [min_backoff_seconds in + # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + # @!attribute [rw] max_backoff + # @return [::Google::Protobuf::Duration] + # A task will be {::Google::Cloud::Tasks::V2beta2::Task#schedule_time scheduled} + # for retry between + # {::Google::Cloud::Tasks::V2beta2::RetryConfig#min_backoff min_backoff} and + # {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_backoff max_backoff} duration + # after it fails, if the queue's + # {::Google::Cloud::Tasks::V2beta2::RetryConfig RetryConfig} specifies that the + # task should be retried. + # + # If unspecified when the queue is created, Cloud Tasks will pick the + # default. + # + # This field is output only for [pull + # queues][google.cloud.tasks.v2beta2.PullTarget]. + # + # + # `max_backoff` will be truncated to the nearest second. + # + # This field has the same meaning as + # [max_backoff_seconds in + # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + # @!attribute [rw] max_doublings + # @return [::Integer] + # The time between retries will double `max_doublings` times. + # + # A task's retry interval starts at + # {::Google::Cloud::Tasks::V2beta2::RetryConfig#min_backoff min_backoff}, then + # doubles `max_doublings` times, then increases linearly, and finally retries + # at intervals of + # {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_backoff max_backoff} up to + # {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_attempts max_attempts} times. + # + # For example, if + # {::Google::Cloud::Tasks::V2beta2::RetryConfig#min_backoff min_backoff} is 10s, + # {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_backoff max_backoff} is 300s, + # and `max_doublings` is 3, then the a task will first be retried in 10s. The + # retry interval will double three times, and then increase linearly by 2^3 * + # 10s. Finally, the task will retry at intervals of + # {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_backoff max_backoff} until the + # task has been attempted + # {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_attempts max_attempts} times. + # Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, + # 300s, .... + # + # If unspecified when the queue is created, Cloud Tasks will pick the + # default. + # + # This field is output only for [pull + # queues][google.cloud.tasks.v2beta2.PullTarget]. + # + # + # This field has the same meaning as + # [max_doublings in + # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + class RetryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Statistics for a queue. + # @!attribute [r] tasks_count + # @return [::Integer] + # Output only. An estimation of the number of tasks in the queue, that is, + # the tasks in the queue that haven't been executed, the tasks in the queue + # which the queue has dispatched but has not yet received a reply for, and + # the failed tasks that the queue is retrying. + # @!attribute [r] oldest_estimated_arrival_time + # @return [::Google::Protobuf::Timestamp] + # Output only. An estimation of the nearest time in the future where a task + # in the queue is scheduled to be executed. + # @!attribute [r] executed_last_minute_count + # @return [::Integer] + # Output only. The number of tasks that the queue has dispatched and received + # a reply for during the last minute. This variable counts both successful + # and non-successful executions. + # @!attribute [r] concurrent_dispatches_count + # @return [::Integer] + # Output only. The number of requests that the queue has dispatched but has + # not received a reply for yet. + # @!attribute [r] effective_execution_rate + # @return [::Float] + # Output only. The current maximum number of tasks per second executed by the + # queue. The maximum value of this variable is controlled by the RateLimits + # of the Queue. However, this value could be less to avoid overloading the + # endpoints tasks in the queue are targeting. + class QueueStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/target.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/target.rb new file mode 100644 index 000000000000..0ca9fafc9695 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/target.rb @@ -0,0 +1,775 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Tasks + module V2beta2 + # Pull target. + class PullTarget + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The pull message contains data that can be used by the caller of + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} to process the + # task. + # + # This proto can only be used for tasks in a queue which has + # {::Google::Cloud::Tasks::V2beta2::Queue#pull_target pull_target} set. + # @!attribute [rw] payload + # @return [::String] + # A data payload consumed by the worker to execute the task. + # @!attribute [rw] tag + # @return [::String] + # The task's tag. + # + # Tags allow similar tasks to be processed in a batch. If you label + # tasks with a tag, your worker can + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks lease tasks} with the + # same tag using + # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#filter filter}. For example, + # if you want to aggregate the events associated with a specific user once a + # day, you could tag tasks with the user ID. + # + # The task's tag can only be set when the + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task task is created}. + # + # The tag must be less than 500 characters. + # + # SDK compatibility: Although the SDK allows tags to be either + # string or + # [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + # only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 + # encoded, the tag will be empty when the task is returned by Cloud Tasks. + class PullMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # App Engine HTTP target. + # + # The task will be delivered to the App Engine application hostname + # specified by its + # {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget AppEngineHttpTarget} and + # {::Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest AppEngineHttpRequest}. The + # documentation for + # {::Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest AppEngineHttpRequest} + # explains how the task's host URL is constructed. + # + # Using {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget AppEngineHttpTarget} + # requires + # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) + # Google IAM permission for the project + # and the following scope: + # + # `https://www.googleapis.com/auth/cloud-platform` + # @!attribute [rw] app_engine_routing_override + # @return [::Google::Cloud::Tasks::V2beta2::AppEngineRouting] + # Overrides for the + # [task-level + # app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + # + # If set, `app_engine_routing_override` is used for all tasks in + # the queue, no matter what the setting is for the + # [task-level + # app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + class AppEngineHttpTarget + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # App Engine HTTP request. + # + # The message defines the HTTP request that is sent to an App Engine app when + # the task is dispatched. + # + # This proto can only be used for tasks in a queue which has + # {::Google::Cloud::Tasks::V2beta2::Queue#app_engine_http_target app_engine_http_target} + # set. + # + # Using {::Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest AppEngineHttpRequest} + # requires + # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) + # Google IAM permission for the project + # and the following scope: + # + # `https://www.googleapis.com/auth/cloud-platform` + # + # The task will be delivered to the App Engine app which belongs to the same + # project as the queue. For more information, see + # [How Requests are + # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) + # and how routing is affected by + # [dispatch + # files](https://cloud.google.com/appengine/docs/python/config/dispatchref). + # Traffic is encrypted during transport and never leaves Google datacenters. + # Because this traffic is carried over a communication mechanism internal to + # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS). + # The request to the handler, however, will appear to have used the HTTP + # protocol. + # + # The {::Google::Cloud::Tasks::V2beta2::AppEngineRouting AppEngineRouting} used to + # construct the URL that the task is delivered to can be set at the queue-level + # or task-level: + # + # * If set, + # {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget#app_engine_routing_override app_engine_routing_override} + # is used for all tasks in the queue, no matter what the setting + # is for the + # [task-level + # app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + # + # + # The `url` that the task will be sent to is: + # + # * `url =` {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} `+` + # {::Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest#relative_url relative_url} + # + # Tasks can be dispatched to secure app handlers, unsecure app handlers, and + # URIs restricted with + # [`login: + # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref). + # Because tasks are not run as any user, they cannot be dispatched to URIs + # restricted with + # [`login: + # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) + # Task dispatches also do not follow redirects. + # + # The task attempt has succeeded if the app's request handler returns an HTTP + # response code in the range [`200` - `299`]. The task attempt has failed if + # the app's handler returns a non-2xx response code or Cloud Tasks does + # not receive response before the [deadline][Task.dispatch_deadline]. Failed + # tasks will be retried according to the + # {::Google::Cloud::Tasks::V2beta2::Queue#retry_config retry configuration}. `503` + # (Service Unavailable) is considered an App Engine system error instead of an + # application error and will cause Cloud Tasks' traffic congestion control to + # temporarily throttle the queue's dispatches. Unlike other types of task + # targets, a `429` (Too Many Requests) response from an app handler does not + # cause traffic congestion control to throttle the queue. + # @!attribute [rw] http_method + # @return [::Google::Cloud::Tasks::V2beta2::HttpMethod] + # The HTTP method to use for the request. The default is POST. + # + # The app's request handler for the task's target URL must be able to handle + # HTTP requests with this http_method, otherwise the task attempt fails with + # error code 405 (Method Not Allowed). See [Writing a push task request + # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) + # and the App Engine documentation for your runtime on [How Requests are + # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). + # @!attribute [rw] app_engine_routing + # @return [::Google::Cloud::Tasks::V2beta2::AppEngineRouting] + # Task-level setting for App Engine routing. + # + # If set, + # {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget#app_engine_routing_override app_engine_routing_override} + # is used for all tasks in the queue, no matter what the setting is for the + # [task-level + # app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + # @!attribute [rw] relative_url + # @return [::String] + # The relative URL. + # + # The relative URL must begin with "/" and must be a valid HTTP relative URL. + # It can contain a path and query string arguments. + # If the relative URL is empty, then the root path "/" will be used. + # No spaces are allowed, and the maximum length allowed is 2083 characters. + # @!attribute [rw] headers + # @return [::Google::Protobuf::Map{::String => ::String}] + # HTTP request headers. + # + # This map contains the header field names and values. + # Headers can be set when the + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task task is created}. + # Repeated headers are not supported but a header value can contain commas. + # + # Cloud Tasks sets some headers to default values: + # + # * `User-Agent`: By default, this header is + # `"AppEngine-Google; (+http://code.google.com/appengine)"`. + # This header can be modified, but Cloud Tasks will append + # `"AppEngine-Google; (+http://code.google.com/appengine)"` to the + # modified `User-Agent`. + # + # If the task has a + # {::Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest#payload payload}, Cloud + # Tasks sets the following headers: + # + # * `Content-Type`: By default, the `Content-Type` header is set to + # `"application/octet-stream"`. The default can be overridden by explicitly + # setting `Content-Type` to a particular media type when the + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task task is created}. + # For example, `Content-Type` can be set to `"application/json"`. + # * `Content-Length`: This is computed by Cloud Tasks. This value is + # output only. It cannot be changed. + # + # The headers below cannot be set or overridden: + # + # * `Host` + # * `X-Google-*` + # * `X-AppEngine-*` + # + # In addition, Cloud Tasks sets some headers when the task is dispatched, + # such as headers containing information about the task; see + # [request + # headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). + # These headers are set only when the task is dispatched, so they are not + # visible when the task is returned in a Cloud Tasks response. + # + # Although there is no specific limit for the maximum number of headers or + # the size, there is a limit on the maximum size of the + # {::Google::Cloud::Tasks::V2beta2::Task Task}. For more information, see the + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task CreateTask} + # documentation. + # @!attribute [rw] payload + # @return [::String] + # Payload. + # + # The payload will be sent as the HTTP message body. A message + # body, and thus a payload, is allowed only if the HTTP method is + # POST or PUT. It is an error to set a data payload on a task with + # an incompatible {::Google::Cloud::Tasks::V2beta2::HttpMethod HttpMethod}. + class AppEngineHttpRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class HeadersEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # App Engine Routing. + # + # Defines routing characteristics specific to App Engine - service, version, + # and instance. + # + # For more information about services, versions, and instances see + # [An Overview of App + # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), + # [Microservices Architecture on Google App + # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), + # [App Engine Standard request + # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), + # and [App Engine Flex request + # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). + # @!attribute [rw] service + # @return [::String] + # App service. + # + # By default, the task is sent to the service which is the default + # service when the task is attempted. + # + # For some queues or tasks which were created using the App Engine + # Task Queue API, {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} is + # not parsable into + # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service}, + # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}, and + # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance}. For + # example, some tasks which were created using the App Engine SDK use a + # custom domain name; custom domains are not parsed by Cloud Tasks. If + # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} is not parsable, + # then {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service}, + # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}, and + # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} are the + # empty string. + # @!attribute [rw] version + # @return [::String] + # App version. + # + # By default, the task is sent to the version which is the default + # version when the task is attempted. + # + # For some queues or tasks which were created using the App Engine + # Task Queue API, {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} is + # not parsable into + # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service}, + # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}, and + # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance}. For + # example, some tasks which were created using the App Engine SDK use a + # custom domain name; custom domains are not parsed by Cloud Tasks. If + # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} is not parsable, + # then {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service}, + # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}, and + # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} are the + # empty string. + # @!attribute [rw] instance + # @return [::String] + # App instance. + # + # By default, the task is sent to an instance which is available when + # the task is attempted. + # + # Requests can only be sent to a specific instance if + # [manual scaling is used in App Engine + # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + # App Engine Flex does not support instances. For more information, see + # [App Engine Standard request + # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) + # and [App Engine Flex request + # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). + # @!attribute [rw] host + # @return [::String] + # Output only. The host that the task is sent to. + # + # For more information, see + # [How Requests are + # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). + # + # The host is constructed as: + # + # + # * `host = [application_domain_name]`
+ # `| [service] + '.' + [application_domain_name]`
+ # `| [version] + '.' + [application_domain_name]`
+ # `| [version_dot_service]+ '.' + [application_domain_name]`
+ # `| [instance] + '.' + [application_domain_name]`
+ # `| [instance_dot_service] + '.' + [application_domain_name]`
+ # `| [instance_dot_version] + '.' + [application_domain_name]`
+ # `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` + # + # * `application_domain_name` = The domain name of the app, for + # example .appspot.com, which is associated with the + # queue's project ID. Some tasks which were created using the App Engine + # SDK use a custom domain name. + # + # * `service =` + # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service} + # + # * `version =` + # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version} + # + # * `version_dot_service =` + # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version} `+ '.' +` + # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service} + # + # * `instance =` + # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} + # + # * `instance_dot_service =` + # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} `+ '.' + # +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + # + # * `instance_dot_version =` + # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} `+ '.' + # +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] + # + # * `instance_dot_version_dot_service =` + # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} `+ '.' + # +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' + # +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + # + # If {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service} is empty, + # then the task will be sent to the service which is the default service when + # the task is attempted. + # + # If {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version} is empty, + # then the task will be sent to the version which is the default version when + # the task is attempted. + # + # If {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} is + # empty, then the task will be sent to an instance which is available when + # the task is attempted. + # + # If {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service}, + # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}, or + # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} is + # invalid, then the task will be sent to the default version of the default + # service when the task is attempted. + class AppEngineRouting + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # HTTP request. + # + # The task will be pushed to the worker as an HTTP request. An HTTP request + # embodies a url, an http method, headers, body and authorization for the http + # task. + # @!attribute [rw] url + # @return [::String] + # Required. The full url path that the request will be sent to. + # + # This string must begin with either "http://" or "https://". Some examples + # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will + # encode some characters for safety and compatibility. The maximum allowed + # URL length is 2083 characters after encoding. + # + # The `Location` header response from a redirect response [`300` - `399`] + # may be followed. The redirect is not counted as a separate attempt. + # @!attribute [rw] http_method + # @return [::Google::Cloud::Tasks::V2beta2::HttpMethod] + # The HTTP method to use for the request. The default is POST. + # @!attribute [rw] headers + # @return [::Google::Protobuf::Map{::String => ::String}] + # HTTP request headers. + # + # This map contains the header field names and values. + # Headers can be set when running the + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task task is created} or + # [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. + # + # These headers represent a subset of the headers that will accompany the + # task's HTTP request. Some HTTP request headers will be ignored or replaced. + # + # A partial list of headers that will be ignored or replaced is: + # + # * Any header that is prefixed with "X-CloudTasks-" will be treated + # as service header. Service headers define properties of the task and are + # predefined in CloudTask. + # * Host: This will be computed by Cloud Tasks and derived from + # {::Google::Cloud::Tasks::V2beta2::HttpRequest#url HttpRequest.url}. + # * Content-Length: This will be computed by Cloud Tasks. + # * User-Agent: This will be set to `"Google-Cloud-Tasks"`. + # * `X-Google-*`: Google use only. + # * `X-AppEngine-*`: Google use only. + # + # `Content-Type` won't be set by Cloud Tasks. You can explicitly set + # `Content-Type` to a media type when the + # [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + # For example, `Content-Type` can be set to `"application/octet-stream"` or + # `"application/json"`. + # + # Headers which can have multiple values (according to RFC2616) can be + # specified using comma-separated values. + # + # The size of the headers must be less than 80KB. + # @!attribute [rw] body + # @return [::String] + # HTTP request body. + # + # A request body is allowed only if the + # {::Google::Cloud::Tasks::V2beta2::HttpRequest#http_method HTTP method} is POST, + # PUT, or PATCH. It is an error to set body on a task with an incompatible + # {::Google::Cloud::Tasks::V2beta2::HttpMethod HttpMethod}. + # @!attribute [rw] oauth_token + # @return [::Google::Cloud::Tasks::V2beta2::OAuthToken] + # 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`, `oidc_token`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] oidc_token + # @return [::Google::Cloud::Tasks::V2beta2::OidcToken] + # If specified, an + # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + # token will be generated and attached as an `Authorization` header in the + # HTTP request. + # + # This type of authorization can be used for many scenarios, including + # calling Cloud Run, or endpoints where you intend to validate the token + # yourself. + # + # Note: The following fields are mutually exclusive: `oidc_token`, `oauth_token`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class HttpRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class HeadersEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # PathOverride. + # + # Path message defines path override for HTTP targets. + # @!attribute [rw] path + # @return [::String] + # The URI path (e.g., /users/1234). Default is an empty string. + class PathOverride + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # QueryOverride. + # + # Query message defines query override for HTTP targets. + # @!attribute [rw] query_params + # @return [::String] + # The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty + # string. + class QueryOverride + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Uri Override. + # + # When specified, all the HTTP tasks inside the queue will be partially or + # fully overridden depending on the configured values. + # @!attribute [rw] scheme + # @return [::Google::Cloud::Tasks::V2beta2::UriOverride::Scheme] + # Scheme override. + # + # When specified, the task URI scheme is replaced by the provided value (HTTP + # or HTTPS). + # @!attribute [rw] host + # @return [::String] + # Host override. + # + # When specified, replaces the host part of the task URL. For example, + # if the task URL is "https://www.google.com," and host value is set to + # "example.net", the overridden URI will be changed to "https://example.net." + # Host value cannot be an empty string (INVALID_ARGUMENT). + # @!attribute [rw] port + # @return [::Integer] + # Port override. + # + # When specified, replaces the port part of the task URI. For instance, + # for a URI http://www.google.com/foo and port=123, the overridden URI + # becomes http://www.google.com:123/foo. Note that the port value must be a + # positive integer. Setting the port to 0 (Zero) clears the URI port. + # @!attribute [rw] path_override + # @return [::Google::Cloud::Tasks::V2beta2::PathOverride] + # URI path. + # + # When specified, replaces the existing path of the task URL. Setting the + # path value to an empty string clears the URI path segment. + # @!attribute [rw] query_override + # @return [::Google::Cloud::Tasks::V2beta2::QueryOverride] + # URI Query. + # + # When specified, replaces the query part of the task URI. Setting the + # query value to an empty string clears the URI query segment. + # @!attribute [rw] uri_override_enforce_mode + # @return [::Google::Cloud::Tasks::V2beta2::UriOverride::UriOverrideEnforceMode] + # URI Override Enforce Mode + # + # When specified, determines the Target UriOverride mode. If not specified, + # it defaults to ALWAYS. + class UriOverride + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The Scheme for an HTTP request. By default, it is HTTPS. + module Scheme + # Scheme unspecified. Defaults to HTTPS. + SCHEME_UNSPECIFIED = 0 + + # Convert the scheme to HTTP, e.g., https://www.google.ca will change to + # http://www.google.ca. + HTTP = 1 + + # Convert the scheme to HTTPS, e.g., http://www.google.ca will change to + # https://www.google.ca. + HTTPS = 2 + end + + # UriOverrideEnforceMode mode is to define enforcing mode for the override + # modes. + module UriOverrideEnforceMode + # OverrideMode Unspecified. Defaults to ALWAYS. + URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED = 0 + + # In the IF_NOT_EXISTS mode, queue-level configuration is only + # applied where task-level configuration does not exist. + IF_NOT_EXISTS = 1 + + # In the ALWAYS mode, queue-level configuration overrides all + # task-level configuration + ALWAYS = 2 + end + end + + # HTTP target. + # + # When specified as a [Queue][target_type], all the tasks with [HttpRequest] + # will be overridden according to the target. + # @!attribute [rw] uri_override + # @return [::Google::Cloud::Tasks::V2beta2::UriOverride] + # Uri override. + # + # When specified, overrides the execution Uri for all the tasks in the queue. + # @!attribute [rw] http_method + # @return [::Google::Cloud::Tasks::V2beta2::HttpMethod] + # The HTTP method to use for the request. + # + # When specified, it overrides + # {::Google::Cloud::Tasks::V2beta2::HttpTarget#http_method HttpRequest} for the + # task. Note that if the value is set to [HttpMethod][GET] the + # [HttpRequest][body] of the task will be ignored at execution time. + # @!attribute [rw] header_overrides + # @return [::Array<::Google::Cloud::Tasks::V2beta2::HttpTarget::HeaderOverride>] + # HTTP target headers. + # + # This map contains the header field names and values. + # Headers will be set when running the + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task task is created} and/or + # [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. + # + # These headers represent a subset of the headers that will accompany the + # task's HTTP request. Some HTTP request headers will be ignored or replaced. + # + # A partial list of headers that will be ignored or replaced is: + # * Any header that is prefixed with "X-CloudTasks-" will be treated + # as service header. Service headers define properties of the task and are + # predefined in CloudTask. + # * Host: This will be computed by Cloud Tasks and derived from + # {::Google::Cloud::Tasks::V2beta2::HttpRequest#url HttpRequest.url}. + # * Content-Length: This will be computed by Cloud Tasks. + # * User-Agent: This will be set to `"Google-CloudTasks"`. + # * `X-Google-*`: Google use only. + # * `X-AppEngine-*`: Google use only. + # + # `Content-Type` won't be set by Cloud Tasks. You can explicitly set + # `Content-Type` to a media type when the + # [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + # For example, `Content-Type` can be set to `"application/octet-stream"` or + # `"application/json"`. + # + # Headers which can have multiple values (according to RFC2616) can be + # specified using comma-separated values. + # + # The size of the headers must be less than 80KB. + # Queue-level headers to override headers of all the tasks in the queue. + # @!attribute [rw] oauth_token + # @return [::Google::Cloud::Tasks::V2beta2::OAuthToken] + # 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`, `oidc_token`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] oidc_token + # @return [::Google::Cloud::Tasks::V2beta2::OidcToken] + # If specified, an + # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + # token will be generated and attached as an `Authorization` header in the + # HTTP request. + # + # This type of authorization can be used for many scenarios, including + # calling Cloud Run, or endpoints where you intend to validate the token + # yourself. + # + # Note: The following fields are mutually exclusive: `oidc_token`, `oauth_token`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class HttpTarget + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines a header message. A header can have a key and a value. + # @!attribute [rw] key + # @return [::String] + # The key of the header. + # @!attribute [rw] value + # @return [::String] + # The value of the header. + class Header + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wraps the Header object. + # @!attribute [rw] header + # @return [::Google::Cloud::Tasks::V2beta2::HttpTarget::Header] + # header embodying a key and a value. + class HeaderOverride + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + 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_email + # @return [::String] + # [Service account email](https://cloud.google.com/iam/docs/service-accounts) + # to be used for generating OAuth token. + # The service account must be within the same project as the queue. The + # caller must have iam.serviceAccounts.actAs permission for the service + # account. + # @!attribute [rw] scope + # @return [::String] + # 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 + + # Contains information needed for generating an + # [OpenID Connect + # token](https://developers.google.com/identity/protocols/OpenIDConnect). + # This type of authorization can be used for many scenarios, including + # calling Cloud Run, or endpoints where you intend to validate the token + # yourself. + # @!attribute [rw] service_account_email + # @return [::String] + # [Service account email](https://cloud.google.com/iam/docs/service-accounts) + # to be used for generating OIDC token. + # The service account must be within the same project as the queue. The + # caller must have iam.serviceAccounts.actAs permission for the service + # account. + # @!attribute [rw] audience + # @return [::String] + # Audience to be used when generating OIDC token. If not specified, the URI + # specified in target will be used. + class OidcToken + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The HTTP method used to execute the task. + module HttpMethod + # HTTP method unspecified + HTTP_METHOD_UNSPECIFIED = 0 + + # HTTP POST + POST = 1 + + # HTTP GET + GET = 2 + + # HTTP HEAD + HEAD = 3 + + # HTTP PUT + PUT = 4 + + # HTTP DELETE + DELETE = 5 + + # HTTP PATCH + PATCH = 6 + + # HTTP OPTIONS + OPTIONS = 7 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/task.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/task.rb new file mode 100644 index 000000000000..aae0f9e8995f --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/task.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 Tasks + module V2beta2 + # A unit of scheduled work. + # @!attribute [rw] name + # @return [::String] + # Optionally caller-specified in + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task CreateTask}. + # + # The task name. + # + # The task name must have the following format: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # + # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + # hyphens (-), colons (:), or periods (.). + # For more information, see + # [Identifying + # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + # * `LOCATION_ID` is the canonical ID for the task's location. + # The list of available locations can be obtained by calling + # [ListLocations][google.cloud.location.Locations.ListLocations]. + # For more information, see https://cloud.google.com/about/locations/. + # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + # hyphens (-). The maximum length is 100 characters. + # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), + # hyphens (-), or underscores (_). The maximum length is 500 characters. + # @!attribute [rw] app_engine_http_request + # @return [::Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest] + # App Engine HTTP request that is sent to the task's target. Can + # be set only if + # {::Google::Cloud::Tasks::V2beta2::Queue#app_engine_http_target app_engine_http_target} + # is set on the queue. + # + # An App Engine task is a task that has + # {::Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest AppEngineHttpRequest} + # set. + # + # Note: The following fields are mutually exclusive: `app_engine_http_request`, `pull_message`, `http_request`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] pull_message + # @return [::Google::Cloud::Tasks::V2beta2::PullMessage] + # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} to process + # the task. Can be set only if + # {::Google::Cloud::Tasks::V2beta2::Queue#pull_target pull_target} is set on the + # queue. + # + # A pull task is a task that has + # {::Google::Cloud::Tasks::V2beta2::PullMessage PullMessage} set. + # + # Note: The following fields are mutually exclusive: `pull_message`, `app_engine_http_request`, `http_request`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] http_request + # @return [::Google::Cloud::Tasks::V2beta2::HttpRequest] + # HTTP request that is sent to the task's target. + # + # An HTTP task is a task that has + # {::Google::Cloud::Tasks::V2beta2::HttpRequest HttpRequest} set. + # + # Note: The following fields are mutually exclusive: `http_request`, `app_engine_http_request`, `pull_message`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] schedule_time + # @return [::Google::Protobuf::Timestamp] + # The time when the task is scheduled to be attempted. + # + # For App Engine queues, this is when the task will be attempted or retried. + # + # For pull queues, this is the time when the task is available to + # be leased; if a task is currently leased, this is the time when + # the current lease expires, that is, the time that the task was + # leased plus the + # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#lease_duration lease_duration}. + # + # `schedule_time` will be truncated to the nearest microsecond. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time that the task was created. + # + # `create_time` will be truncated to the nearest second. + # @!attribute [rw] status + # @return [::Google::Cloud::Tasks::V2beta2::TaskStatus] + # Output only. The task status. + # @!attribute [rw] view + # @return [::Google::Cloud::Tasks::V2beta2::Task::View] + # Output only. The view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta2::Task Task} has been returned. + class Task + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The view specifies a subset of {::Google::Cloud::Tasks::V2beta2::Task Task} + # data. + # + # When a task is returned in a response, not all + # information is retrieved by default because some data, such as + # payloads, might be desirable to return only when needed because + # of its large size or because of the sensitivity of data that it + # contains. + module View + # Unspecified. Defaults to BASIC. + VIEW_UNSPECIFIED = 0 + + # The basic view omits fields which can be large or can contain + # sensitive data. + # + # This view does not include the + # ([payload in + # AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] + # and [payload in + # PullMessage][google.cloud.tasks.v2beta2.PullMessage.payload]). These + # payloads are desirable to return only when needed, because they can be + # large and because of the sensitivity of the data that you choose to store + # in it. + BASIC = 1 + + # All information is returned. + # + # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta2::Queue Queue} resource. + FULL = 2 + end + end + + # Status of the task. + # @!attribute [rw] attempt_dispatch_count + # @return [::Integer] + # Output only. The number of attempts dispatched. + # + # This count includes attempts which have been dispatched but haven't + # received a response. + # @!attribute [rw] attempt_response_count + # @return [::Integer] + # Output only. The number of attempts which have received a response. + # + # This field is not calculated for [pull + # tasks][google.cloud.tasks.v2beta2.PullMessage]. + # @!attribute [rw] first_attempt_status + # @return [::Google::Cloud::Tasks::V2beta2::AttemptStatus] + # Output only. The status of the task's first attempt. + # + # Only + # {::Google::Cloud::Tasks::V2beta2::AttemptStatus#dispatch_time dispatch_time} + # will be set. The other + # {::Google::Cloud::Tasks::V2beta2::AttemptStatus AttemptStatus} information is + # not retained by Cloud Tasks. + # + # This field is not calculated for [pull + # tasks][google.cloud.tasks.v2beta2.PullMessage]. + # @!attribute [rw] last_attempt_status + # @return [::Google::Cloud::Tasks::V2beta2::AttemptStatus] + # Output only. The status of the task's last attempt. + # + # This field is not calculated for [pull + # tasks][google.cloud.tasks.v2beta2.PullMessage]. + class TaskStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The status of a task attempt. + # @!attribute [rw] schedule_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time that this attempt was scheduled. + # + # `schedule_time` will be truncated to the nearest microsecond. + # @!attribute [rw] dispatch_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time that this attempt was dispatched. + # + # `dispatch_time` will be truncated to the nearest microsecond. + # @!attribute [rw] response_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time that this attempt response was received. + # + # `response_time` will be truncated to the nearest microsecond. + # @!attribute [rw] response_status + # @return [::Google::Rpc::Status] + # Output only. The response from the target for this attempt. + # + # If the task has not been attempted or the task is currently running + # then the response status is unset. + class AttemptStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # 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"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::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). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/iam/v1/options.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! + + +module Google + module Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2/snippets/Gemfile b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/Gemfile new file mode 100644 index 000000000000..3e8ffddf5b75 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2", path: "../" +else + gem "google-cloud-tasks-v2beta2" +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-tasks-v2beta2/snippets/cloud_tasks/acknowledge_task.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/acknowledge_task.rb new file mode 100644 index 000000000000..b6dc7e27d406 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/acknowledge_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudtasks_v2beta2_generated_CloudTasks_AcknowledgeTask_sync] +require "google/cloud/tasks/v2beta2" + +## +# Snippet for the acknowledge_task call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#acknowledge_task. +# +def acknowledge_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest.new + + # Call the acknowledge_task method. + result = client.acknowledge_task request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END cloudtasks_v2beta2_generated_CloudTasks_AcknowledgeTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/cancel_lease.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/cancel_lease.rb new file mode 100644 index 000000000000..d14830cb0974 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/cancel_lease.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 cloudtasks_v2beta2_generated_CloudTasks_CancelLease_sync] +require "google/cloud/tasks/v2beta2" + +## +# Snippet for the cancel_lease call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#cancel_lease. +# +def cancel_lease + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta2::CancelLeaseRequest.new + + # Call the cancel_lease method. + result = client.cancel_lease request + + # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. + p result +end +# [END cloudtasks_v2beta2_generated_CloudTasks_CancelLease_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/create_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/create_queue.rb new file mode 100644 index 000000000000..9c97427bd607 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/create_queue.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 cloudtasks_v2beta2_generated_CloudTasks_CreateQueue_sync] +require "google/cloud/tasks/v2beta2" + +## +# Snippet for the create_queue call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_queue. +# +def create_queue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta2::CreateQueueRequest.new + + # Call the create_queue method. + result = client.create_queue request + + # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. + p result +end +# [END cloudtasks_v2beta2_generated_CloudTasks_CreateQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/create_task.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/create_task.rb new file mode 100644 index 000000000000..e0bf7a6bb378 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/create_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudtasks_v2beta2_generated_CloudTasks_CreateTask_sync] +require "google/cloud/tasks/v2beta2" + +## +# Snippet for the create_task call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task. +# +def create_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta2::CreateTaskRequest.new + + # Call the create_task method. + result = client.create_task request + + # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. + p result +end +# [END cloudtasks_v2beta2_generated_CloudTasks_CreateTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/delete_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/delete_queue.rb new file mode 100644 index 000000000000..b5a51bf66325 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/delete_queue.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 cloudtasks_v2beta2_generated_CloudTasks_DeleteQueue_sync] +require "google/cloud/tasks/v2beta2" + +## +# Snippet for the delete_queue call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#delete_queue. +# +def delete_queue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta2::DeleteQueueRequest.new + + # Call the delete_queue method. + result = client.delete_queue request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END cloudtasks_v2beta2_generated_CloudTasks_DeleteQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/delete_task.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/delete_task.rb new file mode 100644 index 000000000000..e140f2dd5bed --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/delete_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudtasks_v2beta2_generated_CloudTasks_DeleteTask_sync] +require "google/cloud/tasks/v2beta2" + +## +# Snippet for the delete_task call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#delete_task. +# +def delete_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta2::DeleteTaskRequest.new + + # Call the delete_task method. + result = client.delete_task request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END cloudtasks_v2beta2_generated_CloudTasks_DeleteTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/get_iam_policy.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/get_iam_policy.rb new file mode 100644 index 000000000000..1c993e8e0b61 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/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 cloudtasks_v2beta2_generated_CloudTasks_GetIamPolicy_sync] +require "google/cloud/tasks/v2beta2" + +## +# Snippet for the get_iam_policy call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta2::CloudTasks::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 cloudtasks_v2beta2_generated_CloudTasks_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/get_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/get_queue.rb new file mode 100644 index 000000000000..5ec8ef1c332d --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/get_queue.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 cloudtasks_v2beta2_generated_CloudTasks_GetQueue_sync] +require "google/cloud/tasks/v2beta2" + +## +# Snippet for the get_queue call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#get_queue. +# +def get_queue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta2::GetQueueRequest.new + + # Call the get_queue method. + result = client.get_queue request + + # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. + p result +end +# [END cloudtasks_v2beta2_generated_CloudTasks_GetQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/get_task.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/get_task.rb new file mode 100644 index 000000000000..a4511bfe5be7 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/get_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudtasks_v2beta2_generated_CloudTasks_GetTask_sync] +require "google/cloud/tasks/v2beta2" + +## +# Snippet for the get_task call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#get_task. +# +def get_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta2::GetTaskRequest.new + + # Call the get_task method. + result = client.get_task request + + # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. + p result +end +# [END cloudtasks_v2beta2_generated_CloudTasks_GetTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/lease_tasks.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/lease_tasks.rb new file mode 100644 index 000000000000..20aec0526b69 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/lease_tasks.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 cloudtasks_v2beta2_generated_CloudTasks_LeaseTasks_sync] +require "google/cloud/tasks/v2beta2" + +## +# Snippet for the lease_tasks call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks. +# +def lease_tasks + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta2::LeaseTasksRequest.new + + # Call the lease_tasks method. + result = client.lease_tasks request + + # The returned object is of type Google::Cloud::Tasks::V2beta2::LeaseTasksResponse. + p result +end +# [END cloudtasks_v2beta2_generated_CloudTasks_LeaseTasks_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/list_queues.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/list_queues.rb new file mode 100644 index 000000000000..0338b25067c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/list_queues.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 cloudtasks_v2beta2_generated_CloudTasks_ListQueues_sync] +require "google/cloud/tasks/v2beta2" + +## +# Snippet for the list_queues call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_queues. +# +def list_queues + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta2::ListQueuesRequest.new + + # Call the list_queues method. + result = client.list_queues request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Tasks::V2beta2::Queue. + p item + end +end +# [END cloudtasks_v2beta2_generated_CloudTasks_ListQueues_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/list_tasks.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/list_tasks.rb new file mode 100644 index 000000000000..a88f6c92ccec --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/list_tasks.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudtasks_v2beta2_generated_CloudTasks_ListTasks_sync] +require "google/cloud/tasks/v2beta2" + +## +# Snippet for the list_tasks call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_tasks. +# +def list_tasks + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta2::ListTasksRequest.new + + # Call the list_tasks method. + result = client.list_tasks request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Tasks::V2beta2::Task. + p item + end +end +# [END cloudtasks_v2beta2_generated_CloudTasks_ListTasks_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/pause_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/pause_queue.rb new file mode 100644 index 000000000000..f37d59216de0 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/pause_queue.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 cloudtasks_v2beta2_generated_CloudTasks_PauseQueue_sync] +require "google/cloud/tasks/v2beta2" + +## +# Snippet for the pause_queue call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#pause_queue. +# +def pause_queue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta2::PauseQueueRequest.new + + # Call the pause_queue method. + result = client.pause_queue request + + # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. + p result +end +# [END cloudtasks_v2beta2_generated_CloudTasks_PauseQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/purge_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/purge_queue.rb new file mode 100644 index 000000000000..8e55f1adbd2b --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/purge_queue.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 cloudtasks_v2beta2_generated_CloudTasks_PurgeQueue_sync] +require "google/cloud/tasks/v2beta2" + +## +# Snippet for the purge_queue call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#purge_queue. +# +def purge_queue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta2::PurgeQueueRequest.new + + # Call the purge_queue method. + result = client.purge_queue request + + # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. + p result +end +# [END cloudtasks_v2beta2_generated_CloudTasks_PurgeQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/renew_lease.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/renew_lease.rb new file mode 100644 index 000000000000..c73fde9eddb4 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/renew_lease.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 cloudtasks_v2beta2_generated_CloudTasks_RenewLease_sync] +require "google/cloud/tasks/v2beta2" + +## +# Snippet for the renew_lease call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#renew_lease. +# +def renew_lease + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta2::RenewLeaseRequest.new + + # Call the renew_lease method. + result = client.renew_lease request + + # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. + p result +end +# [END cloudtasks_v2beta2_generated_CloudTasks_RenewLease_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/resume_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/resume_queue.rb new file mode 100644 index 000000000000..d2636e095fa1 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/resume_queue.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 cloudtasks_v2beta2_generated_CloudTasks_ResumeQueue_sync] +require "google/cloud/tasks/v2beta2" + +## +# Snippet for the resume_queue call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#resume_queue. +# +def resume_queue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta2::ResumeQueueRequest.new + + # Call the resume_queue method. + result = client.resume_queue request + + # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. + p result +end +# [END cloudtasks_v2beta2_generated_CloudTasks_ResumeQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/run_task.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/run_task.rb new file mode 100644 index 000000000000..e68873afd93c --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/run_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudtasks_v2beta2_generated_CloudTasks_RunTask_sync] +require "google/cloud/tasks/v2beta2" + +## +# Snippet for the run_task call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#run_task. +# +def run_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta2::RunTaskRequest.new + + # Call the run_task method. + result = client.run_task request + + # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. + p result +end +# [END cloudtasks_v2beta2_generated_CloudTasks_RunTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/set_iam_policy.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/set_iam_policy.rb new file mode 100644 index 000000000000..9ceb07ceada7 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/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 cloudtasks_v2beta2_generated_CloudTasks_SetIamPolicy_sync] +require "google/cloud/tasks/v2beta2" + +## +# Snippet for the set_iam_policy call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta2::CloudTasks::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 cloudtasks_v2beta2_generated_CloudTasks_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/test_iam_permissions.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/test_iam_permissions.rb new file mode 100644 index 000000000000..eb20412a5689 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/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 cloudtasks_v2beta2_generated_CloudTasks_TestIamPermissions_sync] +require "google/cloud/tasks/v2beta2" + +## +# Snippet for the test_iam_permissions call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta2::CloudTasks::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 cloudtasks_v2beta2_generated_CloudTasks_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/update_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/update_queue.rb new file mode 100644 index 000000000000..1811e14dc6e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/update_queue.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 cloudtasks_v2beta2_generated_CloudTasks_UpdateQueue_sync] +require "google/cloud/tasks/v2beta2" + +## +# Snippet for the update_queue call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#update_queue. +# +def update_queue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta2::UpdateQueueRequest.new + + # Call the update_queue method. + result = client.update_queue request + + # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. + p result +end +# [END cloudtasks_v2beta2_generated_CloudTasks_UpdateQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/upload_queue_yaml.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/upload_queue_yaml.rb new file mode 100644 index 000000000000..affb52517a64 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/upload_queue_yaml.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 cloudtasks_v2beta2_generated_CloudTasks_UploadQueueYaml_sync] +require "google/cloud/tasks/v2beta2" + +## +# Snippet for the upload_queue_yaml call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#upload_queue_yaml. +# +def upload_queue_yaml + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta2::UploadQueueYamlRequest.new + + # Call the upload_queue_yaml method. + result = client.upload_queue_yaml request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END cloudtasks_v2beta2_generated_CloudTasks_UploadQueueYaml_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/snippet_metadata_google.cloud.tasks.v2beta2.json b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/snippet_metadata_google.cloud.tasks.v2beta2.json new file mode 100644 index 000000000000..cc2f4452567f --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/snippet_metadata_google.cloud.tasks.v2beta2.json @@ -0,0 +1,855 @@ +{ + "client_library": { + "name": "google-cloud-tasks-v2beta2", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.tasks.v2beta2", + "version": "v2beta2" + } + ] + }, + "snippets": [ + { + "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_ListQueues_sync", + "title": "Snippet for the list_queues call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_queues.", + "file": "cloud_tasks/list_queues.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_queues", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_queues", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta2::ListQueuesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2beta2::ListQueuesResponse", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" + }, + "method": { + "short_name": "ListQueues", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks.ListQueues", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_GetQueue_sync", + "title": "Snippet for the get_queue call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#get_queue.", + "file": "cloud_tasks/get_queue.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_queue", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#get_queue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta2::GetQueueRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2beta2::Queue", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" + }, + "method": { + "short_name": "GetQueue", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks.GetQueue", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_CreateQueue_sync", + "title": "Snippet for the create_queue call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_queue.", + "file": "cloud_tasks/create_queue.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_queue", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_queue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta2::CreateQueueRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2beta2::Queue", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" + }, + "method": { + "short_name": "CreateQueue", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks.CreateQueue", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_UpdateQueue_sync", + "title": "Snippet for the update_queue call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#update_queue.", + "file": "cloud_tasks/update_queue.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_queue", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#update_queue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2beta2::Queue", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" + }, + "method": { + "short_name": "UpdateQueue", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_DeleteQueue_sync", + "title": "Snippet for the delete_queue call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#delete_queue.", + "file": "cloud_tasks/delete_queue.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_queue", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#delete_queue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" + }, + "method": { + "short_name": "DeleteQueue", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_PurgeQueue_sync", + "title": "Snippet for the purge_queue call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#purge_queue.", + "file": "cloud_tasks/purge_queue.rb", + "language": "RUBY", + "client_method": { + "short_name": "purge_queue", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#purge_queue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2beta2::Queue", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" + }, + "method": { + "short_name": "PurgeQueue", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_PauseQueue_sync", + "title": "Snippet for the pause_queue call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#pause_queue.", + "file": "cloud_tasks/pause_queue.rb", + "language": "RUBY", + "client_method": { + "short_name": "pause_queue", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#pause_queue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta2::PauseQueueRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2beta2::Queue", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" + }, + "method": { + "short_name": "PauseQueue", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks.PauseQueue", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_ResumeQueue_sync", + "title": "Snippet for the resume_queue call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#resume_queue.", + "file": "cloud_tasks/resume_queue.rb", + "language": "RUBY", + "client_method": { + "short_name": "resume_queue", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#resume_queue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2beta2::Queue", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" + }, + "method": { + "short_name": "ResumeQueue", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_UploadQueueYaml_sync", + "title": "Snippet for the upload_queue_yaml call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#upload_queue_yaml.", + "file": "cloud_tasks/upload_queue_yaml.rb", + "language": "RUBY", + "client_method": { + "short_name": "upload_queue_yaml", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#upload_queue_yaml", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta2::UploadQueueYamlRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" + }, + "method": { + "short_name": "UploadQueueYaml", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks.UploadQueueYaml", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#get_iam_policy.", + "file": "cloud_tasks/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks.GetIamPolicy", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#set_iam_policy.", + "file": "cloud_tasks/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks.SetIamPolicy", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#test_iam_permissions.", + "file": "cloud_tasks/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks.TestIamPermissions", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_ListTasks_sync", + "title": "Snippet for the list_tasks call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_tasks.", + "file": "cloud_tasks/list_tasks.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_tasks", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_tasks", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta2::ListTasksRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2beta2::ListTasksResponse", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" + }, + "method": { + "short_name": "ListTasks", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks.ListTasks", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_GetTask_sync", + "title": "Snippet for the get_task call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#get_task.", + "file": "cloud_tasks/get_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_task", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#get_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta2::GetTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2beta2::Task", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" + }, + "method": { + "short_name": "GetTask", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks.GetTask", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_CreateTask_sync", + "title": "Snippet for the create_task call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task.", + "file": "cloud_tasks/create_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_task", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta2::CreateTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2beta2::Task", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" + }, + "method": { + "short_name": "CreateTask", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks.CreateTask", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_DeleteTask_sync", + "title": "Snippet for the delete_task call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#delete_task.", + "file": "cloud_tasks/delete_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_task", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#delete_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" + }, + "method": { + "short_name": "DeleteTask", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks.DeleteTask", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_LeaseTasks_sync", + "title": "Snippet for the lease_tasks call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks.", + "file": "cloud_tasks/lease_tasks.rb", + "language": "RUBY", + "client_method": { + "short_name": "lease_tasks", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" + }, + "method": { + "short_name": "LeaseTasks", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_AcknowledgeTask_sync", + "title": "Snippet for the acknowledge_task call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#acknowledge_task.", + "file": "cloud_tasks/acknowledge_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "acknowledge_task", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#acknowledge_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" + }, + "method": { + "short_name": "AcknowledgeTask", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_RenewLease_sync", + "title": "Snippet for the renew_lease call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#renew_lease.", + "file": "cloud_tasks/renew_lease.rb", + "language": "RUBY", + "client_method": { + "short_name": "renew_lease", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#renew_lease", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2beta2::Task", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" + }, + "method": { + "short_name": "RenewLease", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks.RenewLease", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_CancelLease_sync", + "title": "Snippet for the cancel_lease call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#cancel_lease.", + "file": "cloud_tasks/cancel_lease.rb", + "language": "RUBY", + "client_method": { + "short_name": "cancel_lease", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#cancel_lease", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2beta2::Task", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" + }, + "method": { + "short_name": "CancelLease", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks.CancelLease", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_RunTask_sync", + "title": "Snippet for the run_task call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#run_task.", + "file": "cloud_tasks/run_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "run_task", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#run_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta2::RunTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2beta2::Task", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" + }, + "method": { + "short_name": "RunTask", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks.RunTask", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta2.CloudTasks" + } + } + }, + "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-tasks-v2beta2/test/google/cloud/tasks/v2beta2/cloud_tasks_paths_test.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/test/google/cloud/tasks/v2beta2/cloud_tasks_paths_test.rb new file mode 100644 index 000000000000..898df1868940 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/test/google/cloud/tasks/v2beta2/cloud_tasks_paths_test.rb @@ -0,0 +1,79 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/tasks/v2beta2/cloud_tasks" + +class ::Google::Cloud::Tasks::V2beta2::CloudTasks::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_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::Tasks::V2beta2::CloudTasks::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_queue_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.queue_path project: "value0", location: "value1", queue: "value2" + assert_equal "projects/value0/locations/value1/queues/value2", path + end + end + + def test_task_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.task_path project: "value0", location: "value1", queue: "value2", task: "value3" + assert_equal "projects/value0/locations/value1/queues/value2/tasks/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/test/google/cloud/tasks/v2beta2/cloud_tasks_rest_test.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/test/google/cloud/tasks/v2beta2/cloud_tasks_rest_test.rb new file mode 100644 index 000000000000..adc077978678 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/test/google/cloud/tasks/v2beta2/cloud_tasks_rest_test.rb @@ -0,0 +1,1207 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/tasks/v2beta2/cloudtasks_pb" +require "google/cloud/tasks/v2beta2/cloud_tasks/rest" + + +class ::Google::Cloud::Tasks::V2beta2::CloudTasks::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_queues + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2beta2::ListQueuesResponse.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" + read_mask = {} + + list_queues_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_list_queues_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_queues_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_queues({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_queues parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_queues ::Google::Cloud::Tasks::V2beta2::ListQueuesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_queues({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_queues(::Google::Cloud::Tasks::V2beta2::ListQueuesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_queues_client_stub.call_count + end + end + end + + def test_get_queue + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2beta2::Queue.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + read_mask = {} + + get_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_get_queue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_queue({ name: name, read_mask: read_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_queue name: name, read_mask: read_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_queue ::Google::Cloud::Tasks::V2beta2::GetQueueRequest.new(name: name, read_mask: read_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_queue({ name: name, read_mask: read_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_queue(::Google::Cloud::Tasks::V2beta2::GetQueueRequest.new(name: name, read_mask: read_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_queue_client_stub.call_count + end + end + end + + def test_create_queue + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2beta2::Queue.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + queue = {} + + create_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_create_queue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_queue({ parent: parent, queue: queue }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_queue parent: parent, queue: queue do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_queue ::Google::Cloud::Tasks::V2beta2::CreateQueueRequest.new(parent: parent, queue: queue) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_queue({ parent: parent, queue: queue }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_queue(::Google::Cloud::Tasks::V2beta2::CreateQueueRequest.new(parent: parent, queue: queue), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_queue_client_stub.call_count + end + end + end + + def test_update_queue + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2beta2::Queue.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + queue = {} + update_mask = {} + + update_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_update_queue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_queue({ queue: queue, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_queue queue: queue, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_queue ::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest.new(queue: queue, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_queue({ queue: queue, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_queue(::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest.new(queue: queue, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_queue_client_stub.call_count + end + end + end + + def test_delete_queue + # 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_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_delete_queue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_queue({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_queue name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_queue ::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_queue({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_queue(::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_queue_client_stub.call_count + end + end + end + + def test_purge_queue + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2beta2::Queue.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + purge_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_purge_queue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, purge_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.purge_queue({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.purge_queue name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.purge_queue ::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.purge_queue({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.purge_queue(::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, purge_queue_client_stub.call_count + end + end + end + + def test_pause_queue + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2beta2::Queue.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + pause_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_pause_queue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, pause_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.pause_queue({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.pause_queue name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.pause_queue ::Google::Cloud::Tasks::V2beta2::PauseQueueRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.pause_queue({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.pause_queue(::Google::Cloud::Tasks::V2beta2::PauseQueueRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, pause_queue_client_stub.call_count + end + end + end + + def test_resume_queue + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2beta2::Queue.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + resume_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_resume_queue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, resume_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.resume_queue({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.resume_queue name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.resume_queue ::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.resume_queue({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.resume_queue(::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, resume_queue_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::Tasks::V2beta2::CloudTasks::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::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta2::CloudTasks::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::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta2::CloudTasks::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::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_count + end + end + end + + def test_list_tasks + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2beta2::ListTasksResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + response_view = :VIEW_UNSPECIFIED + page_size = 42 + page_token = "hello world" + + list_tasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_list_tasks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_tasks_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_tasks({ parent: parent, response_view: response_view, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_tasks parent: parent, response_view: response_view, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_tasks ::Google::Cloud::Tasks::V2beta2::ListTasksRequest.new(parent: parent, response_view: response_view, 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_tasks({ parent: parent, response_view: response_view, 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_tasks(::Google::Cloud::Tasks::V2beta2::ListTasksRequest.new(parent: parent, response_view: response_view, 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_tasks_client_stub.call_count + end + end + end + + def test_get_task + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2beta2::Task.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + response_view = :VIEW_UNSPECIFIED + + get_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_get_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_task({ name: name, response_view: response_view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_task name: name, response_view: response_view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_task ::Google::Cloud::Tasks::V2beta2::GetTaskRequest.new(name: name, response_view: response_view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_task({ name: name, response_view: response_view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_task(::Google::Cloud::Tasks::V2beta2::GetTaskRequest.new(name: name, response_view: response_view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_task_client_stub.call_count + end + end + end + + def test_create_task + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2beta2::Task.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + task = {} + response_view = :VIEW_UNSPECIFIED + + create_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_create_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_task({ parent: parent, task: task, response_view: response_view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_task parent: parent, task: task, response_view: response_view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_task ::Google::Cloud::Tasks::V2beta2::CreateTaskRequest.new(parent: parent, task: task, response_view: response_view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_task({ parent: parent, task: task, response_view: response_view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_task(::Google::Cloud::Tasks::V2beta2::CreateTaskRequest.new(parent: parent, task: task, response_view: response_view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_task_client_stub.call_count + end + end + end + + def test_delete_task + # 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_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_delete_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_task({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_task name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_task ::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_task({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_task(::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_task_client_stub.call_count + end + end + end + + def test_lease_tasks + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + max_tasks = 42 + lease_duration = {} + response_view = :VIEW_UNSPECIFIED + filter = "hello world" + + lease_tasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_lease_tasks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, lease_tasks_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.lease_tasks({ parent: parent, max_tasks: max_tasks, lease_duration: lease_duration, response_view: response_view, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.lease_tasks parent: parent, max_tasks: max_tasks, lease_duration: lease_duration, response_view: response_view, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.lease_tasks ::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest.new(parent: parent, max_tasks: max_tasks, lease_duration: lease_duration, response_view: response_view, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.lease_tasks({ parent: parent, max_tasks: max_tasks, lease_duration: lease_duration, response_view: response_view, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.lease_tasks(::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest.new(parent: parent, max_tasks: max_tasks, lease_duration: lease_duration, response_view: response_view, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, lease_tasks_client_stub.call_count + end + end + end + + def test_acknowledge_task + # 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" + schedule_time = {} + + acknowledge_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_acknowledge_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, acknowledge_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.acknowledge_task({ name: name, schedule_time: schedule_time }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.acknowledge_task name: name, schedule_time: schedule_time do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.acknowledge_task ::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest.new(name: name, schedule_time: schedule_time) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.acknowledge_task({ name: name, schedule_time: schedule_time }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.acknowledge_task(::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest.new(name: name, schedule_time: schedule_time), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, acknowledge_task_client_stub.call_count + end + end + end + + def test_renew_lease + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2beta2::Task.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + schedule_time = {} + lease_duration = {} + response_view = :VIEW_UNSPECIFIED + + renew_lease_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_renew_lease_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, renew_lease_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.renew_lease({ name: name, schedule_time: schedule_time, lease_duration: lease_duration, response_view: response_view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.renew_lease name: name, schedule_time: schedule_time, lease_duration: lease_duration, response_view: response_view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.renew_lease ::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest.new(name: name, schedule_time: schedule_time, lease_duration: lease_duration, response_view: response_view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.renew_lease({ name: name, schedule_time: schedule_time, lease_duration: lease_duration, response_view: response_view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.renew_lease(::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest.new(name: name, schedule_time: schedule_time, lease_duration: lease_duration, response_view: response_view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, renew_lease_client_stub.call_count + end + end + end + + def test_cancel_lease + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2beta2::Task.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + schedule_time = {} + response_view = :VIEW_UNSPECIFIED + + cancel_lease_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_cancel_lease_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, cancel_lease_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.cancel_lease({ name: name, schedule_time: schedule_time, response_view: response_view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.cancel_lease name: name, schedule_time: schedule_time, response_view: response_view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.cancel_lease ::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest.new(name: name, schedule_time: schedule_time, response_view: response_view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.cancel_lease({ name: name, schedule_time: schedule_time, response_view: response_view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.cancel_lease(::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest.new(name: name, schedule_time: schedule_time, response_view: response_view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, cancel_lease_client_stub.call_count + end + end + end + + def test_run_task + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2beta2::Task.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + response_view = :VIEW_UNSPECIFIED + + run_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_run_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, run_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.run_task({ name: name, response_view: response_view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.run_task name: name, response_view: response_view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.run_task ::Google::Cloud::Tasks::V2beta2::RunTaskRequest.new(name: name, response_view: response_view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.run_task({ name: name, response_view: response_view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.run_task(::Google::Cloud::Tasks::V2beta2::RunTaskRequest.new(name: name, response_view: response_view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, run_task_client_stub.call_count + end + end + end + + def test_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::Tasks::V2beta2::CloudTasks::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::Tasks::V2beta2::CloudTasks::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/test/google/cloud/tasks/v2beta2/cloud_tasks_test.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/test/google/cloud/tasks/v2beta2/cloud_tasks_test.rb new file mode 100644 index 000000000000..e8e1832596d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/test/google/cloud/tasks/v2beta2/cloud_tasks_test.rb @@ -0,0 +1,1391 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/tasks/v2beta2/cloudtasks_pb" +require "google/cloud/tasks/v2beta2/cloud_tasks" + +class ::Google::Cloud::Tasks::V2beta2::CloudTasks::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_queues + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2beta2::ListQueuesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + read_mask = {} + + list_queues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_queues, name + assert_kind_of ::Google::Cloud::Tasks::V2beta2::ListQueuesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_queues_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_queues({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_queues parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_queues ::Google::Cloud::Tasks::V2beta2::ListQueuesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_queues({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_queues(::Google::Cloud::Tasks::V2beta2::ListQueuesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_queues_client_stub.call_rpc_count + end + end + + def test_get_queue + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2beta2::Queue.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + read_mask = {} + + get_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_queue, name + assert_kind_of ::Google::Cloud::Tasks::V2beta2::GetQueueRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_queue({ name: name, read_mask: read_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_queue name: name, read_mask: read_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_queue ::Google::Cloud::Tasks::V2beta2::GetQueueRequest.new(name: name, read_mask: read_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_queue({ name: name, read_mask: read_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_queue(::Google::Cloud::Tasks::V2beta2::GetQueueRequest.new(name: name, read_mask: read_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_queue_client_stub.call_rpc_count + end + end + + def test_create_queue + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2beta2::Queue.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + queue = {} + + create_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_queue, name + assert_kind_of ::Google::Cloud::Tasks::V2beta2::CreateQueueRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Tasks::V2beta2::Queue), request["queue"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_queue({ parent: parent, queue: queue }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_queue parent: parent, queue: queue do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_queue ::Google::Cloud::Tasks::V2beta2::CreateQueueRequest.new(parent: parent, queue: queue) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_queue({ parent: parent, queue: queue }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_queue(::Google::Cloud::Tasks::V2beta2::CreateQueueRequest.new(parent: parent, queue: queue), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_queue_client_stub.call_rpc_count + end + end + + def test_update_queue + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2beta2::Queue.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + queue = {} + update_mask = {} + + update_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_queue, name + assert_kind_of ::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Tasks::V2beta2::Queue), request["queue"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_queue({ queue: queue, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_queue queue: queue, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_queue ::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest.new(queue: queue, 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_queue({ queue: queue, 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_queue(::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest.new(queue: queue, 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_queue_client_stub.call_rpc_count + end + end + + def test_delete_queue + # 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_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_queue, name + assert_kind_of ::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_queue({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_queue name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_queue ::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_queue({ 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_queue(::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest.new(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_queue_client_stub.call_rpc_count + end + end + + def test_purge_queue + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2beta2::Queue.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + purge_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :purge_queue, name + assert_kind_of ::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, purge_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.purge_queue({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.purge_queue name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.purge_queue ::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.purge_queue({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.purge_queue(::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, purge_queue_client_stub.call_rpc_count + end + end + + def test_pause_queue + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2beta2::Queue.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + pause_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :pause_queue, name + assert_kind_of ::Google::Cloud::Tasks::V2beta2::PauseQueueRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, pause_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.pause_queue({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.pause_queue name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.pause_queue ::Google::Cloud::Tasks::V2beta2::PauseQueueRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.pause_queue({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.pause_queue(::Google::Cloud::Tasks::V2beta2::PauseQueueRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, pause_queue_client_stub.call_rpc_count + end + end + + def test_resume_queue + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2beta2::Queue.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + resume_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :resume_queue, name + assert_kind_of ::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, resume_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.resume_queue({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.resume_queue name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.resume_queue ::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.resume_queue({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.resume_queue(::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, resume_queue_client_stub.call_rpc_count + end + end + + def test_upload_queue_yaml + # 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. + app_id = "hello world" + http_body = {} + + upload_queue_yaml_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :upload_queue_yaml, name + assert_kind_of ::Google::Cloud::Tasks::V2beta2::UploadQueueYamlRequest, request + assert_equal "hello world", request["app_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Api::HttpBody), request["http_body"] + assert request.has_http_body? + refute_nil options + end + + Gapic::ServiceStub.stub :new, upload_queue_yaml_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.upload_queue_yaml({ app_id: app_id, http_body: http_body }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.upload_queue_yaml app_id: app_id, http_body: http_body do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.upload_queue_yaml ::Google::Cloud::Tasks::V2beta2::UploadQueueYamlRequest.new(app_id: app_id, http_body: http_body) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.upload_queue_yaml({ app_id: app_id, http_body: http_body }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.upload_queue_yaml(::Google::Cloud::Tasks::V2beta2::UploadQueueYamlRequest.new(app_id: app_id, http_body: http_body), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, upload_queue_yaml_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::Tasks::V2beta2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_rpc_count + end + end + + def test_list_tasks + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2beta2::ListTasksResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + response_view = :VIEW_UNSPECIFIED + page_size = 42 + page_token = "hello world" + + list_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_tasks, name + assert_kind_of ::Google::Cloud::Tasks::V2beta2::ListTasksRequest, request + assert_equal "hello world", request["parent"] + assert_equal :VIEW_UNSPECIFIED, request["response_view"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_tasks_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_tasks({ parent: parent, response_view: response_view, 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_tasks parent: parent, response_view: response_view, 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_tasks ::Google::Cloud::Tasks::V2beta2::ListTasksRequest.new(parent: parent, response_view: response_view, 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_tasks({ parent: parent, response_view: response_view, 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_tasks(::Google::Cloud::Tasks::V2beta2::ListTasksRequest.new(parent: parent, response_view: response_view, 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_tasks_client_stub.call_rpc_count + end + end + + def test_get_task + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2beta2::Task.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + response_view = :VIEW_UNSPECIFIED + + get_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_task, name + assert_kind_of ::Google::Cloud::Tasks::V2beta2::GetTaskRequest, request + assert_equal "hello world", request["name"] + assert_equal :VIEW_UNSPECIFIED, request["response_view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_task({ name: name, response_view: response_view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_task name: name, response_view: response_view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_task ::Google::Cloud::Tasks::V2beta2::GetTaskRequest.new(name: name, response_view: response_view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_task({ name: name, response_view: response_view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_task(::Google::Cloud::Tasks::V2beta2::GetTaskRequest.new(name: name, response_view: response_view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_task_client_stub.call_rpc_count + end + end + + def test_create_task + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2beta2::Task.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + task = {} + response_view = :VIEW_UNSPECIFIED + + create_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_task, name + assert_kind_of ::Google::Cloud::Tasks::V2beta2::CreateTaskRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Tasks::V2beta2::Task), request["task"] + assert_equal :VIEW_UNSPECIFIED, request["response_view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_task({ parent: parent, task: task, response_view: response_view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_task parent: parent, task: task, response_view: response_view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_task ::Google::Cloud::Tasks::V2beta2::CreateTaskRequest.new(parent: parent, task: task, response_view: response_view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_task({ parent: parent, task: task, response_view: response_view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_task(::Google::Cloud::Tasks::V2beta2::CreateTaskRequest.new(parent: parent, task: task, response_view: response_view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_task_client_stub.call_rpc_count + end + end + + def test_delete_task + # 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_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_task, name + assert_kind_of ::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_task({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_task name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_task ::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_task({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_task(::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest.new(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_task_client_stub.call_rpc_count + end + end + + def test_lease_tasks + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + max_tasks = 42 + lease_duration = {} + response_view = :VIEW_UNSPECIFIED + filter = "hello world" + + lease_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :lease_tasks, name + assert_kind_of ::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["max_tasks"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["lease_duration"] + assert_equal :VIEW_UNSPECIFIED, request["response_view"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, lease_tasks_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.lease_tasks({ parent: parent, max_tasks: max_tasks, lease_duration: lease_duration, response_view: response_view, filter: filter }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.lease_tasks parent: parent, max_tasks: max_tasks, lease_duration: lease_duration, response_view: response_view, filter: filter do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.lease_tasks ::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest.new(parent: parent, max_tasks: max_tasks, lease_duration: lease_duration, response_view: response_view, filter: filter) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.lease_tasks({ parent: parent, max_tasks: max_tasks, lease_duration: lease_duration, response_view: response_view, filter: filter }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.lease_tasks(::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest.new(parent: parent, max_tasks: max_tasks, lease_duration: lease_duration, response_view: response_view, filter: filter), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, lease_tasks_client_stub.call_rpc_count + end + end + + def test_acknowledge_task + # 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" + schedule_time = {} + + acknowledge_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :acknowledge_task, name + assert_kind_of ::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["schedule_time"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, acknowledge_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.acknowledge_task({ name: name, schedule_time: schedule_time }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.acknowledge_task name: name, schedule_time: schedule_time do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.acknowledge_task ::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest.new(name: name, schedule_time: schedule_time) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.acknowledge_task({ name: name, schedule_time: schedule_time }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.acknowledge_task(::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest.new(name: name, schedule_time: schedule_time), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, acknowledge_task_client_stub.call_rpc_count + end + end + + def test_renew_lease + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2beta2::Task.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + schedule_time = {} + lease_duration = {} + response_view = :VIEW_UNSPECIFIED + + renew_lease_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :renew_lease, name + assert_kind_of ::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["schedule_time"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["lease_duration"] + assert_equal :VIEW_UNSPECIFIED, request["response_view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, renew_lease_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.renew_lease({ name: name, schedule_time: schedule_time, lease_duration: lease_duration, response_view: response_view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.renew_lease name: name, schedule_time: schedule_time, lease_duration: lease_duration, response_view: response_view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.renew_lease ::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest.new(name: name, schedule_time: schedule_time, lease_duration: lease_duration, response_view: response_view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.renew_lease({ name: name, schedule_time: schedule_time, lease_duration: lease_duration, response_view: response_view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.renew_lease(::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest.new(name: name, schedule_time: schedule_time, lease_duration: lease_duration, response_view: response_view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, renew_lease_client_stub.call_rpc_count + end + end + + def test_cancel_lease + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2beta2::Task.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + schedule_time = {} + response_view = :VIEW_UNSPECIFIED + + cancel_lease_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_lease, name + assert_kind_of ::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["schedule_time"] + assert_equal :VIEW_UNSPECIFIED, request["response_view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_lease_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_lease({ name: name, schedule_time: schedule_time, response_view: response_view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_lease name: name, schedule_time: schedule_time, response_view: response_view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_lease ::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest.new(name: name, schedule_time: schedule_time, response_view: response_view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_lease({ name: name, schedule_time: schedule_time, response_view: response_view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_lease(::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest.new(name: name, schedule_time: schedule_time, response_view: response_view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_lease_client_stub.call_rpc_count + end + end + + def test_run_task + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2beta2::Task.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + response_view = :VIEW_UNSPECIFIED + + run_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :run_task, name + assert_kind_of ::Google::Cloud::Tasks::V2beta2::RunTaskRequest, request + assert_equal "hello world", request["name"] + assert_equal :VIEW_UNSPECIFIED, request["response_view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, run_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.run_task({ name: name, response_view: response_view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.run_task name: name, response_view: response_view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.run_task ::Google::Cloud::Tasks::V2beta2::RunTaskRequest.new(name: name, response_view: response_view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.run_task({ name: name, response_view: response_view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.run_task(::Google::Cloud::Tasks::V2beta2::RunTaskRequest.new(name: name, response_view: response_view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, run_task_client_stub.call_rpc_count + end + end + + def test_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::Tasks::V2beta2::CloudTasks::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::Tasks::V2beta2::CloudTasks::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::Tasks::V2beta2::CloudTasks::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/test/helper.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta2/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/.gitignore b/owl-bot-staging/google-cloud-tasks-v2beta3/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/.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-tasks-v2beta3/.repo-metadata.json b/owl-bot-staging/google-cloud-tasks-v2beta3/.repo-metadata.json new file mode 100644 index 000000000000..1acb6f32f0fe --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "cloudtasks.googleapis.com", + "api_shortname": "cloudtasks", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta3/latest", + "distribution_name": "google-cloud-tasks-v2beta3", + "is_cloud": true, + "language": "ruby", + "name": "cloudtasks", + "name_pretty": "Cloud Tasks V2beta3 API", + "product_documentation": "https://cloud.google.com/tasks", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Cloud Tasks is a fully managed service that allows you to manage the execution, dispatch and delivery of a large number of distributed tasks. You can asynchronously perform work outside of a user request. Your tasks can be executed on App Engine or any arbitrary HTTP endpoint. Note that google-cloud-tasks-v2beta3 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-tasks instead. See the readme for more details.", + "ruby-cloud-env-prefix": "TASKS", + "ruby-cloud-product-url": "https://cloud.google.com/tasks", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/.rubocop.yml b/owl-bot-staging/google-cloud-tasks-v2beta3/.rubocop.yml new file mode 100644 index 000000000000..da9d8f7ee985 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-tasks-v2beta3.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-tasks-v2beta3.rb" diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/.toys.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/.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-tasks-v2beta3/.yardopts b/owl-bot-staging/google-cloud-tasks-v2beta3/.yardopts new file mode 100644 index 000000000000..07f7a83a5822 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Tasks V2beta3 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-tasks-v2beta3/AUTHENTICATION.md b/owl-bot-staging/google-cloud-tasks-v2beta3/AUTHENTICATION.md new file mode 100644 index 000000000000..8a26642ba1e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-tasks-v2beta3 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-tasks-v2beta3 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/tasks/v2beta3" + +client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/tasks/v2beta3" + +::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::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-tasks-v2beta3 +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/tasks/v2beta3" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::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-tasks-v2beta3/CHANGELOG.md b/owl-bot-staging/google-cloud-tasks-v2beta3/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/Gemfile b/owl-bot-staging/google-cloud-tasks-v2beta3/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/LICENSE.md b/owl-bot-staging/google-cloud-tasks-v2beta3/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3/README.md b/owl-bot-staging/google-cloud-tasks-v2beta3/README.md new file mode 100644 index 000000000000..410125fde32f --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Tasks V2beta3 API + +Manages the execution of large numbers of distributed requests. + +Cloud Tasks is a fully managed service that allows you to manage the execution, dispatch and delivery of a large number of distributed tasks. You can asynchronously perform work outside of a user request. Your tasks can be executed on App Engine or any arbitrary HTTP endpoint. + +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 Tasks V2beta3 API. Most users should consider using +the main client gem, +[google-cloud-tasks](https://rubygems.org/gems/google-cloud-tasks). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-tasks-v2beta3 +``` + +## 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/cloudtasks.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/tasks/v2beta3" + +client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new +request = ::Google::Cloud::Tasks::V2beta3::ListQueuesRequest.new # (request fields as keyword arguments...) +response = client.list_queues request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta3/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/tasks) +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/tasks/v2beta3" +require "logger" + +client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::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-tasks`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-tasks-v2beta3`. +_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-tasks`. +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-tasks-v2beta3`. + +### 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-tasks-v2beta3/Rakefile b/owl-bot-staging/google-cloud-tasks-v2beta3/Rakefile new file mode 100644 index 000000000000..9d14c39d473d --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["TASKS_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["TASKS_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["TASKS_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 TASKS_TEST_PROJECT=test123 TASKS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/tasks/v2beta3/cloud_tasks/credentials" + ::Google::Cloud::Tasks::V2beta3::CloudTasks::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["TASKS_PROJECT"] = project + ENV["TASKS_TEST_PROJECT"] = project + ENV["TASKS_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-tasks-v2beta3 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-tasks-v2beta3 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-tasks-v2beta3 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-tasks-v2beta3 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-tasks-v2beta3" + header "google-cloud-tasks-v2beta3 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-tasks-v2beta3 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-tasks-v2beta3 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-tasks-v2beta3 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-tasks-v2beta3 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-tasks-v2beta3/gapic_metadata.json b/owl-bot-staging/google-cloud-tasks-v2beta3/gapic_metadata.json new file mode 100644 index 000000000000..d31c26024e7f --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/gapic_metadata.json @@ -0,0 +1,98 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.tasks.v2beta3", + "libraryPackage": "::Google::Cloud::Tasks::V2beta3", + "services": { + "CloudTasks": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client", + "rpcs": { + "ListQueues": { + "methods": [ + "list_queues" + ] + }, + "GetQueue": { + "methods": [ + "get_queue" + ] + }, + "CreateQueue": { + "methods": [ + "create_queue" + ] + }, + "UpdateQueue": { + "methods": [ + "update_queue" + ] + }, + "DeleteQueue": { + "methods": [ + "delete_queue" + ] + }, + "PurgeQueue": { + "methods": [ + "purge_queue" + ] + }, + "PauseQueue": { + "methods": [ + "pause_queue" + ] + }, + "ResumeQueue": { + "methods": [ + "resume_queue" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + }, + "ListTasks": { + "methods": [ + "list_tasks" + ] + }, + "GetTask": { + "methods": [ + "get_task" + ] + }, + "CreateTask": { + "methods": [ + "create_task" + ] + }, + "DeleteTask": { + "methods": [ + "delete_task" + ] + }, + "RunTask": { + "methods": [ + "run_task" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/google-cloud-tasks-v2beta3.gemspec b/owl-bot-staging/google-cloud-tasks-v2beta3/google-cloud-tasks-v2beta3.gemspec new file mode 100644 index 000000000000..4ec7216e415b --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/google-cloud-tasks-v2beta3.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/tasks/v2beta3/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-tasks-v2beta3" + gem.version = Google::Cloud::Tasks::V2beta3::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Cloud Tasks is a fully managed service that allows you to manage the execution, dispatch and delivery of a large number of distributed tasks. You can asynchronously perform work outside of a user request. Your tasks can be executed on App Engine or any arbitrary HTTP endpoint. Note that google-cloud-tasks-v2beta3 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-tasks instead. See the readme for more details." + gem.summary = "Manages the execution of large numbers of distributed requests." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google-cloud-tasks-v2beta3.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google-cloud-tasks-v2beta3.rb new file mode 100644 index 000000000000..dbe62c531a09 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google-cloud-tasks-v2beta3.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/tasks/v2beta3" diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3.rb new file mode 100644 index 000000000000..4a4e1bf079bd --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3.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/tasks/v2beta3/cloud_tasks" +require "google/cloud/tasks/v2beta3/version" + +module Google + module Cloud + module Tasks + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/tasks/v2beta3" + # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/tasks/v2beta3" + # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new + # + module V2beta3 + end + end + end +end + +helper_path = ::File.join __dir__, "v2beta3", "_helpers.rb" +require "google/cloud/tasks/v2beta3/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/bindings_override.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/bindings_override.rb new file mode 100644 index 000000000000..52093b505354 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/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 Tasks + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/tasks/v2beta3/rest" + # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new + # + module V2beta3 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Tasks"] + 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: "/v2beta3/{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: "/v2beta3/{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-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks.rb new file mode 100644 index 000000000000..ab36034a01a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks.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/tasks/v2beta3/version" + +require "google/cloud/tasks/v2beta3/cloud_tasks/credentials" +require "google/cloud/tasks/v2beta3/cloud_tasks/paths" +require "google/cloud/tasks/v2beta3/cloud_tasks/client" +require "google/cloud/tasks/v2beta3/cloud_tasks/rest" + +module Google + module Cloud + module Tasks + module V2beta3 + ## + # Cloud Tasks allows developers to manage the execution of background + # work in their applications. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/tasks/v2beta3/cloud_tasks" + # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/tasks/v2beta3/cloud_tasks/rest" + # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new + # + module CloudTasks + end + end + end + end +end + +helper_path = ::File.join __dir__, "cloud_tasks", "helpers.rb" +require "google/cloud/tasks/v2beta3/cloud_tasks/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/client.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/client.rb new file mode 100644 index 000000000000..87441ecbb60b --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/client.rb @@ -0,0 +1,2277 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/tasks/v2beta3/cloudtasks_pb" +require "google/cloud/location" + +module Google + module Cloud + module Tasks + module V2beta3 + module CloudTasks + ## + # Client for the CloudTasks service. + # + # Cloud Tasks allows developers to manage the execution of background + # work in their applications. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudtasks.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_tasks_stub + + ## + # Configure the CloudTasks Client class. + # + # See {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudTasks clients + # ::Google::Cloud::Tasks::V2beta3::CloudTasks::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", "Tasks", "V2beta3"] + 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_queues.timeout = 20.0 + default_config.rpcs.list_queues.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_queue.timeout = 20.0 + default_config.rpcs.get_queue.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_queue.timeout = 20.0 + + default_config.rpcs.update_queue.timeout = 20.0 + + default_config.rpcs.delete_queue.timeout = 20.0 + default_config.rpcs.delete_queue.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.purge_queue.timeout = 20.0 + + default_config.rpcs.pause_queue.timeout = 20.0 + + default_config.rpcs.resume_queue.timeout = 20.0 + + default_config.rpcs.get_iam_policy.timeout = 20.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.set_iam_policy.timeout = 20.0 + + default_config.rpcs.test_iam_permissions.timeout = 20.0 + default_config.rpcs.test_iam_permissions.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_tasks.timeout = 20.0 + default_config.rpcs.list_tasks.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_task.timeout = 20.0 + default_config.rpcs.get_task.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_task.timeout = 20.0 + + default_config.rpcs.delete_task.timeout = 20.0 + default_config.rpcs.delete_task.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.run_task.timeout = 20.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudTasks 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::Tasks::V2beta3::CloudTasks::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_tasks_stub.universe_domain + end + + ## + # Create a new CloudTasks client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudTasks 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/tasks/v2beta3/cloudtasks_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 + + @cloud_tasks_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Tasks::V2beta3::CloudTasks::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_tasks_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_tasks_stub.endpoint + config.universe_domain = @cloud_tasks_stub.universe_domain + config.logger = @cloud_tasks_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 + @cloud_tasks_stub.logger + end + + # Service calls + + ## + # Lists queues. + # + # Queues are returned in lexicographical order. + # + # @overload list_queues(request, options = nil) + # Pass arguments to `list_queues` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::ListQueuesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::ListQueuesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_queues(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) + # Pass arguments to `list_queues` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 name. + # For example: `projects/PROJECT_ID/locations/LOCATION_ID` + # @param filter [::String] + # `filter` can be used to specify a subset of queues. Any + # {::Google::Cloud::Tasks::V2beta3::Queue Queue} field can be used as a filter and + # several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + # filter syntax is the same as described in [Stackdriver's Advanced Logs + # Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + # + # Sample filter "state: PAUSED". + # + # Note that using filters might cause fewer queues than the + # requested page_size to be returned. + # @param page_size [::Integer] + # Requested page size. + # + # The maximum page size is 9800. If unspecified, the page size will + # be the maximum. Fewer queues than requested might be returned, + # even if more queues exist; use the + # {::Google::Cloud::Tasks::V2beta3::ListQueuesResponse#next_page_token next_page_token} + # in the response to determine if more queues exist. + # @param page_token [::String] + # A token identifying the page of results to return. + # + # To request the first page results, page_token must be empty. To + # request the next page of results, page_token must be the value of + # {::Google::Cloud::Tasks::V2beta3::ListQueuesResponse#next_page_token next_page_token} + # returned from the previous call to + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_queues ListQueues} method. It + # is an error to switch the value of the + # {::Google::Cloud::Tasks::V2beta3::ListQueuesRequest#filter filter} while + # iterating through pages. + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Read mask is used for a more granular control over what the API + # returns. If the mask is not present all fields will be returned except + # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + # specified in the mask. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2beta3::Queue>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2beta3::Queue>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::ListQueuesRequest.new + # + # # Call the list_queues method. + # result = client.list_queues request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Tasks::V2beta3::Queue. + # p item + # end + # + def list_queues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::ListQueuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_queues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_queues.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_queues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :list_queues, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_tasks_stub, :list_queues, 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 queue. + # + # @overload get_queue(request, options = nil) + # Pass arguments to `get_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::GetQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::GetQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_queue(name: nil, read_mask: nil) + # Pass arguments to `get_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the queue. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Read mask is used for a more granular control over what the API + # returns. If the mask is not present all fields will be returned except + # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + # specified in the mask. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2beta3::Queue] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Queue] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::GetQueueRequest.new + # + # # Call the get_queue method. + # result = client.get_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. + # p result + # + def get_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::GetQueueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_queue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :get_queue, request, 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 queue. + # + # Queues created with this method allow tasks to live for a maximum of 31 + # days. After a task is 31 days old, the task will be deleted regardless of + # whether it was dispatched or not. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + # + # @overload create_queue(request, options = nil) + # Pass arguments to `create_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::CreateQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::CreateQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_queue(parent: nil, queue: nil) + # Pass arguments to `create_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 name in which the queue will be created. + # For example: `projects/PROJECT_ID/locations/LOCATION_ID` + # + # The list of allowed locations can be obtained by calling Cloud + # Tasks' implementation of + # [ListLocations][google.cloud.location.Locations.ListLocations]. + # @param queue [::Google::Cloud::Tasks::V2beta3::Queue, ::Hash] + # Required. The queue to create. + # + # [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as + # an existing queue. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2beta3::Queue] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Queue] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::CreateQueueRequest.new + # + # # Call the create_queue method. + # result = client.create_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. + # p result + # + def create_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::CreateQueueRequest + + # Converts hash and nil to 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_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_queue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :create_queue, request, 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 queue. + # + # This method creates the queue if it does not exist and updates + # the queue if it does exist. + # + # Queues created with this method allow tasks to live for a maximum of 31 + # days. After a task is 31 days old, the task will be deleted regardless of + # whether it was dispatched or not. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + # + # @overload update_queue(request, options = nil) + # Pass arguments to `update_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_queue(queue: nil, update_mask: nil) + # Pass arguments to `update_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param queue [::Google::Cloud::Tasks::V2beta3::Queue, ::Hash] + # Required. The queue to create or update. + # + # The queue's {::Google::Cloud::Tasks::V2beta3::Queue#name name} must be + # specified. + # + # Output only fields cannot be modified using UpdateQueue. + # Any value specified for an output only field will be ignored. + # The queue's {::Google::Cloud::Tasks::V2beta3::Queue#name name} cannot be + # changed. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # A mask used to specify which fields of the queue are being updated. + # + # If empty, then all fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2beta3::Queue] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Queue] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::UpdateQueueRequest.new + # + # # Call the update_queue method. + # result = client.update_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. + # p result + # + def update_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest + + # Converts hash and nil to 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_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.queue&.name + header_params["queue.name"] = request.queue.name + end + + request_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_queue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :update_queue, request, 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 queue. + # + # This command will delete the queue even if it has tasks in it. + # + # Note: If you delete a queue, a queue with the same name can't be created + # for 7 days. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + # + # @overload delete_queue(request, options = nil) + # Pass arguments to `delete_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_queue(name: nil) + # Pass arguments to `delete_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::DeleteQueueRequest.new + # + # # Call the delete_queue method. + # result = client.delete_queue request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest + + # Converts hash and nil to 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_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_queue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :delete_queue, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Purges a queue by deleting all of its tasks. + # + # All tasks created before this method is called are permanently deleted. + # + # Purge operations can take up to one minute to take effect. Tasks + # might be dispatched before the purge takes effect. A purge is irreversible. + # + # @overload purge_queue(request, options = nil) + # Pass arguments to `purge_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload purge_queue(name: nil) + # Pass arguments to `purge_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2beta3::Queue] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Queue] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::PurgeQueueRequest.new + # + # # Call the purge_queue method. + # result = client.purge_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. + # p result + # + def purge_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.purge_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.purge_queue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.purge_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :purge_queue, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Pauses the queue. + # + # If a queue is paused then the system will stop dispatching tasks + # until the queue is resumed via + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#resume_queue ResumeQueue}. Tasks can + # still be added when the queue is paused. A queue is paused if its + # {::Google::Cloud::Tasks::V2beta3::Queue#state state} is + # {::Google::Cloud::Tasks::V2beta3::Queue::State::PAUSED PAUSED}. + # + # @overload pause_queue(request, options = nil) + # Pass arguments to `pause_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::PauseQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::PauseQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload pause_queue(name: nil) + # Pass arguments to `pause_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2beta3::Queue] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Queue] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::PauseQueueRequest.new + # + # # Call the pause_queue method. + # result = client.pause_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. + # p result + # + def pause_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::PauseQueueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.pause_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.pause_queue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.pause_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :pause_queue, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Resume a queue. + # + # This method resumes a queue after it has been + # {::Google::Cloud::Tasks::V2beta3::Queue::State::PAUSED PAUSED} or + # {::Google::Cloud::Tasks::V2beta3::Queue::State::DISABLED DISABLED}. The state of a + # queue is stored in the queue's + # {::Google::Cloud::Tasks::V2beta3::Queue#state state}; after calling this method + # it will be set to + # {::Google::Cloud::Tasks::V2beta3::Queue::State::RUNNING RUNNING}. + # + # WARNING: Resuming many high-QPS queues at the same time can + # lead to target overloading. If you are resuming high-QPS + # queues, follow the 500/50/5 pattern described in + # [Managing Cloud Tasks Scaling + # Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). + # + # @overload resume_queue(request, options = nil) + # Pass arguments to `resume_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload resume_queue(name: nil) + # Pass arguments to `resume_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2beta3::Queue] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Queue] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::ResumeQueueRequest.new + # + # # Call the resume_queue method. + # result = client.resume_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. + # p result + # + def resume_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.resume_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.resume_queue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.resume_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :resume_queue, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy for a + # {::Google::Cloud::Tasks::V2beta3::Queue Queue}. Returns an empty policy if the + # resource exists and does not have a policy set. + # + # Authorization requires the following + # [Google IAM](https://cloud.google.com/iam) permission on the specified + # resource parent: + # + # * `cloudtasks.queues.getIamPolicy` + # + # @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/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::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::Tasks::V2beta3::VERSION + metadata[:"x-goog-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_tasks_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy for a + # {::Google::Cloud::Tasks::V2beta3::Queue Queue}. Replaces any existing policy. + # + # Note: The Cloud Console does not check queue-level IAM permissions yet. + # Project-level permissions are required to use the Cloud Console. + # + # Authorization requires the following + # [Google IAM](https://cloud.google.com/iam) permission on the specified + # resource parent: + # + # * `cloudtasks.queues.setIamPolicy` + # + # @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/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::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::Tasks::V2beta3::VERSION + metadata[:"x-goog-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_tasks_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns permissions that a caller has on a + # {::Google::Cloud::Tasks::V2beta3::Queue Queue}. If the resource does not exist, + # this will return an empty set of permissions, not a + # [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + # + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::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::Tasks::V2beta3::VERSION + metadata[:"x-goog-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_tasks_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 + + ## + # Lists the tasks in a queue. + # + # By default, only the {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC} + # view is retrieved due to performance considerations; + # {::Google::Cloud::Tasks::V2beta3::ListTasksRequest#response_view response_view} + # controls the subset of information which is returned. + # + # The tasks may be returned in any order. The ordering may change at any + # time. + # + # @overload list_tasks(request, options = nil) + # Pass arguments to `list_tasks` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::ListTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::ListTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_tasks(parent: nil, response_view: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_tasks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # @param response_view [::Google::Cloud::Tasks::V2beta3::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta3::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta3::Task Task} resource. + # @param page_size [::Integer] + # Maximum page size. + # + # Fewer tasks than requested might be returned, even if more tasks exist; use + # {::Google::Cloud::Tasks::V2beta3::ListTasksResponse#next_page_token next_page_token} + # in the response to determine if more tasks exist. + # + # The maximum page size is 1000. If unspecified, the page size will be the + # maximum. + # @param page_token [::String] + # A token identifying the page of results to return. + # + # To request the first page results, page_token must be empty. To + # request the next page of results, page_token must be the value of + # {::Google::Cloud::Tasks::V2beta3::ListTasksResponse#next_page_token next_page_token} + # returned from the previous call to + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_tasks ListTasks} method. + # + # The page token is valid for only 2 hours. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2beta3::Task>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2beta3::Task>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::ListTasksRequest.new + # + # # Call the list_tasks method. + # result = client.list_tasks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Tasks::V2beta3::Task. + # p item + # end + # + def list_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::ListTasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_tasks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_tasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :list_tasks, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_tasks_stub, :list_tasks, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a task. + # + # @overload get_task(request, options = nil) + # Pass arguments to `get_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::GetTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::GetTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_task(name: nil, response_view: nil) + # Pass arguments to `get_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @param response_view [::Google::Cloud::Tasks::V2beta3::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta3::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta3::Task Task} resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2beta3::Task] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Task] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::GetTaskRequest.new + # + # # Call the get_task method. + # result = client.get_task request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta3::Task. + # p result + # + def get_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::GetTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :get_task, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a task and adds it to a queue. + # + # Tasks cannot be updated after creation; there is no UpdateTask command. + # + # * The maximum task size is 100KB. + # + # @overload create_task(request, options = nil) + # Pass arguments to `create_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::CreateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::CreateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_task(parent: nil, task: nil, response_view: nil) + # Pass arguments to `create_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # + # The queue must already exist. + # @param task [::Google::Cloud::Tasks::V2beta3::Task, ::Hash] + # Required. The task to add. + # + # Task names have the following format: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + # The user can optionally specify a task + # {::Google::Cloud::Tasks::V2beta3::Task#name name}. If a name is not specified + # then the system will generate a random unique task id, which will be set in + # the task returned in the {::Google::Cloud::Tasks::V2beta3::Task#name response}. + # + # If {::Google::Cloud::Tasks::V2beta3::Task#schedule_time schedule_time} is not + # set or is in the past then Cloud Tasks will set it to the current time. + # + # Task De-duplication: + # + # Explicitly specifying a task ID enables task de-duplication. If + # a task's ID is identical to that of an existing task or a task + # that was deleted or executed recently then the call will fail + # with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + # If the task's queue was created using Cloud Tasks, then another task with + # the same name can't be created for ~1 hour after the original task was + # deleted or executed. If the task's queue was created using queue.yaml or + # queue.xml, then another task with the same name can't be created + # for ~9 days after the original task was deleted or executed. + # + # Because there is an extra lookup cost to identify duplicate task + # names, these {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task CreateTask} + # calls have significantly increased latency. Using hashed strings for the + # task id or for the prefix of the task id is recommended. Choosing task ids + # that are sequential or have sequential prefixes, for example using a + # timestamp, causes an increase in latency and error rates in all + # task commands. The infrastructure relies on an approximately + # uniform distribution of task ids to store and serve tasks + # efficiently. + # @param response_view [::Google::Cloud::Tasks::V2beta3::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta3::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta3::Task Task} resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2beta3::Task] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Task] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::CreateTaskRequest.new + # + # # Call the create_task method. + # result = client.create_task request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta3::Task. + # p result + # + def create_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::CreateTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :create_task, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a task. + # + # A task can be deleted if it is scheduled or dispatched. A task + # cannot be deleted if it has executed successfully or permanently + # failed. + # + # @overload delete_task(request, options = nil) + # Pass arguments to `delete_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_task(name: nil) + # Pass arguments to `delete_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::DeleteTaskRequest.new + # + # # Call the delete_task method. + # result = client.delete_task request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :delete_task, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Forces a task to run now. + # + # When this method is called, Cloud Tasks will dispatch the task, even if + # the task is already running, the queue has reached its + # {::Google::Cloud::Tasks::V2beta3::RateLimits RateLimits} or is + # {::Google::Cloud::Tasks::V2beta3::Queue::State::PAUSED PAUSED}. + # + # This command is meant to be used for manual debugging. For + # example, {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#run_task RunTask} can be + # used to retry a failed task after a fix has been made or to manually force + # a task to be dispatched now. + # + # The dispatched task is returned. That is, the task that is returned + # contains the [status][Task.status] after the task is dispatched but + # before the task is received by its target. + # + # If Cloud Tasks receives a successful response from the task's + # target, then the task will be deleted; otherwise the task's + # {::Google::Cloud::Tasks::V2beta3::Task#schedule_time schedule_time} will be + # reset to the time that + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#run_task RunTask} was called plus + # the retry delay specified in the queue's + # {::Google::Cloud::Tasks::V2beta3::RetryConfig RetryConfig}. + # + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#run_task RunTask} returns + # [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a + # task that has already succeeded or permanently failed. + # + # @overload run_task(request, options = nil) + # Pass arguments to `run_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::RunTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::RunTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload run_task(name: nil, response_view: nil) + # Pass arguments to `run_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @param response_view [::Google::Cloud::Tasks::V2beta3::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta3::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta3::Task Task} resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tasks::V2beta3::Task] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Task] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::RunTaskRequest.new + # + # # Call the run_task method. + # result = client.run_task request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta3::Task. + # p result + # + def run_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::RunTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.run_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.run_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.run_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.call_rpc :run_task, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CloudTasks API. + # + # This class represents the configuration for CloudTasks, + # 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::Tasks::V2beta3::CloudTasks::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_queues to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_queues.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_queues.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::Tasks::V2beta3::CloudTasks::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 = "cloudtasks.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 CloudTasks 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_queues` + # @return [::Gapic::Config::Method] + # + attr_reader :list_queues + ## + # RPC-specific configuration for `get_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :get_queue + ## + # RPC-specific configuration for `create_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :create_queue + ## + # RPC-specific configuration for `update_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :update_queue + ## + # RPC-specific configuration for `delete_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_queue + ## + # RPC-specific configuration for `purge_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :purge_queue + ## + # RPC-specific configuration for `pause_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :pause_queue + ## + # RPC-specific configuration for `resume_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :resume_queue + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `list_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tasks + ## + # RPC-specific configuration for `get_task` + # @return [::Gapic::Config::Method] + # + attr_reader :get_task + ## + # RPC-specific configuration for `create_task` + # @return [::Gapic::Config::Method] + # + attr_reader :create_task + ## + # RPC-specific configuration for `delete_task` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_task + ## + # RPC-specific configuration for `run_task` + # @return [::Gapic::Config::Method] + # + attr_reader :run_task + + # @private + def initialize parent_rpcs = nil + list_queues_config = parent_rpcs.list_queues if parent_rpcs.respond_to? :list_queues + @list_queues = ::Gapic::Config::Method.new list_queues_config + get_queue_config = parent_rpcs.get_queue if parent_rpcs.respond_to? :get_queue + @get_queue = ::Gapic::Config::Method.new get_queue_config + create_queue_config = parent_rpcs.create_queue if parent_rpcs.respond_to? :create_queue + @create_queue = ::Gapic::Config::Method.new create_queue_config + update_queue_config = parent_rpcs.update_queue if parent_rpcs.respond_to? :update_queue + @update_queue = ::Gapic::Config::Method.new update_queue_config + delete_queue_config = parent_rpcs.delete_queue if parent_rpcs.respond_to? :delete_queue + @delete_queue = ::Gapic::Config::Method.new delete_queue_config + purge_queue_config = parent_rpcs.purge_queue if parent_rpcs.respond_to? :purge_queue + @purge_queue = ::Gapic::Config::Method.new purge_queue_config + pause_queue_config = parent_rpcs.pause_queue if parent_rpcs.respond_to? :pause_queue + @pause_queue = ::Gapic::Config::Method.new pause_queue_config + resume_queue_config = parent_rpcs.resume_queue if parent_rpcs.respond_to? :resume_queue + @resume_queue = ::Gapic::Config::Method.new resume_queue_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks + @list_tasks = ::Gapic::Config::Method.new list_tasks_config + get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task + @get_task = ::Gapic::Config::Method.new get_task_config + create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task + @create_task = ::Gapic::Config::Method.new create_task_config + delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task + @delete_task = ::Gapic::Config::Method.new delete_task_config + run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task + @run_task = ::Gapic::Config::Method.new run_task_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/credentials.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/credentials.rb new file mode 100644 index 000000000000..3bccd23bae21 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/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 Tasks + module V2beta3 + module CloudTasks + # Credentials for the CloudTasks API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "TASKS_CREDENTIALS", + "TASKS_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "TASKS_CREDENTIALS_JSON", + "TASKS_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-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/paths.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/paths.rb new file mode 100644 index 000000000000..eecb06ef35df --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/paths.rb @@ -0,0 +1,90 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Tasks + module V2beta3 + module CloudTasks + # Path helper methods for the CloudTasks API. + module Paths + ## + # 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 Queue resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/queues/{queue}` + # + # @param project [String] + # @param location [String] + # @param queue [String] + # + # @return [::String] + def queue_path project:, location:, queue: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/queues/#{queue}" + end + + ## + # Create a fully-qualified Task resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/queues/{queue}/tasks/{task}` + # + # @param project [String] + # @param location [String] + # @param queue [String] + # @param task [String] + # + # @return [::String] + def task_path project:, location:, queue:, task: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "queue cannot contain /" if queue.to_s.include? "/" + + "projects/#{project}/locations/#{location}/queues/#{queue}/tasks/#{task}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/rest.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/rest.rb new file mode 100644 index 000000000000..b443ca9c286e --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/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/tasks/v2beta3/version" +require "google/cloud/tasks/v2beta3/bindings_override" + +require "google/cloud/tasks/v2beta3/cloud_tasks/credentials" +require "google/cloud/tasks/v2beta3/cloud_tasks/paths" +require "google/cloud/tasks/v2beta3/cloud_tasks/rest/client" + +module Google + module Cloud + module Tasks + module V2beta3 + ## + # Cloud Tasks allows developers to manage the execution of background + # work in their applications. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/tasks/v2beta3/cloud_tasks/rest" + # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new + # + module CloudTasks + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/tasks/v2beta3/cloud_tasks/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/rest/client.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/rest/client.rb new file mode 100644 index 000000000000..0c27095bec5c --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/rest/client.rb @@ -0,0 +1,2130 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/tasks/v2beta3/cloudtasks_pb" +require "google/cloud/tasks/v2beta3/cloud_tasks/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module Tasks + module V2beta3 + module CloudTasks + module Rest + ## + # REST client for the CloudTasks service. + # + # Cloud Tasks allows developers to manage the execution of background + # work in their applications. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudtasks.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_tasks_stub + + ## + # Configure the CloudTasks Client class. + # + # See {::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudTasks clients + # ::Google::Cloud::Tasks::V2beta3::CloudTasks::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", "Tasks", "V2beta3"] + 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_queues.timeout = 20.0 + default_config.rpcs.list_queues.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_queue.timeout = 20.0 + default_config.rpcs.get_queue.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_queue.timeout = 20.0 + + default_config.rpcs.update_queue.timeout = 20.0 + + default_config.rpcs.delete_queue.timeout = 20.0 + default_config.rpcs.delete_queue.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.purge_queue.timeout = 20.0 + + default_config.rpcs.pause_queue.timeout = 20.0 + + default_config.rpcs.resume_queue.timeout = 20.0 + + default_config.rpcs.get_iam_policy.timeout = 20.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.set_iam_policy.timeout = 20.0 + + default_config.rpcs.test_iam_permissions.timeout = 20.0 + default_config.rpcs.test_iam_permissions.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_tasks.timeout = 20.0 + default_config.rpcs.list_tasks.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_task.timeout = 20.0 + default_config.rpcs.get_task.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_task.timeout = 20.0 + + default_config.rpcs.delete_task.timeout = 20.0 + default_config.rpcs.delete_task.retry_policy = { + initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.run_task.timeout = 20.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudTasks 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::Tasks::V2beta3::CloudTasks::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_tasks_stub.universe_domain + end + + ## + # Create a new CloudTasks REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudTasks 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 + + @cloud_tasks_stub = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @cloud_tasks_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_tasks_stub.endpoint + config.universe_domain = @cloud_tasks_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @cloud_tasks_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 + @cloud_tasks_stub.logger + end + + # Service calls + + ## + # Lists queues. + # + # Queues are returned in lexicographical order. + # + # @overload list_queues(request, options = nil) + # Pass arguments to `list_queues` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::ListQueuesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::ListQueuesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_queues(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) + # Pass arguments to `list_queues` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 name. + # For example: `projects/PROJECT_ID/locations/LOCATION_ID` + # @param filter [::String] + # `filter` can be used to specify a subset of queues. Any + # {::Google::Cloud::Tasks::V2beta3::Queue Queue} field can be used as a filter and + # several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + # filter syntax is the same as described in [Stackdriver's Advanced Logs + # Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + # + # Sample filter "state: PAUSED". + # + # Note that using filters might cause fewer queues than the + # requested page_size to be returned. + # @param page_size [::Integer] + # Requested page size. + # + # The maximum page size is 9800. If unspecified, the page size will + # be the maximum. Fewer queues than requested might be returned, + # even if more queues exist; use the + # {::Google::Cloud::Tasks::V2beta3::ListQueuesResponse#next_page_token next_page_token} + # in the response to determine if more queues exist. + # @param page_token [::String] + # A token identifying the page of results to return. + # + # To request the first page results, page_token must be empty. To + # request the next page of results, page_token must be the value of + # {::Google::Cloud::Tasks::V2beta3::ListQueuesResponse#next_page_token next_page_token} + # returned from the previous call to + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client#list_queues ListQueues} method. It + # is an error to switch the value of the + # {::Google::Cloud::Tasks::V2beta3::ListQueuesRequest#filter filter} while + # iterating through pages. + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Read mask is used for a more granular control over what the API + # returns. If the mask is not present all fields will be returned except + # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + # specified in the mask. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2beta3::Queue>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2beta3::Queue>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::ListQueuesRequest.new + # + # # Call the list_queues method. + # result = client.list_queues request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Tasks::V2beta3::Queue. + # p item + # end + # + def list_queues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::ListQueuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_queues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_queues.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_queues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.list_queues request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_tasks_stub, :list_queues, "queues", 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 queue. + # + # @overload get_queue(request, options = nil) + # Pass arguments to `get_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::GetQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::GetQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_queue(name: nil, read_mask: nil) + # Pass arguments to `get_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the queue. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Read mask is used for a more granular control over what the API + # returns. If the mask is not present all fields will be returned except + # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + # specified in the mask. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Queue] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::GetQueueRequest.new + # + # # Call the get_queue method. + # result = client.get_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. + # p result + # + def get_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::GetQueueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_queue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.get_queue request, 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 queue. + # + # Queues created with this method allow tasks to live for a maximum of 31 + # days. After a task is 31 days old, the task will be deleted regardless of + # whether it was dispatched or not. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + # + # @overload create_queue(request, options = nil) + # Pass arguments to `create_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::CreateQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::CreateQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_queue(parent: nil, queue: nil) + # Pass arguments to `create_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 name in which the queue will be created. + # For example: `projects/PROJECT_ID/locations/LOCATION_ID` + # + # The list of allowed locations can be obtained by calling Cloud + # Tasks' implementation of + # [ListLocations][google.cloud.location.Locations.ListLocations]. + # @param queue [::Google::Cloud::Tasks::V2beta3::Queue, ::Hash] + # Required. The queue to create. + # + # [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as + # an existing queue. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Queue] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::CreateQueueRequest.new + # + # # Call the create_queue method. + # result = client.create_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. + # p result + # + def create_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::CreateQueueRequest + + # Converts hash and nil to an 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_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_queue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.create_queue request, 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 queue. + # + # This method creates the queue if it does not exist and updates + # the queue if it does exist. + # + # Queues created with this method allow tasks to live for a maximum of 31 + # days. After a task is 31 days old, the task will be deleted regardless of + # whether it was dispatched or not. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + # + # @overload update_queue(request, options = nil) + # Pass arguments to `update_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_queue(queue: nil, update_mask: nil) + # Pass arguments to `update_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param queue [::Google::Cloud::Tasks::V2beta3::Queue, ::Hash] + # Required. The queue to create or update. + # + # The queue's {::Google::Cloud::Tasks::V2beta3::Queue#name name} must be + # specified. + # + # Output only fields cannot be modified using UpdateQueue. + # Any value specified for an output only field will be ignored. + # The queue's {::Google::Cloud::Tasks::V2beta3::Queue#name name} cannot be + # changed. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # A mask used to specify which fields of the queue are being updated. + # + # If empty, then all fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Queue] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::UpdateQueueRequest.new + # + # # Call the update_queue method. + # result = client.update_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. + # p result + # + def update_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest + + # Converts hash and nil to an 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_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_queue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.update_queue request, 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 queue. + # + # This command will delete the queue even if it has tasks in it. + # + # Note: If you delete a queue, a queue with the same name can't be created + # for 7 days. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + # + # @overload delete_queue(request, options = nil) + # Pass arguments to `delete_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_queue(name: nil) + # Pass arguments to `delete_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::DeleteQueueRequest.new + # + # # Call the delete_queue method. + # result = client.delete_queue request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest + + # Converts hash and nil to an 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_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_queue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.delete_queue request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Purges a queue by deleting all of its tasks. + # + # All tasks created before this method is called are permanently deleted. + # + # Purge operations can take up to one minute to take effect. Tasks + # might be dispatched before the purge takes effect. A purge is irreversible. + # + # @overload purge_queue(request, options = nil) + # Pass arguments to `purge_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload purge_queue(name: nil) + # Pass arguments to `purge_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Queue] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::PurgeQueueRequest.new + # + # # Call the purge_queue method. + # result = client.purge_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. + # p result + # + def purge_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.purge_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.purge_queue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.purge_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.purge_queue request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Pauses the queue. + # + # If a queue is paused then the system will stop dispatching tasks + # until the queue is resumed via + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client#resume_queue ResumeQueue}. Tasks can + # still be added when the queue is paused. A queue is paused if its + # {::Google::Cloud::Tasks::V2beta3::Queue#state state} is + # {::Google::Cloud::Tasks::V2beta3::Queue::State::PAUSED PAUSED}. + # + # @overload pause_queue(request, options = nil) + # Pass arguments to `pause_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::PauseQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::PauseQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload pause_queue(name: nil) + # Pass arguments to `pause_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Queue] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::PauseQueueRequest.new + # + # # Call the pause_queue method. + # result = client.pause_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. + # p result + # + def pause_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::PauseQueueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.pause_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.pause_queue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.pause_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.pause_queue request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Resume a queue. + # + # This method resumes a queue after it has been + # {::Google::Cloud::Tasks::V2beta3::Queue::State::PAUSED PAUSED} or + # {::Google::Cloud::Tasks::V2beta3::Queue::State::DISABLED DISABLED}. The state of a + # queue is stored in the queue's + # {::Google::Cloud::Tasks::V2beta3::Queue#state state}; after calling this method + # it will be set to + # {::Google::Cloud::Tasks::V2beta3::Queue::State::RUNNING RUNNING}. + # + # WARNING: Resuming many high-QPS queues at the same time can + # lead to target overloading. If you are resuming high-QPS + # queues, follow the 500/50/5 pattern described in + # [Managing Cloud Tasks Scaling + # Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). + # + # @overload resume_queue(request, options = nil) + # Pass arguments to `resume_queue` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload resume_queue(name: nil) + # Pass arguments to `resume_queue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Queue] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::ResumeQueueRequest.new + # + # # Call the resume_queue method. + # result = client.resume_queue request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. + # p result + # + def resume_queue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.resume_queue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.resume_queue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.resume_queue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.resume_queue request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy for a + # {::Google::Cloud::Tasks::V2beta3::Queue Queue}. Returns an empty policy if the + # resource exists and does not have a policy set. + # + # Authorization requires the following + # [Google IAM](https://cloud.google.com/iam) permission on the specified + # resource parent: + # + # * `cloudtasks.queues.getIamPolicy` + # + # @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/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::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::Tasks::V2beta3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_tasks_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy for a + # {::Google::Cloud::Tasks::V2beta3::Queue Queue}. Replaces any existing policy. + # + # Note: The Cloud Console does not check queue-level IAM permissions yet. + # Project-level permissions are required to use the Cloud Console. + # + # Authorization requires the following + # [Google IAM](https://cloud.google.com/iam) permission on the specified + # resource parent: + # + # * `cloudtasks.queues.setIamPolicy` + # + # @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/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::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::Tasks::V2beta3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_tasks_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns permissions that a caller has on a + # {::Google::Cloud::Tasks::V2beta3::Queue Queue}. If the resource does not exist, + # this will return an empty set of permissions, not a + # [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + # + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::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::Tasks::V2beta3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_tasks_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 + + ## + # Lists the tasks in a queue. + # + # By default, only the {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC} + # view is retrieved due to performance considerations; + # {::Google::Cloud::Tasks::V2beta3::ListTasksRequest#response_view response_view} + # controls the subset of information which is returned. + # + # The tasks may be returned in any order. The ordering may change at any + # time. + # + # @overload list_tasks(request, options = nil) + # Pass arguments to `list_tasks` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::ListTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::ListTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_tasks(parent: nil, response_view: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_tasks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # @param response_view [::Google::Cloud::Tasks::V2beta3::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta3::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta3::Task Task} resource. + # @param page_size [::Integer] + # Maximum page size. + # + # Fewer tasks than requested might be returned, even if more tasks exist; use + # {::Google::Cloud::Tasks::V2beta3::ListTasksResponse#next_page_token next_page_token} + # in the response to determine if more tasks exist. + # + # The maximum page size is 1000. If unspecified, the page size will be the + # maximum. + # @param page_token [::String] + # A token identifying the page of results to return. + # + # To request the first page results, page_token must be empty. To + # request the next page of results, page_token must be the value of + # {::Google::Cloud::Tasks::V2beta3::ListTasksResponse#next_page_token next_page_token} + # returned from the previous call to + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client#list_tasks ListTasks} method. + # + # The page token is valid for only 2 hours. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2beta3::Task>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2beta3::Task>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::ListTasksRequest.new + # + # # Call the list_tasks method. + # result = client.list_tasks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Tasks::V2beta3::Task. + # p item + # end + # + def list_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::ListTasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_tasks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_tasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.list_tasks request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_tasks_stub, :list_tasks, "tasks", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a task. + # + # @overload get_task(request, options = nil) + # Pass arguments to `get_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::GetTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::GetTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_task(name: nil, response_view: nil) + # Pass arguments to `get_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @param response_view [::Google::Cloud::Tasks::V2beta3::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta3::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta3::Task Task} resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Task] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::GetTaskRequest.new + # + # # Call the get_task method. + # result = client.get_task request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta3::Task. + # p result + # + def get_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::GetTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.get_task request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a task and adds it to a queue. + # + # Tasks cannot be updated after creation; there is no UpdateTask command. + # + # * The maximum task size is 100KB. + # + # @overload create_task(request, options = nil) + # Pass arguments to `create_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::CreateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::CreateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_task(parent: nil, task: nil, response_view: nil) + # Pass arguments to `create_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # + # The queue must already exist. + # @param task [::Google::Cloud::Tasks::V2beta3::Task, ::Hash] + # Required. The task to add. + # + # Task names have the following format: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + # The user can optionally specify a task + # {::Google::Cloud::Tasks::V2beta3::Task#name name}. If a name is not specified + # then the system will generate a random unique task id, which will be set in + # the task returned in the {::Google::Cloud::Tasks::V2beta3::Task#name response}. + # + # If {::Google::Cloud::Tasks::V2beta3::Task#schedule_time schedule_time} is not + # set or is in the past then Cloud Tasks will set it to the current time. + # + # Task De-duplication: + # + # Explicitly specifying a task ID enables task de-duplication. If + # a task's ID is identical to that of an existing task or a task + # that was deleted or executed recently then the call will fail + # with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + # If the task's queue was created using Cloud Tasks, then another task with + # the same name can't be created for ~1 hour after the original task was + # deleted or executed. If the task's queue was created using queue.yaml or + # queue.xml, then another task with the same name can't be created + # for ~9 days after the original task was deleted or executed. + # + # Because there is an extra lookup cost to identify duplicate task + # names, these {::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client#create_task CreateTask} + # calls have significantly increased latency. Using hashed strings for the + # task id or for the prefix of the task id is recommended. Choosing task ids + # that are sequential or have sequential prefixes, for example using a + # timestamp, causes an increase in latency and error rates in all + # task commands. The infrastructure relies on an approximately + # uniform distribution of task ids to store and serve tasks + # efficiently. + # @param response_view [::Google::Cloud::Tasks::V2beta3::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta3::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta3::Task Task} resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Task] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::CreateTaskRequest.new + # + # # Call the create_task method. + # result = client.create_task request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta3::Task. + # p result + # + def create_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::CreateTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.create_task request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a task. + # + # A task can be deleted if it is scheduled or dispatched. A task + # cannot be deleted if it has executed successfully or permanently + # failed. + # + # @overload delete_task(request, options = nil) + # Pass arguments to `delete_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_task(name: nil) + # Pass arguments to `delete_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::DeleteTaskRequest.new + # + # # Call the delete_task method. + # result = client.delete_task request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.delete_task request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Forces a task to run now. + # + # When this method is called, Cloud Tasks will dispatch the task, even if + # the task is already running, the queue has reached its + # {::Google::Cloud::Tasks::V2beta3::RateLimits RateLimits} or is + # {::Google::Cloud::Tasks::V2beta3::Queue::State::PAUSED PAUSED}. + # + # This command is meant to be used for manual debugging. For + # example, {::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client#run_task RunTask} can be + # used to retry a failed task after a fix has been made or to manually force + # a task to be dispatched now. + # + # The dispatched task is returned. That is, the task that is returned + # contains the [status][Task.status] after the task is dispatched but + # before the task is received by its target. + # + # If Cloud Tasks receives a successful response from the task's + # target, then the task will be deleted; otherwise the task's + # {::Google::Cloud::Tasks::V2beta3::Task#schedule_time schedule_time} will be + # reset to the time that + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client#run_task RunTask} was called plus + # the retry delay specified in the queue's + # {::Google::Cloud::Tasks::V2beta3::RetryConfig RetryConfig}. + # + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client#run_task RunTask} returns + # [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a + # task that has already succeeded or permanently failed. + # + # @overload run_task(request, options = nil) + # Pass arguments to `run_task` via a request object, either of type + # {::Google::Cloud::Tasks::V2beta3::RunTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tasks::V2beta3::RunTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload run_task(name: nil, response_view: nil) + # Pass arguments to `run_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @param response_view [::Google::Cloud::Tasks::V2beta3::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta3::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta3::Task Task} resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Task] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/tasks/v2beta3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tasks::V2beta3::RunTaskRequest.new + # + # # Call the run_task method. + # result = client.run_task request + # + # # The returned object is of type Google::Cloud::Tasks::V2beta3::Task. + # p result + # + def run_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::RunTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.run_task.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.run_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.run_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_tasks_stub.run_task request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CloudTasks REST API. + # + # This class represents the configuration for CloudTasks 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::Tasks::V2beta3::CloudTasks::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_queues to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_queues.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_queues.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 = "cloudtasks.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 CloudTasks 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_queues` + # @return [::Gapic::Config::Method] + # + attr_reader :list_queues + ## + # RPC-specific configuration for `get_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :get_queue + ## + # RPC-specific configuration for `create_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :create_queue + ## + # RPC-specific configuration for `update_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :update_queue + ## + # RPC-specific configuration for `delete_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_queue + ## + # RPC-specific configuration for `purge_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :purge_queue + ## + # RPC-specific configuration for `pause_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :pause_queue + ## + # RPC-specific configuration for `resume_queue` + # @return [::Gapic::Config::Method] + # + attr_reader :resume_queue + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `list_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tasks + ## + # RPC-specific configuration for `get_task` + # @return [::Gapic::Config::Method] + # + attr_reader :get_task + ## + # RPC-specific configuration for `create_task` + # @return [::Gapic::Config::Method] + # + attr_reader :create_task + ## + # RPC-specific configuration for `delete_task` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_task + ## + # RPC-specific configuration for `run_task` + # @return [::Gapic::Config::Method] + # + attr_reader :run_task + + # @private + def initialize parent_rpcs = nil + list_queues_config = parent_rpcs.list_queues if parent_rpcs.respond_to? :list_queues + @list_queues = ::Gapic::Config::Method.new list_queues_config + get_queue_config = parent_rpcs.get_queue if parent_rpcs.respond_to? :get_queue + @get_queue = ::Gapic::Config::Method.new get_queue_config + create_queue_config = parent_rpcs.create_queue if parent_rpcs.respond_to? :create_queue + @create_queue = ::Gapic::Config::Method.new create_queue_config + update_queue_config = parent_rpcs.update_queue if parent_rpcs.respond_to? :update_queue + @update_queue = ::Gapic::Config::Method.new update_queue_config + delete_queue_config = parent_rpcs.delete_queue if parent_rpcs.respond_to? :delete_queue + @delete_queue = ::Gapic::Config::Method.new delete_queue_config + purge_queue_config = parent_rpcs.purge_queue if parent_rpcs.respond_to? :purge_queue + @purge_queue = ::Gapic::Config::Method.new purge_queue_config + pause_queue_config = parent_rpcs.pause_queue if parent_rpcs.respond_to? :pause_queue + @pause_queue = ::Gapic::Config::Method.new pause_queue_config + resume_queue_config = parent_rpcs.resume_queue if parent_rpcs.respond_to? :resume_queue + @resume_queue = ::Gapic::Config::Method.new resume_queue_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks + @list_tasks = ::Gapic::Config::Method.new list_tasks_config + get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task + @get_task = ::Gapic::Config::Method.new get_task_config + create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task + @create_task = ::Gapic::Config::Method.new create_task_config + delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task + @delete_task = ::Gapic::Config::Method.new delete_task_config + run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task + @run_task = ::Gapic::Config::Method.new run_task_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/rest/service_stub.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/rest/service_stub.rb new file mode 100644 index 000000000000..769a0336a270 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/rest/service_stub.rb @@ -0,0 +1,1067 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/tasks/v2beta3/cloudtasks_pb" + +module Google + module Cloud + module Tasks + module V2beta3 + module CloudTasks + module Rest + ## + # REST service stub for the CloudTasks 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_queues REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::ListQueuesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta3::ListQueuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta3::ListQueuesResponse] + # A result object deserialized from the server's reply + def list_queues request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_queues_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_queues", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2beta3::ListQueuesResponse.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_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::GetQueueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Queue] + # A result object deserialized from the server's reply + def get_queue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_queue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_queue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2beta3::Queue.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_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::CreateQueueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Queue] + # A result object deserialized from the server's reply + def create_queue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_queue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_queue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2beta3::Queue.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_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Queue] + # A result object deserialized from the server's reply + def update_queue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_queue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_queue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2beta3::Queue.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_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_queue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_queue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_queue", + 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 purge_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Queue] + # A result object deserialized from the server's reply + def purge_queue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_purge_queue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "purge_queue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2beta3::Queue.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the pause_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::PauseQueueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Queue] + # A result object deserialized from the server's reply + def pause_queue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_pause_queue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "pause_queue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2beta3::Queue.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the resume_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Queue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Queue] + # A result object deserialized from the server's reply + def resume_queue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_resume_queue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "resume_queue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2beta3::Queue.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_tasks REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::ListTasksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta3::ListTasksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta3::ListTasksResponse] + # A result object deserialized from the server's reply + def list_tasks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_tasks_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_tasks", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2beta3::ListTasksResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::GetTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Task] + # A result object deserialized from the server's reply + def get_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_task", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2beta3::Task.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::CreateTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Task] + # A result object deserialized from the server's reply + def create_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_task", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2beta3::Task.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_task", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::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_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::RunTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Tasks::V2beta3::Task] + # A result object deserialized from the server's reply + def run_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_run_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "run_task", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Tasks::V2beta3::Task.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_queues REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::ListQueuesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_queues_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2beta3/{parent}/queues", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::GetQueueRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_queue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2beta3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::CreateQueueRequest] + # 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_queue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2beta3/{parent}/queues", + body: "queue", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest] + # 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_queue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2beta3/{queue.name}", + body: "queue", + matches: [ + ["queue.name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest] + # 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_queue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2beta3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the purge_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_purge_queue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2beta3/{name}:purge", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the pause_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::PauseQueueRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_pause_queue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2beta3/{name}:pause", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the resume_queue REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_resume_queue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2beta3/{name}:resume", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, 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: :post, + uri_template: "/v2beta3/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, 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: "/v2beta3/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, 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: "/v2beta3/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_tasks REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::ListTasksRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_tasks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2beta3/{parent}/tasks", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::GetTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2beta3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::CreateTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2beta3/{parent}/tasks", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2beta3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the run_task REST call + # + # @param request_pb [::Google::Cloud::Tasks::V2beta3::RunTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_run_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2beta3/{name}:run", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloudtasks_pb.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloudtasks_pb.rb new file mode 100644 index 000000000000..3ecd7cde1e6f --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloudtasks_pb.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/tasks/v2beta3/cloudtasks.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/tasks/v2beta3/queue_pb' +require 'google/cloud/tasks/v2beta3/task_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n+google/cloud/tasks/v2beta3/cloudtasks.proto\x12\x1agoogle.cloud.tasks.v2beta3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/tasks/v2beta3/queue.proto\x1a%google/cloud/tasks/v2beta3/task.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xb7\x01\n\x11ListQueuesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudtasks.googleapis.com/Queue\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\x12\x32\n\tread_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"`\n\x12ListQueuesResponse\x12\x31\n\x06queues\x18\x01 \x03(\x0b\x32!.google.cloud.tasks.v2beta3.Queue\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"|\n\x0fGetQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\x12\x32\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x84\x01\n\x12\x43reateQueueRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudtasks.googleapis.com/Queue\x12\x35\n\x05queue\x18\x02 \x01(\x0b\x32!.google.cloud.tasks.v2beta3.QueueB\x03\xe0\x41\x02\"|\n\x12UpdateQueueRequest\x12\x35\n\x05queue\x18\x01 \x01(\x0b\x32!.google.cloud.tasks.v2beta3.QueueB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"K\n\x12\x44\x65leteQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"J\n\x11PurgeQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"J\n\x11PauseQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"K\n\x12ResumeQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"\xaf\x01\n\x10ListTasksRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x63loudtasks.googleapis.com/Task\x12<\n\rresponse_view\x18\x02 \x01(\x0e\x32%.google.cloud.tasks.v2beta3.Task.View\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"]\n\x11ListTasksResponse\x12/\n\x05tasks\x18\x01 \x03(\x0b\x32 .google.cloud.tasks.v2beta3.Task\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x84\x01\n\x0eGetTaskRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudtasks.googleapis.com/Task\x12<\n\rresponse_view\x18\x02 \x01(\x0e\x32%.google.cloud.tasks.v2beta3.Task.View\"\xbe\x01\n\x11\x43reateTaskRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x63loudtasks.googleapis.com/Task\x12\x33\n\x04task\x18\x02 \x01(\x0b\x32 .google.cloud.tasks.v2beta3.TaskB\x03\xe0\x41\x02\x12<\n\rresponse_view\x18\x03 \x01(\x0e\x32%.google.cloud.tasks.v2beta3.Task.View\"I\n\x11\x44\x65leteTaskRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudtasks.googleapis.com/Task\"\x84\x01\n\x0eRunTaskRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudtasks.googleapis.com/Task\x12<\n\rresponse_view\x18\x02 \x01(\x0e\x32%.google.cloud.tasks.v2beta3.Task.View2\xa5\x16\n\nCloudTasks\x12\xad\x01\n\nListQueues\x12-.google.cloud.tasks.v2beta3.ListQueuesRequest\x1a..google.cloud.tasks.v2beta3.ListQueuesResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v2beta3/{parent=projects/*/locations/*}/queues\x12\x9a\x01\n\x08GetQueue\x12+.google.cloud.tasks.v2beta3.GetQueueRequest\x1a!.google.cloud.tasks.v2beta3.Queue\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v2beta3/{name=projects/*/locations/*/queues/*}\x12\xaf\x01\n\x0b\x43reateQueue\x12..google.cloud.tasks.v2beta3.CreateQueueRequest\x1a!.google.cloud.tasks.v2beta3.Queue\"M\xda\x41\x0cparent,queue\x82\xd3\xe4\x93\x02\x38\"//v2beta3/{parent=projects/*/locations/*}/queues:\x05queue\x12\xba\x01\n\x0bUpdateQueue\x12..google.cloud.tasks.v2beta3.UpdateQueueRequest\x1a!.google.cloud.tasks.v2beta3.Queue\"X\xda\x41\x11queue,update_mask\x82\xd3\xe4\x93\x02>25/v2beta3/{queue.name=projects/*/locations/*/queues/*}:\x05queue\x12\x95\x01\n\x0b\x44\x65leteQueue\x12..google.cloud.tasks.v2beta3.DeleteQueueRequest\x1a\x16.google.protobuf.Empty\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v2beta3/{name=projects/*/locations/*/queues/*}\x12\xa7\x01\n\nPurgeQueue\x12-.google.cloud.tasks.v2beta3.PurgeQueueRequest\x1a!.google.cloud.tasks.v2beta3.Queue\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/v2beta3/{name=projects/*/locations/*/queues/*}:purge:\x01*\x12\xa7\x01\n\nPauseQueue\x12-.google.cloud.tasks.v2beta3.PauseQueueRequest\x1a!.google.cloud.tasks.v2beta3.Queue\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/v2beta3/{name=projects/*/locations/*/queues/*}:pause:\x01*\x12\xaa\x01\n\x0bResumeQueue\x12..google.cloud.tasks.v2beta3.ResumeQueueRequest\x1a!.google.cloud.tasks.v2beta3.Queue\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\"6/v2beta3/{name=projects/*/locations/*/queues/*}:resume:\x01*\x12\xa1\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"V\xda\x41\x08resource\x82\xd3\xe4\x93\x02\x45\"@/v2beta3/{resource=projects/*/locations/*/queues/*}:getIamPolicy:\x01*\x12\xa8\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"]\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02\x45\"@/v2beta3/{resource=projects/*/locations/*/queues/*}:setIamPolicy:\x01*\x12\xd3\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"h\xda\x41\x14resource,permissions\x82\xd3\xe4\x93\x02K\"F/v2beta3/{resource=projects/*/locations/*/queues/*}:testIamPermissions:\x01*\x12\xb2\x01\n\tListTasks\x12,.google.cloud.tasks.v2beta3.ListTasksRequest\x1a-.google.cloud.tasks.v2beta3.ListTasksResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v2beta3/{parent=projects/*/locations/*/queues/*}/tasks\x12\x9f\x01\n\x07GetTask\x12*.google.cloud.tasks.v2beta3.GetTaskRequest\x1a .google.cloud.tasks.v2beta3.Task\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}\x12\xaf\x01\n\nCreateTask\x12-.google.cloud.tasks.v2beta3.CreateTaskRequest\x1a .google.cloud.tasks.v2beta3.Task\"P\xda\x41\x0bparent,task\x82\xd3\xe4\x93\x02<\"7/v2beta3/{parent=projects/*/locations/*/queues/*}/tasks:\x01*\x12\x9b\x01\n\nDeleteTask\x12-.google.cloud.tasks.v2beta3.DeleteTaskRequest\x1a\x16.google.protobuf.Empty\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}\x12\xa6\x01\n\x07RunTask\x12*.google.cloud.tasks.v2beta3.RunTaskRequest\x1a .google.cloud.tasks.v2beta3.Task\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\";/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}:run:\x01*\x1aM\xca\x41\x19\x63loudtasks.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x80\x01\n\x1e\x63om.google.cloud.tasks.v2beta3B\x0f\x43loudTasksProtoP\x01ZCcloud.google.com/go/cloudtasks/apiv2beta3/cloudtaskspb;cloudtaskspb\xa2\x02\x05TASKSb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Tasks + module V2beta3 + ListQueuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.ListQueuesRequest").msgclass + ListQueuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.ListQueuesResponse").msgclass + GetQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.GetQueueRequest").msgclass + CreateQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.CreateQueueRequest").msgclass + UpdateQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.UpdateQueueRequest").msgclass + DeleteQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.DeleteQueueRequest").msgclass + PurgeQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.PurgeQueueRequest").msgclass + PauseQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.PauseQueueRequest").msgclass + ResumeQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.ResumeQueueRequest").msgclass + ListTasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.ListTasksRequest").msgclass + ListTasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.ListTasksResponse").msgclass + GetTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.GetTaskRequest").msgclass + CreateTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.CreateTaskRequest").msgclass + DeleteTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.DeleteTaskRequest").msgclass + RunTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.RunTaskRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloudtasks_services_pb.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloudtasks_services_pb.rb new file mode 100644 index 000000000000..949716898bbb --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloudtasks_services_pb.rb @@ -0,0 +1,208 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/tasks/v2beta3/cloudtasks.proto for package 'google.cloud.tasks.v2beta3' +# 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/tasks/v2beta3/cloudtasks_pb' + +module Google + module Cloud + module Tasks + module V2beta3 + module CloudTasks + # Cloud Tasks allows developers to manage the execution of background + # work in their applications. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.tasks.v2beta3.CloudTasks' + + # Lists queues. + # + # Queues are returned in lexicographical order. + rpc :ListQueues, ::Google::Cloud::Tasks::V2beta3::ListQueuesRequest, ::Google::Cloud::Tasks::V2beta3::ListQueuesResponse + # Gets a queue. + rpc :GetQueue, ::Google::Cloud::Tasks::V2beta3::GetQueueRequest, ::Google::Cloud::Tasks::V2beta3::Queue + # Creates a queue. + # + # Queues created with this method allow tasks to live for a maximum of 31 + # days. After a task is 31 days old, the task will be deleted regardless of + # whether it was dispatched or not. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + rpc :CreateQueue, ::Google::Cloud::Tasks::V2beta3::CreateQueueRequest, ::Google::Cloud::Tasks::V2beta3::Queue + # Updates a queue. + # + # This method creates the queue if it does not exist and updates + # the queue if it does exist. + # + # Queues created with this method allow tasks to live for a maximum of 31 + # days. After a task is 31 days old, the task will be deleted regardless of + # whether it was dispatched or not. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + rpc :UpdateQueue, ::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest, ::Google::Cloud::Tasks::V2beta3::Queue + # Deletes a queue. + # + # This command will delete the queue even if it has tasks in it. + # + # Note: If you delete a queue, a queue with the same name can't be created + # for 7 days. + # + # WARNING: Using this method may have unintended side effects if you are + # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + # Read + # [Overview of Queue Management and + # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + # this method. + rpc :DeleteQueue, ::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest, ::Google::Protobuf::Empty + # Purges a queue by deleting all of its tasks. + # + # All tasks created before this method is called are permanently deleted. + # + # Purge operations can take up to one minute to take effect. Tasks + # might be dispatched before the purge takes effect. A purge is irreversible. + rpc :PurgeQueue, ::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest, ::Google::Cloud::Tasks::V2beta3::Queue + # Pauses the queue. + # + # If a queue is paused then the system will stop dispatching tasks + # until the queue is resumed via + # [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue]. Tasks can + # still be added when the queue is paused. A queue is paused if its + # [state][google.cloud.tasks.v2beta3.Queue.state] is + # [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED]. + rpc :PauseQueue, ::Google::Cloud::Tasks::V2beta3::PauseQueueRequest, ::Google::Cloud::Tasks::V2beta3::Queue + # Resume a queue. + # + # This method resumes a queue after it has been + # [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED] or + # [DISABLED][google.cloud.tasks.v2beta3.Queue.State.DISABLED]. The state of a + # queue is stored in the queue's + # [state][google.cloud.tasks.v2beta3.Queue.state]; after calling this method + # it will be set to + # [RUNNING][google.cloud.tasks.v2beta3.Queue.State.RUNNING]. + # + # WARNING: Resuming many high-QPS queues at the same time can + # lead to target overloading. If you are resuming high-QPS + # queues, follow the 500/50/5 pattern described in + # [Managing Cloud Tasks Scaling + # Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). + rpc :ResumeQueue, ::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest, ::Google::Cloud::Tasks::V2beta3::Queue + # Gets the access control policy for a + # [Queue][google.cloud.tasks.v2beta3.Queue]. Returns an empty policy if the + # resource exists and does not have a policy set. + # + # Authorization requires the following + # [Google IAM](https://cloud.google.com/iam) permission on the specified + # resource parent: + # + # * `cloudtasks.queues.getIamPolicy` + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Sets the access control policy for a + # [Queue][google.cloud.tasks.v2beta3.Queue]. Replaces any existing policy. + # + # Note: The Cloud Console does not check queue-level IAM permissions yet. + # Project-level permissions are required to use the Cloud Console. + # + # Authorization requires the following + # [Google IAM](https://cloud.google.com/iam) permission on the specified + # resource parent: + # + # * `cloudtasks.queues.setIamPolicy` + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Returns permissions that a caller has on a + # [Queue][google.cloud.tasks.v2beta3.Queue]. If the resource does not exist, + # this will return an empty set of permissions, not a + # [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + # + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + # Lists the tasks in a queue. + # + # By default, only the [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC] + # view is retrieved due to performance considerations; + # [response_view][google.cloud.tasks.v2beta3.ListTasksRequest.response_view] + # controls the subset of information which is returned. + # + # The tasks may be returned in any order. The ordering may change at any + # time. + rpc :ListTasks, ::Google::Cloud::Tasks::V2beta3::ListTasksRequest, ::Google::Cloud::Tasks::V2beta3::ListTasksResponse + # Gets a task. + rpc :GetTask, ::Google::Cloud::Tasks::V2beta3::GetTaskRequest, ::Google::Cloud::Tasks::V2beta3::Task + # Creates a task and adds it to a queue. + # + # Tasks cannot be updated after creation; there is no UpdateTask command. + # + # * The maximum task size is 100KB. + rpc :CreateTask, ::Google::Cloud::Tasks::V2beta3::CreateTaskRequest, ::Google::Cloud::Tasks::V2beta3::Task + # Deletes a task. + # + # A task can be deleted if it is scheduled or dispatched. A task + # cannot be deleted if it has executed successfully or permanently + # failed. + rpc :DeleteTask, ::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest, ::Google::Protobuf::Empty + # Forces a task to run now. + # + # When this method is called, Cloud Tasks will dispatch the task, even if + # the task is already running, the queue has reached its + # [RateLimits][google.cloud.tasks.v2beta3.RateLimits] or is + # [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED]. + # + # This command is meant to be used for manual debugging. For + # example, [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] can be + # used to retry a failed task after a fix has been made or to manually force + # a task to be dispatched now. + # + # The dispatched task is returned. That is, the task that is returned + # contains the [status][Task.status] after the task is dispatched but + # before the task is received by its target. + # + # If Cloud Tasks receives a successful response from the task's + # target, then the task will be deleted; otherwise the task's + # [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] will be + # reset to the time that + # [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] was called plus + # the retry delay specified in the queue's + # [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. + # + # [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] returns + # [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a + # task that has already succeeded or permanently failed. + rpc :RunTask, ::Google::Cloud::Tasks::V2beta3::RunTaskRequest, ::Google::Cloud::Tasks::V2beta3::Task + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/queue_pb.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/queue_pb.rb new file mode 100644 index 000000000000..6633fec4a463 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/queue_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/tasks/v2beta3/queue.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/tasks/v2beta3/target_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n&google/cloud/tasks/v2beta3/queue.proto\x12\x1agoogle.cloud.tasks.v2beta3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\'google/cloud/tasks/v2beta3/target.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9c\x07\n\x05Queue\x12\x0c\n\x04name\x18\x01 \x01(\t\x12O\n\x15\x61pp_engine_http_queue\x18\x03 \x01(\x0b\x32..google.cloud.tasks.v2beta3.AppEngineHttpQueueH\x00\x12;\n\x0bhttp_target\x18\r \x01(\x0b\x32&.google.cloud.tasks.v2beta3.HttpTarget\x12;\n\x0brate_limits\x18\x04 \x01(\x0b\x32&.google.cloud.tasks.v2beta3.RateLimits\x12=\n\x0cretry_config\x18\x05 \x01(\x0b\x32\'.google.cloud.tasks.v2beta3.RetryConfig\x12\x36\n\x05state\x18\x06 \x01(\x0e\x32\'.google.cloud.tasks.v2beta3.Queue.State\x12.\n\npurge_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12+\n\x08task_ttl\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x30\n\rtombstone_ttl\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12X\n\x1astackdriver_logging_config\x18\n \x01(\x0b\x32\x34.google.cloud.tasks.v2beta3.StackdriverLoggingConfig\x12\x39\n\x04type\x18\x0b \x01(\x0e\x32&.google.cloud.tasks.v2beta3.Queue.TypeB\x03\xe0\x41\x05\x12:\n\x05stats\x18\x0c \x01(\x0b\x32&.google.cloud.tasks.v2beta3.QueueStatsB\x03\xe0\x41\x03\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\n\n\x06PAUSED\x10\x02\x12\x0c\n\x08\x44ISABLED\x10\x03\"0\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04PULL\x10\x01\x12\x08\n\x04PUSH\x10\x02:\\\xea\x41Y\n\x1f\x63loudtasks.googleapis.com/Queue\x12\x36projects/{project}/locations/{location}/queues/{queue}B\x0c\n\nqueue_type\"j\n\nRateLimits\x12!\n\x19max_dispatches_per_second\x18\x01 \x01(\x01\x12\x16\n\x0emax_burst_size\x18\x02 \x01(\x05\x12!\n\x19max_concurrent_dispatches\x18\x03 \x01(\x05\"\xd1\x01\n\x0bRetryConfig\x12\x14\n\x0cmax_attempts\x18\x01 \x01(\x05\x12\x35\n\x12max_retry_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\x0bmin_backoff\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\x0bmax_backoff\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\rmax_doublings\x18\x05 \x01(\x05\"2\n\x18StackdriverLoggingConfig\x12\x16\n\x0esampling_ratio\x18\x01 \x01(\x01\"\xe8\x01\n\nQueueStats\x12\x18\n\x0btasks_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x46\n\x1doldest_estimated_arrival_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\'\n\x1a\x65xecuted_last_minute_count\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12(\n\x1b\x63oncurrent_dispatches_count\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12%\n\x18\x65\x66\x66\x65\x63tive_execution_rate\x18\x05 \x01(\x01\x42\x03\xe0\x41\x03\x42s\n\x1e\x63om.google.cloud.tasks.v2beta3B\nQueueProtoP\x01ZCcloud.google.com/go/cloudtasks/apiv2beta3/cloudtaskspb;cloudtaskspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Tasks + module V2beta3 + Queue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.Queue").msgclass + Queue::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.Queue.State").enummodule + Queue::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.Queue.Type").enummodule + RateLimits = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.RateLimits").msgclass + RetryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.RetryConfig").msgclass + StackdriverLoggingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.StackdriverLoggingConfig").msgclass + QueueStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.QueueStats").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/rest.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/rest.rb new file mode 100644 index 000000000000..46bbd3572870 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/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/tasks/v2beta3/cloud_tasks/rest" +require "google/cloud/tasks/v2beta3/bindings_override" +require "google/cloud/tasks/v2beta3/version" + +module Google + module Cloud + module Tasks + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/tasks/v2beta3/rest" + # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new + # + module V2beta3 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/target_pb.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/target_pb.rb new file mode 100644 index 000000000000..39236d861299 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/target_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/tasks/v2beta3/target.proto + +require 'google/protobuf' + + +descriptor_data = "\n\'google/cloud/tasks/v2beta3/target.proto\x12\x1agoogle.cloud.tasks.v2beta3\"+\n\x0bPullMessage\x12\x0f\n\x07payload\x18\x01 \x01(\x0c\x12\x0b\n\x03tag\x18\x02 \x01(\t\"\x1c\n\x0cPathOverride\x12\x0c\n\x04path\x18\x01 \x01(\t\"%\n\rQueryOverride\x12\x14\n\x0cquery_params\x18\x01 \x01(\t\"\x97\x04\n\x0bUriOverride\x12\x43\n\x06scheme\x18\x01 \x01(\x0e\x32..google.cloud.tasks.v2beta3.UriOverride.SchemeH\x00\x88\x01\x01\x12\x11\n\x04host\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04port\x18\x03 \x01(\x03H\x02\x88\x01\x01\x12?\n\rpath_override\x18\x04 \x01(\x0b\x32(.google.cloud.tasks.v2beta3.PathOverride\x12\x41\n\x0equery_override\x18\x05 \x01(\x0b\x32).google.cloud.tasks.v2beta3.QueryOverride\x12\x61\n\x19uri_override_enforce_mode\x18\x06 \x01(\x0e\x32>.google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode\"5\n\x06Scheme\x12\x16\n\x12SCHEME_UNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"b\n\x16UriOverrideEnforceMode\x12)\n%URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED\x10\x00\x12\x11\n\rIF_NOT_EXISTS\x10\x01\x12\n\n\x06\x41LWAYS\x10\x02\x42\t\n\x07_schemeB\x07\n\x05_hostB\x07\n\x05_port\"\xe4\x03\n\nHttpTarget\x12=\n\x0curi_override\x18\x01 \x01(\x0b\x32\'.google.cloud.tasks.v2beta3.UriOverride\x12;\n\x0bhttp_method\x18\x02 \x01(\x0e\x32&.google.cloud.tasks.v2beta3.HttpMethod\x12O\n\x10header_overrides\x18\x03 \x03(\x0b\x32\x35.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride\x12=\n\x0boauth_token\x18\x05 \x01(\x0b\x32&.google.cloud.tasks.v2beta3.OAuthTokenH\x00\x12;\n\noidc_token\x18\x06 \x01(\x0b\x32%.google.cloud.tasks.v2beta3.OidcTokenH\x00\x1a$\n\x06Header\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x1aO\n\x0eHeaderOverride\x12=\n\x06header\x18\x01 \x01(\x0b\x32-.google.cloud.tasks.v2beta3.HttpTarget.HeaderB\x16\n\x14\x61uthorization_header\"\xf0\x02\n\x0bHttpRequest\x12\x0b\n\x03url\x18\x01 \x01(\t\x12;\n\x0bhttp_method\x18\x02 \x01(\x0e\x32&.google.cloud.tasks.v2beta3.HttpMethod\x12\x45\n\x07headers\x18\x03 \x03(\x0b\x32\x34.google.cloud.tasks.v2beta3.HttpRequest.HeadersEntry\x12\x0c\n\x04\x62ody\x18\x04 \x01(\x0c\x12=\n\x0boauth_token\x18\x05 \x01(\x0b\x32&.google.cloud.tasks.v2beta3.OAuthTokenH\x00\x12;\n\noidc_token\x18\x06 \x01(\x0b\x32%.google.cloud.tasks.v2beta3.OidcTokenH\x00\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x16\n\x14\x61uthorization_header\"g\n\x12\x41ppEngineHttpQueue\x12Q\n\x1b\x61pp_engine_routing_override\x18\x01 \x01(\x0b\x32,.google.cloud.tasks.v2beta3.AppEngineRouting\"\xc1\x02\n\x14\x41ppEngineHttpRequest\x12;\n\x0bhttp_method\x18\x01 \x01(\x0e\x32&.google.cloud.tasks.v2beta3.HttpMethod\x12H\n\x12\x61pp_engine_routing\x18\x02 \x01(\x0b\x32,.google.cloud.tasks.v2beta3.AppEngineRouting\x12\x14\n\x0crelative_uri\x18\x03 \x01(\t\x12N\n\x07headers\x18\x04 \x03(\x0b\x32=.google.cloud.tasks.v2beta3.AppEngineHttpRequest.HeadersEntry\x12\x0c\n\x04\x62ody\x18\x05 \x01(\x0c\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"T\n\x10\x41ppEngineRouting\x12\x0f\n\x07service\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x10\n\x08instance\x18\x03 \x01(\t\x12\x0c\n\x04host\x18\x04 \x01(\t\":\n\nOAuthToken\x12\x1d\n\x15service_account_email\x18\x01 \x01(\t\x12\r\n\x05scope\x18\x02 \x01(\t\"<\n\tOidcToken\x12\x1d\n\x15service_account_email\x18\x01 \x01(\t\x12\x10\n\x08\x61udience\x18\x02 \x01(\t*s\n\nHttpMethod\x12\x1b\n\x17HTTP_METHOD_UNSPECIFIED\x10\x00\x12\x08\n\x04POST\x10\x01\x12\x07\n\x03GET\x10\x02\x12\x08\n\x04HEAD\x10\x03\x12\x07\n\x03PUT\x10\x04\x12\n\n\x06\x44\x45LETE\x10\x05\x12\t\n\x05PATCH\x10\x06\x12\x0b\n\x07OPTIONS\x10\x07\x42t\n\x1e\x63om.google.cloud.tasks.v2beta3B\x0bTargetProtoP\x01ZCcloud.google.com/go/cloudtasks/apiv2beta3/cloudtaskspb;cloudtaskspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Tasks + module V2beta3 + PullMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.PullMessage").msgclass + PathOverride = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.PathOverride").msgclass + QueryOverride = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.QueryOverride").msgclass + UriOverride = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.UriOverride").msgclass + UriOverride::Scheme = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.UriOverride.Scheme").enummodule + UriOverride::UriOverrideEnforceMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode").enummodule + HttpTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.HttpTarget").msgclass + HttpTarget::Header = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.HttpTarget.Header").msgclass + HttpTarget::HeaderOverride = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride").msgclass + HttpRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.HttpRequest").msgclass + AppEngineHttpQueue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.AppEngineHttpQueue").msgclass + AppEngineHttpRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.AppEngineHttpRequest").msgclass + AppEngineRouting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.AppEngineRouting").msgclass + OAuthToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.OAuthToken").msgclass + OidcToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.OidcToken").msgclass + HttpMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.HttpMethod").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/task_pb.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/task_pb.rb new file mode 100644 index 000000000000..f13eaac5e929 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/task_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/tasks/v2beta3/task.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/tasks/v2beta3/target_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n%google/cloud/tasks/v2beta3/task.proto\x12\x1agoogle.cloud.tasks.v2beta3\x1a\x19google/api/resource.proto\x1a\'google/cloud/tasks/v2beta3/target.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x8e\x06\n\x04Task\x12\x0c\n\x04name\x18\x01 \x01(\t\x12S\n\x17\x61pp_engine_http_request\x18\x03 \x01(\x0b\x32\x30.google.cloud.tasks.v2beta3.AppEngineHttpRequestH\x00\x12?\n\x0chttp_request\x18\x0b \x01(\x0b\x32\'.google.cloud.tasks.v2beta3.HttpRequestH\x00\x12?\n\x0cpull_message\x18\r \x01(\x0b\x32\'.google.cloud.tasks.v2beta3.PullMessageH\x00\x12\x31\n\rschedule_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11\x64ispatch_deadline\x18\x0c \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x16\n\x0e\x64ispatch_count\x18\x06 \x01(\x05\x12\x16\n\x0eresponse_count\x18\x07 \x01(\x05\x12:\n\rfirst_attempt\x18\x08 \x01(\x0b\x32#.google.cloud.tasks.v2beta3.Attempt\x12\x39\n\x0clast_attempt\x18\t \x01(\x0b\x32#.google.cloud.tasks.v2beta3.Attempt\x12\x33\n\x04view\x18\n \x01(\x0e\x32%.google.cloud.tasks.v2beta3.Task.View\"1\n\x04View\x12\x14\n\x10VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02:h\xea\x41\x65\n\x1e\x63loudtasks.googleapis.com/Task\x12\x43projects/{project}/locations/{location}/queues/{queue}/tasks/{task}B\x0e\n\x0cpayload_type\"\xcf\x01\n\x07\x41ttempt\x12\x31\n\rschedule_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rdispatch_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rresponse_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12+\n\x0fresponse_status\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusBr\n\x1e\x63om.google.cloud.tasks.v2beta3B\tTaskProtoP\x01ZCcloud.google.com/go/cloudtasks/apiv2beta3/cloudtaskspb;cloudtaskspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Tasks + module V2beta3 + Task = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.Task").msgclass + Task::View = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.Task.View").enummodule + Attempt = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.Attempt").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/version.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/version.rb new file mode 100644 index 000000000000..4734a344c8be --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/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 Tasks + module V2beta3 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/README.md b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/README.md new file mode 100644 index 000000000000..1125683d6825 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Tasks V2beta3 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-tasks-v2beta3/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # 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. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + # + # Example: + # + # 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 + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # 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 + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # 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 + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/cloudtasks.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/cloudtasks.rb new file mode 100644 index 000000000000..00fcdde8c8b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/cloudtasks.rb @@ -0,0 +1,396 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Tasks + module V2beta3 + # Request message for + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_queues ListQueues}. + # @!attribute [rw] parent + # @return [::String] + # Required. The location name. + # For example: `projects/PROJECT_ID/locations/LOCATION_ID` + # @!attribute [rw] filter + # @return [::String] + # `filter` can be used to specify a subset of queues. Any + # {::Google::Cloud::Tasks::V2beta3::Queue Queue} field can be used as a filter and + # several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + # filter syntax is the same as described in [Stackdriver's Advanced Logs + # Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + # + # Sample filter "state: PAUSED". + # + # Note that using filters might cause fewer queues than the + # requested page_size to be returned. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. + # + # The maximum page size is 9800. If unspecified, the page size will + # be the maximum. Fewer queues than requested might be returned, + # even if more queues exist; use the + # {::Google::Cloud::Tasks::V2beta3::ListQueuesResponse#next_page_token next_page_token} + # in the response to determine if more queues exist. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying the page of results to return. + # + # To request the first page results, page_token must be empty. To + # request the next page of results, page_token must be the value of + # {::Google::Cloud::Tasks::V2beta3::ListQueuesResponse#next_page_token next_page_token} + # returned from the previous call to + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_queues ListQueues} method. It + # is an error to switch the value of the + # {::Google::Cloud::Tasks::V2beta3::ListQueuesRequest#filter filter} while + # iterating through pages. + # @!attribute [rw] read_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Read mask is used for a more granular control over what the API + # returns. If the mask is not present all fields will be returned except + # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + # specified in the mask. + class ListQueuesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_queues ListQueues}. + # @!attribute [rw] queues + # @return [::Array<::Google::Cloud::Tasks::V2beta3::Queue>] + # The list of queues. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. + # + # To return the next page of results, call + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_queues ListQueues} with this + # value as the + # {::Google::Cloud::Tasks::V2beta3::ListQueuesRequest#page_token page_token}. + # + # If the next_page_token is empty, there are no more results. + # + # The page token is valid for only 2 hours. + class ListQueuesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#get_queue GetQueue}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the queue. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # @!attribute [rw] read_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Read mask is used for a more granular control over what the API + # returns. If the mask is not present all fields will be returned except + # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + # specified in the mask. + class GetQueueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_queue CreateQueue}. + # @!attribute [rw] parent + # @return [::String] + # Required. The location name in which the queue will be created. + # For example: `projects/PROJECT_ID/locations/LOCATION_ID` + # + # The list of allowed locations can be obtained by calling Cloud + # Tasks' implementation of + # [ListLocations][google.cloud.location.Locations.ListLocations]. + # @!attribute [rw] queue + # @return [::Google::Cloud::Tasks::V2beta3::Queue] + # Required. The queue to create. + # + # [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as + # an existing queue. + class CreateQueueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#update_queue UpdateQueue}. + # @!attribute [rw] queue + # @return [::Google::Cloud::Tasks::V2beta3::Queue] + # Required. The queue to create or update. + # + # The queue's {::Google::Cloud::Tasks::V2beta3::Queue#name name} must be + # specified. + # + # Output only fields cannot be modified using UpdateQueue. + # Any value specified for an output only field will be ignored. + # The queue's {::Google::Cloud::Tasks::V2beta3::Queue#name name} cannot be + # changed. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # A mask used to specify which fields of the queue are being updated. + # + # If empty, then all fields will be updated. + class UpdateQueueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#delete_queue DeleteQueue}. + # @!attribute [rw] name + # @return [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + class DeleteQueueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#purge_queue PurgeQueue}. + # @!attribute [rw] name + # @return [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + class PurgeQueueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#pause_queue PauseQueue}. + # @!attribute [rw] name + # @return [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + class PauseQueueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#resume_queue ResumeQueue}. + # @!attribute [rw] name + # @return [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + class ResumeQueueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing tasks using + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_tasks ListTasks}. + # @!attribute [rw] parent + # @return [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # @!attribute [rw] response_view + # @return [::Google::Cloud::Tasks::V2beta3::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta3::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta3::Task Task} resource. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum page size. + # + # Fewer tasks than requested might be returned, even if more tasks exist; use + # {::Google::Cloud::Tasks::V2beta3::ListTasksResponse#next_page_token next_page_token} + # in the response to determine if more tasks exist. + # + # The maximum page size is 1000. If unspecified, the page size will be the + # maximum. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying the page of results to return. + # + # To request the first page results, page_token must be empty. To + # request the next page of results, page_token must be the value of + # {::Google::Cloud::Tasks::V2beta3::ListTasksResponse#next_page_token next_page_token} + # returned from the previous call to + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_tasks ListTasks} method. + # + # The page token is valid for only 2 hours. + class ListTasksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing tasks using + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_tasks ListTasks}. + # @!attribute [rw] tasks + # @return [::Array<::Google::Cloud::Tasks::V2beta3::Task>] + # The list of tasks. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. + # + # To return the next page of results, call + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_tasks ListTasks} with this + # value as the + # {::Google::Cloud::Tasks::V2beta3::ListTasksRequest#page_token page_token}. + # + # If the next_page_token is empty, there are no more results. + class ListTasksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a task using + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#get_task GetTask}. + # @!attribute [rw] name + # @return [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @!attribute [rw] response_view + # @return [::Google::Cloud::Tasks::V2beta3::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta3::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta3::Task Task} resource. + class GetTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task CreateTask}. + # @!attribute [rw] parent + # @return [::String] + # Required. The queue name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # + # The queue must already exist. + # @!attribute [rw] task + # @return [::Google::Cloud::Tasks::V2beta3::Task] + # Required. The task to add. + # + # Task names have the following format: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + # The user can optionally specify a task + # {::Google::Cloud::Tasks::V2beta3::Task#name name}. If a name is not specified + # then the system will generate a random unique task id, which will be set in + # the task returned in the {::Google::Cloud::Tasks::V2beta3::Task#name response}. + # + # If {::Google::Cloud::Tasks::V2beta3::Task#schedule_time schedule_time} is not + # set or is in the past then Cloud Tasks will set it to the current time. + # + # Task De-duplication: + # + # Explicitly specifying a task ID enables task de-duplication. If + # a task's ID is identical to that of an existing task or a task + # that was deleted or executed recently then the call will fail + # with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + # If the task's queue was created using Cloud Tasks, then another task with + # the same name can't be created for ~1 hour after the original task was + # deleted or executed. If the task's queue was created using queue.yaml or + # queue.xml, then another task with the same name can't be created + # for ~9 days after the original task was deleted or executed. + # + # Because there is an extra lookup cost to identify duplicate task + # names, these {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task CreateTask} + # calls have significantly increased latency. Using hashed strings for the + # task id or for the prefix of the task id is recommended. Choosing task ids + # that are sequential or have sequential prefixes, for example using a + # timestamp, causes an increase in latency and error rates in all + # task commands. The infrastructure relies on an approximately + # uniform distribution of task ids to store and serve tasks + # efficiently. + # @!attribute [rw] response_view + # @return [::Google::Cloud::Tasks::V2beta3::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta3::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta3::Task Task} resource. + class CreateTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting a task using + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#delete_task DeleteTask}. + # @!attribute [rw] name + # @return [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + class DeleteTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for forcing a task to run now using + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#run_task RunTask}. + # @!attribute [rw] name + # @return [::String] + # Required. The task name. For example: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # @!attribute [rw] response_view + # @return [::Google::Cloud::Tasks::V2beta3::Task::View] + # The response_view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta3::Task Task} will be returned. + # + # By default response_view is + # {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all information is + # retrieved by default because some data, such as payloads, might be + # desirable to return only when needed because of its large size or because + # of the sensitivity of data that it contains. + # + # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta3::Task Task} resource. + class RunTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/queue.rb new file mode 100644 index 000000000000..210bc3f6fa93 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/queue.rb @@ -0,0 +1,462 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Tasks + module V2beta3 + # A queue is a container of related tasks. Queues are configured to manage + # how those tasks are dispatched. Configurable properties include rate limits, + # retry options, queue types, and others. + # @!attribute [rw] name + # @return [::String] + # Caller-specified and required in + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_queue CreateQueue}, after + # which it becomes output only. + # + # The queue name. + # + # The queue name must have the following format: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + # + # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + # hyphens (-), colons (:), or periods (.). + # For more information, see + # [Identifying + # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + # * `LOCATION_ID` is the canonical ID for the queue's location. + # The list of available locations can be obtained by calling + # [ListLocations][google.cloud.location.Locations.ListLocations]. + # For more information, see https://cloud.google.com/about/locations/. + # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + # hyphens (-). The maximum length is 100 characters. + # @!attribute [rw] app_engine_http_queue + # @return [::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue] + # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue AppEngineHttpQueue} + # settings apply only to [App Engine + # tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue. + # {::Google::Cloud::Tasks::V2beta3::HttpRequest Http tasks} are not affected by + # this proto. + # @!attribute [rw] http_target + # @return [::Google::Cloud::Tasks::V2beta3::HttpTarget] + # Modifies HTTP target for HTTP tasks. + # @!attribute [rw] rate_limits + # @return [::Google::Cloud::Tasks::V2beta3::RateLimits] + # Rate limits for task dispatches. + # + # {::Google::Cloud::Tasks::V2beta3::Queue#rate_limits rate_limits} and + # {::Google::Cloud::Tasks::V2beta3::Queue#retry_config retry_config} are related + # because they both control task attempts. However they control task attempts + # in different ways: + # + # * {::Google::Cloud::Tasks::V2beta3::Queue#rate_limits rate_limits} controls the + # total rate of + # dispatches from a queue (i.e. all traffic dispatched from the + # queue, regardless of whether the dispatch is from a first + # attempt or a retry). + # * {::Google::Cloud::Tasks::V2beta3::Queue#retry_config retry_config} controls + # what happens to + # particular a task after its first attempt fails. That is, + # {::Google::Cloud::Tasks::V2beta3::Queue#retry_config retry_config} controls + # task retries (the second attempt, third attempt, etc). + # + # The queue's actual dispatch rate is the result of: + # + # * Number of tasks in the queue + # * User-specified throttling: + # {::Google::Cloud::Tasks::V2beta3::Queue#rate_limits rate_limits}, + # {::Google::Cloud::Tasks::V2beta3::Queue#retry_config retry_config}, and the + # [queue's state][google.cloud.tasks.v2beta3.Queue.state]. + # * System throttling due to `429` (Too Many Requests) or `503` (Service + # Unavailable) responses from the worker, high error rates, or to smooth + # sudden large traffic spikes. + # @!attribute [rw] retry_config + # @return [::Google::Cloud::Tasks::V2beta3::RetryConfig] + # Settings that determine the retry behavior. + # + # * For tasks created using Cloud Tasks: the queue-level retry settings + # apply to all tasks in the queue that were created using Cloud Tasks. + # Retry settings cannot be set on individual tasks. + # * For tasks created using the App Engine SDK: the queue-level retry + # settings apply to all tasks in the queue which do not have retry settings + # explicitly set on the task and were created by the App Engine SDK. See + # [App Engine + # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). + # @!attribute [rw] state + # @return [::Google::Cloud::Tasks::V2beta3::Queue::State] + # Output only. The state of the queue. + # + # `state` can only be changed by called + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#pause_queue PauseQueue}, + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#resume_queue ResumeQueue}, or + # uploading + # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#update_queue UpdateQueue} cannot be + # used to change `state`. + # @!attribute [rw] purge_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last time this queue was purged. + # + # All tasks that were {::Google::Cloud::Tasks::V2beta3::Task#create_time created} + # before this time were purged. + # + # A queue can be purged using + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#purge_queue PurgeQueue}, the [App + # Engine Task Queue SDK, or the Cloud + # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). + # + # Purge time will be truncated to the nearest microsecond. Purge + # time will be unset if the queue has never been purged. + # @!attribute [rw] task_ttl + # @return [::Google::Protobuf::Duration] + # The maximum amount of time that a task will be retained in + # this queue. + # + # Queues created by Cloud Tasks have a default `task_ttl` of 31 days. + # After a task has lived for `task_ttl`, the task will be deleted + # regardless of whether it was dispatched or not. + # + # The `task_ttl` for queues created via queue.yaml/xml is equal to the + # maximum duration because there is a + # [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for + # these queues. To view the maximum valid duration, see the documentation for + # {::Google::Protobuf::Duration Duration}. + # @!attribute [rw] tombstone_ttl + # @return [::Google::Protobuf::Duration] + # The task tombstone time to live (TTL). + # + # After a task is deleted or executed, the task's tombstone is + # retained for the length of time specified by `tombstone_ttl`. + # The tombstone is used by task de-duplication; another task with the same + # name can't be created until the tombstone has expired. For more information + # about task de-duplication, see the documentation for + # {::Google::Cloud::Tasks::V2beta3::CreateTaskRequest#task CreateTaskRequest}. + # + # Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour. + # @!attribute [rw] stackdriver_logging_config + # @return [::Google::Cloud::Tasks::V2beta3::StackdriverLoggingConfig] + # Configuration options for writing logs to + # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + # field is unset, then no logs are written. + # @!attribute [rw] type + # @return [::Google::Cloud::Tasks::V2beta3::Queue::Type] + # Immutable. The type of a queue (push or pull). + # + # `Queue.type` is an immutable property of the queue that is set at the queue + # creation time. When left unspecified, the default value of `PUSH` is + # selected. + # @!attribute [r] stats + # @return [::Google::Cloud::Tasks::V2beta3::QueueStats] + # Output only. The realtime, informational statistics for a queue. In order + # to receive the statistics the caller should include this field in the + # FieldMask. + class Queue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # State of the queue. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # The queue is running. Tasks can be dispatched. + # + # If the queue was created using Cloud Tasks and the queue has + # had no activity (method calls or task dispatches) for 30 days, + # the queue may take a few minutes to re-activate. Some method + # calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and + # tasks may not be dispatched for a few minutes until the queue + # has been re-activated. + RUNNING = 1 + + # Tasks are paused by the user. If the queue is paused then Cloud + # Tasks will stop delivering tasks from it, but more tasks can + # still be added to it by the user. + PAUSED = 2 + + # The queue is disabled. + # + # A queue becomes `DISABLED` when + # [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) + # or + # [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) + # is uploaded which does not contain the queue. You cannot directly disable + # a queue. + # + # When a queue is disabled, tasks can still be added to a queue + # but the tasks are not dispatched. + # + # To permanently delete this queue and all of its tasks, call + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#delete_queue DeleteQueue}. + DISABLED = 3 + end + + # The type of the queue. + module Type + # Default value. + TYPE_UNSPECIFIED = 0 + + # A pull queue. + PULL = 1 + + # A push queue. + PUSH = 2 + end + end + + # Rate limits. + # + # This message determines the maximum rate that tasks can be dispatched by a + # queue, regardless of whether the dispatch is a first task attempt or a retry. + # + # Note: The debugging command, + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#run_task RunTask}, will run a task + # even if the queue has reached its + # {::Google::Cloud::Tasks::V2beta3::RateLimits RateLimits}. + # @!attribute [rw] max_dispatches_per_second + # @return [::Float] + # The maximum rate at which tasks are dispatched from this queue. + # + # If unspecified when the queue is created, Cloud Tasks will pick the + # default. + # + # * For {::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue App Engine queues}, + # the maximum allowed value + # is 500. + # + # + # This field has the same meaning as + # [rate in + # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). + # @!attribute [rw] max_burst_size + # @return [::Integer] + # The max burst size. + # + # Max burst size limits how fast tasks in queue are processed when + # many tasks are in the queue and the rate is high. This field + # allows the queue to have a high rate so processing starts shortly + # after a task is enqueued, but still limits resource usage when + # many tasks are enqueued in a short period of time. + # + # The [token bucket](https://wikipedia.org/wiki/Token_Bucket) + # algorithm is used to control the rate of task dispatches. Each + # queue has a token bucket that holds tokens, up to the maximum + # specified by `max_burst_size`. Each time a task is dispatched, a + # token is removed from the bucket. Tasks will be dispatched until + # the queue's bucket runs out of tokens. The bucket will be + # continuously refilled with new tokens based on + # {::Google::Cloud::Tasks::V2beta3::RateLimits#max_dispatches_per_second max_dispatches_per_second}. + # + # The default value of `max_burst_size` is picked by Cloud Tasks + # based on the value of + # {::Google::Cloud::Tasks::V2beta3::RateLimits#max_dispatches_per_second max_dispatches_per_second}. + # + # The maximum value of `max_burst_size` is 500. + # + # For App Engine queues that were created or updated using + # `queue.yaml/xml`, `max_burst_size` is equal to + # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). + # If + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#update_queue UpdateQueue} is called + # on a queue without explicitly setting a value for `max_burst_size`, + # `max_burst_size` value will get updated if + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#update_queue UpdateQueue} is + # updating + # {::Google::Cloud::Tasks::V2beta3::RateLimits#max_dispatches_per_second max_dispatches_per_second}. + # @!attribute [rw] max_concurrent_dispatches + # @return [::Integer] + # The maximum number of concurrent tasks that Cloud Tasks allows + # to be dispatched for this queue. After this threshold has been + # reached, Cloud Tasks stops dispatching tasks until the number of + # concurrent requests decreases. + # + # If unspecified when the queue is created, Cloud Tasks will pick the + # default. + # + # + # The maximum allowed value is 5,000. + # + # + # This field has the same meaning as + # [max_concurrent_requests in + # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). + class RateLimits + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Retry config. + # + # These settings determine when a failed task attempt is retried. + # @!attribute [rw] max_attempts + # @return [::Integer] + # Number of attempts per task. + # + # Cloud Tasks will attempt the task `max_attempts` times (that is, if the + # first attempt fails, then there will be `max_attempts - 1` retries). Must + # be >= -1. + # + # If unspecified when the queue is created, Cloud Tasks will pick the + # default. + # + # -1 indicates unlimited attempts. + # + # This field has the same meaning as + # [task_retry_limit in + # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + # @!attribute [rw] max_retry_duration + # @return [::Google::Protobuf::Duration] + # If positive, `max_retry_duration` specifies the time limit for + # retrying a failed task, measured from when the task was first + # attempted. Once `max_retry_duration` time has passed *and* the + # task has been attempted + # {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_attempts max_attempts} times, + # no further attempts will be made and the task will be deleted. + # + # If zero, then the task age is unlimited. + # + # If unspecified when the queue is created, Cloud Tasks will pick the + # default. + # + # + # `max_retry_duration` will be truncated to the nearest second. + # + # This field has the same meaning as + # [task_age_limit in + # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + # @!attribute [rw] min_backoff + # @return [::Google::Protobuf::Duration] + # A task will be {::Google::Cloud::Tasks::V2beta3::Task#schedule_time scheduled} + # for retry between + # {::Google::Cloud::Tasks::V2beta3::RetryConfig#min_backoff min_backoff} and + # {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_backoff max_backoff} duration + # after it fails, if the queue's + # {::Google::Cloud::Tasks::V2beta3::RetryConfig RetryConfig} specifies that the + # task should be retried. + # + # If unspecified when the queue is created, Cloud Tasks will pick the + # default. + # + # + # `min_backoff` will be truncated to the nearest second. + # + # This field has the same meaning as + # [min_backoff_seconds in + # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + # @!attribute [rw] max_backoff + # @return [::Google::Protobuf::Duration] + # A task will be {::Google::Cloud::Tasks::V2beta3::Task#schedule_time scheduled} + # for retry between + # {::Google::Cloud::Tasks::V2beta3::RetryConfig#min_backoff min_backoff} and + # {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_backoff max_backoff} duration + # after it fails, if the queue's + # {::Google::Cloud::Tasks::V2beta3::RetryConfig RetryConfig} specifies that the + # task should be retried. + # + # If unspecified when the queue is created, Cloud Tasks will pick the + # default. + # + # + # `max_backoff` will be truncated to the nearest second. + # + # This field has the same meaning as + # [max_backoff_seconds in + # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + # @!attribute [rw] max_doublings + # @return [::Integer] + # The time between retries will double `max_doublings` times. + # + # A task's retry interval starts at + # {::Google::Cloud::Tasks::V2beta3::RetryConfig#min_backoff min_backoff}, then + # doubles `max_doublings` times, then increases linearly, and finally retries + # at intervals of + # {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_backoff max_backoff} up to + # {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_attempts max_attempts} times. + # + # For example, if + # {::Google::Cloud::Tasks::V2beta3::RetryConfig#min_backoff min_backoff} is 10s, + # {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_backoff max_backoff} is 300s, + # and `max_doublings` is 3, then the a task will first be retried in 10s. The + # retry interval will double three times, and then increase linearly by 2^3 * + # 10s. Finally, the task will retry at intervals of + # {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_backoff max_backoff} until the + # task has been attempted + # {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_attempts max_attempts} times. + # Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, + # 300s, .... + # + # If unspecified when the queue is created, Cloud Tasks will pick the + # default. + # + # + # This field has the same meaning as + # [max_doublings in + # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + class RetryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration options for writing logs to + # [Stackdriver Logging](https://cloud.google.com/logging/docs/). + # @!attribute [rw] sampling_ratio + # @return [::Float] + # Specifies the fraction of operations to write to + # [Stackdriver Logging](https://cloud.google.com/logging/docs/). + # This field may contain any value between 0.0 and 1.0, inclusive. + # 0.0 is the default and means that no operations are logged. + class StackdriverLoggingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Statistics for a queue. + # @!attribute [r] tasks_count + # @return [::Integer] + # Output only. An estimation of the number of tasks in the queue, that is, + # the tasks in the queue that haven't been executed, the tasks in the queue + # which the queue has dispatched but has not yet received a reply for, and + # the failed tasks that the queue is retrying. + # @!attribute [r] oldest_estimated_arrival_time + # @return [::Google::Protobuf::Timestamp] + # Output only. An estimation of the nearest time in the future where a task + # in the queue is scheduled to be executed. + # @!attribute [r] executed_last_minute_count + # @return [::Integer] + # Output only. The number of tasks that the queue has dispatched and received + # a reply for during the last minute. This variable counts both successful + # and non-successful executions. + # @!attribute [r] concurrent_dispatches_count + # @return [::Integer] + # Output only. The number of requests that the queue has dispatched but has + # not received a reply for yet. + # @!attribute [r] effective_execution_rate + # @return [::Float] + # Output only. The current maximum number of tasks per second executed by the + # queue. The maximum value of this variable is controlled by the RateLimits + # of the Queue. However, this value could be less to avoid overloading the + # endpoints tasks in the queue are targeting. + class QueueStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/target.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/target.rb new file mode 100644 index 000000000000..0e27cb1fe1f2 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/target.rb @@ -0,0 +1,728 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Tasks + module V2beta3 + # Pull Message. + # + # This proto can only be used for tasks in a queue which has + # {::Google::Cloud::Tasks::V2beta3::Queue#type PULL} type. It currently exists for + # backwards compatibility with the App Engine Task Queue SDK. This message type + # maybe returned with methods + # [list][google.cloud.tasks.v2beta3.CloudTask.ListTasks] and + # [get][google.cloud.tasks.v2beta3.CloudTask.ListTasks], when the response view + # is [FULL][google.cloud.tasks.v2beta3.Task.View.Full]. + # @!attribute [rw] payload + # @return [::String] + # A data payload consumed by the worker to execute the task. + # @!attribute [rw] tag + # @return [::String] + # The tasks's tag. + # + # The tag is less than 500 characters. + # + # SDK compatibility: Although the SDK allows tags to be either + # string or + # [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + # only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 + # encoded, the tag will be empty when the task is returned by Cloud Tasks. + class PullMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # PathOverride. + # + # Path message defines path override for HTTP targets. + # @!attribute [rw] path + # @return [::String] + # The URI path (e.g., /users/1234). Default is an empty string. + class PathOverride + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # QueryOverride. + # + # Query message defines query override for HTTP targets. + # @!attribute [rw] query_params + # @return [::String] + # The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty + # string. + class QueryOverride + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # URI Override. + # + # When specified, all the HTTP tasks inside the queue will be partially or + # fully overridden depending on the configured values. + # @!attribute [rw] scheme + # @return [::Google::Cloud::Tasks::V2beta3::UriOverride::Scheme] + # Scheme override. + # + # When specified, the task URI scheme is replaced by the provided value (HTTP + # or HTTPS). + # @!attribute [rw] host + # @return [::String] + # Host override. + # + # When specified, replaces the host part of the task URL. For example, + # if the task URL is "https://www.google.com," and host value is set to + # "example.net", the overridden URI will be changed to "https://example.net." + # Host value cannot be an empty string (INVALID_ARGUMENT). + # @!attribute [rw] port + # @return [::Integer] + # Port override. + # + # When specified, replaces the port part of the task URI. For instance, + # for a URI http://www.google.com/foo and port=123, the overridden URI + # becomes http://www.google.com:123/foo. Note that the port value must be a + # positive integer. Setting the port to 0 (Zero) clears the URI port. + # @!attribute [rw] path_override + # @return [::Google::Cloud::Tasks::V2beta3::PathOverride] + # URI path. + # + # When specified, replaces the existing path of the task URL. Setting the + # path value to an empty string clears the URI path segment. + # @!attribute [rw] query_override + # @return [::Google::Cloud::Tasks::V2beta3::QueryOverride] + # URI Query. + # + # When specified, replaces the query part of the task URI. Setting the + # query value to an empty string clears the URI query segment. + # @!attribute [rw] uri_override_enforce_mode + # @return [::Google::Cloud::Tasks::V2beta3::UriOverride::UriOverrideEnforceMode] + # URI Override Enforce Mode + # + # When specified, determines the Target UriOverride mode. If not specified, + # it defaults to ALWAYS. + class UriOverride + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The Scheme for an HTTP request. By default, it is HTTPS. + module Scheme + # Scheme unspecified. Defaults to HTTPS. + SCHEME_UNSPECIFIED = 0 + + # Convert the scheme to HTTP, e.g., https://www.google.ca will change to + # http://www.google.ca. + HTTP = 1 + + # Convert the scheme to HTTPS, e.g., http://www.google.ca will change to + # https://www.google.ca. + HTTPS = 2 + end + + # UriOverrideEnforceMode mode is to define enforcing mode for the override + # modes. + module UriOverrideEnforceMode + # OverrideMode Unspecified. Defaults to ALWAYS. + URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED = 0 + + # In the IF_NOT_EXISTS mode, queue-level configuration is only + # applied where task-level configuration does not exist. + IF_NOT_EXISTS = 1 + + # In the ALWAYS mode, queue-level configuration overrides all + # task-level configuration + ALWAYS = 2 + end + end + + # HTTP target. + # + # When specified as a [Queue][target_type], all the tasks with [HttpRequest] + # will be overridden according to the target. + # @!attribute [rw] uri_override + # @return [::Google::Cloud::Tasks::V2beta3::UriOverride] + # URI override. + # + # When specified, overrides the execution URI for all the tasks in the queue. + # @!attribute [rw] http_method + # @return [::Google::Cloud::Tasks::V2beta3::HttpMethod] + # The HTTP method to use for the request. + # + # When specified, it overrides + # {::Google::Cloud::Tasks::V2beta3::HttpTarget#http_method HttpRequest} for the + # task. Note that if the value is set to [HttpMethod][GET] the + # [HttpRequest][body] of the task will be ignored at execution time. + # @!attribute [rw] header_overrides + # @return [::Array<::Google::Cloud::Tasks::V2beta3::HttpTarget::HeaderOverride>] + # HTTP target headers. + # + # This map contains the header field names and values. + # Headers will be set when running the + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task CreateTask} and/or + # [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask]. + # + # These headers represent a subset of the headers that will be configured for + # the task's HTTP request. Some HTTP request headers will be ignored or + # replaced. + # + # A partial list of headers that will be ignored or replaced is: + # * Several predefined headers, prefixed with "X-CloudTasks-", can + # be used to define properties of the task. + # * Host: This will be computed by Cloud Tasks and derived from + # [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url]. + # * Content-Length: This will be computed by Cloud Tasks. + # + # `Content-Type` won't be set by Cloud Tasks. You can explicitly set + # `Content-Type` to a media type when the + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task task is created}. + # For example,`Content-Type` can be set to `"application/octet-stream"` or + # `"application/json"`. The default value is set to `"application/json"`. + # + # * User-Agent: This will be set to `"Google-Cloud-Tasks"`. + # + # Headers which can have multiple values (according to RFC2616) can be + # specified using comma-separated values. + # + # The size of the headers must be less than 80KB. + # Queue-level headers to override headers of all the tasks in the queue. + # @!attribute [rw] oauth_token + # @return [::Google::Cloud::Tasks::V2beta3::OAuthToken] + # If specified, an + # [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + # will be generated and attached as the `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`, `oidc_token`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] oidc_token + # @return [::Google::Cloud::Tasks::V2beta3::OidcToken] + # If specified, an + # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + # token will be generated and attached as an `Authorization` header in the + # HTTP request. + # + # This type of authorization can be used for many scenarios, including + # calling Cloud Run, or endpoints where you intend to validate the token + # yourself. + # + # Note: The following fields are mutually exclusive: `oidc_token`, `oauth_token`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class HttpTarget + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines a header message. A header can have a key and a value. + # @!attribute [rw] key + # @return [::String] + # The Key of the header. + # @!attribute [rw] value + # @return [::String] + # The Value of the header. + class Header + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wraps the Header object. + # @!attribute [rw] header + # @return [::Google::Cloud::Tasks::V2beta3::HttpTarget::Header] + # header embodying a key and a value. + class HeaderOverride + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # HTTP request. + # + # The task will be pushed to the worker as an HTTP request. If the worker + # or the redirected worker acknowledges the task by returning a successful HTTP + # response code ([`200` - `299`]), the task will be removed from the queue. If + # any other HTTP response code is returned or no response is received, the + # task will be retried according to the following: + # + # * User-specified throttling: [retry + # configuration][google.cloud.tasks.v2beta3.Queue.retry_config], + # {::Google::Cloud::Tasks::V2beta3::Queue#rate_limits rate limits}, and the + # [queue's state][google.cloud.tasks.v2beta3.Queue.state]. + # + # * System throttling: To prevent the worker from overloading, Cloud Tasks may + # temporarily reduce the queue's effective rate. User-specified settings + # will not be changed. + # + # System throttling happens because: + # + # * Cloud Tasks backs off on all errors. Normally the backoff specified in + # {::Google::Cloud::Tasks::V2beta3::Queue#rate_limits rate limits} will be used. + # But if the worker returns `429` (Too Many Requests), `503` (Service + # Unavailable), or the rate of errors is high, Cloud Tasks will use a + # higher backoff rate. The retry specified in the `Retry-After` HTTP + # response header is considered. + # + # * To prevent traffic spikes and to smooth sudden increases in traffic, + # dispatches ramp up slowly when the queue is newly created or idle and + # if large numbers of tasks suddenly become available to dispatch (due to + # spikes in create task rates, the queue being unpaused, or many tasks + # that are scheduled at the same time). + # @!attribute [rw] url + # @return [::String] + # Required. The full url path that the request will be sent to. + # + # This string must begin with either "http://" or "https://". Some examples + # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will + # encode some characters for safety and compatibility. The maximum allowed + # URL length is 2083 characters after encoding. + # + # The `Location` header response from a redirect response [`300` - `399`] + # may be followed. The redirect is not counted as a separate attempt. + # @!attribute [rw] http_method + # @return [::Google::Cloud::Tasks::V2beta3::HttpMethod] + # The HTTP method to use for the request. The default is POST. + # @!attribute [rw] headers + # @return [::Google::Protobuf::Map{::String => ::String}] + # HTTP request headers. + # + # This map contains the header field names and values. + # Headers can be set when the + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task task is created}. + # + # These headers represent a subset of the headers that will accompany the + # task's HTTP request. Some HTTP request headers will be ignored or replaced. + # + # A partial list of headers that will be ignored or replaced is: + # + # * Any header that is prefixed with "X-CloudTasks-" will be treated + # as service header. Service headers define properties of the task and are + # predefined in CloudTask. + # * Host: This will be computed by Cloud Tasks and derived from + # {::Google::Cloud::Tasks::V2beta3::HttpRequest#url HttpRequest.url}. + # * Content-Length: This will be computed by Cloud Tasks. + # * User-Agent: This will be set to `"Google-Cloud-Tasks"`. + # * `X-Google-*`: Google use only. + # * `X-AppEngine-*`: Google use only. + # + # `Content-Type` won't be set by Cloud Tasks. You can explicitly set + # `Content-Type` to a media type when the + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task task is created}. + # For example, `Content-Type` can be set to `"application/octet-stream"` or + # `"application/json"`. + # + # Headers which can have multiple values (according to RFC2616) can be + # specified using comma-separated values. + # + # The size of the headers must be less than 80KB. + # @!attribute [rw] body + # @return [::String] + # HTTP request body. + # + # A request body is allowed only if the + # {::Google::Cloud::Tasks::V2beta3::HttpRequest#http_method HTTP method} is POST, + # PUT, or PATCH. It is an error to set body on a task with an incompatible + # {::Google::Cloud::Tasks::V2beta3::HttpMethod HttpMethod}. + # @!attribute [rw] oauth_token + # @return [::Google::Cloud::Tasks::V2beta3::OAuthToken] + # 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`, `oidc_token`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] oidc_token + # @return [::Google::Cloud::Tasks::V2beta3::OidcToken] + # If specified, an + # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + # token will be generated and attached as an `Authorization` header in the + # HTTP request. + # + # This type of authorization can be used for many scenarios, including + # calling Cloud Run, or endpoints where you intend to validate the token + # yourself. + # + # Note: The following fields are mutually exclusive: `oidc_token`, `oauth_token`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class HttpRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class HeadersEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # App Engine HTTP queue. + # + # The task will be delivered to the App Engine application hostname + # specified by its + # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue AppEngineHttpQueue} and + # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest AppEngineHttpRequest}. The + # documentation for + # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest AppEngineHttpRequest} + # explains how the task's host URL is constructed. + # + # Using {::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue AppEngineHttpQueue} + # requires + # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) + # Google IAM permission for the project + # and the following scope: + # + # `https://www.googleapis.com/auth/cloud-platform` + # @!attribute [rw] app_engine_routing_override + # @return [::Google::Cloud::Tasks::V2beta3::AppEngineRouting] + # Overrides for the + # [task-level + # app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. + # + # If set, `app_engine_routing_override` is used for all tasks in + # the queue, no matter what the setting is for the + # [task-level + # app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. + class AppEngineHttpQueue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # App Engine HTTP request. + # + # The message defines the HTTP request that is sent to an App Engine app when + # the task is dispatched. + # + # Using {::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest AppEngineHttpRequest} + # requires + # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) + # Google IAM permission for the project + # and the following scope: + # + # `https://www.googleapis.com/auth/cloud-platform` + # + # The task will be delivered to the App Engine app which belongs to the same + # project as the queue. For more information, see + # [How Requests are + # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) + # and how routing is affected by + # [dispatch + # files](https://cloud.google.com/appengine/docs/python/config/dispatchref). + # Traffic is encrypted during transport and never leaves Google datacenters. + # Because this traffic is carried over a communication mechanism internal to + # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS). + # The request to the handler, however, will appear to have used the HTTP + # protocol. + # + # The {::Google::Cloud::Tasks::V2beta3::AppEngineRouting AppEngineRouting} used to + # construct the URL that the task is delivered to can be set at the queue-level + # or task-level: + # + # * If set, + # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue#app_engine_routing_override app_engine_routing_override} + # is used for all tasks in the queue, no matter what the setting + # is for the + # [task-level + # app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. + # + # + # The `url` that the task will be sent to is: + # + # * `url =` {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#host host} `+` + # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest#relative_uri relative_uri} + # + # Tasks can be dispatched to secure app handlers, unsecure app handlers, and + # URIs restricted with + # [`login: + # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref). + # Because tasks are not run as any user, they cannot be dispatched to URIs + # restricted with + # [`login: + # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) + # Task dispatches also do not follow redirects. + # + # The task attempt has succeeded if the app's request handler returns an HTTP + # response code in the range [`200` - `299`]. The task attempt has failed if + # the app's handler returns a non-2xx response code or Cloud Tasks does + # not receive response before the + # {::Google::Cloud::Tasks::V2beta3::Task#dispatch_deadline deadline}. Failed tasks + # will be retried according to the [retry + # configuration][google.cloud.tasks.v2beta3.Queue.retry_config]. `503` (Service + # Unavailable) is considered an App Engine system error instead of an + # application error and will cause Cloud Tasks' traffic congestion control to + # temporarily throttle the queue's dispatches. Unlike other types of task + # targets, a `429` (Too Many Requests) response from an app handler does not + # cause traffic congestion control to throttle the queue. + # @!attribute [rw] http_method + # @return [::Google::Cloud::Tasks::V2beta3::HttpMethod] + # The HTTP method to use for the request. The default is POST. + # + # The app's request handler for the task's target URL must be able to handle + # HTTP requests with this http_method, otherwise the task attempt fails with + # error code 405 (Method Not Allowed). See [Writing a push task request + # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) + # and the App Engine documentation for your runtime on [How Requests are + # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). + # @!attribute [rw] app_engine_routing + # @return [::Google::Cloud::Tasks::V2beta3::AppEngineRouting] + # Task-level setting for App Engine routing. + # + # If set, + # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue#app_engine_routing_override app_engine_routing_override} + # is used for all tasks in the queue, no matter what the setting is for the + # [task-level + # app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. + # @!attribute [rw] relative_uri + # @return [::String] + # The relative URI. + # + # The relative URI must begin with "/" and must be a valid HTTP relative URI. + # It can contain a path and query string arguments. + # If the relative URI is empty, then the root path "/" will be used. + # No spaces are allowed, and the maximum length allowed is 2083 characters. + # @!attribute [rw] headers + # @return [::Google::Protobuf::Map{::String => ::String}] + # HTTP request headers. + # + # This map contains the header field names and values. + # Headers can be set when the + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task task is created}. + # Repeated headers are not supported but a header value can contain commas. + # + # Cloud Tasks sets some headers to default values: + # + # * `User-Agent`: By default, this header is + # `"AppEngine-Google; (+http://code.google.com/appengine)"`. + # This header can be modified, but Cloud Tasks will append + # `"AppEngine-Google; (+http://code.google.com/appengine)"` to the + # modified `User-Agent`. + # + # If the task has a + # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest#body body}, Cloud Tasks + # sets the following headers: + # + # * `Content-Type`: By default, the `Content-Type` header is set to + # `"application/octet-stream"`. The default can be overridden by explicitly + # setting `Content-Type` to a particular media type when the + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task task is created}. + # For example, `Content-Type` can be set to `"application/json"`. + # * `Content-Length`: This is computed by Cloud Tasks. This value is + # output only. It cannot be changed. + # + # The headers below cannot be set or overridden: + # + # * `Host` + # * `X-Google-*` + # * `X-AppEngine-*` + # + # In addition, Cloud Tasks sets some headers when the task is dispatched, + # such as headers containing information about the task; see + # [request + # headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers). + # These headers are set only when the task is dispatched, so they are not + # visible when the task is returned in a Cloud Tasks response. + # + # Although there is no specific limit for the maximum number of headers or + # the size, there is a limit on the maximum size of the + # {::Google::Cloud::Tasks::V2beta3::Task Task}. For more information, see the + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task CreateTask} + # documentation. + # @!attribute [rw] body + # @return [::String] + # HTTP request body. + # + # A request body is allowed only if the HTTP method is POST or PUT. It is + # an error to set a body on a task with an incompatible + # {::Google::Cloud::Tasks::V2beta3::HttpMethod HttpMethod}. + class AppEngineHttpRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class HeadersEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # App Engine Routing. + # + # Defines routing characteristics specific to App Engine - service, version, + # and instance. + # + # For more information about services, versions, and instances see + # [An Overview of App + # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), + # [Microservices Architecture on Google App + # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), + # [App Engine Standard request + # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), + # and [App Engine Flex request + # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). + # @!attribute [rw] service + # @return [::String] + # App service. + # + # By default, the task is sent to the service which is the default + # service when the task is attempted. + # + # For some queues or tasks which were created using the App Engine + # Task Queue API, {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#host host} is + # not parsable into + # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#service service}, + # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#version version}, and + # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#instance instance}. For + # example, some tasks which were created using the App Engine SDK use a + # custom domain name; custom domains are not parsed by Cloud Tasks. If + # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#host host} is not parsable, + # then {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#service service}, + # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#version version}, and + # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#instance instance} are the + # empty string. + # @!attribute [rw] version + # @return [::String] + # App version. + # + # By default, the task is sent to the version which is the default + # version when the task is attempted. + # + # For some queues or tasks which were created using the App Engine + # Task Queue API, {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#host host} is + # not parsable into + # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#service service}, + # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#version version}, and + # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#instance instance}. For + # example, some tasks which were created using the App Engine SDK use a + # custom domain name; custom domains are not parsed by Cloud Tasks. If + # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#host host} is not parsable, + # then {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#service service}, + # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#version version}, and + # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#instance instance} are the + # empty string. + # @!attribute [rw] instance + # @return [::String] + # App instance. + # + # By default, the task is sent to an instance which is available when + # the task is attempted. + # + # Requests can only be sent to a specific instance if + # [manual scaling is used in App Engine + # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + # App Engine Flex does not support instances. For more information, see + # [App Engine Standard request + # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) + # and [App Engine Flex request + # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). + # @!attribute [rw] host + # @return [::String] + # Output only. The host that the task is sent to. + # + # The host is constructed from the domain name of the app associated with + # the queue's project ID (for example .appspot.com), and the + # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#service service}, + # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#version version}, and + # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#instance instance}. Tasks + # which were created using the App Engine SDK might have a custom domain + # name. + # + # For more information, see + # [How Requests are + # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). + class AppEngineRouting + 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_email + # @return [::String] + # [Service account email](https://cloud.google.com/iam/docs/service-accounts) + # to be used for generating OAuth token. + # The service account must be within the same project as the queue. The + # caller must have iam.serviceAccounts.actAs permission for the service + # account. + # @!attribute [rw] scope + # @return [::String] + # 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 + + # Contains information needed for generating an + # [OpenID Connect + # token](https://developers.google.com/identity/protocols/OpenIDConnect). + # This type of authorization can be used for many scenarios, including + # calling Cloud Run, or endpoints where you intend to validate the token + # yourself. + # @!attribute [rw] service_account_email + # @return [::String] + # [Service account email](https://cloud.google.com/iam/docs/service-accounts) + # to be used for generating OIDC token. + # The service account must be within the same project as the queue. The + # caller must have iam.serviceAccounts.actAs permission for the service + # account. + # @!attribute [rw] audience + # @return [::String] + # Audience to be used when generating OIDC token. If not specified, the URI + # specified in target will be used. + class OidcToken + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The HTTP method used to execute the task. + module HttpMethod + # HTTP method unspecified + HTTP_METHOD_UNSPECIFIED = 0 + + # HTTP POST + POST = 1 + + # HTTP GET + GET = 2 + + # HTTP HEAD + HEAD = 3 + + # HTTP PUT + PUT = 4 + + # HTTP DELETE + DELETE = 5 + + # HTTP PATCH + PATCH = 6 + + # HTTP OPTIONS + OPTIONS = 7 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/task.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/task.rb new file mode 100644 index 000000000000..b412727c1c81 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/task.rb @@ -0,0 +1,213 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Tasks + module V2beta3 + # A unit of scheduled work. + # @!attribute [rw] name + # @return [::String] + # Optionally caller-specified in + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task CreateTask}. + # + # The task name. + # + # The task name must have the following format: + # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + # + # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + # hyphens (-), colons (:), or periods (.). + # For more information, see + # [Identifying + # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + # * `LOCATION_ID` is the canonical ID for the task's location. + # The list of available locations can be obtained by calling + # [ListLocations][google.cloud.location.Locations.ListLocations]. + # For more information, see https://cloud.google.com/about/locations/. + # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + # hyphens (-). The maximum length is 100 characters. + # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), + # hyphens (-), or underscores (_). The maximum length is 500 characters. + # @!attribute [rw] app_engine_http_request + # @return [::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest] + # HTTP request that is sent to the App Engine app handler. + # + # An App Engine task is a task that has + # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest AppEngineHttpRequest} + # set. + # + # Note: The following fields are mutually exclusive: `app_engine_http_request`, `http_request`, `pull_message`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] http_request + # @return [::Google::Cloud::Tasks::V2beta3::HttpRequest] + # HTTP request that is sent to the task's target. + # + # An HTTP task is a task that has + # {::Google::Cloud::Tasks::V2beta3::HttpRequest HttpRequest} set. + # + # Note: The following fields are mutually exclusive: `http_request`, `app_engine_http_request`, `pull_message`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] pull_message + # @return [::Google::Cloud::Tasks::V2beta3::PullMessage] + # Pull Message contained in a task in a + # {::Google::Cloud::Tasks::V2beta3::Queue#type PULL} queue type. This payload + # type cannot be explicitly set through Cloud Tasks API. Its purpose, + # currently is to provide backward compatibility with App Engine Task Queue + # [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/) + # queues to provide a way to inspect contents of pull tasks through the + # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#get_task CloudTasks.GetTask}. + # + # Note: The following fields are mutually exclusive: `pull_message`, `app_engine_http_request`, `http_request`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] schedule_time + # @return [::Google::Protobuf::Timestamp] + # The time when the task is scheduled to be attempted. + # + # For App Engine queues, this is when the task will be attempted or retried. + # + # `schedule_time` will be truncated to the nearest microsecond. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time that the task was created. + # + # `create_time` will be truncated to the nearest second. + # @!attribute [rw] dispatch_deadline + # @return [::Google::Protobuf::Duration] + # The deadline for requests sent to the worker. If the worker does not + # respond by this deadline then the request is cancelled and the attempt + # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the + # task according to the + # {::Google::Cloud::Tasks::V2beta3::RetryConfig RetryConfig}. + # + # Note that when the request is cancelled, Cloud Tasks will stop listening + # for the response, but whether the worker stops processing depends on the + # worker. For example, if the worker is stuck, it may not react to cancelled + # requests. + # + # The default and maximum values depend on the type of request: + # + # * For {::Google::Cloud::Tasks::V2beta3::HttpRequest HTTP tasks}, the default is + # 10 minutes. The deadline + # must be in the interval [15 seconds, 30 minutes]. + # + # * For {::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest App Engine tasks}, + # 0 indicates that the + # request has the default deadline. The default deadline depends on the + # [scaling + # type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) + # of the service: 10 minutes for standard apps with automatic scaling, 24 + # hours for standard apps with manual and basic scaling, and 60 minutes for + # flex apps. If the request deadline is set, it must be in the interval [15 + # seconds, 24 hours 15 seconds]. Regardless of the task's + # `dispatch_deadline`, the app handler will not run for longer than than + # the service's timeout. We recommend setting the `dispatch_deadline` to + # at most a few seconds more than the app handler's timeout. For more + # information see + # [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). + # + # `dispatch_deadline` will be truncated to the nearest millisecond. The + # deadline is an approximate deadline. + # @!attribute [rw] dispatch_count + # @return [::Integer] + # Output only. The number of attempts dispatched. + # + # This count includes attempts which have been dispatched but haven't + # received a response. + # @!attribute [rw] response_count + # @return [::Integer] + # Output only. The number of attempts which have received a response. + # @!attribute [rw] first_attempt + # @return [::Google::Cloud::Tasks::V2beta3::Attempt] + # Output only. The status of the task's first attempt. + # + # Only {::Google::Cloud::Tasks::V2beta3::Attempt#dispatch_time dispatch_time} will + # be set. The other {::Google::Cloud::Tasks::V2beta3::Attempt Attempt} information + # is not retained by Cloud Tasks. + # @!attribute [rw] last_attempt + # @return [::Google::Cloud::Tasks::V2beta3::Attempt] + # Output only. The status of the task's last attempt. + # @!attribute [rw] view + # @return [::Google::Cloud::Tasks::V2beta3::Task::View] + # Output only. The view specifies which subset of the + # {::Google::Cloud::Tasks::V2beta3::Task Task} has been returned. + class Task + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The view specifies a subset of {::Google::Cloud::Tasks::V2beta3::Task Task} + # data. + # + # When a task is returned in a response, not all + # information is retrieved by default because some data, such as + # payloads, might be desirable to return only when needed because + # of its large size or because of the sensitivity of data that it + # contains. + module View + # Unspecified. Defaults to BASIC. + VIEW_UNSPECIFIED = 0 + + # The basic view omits fields which can be large or can contain + # sensitive data. + # + # This view does not include the + # [body in + # AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body]. + # Bodies are desirable to return only when needed, because they + # can be large and because of the sensitivity of the data that you + # choose to store in it. + BASIC = 1 + + # All information is returned. + # + # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} + # requires `cloudtasks.tasks.fullView` [Google + # IAM](https://cloud.google.com/iam/) permission on the + # {::Google::Cloud::Tasks::V2beta3::Queue Queue} resource. + FULL = 2 + end + end + + # The status of a task attempt. + # @!attribute [rw] schedule_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time that this attempt was scheduled. + # + # `schedule_time` will be truncated to the nearest microsecond. + # @!attribute [rw] dispatch_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time that this attempt was dispatched. + # + # `dispatch_time` will be truncated to the nearest microsecond. + # @!attribute [rw] response_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time that this attempt response was received. + # + # `response_time` will be truncated to the nearest microsecond. + # @!attribute [rw] response_status + # @return [::Google::Rpc::Status] + # Output only. The response from the worker for this attempt. + # + # If `response_time` is unset, then the task has not been attempted or is + # currently running and the `response_status` field is meaningless. + class Attempt + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # 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"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::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). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/iam/v1/options.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! + + +module Google + module Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3/snippets/Gemfile b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/Gemfile new file mode 100644 index 000000000000..b6cbdf612a3b --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3", path: "../" +else + gem "google-cloud-tasks-v2beta3" +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-tasks-v2beta3/snippets/cloud_tasks/create_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/create_queue.rb new file mode 100644 index 000000000000..9d315fa5fb2a --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/create_queue.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 cloudtasks_v2beta3_generated_CloudTasks_CreateQueue_sync] +require "google/cloud/tasks/v2beta3" + +## +# Snippet for the create_queue call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_queue. +# +def create_queue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta3::CreateQueueRequest.new + + # Call the create_queue method. + result = client.create_queue request + + # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. + p result +end +# [END cloudtasks_v2beta3_generated_CloudTasks_CreateQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/create_task.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/create_task.rb new file mode 100644 index 000000000000..1307bbaa425c --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/create_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudtasks_v2beta3_generated_CloudTasks_CreateTask_sync] +require "google/cloud/tasks/v2beta3" + +## +# Snippet for the create_task call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task. +# +def create_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta3::CreateTaskRequest.new + + # Call the create_task method. + result = client.create_task request + + # The returned object is of type Google::Cloud::Tasks::V2beta3::Task. + p result +end +# [END cloudtasks_v2beta3_generated_CloudTasks_CreateTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/delete_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/delete_queue.rb new file mode 100644 index 000000000000..32780452f076 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/delete_queue.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 cloudtasks_v2beta3_generated_CloudTasks_DeleteQueue_sync] +require "google/cloud/tasks/v2beta3" + +## +# Snippet for the delete_queue call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#delete_queue. +# +def delete_queue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta3::DeleteQueueRequest.new + + # Call the delete_queue method. + result = client.delete_queue request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END cloudtasks_v2beta3_generated_CloudTasks_DeleteQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/delete_task.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/delete_task.rb new file mode 100644 index 000000000000..2e14ac7238d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/delete_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudtasks_v2beta3_generated_CloudTasks_DeleteTask_sync] +require "google/cloud/tasks/v2beta3" + +## +# Snippet for the delete_task call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#delete_task. +# +def delete_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta3::DeleteTaskRequest.new + + # Call the delete_task method. + result = client.delete_task request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END cloudtasks_v2beta3_generated_CloudTasks_DeleteTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/get_iam_policy.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/get_iam_policy.rb new file mode 100644 index 000000000000..b67132daf33c --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/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 cloudtasks_v2beta3_generated_CloudTasks_GetIamPolicy_sync] +require "google/cloud/tasks/v2beta3" + +## +# Snippet for the get_iam_policy call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta3::CloudTasks::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 cloudtasks_v2beta3_generated_CloudTasks_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/get_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/get_queue.rb new file mode 100644 index 000000000000..6a08e7775a37 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/get_queue.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 cloudtasks_v2beta3_generated_CloudTasks_GetQueue_sync] +require "google/cloud/tasks/v2beta3" + +## +# Snippet for the get_queue call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#get_queue. +# +def get_queue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta3::GetQueueRequest.new + + # Call the get_queue method. + result = client.get_queue request + + # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. + p result +end +# [END cloudtasks_v2beta3_generated_CloudTasks_GetQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/get_task.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/get_task.rb new file mode 100644 index 000000000000..7601d4c33b48 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/get_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudtasks_v2beta3_generated_CloudTasks_GetTask_sync] +require "google/cloud/tasks/v2beta3" + +## +# Snippet for the get_task call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#get_task. +# +def get_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta3::GetTaskRequest.new + + # Call the get_task method. + result = client.get_task request + + # The returned object is of type Google::Cloud::Tasks::V2beta3::Task. + p result +end +# [END cloudtasks_v2beta3_generated_CloudTasks_GetTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/list_queues.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/list_queues.rb new file mode 100644 index 000000000000..221826aa161c --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/list_queues.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 cloudtasks_v2beta3_generated_CloudTasks_ListQueues_sync] +require "google/cloud/tasks/v2beta3" + +## +# Snippet for the list_queues call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_queues. +# +def list_queues + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta3::ListQueuesRequest.new + + # Call the list_queues method. + result = client.list_queues request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Tasks::V2beta3::Queue. + p item + end +end +# [END cloudtasks_v2beta3_generated_CloudTasks_ListQueues_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/list_tasks.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/list_tasks.rb new file mode 100644 index 000000000000..e3e486644e66 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/list_tasks.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudtasks_v2beta3_generated_CloudTasks_ListTasks_sync] +require "google/cloud/tasks/v2beta3" + +## +# Snippet for the list_tasks call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_tasks. +# +def list_tasks + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta3::ListTasksRequest.new + + # Call the list_tasks method. + result = client.list_tasks request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Tasks::V2beta3::Task. + p item + end +end +# [END cloudtasks_v2beta3_generated_CloudTasks_ListTasks_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/pause_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/pause_queue.rb new file mode 100644 index 000000000000..d2ece1b4633a --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/pause_queue.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 cloudtasks_v2beta3_generated_CloudTasks_PauseQueue_sync] +require "google/cloud/tasks/v2beta3" + +## +# Snippet for the pause_queue call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#pause_queue. +# +def pause_queue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta3::PauseQueueRequest.new + + # Call the pause_queue method. + result = client.pause_queue request + + # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. + p result +end +# [END cloudtasks_v2beta3_generated_CloudTasks_PauseQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/purge_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/purge_queue.rb new file mode 100644 index 000000000000..0948654d23db --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/purge_queue.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 cloudtasks_v2beta3_generated_CloudTasks_PurgeQueue_sync] +require "google/cloud/tasks/v2beta3" + +## +# Snippet for the purge_queue call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#purge_queue. +# +def purge_queue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta3::PurgeQueueRequest.new + + # Call the purge_queue method. + result = client.purge_queue request + + # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. + p result +end +# [END cloudtasks_v2beta3_generated_CloudTasks_PurgeQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/resume_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/resume_queue.rb new file mode 100644 index 000000000000..e22638c37139 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/resume_queue.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 cloudtasks_v2beta3_generated_CloudTasks_ResumeQueue_sync] +require "google/cloud/tasks/v2beta3" + +## +# Snippet for the resume_queue call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#resume_queue. +# +def resume_queue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta3::ResumeQueueRequest.new + + # Call the resume_queue method. + result = client.resume_queue request + + # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. + p result +end +# [END cloudtasks_v2beta3_generated_CloudTasks_ResumeQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/run_task.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/run_task.rb new file mode 100644 index 000000000000..dae7f35f5236 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/run_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudtasks_v2beta3_generated_CloudTasks_RunTask_sync] +require "google/cloud/tasks/v2beta3" + +## +# Snippet for the run_task call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#run_task. +# +def run_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta3::RunTaskRequest.new + + # Call the run_task method. + result = client.run_task request + + # The returned object is of type Google::Cloud::Tasks::V2beta3::Task. + p result +end +# [END cloudtasks_v2beta3_generated_CloudTasks_RunTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/set_iam_policy.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/set_iam_policy.rb new file mode 100644 index 000000000000..f83897ede198 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/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 cloudtasks_v2beta3_generated_CloudTasks_SetIamPolicy_sync] +require "google/cloud/tasks/v2beta3" + +## +# Snippet for the set_iam_policy call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta3::CloudTasks::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 cloudtasks_v2beta3_generated_CloudTasks_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/test_iam_permissions.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/test_iam_permissions.rb new file mode 100644 index 000000000000..ee6f4a9fcbc0 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/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 cloudtasks_v2beta3_generated_CloudTasks_TestIamPermissions_sync] +require "google/cloud/tasks/v2beta3" + +## +# Snippet for the test_iam_permissions call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta3::CloudTasks::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 cloudtasks_v2beta3_generated_CloudTasks_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/update_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/update_queue.rb new file mode 100644 index 000000000000..cc52805757c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/update_queue.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 cloudtasks_v2beta3_generated_CloudTasks_UpdateQueue_sync] +require "google/cloud/tasks/v2beta3" + +## +# Snippet for the update_queue call in the CloudTasks service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#update_queue. +# +def update_queue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tasks::V2beta3::UpdateQueueRequest.new + + # Call the update_queue method. + result = client.update_queue request + + # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. + p result +end +# [END cloudtasks_v2beta3_generated_CloudTasks_UpdateQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/snippet_metadata_google.cloud.tasks.v2beta3.json b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/snippet_metadata_google.cloud.tasks.v2beta3.json new file mode 100644 index 000000000000..7d11f956527e --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/snippet_metadata_google.cloud.tasks.v2beta3.json @@ -0,0 +1,655 @@ +{ + "client_library": { + "name": "google-cloud-tasks-v2beta3", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.tasks.v2beta3", + "version": "v2beta3" + } + ] + }, + "snippets": [ + { + "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_ListQueues_sync", + "title": "Snippet for the list_queues call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_queues.", + "file": "cloud_tasks/list_queues.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_queues", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_queues", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta3::ListQueuesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2beta3::ListQueuesResponse", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" + }, + "method": { + "short_name": "ListQueues", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks.ListQueues", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_GetQueue_sync", + "title": "Snippet for the get_queue call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#get_queue.", + "file": "cloud_tasks/get_queue.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_queue", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#get_queue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta3::GetQueueRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2beta3::Queue", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" + }, + "method": { + "short_name": "GetQueue", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks.GetQueue", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_CreateQueue_sync", + "title": "Snippet for the create_queue call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_queue.", + "file": "cloud_tasks/create_queue.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_queue", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_queue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta3::CreateQueueRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2beta3::Queue", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" + }, + "method": { + "short_name": "CreateQueue", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks.CreateQueue", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_UpdateQueue_sync", + "title": "Snippet for the update_queue call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#update_queue.", + "file": "cloud_tasks/update_queue.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_queue", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#update_queue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2beta3::Queue", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" + }, + "method": { + "short_name": "UpdateQueue", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_DeleteQueue_sync", + "title": "Snippet for the delete_queue call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#delete_queue.", + "file": "cloud_tasks/delete_queue.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_queue", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#delete_queue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" + }, + "method": { + "short_name": "DeleteQueue", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks.DeleteQueue", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_PurgeQueue_sync", + "title": "Snippet for the purge_queue call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#purge_queue.", + "file": "cloud_tasks/purge_queue.rb", + "language": "RUBY", + "client_method": { + "short_name": "purge_queue", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#purge_queue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2beta3::Queue", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" + }, + "method": { + "short_name": "PurgeQueue", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_PauseQueue_sync", + "title": "Snippet for the pause_queue call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#pause_queue.", + "file": "cloud_tasks/pause_queue.rb", + "language": "RUBY", + "client_method": { + "short_name": "pause_queue", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#pause_queue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta3::PauseQueueRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2beta3::Queue", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" + }, + "method": { + "short_name": "PauseQueue", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks.PauseQueue", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_ResumeQueue_sync", + "title": "Snippet for the resume_queue call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#resume_queue.", + "file": "cloud_tasks/resume_queue.rb", + "language": "RUBY", + "client_method": { + "short_name": "resume_queue", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#resume_queue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2beta3::Queue", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" + }, + "method": { + "short_name": "ResumeQueue", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#get_iam_policy.", + "file": "cloud_tasks/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks.GetIamPolicy", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#set_iam_policy.", + "file": "cloud_tasks/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks.SetIamPolicy", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#test_iam_permissions.", + "file": "cloud_tasks/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks.TestIamPermissions", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_ListTasks_sync", + "title": "Snippet for the list_tasks call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_tasks.", + "file": "cloud_tasks/list_tasks.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_tasks", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_tasks", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta3::ListTasksRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2beta3::ListTasksResponse", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" + }, + "method": { + "short_name": "ListTasks", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks.ListTasks", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_GetTask_sync", + "title": "Snippet for the get_task call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#get_task.", + "file": "cloud_tasks/get_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_task", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#get_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta3::GetTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2beta3::Task", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" + }, + "method": { + "short_name": "GetTask", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks.GetTask", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_CreateTask_sync", + "title": "Snippet for the create_task call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task.", + "file": "cloud_tasks/create_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_task", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta3::CreateTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2beta3::Task", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" + }, + "method": { + "short_name": "CreateTask", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks.CreateTask", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_DeleteTask_sync", + "title": "Snippet for the delete_task call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#delete_task.", + "file": "cloud_tasks/delete_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_task", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#delete_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" + }, + "method": { + "short_name": "DeleteTask", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks.DeleteTask", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_RunTask_sync", + "title": "Snippet for the run_task call in the CloudTasks service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#run_task.", + "file": "cloud_tasks/run_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "run_task", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#run_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tasks::V2beta3::RunTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tasks::V2beta3::Task", + "client": { + "short_name": "CloudTasks::Client", + "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" + }, + "method": { + "short_name": "RunTask", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks.RunTask", + "service": { + "short_name": "CloudTasks", + "full_name": "google.cloud.tasks.v2beta3.CloudTasks" + } + } + }, + "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-tasks-v2beta3/test/google/cloud/tasks/v2beta3/cloud_tasks_paths_test.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/test/google/cloud/tasks/v2beta3/cloud_tasks_paths_test.rb new file mode 100644 index 000000000000..664ebc6b1b18 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/test/google/cloud/tasks/v2beta3/cloud_tasks_paths_test.rb @@ -0,0 +1,79 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/tasks/v2beta3/cloud_tasks" + +class ::Google::Cloud::Tasks::V2beta3::CloudTasks::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_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::Tasks::V2beta3::CloudTasks::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_queue_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.queue_path project: "value0", location: "value1", queue: "value2" + assert_equal "projects/value0/locations/value1/queues/value2", path + end + end + + def test_task_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.task_path project: "value0", location: "value1", queue: "value2", task: "value3" + assert_equal "projects/value0/locations/value1/queues/value2/tasks/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/test/google/cloud/tasks/v2beta3/cloud_tasks_rest_test.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/test/google/cloud/tasks/v2beta3/cloud_tasks_rest_test.rb new file mode 100644 index 000000000000..34a301c32a3d --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/test/google/cloud/tasks/v2beta3/cloud_tasks_rest_test.rb @@ -0,0 +1,981 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/tasks/v2beta3/cloudtasks_pb" +require "google/cloud/tasks/v2beta3/cloud_tasks/rest" + + +class ::Google::Cloud::Tasks::V2beta3::CloudTasks::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_queues + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2beta3::ListQueuesResponse.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" + read_mask = {} + + list_queues_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_list_queues_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_queues_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_queues({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_queues parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_queues ::Google::Cloud::Tasks::V2beta3::ListQueuesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_queues({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_queues(::Google::Cloud::Tasks::V2beta3::ListQueuesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_queues_client_stub.call_count + end + end + end + + def test_get_queue + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2beta3::Queue.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + read_mask = {} + + get_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_get_queue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_queue({ name: name, read_mask: read_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_queue name: name, read_mask: read_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_queue ::Google::Cloud::Tasks::V2beta3::GetQueueRequest.new(name: name, read_mask: read_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_queue({ name: name, read_mask: read_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_queue(::Google::Cloud::Tasks::V2beta3::GetQueueRequest.new(name: name, read_mask: read_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_queue_client_stub.call_count + end + end + end + + def test_create_queue + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2beta3::Queue.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + queue = {} + + create_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_create_queue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_queue({ parent: parent, queue: queue }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_queue parent: parent, queue: queue do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_queue ::Google::Cloud::Tasks::V2beta3::CreateQueueRequest.new(parent: parent, queue: queue) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_queue({ parent: parent, queue: queue }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_queue(::Google::Cloud::Tasks::V2beta3::CreateQueueRequest.new(parent: parent, queue: queue), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_queue_client_stub.call_count + end + end + end + + def test_update_queue + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2beta3::Queue.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + queue = {} + update_mask = {} + + update_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_update_queue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_queue({ queue: queue, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_queue queue: queue, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_queue ::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest.new(queue: queue, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_queue({ queue: queue, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_queue(::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest.new(queue: queue, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_queue_client_stub.call_count + end + end + end + + def test_delete_queue + # 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_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_delete_queue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_queue({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_queue name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_queue ::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_queue({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_queue(::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_queue_client_stub.call_count + end + end + end + + def test_purge_queue + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2beta3::Queue.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + purge_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_purge_queue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, purge_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.purge_queue({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.purge_queue name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.purge_queue ::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.purge_queue({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.purge_queue(::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, purge_queue_client_stub.call_count + end + end + end + + def test_pause_queue + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2beta3::Queue.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + pause_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_pause_queue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, pause_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.pause_queue({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.pause_queue name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.pause_queue ::Google::Cloud::Tasks::V2beta3::PauseQueueRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.pause_queue({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.pause_queue(::Google::Cloud::Tasks::V2beta3::PauseQueueRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, pause_queue_client_stub.call_count + end + end + end + + def test_resume_queue + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2beta3::Queue.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + resume_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_resume_queue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, resume_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.resume_queue({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.resume_queue name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.resume_queue ::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.resume_queue({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.resume_queue(::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, resume_queue_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::Tasks::V2beta3::CloudTasks::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::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta3::CloudTasks::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::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta3::CloudTasks::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::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_count + end + end + end + + def test_list_tasks + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2beta3::ListTasksResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + response_view = :VIEW_UNSPECIFIED + page_size = 42 + page_token = "hello world" + + list_tasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_list_tasks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_tasks_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_tasks({ parent: parent, response_view: response_view, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_tasks parent: parent, response_view: response_view, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_tasks ::Google::Cloud::Tasks::V2beta3::ListTasksRequest.new(parent: parent, response_view: response_view, 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_tasks({ parent: parent, response_view: response_view, 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_tasks(::Google::Cloud::Tasks::V2beta3::ListTasksRequest.new(parent: parent, response_view: response_view, 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_tasks_client_stub.call_count + end + end + end + + def test_get_task + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2beta3::Task.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + response_view = :VIEW_UNSPECIFIED + + get_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_get_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_task({ name: name, response_view: response_view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_task name: name, response_view: response_view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_task ::Google::Cloud::Tasks::V2beta3::GetTaskRequest.new(name: name, response_view: response_view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_task({ name: name, response_view: response_view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_task(::Google::Cloud::Tasks::V2beta3::GetTaskRequest.new(name: name, response_view: response_view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_task_client_stub.call_count + end + end + end + + def test_create_task + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2beta3::Task.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + task = {} + response_view = :VIEW_UNSPECIFIED + + create_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_create_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_task({ parent: parent, task: task, response_view: response_view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_task parent: parent, task: task, response_view: response_view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_task ::Google::Cloud::Tasks::V2beta3::CreateTaskRequest.new(parent: parent, task: task, response_view: response_view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_task({ parent: parent, task: task, response_view: response_view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_task(::Google::Cloud::Tasks::V2beta3::CreateTaskRequest.new(parent: parent, task: task, response_view: response_view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_task_client_stub.call_count + end + end + end + + def test_delete_task + # 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_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_delete_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_task({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_task name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_task ::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_task({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_task(::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_task_client_stub.call_count + end + end + end + + def test_run_task + # Create test objects. + client_result = ::Google::Cloud::Tasks::V2beta3::Task.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + response_view = :VIEW_UNSPECIFIED + + run_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_run_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, run_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.run_task({ name: name, response_view: response_view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.run_task name: name, response_view: response_view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.run_task ::Google::Cloud::Tasks::V2beta3::RunTaskRequest.new(name: name, response_view: response_view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.run_task({ name: name, response_view: response_view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.run_task(::Google::Cloud::Tasks::V2beta3::RunTaskRequest.new(name: name, response_view: response_view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, run_task_client_stub.call_count + end + end + end + + def test_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::Tasks::V2beta3::CloudTasks::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::Tasks::V2beta3::CloudTasks::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/test/google/cloud/tasks/v2beta3/cloud_tasks_test.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/test/google/cloud/tasks/v2beta3/cloud_tasks_test.rb new file mode 100644 index 000000000000..f2365c3dd2eb --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/test/google/cloud/tasks/v2beta3/cloud_tasks_test.rb @@ -0,0 +1,1078 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/tasks/v2beta3/cloudtasks_pb" +require "google/cloud/tasks/v2beta3/cloud_tasks" + +class ::Google::Cloud::Tasks::V2beta3::CloudTasks::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_queues + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2beta3::ListQueuesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + read_mask = {} + + list_queues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_queues, name + assert_kind_of ::Google::Cloud::Tasks::V2beta3::ListQueuesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_queues_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_queues({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_queues parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_queues ::Google::Cloud::Tasks::V2beta3::ListQueuesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_queues({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_queues(::Google::Cloud::Tasks::V2beta3::ListQueuesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_queues_client_stub.call_rpc_count + end + end + + def test_get_queue + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2beta3::Queue.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + read_mask = {} + + get_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_queue, name + assert_kind_of ::Google::Cloud::Tasks::V2beta3::GetQueueRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_queue({ name: name, read_mask: read_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_queue name: name, read_mask: read_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_queue ::Google::Cloud::Tasks::V2beta3::GetQueueRequest.new(name: name, read_mask: read_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_queue({ name: name, read_mask: read_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_queue(::Google::Cloud::Tasks::V2beta3::GetQueueRequest.new(name: name, read_mask: read_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_queue_client_stub.call_rpc_count + end + end + + def test_create_queue + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2beta3::Queue.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + queue = {} + + create_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_queue, name + assert_kind_of ::Google::Cloud::Tasks::V2beta3::CreateQueueRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Tasks::V2beta3::Queue), request["queue"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_queue({ parent: parent, queue: queue }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_queue parent: parent, queue: queue do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_queue ::Google::Cloud::Tasks::V2beta3::CreateQueueRequest.new(parent: parent, queue: queue) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_queue({ parent: parent, queue: queue }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_queue(::Google::Cloud::Tasks::V2beta3::CreateQueueRequest.new(parent: parent, queue: queue), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_queue_client_stub.call_rpc_count + end + end + + def test_update_queue + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2beta3::Queue.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + queue = {} + update_mask = {} + + update_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_queue, name + assert_kind_of ::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Tasks::V2beta3::Queue), request["queue"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_queue({ queue: queue, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_queue queue: queue, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_queue ::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest.new(queue: queue, 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_queue({ queue: queue, 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_queue(::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest.new(queue: queue, 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_queue_client_stub.call_rpc_count + end + end + + def test_delete_queue + # 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_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_queue, name + assert_kind_of ::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_queue({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_queue name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_queue ::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_queue({ 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_queue(::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest.new(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_queue_client_stub.call_rpc_count + end + end + + def test_purge_queue + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2beta3::Queue.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + purge_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :purge_queue, name + assert_kind_of ::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, purge_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.purge_queue({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.purge_queue name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.purge_queue ::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.purge_queue({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.purge_queue(::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, purge_queue_client_stub.call_rpc_count + end + end + + def test_pause_queue + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2beta3::Queue.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + pause_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :pause_queue, name + assert_kind_of ::Google::Cloud::Tasks::V2beta3::PauseQueueRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, pause_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.pause_queue({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.pause_queue name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.pause_queue ::Google::Cloud::Tasks::V2beta3::PauseQueueRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.pause_queue({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.pause_queue(::Google::Cloud::Tasks::V2beta3::PauseQueueRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, pause_queue_client_stub.call_rpc_count + end + end + + def test_resume_queue + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2beta3::Queue.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + resume_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :resume_queue, name + assert_kind_of ::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, resume_queue_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.resume_queue({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.resume_queue name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.resume_queue ::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.resume_queue({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.resume_queue(::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, resume_queue_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::Tasks::V2beta3::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_rpc_count + end + end + + def test_list_tasks + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2beta3::ListTasksResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + response_view = :VIEW_UNSPECIFIED + page_size = 42 + page_token = "hello world" + + list_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_tasks, name + assert_kind_of ::Google::Cloud::Tasks::V2beta3::ListTasksRequest, request + assert_equal "hello world", request["parent"] + assert_equal :VIEW_UNSPECIFIED, request["response_view"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_tasks_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_tasks({ parent: parent, response_view: response_view, 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_tasks parent: parent, response_view: response_view, 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_tasks ::Google::Cloud::Tasks::V2beta3::ListTasksRequest.new(parent: parent, response_view: response_view, 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_tasks({ parent: parent, response_view: response_view, 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_tasks(::Google::Cloud::Tasks::V2beta3::ListTasksRequest.new(parent: parent, response_view: response_view, 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_tasks_client_stub.call_rpc_count + end + end + + def test_get_task + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2beta3::Task.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + response_view = :VIEW_UNSPECIFIED + + get_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_task, name + assert_kind_of ::Google::Cloud::Tasks::V2beta3::GetTaskRequest, request + assert_equal "hello world", request["name"] + assert_equal :VIEW_UNSPECIFIED, request["response_view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_task({ name: name, response_view: response_view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_task name: name, response_view: response_view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_task ::Google::Cloud::Tasks::V2beta3::GetTaskRequest.new(name: name, response_view: response_view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_task({ name: name, response_view: response_view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_task(::Google::Cloud::Tasks::V2beta3::GetTaskRequest.new(name: name, response_view: response_view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_task_client_stub.call_rpc_count + end + end + + def test_create_task + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2beta3::Task.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + task = {} + response_view = :VIEW_UNSPECIFIED + + create_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_task, name + assert_kind_of ::Google::Cloud::Tasks::V2beta3::CreateTaskRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Tasks::V2beta3::Task), request["task"] + assert_equal :VIEW_UNSPECIFIED, request["response_view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_task({ parent: parent, task: task, response_view: response_view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_task parent: parent, task: task, response_view: response_view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_task ::Google::Cloud::Tasks::V2beta3::CreateTaskRequest.new(parent: parent, task: task, response_view: response_view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_task({ parent: parent, task: task, response_view: response_view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_task(::Google::Cloud::Tasks::V2beta3::CreateTaskRequest.new(parent: parent, task: task, response_view: response_view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_task_client_stub.call_rpc_count + end + end + + def test_delete_task + # 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_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_task, name + assert_kind_of ::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_task({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_task name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_task ::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_task({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_task(::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest.new(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_task_client_stub.call_rpc_count + end + end + + def test_run_task + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tasks::V2beta3::Task.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + response_view = :VIEW_UNSPECIFIED + + run_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :run_task, name + assert_kind_of ::Google::Cloud::Tasks::V2beta3::RunTaskRequest, request + assert_equal "hello world", request["name"] + assert_equal :VIEW_UNSPECIFIED, request["response_view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, run_task_client_stub do + # Create client + client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.run_task({ name: name, response_view: response_view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.run_task name: name, response_view: response_view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.run_task ::Google::Cloud::Tasks::V2beta3::RunTaskRequest.new(name: name, response_view: response_view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.run_task({ name: name, response_view: response_view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.run_task(::Google::Cloud::Tasks::V2beta3::RunTaskRequest.new(name: name, response_view: response_view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, run_task_client_stub.call_rpc_count + end + end + + def test_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::Tasks::V2beta3::CloudTasks::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::Tasks::V2beta3::CloudTasks::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::Tasks::V2beta3::CloudTasks::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/test/helper.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-tasks-v2beta3/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/.gitignore b/owl-bot-staging/google-cloud-telco_automation-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-telco_automation-v1/.repo-metadata.json new file mode 100644 index 000000000000..6fa8f0fd2fc5 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "telcoautomation.googleapis.com", + "api_shortname": "telcoautomation", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-telco_automation-v1/latest", + "distribution_name": "google-cloud-telco_automation-v1", + "is_cloud": true, + "language": "ruby", + "name": "telcoautomation", + "name_pretty": "Telco Automation V1 API", + "product_documentation": "https://cloud.google.com/telecom-network-automation", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "APIs to automate management of cloud infrastructure for network functions. Note that google-cloud-telco_automation-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-telco_automation instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/telecom-network-automation", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/.rubocop.yml b/owl-bot-staging/google-cloud-telco_automation-v1/.rubocop.yml new file mode 100644 index 000000000000..d6fc34a05a64 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-telco_automation-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-telco_automation-v1.rb" diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/.toys.rb b/owl-bot-staging/google-cloud-telco_automation-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/.yardopts b/owl-bot-staging/google-cloud-telco_automation-v1/.yardopts new file mode 100644 index 000000000000..74eef8dd924a --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Telco Automation 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-telco_automation-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-telco_automation-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..15c5b59bafcf --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-telco_automation-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-telco_automation-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/telco_automation/v1" + +client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/telco_automation/v1" + +::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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-telco_automation-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/telco_automation/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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-telco_automation-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-telco_automation-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/Gemfile b/owl-bot-staging/google-cloud-telco_automation-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/LICENSE.md b/owl-bot-staging/google-cloud-telco_automation-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/README.md b/owl-bot-staging/google-cloud-telco_automation-v1/README.md new file mode 100644 index 000000000000..f64067ee0d10 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the Telco Automation V1 API + +APIs to automate management of cloud infrastructure for network functions. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Telco Automation V1 API. Most users should consider using +the main client gem, +[google-cloud-telco_automation](https://rubygems.org/gems/google-cloud-telco_automation). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-telco_automation-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/telcoautomation.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/telco_automation/v1" + +client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new +request = ::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest.new # (request fields as keyword arguments...) +response = client.list_orchestration_clusters request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-telco_automation-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/telecom-network-automation) +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/telco_automation/v1" +require "logger" + +client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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-telco_automation`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-telco_automation-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-telco_automation`. +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-telco_automation-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-telco_automation-v1/Rakefile b/owl-bot-staging/google-cloud-telco_automation-v1/Rakefile new file mode 100644 index 000000000000..2264fb9ae7a4 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-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/telco_automation/v1/telco_automation/credentials" + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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-telco_automation-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-telco_automation-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-telco_automation-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-telco_automation-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-telco_automation-v1" + header "google-cloud-telco_automation-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-telco_automation-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-telco_automation-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-telco_automation-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-telco_automation-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-telco_automation-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-telco_automation-v1/gapic_metadata.json new file mode 100644 index 000000000000..f7243c38771e --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/gapic_metadata.json @@ -0,0 +1,198 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.telcoautomation.v1", + "libraryPackage": "::Google::Cloud::TelcoAutomation::V1", + "services": { + "TelcoAutomation": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client", + "rpcs": { + "ListOrchestrationClusters": { + "methods": [ + "list_orchestration_clusters" + ] + }, + "GetOrchestrationCluster": { + "methods": [ + "get_orchestration_cluster" + ] + }, + "CreateOrchestrationCluster": { + "methods": [ + "create_orchestration_cluster" + ] + }, + "DeleteOrchestrationCluster": { + "methods": [ + "delete_orchestration_cluster" + ] + }, + "ListEdgeSlms": { + "methods": [ + "list_edge_slms" + ] + }, + "GetEdgeSlm": { + "methods": [ + "get_edge_slm" + ] + }, + "CreateEdgeSlm": { + "methods": [ + "create_edge_slm" + ] + }, + "DeleteEdgeSlm": { + "methods": [ + "delete_edge_slm" + ] + }, + "CreateBlueprint": { + "methods": [ + "create_blueprint" + ] + }, + "UpdateBlueprint": { + "methods": [ + "update_blueprint" + ] + }, + "GetBlueprint": { + "methods": [ + "get_blueprint" + ] + }, + "DeleteBlueprint": { + "methods": [ + "delete_blueprint" + ] + }, + "ListBlueprints": { + "methods": [ + "list_blueprints" + ] + }, + "ApproveBlueprint": { + "methods": [ + "approve_blueprint" + ] + }, + "ProposeBlueprint": { + "methods": [ + "propose_blueprint" + ] + }, + "RejectBlueprint": { + "methods": [ + "reject_blueprint" + ] + }, + "ListBlueprintRevisions": { + "methods": [ + "list_blueprint_revisions" + ] + }, + "SearchBlueprintRevisions": { + "methods": [ + "search_blueprint_revisions" + ] + }, + "SearchDeploymentRevisions": { + "methods": [ + "search_deployment_revisions" + ] + }, + "DiscardBlueprintChanges": { + "methods": [ + "discard_blueprint_changes" + ] + }, + "ListPublicBlueprints": { + "methods": [ + "list_public_blueprints" + ] + }, + "GetPublicBlueprint": { + "methods": [ + "get_public_blueprint" + ] + }, + "CreateDeployment": { + "methods": [ + "create_deployment" + ] + }, + "UpdateDeployment": { + "methods": [ + "update_deployment" + ] + }, + "GetDeployment": { + "methods": [ + "get_deployment" + ] + }, + "RemoveDeployment": { + "methods": [ + "remove_deployment" + ] + }, + "ListDeployments": { + "methods": [ + "list_deployments" + ] + }, + "ListDeploymentRevisions": { + "methods": [ + "list_deployment_revisions" + ] + }, + "DiscardDeploymentChanges": { + "methods": [ + "discard_deployment_changes" + ] + }, + "ApplyDeployment": { + "methods": [ + "apply_deployment" + ] + }, + "ComputeDeploymentStatus": { + "methods": [ + "compute_deployment_status" + ] + }, + "RollbackDeployment": { + "methods": [ + "rollback_deployment" + ] + }, + "GetHydratedDeployment": { + "methods": [ + "get_hydrated_deployment" + ] + }, + "ListHydratedDeployments": { + "methods": [ + "list_hydrated_deployments" + ] + }, + "UpdateHydratedDeployment": { + "methods": [ + "update_hydrated_deployment" + ] + }, + "ApplyHydratedDeployment": { + "methods": [ + "apply_hydrated_deployment" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/google-cloud-telco_automation-v1.gemspec b/owl-bot-staging/google-cloud-telco_automation-v1/google-cloud-telco_automation-v1.gemspec new file mode 100644 index 000000000000..8477418caaa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/google-cloud-telco_automation-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/telco_automation/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-telco_automation-v1" + gem.version = Google::Cloud::TelcoAutomation::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "APIs to automate management of cloud infrastructure for network functions. Note that google-cloud-telco_automation-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-telco_automation instead. See the readme for more details." + gem.summary = "APIs to automate management of cloud infrastructure for network functions." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google-cloud-telco_automation-v1.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google-cloud-telco_automation-v1.rb new file mode 100644 index 000000000000..259caf3da82e --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google-cloud-telco_automation-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/telco_automation/v1" diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1.rb new file mode 100644 index 000000000000..8ead8612208c --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/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/telco_automation/v1/telco_automation" +require "google/cloud/telco_automation/v1/version" + +module Google + module Cloud + module TelcoAutomation + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/telco_automation/v1" + # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/telco_automation/v1" + # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/telco_automation/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/bindings_override.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/bindings_override.rb new file mode 100644 index 000000000000..df522790e2b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/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 TelcoAutomation + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/telco_automation/v1/rest" + # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "TelcoAutomation"] + 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}", + matches: [ + ["name", %r{^projects/[^/]+/locations/?$}, 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-telco_automation-v1/lib/google/cloud/telco_automation/v1/rest.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/rest.rb new file mode 100644 index 000000000000..51f472690194 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/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/telco_automation/v1/telco_automation/rest" +require "google/cloud/telco_automation/v1/bindings_override" +require "google/cloud/telco_automation/v1/version" + +module Google + module Cloud + module TelcoAutomation + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/telco_automation/v1/rest" + # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation.rb new file mode 100644 index 000000000000..2fe22c8a42e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/telco_automation/v1/version" + +require "google/cloud/telco_automation/v1/telco_automation/credentials" +require "google/cloud/telco_automation/v1/telco_automation/paths" +require "google/cloud/telco_automation/v1/telco_automation/operations" +require "google/cloud/telco_automation/v1/telco_automation/client" +require "google/cloud/telco_automation/v1/telco_automation/rest" + +module Google + module Cloud + module TelcoAutomation + module V1 + ## + # TelcoAutomation Service manages the control plane cluster a.k.a. + # Orchestration Cluster (GKE cluster with config controller) of TNA. It also + # exposes blueprint APIs which manages the lifecycle of blueprints that control + # the infrastructure setup (e.g GDCE clusters) and deployment of network + # functions. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/telco_automation/v1/telco_automation" + # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/telco_automation/v1/telco_automation/rest" + # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + module TelcoAutomation + end + end + end + end +end + +helper_path = ::File.join __dir__, "telco_automation", "helpers.rb" +require "google/cloud/telco_automation/v1/telco_automation/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/client.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/client.rb new file mode 100644 index 000000000000..47ef08d71fa1 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/client.rb @@ -0,0 +1,4039 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/telcoautomation/v1/telcoautomation_pb" +require "google/cloud/location" + +module Google + module Cloud + module TelcoAutomation + module V1 + module TelcoAutomation + ## + # Client for the TelcoAutomation service. + # + # TelcoAutomation Service manages the control plane cluster a.k.a. + # Orchestration Cluster (GKE cluster with config controller) of TNA. It also + # exposes blueprint APIs which manages the lifecycle of blueprints that control + # the infrastructure setup (e.g GDCE clusters) and deployment of network + # functions. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "telcoautomation.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :telco_automation_stub + + ## + # Configure the TelcoAutomation Client class. + # + # See {::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TelcoAutomation clients + # ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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", "TelcoAutomation", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TelcoAutomation 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::TelcoAutomation::V1::TelcoAutomation::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 + @telco_automation_stub.universe_domain + end + + ## + # Create a new TelcoAutomation client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TelcoAutomation 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/telcoautomation/v1/telcoautomation_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 + + @telco_automation_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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 + ) + + @telco_automation_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 = @telco_automation_stub.endpoint + config.universe_domain = @telco_automation_stub.universe_domain + config.logger = @telco_automation_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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 + @telco_automation_stub.logger + end + + # Service calls + + ## + # Lists OrchestrationClusters in a given project and location. + # + # @overload list_orchestration_clusters(request, options = nil) + # Pass arguments to `list_orchestration_clusters` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_orchestration_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_orchestration_clusters` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListOrchestrationClustersRequest + # @param page_size [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. + # @param filter [::String] + # Filtering results. + # @param order_by [::String] + # Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest.new + # + # # Call the list_orchestration_clusters method. + # result = client.list_orchestration_clusters request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster. + # p item + # end + # + def list_orchestration_clusters request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_orchestration_clusters.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_orchestration_clusters.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_orchestration_clusters.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :list_orchestration_clusters, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :list_orchestration_clusters, 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 single OrchestrationCluster. + # + # @overload get_orchestration_cluster(request, options = nil) + # Pass arguments to `get_orchestration_cluster` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_orchestration_cluster(name: nil) + # Pass arguments to `get_orchestration_cluster` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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::TelcoAutomation::V1::OrchestrationCluster] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest.new + # + # # Call the get_orchestration_cluster method. + # result = client.get_orchestration_cluster request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::OrchestrationCluster. + # p result + # + def get_orchestration_cluster request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_orchestration_cluster.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_orchestration_cluster.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_orchestration_cluster.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :get_orchestration_cluster, request, 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 OrchestrationCluster in a given project and location. + # + # @overload create_orchestration_cluster(request, options = nil) + # Pass arguments to `create_orchestration_cluster` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_orchestration_cluster(parent: nil, orchestration_cluster_id: nil, orchestration_cluster: nil, request_id: nil) + # Pass arguments to `create_orchestration_cluster` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Value for parent. + # @param orchestration_cluster_id [::String] + # Required. Id of the requesting object + # If auto-generating Id server-side, remove this field and + # orchestration_cluster_id from the method_signature of Create RPC + # @param orchestration_cluster [::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster, ::Hash] + # Required. The resource being 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/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest.new + # + # # Call the create_orchestration_cluster method. + # result = client.create_orchestration_cluster request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_orchestration_cluster request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest + + # Converts hash and nil to 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_orchestration_cluster.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_orchestration_cluster.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_orchestration_cluster.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :create_orchestration_cluster, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 single OrchestrationCluster. + # + # @overload delete_orchestration_cluster(request, options = nil) + # Pass arguments to `delete_orchestration_cluster` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_orchestration_cluster(name: nil, request_id: nil) + # Pass arguments to `delete_orchestration_cluster` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 + # @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/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest.new + # + # # Call the delete_orchestration_cluster method. + # result = client.delete_orchestration_cluster request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_orchestration_cluster request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest + + # Converts hash and nil to 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_orchestration_cluster.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_orchestration_cluster.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_orchestration_cluster.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :delete_orchestration_cluster, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 EdgeSlms in a given project and location. + # + # @overload list_edge_slms(request, options = nil) + # Pass arguments to `list_edge_slms` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_edge_slms(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_edge_slms` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListEdgeSlmsRequest + # @param page_size [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. + # @param filter [::String] + # Filtering results + # @param order_by [::String] + # Hint for how to order the results + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::EdgeSlm>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::EdgeSlm>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest.new + # + # # Call the list_edge_slms method. + # result = client.list_edge_slms request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::EdgeSlm. + # p item + # end + # + def list_edge_slms request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_edge_slms.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_edge_slms.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_edge_slms.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :list_edge_slms, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :list_edge_slms, 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 single EdgeSlm. + # + # @overload get_edge_slm(request, options = nil) + # Pass arguments to `get_edge_slm` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_edge_slm(name: nil) + # Pass arguments to `get_edge_slm` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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::TelcoAutomation::V1::EdgeSlm] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::EdgeSlm] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest.new + # + # # Call the get_edge_slm method. + # result = client.get_edge_slm request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::EdgeSlm. + # p result + # + def get_edge_slm request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_edge_slm.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_edge_slm.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_edge_slm.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :get_edge_slm, request, 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 EdgeSlm in a given project and location. + # + # @overload create_edge_slm(request, options = nil) + # Pass arguments to `create_edge_slm` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_edge_slm(parent: nil, edge_slm_id: nil, edge_slm: nil, request_id: nil) + # Pass arguments to `create_edge_slm` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Value for parent. + # @param edge_slm_id [::String] + # Required. Id of the requesting object + # If auto-generating Id server-side, remove this field and + # edge_slm_id from the method_signature of Create RPC + # @param edge_slm [::Google::Cloud::TelcoAutomation::V1::EdgeSlm, ::Hash] + # Required. The resource being 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/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest.new + # + # # Call the create_edge_slm method. + # result = client.create_edge_slm request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_edge_slm request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest + + # Converts hash and nil to 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_edge_slm.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_edge_slm.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_edge_slm.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :create_edge_slm, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 single EdgeSlm. + # + # @overload delete_edge_slm(request, options = nil) + # Pass arguments to `delete_edge_slm` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_edge_slm(name: nil, request_id: nil) + # Pass arguments to `delete_edge_slm` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 + # @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/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest.new + # + # # Call the delete_edge_slm method. + # result = client.delete_edge_slm request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_edge_slm request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest + + # Converts hash and nil to 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_edge_slm.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_edge_slm.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_edge_slm.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :delete_edge_slm, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 blueprint. + # + # @overload create_blueprint(request, options = nil) + # Pass arguments to `create_blueprint` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_blueprint(parent: nil, blueprint_id: nil, blueprint: nil) + # Pass arguments to `create_blueprint` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of parent resource. + # Format should be - + # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". + # @param blueprint_id [::String] + # Optional. The name of the blueprint. + # @param blueprint [::Google::Cloud::TelcoAutomation::V1::Blueprint, ::Hash] + # Required. The `Blueprint` to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest.new + # + # # Call the create_blueprint method. + # result = client.create_blueprint request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. + # p result + # + def create_blueprint request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest + + # Converts hash and nil to 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_blueprint.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_blueprint.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_blueprint.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :create_blueprint, request, 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 blueprint. + # + # @overload update_blueprint(request, options = nil) + # Pass arguments to `update_blueprint` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_blueprint(blueprint: nil, update_mask: nil) + # Pass arguments to `update_blueprint` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param blueprint [::Google::Cloud::TelcoAutomation::V1::Blueprint, ::Hash] + # Required. The `blueprint` to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Update mask is used to specify the fields to be overwritten in + # the `blueprint` resource by the update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest.new + # + # # Call the update_blueprint method. + # result = client.update_blueprint request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. + # p result + # + def update_blueprint request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest + + # Converts hash and nil to 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_blueprint.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.blueprint&.name + header_params["blueprint.name"] = request.blueprint.name + end + + request_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_blueprint.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_blueprint.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :update_blueprint, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the requested blueprint. + # + # @overload get_blueprint(request, options = nil) + # Pass arguments to `get_blueprint` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_blueprint(name: nil, view: nil) + # Pass arguments to `get_blueprint` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 blueprint. + # Case 1: If the name provided in the request is + # \\{blueprint_id}@\\{revision_id}, then the revision with revision_id will be + # returned. Case 2: If the name provided in the request is \\{blueprint}, then + # the current state of the blueprint is returned. + # @param view [::Google::Cloud::TelcoAutomation::V1::BlueprintView] + # Optional. Defines the type of view of the blueprint. + # When field is not present BLUEPRINT_VIEW_BASIC is considered as default. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest.new + # + # # Call the get_blueprint method. + # result = client.get_blueprint request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. + # p result + # + def get_blueprint request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_blueprint.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_blueprint.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_blueprint.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :get_blueprint, request, 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 blueprint and all its revisions. + # + # @overload delete_blueprint(request, options = nil) + # Pass arguments to `delete_blueprint` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_blueprint(name: nil) + # Pass arguments to `delete_blueprint` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 blueprint to delete. + # Blueprint name should be in the format \\{blueprint_id}, if + # \\{blueprint_id}@\\{revision_id} is passed then the API throws invalid + # argument. + # + # @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/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest.new + # + # # Call the delete_blueprint method. + # result = client.delete_blueprint request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_blueprint request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest + + # Converts hash and nil to 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_blueprint.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_blueprint.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_blueprint.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :delete_blueprint, request, 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 blueprints. + # + # @overload list_blueprints(request, options = nil) + # Pass arguments to `list_blueprints` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_blueprints(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_blueprints` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of parent orchestration cluster resource. + # Format should be - + # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". + # @param filter [::String] + # Optional. Filtering only supports equality on blueprint state. + # It should be in the form: "state = DRAFT". `OR` operator can be used to + # get response for multiple states. e.g. "state = DRAFT OR state = PROPOSED". + # @param page_size [::Integer] + # Optional. The maximum number of blueprints to return per page. + # @param page_token [::String] + # Optional. The page token, received from a previous ListBlueprints call. + # It can be provided to retrieve the subsequent page. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest.new + # + # # Call the list_blueprints method. + # result = client.list_blueprints request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Blueprint. + # p item + # end + # + def list_blueprints request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_blueprints.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_blueprints.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_blueprints.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :list_blueprints, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :list_blueprints, 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 + + ## + # Approves a blueprint and commits a new revision. + # + # @overload approve_blueprint(request, options = nil) + # Pass arguments to `approve_blueprint` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload approve_blueprint(name: nil) + # Pass arguments to `approve_blueprint` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 blueprint to approve. The blueprint must be in + # Proposed state. A new revision is committed on approval. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest.new + # + # # Call the approve_blueprint method. + # result = client.approve_blueprint request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. + # p result + # + def approve_blueprint request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.approve_blueprint.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.approve_blueprint.timeout, + metadata: metadata, + retry_policy: @config.rpcs.approve_blueprint.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :approve_blueprint, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Proposes a blueprint for approval of changes. + # + # @overload propose_blueprint(request, options = nil) + # Pass arguments to `propose_blueprint` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload propose_blueprint(name: nil) + # Pass arguments to `propose_blueprint` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 blueprint being proposed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest.new + # + # # Call the propose_blueprint method. + # result = client.propose_blueprint request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. + # p result + # + def propose_blueprint request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.propose_blueprint.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.propose_blueprint.timeout, + metadata: metadata, + retry_policy: @config.rpcs.propose_blueprint.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :propose_blueprint, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Rejects a blueprint revision proposal and flips it back to Draft state. + # + # @overload reject_blueprint(request, options = nil) + # Pass arguments to `reject_blueprint` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload reject_blueprint(name: nil) + # Pass arguments to `reject_blueprint` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 blueprint being rejected. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest.new + # + # # Call the reject_blueprint method. + # result = client.reject_blueprint request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. + # p result + # + def reject_blueprint request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.reject_blueprint.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.reject_blueprint.timeout, + metadata: metadata, + retry_policy: @config.rpcs.reject_blueprint.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :reject_blueprint, request, 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 blueprint revisions of a given blueprint. + # + # @overload list_blueprint_revisions(request, options = nil) + # Pass arguments to `list_blueprint_revisions` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_blueprint_revisions(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_blueprint_revisions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 blueprint to list revisions for. + # @param page_size [::Integer] + # The maximum number of revisions to return per page. + # @param page_token [::String] + # The page token, received from a previous ListBlueprintRevisions call + # It can be provided to retrieve the subsequent page. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest.new + # + # # Call the list_blueprint_revisions method. + # result = client.list_blueprint_revisions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Blueprint. + # p item + # end + # + def list_blueprint_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_blueprint_revisions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_blueprint_revisions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_blueprint_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :list_blueprint_revisions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :list_blueprint_revisions, 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 + + ## + # Searches across blueprint revisions. + # + # @overload search_blueprint_revisions(request, options = nil) + # Pass arguments to `search_blueprint_revisions` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload search_blueprint_revisions(parent: nil, query: nil, page_size: nil, page_token: nil) + # Pass arguments to `search_blueprint_revisions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of parent orchestration cluster resource. + # Format should be - + # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". + # @param query [::String] + # Required. Supported queries: + # 1. "" : Lists all revisions across all blueprints. + # 2. "latest=true" : Lists latest revisions across all blueprints. + # 3. "name=\\{name}" : Lists all revisions of blueprint with name + # \\{name}. + # 4. "name=\\{name} latest=true": Lists latest revision of blueprint with name + # \\{name} + # @param page_size [::Integer] + # Optional. The maximum number of blueprints revisions to return per page. + # max page size = 100, default page size = 20. + # @param page_token [::String] + # Optional. The page token, received from a previous search call. + # It can be provided to retrieve the subsequent page. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest.new + # + # # Call the search_blueprint_revisions method. + # result = client.search_blueprint_revisions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Blueprint. + # p item + # end + # + def search_blueprint_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.search_blueprint_revisions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.search_blueprint_revisions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_blueprint_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :search_blueprint_revisions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :search_blueprint_revisions, 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 + + ## + # Searches across deployment revisions. + # + # @overload search_deployment_revisions(request, options = nil) + # Pass arguments to `search_deployment_revisions` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload search_deployment_revisions(parent: nil, query: nil, page_size: nil, page_token: nil) + # Pass arguments to `search_deployment_revisions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of parent orchestration cluster resource. + # Format should be - + # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". + # @param query [::String] + # Required. Supported queries: + # 1. "" : Lists all revisions across all deployments. + # 2. "latest=true" : Lists latest revisions across all + # deployments. + # 3. "name=\\{name}" : Lists all revisions of deployment with name + # \\{name}. + # 4. "name=\\{name} latest=true": Lists latest revision of deployment with name + # \\{name} + # @param page_size [::Integer] + # Optional. The maximum number of deployment revisions to return per page. + # max page size = 100, default page size = 20. + # @param page_token [::String] + # Optional. The page token, received from a previous search call. + # It can be provided to retrieve the subsequent page. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest.new + # + # # Call the search_deployment_revisions method. + # result = client.search_deployment_revisions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Deployment. + # p item + # end + # + def search_deployment_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.search_deployment_revisions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.search_deployment_revisions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_deployment_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :search_deployment_revisions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :search_deployment_revisions, 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 + + ## + # Discards the changes in a blueprint and reverts the blueprint to the last + # approved blueprint revision. No changes take place if a blueprint does not + # have revisions. + # + # @overload discard_blueprint_changes(request, options = nil) + # Pass arguments to `discard_blueprint_changes` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload discard_blueprint_changes(name: nil) + # Pass arguments to `discard_blueprint_changes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 blueprint of which changes are being discarded. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest.new + # + # # Call the discard_blueprint_changes method. + # result = client.discard_blueprint_changes request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse. + # p result + # + def discard_blueprint_changes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.discard_blueprint_changes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.discard_blueprint_changes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.discard_blueprint_changes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :discard_blueprint_changes, request, 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 blueprints in TNA's public catalog. Default page size = 20, + # Max Page Size = 100. + # + # @overload list_public_blueprints(request, options = nil) + # Pass arguments to `list_public_blueprints` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_public_blueprints(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_public_blueprints` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value of public blueprint. + # Format should be - + # "projects/\\{project_id}/locations/\\{location_name}". + # @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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::PublicBlueprint>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::PublicBlueprint>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest.new + # + # # Call the list_public_blueprints method. + # result = client.list_public_blueprints request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::PublicBlueprint. + # p item + # end + # + def list_public_blueprints request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_public_blueprints.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_public_blueprints.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_public_blueprints.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :list_public_blueprints, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :list_public_blueprints, 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 the requested public blueprint. + # + # @overload get_public_blueprint(request, options = nil) + # Pass arguments to `get_public_blueprint` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_public_blueprint(name: nil) + # Pass arguments to `get_public_blueprint` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 public blueprint. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::PublicBlueprint] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::PublicBlueprint] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest.new + # + # # Call the get_public_blueprint method. + # result = client.get_public_blueprint request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::PublicBlueprint. + # p result + # + def get_public_blueprint request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_public_blueprint.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_public_blueprint.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_public_blueprint.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :get_public_blueprint, request, 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 deployment. + # + # @overload create_deployment(request, options = nil) + # Pass arguments to `create_deployment` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_deployment(parent: nil, deployment_id: nil, deployment: nil) + # Pass arguments to `create_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of parent resource. + # Format should be - + # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". + # @param deployment_id [::String] + # Optional. The name of the deployment. + # @param deployment [::Google::Cloud::TelcoAutomation::V1::Deployment, ::Hash] + # Required. The `Deployment` to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Deployment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest.new + # + # # Call the create_deployment method. + # result = client.create_deployment request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. + # p result + # + def create_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest + + # Converts hash and nil to 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_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :create_deployment, request, 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 deployment. + # + # @overload update_deployment(request, options = nil) + # Pass arguments to `update_deployment` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_deployment(deployment: nil, update_mask: nil) + # Pass arguments to `update_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param deployment [::Google::Cloud::TelcoAutomation::V1::Deployment, ::Hash] + # Required. The `deployment` to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Update mask is used to specify the fields to be overwritten in + # the `deployment` resource by the update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Deployment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest.new + # + # # Call the update_deployment method. + # result = client.update_deployment request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. + # p result + # + def update_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest + + # Converts hash and nil to 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_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.deployment&.name + header_params["deployment.name"] = request.deployment.name + end + + request_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_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :update_deployment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the requested deployment. + # + # @overload get_deployment(request, options = nil) + # Pass arguments to `get_deployment` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_deployment(name: nil, view: nil) + # Pass arguments to `get_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 deployment. + # Case 1: If the name provided in the request is + # \\{deployment_id}@\\{revision_id}, then the revision with revision_id will be + # returned. + # Case 2: If the name provided in the request is \\{deployment}, then + # the current state of the deployment is returned. + # @param view [::Google::Cloud::TelcoAutomation::V1::DeploymentView] + # Optional. Defines the type of view of the deployment. + # When field is not present VIEW_BASIC is considered as default. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Deployment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest.new + # + # # Call the get_deployment method. + # result = client.get_deployment request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. + # p result + # + def get_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :get_deployment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Removes the deployment by marking it as DELETING. Post which deployment and + # it's revisions gets deleted. + # + # @overload remove_deployment(request, options = nil) + # Pass arguments to `remove_deployment` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload remove_deployment(name: nil) + # Pass arguments to `remove_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 deployment to initiate delete. + # + # @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/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest.new + # + # # Call the remove_deployment method. + # result = client.remove_deployment request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def remove_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.remove_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.remove_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.remove_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :remove_deployment, request, 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 deployments. + # + # @overload list_deployments(request, options = nil) + # Pass arguments to `list_deployments` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_deployments(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_deployments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of parent orchestration cluster resource. + # Format should be - + # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". + # @param filter [::String] + # Optional. Filtering only supports equality on deployment state. + # It should be in the form: "state = DRAFT". `OR` operator can be used to + # get response for multiple states. e.g. "state = DRAFT OR state = APPLIED". + # @param page_size [::Integer] + # Optional. The maximum number of deployments to return per page. + # @param page_token [::String] + # Optional. The page token, received from a previous ListDeployments call. + # It can be provided to retrieve the subsequent page. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest.new + # + # # Call the list_deployments method. + # result = client.list_deployments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Deployment. + # p item + # end + # + def list_deployments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_deployments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_deployments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_deployments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :list_deployments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :list_deployments, 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 deployment revisions of a given deployment. + # + # @overload list_deployment_revisions(request, options = nil) + # Pass arguments to `list_deployment_revisions` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_deployment_revisions(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_deployment_revisions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 deployment to list revisions for. + # @param page_size [::Integer] + # Optional. The maximum number of revisions to return per page. + # @param page_token [::String] + # Optional. The page token, received from a previous ListDeploymentRevisions + # call Provide this to retrieve the subsequent page. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest.new + # + # # Call the list_deployment_revisions method. + # result = client.list_deployment_revisions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Deployment. + # p item + # end + # + def list_deployment_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_deployment_revisions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_deployment_revisions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_deployment_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :list_deployment_revisions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :list_deployment_revisions, 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 + + ## + # Discards the changes in a deployment and reverts the deployment to the last + # approved deployment revision. No changes take place if a deployment does + # not have revisions. + # + # @overload discard_deployment_changes(request, options = nil) + # Pass arguments to `discard_deployment_changes` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload discard_deployment_changes(name: nil) + # Pass arguments to `discard_deployment_changes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 deployment of which changes are being discarded. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest.new + # + # # Call the discard_deployment_changes method. + # result = client.discard_deployment_changes request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse. + # p result + # + def discard_deployment_changes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.discard_deployment_changes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.discard_deployment_changes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.discard_deployment_changes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :discard_deployment_changes, request, 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 the deployment's YAML files to the parent orchestration cluster. + # + # @overload apply_deployment(request, options = nil) + # Pass arguments to `apply_deployment` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload apply_deployment(name: nil) + # Pass arguments to `apply_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 deployment to apply to orchestration cluster. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Deployment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest.new + # + # # Call the apply_deployment method. + # result = client.apply_deployment request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. + # p result + # + def apply_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.apply_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.apply_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.apply_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :apply_deployment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the requested deployment status. + # + # @overload compute_deployment_status(request, options = nil) + # Pass arguments to `compute_deployment_status` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload compute_deployment_status(name: nil) + # Pass arguments to `compute_deployment_status` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 deployment without revisionID. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest.new + # + # # Call the compute_deployment_status method. + # result = client.compute_deployment_status request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse. + # p result + # + def compute_deployment_status request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.compute_deployment_status.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.compute_deployment_status.timeout, + metadata: metadata, + retry_policy: @config.rpcs.compute_deployment_status.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :compute_deployment_status, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Rollback the active deployment to the given past approved deployment + # revision. + # + # @overload rollback_deployment(request, options = nil) + # Pass arguments to `rollback_deployment` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_deployment(name: nil, revision_id: nil) + # Pass arguments to `rollback_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 deployment. + # @param revision_id [::String] + # Required. The revision id of deployment to roll back to. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Deployment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest.new + # + # # Call the rollback_deployment method. + # result = client.rollback_deployment request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. + # p result + # + def rollback_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest + + # Converts hash and nil to 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_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.rollback_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :rollback_deployment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the requested hydrated deployment. + # + # @overload get_hydrated_deployment(request, options = nil) + # Pass arguments to `get_hydrated_deployment` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_hydrated_deployment(name: nil) + # Pass arguments to `get_hydrated_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 hydrated deployment. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest.new + # + # # Call the get_hydrated_deployment method. + # result = client.get_hydrated_deployment request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::HydratedDeployment. + # p result + # + def get_hydrated_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_hydrated_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_hydrated_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_hydrated_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :get_hydrated_deployment, request, 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 hydrated deployments present under a deployment. + # + # @overload list_hydrated_deployments(request, options = nil) + # Pass arguments to `list_hydrated_deployments` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_hydrated_deployments(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_hydrated_deployments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The deployment managing the hydrated deployments. + # @param page_size [::Integer] + # Optional. The maximum number of hydrated deployments to return. The service + # may return fewer than this value. If unspecified, at most 50 hydrated + # deployments will be returned. The maximum value is 1000. Values above 1000 + # will be set to 1000. + # @param page_token [::String] + # Optional. The page token, received from a previous ListHydratedDeployments + # call. Provide this to retrieve the subsequent page. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::HydratedDeployment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::HydratedDeployment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest.new + # + # # Call the list_hydrated_deployments method. + # result = client.list_hydrated_deployments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment. + # p item + # end + # + def list_hydrated_deployments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_hydrated_deployments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_hydrated_deployments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_hydrated_deployments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :list_hydrated_deployments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :list_hydrated_deployments, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a hydrated deployment. + # + # @overload update_hydrated_deployment(request, options = nil) + # Pass arguments to `update_hydrated_deployment` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_hydrated_deployment(hydrated_deployment: nil, update_mask: nil) + # Pass arguments to `update_hydrated_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param hydrated_deployment [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment, ::Hash] + # Required. The hydrated deployment to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. Update mask supports a special + # value `*` which fully replaces (equivalent to PUT) the resource provided. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest.new + # + # # Call the update_hydrated_deployment method. + # result = client.update_hydrated_deployment request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::HydratedDeployment. + # p result + # + def update_hydrated_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest + + # Converts hash and nil to 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_hydrated_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.hydrated_deployment&.name + header_params["hydrated_deployment.name"] = request.hydrated_deployment.name + end + + request_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_hydrated_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_hydrated_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :update_hydrated_deployment, request, 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 hydrated deployment to a workload cluster. + # + # @overload apply_hydrated_deployment(request, options = nil) + # Pass arguments to `apply_hydrated_deployment` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload apply_hydrated_deployment(name: nil) + # Pass arguments to `apply_hydrated_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 hydrated deployment to apply. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest.new + # + # # Call the apply_hydrated_deployment method. + # result = client.apply_hydrated_deployment request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::HydratedDeployment. + # p result + # + def apply_hydrated_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.apply_hydrated_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.apply_hydrated_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.apply_hydrated_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.call_rpc :apply_hydrated_deployment, request, 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 TelcoAutomation API. + # + # This class represents the configuration for TelcoAutomation, + # 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::TelcoAutomation::V1::TelcoAutomation::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_orchestration_clusters to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_orchestration_clusters.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_orchestration_clusters.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::TelcoAutomation::V1::TelcoAutomation::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 = "telcoautomation.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 TelcoAutomation 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_orchestration_clusters` + # @return [::Gapic::Config::Method] + # + attr_reader :list_orchestration_clusters + ## + # RPC-specific configuration for `get_orchestration_cluster` + # @return [::Gapic::Config::Method] + # + attr_reader :get_orchestration_cluster + ## + # RPC-specific configuration for `create_orchestration_cluster` + # @return [::Gapic::Config::Method] + # + attr_reader :create_orchestration_cluster + ## + # RPC-specific configuration for `delete_orchestration_cluster` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_orchestration_cluster + ## + # RPC-specific configuration for `list_edge_slms` + # @return [::Gapic::Config::Method] + # + attr_reader :list_edge_slms + ## + # RPC-specific configuration for `get_edge_slm` + # @return [::Gapic::Config::Method] + # + attr_reader :get_edge_slm + ## + # RPC-specific configuration for `create_edge_slm` + # @return [::Gapic::Config::Method] + # + attr_reader :create_edge_slm + ## + # RPC-specific configuration for `delete_edge_slm` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_edge_slm + ## + # RPC-specific configuration for `create_blueprint` + # @return [::Gapic::Config::Method] + # + attr_reader :create_blueprint + ## + # RPC-specific configuration for `update_blueprint` + # @return [::Gapic::Config::Method] + # + attr_reader :update_blueprint + ## + # RPC-specific configuration for `get_blueprint` + # @return [::Gapic::Config::Method] + # + attr_reader :get_blueprint + ## + # RPC-specific configuration for `delete_blueprint` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_blueprint + ## + # RPC-specific configuration for `list_blueprints` + # @return [::Gapic::Config::Method] + # + attr_reader :list_blueprints + ## + # RPC-specific configuration for `approve_blueprint` + # @return [::Gapic::Config::Method] + # + attr_reader :approve_blueprint + ## + # RPC-specific configuration for `propose_blueprint` + # @return [::Gapic::Config::Method] + # + attr_reader :propose_blueprint + ## + # RPC-specific configuration for `reject_blueprint` + # @return [::Gapic::Config::Method] + # + attr_reader :reject_blueprint + ## + # RPC-specific configuration for `list_blueprint_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_blueprint_revisions + ## + # RPC-specific configuration for `search_blueprint_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :search_blueprint_revisions + ## + # RPC-specific configuration for `search_deployment_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :search_deployment_revisions + ## + # RPC-specific configuration for `discard_blueprint_changes` + # @return [::Gapic::Config::Method] + # + attr_reader :discard_blueprint_changes + ## + # RPC-specific configuration for `list_public_blueprints` + # @return [::Gapic::Config::Method] + # + attr_reader :list_public_blueprints + ## + # RPC-specific configuration for `get_public_blueprint` + # @return [::Gapic::Config::Method] + # + attr_reader :get_public_blueprint + ## + # RPC-specific configuration for `create_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_deployment + ## + # RPC-specific configuration for `update_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_deployment + ## + # RPC-specific configuration for `get_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_deployment + ## + # RPC-specific configuration for `remove_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :remove_deployment + ## + # RPC-specific configuration for `list_deployments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_deployments + ## + # RPC-specific configuration for `list_deployment_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_deployment_revisions + ## + # RPC-specific configuration for `discard_deployment_changes` + # @return [::Gapic::Config::Method] + # + attr_reader :discard_deployment_changes + ## + # RPC-specific configuration for `apply_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :apply_deployment + ## + # RPC-specific configuration for `compute_deployment_status` + # @return [::Gapic::Config::Method] + # + attr_reader :compute_deployment_status + ## + # RPC-specific configuration for `rollback_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :rollback_deployment + ## + # RPC-specific configuration for `get_hydrated_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_hydrated_deployment + ## + # RPC-specific configuration for `list_hydrated_deployments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_hydrated_deployments + ## + # RPC-specific configuration for `update_hydrated_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_hydrated_deployment + ## + # RPC-specific configuration for `apply_hydrated_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :apply_hydrated_deployment + + # @private + def initialize parent_rpcs = nil + list_orchestration_clusters_config = parent_rpcs.list_orchestration_clusters if parent_rpcs.respond_to? :list_orchestration_clusters + @list_orchestration_clusters = ::Gapic::Config::Method.new list_orchestration_clusters_config + get_orchestration_cluster_config = parent_rpcs.get_orchestration_cluster if parent_rpcs.respond_to? :get_orchestration_cluster + @get_orchestration_cluster = ::Gapic::Config::Method.new get_orchestration_cluster_config + create_orchestration_cluster_config = parent_rpcs.create_orchestration_cluster if parent_rpcs.respond_to? :create_orchestration_cluster + @create_orchestration_cluster = ::Gapic::Config::Method.new create_orchestration_cluster_config + delete_orchestration_cluster_config = parent_rpcs.delete_orchestration_cluster if parent_rpcs.respond_to? :delete_orchestration_cluster + @delete_orchestration_cluster = ::Gapic::Config::Method.new delete_orchestration_cluster_config + list_edge_slms_config = parent_rpcs.list_edge_slms if parent_rpcs.respond_to? :list_edge_slms + @list_edge_slms = ::Gapic::Config::Method.new list_edge_slms_config + get_edge_slm_config = parent_rpcs.get_edge_slm if parent_rpcs.respond_to? :get_edge_slm + @get_edge_slm = ::Gapic::Config::Method.new get_edge_slm_config + create_edge_slm_config = parent_rpcs.create_edge_slm if parent_rpcs.respond_to? :create_edge_slm + @create_edge_slm = ::Gapic::Config::Method.new create_edge_slm_config + delete_edge_slm_config = parent_rpcs.delete_edge_slm if parent_rpcs.respond_to? :delete_edge_slm + @delete_edge_slm = ::Gapic::Config::Method.new delete_edge_slm_config + create_blueprint_config = parent_rpcs.create_blueprint if parent_rpcs.respond_to? :create_blueprint + @create_blueprint = ::Gapic::Config::Method.new create_blueprint_config + update_blueprint_config = parent_rpcs.update_blueprint if parent_rpcs.respond_to? :update_blueprint + @update_blueprint = ::Gapic::Config::Method.new update_blueprint_config + get_blueprint_config = parent_rpcs.get_blueprint if parent_rpcs.respond_to? :get_blueprint + @get_blueprint = ::Gapic::Config::Method.new get_blueprint_config + delete_blueprint_config = parent_rpcs.delete_blueprint if parent_rpcs.respond_to? :delete_blueprint + @delete_blueprint = ::Gapic::Config::Method.new delete_blueprint_config + list_blueprints_config = parent_rpcs.list_blueprints if parent_rpcs.respond_to? :list_blueprints + @list_blueprints = ::Gapic::Config::Method.new list_blueprints_config + approve_blueprint_config = parent_rpcs.approve_blueprint if parent_rpcs.respond_to? :approve_blueprint + @approve_blueprint = ::Gapic::Config::Method.new approve_blueprint_config + propose_blueprint_config = parent_rpcs.propose_blueprint if parent_rpcs.respond_to? :propose_blueprint + @propose_blueprint = ::Gapic::Config::Method.new propose_blueprint_config + reject_blueprint_config = parent_rpcs.reject_blueprint if parent_rpcs.respond_to? :reject_blueprint + @reject_blueprint = ::Gapic::Config::Method.new reject_blueprint_config + list_blueprint_revisions_config = parent_rpcs.list_blueprint_revisions if parent_rpcs.respond_to? :list_blueprint_revisions + @list_blueprint_revisions = ::Gapic::Config::Method.new list_blueprint_revisions_config + search_blueprint_revisions_config = parent_rpcs.search_blueprint_revisions if parent_rpcs.respond_to? :search_blueprint_revisions + @search_blueprint_revisions = ::Gapic::Config::Method.new search_blueprint_revisions_config + search_deployment_revisions_config = parent_rpcs.search_deployment_revisions if parent_rpcs.respond_to? :search_deployment_revisions + @search_deployment_revisions = ::Gapic::Config::Method.new search_deployment_revisions_config + discard_blueprint_changes_config = parent_rpcs.discard_blueprint_changes if parent_rpcs.respond_to? :discard_blueprint_changes + @discard_blueprint_changes = ::Gapic::Config::Method.new discard_blueprint_changes_config + list_public_blueprints_config = parent_rpcs.list_public_blueprints if parent_rpcs.respond_to? :list_public_blueprints + @list_public_blueprints = ::Gapic::Config::Method.new list_public_blueprints_config + get_public_blueprint_config = parent_rpcs.get_public_blueprint if parent_rpcs.respond_to? :get_public_blueprint + @get_public_blueprint = ::Gapic::Config::Method.new get_public_blueprint_config + create_deployment_config = parent_rpcs.create_deployment if parent_rpcs.respond_to? :create_deployment + @create_deployment = ::Gapic::Config::Method.new create_deployment_config + update_deployment_config = parent_rpcs.update_deployment if parent_rpcs.respond_to? :update_deployment + @update_deployment = ::Gapic::Config::Method.new update_deployment_config + get_deployment_config = parent_rpcs.get_deployment if parent_rpcs.respond_to? :get_deployment + @get_deployment = ::Gapic::Config::Method.new get_deployment_config + remove_deployment_config = parent_rpcs.remove_deployment if parent_rpcs.respond_to? :remove_deployment + @remove_deployment = ::Gapic::Config::Method.new remove_deployment_config + list_deployments_config = parent_rpcs.list_deployments if parent_rpcs.respond_to? :list_deployments + @list_deployments = ::Gapic::Config::Method.new list_deployments_config + list_deployment_revisions_config = parent_rpcs.list_deployment_revisions if parent_rpcs.respond_to? :list_deployment_revisions + @list_deployment_revisions = ::Gapic::Config::Method.new list_deployment_revisions_config + discard_deployment_changes_config = parent_rpcs.discard_deployment_changes if parent_rpcs.respond_to? :discard_deployment_changes + @discard_deployment_changes = ::Gapic::Config::Method.new discard_deployment_changes_config + apply_deployment_config = parent_rpcs.apply_deployment if parent_rpcs.respond_to? :apply_deployment + @apply_deployment = ::Gapic::Config::Method.new apply_deployment_config + compute_deployment_status_config = parent_rpcs.compute_deployment_status if parent_rpcs.respond_to? :compute_deployment_status + @compute_deployment_status = ::Gapic::Config::Method.new compute_deployment_status_config + rollback_deployment_config = parent_rpcs.rollback_deployment if parent_rpcs.respond_to? :rollback_deployment + @rollback_deployment = ::Gapic::Config::Method.new rollback_deployment_config + get_hydrated_deployment_config = parent_rpcs.get_hydrated_deployment if parent_rpcs.respond_to? :get_hydrated_deployment + @get_hydrated_deployment = ::Gapic::Config::Method.new get_hydrated_deployment_config + list_hydrated_deployments_config = parent_rpcs.list_hydrated_deployments if parent_rpcs.respond_to? :list_hydrated_deployments + @list_hydrated_deployments = ::Gapic::Config::Method.new list_hydrated_deployments_config + update_hydrated_deployment_config = parent_rpcs.update_hydrated_deployment if parent_rpcs.respond_to? :update_hydrated_deployment + @update_hydrated_deployment = ::Gapic::Config::Method.new update_hydrated_deployment_config + apply_hydrated_deployment_config = parent_rpcs.apply_hydrated_deployment if parent_rpcs.respond_to? :apply_hydrated_deployment + @apply_hydrated_deployment = ::Gapic::Config::Method.new apply_hydrated_deployment_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/credentials.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/credentials.rb new file mode 100644 index 000000000000..95f1611e1573 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/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 TelcoAutomation + module V1 + module TelcoAutomation + # Credentials for the TelcoAutomation 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-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/operations.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/operations.rb new file mode 100644 index 000000000000..050b914fa8e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/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 TelcoAutomation + module V1 + module TelcoAutomation + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "telcoautomation.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the TelcoAutomation 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 TelcoAutomation 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::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::TelcoAutomation::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::TelcoAutomation::V1::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 = "telcoautomation.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-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/paths.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/paths.rb new file mode 100644 index 000000000000..7a62a825c5f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/paths.rb @@ -0,0 +1,172 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module TelcoAutomation + module V1 + module TelcoAutomation + # Path helper methods for the TelcoAutomation API. + module Paths + ## + # Create a fully-qualified Blueprint resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/blueprints/{blueprint}` + # + # @param project [String] + # @param location [String] + # @param orchestration_cluster [String] + # @param blueprint [String] + # + # @return [::String] + def blueprint_path project:, location:, orchestration_cluster:, blueprint: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "orchestration_cluster cannot contain /" if orchestration_cluster.to_s.include? "/" + + "projects/#{project}/locations/#{location}/orchestrationClusters/#{orchestration_cluster}/blueprints/#{blueprint}" + end + + ## + # Create a fully-qualified Deployment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/deployments/{deployment}` + # + # @param project [String] + # @param location [String] + # @param orchestration_cluster [String] + # @param deployment [String] + # + # @return [::String] + def deployment_path project:, location:, orchestration_cluster:, deployment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "orchestration_cluster cannot contain /" if orchestration_cluster.to_s.include? "/" + + "projects/#{project}/locations/#{location}/orchestrationClusters/#{orchestration_cluster}/deployments/#{deployment}" + end + + ## + # Create a fully-qualified EdgeSlm resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/edgeSlms/{edge_slm}` + # + # @param project [String] + # @param location [String] + # @param edge_slm [String] + # + # @return [::String] + def edge_slm_path project:, location:, edge_slm: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/edgeSlms/#{edge_slm}" + end + + ## + # Create a fully-qualified HydratedDeployment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/deployments/{deployment}/hydratedDeployments/{hydrated_deployment}` + # + # @param project [String] + # @param location [String] + # @param orchestration_cluster [String] + # @param deployment [String] + # @param hydrated_deployment [String] + # + # @return [::String] + def hydrated_deployment_path project:, location:, orchestration_cluster:, deployment:, hydrated_deployment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "orchestration_cluster cannot contain /" if orchestration_cluster.to_s.include? "/" + raise ::ArgumentError, "deployment cannot contain /" if deployment.to_s.include? "/" + + "projects/#{project}/locations/#{location}/orchestrationClusters/#{orchestration_cluster}/deployments/#{deployment}/hydratedDeployments/#{hydrated_deployment}" + 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 OrchestrationCluster resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}` + # + # @param project [String] + # @param location [String] + # @param orchestration_cluster [String] + # + # @return [::String] + def orchestration_cluster_path project:, location:, orchestration_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}/orchestrationClusters/#{orchestration_cluster}" + end + + ## + # Create a fully-qualified PublicBlueprint resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/publicBlueprints/{public_lueprint}` + # + # @param project [String] + # @param location [String] + # @param public_lueprint [String] + # + # @return [::String] + def public_blueprint_path project:, location:, public_lueprint: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/publicBlueprints/#{public_lueprint}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest.rb new file mode 100644 index 000000000000..ecc60ae205c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/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/telco_automation/v1/version" +require "google/cloud/telco_automation/v1/bindings_override" + +require "google/cloud/telco_automation/v1/telco_automation/credentials" +require "google/cloud/telco_automation/v1/telco_automation/paths" +require "google/cloud/telco_automation/v1/telco_automation/rest/operations" +require "google/cloud/telco_automation/v1/telco_automation/rest/client" + +module Google + module Cloud + module TelcoAutomation + module V1 + ## + # TelcoAutomation Service manages the control plane cluster a.k.a. + # Orchestration Cluster (GKE cluster with config controller) of TNA. It also + # exposes blueprint APIs which manages the lifecycle of blueprints that control + # the infrastructure setup (e.g GDCE clusters) and deployment of network + # functions. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/telco_automation/v1/telco_automation/rest" + # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + module TelcoAutomation + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/telco_automation/v1/telco_automation/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest/client.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest/client.rb new file mode 100644 index 000000000000..24a2151fd203 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest/client.rb @@ -0,0 +1,3752 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/telcoautomation/v1/telcoautomation_pb" +require "google/cloud/telco_automation/v1/telco_automation/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module TelcoAutomation + module V1 + module TelcoAutomation + module Rest + ## + # REST client for the TelcoAutomation service. + # + # TelcoAutomation Service manages the control plane cluster a.k.a. + # Orchestration Cluster (GKE cluster with config controller) of TNA. It also + # exposes blueprint APIs which manages the lifecycle of blueprints that control + # the infrastructure setup (e.g GDCE clusters) and deployment of network + # functions. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "telcoautomation.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :telco_automation_stub + + ## + # Configure the TelcoAutomation Client class. + # + # See {::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TelcoAutomation clients + # ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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", "TelcoAutomation", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TelcoAutomation 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::TelcoAutomation::V1::TelcoAutomation::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 + @telco_automation_stub.universe_domain + end + + ## + # Create a new TelcoAutomation REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TelcoAutomation 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::TelcoAutomation::V1::TelcoAutomation::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 + + @telco_automation_stub = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @telco_automation_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 = @telco_automation_stub.endpoint + config.universe_domain = @telco_automation_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @telco_automation_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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 + @telco_automation_stub.logger + end + + # Service calls + + ## + # Lists OrchestrationClusters in a given project and location. + # + # @overload list_orchestration_clusters(request, options = nil) + # Pass arguments to `list_orchestration_clusters` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_orchestration_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_orchestration_clusters` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListOrchestrationClustersRequest + # @param page_size [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. + # @param filter [::String] + # Filtering results. + # @param order_by [::String] + # 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::TelcoAutomation::V1::OrchestrationCluster>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest.new + # + # # Call the list_orchestration_clusters method. + # result = client.list_orchestration_clusters request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster. + # p item + # end + # + def list_orchestration_clusters request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_orchestration_clusters.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_orchestration_clusters.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_orchestration_clusters.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.list_orchestration_clusters request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :list_orchestration_clusters, "orchestration_clusters", 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 single OrchestrationCluster. + # + # @overload get_orchestration_cluster(request, options = nil) + # Pass arguments to `get_orchestration_cluster` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_orchestration_cluster(name: nil) + # Pass arguments to `get_orchestration_cluster` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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::TelcoAutomation::V1::OrchestrationCluster] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest.new + # + # # Call the get_orchestration_cluster method. + # result = client.get_orchestration_cluster request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::OrchestrationCluster. + # p result + # + def get_orchestration_cluster request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_orchestration_cluster.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_orchestration_cluster.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_orchestration_cluster.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.get_orchestration_cluster request, 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 OrchestrationCluster in a given project and location. + # + # @overload create_orchestration_cluster(request, options = nil) + # Pass arguments to `create_orchestration_cluster` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_orchestration_cluster(parent: nil, orchestration_cluster_id: nil, orchestration_cluster: nil, request_id: nil) + # Pass arguments to `create_orchestration_cluster` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Value for parent. + # @param orchestration_cluster_id [::String] + # Required. Id of the requesting object + # If auto-generating Id server-side, remove this field and + # orchestration_cluster_id from the method_signature of Create RPC + # @param orchestration_cluster [::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster, ::Hash] + # Required. The resource being 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/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest.new + # + # # Call the create_orchestration_cluster method. + # result = client.create_orchestration_cluster request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_orchestration_cluster request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest + + # Converts hash and nil to an 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_orchestration_cluster.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_orchestration_cluster.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_orchestration_cluster.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.create_orchestration_cluster request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 single OrchestrationCluster. + # + # @overload delete_orchestration_cluster(request, options = nil) + # Pass arguments to `delete_orchestration_cluster` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_orchestration_cluster(name: nil, request_id: nil) + # Pass arguments to `delete_orchestration_cluster` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 + # @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/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest.new + # + # # Call the delete_orchestration_cluster method. + # result = client.delete_orchestration_cluster request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_orchestration_cluster request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest + + # Converts hash and nil to an 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_orchestration_cluster.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_orchestration_cluster.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_orchestration_cluster.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.delete_orchestration_cluster request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 EdgeSlms in a given project and location. + # + # @overload list_edge_slms(request, options = nil) + # Pass arguments to `list_edge_slms` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_edge_slms(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_edge_slms` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListEdgeSlmsRequest + # @param page_size [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. + # @param filter [::String] + # Filtering results + # @param order_by [::String] + # 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::TelcoAutomation::V1::EdgeSlm>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::EdgeSlm>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest.new + # + # # Call the list_edge_slms method. + # result = client.list_edge_slms request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::EdgeSlm. + # p item + # end + # + def list_edge_slms request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_edge_slms.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_edge_slms.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_edge_slms.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.list_edge_slms request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :list_edge_slms, "edge_slms", 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 single EdgeSlm. + # + # @overload get_edge_slm(request, options = nil) + # Pass arguments to `get_edge_slm` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_edge_slm(name: nil) + # Pass arguments to `get_edge_slm` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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::TelcoAutomation::V1::EdgeSlm] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::EdgeSlm] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest.new + # + # # Call the get_edge_slm method. + # result = client.get_edge_slm request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::EdgeSlm. + # p result + # + def get_edge_slm request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_edge_slm.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_edge_slm.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_edge_slm.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.get_edge_slm request, 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 EdgeSlm in a given project and location. + # + # @overload create_edge_slm(request, options = nil) + # Pass arguments to `create_edge_slm` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_edge_slm(parent: nil, edge_slm_id: nil, edge_slm: nil, request_id: nil) + # Pass arguments to `create_edge_slm` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Value for parent. + # @param edge_slm_id [::String] + # Required. Id of the requesting object + # If auto-generating Id server-side, remove this field and + # edge_slm_id from the method_signature of Create RPC + # @param edge_slm [::Google::Cloud::TelcoAutomation::V1::EdgeSlm, ::Hash] + # Required. The resource being 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/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest.new + # + # # Call the create_edge_slm method. + # result = client.create_edge_slm request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_edge_slm request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest + + # Converts hash and nil to an 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_edge_slm.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_edge_slm.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_edge_slm.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.create_edge_slm request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 single EdgeSlm. + # + # @overload delete_edge_slm(request, options = nil) + # Pass arguments to `delete_edge_slm` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_edge_slm(name: nil, request_id: nil) + # Pass arguments to `delete_edge_slm` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 + # @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/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest.new + # + # # Call the delete_edge_slm method. + # result = client.delete_edge_slm request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_edge_slm request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest + + # Converts hash and nil to an 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_edge_slm.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_edge_slm.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_edge_slm.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.delete_edge_slm request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 blueprint. + # + # @overload create_blueprint(request, options = nil) + # Pass arguments to `create_blueprint` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_blueprint(parent: nil, blueprint_id: nil, blueprint: nil) + # Pass arguments to `create_blueprint` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of parent resource. + # Format should be - + # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". + # @param blueprint_id [::String] + # Optional. The name of the blueprint. + # @param blueprint [::Google::Cloud::TelcoAutomation::V1::Blueprint, ::Hash] + # Required. The `Blueprint` to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest.new + # + # # Call the create_blueprint method. + # result = client.create_blueprint request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. + # p result + # + def create_blueprint request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest + + # Converts hash and nil to an 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_blueprint.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_blueprint.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_blueprint.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.create_blueprint request, 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 blueprint. + # + # @overload update_blueprint(request, options = nil) + # Pass arguments to `update_blueprint` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_blueprint(blueprint: nil, update_mask: nil) + # Pass arguments to `update_blueprint` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param blueprint [::Google::Cloud::TelcoAutomation::V1::Blueprint, ::Hash] + # Required. The `blueprint` to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Update mask is used to specify the fields to be overwritten in + # the `blueprint` resource by the update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest.new + # + # # Call the update_blueprint method. + # result = client.update_blueprint request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. + # p result + # + def update_blueprint request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest + + # Converts hash and nil to an 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_blueprint.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_blueprint.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_blueprint.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.update_blueprint request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the requested blueprint. + # + # @overload get_blueprint(request, options = nil) + # Pass arguments to `get_blueprint` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_blueprint(name: nil, view: nil) + # Pass arguments to `get_blueprint` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 blueprint. + # Case 1: If the name provided in the request is + # \\{blueprint_id}@\\{revision_id}, then the revision with revision_id will be + # returned. Case 2: If the name provided in the request is \\{blueprint}, then + # the current state of the blueprint is returned. + # @param view [::Google::Cloud::TelcoAutomation::V1::BlueprintView] + # Optional. Defines the type of view of the blueprint. + # When field is not present BLUEPRINT_VIEW_BASIC is considered as default. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest.new + # + # # Call the get_blueprint method. + # result = client.get_blueprint request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. + # p result + # + def get_blueprint request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_blueprint.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_blueprint.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_blueprint.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.get_blueprint request, 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 blueprint and all its revisions. + # + # @overload delete_blueprint(request, options = nil) + # Pass arguments to `delete_blueprint` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_blueprint(name: nil) + # Pass arguments to `delete_blueprint` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 blueprint to delete. + # Blueprint name should be in the format \\{blueprint_id}, if + # \\{blueprint_id}@\\{revision_id} is passed then the API throws invalid + # argument. + # @yield [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/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest.new + # + # # Call the delete_blueprint method. + # result = client.delete_blueprint request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_blueprint request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest + + # Converts hash and nil to an 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_blueprint.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_blueprint.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_blueprint.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.delete_blueprint request, 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 blueprints. + # + # @overload list_blueprints(request, options = nil) + # Pass arguments to `list_blueprints` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_blueprints(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_blueprints` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of parent orchestration cluster resource. + # Format should be - + # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". + # @param filter [::String] + # Optional. Filtering only supports equality on blueprint state. + # It should be in the form: "state = DRAFT". `OR` operator can be used to + # get response for multiple states. e.g. "state = DRAFT OR state = PROPOSED". + # @param page_size [::Integer] + # Optional. The maximum number of blueprints to return per page. + # @param page_token [::String] + # Optional. The page token, received from a previous ListBlueprints call. + # It can be provided to retrieve the subsequent page. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest.new + # + # # Call the list_blueprints method. + # result = client.list_blueprints request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Blueprint. + # p item + # end + # + def list_blueprints request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_blueprints.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_blueprints.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_blueprints.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.list_blueprints request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :list_blueprints, "blueprints", 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 + + ## + # Approves a blueprint and commits a new revision. + # + # @overload approve_blueprint(request, options = nil) + # Pass arguments to `approve_blueprint` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload approve_blueprint(name: nil) + # Pass arguments to `approve_blueprint` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 blueprint to approve. The blueprint must be in + # Proposed state. A new revision is committed on approval. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest.new + # + # # Call the approve_blueprint method. + # result = client.approve_blueprint request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. + # p result + # + def approve_blueprint request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.approve_blueprint.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.approve_blueprint.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.approve_blueprint.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.approve_blueprint request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Proposes a blueprint for approval of changes. + # + # @overload propose_blueprint(request, options = nil) + # Pass arguments to `propose_blueprint` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload propose_blueprint(name: nil) + # Pass arguments to `propose_blueprint` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 blueprint being proposed. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest.new + # + # # Call the propose_blueprint method. + # result = client.propose_blueprint request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. + # p result + # + def propose_blueprint request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.propose_blueprint.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.propose_blueprint.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.propose_blueprint.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.propose_blueprint request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Rejects a blueprint revision proposal and flips it back to Draft state. + # + # @overload reject_blueprint(request, options = nil) + # Pass arguments to `reject_blueprint` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload reject_blueprint(name: nil) + # Pass arguments to `reject_blueprint` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 blueprint being rejected. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest.new + # + # # Call the reject_blueprint method. + # result = client.reject_blueprint request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. + # p result + # + def reject_blueprint request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.reject_blueprint.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.reject_blueprint.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.reject_blueprint.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.reject_blueprint request, 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 blueprint revisions of a given blueprint. + # + # @overload list_blueprint_revisions(request, options = nil) + # Pass arguments to `list_blueprint_revisions` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_blueprint_revisions(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_blueprint_revisions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 blueprint to list revisions for. + # @param page_size [::Integer] + # The maximum number of revisions to return per page. + # @param page_token [::String] + # The page token, received from a previous ListBlueprintRevisions call + # It can be provided to retrieve the subsequent page. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest.new + # + # # Call the list_blueprint_revisions method. + # result = client.list_blueprint_revisions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Blueprint. + # p item + # end + # + def list_blueprint_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_blueprint_revisions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_blueprint_revisions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_blueprint_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.list_blueprint_revisions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :list_blueprint_revisions, "blueprints", 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 + + ## + # Searches across blueprint revisions. + # + # @overload search_blueprint_revisions(request, options = nil) + # Pass arguments to `search_blueprint_revisions` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload search_blueprint_revisions(parent: nil, query: nil, page_size: nil, page_token: nil) + # Pass arguments to `search_blueprint_revisions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of parent orchestration cluster resource. + # Format should be - + # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". + # @param query [::String] + # Required. Supported queries: + # 1. "" : Lists all revisions across all blueprints. + # 2. "latest=true" : Lists latest revisions across all blueprints. + # 3. "name=\\{name}" : Lists all revisions of blueprint with name + # \\{name}. + # 4. "name=\\{name} latest=true": Lists latest revision of blueprint with name + # \\{name} + # @param page_size [::Integer] + # Optional. The maximum number of blueprints revisions to return per page. + # max page size = 100, default page size = 20. + # @param page_token [::String] + # Optional. The page token, received from a previous search call. + # It can be provided to retrieve the subsequent page. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest.new + # + # # Call the search_blueprint_revisions method. + # result = client.search_blueprint_revisions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Blueprint. + # p item + # end + # + def search_blueprint_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.search_blueprint_revisions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.search_blueprint_revisions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_blueprint_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.search_blueprint_revisions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :search_blueprint_revisions, "blueprints", 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 + + ## + # Searches across deployment revisions. + # + # @overload search_deployment_revisions(request, options = nil) + # Pass arguments to `search_deployment_revisions` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload search_deployment_revisions(parent: nil, query: nil, page_size: nil, page_token: nil) + # Pass arguments to `search_deployment_revisions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of parent orchestration cluster resource. + # Format should be - + # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". + # @param query [::String] + # Required. Supported queries: + # 1. "" : Lists all revisions across all deployments. + # 2. "latest=true" : Lists latest revisions across all + # deployments. + # 3. "name=\\{name}" : Lists all revisions of deployment with name + # \\{name}. + # 4. "name=\\{name} latest=true": Lists latest revision of deployment with name + # \\{name} + # @param page_size [::Integer] + # Optional. The maximum number of deployment revisions to return per page. + # max page size = 100, default page size = 20. + # @param page_token [::String] + # Optional. The page token, received from a previous search call. + # It can be provided to retrieve the subsequent page. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest.new + # + # # Call the search_deployment_revisions method. + # result = client.search_deployment_revisions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Deployment. + # p item + # end + # + def search_deployment_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.search_deployment_revisions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.search_deployment_revisions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_deployment_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.search_deployment_revisions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :search_deployment_revisions, "deployments", 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 + + ## + # Discards the changes in a blueprint and reverts the blueprint to the last + # approved blueprint revision. No changes take place if a blueprint does not + # have revisions. + # + # @overload discard_blueprint_changes(request, options = nil) + # Pass arguments to `discard_blueprint_changes` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload discard_blueprint_changes(name: nil) + # Pass arguments to `discard_blueprint_changes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 blueprint of which changes are being discarded. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest.new + # + # # Call the discard_blueprint_changes method. + # result = client.discard_blueprint_changes request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse. + # p result + # + def discard_blueprint_changes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.discard_blueprint_changes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.discard_blueprint_changes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.discard_blueprint_changes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.discard_blueprint_changes request, 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 blueprints in TNA's public catalog. Default page size = 20, + # Max Page Size = 100. + # + # @overload list_public_blueprints(request, options = nil) + # Pass arguments to `list_public_blueprints` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_public_blueprints(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_public_blueprints` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value of public blueprint. + # Format should be - + # "projects/\\{project_id}/locations/\\{location_name}". + # @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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::PublicBlueprint>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::PublicBlueprint>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest.new + # + # # Call the list_public_blueprints method. + # result = client.list_public_blueprints request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::PublicBlueprint. + # p item + # end + # + def list_public_blueprints request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_public_blueprints.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_public_blueprints.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_public_blueprints.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.list_public_blueprints request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :list_public_blueprints, "public_blueprints", 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 the requested public blueprint. + # + # @overload get_public_blueprint(request, options = nil) + # Pass arguments to `get_public_blueprint` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_public_blueprint(name: nil) + # Pass arguments to `get_public_blueprint` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 public blueprint. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::PublicBlueprint] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::PublicBlueprint] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest.new + # + # # Call the get_public_blueprint method. + # result = client.get_public_blueprint request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::PublicBlueprint. + # p result + # + def get_public_blueprint request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_public_blueprint.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_public_blueprint.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_public_blueprint.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.get_public_blueprint request, 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 deployment. + # + # @overload create_deployment(request, options = nil) + # Pass arguments to `create_deployment` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_deployment(parent: nil, deployment_id: nil, deployment: nil) + # Pass arguments to `create_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of parent resource. + # Format should be - + # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". + # @param deployment_id [::String] + # Optional. The name of the deployment. + # @param deployment [::Google::Cloud::TelcoAutomation::V1::Deployment, ::Hash] + # Required. The `Deployment` to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Deployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest.new + # + # # Call the create_deployment method. + # result = client.create_deployment request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. + # p result + # + def create_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest + + # Converts hash and nil to an 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_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.create_deployment request, 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 deployment. + # + # @overload update_deployment(request, options = nil) + # Pass arguments to `update_deployment` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_deployment(deployment: nil, update_mask: nil) + # Pass arguments to `update_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param deployment [::Google::Cloud::TelcoAutomation::V1::Deployment, ::Hash] + # Required. The `deployment` to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Update mask is used to specify the fields to be overwritten in + # the `deployment` resource by the update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Deployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest.new + # + # # Call the update_deployment method. + # result = client.update_deployment request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. + # p result + # + def update_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest + + # Converts hash and nil to an 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_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.update_deployment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the requested deployment. + # + # @overload get_deployment(request, options = nil) + # Pass arguments to `get_deployment` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_deployment(name: nil, view: nil) + # Pass arguments to `get_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 deployment. + # Case 1: If the name provided in the request is + # \\{deployment_id}@\\{revision_id}, then the revision with revision_id will be + # returned. + # Case 2: If the name provided in the request is \\{deployment}, then + # the current state of the deployment is returned. + # @param view [::Google::Cloud::TelcoAutomation::V1::DeploymentView] + # Optional. Defines the type of view of the deployment. + # When field is not present VIEW_BASIC is considered as default. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Deployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest.new + # + # # Call the get_deployment method. + # result = client.get_deployment request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. + # p result + # + def get_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.get_deployment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Removes the deployment by marking it as DELETING. Post which deployment and + # it's revisions gets deleted. + # + # @overload remove_deployment(request, options = nil) + # Pass arguments to `remove_deployment` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload remove_deployment(name: nil) + # Pass arguments to `remove_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 deployment to initiate delete. + # @yield [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/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest.new + # + # # Call the remove_deployment method. + # result = client.remove_deployment request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def remove_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.remove_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.remove_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.remove_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.remove_deployment request, 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 deployments. + # + # @overload list_deployments(request, options = nil) + # Pass arguments to `list_deployments` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_deployments(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_deployments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of parent orchestration cluster resource. + # Format should be - + # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". + # @param filter [::String] + # Optional. Filtering only supports equality on deployment state. + # It should be in the form: "state = DRAFT". `OR` operator can be used to + # get response for multiple states. e.g. "state = DRAFT OR state = APPLIED". + # @param page_size [::Integer] + # Optional. The maximum number of deployments to return per page. + # @param page_token [::String] + # Optional. The page token, received from a previous ListDeployments call. + # It can be provided to retrieve the subsequent page. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest.new + # + # # Call the list_deployments method. + # result = client.list_deployments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Deployment. + # p item + # end + # + def list_deployments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_deployments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_deployments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_deployments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.list_deployments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :list_deployments, "deployments", 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 deployment revisions of a given deployment. + # + # @overload list_deployment_revisions(request, options = nil) + # Pass arguments to `list_deployment_revisions` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_deployment_revisions(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_deployment_revisions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 deployment to list revisions for. + # @param page_size [::Integer] + # Optional. The maximum number of revisions to return per page. + # @param page_token [::String] + # Optional. The page token, received from a previous ListDeploymentRevisions + # call Provide this to retrieve the subsequent page. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest.new + # + # # Call the list_deployment_revisions method. + # result = client.list_deployment_revisions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Deployment. + # p item + # end + # + def list_deployment_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_deployment_revisions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_deployment_revisions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_deployment_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.list_deployment_revisions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :list_deployment_revisions, "deployments", 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 + + ## + # Discards the changes in a deployment and reverts the deployment to the last + # approved deployment revision. No changes take place if a deployment does + # not have revisions. + # + # @overload discard_deployment_changes(request, options = nil) + # Pass arguments to `discard_deployment_changes` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload discard_deployment_changes(name: nil) + # Pass arguments to `discard_deployment_changes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 deployment of which changes are being discarded. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest.new + # + # # Call the discard_deployment_changes method. + # result = client.discard_deployment_changes request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse. + # p result + # + def discard_deployment_changes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.discard_deployment_changes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.discard_deployment_changes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.discard_deployment_changes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.discard_deployment_changes request, 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 the deployment's YAML files to the parent orchestration cluster. + # + # @overload apply_deployment(request, options = nil) + # Pass arguments to `apply_deployment` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload apply_deployment(name: nil) + # Pass arguments to `apply_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 deployment to apply to orchestration cluster. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Deployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest.new + # + # # Call the apply_deployment method. + # result = client.apply_deployment request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. + # p result + # + def apply_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.apply_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.apply_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.apply_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.apply_deployment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the requested deployment status. + # + # @overload compute_deployment_status(request, options = nil) + # Pass arguments to `compute_deployment_status` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload compute_deployment_status(name: nil) + # Pass arguments to `compute_deployment_status` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 deployment without revisionID. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest.new + # + # # Call the compute_deployment_status method. + # result = client.compute_deployment_status request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse. + # p result + # + def compute_deployment_status request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.compute_deployment_status.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.compute_deployment_status.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.compute_deployment_status.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.compute_deployment_status request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Rollback the active deployment to the given past approved deployment + # revision. + # + # @overload rollback_deployment(request, options = nil) + # Pass arguments to `rollback_deployment` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_deployment(name: nil, revision_id: nil) + # Pass arguments to `rollback_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 deployment. + # @param revision_id [::String] + # Required. The revision id of deployment to roll back to. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Deployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest.new + # + # # Call the rollback_deployment method. + # result = client.rollback_deployment request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. + # p result + # + def rollback_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest + + # Converts hash and nil to an 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_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.rollback_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.rollback_deployment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the requested hydrated deployment. + # + # @overload get_hydrated_deployment(request, options = nil) + # Pass arguments to `get_hydrated_deployment` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_hydrated_deployment(name: nil) + # Pass arguments to `get_hydrated_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 hydrated deployment. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest.new + # + # # Call the get_hydrated_deployment method. + # result = client.get_hydrated_deployment request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::HydratedDeployment. + # p result + # + def get_hydrated_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_hydrated_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_hydrated_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_hydrated_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.get_hydrated_deployment request, 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 hydrated deployments present under a deployment. + # + # @overload list_hydrated_deployments(request, options = nil) + # Pass arguments to `list_hydrated_deployments` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_hydrated_deployments(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_hydrated_deployments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The deployment managing the hydrated deployments. + # @param page_size [::Integer] + # Optional. The maximum number of hydrated deployments to return. The service + # may return fewer than this value. If unspecified, at most 50 hydrated + # deployments will be returned. The maximum value is 1000. Values above 1000 + # will be set to 1000. + # @param page_token [::String] + # Optional. The page token, received from a previous ListHydratedDeployments + # call. Provide this to retrieve the subsequent page. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::HydratedDeployment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::HydratedDeployment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest.new + # + # # Call the list_hydrated_deployments method. + # result = client.list_hydrated_deployments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment. + # p item + # end + # + def list_hydrated_deployments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_hydrated_deployments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_hydrated_deployments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_hydrated_deployments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.list_hydrated_deployments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :list_hydrated_deployments, "hydrated_deployments", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a hydrated deployment. + # + # @overload update_hydrated_deployment(request, options = nil) + # Pass arguments to `update_hydrated_deployment` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_hydrated_deployment(hydrated_deployment: nil, update_mask: nil) + # Pass arguments to `update_hydrated_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param hydrated_deployment [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment, ::Hash] + # Required. The hydrated deployment to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. Update mask supports a special + # value `*` which fully replaces (equivalent to PUT) the resource provided. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest.new + # + # # Call the update_hydrated_deployment method. + # result = client.update_hydrated_deployment request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::HydratedDeployment. + # p result + # + def update_hydrated_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest + + # Converts hash and nil to an 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_hydrated_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_hydrated_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_hydrated_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.update_hydrated_deployment request, 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 hydrated deployment to a workload cluster. + # + # @overload apply_hydrated_deployment(request, options = nil) + # Pass arguments to `apply_hydrated_deployment` via a request object, either of type + # {::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload apply_hydrated_deployment(name: nil) + # Pass arguments to `apply_hydrated_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 hydrated deployment to apply. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/telco_automation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest.new + # + # # Call the apply_hydrated_deployment method. + # result = client.apply_hydrated_deployment request + # + # # The returned object is of type Google::Cloud::TelcoAutomation::V1::HydratedDeployment. + # p result + # + def apply_hydrated_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.apply_hydrated_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.apply_hydrated_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.apply_hydrated_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @telco_automation_stub.apply_hydrated_deployment request, 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 TelcoAutomation REST API. + # + # This class represents the configuration for TelcoAutomation 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::TelcoAutomation::V1::TelcoAutomation::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_orchestration_clusters to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_orchestration_clusters.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_orchestration_clusters.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 = "telcoautomation.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 TelcoAutomation 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_orchestration_clusters` + # @return [::Gapic::Config::Method] + # + attr_reader :list_orchestration_clusters + ## + # RPC-specific configuration for `get_orchestration_cluster` + # @return [::Gapic::Config::Method] + # + attr_reader :get_orchestration_cluster + ## + # RPC-specific configuration for `create_orchestration_cluster` + # @return [::Gapic::Config::Method] + # + attr_reader :create_orchestration_cluster + ## + # RPC-specific configuration for `delete_orchestration_cluster` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_orchestration_cluster + ## + # RPC-specific configuration for `list_edge_slms` + # @return [::Gapic::Config::Method] + # + attr_reader :list_edge_slms + ## + # RPC-specific configuration for `get_edge_slm` + # @return [::Gapic::Config::Method] + # + attr_reader :get_edge_slm + ## + # RPC-specific configuration for `create_edge_slm` + # @return [::Gapic::Config::Method] + # + attr_reader :create_edge_slm + ## + # RPC-specific configuration for `delete_edge_slm` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_edge_slm + ## + # RPC-specific configuration for `create_blueprint` + # @return [::Gapic::Config::Method] + # + attr_reader :create_blueprint + ## + # RPC-specific configuration for `update_blueprint` + # @return [::Gapic::Config::Method] + # + attr_reader :update_blueprint + ## + # RPC-specific configuration for `get_blueprint` + # @return [::Gapic::Config::Method] + # + attr_reader :get_blueprint + ## + # RPC-specific configuration for `delete_blueprint` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_blueprint + ## + # RPC-specific configuration for `list_blueprints` + # @return [::Gapic::Config::Method] + # + attr_reader :list_blueprints + ## + # RPC-specific configuration for `approve_blueprint` + # @return [::Gapic::Config::Method] + # + attr_reader :approve_blueprint + ## + # RPC-specific configuration for `propose_blueprint` + # @return [::Gapic::Config::Method] + # + attr_reader :propose_blueprint + ## + # RPC-specific configuration for `reject_blueprint` + # @return [::Gapic::Config::Method] + # + attr_reader :reject_blueprint + ## + # RPC-specific configuration for `list_blueprint_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_blueprint_revisions + ## + # RPC-specific configuration for `search_blueprint_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :search_blueprint_revisions + ## + # RPC-specific configuration for `search_deployment_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :search_deployment_revisions + ## + # RPC-specific configuration for `discard_blueprint_changes` + # @return [::Gapic::Config::Method] + # + attr_reader :discard_blueprint_changes + ## + # RPC-specific configuration for `list_public_blueprints` + # @return [::Gapic::Config::Method] + # + attr_reader :list_public_blueprints + ## + # RPC-specific configuration for `get_public_blueprint` + # @return [::Gapic::Config::Method] + # + attr_reader :get_public_blueprint + ## + # RPC-specific configuration for `create_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_deployment + ## + # RPC-specific configuration for `update_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_deployment + ## + # RPC-specific configuration for `get_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_deployment + ## + # RPC-specific configuration for `remove_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :remove_deployment + ## + # RPC-specific configuration for `list_deployments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_deployments + ## + # RPC-specific configuration for `list_deployment_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_deployment_revisions + ## + # RPC-specific configuration for `discard_deployment_changes` + # @return [::Gapic::Config::Method] + # + attr_reader :discard_deployment_changes + ## + # RPC-specific configuration for `apply_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :apply_deployment + ## + # RPC-specific configuration for `compute_deployment_status` + # @return [::Gapic::Config::Method] + # + attr_reader :compute_deployment_status + ## + # RPC-specific configuration for `rollback_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :rollback_deployment + ## + # RPC-specific configuration for `get_hydrated_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_hydrated_deployment + ## + # RPC-specific configuration for `list_hydrated_deployments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_hydrated_deployments + ## + # RPC-specific configuration for `update_hydrated_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_hydrated_deployment + ## + # RPC-specific configuration for `apply_hydrated_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :apply_hydrated_deployment + + # @private + def initialize parent_rpcs = nil + list_orchestration_clusters_config = parent_rpcs.list_orchestration_clusters if parent_rpcs.respond_to? :list_orchestration_clusters + @list_orchestration_clusters = ::Gapic::Config::Method.new list_orchestration_clusters_config + get_orchestration_cluster_config = parent_rpcs.get_orchestration_cluster if parent_rpcs.respond_to? :get_orchestration_cluster + @get_orchestration_cluster = ::Gapic::Config::Method.new get_orchestration_cluster_config + create_orchestration_cluster_config = parent_rpcs.create_orchestration_cluster if parent_rpcs.respond_to? :create_orchestration_cluster + @create_orchestration_cluster = ::Gapic::Config::Method.new create_orchestration_cluster_config + delete_orchestration_cluster_config = parent_rpcs.delete_orchestration_cluster if parent_rpcs.respond_to? :delete_orchestration_cluster + @delete_orchestration_cluster = ::Gapic::Config::Method.new delete_orchestration_cluster_config + list_edge_slms_config = parent_rpcs.list_edge_slms if parent_rpcs.respond_to? :list_edge_slms + @list_edge_slms = ::Gapic::Config::Method.new list_edge_slms_config + get_edge_slm_config = parent_rpcs.get_edge_slm if parent_rpcs.respond_to? :get_edge_slm + @get_edge_slm = ::Gapic::Config::Method.new get_edge_slm_config + create_edge_slm_config = parent_rpcs.create_edge_slm if parent_rpcs.respond_to? :create_edge_slm + @create_edge_slm = ::Gapic::Config::Method.new create_edge_slm_config + delete_edge_slm_config = parent_rpcs.delete_edge_slm if parent_rpcs.respond_to? :delete_edge_slm + @delete_edge_slm = ::Gapic::Config::Method.new delete_edge_slm_config + create_blueprint_config = parent_rpcs.create_blueprint if parent_rpcs.respond_to? :create_blueprint + @create_blueprint = ::Gapic::Config::Method.new create_blueprint_config + update_blueprint_config = parent_rpcs.update_blueprint if parent_rpcs.respond_to? :update_blueprint + @update_blueprint = ::Gapic::Config::Method.new update_blueprint_config + get_blueprint_config = parent_rpcs.get_blueprint if parent_rpcs.respond_to? :get_blueprint + @get_blueprint = ::Gapic::Config::Method.new get_blueprint_config + delete_blueprint_config = parent_rpcs.delete_blueprint if parent_rpcs.respond_to? :delete_blueprint + @delete_blueprint = ::Gapic::Config::Method.new delete_blueprint_config + list_blueprints_config = parent_rpcs.list_blueprints if parent_rpcs.respond_to? :list_blueprints + @list_blueprints = ::Gapic::Config::Method.new list_blueprints_config + approve_blueprint_config = parent_rpcs.approve_blueprint if parent_rpcs.respond_to? :approve_blueprint + @approve_blueprint = ::Gapic::Config::Method.new approve_blueprint_config + propose_blueprint_config = parent_rpcs.propose_blueprint if parent_rpcs.respond_to? :propose_blueprint + @propose_blueprint = ::Gapic::Config::Method.new propose_blueprint_config + reject_blueprint_config = parent_rpcs.reject_blueprint if parent_rpcs.respond_to? :reject_blueprint + @reject_blueprint = ::Gapic::Config::Method.new reject_blueprint_config + list_blueprint_revisions_config = parent_rpcs.list_blueprint_revisions if parent_rpcs.respond_to? :list_blueprint_revisions + @list_blueprint_revisions = ::Gapic::Config::Method.new list_blueprint_revisions_config + search_blueprint_revisions_config = parent_rpcs.search_blueprint_revisions if parent_rpcs.respond_to? :search_blueprint_revisions + @search_blueprint_revisions = ::Gapic::Config::Method.new search_blueprint_revisions_config + search_deployment_revisions_config = parent_rpcs.search_deployment_revisions if parent_rpcs.respond_to? :search_deployment_revisions + @search_deployment_revisions = ::Gapic::Config::Method.new search_deployment_revisions_config + discard_blueprint_changes_config = parent_rpcs.discard_blueprint_changes if parent_rpcs.respond_to? :discard_blueprint_changes + @discard_blueprint_changes = ::Gapic::Config::Method.new discard_blueprint_changes_config + list_public_blueprints_config = parent_rpcs.list_public_blueprints if parent_rpcs.respond_to? :list_public_blueprints + @list_public_blueprints = ::Gapic::Config::Method.new list_public_blueprints_config + get_public_blueprint_config = parent_rpcs.get_public_blueprint if parent_rpcs.respond_to? :get_public_blueprint + @get_public_blueprint = ::Gapic::Config::Method.new get_public_blueprint_config + create_deployment_config = parent_rpcs.create_deployment if parent_rpcs.respond_to? :create_deployment + @create_deployment = ::Gapic::Config::Method.new create_deployment_config + update_deployment_config = parent_rpcs.update_deployment if parent_rpcs.respond_to? :update_deployment + @update_deployment = ::Gapic::Config::Method.new update_deployment_config + get_deployment_config = parent_rpcs.get_deployment if parent_rpcs.respond_to? :get_deployment + @get_deployment = ::Gapic::Config::Method.new get_deployment_config + remove_deployment_config = parent_rpcs.remove_deployment if parent_rpcs.respond_to? :remove_deployment + @remove_deployment = ::Gapic::Config::Method.new remove_deployment_config + list_deployments_config = parent_rpcs.list_deployments if parent_rpcs.respond_to? :list_deployments + @list_deployments = ::Gapic::Config::Method.new list_deployments_config + list_deployment_revisions_config = parent_rpcs.list_deployment_revisions if parent_rpcs.respond_to? :list_deployment_revisions + @list_deployment_revisions = ::Gapic::Config::Method.new list_deployment_revisions_config + discard_deployment_changes_config = parent_rpcs.discard_deployment_changes if parent_rpcs.respond_to? :discard_deployment_changes + @discard_deployment_changes = ::Gapic::Config::Method.new discard_deployment_changes_config + apply_deployment_config = parent_rpcs.apply_deployment if parent_rpcs.respond_to? :apply_deployment + @apply_deployment = ::Gapic::Config::Method.new apply_deployment_config + compute_deployment_status_config = parent_rpcs.compute_deployment_status if parent_rpcs.respond_to? :compute_deployment_status + @compute_deployment_status = ::Gapic::Config::Method.new compute_deployment_status_config + rollback_deployment_config = parent_rpcs.rollback_deployment if parent_rpcs.respond_to? :rollback_deployment + @rollback_deployment = ::Gapic::Config::Method.new rollback_deployment_config + get_hydrated_deployment_config = parent_rpcs.get_hydrated_deployment if parent_rpcs.respond_to? :get_hydrated_deployment + @get_hydrated_deployment = ::Gapic::Config::Method.new get_hydrated_deployment_config + list_hydrated_deployments_config = parent_rpcs.list_hydrated_deployments if parent_rpcs.respond_to? :list_hydrated_deployments + @list_hydrated_deployments = ::Gapic::Config::Method.new list_hydrated_deployments_config + update_hydrated_deployment_config = parent_rpcs.update_hydrated_deployment if parent_rpcs.respond_to? :update_hydrated_deployment + @update_hydrated_deployment = ::Gapic::Config::Method.new update_hydrated_deployment_config + apply_hydrated_deployment_config = parent_rpcs.apply_hydrated_deployment if parent_rpcs.respond_to? :apply_hydrated_deployment + @apply_hydrated_deployment = ::Gapic::Config::Method.new apply_hydrated_deployment_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest/operations.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest/operations.rb new file mode 100644 index 000000000000..6d9d6798af44 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/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 TelcoAutomation + module V1 + module TelcoAutomation + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "telcoautomation.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the TelcoAutomation 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 TelcoAutomation 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::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::TelcoAutomation::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "telcoautomation.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}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/?$}, 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-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest/service_stub.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest/service_stub.rb new file mode 100644 index 000000000000..a3585b11399f --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest/service_stub.rb @@ -0,0 +1,2293 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/telcoautomation/v1/telcoautomation_pb" + +module Google + module Cloud + module TelcoAutomation + module V1 + module TelcoAutomation + module Rest + ## + # REST service stub for the TelcoAutomation 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_orchestration_clusters REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersResponse] + # A result object deserialized from the server's reply + def list_orchestration_clusters request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_orchestration_clusters_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_orchestration_clusters", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersResponse.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_orchestration_cluster REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster] + # A result object deserialized from the server's reply + def get_orchestration_cluster request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_orchestration_cluster_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_orchestration_cluster", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster.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_orchestration_cluster REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_orchestration_cluster request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_orchestration_cluster_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_orchestration_cluster", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_orchestration_cluster REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_orchestration_cluster request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_orchestration_cluster_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_orchestration_cluster", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_edge_slms REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsResponse] + # A result object deserialized from the server's reply + def list_edge_slms request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_edge_slms_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_edge_slms", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsResponse.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_edge_slm REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::EdgeSlm] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::EdgeSlm] + # A result object deserialized from the server's reply + def get_edge_slm request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_edge_slm_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_edge_slm", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::EdgeSlm.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_edge_slm REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_edge_slm request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_edge_slm_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_edge_slm", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_edge_slm REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_edge_slm request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_edge_slm_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_edge_slm", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_blueprint REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # A result object deserialized from the server's reply + def create_blueprint request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_blueprint_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_blueprint", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::Blueprint.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_blueprint REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # A result object deserialized from the server's reply + def update_blueprint request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_blueprint_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_blueprint", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::Blueprint.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_blueprint REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # A result object deserialized from the server's reply + def get_blueprint request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_blueprint_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_blueprint", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::Blueprint.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_blueprint REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_blueprint request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_blueprint_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_blueprint", + 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 list_blueprints REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::ListBlueprintsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::ListBlueprintsResponse] + # A result object deserialized from the server's reply + def list_blueprints request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_blueprints_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_blueprints", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::ListBlueprintsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the approve_blueprint REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # A result object deserialized from the server's reply + def approve_blueprint request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_approve_blueprint_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "approve_blueprint", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::Blueprint.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the propose_blueprint REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # A result object deserialized from the server's reply + def propose_blueprint request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_propose_blueprint_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "propose_blueprint", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::Blueprint.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the reject_blueprint REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # A result object deserialized from the server's reply + def reject_blueprint request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_reject_blueprint_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "reject_blueprint", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::Blueprint.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_blueprint_revisions REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsResponse] + # A result object deserialized from the server's reply + def list_blueprint_revisions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_blueprint_revisions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_blueprint_revisions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the search_blueprint_revisions REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsResponse] + # A result object deserialized from the server's reply + def search_blueprint_revisions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_blueprint_revisions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "search_blueprint_revisions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the search_deployment_revisions REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsResponse] + # A result object deserialized from the server's reply + def search_deployment_revisions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_deployment_revisions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "search_deployment_revisions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the discard_blueprint_changes REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse] + # A result object deserialized from the server's reply + def discard_blueprint_changes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_discard_blueprint_changes_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "discard_blueprint_changes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse.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_public_blueprints REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsResponse] + # A result object deserialized from the server's reply + def list_public_blueprints request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_public_blueprints_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_public_blueprints", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsResponse.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_public_blueprint REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::PublicBlueprint] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::PublicBlueprint] + # A result object deserialized from the server's reply + def get_public_blueprint request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_public_blueprint_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_public_blueprint", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::PublicBlueprint.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_deployment REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Deployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] + # A result object deserialized from the server's reply + def create_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_deployment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::Deployment.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_deployment REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Deployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] + # A result object deserialized from the server's reply + def update_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_deployment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::Deployment.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_deployment REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Deployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] + # A result object deserialized from the server's reply + def get_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_deployment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::Deployment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the remove_deployment REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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 remove_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_remove_deployment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "remove_deployment", + 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 list_deployments REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::ListDeploymentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::ListDeploymentsResponse] + # A result object deserialized from the server's reply + def list_deployments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_deployments_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_deployments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::ListDeploymentsResponse.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_deployment_revisions REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsResponse] + # A result object deserialized from the server's reply + def list_deployment_revisions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_deployment_revisions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_deployment_revisions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the discard_deployment_changes REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse] + # A result object deserialized from the server's reply + def discard_deployment_changes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_discard_deployment_changes_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "discard_deployment_changes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the apply_deployment REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Deployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] + # A result object deserialized from the server's reply + def apply_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_apply_deployment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "apply_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::Deployment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the compute_deployment_status REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse] + # A result object deserialized from the server's reply + def compute_deployment_status request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_compute_deployment_status_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "compute_deployment_status", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse.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_deployment REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Deployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] + # A result object deserialized from the server's reply + def rollback_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_rollback_deployment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::Deployment.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_hydrated_deployment REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] + # A result object deserialized from the server's reply + def get_hydrated_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_hydrated_deployment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_hydrated_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment.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_hydrated_deployments REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsResponse] + # A result object deserialized from the server's reply + def list_hydrated_deployments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_hydrated_deployments_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_hydrated_deployments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsResponse.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_hydrated_deployment REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] + # A result object deserialized from the server's reply + def update_hydrated_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_hydrated_deployment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_hydrated_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the apply_hydrated_deployment REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] + # A result object deserialized from the server's reply + def apply_hydrated_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_apply_hydrated_deployment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "apply_hydrated_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment.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_orchestration_clusters REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_orchestration_clusters_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/orchestrationClusters", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_orchestration_cluster REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_orchestration_cluster_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_orchestration_cluster REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest] + # 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_orchestration_cluster_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/orchestrationClusters", + body: "orchestration_cluster", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_orchestration_cluster REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest] + # 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_orchestration_cluster_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_edge_slms REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_edge_slms_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/edgeSlms", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_edge_slm REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_edge_slm_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/edgeSlms/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_edge_slm REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest] + # 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_edge_slm_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/edgeSlms", + body: "edge_slm", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_edge_slm REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest] + # 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_edge_slm_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/edgeSlms/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_blueprint REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest] + # 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_blueprint_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/blueprints", + body: "blueprint", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_blueprint REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest] + # 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_blueprint_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{blueprint.name}", + body: "blueprint", + matches: [ + ["blueprint.name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/blueprints/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_blueprint REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_blueprint_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/blueprints/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_blueprint REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest] + # 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_blueprint_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/blueprints/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_blueprints REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_blueprints_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/blueprints", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the approve_blueprint REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_approve_blueprint_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:approve", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/blueprints/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the propose_blueprint REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_propose_blueprint_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:propose", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/blueprints/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the reject_blueprint REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_reject_blueprint_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:reject", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/blueprints/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_blueprint_revisions REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_blueprint_revisions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:listRevisions", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/blueprints/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_blueprint_revisions REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_search_blueprint_revisions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/blueprints:searchRevisions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_deployment_revisions REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_search_deployment_revisions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/deployments:searchRevisions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the discard_blueprint_changes REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_discard_blueprint_changes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:discard", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/blueprints/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_public_blueprints REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_public_blueprints_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/publicBlueprints", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_public_blueprint REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_public_blueprint_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/publicBlueprints/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_deployment REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest] + # 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_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/deployments", + body: "deployment", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_deployment REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest] + # 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_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{deployment.name}", + body: "deployment", + matches: [ + ["deployment.name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/deployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_deployment REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/deployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the remove_deployment REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_remove_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:remove", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/deployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_deployments REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_deployments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/deployments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_deployment_revisions REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_deployment_revisions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:listRevisions", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/deployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the discard_deployment_changes REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_discard_deployment_changes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:discard", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/deployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the apply_deployment REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_apply_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:apply", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/deployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the compute_deployment_status REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_compute_deployment_status_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:computeDeploymentStatus", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/deployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the rollback_deployment REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest] + # 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_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:rollback", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/deployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_hydrated_deployment REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_hydrated_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/deployments/[^/]+/hydratedDeployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_hydrated_deployments REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_hydrated_deployments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/hydratedDeployments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/deployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_hydrated_deployment REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest] + # 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_hydrated_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{hydrated_deployment.name}", + body: "hydrated_deployment", + matches: [ + ["hydrated_deployment.name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/deployments/[^/]+/hydratedDeployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the apply_hydrated_deployment REST call + # + # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_apply_hydrated_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:apply", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/deployments/[^/]+/hydratedDeployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/version.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/version.rb new file mode 100644 index 000000000000..c881f2cf866a --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/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 TelcoAutomation + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telcoautomation/v1/telcoautomation_pb.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telcoautomation/v1/telcoautomation_pb.rb new file mode 100644 index 000000000000..0b6473c43f4f --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telcoautomation/v1/telcoautomation_pb.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/telcoautomation/v1/telcoautomation.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/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n5google/cloud/telcoautomation/v1/telcoautomation.proto\x12\x1fgoogle.cloud.telcoautomation.v1\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\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb2\x05\n\x14OrchestrationCluster\x12\x0c\n\x04name\x18\x01 \x01(\t\x12L\n\x11management_config\x18\x05 \x01(\x0b\x32\x31.google.cloud.telcoautomation.v1.ManagementConfig\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\x41.google.cloud.telcoautomation.v1.OrchestrationCluster.LabelsEntry\x12\x18\n\x0btna_version\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12O\n\x05state\x18\x07 \x01(\x0e\x32;.google.cloud.telcoautomation.v1.OrchestrationCluster.StateB\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\"R\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\x0c\n\x08\x44\x45LETING\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04:\x90\x01\xea\x41\x8c\x01\n3telcoautomation.googleapis.com/OrchestrationCluster\x12Uprojects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}\"\xbb\x06\n\x07\x45\x64geSlm\x12\x0c\n\x04name\x18\x01 \x01(\t\x12Z\n\x15orchestration_cluster\x18\x05 \x01(\tB;\xe0\x41\x05\xfa\x41\x35\n3telcoautomation.googleapis.com/OrchestrationCluster\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\x12I\n\x06labels\x18\x04 \x03(\x0b\x32\x34.google.cloud.telcoautomation.v1.EdgeSlm.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0btna_version\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x42\n\x05state\x18\x07 \x01(\x0e\x32..google.cloud.telcoautomation.v1.EdgeSlm.StateB\x03\xe0\x41\x03\x12`\n\x15workload_cluster_type\x18\x08 \x01(\x0e\x32<.google.cloud.telcoautomation.v1.EdgeSlm.WorkloadClusterTypeB\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\"R\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\x0c\n\x08\x44\x45LETING\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\"O\n\x13WorkloadClusterType\x12%\n!WORKLOAD_CLUSTER_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04GDCE\x10\x01\x12\x07\n\x03GKE\x10\x02:{\xea\x41x\n&telcoautomation.googleapis.com/EdgeSlm\x12;projects/{project}/locations/{location}/edgeSlms/{edge_slm}*\x08\x65\x64geSlms2\x07\x65\x64geSlm\"\xe1\x07\n\tBlueprint\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1b\n\x0brevision_id\x18\x02 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x03\x12 \n\x10source_blueprint\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12=\n\x14revision_create_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12U\n\x0e\x61pproval_state\x18\x06 \x01(\x0e\x32\x38.google.cloud.telcoautomation.v1.Blueprint.ApprovalStateB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nrepository\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x39\n\x05\x66iles\x18\t \x03(\x0b\x32%.google.cloud.telcoautomation.v1.FileB\x03\xe0\x41\x01\x12K\n\x06labels\x18\n \x03(\x0b\x32\x36.google.cloud.telcoautomation.v1.Blueprint.LabelsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x0fsource_provider\x18\r \x01(\tB\x03\xe0\x41\x03\x12O\n\x10\x64\x65ployment_level\x18\x0e \x01(\x0e\x32\x30.google.cloud.telcoautomation.v1.DeploymentLevelB\x03\xe0\x41\x03\x12\x1d\n\x10rollback_support\x18\x0f \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\"V\n\rApprovalState\x12\x1e\n\x1a\x41PPROVAL_STATE_UNSPECIFIED\x10\x00\x12\t\n\x05\x44RAFT\x10\x01\x12\x0c\n\x08PROPOSED\x10\x02\x12\x0c\n\x08\x41PPROVED\x10\x03:\xb3\x01\xea\x41\xaf\x01\n(telcoautomation.googleapis.com/Blueprint\x12lprojects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/blueprints/{blueprint}*\nblueprints2\tblueprint\"\xf4\x02\n\x0fPublicBlueprint\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12J\n\x10\x64\x65ployment_level\x18\x04 \x01(\x0e\x32\x30.google.cloud.telcoautomation.v1.DeploymentLevel\x12\x17\n\x0fsource_provider\x18\x05 \x01(\t\x12\x1d\n\x10rollback_support\x18\x0f \x01(\x08\x42\x03\xe0\x41\x03:\xa3\x01\xea\x41\x9f\x01\n.telcoautomation.googleapis.com/PublicBlueprint\x12Jprojects/{project}/locations/{location}/publicBlueprints/{public_lueprint}*\x10publicBlueprints2\x0fpublicBlueprint\"\xee\x07\n\nDeployment\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1b\n\x0brevision_id\x18\x02 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x03\x12&\n\x19source_blueprint_revision\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12=\n\x14revision_create_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x45\n\x05state\x18\x05 \x01(\x0e\x32\x31.google.cloud.telcoautomation.v1.Deployment.StateB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nrepository\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x39\n\x05\x66iles\x18\x08 \x03(\x0b\x32%.google.cloud.telcoautomation.v1.FileB\x03\xe0\x41\x01\x12L\n\x06labels\x18\t \x03(\x0b\x32\x37.google.cloud.telcoautomation.v1.Deployment.LabelsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x0fsource_provider\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12 \n\x10workload_cluster\x18\r \x01(\tB\x06\xe0\x41\x05\xe0\x41\x01\x12O\n\x10\x64\x65ployment_level\x18\x0e \x01(\x0e\x32\x30.google.cloud.telcoautomation.v1.DeploymentLevelB\x03\xe0\x41\x03\x12\x1d\n\x10rollback_support\x18\x0f \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\"D\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05\x44RAFT\x10\x01\x12\x0b\n\x07\x41PPLIED\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03:\xb8\x01\xea\x41\xb4\x01\n)telcoautomation.googleapis.com/Deployment\x12nprojects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/deployments/{deployment}*\x0b\x64\x65ployments2\ndeployment\"\x86\x04\n\x12HydratedDeployment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12M\n\x05state\x18\x02 \x01(\x0e\x32\x39.google.cloud.telcoautomation.v1.HydratedDeployment.StateB\x03\xe0\x41\x03\x12\x39\n\x05\x66iles\x18\x03 \x03(\x0b\x32%.google.cloud.telcoautomation.v1.FileB\x03\xe0\x41\x01\x12\x1d\n\x10workload_cluster\x18\x04 \x01(\tB\x03\xe0\x41\x03\"6\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05\x44RAFT\x10\x01\x12\x0b\n\x07\x41PPLIED\x10\x02:\xfb\x01\xea\x41\xf7\x01\n1telcoautomation.googleapis.com/HydratedDeployment\x12\x98\x01projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/deployments/{deployment}/hydratedDeployments/{hydrated_deployment}*\x13hydratedDeployments2\x12hydratedDeployment\"\xb8\x01\n ListOrchestrationClustersRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33telcoautomation.googleapis.com/OrchestrationCluster\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\"\xa8\x01\n!ListOrchestrationClustersResponse\x12U\n\x16orchestration_clusters\x18\x01 \x03(\x0b\x32\x35.google.cloud.telcoautomation.v1.OrchestrationCluster\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"k\n\x1eGetOrchestrationClusterRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3telcoautomation.googleapis.com/OrchestrationCluster\"\x8b\x02\n!CreateOrchestrationClusterRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33telcoautomation.googleapis.com/OrchestrationCluster\x12%\n\x18orchestration_cluster_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Y\n\x15orchestration_cluster\x18\x03 \x01(\x0b\x32\x35.google.cloud.telcoautomation.v1.OrchestrationClusterB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x87\x01\n!DeleteOrchestrationClusterRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3telcoautomation.googleapis.com/OrchestrationCluster\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x9e\x01\n\x13ListEdgeSlmsRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&telcoautomation.googleapis.com/EdgeSlm\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\"\x81\x01\n\x14ListEdgeSlmsResponse\x12;\n\tedge_slms\x18\x01 \x03(\x0b\x32(.google.cloud.telcoautomation.v1.EdgeSlm\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"Q\n\x11GetEdgeSlmRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&telcoautomation.googleapis.com/EdgeSlm\"\xca\x01\n\x14\x43reateEdgeSlmRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&telcoautomation.googleapis.com/EdgeSlm\x12\x18\n\x0b\x65\x64ge_slm_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12?\n\x08\x65\x64ge_slm\x18\x03 \x01(\x0b\x32(.google.cloud.telcoautomation.v1.EdgeSlmB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"m\n\x14\x44\x65leteEdgeSlmRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&telcoautomation.googleapis.com/EdgeSlm\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb9\x01\n\x16\x43reateBlueprintRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(telcoautomation.googleapis.com/Blueprint\x12\x19\n\x0c\x62lueprint_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x42\n\tblueprint\x18\x03 \x01(\x0b\x32*.google.cloud.telcoautomation.v1.BlueprintB\x03\xe0\x41\x02\"\x92\x01\n\x16UpdateBlueprintRequest\x12\x42\n\tblueprint\x18\x01 \x01(\x0b\x32*.google.cloud.telcoautomation.v1.BlueprintB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x98\x01\n\x13GetBlueprintRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(telcoautomation.googleapis.com/Blueprint\x12\x41\n\x04view\x18\x02 \x01(\x0e\x32..google.cloud.telcoautomation.v1.BlueprintViewB\x03\xe0\x41\x01\"X\n\x16\x44\x65leteBlueprintRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(telcoautomation.googleapis.com/Blueprint\"\x9f\x01\n\x15ListBlueprintsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(telcoautomation.googleapis.com/Blueprint\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"q\n\x16ListBlueprintsResponse\x12>\n\nblueprints\x18\x01 \x03(\x0b\x32*.google.cloud.telcoautomation.v1.Blueprint\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Y\n\x17\x41pproveBlueprintRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(telcoautomation.googleapis.com/Blueprint\"Y\n\x17ProposeBlueprintRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(telcoautomation.googleapis.com/Blueprint\"X\n\x16RejectBlueprintRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(telcoautomation.googleapis.com/Blueprint\"\x86\x01\n\x1dListBlueprintRevisionsRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(telcoautomation.googleapis.com/Blueprint\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"y\n\x1eListBlueprintRevisionsResponse\x12>\n\nblueprints\x18\x01 \x03(\x0b\x32*.google.cloud.telcoautomation.v1.Blueprint\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa8\x01\n\x1fSearchBlueprintRevisionsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(telcoautomation.googleapis.com/Blueprint\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"{\n SearchBlueprintRevisionsResponse\x12>\n\nblueprints\x18\x01 \x03(\x0b\x32*.google.cloud.telcoautomation.v1.Blueprint\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"`\n\x1e\x44iscardBlueprintChangesRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(telcoautomation.googleapis.com/Blueprint\"!\n\x1f\x44iscardBlueprintChangesResponse\"\x96\x01\n\x1bListPublicBlueprintsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.telcoautomation.googleapis.com/PublicBlueprint\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x89\x01\n\x1cListPublicBlueprintsResponse\x12K\n\x11public_blueprints\x18\x01 \x03(\x0b\x32\x30.google.cloud.telcoautomation.v1.PublicBlueprint\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"a\n\x19GetPublicBlueprintRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.telcoautomation.googleapis.com/PublicBlueprint\"\xbe\x01\n\x17\x43reateDeploymentRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)telcoautomation.googleapis.com/Deployment\x12\x1a\n\rdeployment_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\ndeployment\x18\x03 \x01(\x0b\x32+.google.cloud.telcoautomation.v1.DeploymentB\x03\xe0\x41\x02\"\x95\x01\n\x17UpdateDeploymentRequest\x12\x44\n\ndeployment\x18\x01 \x01(\x0b\x32+.google.cloud.telcoautomation.v1.DeploymentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x9b\x01\n\x14GetDeploymentRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)telcoautomation.googleapis.com/Deployment\x12\x42\n\x04view\x18\x02 \x01(\x0e\x32/.google.cloud.telcoautomation.v1.DeploymentViewB\x03\xe0\x41\x01\"Z\n\x17RemoveDeploymentRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)telcoautomation.googleapis.com/Deployment\"\xa1\x01\n\x16ListDeploymentsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)telcoautomation.googleapis.com/Deployment\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"t\n\x17ListDeploymentsResponse\x12@\n\x0b\x64\x65ployments\x18\x01 \x03(\x0b\x32+.google.cloud.telcoautomation.v1.Deployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x92\x01\n\x1eListDeploymentRevisionsRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)telcoautomation.googleapis.com/Deployment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"|\n\x1fListDeploymentRevisionsResponse\x12@\n\x0b\x64\x65ployments\x18\x01 \x03(\x0b\x32+.google.cloud.telcoautomation.v1.Deployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa9\x01\n SearchDeploymentRevisionsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(telcoautomation.googleapis.com/Blueprint\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"~\n!SearchDeploymentRevisionsResponse\x12@\n\x0b\x64\x65ployments\x18\x01 \x03(\x0b\x32+.google.cloud.telcoautomation.v1.Deployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"b\n\x1f\x44iscardDeploymentChangesRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)telcoautomation.googleapis.com/Deployment\"\"\n DiscardDeploymentChangesResponse\"Y\n\x16\x41pplyDeploymentRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)telcoautomation.googleapis.com/Deployment\"a\n\x1e\x43omputeDeploymentStatusRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)telcoautomation.googleapis.com/Deployment\"\xc9\x01\n\x1f\x43omputeDeploymentStatusResponse\x12\x0c\n\x04name\x18\x01 \x01(\t\x12G\n\x11\x61ggregated_status\x18\x02 \x01(\x0e\x32\'.google.cloud.telcoautomation.v1.StatusB\x03\xe0\x41\x03\x12O\n\x11resource_statuses\x18\x03 \x03(\x0b\x32/.google.cloud.telcoautomation.v1.ResourceStatusB\x03\xe0\x41\x03\"v\n\x19RollbackDeploymentRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)telcoautomation.googleapis.com/Deployment\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\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\"g\n\x1cGetHydratedDeploymentRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1telcoautomation.googleapis.com/HydratedDeployment\"\x9c\x01\n\x1eListHydratedDeploymentsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31telcoautomation.googleapis.com/HydratedDeployment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n\x1fListHydratedDeploymentsResponse\x12Q\n\x14hydrated_deployments\x18\x01 \x03(\x0b\x32\x33.google.cloud.telcoautomation.v1.HydratedDeployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xae\x01\n\x1fUpdateHydratedDeploymentRequest\x12U\n\x13hydrated_deployment\x18\x01 \x01(\x0b\x32\x33.google.cloud.telcoautomation.v1.HydratedDeploymentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"i\n\x1e\x41pplyHydratedDeploymentRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1telcoautomation.googleapis.com/HydratedDeployment\"\xdc\x01\n\x10ManagementConfig\x12_\n\x1astandard_management_config\x18\x01 \x01(\x0b\x32\x39.google.cloud.telcoautomation.v1.StandardManagementConfigH\x00\x12W\n\x16\x66ull_management_config\x18\x02 \x01(\x0b\x32\x35.google.cloud.telcoautomation.v1.FullManagementConfigH\x00\x42\x0e\n\x0coneof_config\"\xe3\x02\n\x18StandardManagementConfig\x12\x14\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06subnet\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16master_ipv4_cidr_block\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12\x63luster_cidr_block\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13services_cidr_block\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13\x63luster_named_range\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14services_named_range\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12o\n!master_authorized_networks_config\x18\x08 \x01(\x0b\x32?.google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfigB\x03\xe0\x41\x01\"\xdf\x02\n\x14\x46ullManagementConfig\x12\x14\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06subnet\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16master_ipv4_cidr_block\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12\x63luster_cidr_block\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13services_cidr_block\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13\x63luster_named_range\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14services_named_range\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12o\n!master_authorized_networks_config\x18\x08 \x01(\x0b\x32?.google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfigB\x03\xe0\x41\x01\"\xc6\x01\n\x1eMasterAuthorizedNetworksConfig\x12\x63\n\x0b\x63idr_blocks\x18\x01 \x03(\x0b\x32I.google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig.CidrBlockB\x03\xe0\x41\x01\x1a?\n\tCidrBlock\x12\x19\n\x0c\x64isplay_name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\ncidr_block\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\\\n\x04\x46ile\x12\x11\n\x04path\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07\x63ontent\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x64\x65leted\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x15\n\x08\x65\x64itable\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xc1\x02\n\x0eResourceStatus\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\x12resource_namespace\x18\x02 \x01(\t\x12\r\n\x05group\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\t\x12\x0c\n\x04kind\x18\x05 \x01(\t\x12I\n\rresource_type\x18\x06 \x01(\x0e\x32-.google.cloud.telcoautomation.v1.ResourceTypeB\x03\xe0\x41\x03\x12<\n\x06status\x18\x07 \x01(\x0e\x32\'.google.cloud.telcoautomation.v1.StatusB\x03\xe0\x41\x03\x12N\n\x10nf_deploy_status\x18\x08 \x01(\x0b\x32/.google.cloud.telcoautomation.v1.NFDeployStatusB\x03\xe0\x41\x03\"\x8c\x01\n\x0eNFDeployStatus\x12\x19\n\x0ctargeted_nfs\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x16\n\tready_nfs\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12G\n\x05sites\x18\x03 \x03(\x0b\x32\x33.google.cloud.telcoautomation.v1.NFDeploySiteStatusB\x03\xe0\x41\x03\"\xd8\x01\n\x12NFDeploySiteStatus\x12\x11\n\x04site\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10pending_deletion\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x12H\n\thydration\x18\x03 \x01(\x0b\x32\x30.google.cloud.telcoautomation.v1.HydrationStatusB\x03\xe0\x41\x03\x12\x46\n\x08workload\x18\x04 \x01(\x0b\x32/.google.cloud.telcoautomation.v1.WorkloadStatusB\x03\xe0\x41\x03\"o\n\x0fHydrationStatus\x12G\n\x0csite_version\x18\x01 \x01(\x0b\x32,.google.cloud.telcoautomation.v1.SiteVersionB\x03\xe0\x41\x03\x12\x13\n\x06status\x18\x02 \x01(\tB\x03\xe0\x41\x03\"T\n\x0bSiteVersion\x12\x16\n\tnf_vendor\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07nf_type\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nnf_version\x18\x03 \x01(\tB\x03\xe0\x41\x03\"n\n\x0eWorkloadStatus\x12G\n\x0csite_version\x18\x01 \x01(\x0b\x32,.google.cloud.telcoautomation.v1.SiteVersionB\x03\xe0\x41\x03\x12\x13\n\x06status\x18\x02 \x01(\tB\x03\xe0\x41\x03*b\n\rBlueprintView\x12\x1e\n\x1a\x42LUEPRINT_VIEW_UNSPECIFIED\x10\x00\x12\x18\n\x14\x42LUEPRINT_VIEW_BASIC\x10\x01\x12\x17\n\x13\x42LUEPRINT_VIEW_FULL\x10\x02*f\n\x0e\x44\x65ploymentView\x12\x1f\n\x1b\x44\x45PLOYMENT_VIEW_UNSPECIFIED\x10\x00\x12\x19\n\x15\x44\x45PLOYMENT_VIEW_BASIC\x10\x01\x12\x18\n\x14\x44\x45PLOYMENT_VIEW_FULL\x10\x02*^\n\x0cResourceType\x12\x1d\n\x19RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12NF_DEPLOY_RESOURCE\x10\x01\x12\x17\n\x13\x44\x45PLOYMENT_RESOURCE\x10\x02*\xb6\x01\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x16\n\x12STATUS_IN_PROGRESS\x10\x01\x12\x11\n\rSTATUS_ACTIVE\x10\x02\x12\x11\n\rSTATUS_FAILED\x10\x03\x12\x13\n\x0fSTATUS_DELETING\x10\x04\x12\x12\n\x0eSTATUS_DELETED\x10\x05\x12\x12\n\x0eSTATUS_PEERING\x10\n\x12\x19\n\x15STATUS_NOT_APPLICABLE\x10\x0b*\x90\x01\n\x0f\x44\x65ploymentLevel\x12 \n\x1c\x44\x45PLOYMENT_LEVEL_UNSPECIFIED\x10\x00\x12\r\n\tHYDRATION\x10\x01\x12\x15\n\x11SINGLE_DEPLOYMENT\x10\x02\x12\x14\n\x10MULTI_DEPLOYMENT\x10\x03\x12\x1f\n\x1bWORKLOAD_CLUSTER_DEPLOYMENT\x10\x04\x32\xec\x43\n\x0fTelcoAutomation\x12\xee\x01\n\x19ListOrchestrationClusters\x12\x41.google.cloud.telcoautomation.v1.ListOrchestrationClustersRequest\x1a\x42.google.cloud.telcoautomation.v1.ListOrchestrationClustersResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*}/orchestrationClusters\x12\xdb\x01\n\x17GetOrchestrationCluster\x12?.google.cloud.telcoautomation.v1.GetOrchestrationClusterRequest\x1a\x35.google.cloud.telcoautomation.v1.OrchestrationCluster\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/orchestrationClusters/*}\x12\xbe\x02\n\x1a\x43reateOrchestrationCluster\x12\x42.google.cloud.telcoautomation.v1.CreateOrchestrationClusterRequest\x1a\x1d.google.longrunning.Operation\"\xbc\x01\xca\x41)\n\x14OrchestrationCluster\x12\x11OperationMetadata\xda\x41\x35parent,orchestration_cluster,orchestration_cluster_id\x82\xd3\xe4\x93\x02R\"9/v1/{parent=projects/*/locations/*}/orchestrationClusters:\x15orchestration_cluster\x12\xf6\x01\n\x1a\x44\x65leteOrchestrationCluster\x12\x42.google.cloud.telcoautomation.v1.DeleteOrchestrationClusterRequest\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/*/orchestrationClusters/*}\x12\xba\x01\n\x0cListEdgeSlms\x12\x34.google.cloud.telcoautomation.v1.ListEdgeSlmsRequest\x1a\x35.google.cloud.telcoautomation.v1.ListEdgeSlmsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/edgeSlms\x12\xa7\x01\n\nGetEdgeSlm\x12\x32.google.cloud.telcoautomation.v1.GetEdgeSlmRequest\x1a(.google.cloud.telcoautomation.v1.EdgeSlm\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/edgeSlms/*}\x12\xe2\x01\n\rCreateEdgeSlm\x12\x35.google.cloud.telcoautomation.v1.CreateEdgeSlmRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41\x1c\n\x07\x45\x64geSlm\x12\x11OperationMetadata\xda\x41\x1bparent,edge_slm,edge_slm_id\x82\xd3\xe4\x93\x02\x38\",/v1/{parent=projects/*/locations/*}/edgeSlms:\x08\x65\x64ge_slm\x12\xcf\x01\n\rDeleteEdgeSlm\x12\x35.google.cloud.telcoautomation.v1.DeleteEdgeSlmRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/edgeSlms/*}\x12\xf1\x01\n\x0f\x43reateBlueprint\x12\x37.google.cloud.telcoautomation.v1.CreateBlueprintRequest\x1a*.google.cloud.telcoautomation.v1.Blueprint\"y\xda\x41\x1dparent,blueprint,blueprint_id\x82\xd3\xe4\x93\x02S\"F/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/blueprints:\tblueprint\x12\xf3\x01\n\x0fUpdateBlueprint\x12\x37.google.cloud.telcoautomation.v1.UpdateBlueprintRequest\x1a*.google.cloud.telcoautomation.v1.Blueprint\"{\xda\x41\x15\x62lueprint,update_mask\x82\xd3\xe4\x93\x02]2P/v1/{blueprint.name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:\tblueprint\x12\xc7\x01\n\x0cGetBlueprint\x12\x34.google.cloud.telcoautomation.v1.GetBlueprintRequest\x1a*.google.cloud.telcoautomation.v1.Blueprint\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H\x12\x46/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}\x12\xb9\x01\n\x0f\x44\x65leteBlueprint\x12\x37.google.cloud.telcoautomation.v1.DeleteBlueprintRequest\x1a\x16.google.protobuf.Empty\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H*F/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}\x12\xda\x01\n\x0eListBlueprints\x12\x36.google.cloud.telcoautomation.v1.ListBlueprintsRequest\x1a\x37.google.cloud.telcoautomation.v1.ListBlueprintsResponse\"W\xda\x41\x06parent\x82\xd3\xe4\x93\x02H\x12\x46/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/blueprints\x12\xda\x01\n\x10\x41pproveBlueprint\x12\x38.google.cloud.telcoautomation.v1.ApproveBlueprintRequest\x1a*.google.cloud.telcoautomation.v1.Blueprint\"`\xda\x41\x04name\x82\xd3\xe4\x93\x02S\"N/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:approve:\x01*\x12\xda\x01\n\x10ProposeBlueprint\x12\x38.google.cloud.telcoautomation.v1.ProposeBlueprintRequest\x1a*.google.cloud.telcoautomation.v1.Blueprint\"`\xda\x41\x04name\x82\xd3\xe4\x93\x02S\"N/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:propose:\x01*\x12\xd7\x01\n\x0fRejectBlueprint\x12\x37.google.cloud.telcoautomation.v1.RejectBlueprintRequest\x1a*.google.cloud.telcoautomation.v1.Blueprint\"_\xda\x41\x04name\x82\xd3\xe4\x93\x02R\"M/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:reject:\x01*\x12\xfe\x01\n\x16ListBlueprintRevisions\x12>.google.cloud.telcoautomation.v1.ListBlueprintRevisionsRequest\x1a?.google.cloud.telcoautomation.v1.ListBlueprintRevisionsResponse\"c\xda\x41\x04name\x82\xd3\xe4\x93\x02V\x12T/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:listRevisions\x12\x8e\x02\n\x18SearchBlueprintRevisions\x12@.google.cloud.telcoautomation.v1.SearchBlueprintRevisionsRequest\x1a\x41.google.cloud.telcoautomation.v1.SearchBlueprintRevisionsResponse\"m\xda\x41\x0cparent,query\x82\xd3\xe4\x93\x02X\x12V/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/blueprints:searchRevisions\x12\x92\x02\n\x19SearchDeploymentRevisions\x12\x41.google.cloud.telcoautomation.v1.SearchDeploymentRevisionsRequest\x1a\x42.google.cloud.telcoautomation.v1.SearchDeploymentRevisionsResponse\"n\xda\x41\x0cparent,query\x82\xd3\xe4\x93\x02Y\x12W/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/deployments:searchRevisions\x12\xfe\x01\n\x17\x44iscardBlueprintChanges\x12?.google.cloud.telcoautomation.v1.DiscardBlueprintChangesRequest\x1a@.google.cloud.telcoautomation.v1.DiscardBlueprintChangesResponse\"`\xda\x41\x04name\x82\xd3\xe4\x93\x02S\"N/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:discard:\x01*\x12\xda\x01\n\x14ListPublicBlueprints\x12<.google.cloud.telcoautomation.v1.ListPublicBlueprintsRequest\x1a=.google.cloud.telcoautomation.v1.ListPublicBlueprintsResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*}/publicBlueprints\x12\xc7\x01\n\x12GetPublicBlueprint\x12:.google.cloud.telcoautomation.v1.GetPublicBlueprintRequest\x1a\x30.google.cloud.telcoautomation.v1.PublicBlueprint\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/publicBlueprints/*}\x12\xf8\x01\n\x10\x43reateDeployment\x12\x38.google.cloud.telcoautomation.v1.CreateDeploymentRequest\x1a+.google.cloud.telcoautomation.v1.Deployment\"}\xda\x41\x1fparent,deployment,deployment_id\x82\xd3\xe4\x93\x02U\"G/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/deployments:\ndeployment\x12\xfa\x01\n\x10UpdateDeployment\x12\x38.google.cloud.telcoautomation.v1.UpdateDeploymentRequest\x1a+.google.cloud.telcoautomation.v1.Deployment\"\x7f\xda\x41\x16\x64\x65ployment,update_mask\x82\xd3\xe4\x93\x02`2R/v1/{deployment.name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:\ndeployment\x12\xcb\x01\n\rGetDeployment\x12\x35.google.cloud.telcoautomation.v1.GetDeploymentRequest\x1a+.google.cloud.telcoautomation.v1.Deployment\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02I\x12G/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}\x12\xc6\x01\n\x10RemoveDeployment\x12\x38.google.cloud.telcoautomation.v1.RemoveDeploymentRequest\x1a\x16.google.protobuf.Empty\"`\xda\x41\x04name\x82\xd3\xe4\x93\x02S\"N/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:remove:\x01*\x12\xde\x01\n\x0fListDeployments\x12\x37.google.cloud.telcoautomation.v1.ListDeploymentsRequest\x1a\x38.google.cloud.telcoautomation.v1.ListDeploymentsResponse\"X\xda\x41\x06parent\x82\xd3\xe4\x93\x02I\x12G/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/deployments\x12\x82\x02\n\x17ListDeploymentRevisions\x12?.google.cloud.telcoautomation.v1.ListDeploymentRevisionsRequest\x1a@.google.cloud.telcoautomation.v1.ListDeploymentRevisionsResponse\"d\xda\x41\x04name\x82\xd3\xe4\x93\x02W\x12U/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:listRevisions\x12\x82\x02\n\x18\x44iscardDeploymentChanges\x12@.google.cloud.telcoautomation.v1.DiscardDeploymentChangesRequest\x1a\x41.google.cloud.telcoautomation.v1.DiscardDeploymentChangesResponse\"a\xda\x41\x04name\x82\xd3\xe4\x93\x02T\"O/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:discard:\x01*\x12\xd8\x01\n\x0f\x41pplyDeployment\x12\x37.google.cloud.telcoautomation.v1.ApplyDeploymentRequest\x1a+.google.cloud.telcoautomation.v1.Deployment\"_\xda\x41\x04name\x82\xd3\xe4\x93\x02R\"M/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:apply:\x01*\x12\x8c\x02\n\x17\x43omputeDeploymentStatus\x12?.google.cloud.telcoautomation.v1.ComputeDeploymentStatusRequest\x1a@.google.cloud.telcoautomation.v1.ComputeDeploymentStatusResponse\"n\xda\x41\x04name\x82\xd3\xe4\x93\x02\x61\x12_/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:computeDeploymentStatus\x12\xed\x01\n\x12RollbackDeployment\x12:.google.cloud.telcoautomation.v1.RollbackDeploymentRequest\x1a+.google.cloud.telcoautomation.v1.Deployment\"n\xda\x41\x10name,revision_id\x82\xd3\xe4\x93\x02U\"P/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:rollback:\x01*\x12\xf9\x01\n\x15GetHydratedDeployment\x12=.google.cloud.telcoautomation.v1.GetHydratedDeploymentRequest\x1a\x33.google.cloud.telcoautomation.v1.HydratedDeployment\"l\xda\x41\x04name\x82\xd3\xe4\x93\x02_\x12]/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*/hydratedDeployments/*}\x12\x8c\x02\n\x17ListHydratedDeployments\x12?.google.cloud.telcoautomation.v1.ListHydratedDeploymentsRequest\x1a@.google.cloud.telcoautomation.v1.ListHydratedDeploymentsResponse\"n\xda\x41\x06parent\x82\xd3\xe4\x93\x02_\x12]/v1/{parent=projects/*/locations/*/orchestrationClusters/*/deployments/*}/hydratedDeployments\x12\xc5\x02\n\x18UpdateHydratedDeployment\x12@.google.cloud.telcoautomation.v1.UpdateHydratedDeploymentRequest\x1a\x33.google.cloud.telcoautomation.v1.HydratedDeployment\"\xb1\x01\xda\x41\x1fhydrated_deployment,update_mask\x82\xd3\xe4\x93\x02\x88\x01\x32q/v1/{hydrated_deployment.name=projects/*/locations/*/orchestrationClusters/*/deployments/*/hydratedDeployments/*}:\x13hydrated_deployment\x12\x86\x02\n\x17\x41pplyHydratedDeployment\x12?.google.cloud.telcoautomation.v1.ApplyHydratedDeploymentRequest\x1a\x33.google.cloud.telcoautomation.v1.HydratedDeployment\"u\xda\x41\x04name\x82\xd3\xe4\x93\x02h\"c/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*/hydratedDeployments/*}:apply:\x01*\x1aR\xca\x41\x1etelcoautomation.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xf5\x01\n#com.google.cloud.telcoautomation.v1B\x14TelcoautomationProtoP\x01ZMcloud.google.com/go/telcoautomation/apiv1/telcoautomationpb;telcoautomationpb\xaa\x02\x1fGoogle.Cloud.TelcoAutomation.V1\xca\x02\x1fGoogle\\Cloud\\TelcoAutomation\\V1\xea\x02\"Google::Cloud::TelcoAutomation::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module TelcoAutomation + module V1 + OrchestrationCluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.OrchestrationCluster").msgclass + OrchestrationCluster::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.OrchestrationCluster.State").enummodule + EdgeSlm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.EdgeSlm").msgclass + EdgeSlm::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.EdgeSlm.State").enummodule + EdgeSlm::WorkloadClusterType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.EdgeSlm.WorkloadClusterType").enummodule + Blueprint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.Blueprint").msgclass + Blueprint::ApprovalState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.Blueprint.ApprovalState").enummodule + PublicBlueprint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.PublicBlueprint").msgclass + Deployment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.Deployment").msgclass + Deployment::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.Deployment.State").enummodule + HydratedDeployment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.HydratedDeployment").msgclass + HydratedDeployment::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.HydratedDeployment.State").enummodule + ListOrchestrationClustersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListOrchestrationClustersRequest").msgclass + ListOrchestrationClustersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListOrchestrationClustersResponse").msgclass + GetOrchestrationClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.GetOrchestrationClusterRequest").msgclass + CreateOrchestrationClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.CreateOrchestrationClusterRequest").msgclass + DeleteOrchestrationClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.DeleteOrchestrationClusterRequest").msgclass + ListEdgeSlmsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListEdgeSlmsRequest").msgclass + ListEdgeSlmsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListEdgeSlmsResponse").msgclass + GetEdgeSlmRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.GetEdgeSlmRequest").msgclass + CreateEdgeSlmRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.CreateEdgeSlmRequest").msgclass + DeleteEdgeSlmRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.DeleteEdgeSlmRequest").msgclass + CreateBlueprintRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.CreateBlueprintRequest").msgclass + UpdateBlueprintRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.UpdateBlueprintRequest").msgclass + GetBlueprintRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.GetBlueprintRequest").msgclass + DeleteBlueprintRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.DeleteBlueprintRequest").msgclass + ListBlueprintsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListBlueprintsRequest").msgclass + ListBlueprintsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListBlueprintsResponse").msgclass + ApproveBlueprintRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ApproveBlueprintRequest").msgclass + ProposeBlueprintRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ProposeBlueprintRequest").msgclass + RejectBlueprintRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.RejectBlueprintRequest").msgclass + ListBlueprintRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListBlueprintRevisionsRequest").msgclass + ListBlueprintRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListBlueprintRevisionsResponse").msgclass + SearchBlueprintRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.SearchBlueprintRevisionsRequest").msgclass + SearchBlueprintRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.SearchBlueprintRevisionsResponse").msgclass + DiscardBlueprintChangesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.DiscardBlueprintChangesRequest").msgclass + DiscardBlueprintChangesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.DiscardBlueprintChangesResponse").msgclass + ListPublicBlueprintsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListPublicBlueprintsRequest").msgclass + ListPublicBlueprintsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListPublicBlueprintsResponse").msgclass + GetPublicBlueprintRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.GetPublicBlueprintRequest").msgclass + CreateDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.CreateDeploymentRequest").msgclass + UpdateDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.UpdateDeploymentRequest").msgclass + GetDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.GetDeploymentRequest").msgclass + RemoveDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.RemoveDeploymentRequest").msgclass + ListDeploymentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListDeploymentsRequest").msgclass + ListDeploymentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListDeploymentsResponse").msgclass + ListDeploymentRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListDeploymentRevisionsRequest").msgclass + ListDeploymentRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListDeploymentRevisionsResponse").msgclass + SearchDeploymentRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.SearchDeploymentRevisionsRequest").msgclass + SearchDeploymentRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.SearchDeploymentRevisionsResponse").msgclass + DiscardDeploymentChangesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.DiscardDeploymentChangesRequest").msgclass + DiscardDeploymentChangesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.DiscardDeploymentChangesResponse").msgclass + ApplyDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ApplyDeploymentRequest").msgclass + ComputeDeploymentStatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ComputeDeploymentStatusRequest").msgclass + ComputeDeploymentStatusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ComputeDeploymentStatusResponse").msgclass + RollbackDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.RollbackDeploymentRequest").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.OperationMetadata").msgclass + GetHydratedDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.GetHydratedDeploymentRequest").msgclass + ListHydratedDeploymentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListHydratedDeploymentsRequest").msgclass + ListHydratedDeploymentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListHydratedDeploymentsResponse").msgclass + UpdateHydratedDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.UpdateHydratedDeploymentRequest").msgclass + ApplyHydratedDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ApplyHydratedDeploymentRequest").msgclass + ManagementConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ManagementConfig").msgclass + StandardManagementConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.StandardManagementConfig").msgclass + FullManagementConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.FullManagementConfig").msgclass + MasterAuthorizedNetworksConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig").msgclass + MasterAuthorizedNetworksConfig::CidrBlock = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig.CidrBlock").msgclass + File = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.File").msgclass + ResourceStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ResourceStatus").msgclass + NFDeployStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.NFDeployStatus").msgclass + NFDeploySiteStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.NFDeploySiteStatus").msgclass + HydrationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.HydrationStatus").msgclass + SiteVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.SiteVersion").msgclass + WorkloadStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.WorkloadStatus").msgclass + BlueprintView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.BlueprintView").enummodule + DeploymentView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.DeploymentView").enummodule + ResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ResourceType").enummodule + Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.Status").enummodule + DeploymentLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.DeploymentLevel").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telcoautomation/v1/telcoautomation_services_pb.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telcoautomation/v1/telcoautomation_services_pb.rb new file mode 100644 index 000000000000..bc4578b621de --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telcoautomation/v1/telcoautomation_services_pb.rb @@ -0,0 +1,126 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/telcoautomation/v1/telcoautomation.proto for package 'Google.Cloud.TelcoAutomation.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/telcoautomation/v1/telcoautomation_pb' + +module Google + module Cloud + module TelcoAutomation + module V1 + module TelcoAutomation + # TelcoAutomation Service manages the control plane cluster a.k.a. + # Orchestration Cluster (GKE cluster with config controller) of TNA. It also + # exposes blueprint APIs which manages the lifecycle of blueprints that control + # the infrastructure setup (e.g GDCE clusters) and deployment of network + # functions. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.telcoautomation.v1.TelcoAutomation' + + # Lists OrchestrationClusters in a given project and location. + rpc :ListOrchestrationClusters, ::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest, ::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersResponse + # Gets details of a single OrchestrationCluster. + rpc :GetOrchestrationCluster, ::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest, ::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster + # Creates a new OrchestrationCluster in a given project and location. + rpc :CreateOrchestrationCluster, ::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest, ::Google::Longrunning::Operation + # Deletes a single OrchestrationCluster. + rpc :DeleteOrchestrationCluster, ::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest, ::Google::Longrunning::Operation + # Lists EdgeSlms in a given project and location. + rpc :ListEdgeSlms, ::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest, ::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsResponse + # Gets details of a single EdgeSlm. + rpc :GetEdgeSlm, ::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest, ::Google::Cloud::TelcoAutomation::V1::EdgeSlm + # Creates a new EdgeSlm in a given project and location. + rpc :CreateEdgeSlm, ::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest, ::Google::Longrunning::Operation + # Deletes a single EdgeSlm. + rpc :DeleteEdgeSlm, ::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest, ::Google::Longrunning::Operation + # Creates a blueprint. + rpc :CreateBlueprint, ::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest, ::Google::Cloud::TelcoAutomation::V1::Blueprint + # Updates a blueprint. + rpc :UpdateBlueprint, ::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest, ::Google::Cloud::TelcoAutomation::V1::Blueprint + # Returns the requested blueprint. + rpc :GetBlueprint, ::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest, ::Google::Cloud::TelcoAutomation::V1::Blueprint + # Deletes a blueprint and all its revisions. + rpc :DeleteBlueprint, ::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest, ::Google::Protobuf::Empty + # List all blueprints. + rpc :ListBlueprints, ::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest, ::Google::Cloud::TelcoAutomation::V1::ListBlueprintsResponse + # Approves a blueprint and commits a new revision. + rpc :ApproveBlueprint, ::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest, ::Google::Cloud::TelcoAutomation::V1::Blueprint + # Proposes a blueprint for approval of changes. + rpc :ProposeBlueprint, ::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest, ::Google::Cloud::TelcoAutomation::V1::Blueprint + # Rejects a blueprint revision proposal and flips it back to Draft state. + rpc :RejectBlueprint, ::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest, ::Google::Cloud::TelcoAutomation::V1::Blueprint + # List blueprint revisions of a given blueprint. + rpc :ListBlueprintRevisions, ::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest, ::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsResponse + # Searches across blueprint revisions. + rpc :SearchBlueprintRevisions, ::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest, ::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsResponse + # Searches across deployment revisions. + rpc :SearchDeploymentRevisions, ::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest, ::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsResponse + # Discards the changes in a blueprint and reverts the blueprint to the last + # approved blueprint revision. No changes take place if a blueprint does not + # have revisions. + rpc :DiscardBlueprintChanges, ::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest, ::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse + # Lists the blueprints in TNA's public catalog. Default page size = 20, + # Max Page Size = 100. + rpc :ListPublicBlueprints, ::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest, ::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsResponse + # Returns the requested public blueprint. + rpc :GetPublicBlueprint, ::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest, ::Google::Cloud::TelcoAutomation::V1::PublicBlueprint + # Creates a deployment. + rpc :CreateDeployment, ::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest, ::Google::Cloud::TelcoAutomation::V1::Deployment + # Updates a deployment. + rpc :UpdateDeployment, ::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest, ::Google::Cloud::TelcoAutomation::V1::Deployment + # Returns the requested deployment. + rpc :GetDeployment, ::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest, ::Google::Cloud::TelcoAutomation::V1::Deployment + # Removes the deployment by marking it as DELETING. Post which deployment and + # it's revisions gets deleted. + rpc :RemoveDeployment, ::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest, ::Google::Protobuf::Empty + # List all deployments. + rpc :ListDeployments, ::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest, ::Google::Cloud::TelcoAutomation::V1::ListDeploymentsResponse + # List deployment revisions of a given deployment. + rpc :ListDeploymentRevisions, ::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest, ::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsResponse + # Discards the changes in a deployment and reverts the deployment to the last + # approved deployment revision. No changes take place if a deployment does + # not have revisions. + rpc :DiscardDeploymentChanges, ::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest, ::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse + # Applies the deployment's YAML files to the parent orchestration cluster. + rpc :ApplyDeployment, ::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest, ::Google::Cloud::TelcoAutomation::V1::Deployment + # Returns the requested deployment status. + rpc :ComputeDeploymentStatus, ::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest, ::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse + # Rollback the active deployment to the given past approved deployment + # revision. + rpc :RollbackDeployment, ::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest, ::Google::Cloud::TelcoAutomation::V1::Deployment + # Returns the requested hydrated deployment. + rpc :GetHydratedDeployment, ::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest, ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment + # List all hydrated deployments present under a deployment. + rpc :ListHydratedDeployments, ::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest, ::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsResponse + # Updates a hydrated deployment. + rpc :UpdateHydratedDeployment, ::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest, ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment + # Applies a hydrated deployment to a workload cluster. + rpc :ApplyHydratedDeployment, ::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest, ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/README.md new file mode 100644 index 000000000000..ad404433aa18 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Telco Automation 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-telco_automation-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # 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. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + # + # Example: + # + # 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 + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # 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 + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # 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 + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/proto_docs/google/cloud/telcoautomation/v1/telcoautomation.rb b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/cloud/telcoautomation/v1/telcoautomation.rb new file mode 100644 index 000000000000..2386f15aacc5 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/cloud/telcoautomation/v1/telcoautomation.rb @@ -0,0 +1,1551 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module TelcoAutomation + module V1 + # Orchestration cluster represents a GKE cluster with config controller and + # TNA specific components installed on it. + # @!attribute [rw] name + # @return [::String] + # Name of the orchestration cluster. The name of orchestration cluster cannot + # be more than 24 characters. + # @!attribute [rw] management_config + # @return [::Google::Cloud::TelcoAutomation::V1::ManagementConfig] + # Management configuration of the underlying GKE cluster. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. [Output only] Create time stamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. [Output only] Update time stamp. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels as key value pairs. + # @!attribute [r] tna_version + # @return [::String] + # Output only. Provides the TNA version installed on the cluster. + # @!attribute [r] state + # @return [::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster::State] + # Output only. State of the Orchestration Cluster. + class OrchestrationCluster + 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 + + # Possible states that the Orchestration Cluster can be in. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # OrchestrationCluster is being created. + CREATING = 1 + + # OrchestrationCluster has been created and is ready for use. + ACTIVE = 2 + + # OrchestrationCluster is being deleted. + DELETING = 3 + + # OrchestrationCluster encountered an error and is in an indeterministic + # state. User can still initiate a delete operation on this state. + FAILED = 4 + end + end + + # EdgeSlm represents an SLM instance which manages the lifecycle of edge + # components installed on Workload clusters managed by an Orchestration + # Cluster. + # @!attribute [rw] name + # @return [::String] + # Name of the EdgeSlm resource. + # @!attribute [rw] orchestration_cluster + # @return [::String] + # Immutable. Reference to the orchestration cluster on which templates for + # this resources will be applied. This should be of format + # projects/\\{project}/locations/\\{location}/orchestrationClusters/\\{orchestration_cluster}. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. [Output only] Create time stamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. [Output only] Update time stamp. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels as key value pairs. The key and value should contain + # characters which are UTF-8 compliant and less than 50 characters. + # @!attribute [r] tna_version + # @return [::String] + # Output only. Provides the active TNA version for this resource. + # @!attribute [r] state + # @return [::Google::Cloud::TelcoAutomation::V1::EdgeSlm::State] + # Output only. State of the EdgeSlm resource. + # @!attribute [rw] workload_cluster_type + # @return [::Google::Cloud::TelcoAutomation::V1::EdgeSlm::WorkloadClusterType] + # Optional. Type of workload cluster for which an EdgeSLM resource is + # created. + class EdgeSlm + 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 + + # Possible states of the resource. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # EdgeSlm is being created. + CREATING = 1 + + # EdgeSlm has been created and is ready for use. + ACTIVE = 2 + + # EdgeSlm is being deleted. + DELETING = 3 + + # EdgeSlm encountered an error and is in an indeterministic + # state. User can still initiate a delete operation on this state. + FAILED = 4 + end + + # Workload clusters supported by TNA. New values will be added to the enum + # list as TNA adds supports for new workload clusters in future. + module WorkloadClusterType + # Unspecified workload cluster. + WORKLOAD_CLUSTER_TYPE_UNSPECIFIED = 0 + + # Workload cluster is a GDCE cluster. + GDCE = 1 + + # Workload cluster is a GKE cluster. + GKE = 2 + end + end + + # A Blueprint contains a collection of kubernetes resources in the form of + # YAML files. The file contents of a blueprint are collectively known as + # package. A blueprint can be + # a) imported from TNA's public catalog + # b) modified as per a user's need + # c) proposed and approved. + # On approval, a revision of blueprint is created which can be used to + # create a deployment on Orchestration or Workload Cluster. + # @!attribute [rw] name + # @return [::String] + # The name of the blueprint. If unspecified, the name will be autogenerated + # from server side. Name of the blueprint must not contain `@` character. + # @!attribute [r] revision_id + # @return [::String] + # Output only. Immutable. The revision ID of the blueprint. + # A new revision is committed whenever a blueprint is approved. + # @!attribute [rw] source_blueprint + # @return [::String] + # Required. Immutable. The public blueprint ID from which this blueprint was + # created. + # @!attribute [r] revision_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp that the revision was created. + # @!attribute [r] approval_state + # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint::ApprovalState] + # Output only. Approval state of the blueprint (DRAFT, PROPOSED, APPROVED) + # @!attribute [rw] display_name + # @return [::String] + # Optional. Human readable name of a Blueprint. + # @!attribute [r] repository + # @return [::String] + # Output only. Name of the repository where the blueprint files are stored. + # @!attribute [rw] files + # @return [::Array<::Google::Cloud::TelcoAutomation::V1::File>] + # Optional. Files present in a blueprint. + # When invoking UpdateBlueprint API, only the modified files should be + # included in this. Files that are not included in the update of a blueprint + # will not be changed. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels are key-value attributes that can be set on a blueprint + # resource by the user. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Blueprint creation time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the blueprint was updated. + # @!attribute [r] source_provider + # @return [::String] + # Output only. Source provider is the author of a public blueprint, from + # which this blueprint is created. + # @!attribute [r] deployment_level + # @return [::Google::Cloud::TelcoAutomation::V1::DeploymentLevel] + # Output only. DeploymentLevel of a blueprint signifies where the blueprint + # will be applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] + # @!attribute [r] rollback_support + # @return [::Boolean] + # Output only. Indicates if the deployment created from this blueprint can be + # rolled back. + class Blueprint + 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 + + # Approval state indicates the state of a Blueprint in its approval + # lifecycle. + module ApprovalState + # Unspecified state. + APPROVAL_STATE_UNSPECIFIED = 0 + + # A blueprint starts in DRAFT state once it is created. All edits are made + # to the blueprint in DRAFT state. + DRAFT = 1 + + # When the edits are ready for review, blueprint can be proposed and moves + # to PROPOSED state. Edits cannot be made to a blueprint in PROPOSED state. + PROPOSED = 2 + + # When a proposed blueprint is approved, it moves to APPROVED state. A new + # revision is committed. The latest committed revision can be used to + # create a deployment on Orchestration or Workload Cluster. Edits to an + # APPROVED blueprint changes its state back to DRAFT. The last committed + # revision of a blueprint represents its latest APPROVED state. + APPROVED = 3 + end + end + + # A Blueprint contains a collection of kubernetes resources in the form of + # YAML files. The file contents of a blueprint are collectively known as + # package. + # Public blueprint is a TNA provided blueprint that in present in TNA's public + # catalog. A user can copy the public blueprint to their private catalog for + # further modifications. + # @!attribute [rw] name + # @return [::String] + # Name of the public blueprint. + # @!attribute [rw] display_name + # @return [::String] + # The display name of the public blueprint. + # @!attribute [rw] description + # @return [::String] + # The description of the public blueprint. + # @!attribute [rw] deployment_level + # @return [::Google::Cloud::TelcoAutomation::V1::DeploymentLevel] + # DeploymentLevel of a blueprint signifies where the blueprint will be + # applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] + # @!attribute [rw] source_provider + # @return [::String] + # Source provider is the author of a public blueprint. e.g. Google, vendors + # @!attribute [r] rollback_support + # @return [::Boolean] + # Output only. Indicates if the deployment created from this blueprint can be + # rolled back. + class PublicBlueprint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Deployment contains a collection of YAML files (This collection is also known + # as package) that can to applied on an orchestration cluster (GKE cluster with + # TNA addons) or a workload cluster. + # @!attribute [rw] name + # @return [::String] + # The name of the deployment. + # @!attribute [r] revision_id + # @return [::String] + # Output only. Immutable. The revision ID of the deployment. + # A new revision is committed whenever a change in deployment is applied. + # @!attribute [rw] source_blueprint_revision + # @return [::String] + # Required. The blueprint revision from which this deployment was created. + # @!attribute [r] revision_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp that the revision was created. + # @!attribute [r] state + # @return [::Google::Cloud::TelcoAutomation::V1::Deployment::State] + # Output only. State of the deployment (DRAFT, APPLIED, DELETING). + # @!attribute [rw] display_name + # @return [::String] + # Optional. Human readable name of a Deployment. + # @!attribute [r] repository + # @return [::String] + # Output only. Name of the repository where the deployment package files are + # stored. + # @!attribute [rw] files + # @return [::Array<::Google::Cloud::TelcoAutomation::V1::File>] + # Optional. Files present in a deployment. + # When invoking UpdateDeployment API, only the modified files should be + # included in this. Files that are not included in the update of a deployment + # will not be changed. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels are key-value attributes that can be set on a deployment + # resource by the user. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Deployment creation time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the deployment was updated. + # @!attribute [r] source_provider + # @return [::String] + # Output only. Source provider is the author of a public blueprint, from + # which this deployment is created. + # @!attribute [rw] workload_cluster + # @return [::String] + # Optional. Immutable. The WorkloadCluster on which to create the Deployment. + # This field should only be passed when the deployment_level of the source + # blueprint specifies deployments on workload clusters e.g. + # WORKLOAD_CLUSTER_DEPLOYMENT. + # @!attribute [r] deployment_level + # @return [::Google::Cloud::TelcoAutomation::V1::DeploymentLevel] + # Output only. Attributes to where the deployment can inflict changes. The + # value can only be [SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT]. + # @!attribute [r] rollback_support + # @return [::Boolean] + # Output only. Indicates if the deployment can be rolled back, exported from + # public blueprint. + class Deployment + 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 defines which state the current deployment is in. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # A deployment starts in DRAFT state. All edits are made in DRAFT state. A + # deployment opened for editing after applying will be in draft state, + # while its prevision revision will be its current applied version. + DRAFT = 1 + + # This state means that the contents (YAML files containing kubernetes + # resources) of the deployment have been applied to an Orchestration or + # Workload Cluster. A revision is created when a deployment is applied. + # This revision will represent the latest view of what is applied on the + # cluster until the deployment is modified and applied again, which will + # create a new revision. + APPLIED = 2 + + # A deployment in DELETING state has been marked for deletion. Its + # deletion status can be queried using `ComputeDeploymentStatus` API. No + # updates are allowed to a deployment in DELETING state. + DELETING = 3 + end + end + + # A collection of kubernetes yaml files which are deployed on a Workload + # Cluster. Hydrated Deployments are created by TNA intent based automation. + # @!attribute [r] name + # @return [::String] + # Output only. The name of the hydrated deployment. + # @!attribute [r] state + # @return [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment::State] + # Output only. State of the hydrated deployment (DRAFT, APPLIED). + # @!attribute [rw] files + # @return [::Array<::Google::Cloud::TelcoAutomation::V1::File>] + # Optional. File contents of a hydrated deployment. + # When invoking UpdateHydratedBlueprint API, only the modified files should + # be included in this. Files that are not included in the update of a + # hydrated deployment will not be changed. + # @!attribute [r] workload_cluster + # @return [::String] + # Output only. WorkloadCluster identifies which workload cluster will the + # hydrated deployment will be deployed on. + class HydratedDeployment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # State defines which state the current hydrated deployment is in. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # A hydrated deployment starts in DRAFT state. All edits are made in DRAFT + # state. + DRAFT = 1 + + # When the edit is applied, the hydrated deployment moves to APPLIED + # state. No changes can be made once a hydrated deployment is applied. + APPLIED = 2 + end + end + + # Message for requesting list of OrchestrationClusters. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListOrchestrationClustersRequest + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Hint for how to order the results. + class ListOrchestrationClustersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing OrchestrationClusters. + # @!attribute [rw] orchestration_clusters + # @return [::Array<::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster>] + # The list of OrchestrationCluster + # @!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 ListOrchestrationClustersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a OrchestrationCluster. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + class GetOrchestrationClusterRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a OrchestrationCluster. + # @!attribute [rw] parent + # @return [::String] + # Required. Value for parent. + # @!attribute [rw] orchestration_cluster_id + # @return [::String] + # Required. Id of the requesting object + # If auto-generating Id server-side, remove this field and + # orchestration_cluster_id from the method_signature of Create RPC + # @!attribute [rw] orchestration_cluster + # @return [::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster] + # Required. The resource being 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 CreateOrchestrationClusterRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a OrchestrationCluster. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + # @!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 DeleteOrchestrationClusterRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting list of EdgeSlms + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListEdgeSlmsRequest + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Filtering results + # @!attribute [rw] order_by + # @return [::String] + # Hint for how to order the results + class ListEdgeSlmsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing EdgeSlms. + # @!attribute [rw] edge_slms + # @return [::Array<::Google::Cloud::TelcoAutomation::V1::EdgeSlm>] + # The list of EdgeSlm + # @!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 ListEdgeSlmsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a EdgeSlm. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + class GetEdgeSlmRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a EdgeSlm. + # @!attribute [rw] parent + # @return [::String] + # Required. Value for parent. + # @!attribute [rw] edge_slm_id + # @return [::String] + # Required. Id of the requesting object + # If auto-generating Id server-side, remove this field and + # edge_slm_id from the method_signature of Create RPC + # @!attribute [rw] edge_slm + # @return [::Google::Cloud::TelcoAutomation::V1::EdgeSlm] + # Required. The resource being 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 CreateEdgeSlmRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a EdgeSlm. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + # @!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 DeleteEdgeSlmRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `CreateBlueprint`. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of parent resource. + # Format should be - + # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". + # @!attribute [rw] blueprint_id + # @return [::String] + # Optional. The name of the blueprint. + # @!attribute [rw] blueprint + # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # Required. The `Blueprint` to create. + class CreateBlueprintRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `UpdateBlueprint`. + # @!attribute [rw] blueprint + # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] + # Required. The `blueprint` to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Update mask is used to specify the fields to be overwritten in + # the `blueprint` resource by the update. + class UpdateBlueprintRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `GetBlueprint`. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the blueprint. + # Case 1: If the name provided in the request is + # \\{blueprint_id}@\\{revision_id}, then the revision with revision_id will be + # returned. Case 2: If the name provided in the request is \\{blueprint}, then + # the current state of the blueprint is returned. + # @!attribute [rw] view + # @return [::Google::Cloud::TelcoAutomation::V1::BlueprintView] + # Optional. Defines the type of view of the blueprint. + # When field is not present BLUEPRINT_VIEW_BASIC is considered as default. + class GetBlueprintRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `DeleteBlueprint`. + # @!attribute [rw] name + # @return [::String] + # Required. The name of blueprint to delete. + # Blueprint name should be in the format \\{blueprint_id}, if + # \\{blueprint_id}@\\{revision_id} is passed then the API throws invalid + # argument. + class DeleteBlueprintRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `ListBlueprints`. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of parent orchestration cluster resource. + # Format should be - + # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering only supports equality on blueprint state. + # It should be in the form: "state = DRAFT". `OR` operator can be used to + # get response for multiple states. e.g. "state = DRAFT OR state = PROPOSED". + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of blueprints to return per page. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The page token, received from a previous ListBlueprints call. + # It can be provided to retrieve the subsequent page. + class ListBlueprintsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response object for `ListBlueprints`. + # @!attribute [rw] blueprints + # @return [::Array<::Google::Cloud::TelcoAutomation::V1::Blueprint>] + # The list of requested blueprints. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListBlueprintsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `ApproveBlueprint`. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the blueprint to approve. The blueprint must be in + # Proposed state. A new revision is committed on approval. + class ApproveBlueprintRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `ProposeBlueprint`. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the blueprint being proposed. + class ProposeBlueprintRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `RejectBlueprint`. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the blueprint being rejected. + class RejectBlueprintRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `ListBlueprintRevisions`. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the blueprint to list revisions for. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of revisions to return per page. + # @!attribute [rw] page_token + # @return [::String] + # The page token, received from a previous ListBlueprintRevisions call + # It can be provided to retrieve the subsequent page. + class ListBlueprintRevisionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response object for `ListBlueprintRevisions`. + # @!attribute [rw] blueprints + # @return [::Array<::Google::Cloud::TelcoAutomation::V1::Blueprint>] + # The revisions of the blueprint. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListBlueprintRevisionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `SearchBlueprintRevisions`. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of parent orchestration cluster resource. + # Format should be - + # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". + # @!attribute [rw] query + # @return [::String] + # Required. Supported queries: + # 1. "" : Lists all revisions across all blueprints. + # 2. "latest=true" : Lists latest revisions across all blueprints. + # 3. "name=\\{name}" : Lists all revisions of blueprint with name + # \\{name}. + # 4. "name=\\{name} latest=true": Lists latest revision of blueprint with name + # \\{name} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of blueprints revisions to return per page. + # max page size = 100, default page size = 20. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The page token, received from a previous search call. + # It can be provided to retrieve the subsequent page. + class SearchBlueprintRevisionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response object for `SearchBlueprintRevisions`. + # @!attribute [rw] blueprints + # @return [::Array<::Google::Cloud::TelcoAutomation::V1::Blueprint>] + # The list of requested blueprint revisions. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class SearchBlueprintRevisionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `DiscardBlueprintChanges`. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the blueprint of which changes are being discarded. + class DiscardBlueprintChangesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response object for `DiscardBlueprintChanges`. + class DiscardBlueprintChangesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `ListPublicBlueprints`. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value of public blueprint. + # Format should be - + # "projects/\\{project_id}/locations/\\{location_name}". + # @!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. + class ListPublicBlueprintsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response object for `ListPublicBlueprints`. + # @!attribute [rw] public_blueprints + # @return [::Array<::Google::Cloud::TelcoAutomation::V1::PublicBlueprint>] + # The list of public blueprints to return. + # @!attribute [r] next_page_token + # @return [::String] + # Output only. A token identifying a page of results the server should + # return. + class ListPublicBlueprintsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `GetPublicBlueprint`. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the public blueprint. + class GetPublicBlueprintRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `CreateDeployment`. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of parent resource. + # Format should be - + # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". + # @!attribute [rw] deployment_id + # @return [::String] + # Optional. The name of the deployment. + # @!attribute [rw] deployment + # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] + # Required. The `Deployment` to create. + class CreateDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `UpdateDeployment`. + # @!attribute [rw] deployment + # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] + # Required. The `deployment` to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Update mask is used to specify the fields to be overwritten in + # the `deployment` resource by the update. + class UpdateDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `GetDeployment`. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the deployment. + # Case 1: If the name provided in the request is + # \\{deployment_id}@\\{revision_id}, then the revision with revision_id will be + # returned. + # Case 2: If the name provided in the request is \\{deployment}, then + # the current state of the deployment is returned. + # @!attribute [rw] view + # @return [::Google::Cloud::TelcoAutomation::V1::DeploymentView] + # Optional. Defines the type of view of the deployment. + # When field is not present VIEW_BASIC is considered as default. + class GetDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `RemoveDeployment`. + # @!attribute [rw] name + # @return [::String] + # Required. The name of deployment to initiate delete. + class RemoveDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `ListDeployments`. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of parent orchestration cluster resource. + # Format should be - + # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering only supports equality on deployment state. + # It should be in the form: "state = DRAFT". `OR` operator can be used to + # get response for multiple states. e.g. "state = DRAFT OR state = APPLIED". + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of deployments to return per page. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The page token, received from a previous ListDeployments call. + # It can be provided to retrieve the subsequent page. + class ListDeploymentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response object for `ListDeployments`. + # @!attribute [rw] deployments + # @return [::Array<::Google::Cloud::TelcoAutomation::V1::Deployment>] + # The list of requested deployments. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListDeploymentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for listing all revisions of a deployment. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the deployment to list revisions for. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of revisions to return per page. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The page token, received from a previous ListDeploymentRevisions + # call Provide this to retrieve the subsequent page. + class ListDeploymentRevisionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List of deployment revisions for a given deployment. + # @!attribute [rw] deployments + # @return [::Array<::Google::Cloud::TelcoAutomation::V1::Deployment>] + # The revisions of the deployment. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListDeploymentRevisionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `SearchDeploymentRevisions`. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of parent orchestration cluster resource. + # Format should be - + # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". + # @!attribute [rw] query + # @return [::String] + # Required. Supported queries: + # 1. "" : Lists all revisions across all deployments. + # 2. "latest=true" : Lists latest revisions across all + # deployments. + # 3. "name=\\{name}" : Lists all revisions of deployment with name + # \\{name}. + # 4. "name=\\{name} latest=true": Lists latest revision of deployment with name + # \\{name} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of deployment revisions to return per page. + # max page size = 100, default page size = 20. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The page token, received from a previous search call. + # It can be provided to retrieve the subsequent page. + class SearchDeploymentRevisionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response object for `SearchDeploymentRevisions`. + # @!attribute [rw] deployments + # @return [::Array<::Google::Cloud::TelcoAutomation::V1::Deployment>] + # The list of requested deployment revisions. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class SearchDeploymentRevisionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `DiscardDeploymentChanges`. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the deployment of which changes are being discarded. + class DiscardDeploymentChangesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response object for `DiscardDeploymentChanges`. + class DiscardDeploymentChangesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `ApplyDeployment`. The resources in given deployment + # gets applied to Orchestration Cluster. A new revision is created when a + # deployment is applied. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the deployment to apply to orchestration cluster. + class ApplyDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `ComputeDeploymentStatus`. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the deployment without revisionID. + class ComputeDeploymentStatusRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response object for `ComputeDeploymentStatus`. + # @!attribute [rw] name + # @return [::String] + # The name of the deployment. + # @!attribute [r] aggregated_status + # @return [::Google::Cloud::TelcoAutomation::V1::Status] + # Output only. Aggregated status of a deployment. + # @!attribute [r] resource_statuses + # @return [::Array<::Google::Cloud::TelcoAutomation::V1::ResourceStatus>] + # Output only. Resource level status details in deployments. + class ComputeDeploymentStatusResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `RollbackDeployment`. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the deployment. + # @!attribute [rw] revision_id + # @return [::String] + # Required. The revision id of deployment to roll back to. + class RollbackDeploymentRequest + 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 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 + + # Request object for `GetHydratedDeployment`. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the hydrated deployment. + class GetHydratedDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `ListHydratedDeployments`. + # @!attribute [rw] parent + # @return [::String] + # Required. The deployment managing the hydrated deployments. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of hydrated deployments to return. The service + # may return fewer than this value. If unspecified, at most 50 hydrated + # deployments will be returned. The maximum value is 1000. Values above 1000 + # will be set to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The page token, received from a previous ListHydratedDeployments + # call. Provide this to retrieve the subsequent page. + class ListHydratedDeploymentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response object for `ListHydratedDeployments`. + # @!attribute [rw] hydrated_deployments + # @return [::Array<::Google::Cloud::TelcoAutomation::V1::HydratedDeployment>] + # The list of hydrated deployments. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListHydratedDeploymentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request object for `UpdateHydratedDeployment`. + # @!attribute [rw] hydrated_deployment + # @return [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] + # Required. The hydrated deployment to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to update. Update mask supports a special + # value `*` which fully replaces (equivalent to PUT) the resource provided. + class UpdateHydratedDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for applying a hydrated deployment. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the hydrated deployment to apply. + class ApplyHydratedDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration of the cluster management + # @!attribute [rw] standard_management_config + # @return [::Google::Cloud::TelcoAutomation::V1::StandardManagementConfig] + # Configuration of the standard (GKE) cluster management + # + # Note: The following fields are mutually exclusive: `standard_management_config`, `full_management_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] full_management_config + # @return [::Google::Cloud::TelcoAutomation::V1::FullManagementConfig] + # Configuration of the full (Autopilot) cluster management. Full cluster + # management is a preview feature. + # + # Note: The following fields are mutually exclusive: `full_management_config`, `standard_management_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ManagementConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration of the standard (GKE) cluster management. + # @!attribute [rw] network + # @return [::String] + # Optional. Name of the VPC Network to put the GKE cluster and nodes in. The + # VPC will be created if it doesn't exist. + # @!attribute [rw] subnet + # @return [::String] + # Optional. Specifies the subnet that the interface will be part of. Network + # key must be specified and the subnet must be a subnetwork of the specified + # network. + # @!attribute [rw] master_ipv4_cidr_block + # @return [::String] + # Optional. The /28 network that the masters will use. It should be free + # within the network. + # @!attribute [rw] cluster_cidr_block + # @return [::String] + # Optional. The IP address range for the cluster pod IPs. Set to blank to + # have a range chosen with the default size. Set to /netmask (e.g. /14) to + # have a range chosen with a specific netmask. Set to a CIDR notation + # (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + # 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + # @!attribute [rw] services_cidr_block + # @return [::String] + # Optional. The IP address range for the cluster service IPs. Set to blank to + # have a range chosen with the default size. Set to /netmask (e.g. /14) to + # have a range chosen with a specific netmask. Set to a CIDR notation (e.g. + # 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + # 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + # @!attribute [rw] cluster_named_range + # @return [::String] + # Optional. The name of the existing secondary range in the cluster's + # subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block + # can be used to automatically create a GKE-managed one. + # @!attribute [rw] services_named_range + # @return [::String] + # Optional. The name of the existing secondary range in the cluster's + # subnetwork to use for service ClusterIPs. Alternatively, + # services_cidr_block can be used to automatically create a GKE-managed one. + # @!attribute [rw] master_authorized_networks_config + # @return [::Google::Cloud::TelcoAutomation::V1::MasterAuthorizedNetworksConfig] + # Optional. Master Authorized Network that supports multiple CIDR blocks. + # Allows access to the k8s master from multiple blocks. It cannot be set at + # the same time with the field man_block. + class StandardManagementConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration of the full (Autopilot) cluster management + # @!attribute [rw] network + # @return [::String] + # Optional. Name of the VPC Network to put the GKE cluster and nodes in. The + # VPC will be created if it doesn't exist. + # @!attribute [rw] subnet + # @return [::String] + # Optional. Specifies the subnet that the interface will be part of. Network + # key must be specified and the subnet must be a subnetwork of the specified + # network. + # @!attribute [rw] master_ipv4_cidr_block + # @return [::String] + # Optional. The /28 network that the masters will use. + # @!attribute [rw] cluster_cidr_block + # @return [::String] + # Optional. The IP address range for the cluster pod IPs. Set to blank to + # have a range chosen with the default size. Set to /netmask (e.g. /14) to + # have a range chosen with a specific netmask. Set to a CIDR notation + # (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + # 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + # @!attribute [rw] services_cidr_block + # @return [::String] + # Optional. The IP address range for the cluster service IPs. Set to blank to + # have a range chosen with the default size. Set to /netmask (e.g. /14) to + # have a range chosen with a specific netmask. Set to a CIDR notation (e.g. + # 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + # 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + # @!attribute [rw] cluster_named_range + # @return [::String] + # Optional. The name of the existing secondary range in the cluster's + # subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block + # can be used to automatically create a GKE-managed one. + # @!attribute [rw] services_named_range + # @return [::String] + # Optional. The name of the existing secondary range in the cluster's + # subnetwork to use for service ClusterIPs. Alternatively, + # services_cidr_block can be used to automatically create a GKE-managed one. + # @!attribute [rw] master_authorized_networks_config + # @return [::Google::Cloud::TelcoAutomation::V1::MasterAuthorizedNetworksConfig] + # Optional. Master Authorized Network that supports multiple CIDR blocks. + # Allows access to the k8s master from multiple blocks. It cannot be set at + # the same time with the field man_block. + class FullManagementConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration of the Master Authorized Network that support multiple CIDRs + # @!attribute [rw] cidr_blocks + # @return [::Array<::Google::Cloud::TelcoAutomation::V1::MasterAuthorizedNetworksConfig::CidrBlock>] + # Optional. cidr_blocks define up to 50 external networks that could access + # Kubernetes master through HTTPS. + class MasterAuthorizedNetworksConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # CidrBlock contains an optional name and one CIDR block. + # @!attribute [rw] display_name + # @return [::String] + # Optional. display_name is an optional field for users to identify CIDR + # blocks. + # @!attribute [rw] cidr_block + # @return [::String] + # Optional. cidr_block must be specified in CIDR notation when using + # master_authorized_networks_config. Currently, the user could still use + # the deprecated man_block field, so this field is currently optional, but + # will be required in the future. + class CidrBlock + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # File represents a yaml file present in a blueprint's package. + # @!attribute [rw] path + # @return [::String] + # Required. Path of the file in package. + # e.g. `gdce/v1/cluster.yaml` + # @!attribute [rw] content + # @return [::String] + # Optional. The contents of a file in string format. + # @!attribute [rw] deleted + # @return [::Boolean] + # Optional. Signifies whether a file is marked for deletion. + # @!attribute [rw] editable + # @return [::Boolean] + # Optional. Indicates whether changes are allowed to a file. If the field is + # not set, the file cannot be edited. + class File + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Status of a deployment resource. + # @!attribute [rw] name + # @return [::String] + # Name of the resource. + # @!attribute [rw] resource_namespace + # @return [::String] + # Namespace of the resource. + # @!attribute [rw] group + # @return [::String] + # Group to which the resource belongs to. + # @!attribute [rw] version + # @return [::String] + # Version of the resource. + # @!attribute [rw] kind + # @return [::String] + # Kind of the resource. + # @!attribute [r] resource_type + # @return [::Google::Cloud::TelcoAutomation::V1::ResourceType] + # Output only. Resource type. + # @!attribute [r] status + # @return [::Google::Cloud::TelcoAutomation::V1::Status] + # Output only. Status of the resource. + # @!attribute [r] nf_deploy_status + # @return [::Google::Cloud::TelcoAutomation::V1::NFDeployStatus] + # Output only. Detailed status of NFDeploy. + class ResourceStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Deployment status of NFDeploy. + # @!attribute [r] targeted_nfs + # @return [::Integer] + # Output only. Total number of NFs targeted by this deployment + # @!attribute [r] ready_nfs + # @return [::Integer] + # Output only. Total number of NFs targeted by this deployment with a Ready + # Condition set. + # @!attribute [r] sites + # @return [::Array<::Google::Cloud::TelcoAutomation::V1::NFDeploySiteStatus>] + # Output only. Per-Site Status. + class NFDeployStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Per-Site Status. + # @!attribute [r] site + # @return [::String] + # Output only. Site id. + # @!attribute [r] pending_deletion + # @return [::Boolean] + # Output only. If true, the Site Deletion is in progress. + # @!attribute [r] hydration + # @return [::Google::Cloud::TelcoAutomation::V1::HydrationStatus] + # Output only. Hydration status. + # @!attribute [r] workload + # @return [::Google::Cloud::TelcoAutomation::V1::WorkloadStatus] + # Output only. Workload status. + class NFDeploySiteStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Hydration status. + # @!attribute [r] site_version + # @return [::Google::Cloud::TelcoAutomation::V1::SiteVersion] + # Output only. SiteVersion Hydration is targeting. + # @!attribute [r] status + # @return [::String] + # Output only. Status. + class HydrationStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # SiteVersion Hydration is targeting. + # @!attribute [r] nf_vendor + # @return [::String] + # Output only. NF vendor. + # @!attribute [r] nf_type + # @return [::String] + # Output only. NF vendor type. + # @!attribute [r] nf_version + # @return [::String] + # Output only. NF version. + class SiteVersion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Workload status. + # @!attribute [r] site_version + # @return [::Google::Cloud::TelcoAutomation::V1::SiteVersion] + # Output only. SiteVersion running in the workload cluster. + # @!attribute [r] status + # @return [::String] + # Output only. Status. + class WorkloadStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BlueprintView defines the type of view of the blueprint. + module BlueprintView + # Unspecified enum value. + BLUEPRINT_VIEW_UNSPECIFIED = 0 + + # View which only contains metadata. + BLUEPRINT_VIEW_BASIC = 1 + + # View which contains metadata and files it encapsulates. + BLUEPRINT_VIEW_FULL = 2 + end + + # DeploymentView defines the type of view of the deployment. + module DeploymentView + # Unspecified enum value. + DEPLOYMENT_VIEW_UNSPECIFIED = 0 + + # View which only contains metadata. + DEPLOYMENT_VIEW_BASIC = 1 + + # View which contains metadata and files it encapsulates. + DEPLOYMENT_VIEW_FULL = 2 + end + + # Represent type of CR. + module ResourceType + # Unspecified resource type. + RESOURCE_TYPE_UNSPECIFIED = 0 + + # User specified NF Deploy CR. + NF_DEPLOY_RESOURCE = 1 + + # CRs that are part of a blueprint. + DEPLOYMENT_RESOURCE = 2 + end + + # Status of an entity (resource, deployment). + module Status + # Unknown state. + STATUS_UNSPECIFIED = 0 + + # Under progress. + STATUS_IN_PROGRESS = 1 + + # Running and ready to serve traffic. + STATUS_ACTIVE = 2 + + # Failed or stalled. + STATUS_FAILED = 3 + + # Delete in progress. + STATUS_DELETING = 4 + + # Deleted deployment. + STATUS_DELETED = 5 + + # NFDeploy specific status. Peering in progress. + STATUS_PEERING = 10 + + # K8s objects such as NetworkAttachmentDefinition don't have a defined + # status. + STATUS_NOT_APPLICABLE = 11 + end + + # DeploymentLevel of a blueprint signifies where the blueprint will be + # applied. + module DeploymentLevel + # Default unspecified deployment level. + DEPLOYMENT_LEVEL_UNSPECIFIED = 0 + + # Blueprints at HYDRATION level cannot be used to create a Deployment + # (A user cannot manually initate deployment of these blueprints on + # orchestration or workload cluster). + # These blueprints stay in a user's private catalog and are configured and + # deployed by TNA automation. + HYDRATION = 1 + + # Blueprints at SINGLE_DEPLOYMENT level can be + # a) Modified in private catalog. + # b) Used to create a deployment on orchestration cluster by the user, once + # approved. + SINGLE_DEPLOYMENT = 2 + + # Blueprints at MULTI_DEPLOYMENT level can be + # a) Modified in private catalog. + # b) Used to create a deployment on orchestration cluster which will create + # further hydrated deployments. + MULTI_DEPLOYMENT = 3 + + # Blueprints at WORKLOAD_CLUSTER_DEPLOYMENT level can be + # a) Modified in private catalog. + # b) Used to create a deployment on workload cluster by the user, once + # approved. + WORKLOAD_CLUSTER_DEPLOYMENT = 4 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/Gemfile new file mode 100644 index 000000000000..5dd146715d0e --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1", path: "../" +else + gem "google-cloud-telco_automation-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-telco_automation-v1/snippets/snippet_metadata_google.cloud.telcoautomation.v1.json b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/snippet_metadata_google.cloud.telcoautomation.v1.json new file mode 100644 index 000000000000..7a4dce2494a0 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/snippet_metadata_google.cloud.telcoautomation.v1.json @@ -0,0 +1,1455 @@ +{ + "client_library": { + "name": "google-cloud-telco_automation-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.telcoautomation.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ListOrchestrationClusters_sync", + "title": "Snippet for the list_orchestration_clusters call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_orchestration_clusters.", + "file": "telco_automation/list_orchestration_clusters.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_orchestration_clusters", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_orchestration_clusters", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersResponse", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "ListOrchestrationClusters", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ListOrchestrationClusters", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_GetOrchestrationCluster_sync", + "title": "Snippet for the get_orchestration_cluster call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_orchestration_cluster.", + "file": "telco_automation/get_orchestration_cluster.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_orchestration_cluster", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_orchestration_cluster", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "GetOrchestrationCluster", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.GetOrchestrationCluster", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_CreateOrchestrationCluster_sync", + "title": "Snippet for the create_orchestration_cluster call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#create_orchestration_cluster.", + "file": "telco_automation/create_orchestration_cluster.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_orchestration_cluster", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#create_orchestration_cluster", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "CreateOrchestrationCluster", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.CreateOrchestrationCluster", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_DeleteOrchestrationCluster_sync", + "title": "Snippet for the delete_orchestration_cluster call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#delete_orchestration_cluster.", + "file": "telco_automation/delete_orchestration_cluster.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_orchestration_cluster", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#delete_orchestration_cluster", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "DeleteOrchestrationCluster", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.DeleteOrchestrationCluster", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ListEdgeSlms_sync", + "title": "Snippet for the list_edge_slms call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_edge_slms.", + "file": "telco_automation/list_edge_slms.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_edge_slms", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_edge_slms", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsResponse", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "ListEdgeSlms", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ListEdgeSlms", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_GetEdgeSlm_sync", + "title": "Snippet for the get_edge_slm call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_edge_slm.", + "file": "telco_automation/get_edge_slm.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_edge_slm", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_edge_slm", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::EdgeSlm", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "GetEdgeSlm", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.GetEdgeSlm", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_CreateEdgeSlm_sync", + "title": "Snippet for the create_edge_slm call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#create_edge_slm.", + "file": "telco_automation/create_edge_slm.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_edge_slm", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#create_edge_slm", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "CreateEdgeSlm", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.CreateEdgeSlm", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_DeleteEdgeSlm_sync", + "title": "Snippet for the delete_edge_slm call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#delete_edge_slm.", + "file": "telco_automation/delete_edge_slm.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_edge_slm", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#delete_edge_slm", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "DeleteEdgeSlm", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.DeleteEdgeSlm", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_CreateBlueprint_sync", + "title": "Snippet for the create_blueprint call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#create_blueprint.", + "file": "telco_automation/create_blueprint.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_blueprint", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#create_blueprint", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::Blueprint", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "CreateBlueprint", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.CreateBlueprint", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_UpdateBlueprint_sync", + "title": "Snippet for the update_blueprint call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#update_blueprint.", + "file": "telco_automation/update_blueprint.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_blueprint", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#update_blueprint", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::Blueprint", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "UpdateBlueprint", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.UpdateBlueprint", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_GetBlueprint_sync", + "title": "Snippet for the get_blueprint call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_blueprint.", + "file": "telco_automation/get_blueprint.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_blueprint", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_blueprint", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::Blueprint", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "GetBlueprint", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.GetBlueprint", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_DeleteBlueprint_sync", + "title": "Snippet for the delete_blueprint call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#delete_blueprint.", + "file": "telco_automation/delete_blueprint.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_blueprint", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#delete_blueprint", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "DeleteBlueprint", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.DeleteBlueprint", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ListBlueprints_sync", + "title": "Snippet for the list_blueprints call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_blueprints.", + "file": "telco_automation/list_blueprints.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_blueprints", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_blueprints", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::ListBlueprintsResponse", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "ListBlueprints", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ListBlueprints", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ApproveBlueprint_sync", + "title": "Snippet for the approve_blueprint call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#approve_blueprint.", + "file": "telco_automation/approve_blueprint.rb", + "language": "RUBY", + "client_method": { + "short_name": "approve_blueprint", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#approve_blueprint", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::Blueprint", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "ApproveBlueprint", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ApproveBlueprint", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ProposeBlueprint_sync", + "title": "Snippet for the propose_blueprint call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#propose_blueprint.", + "file": "telco_automation/propose_blueprint.rb", + "language": "RUBY", + "client_method": { + "short_name": "propose_blueprint", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#propose_blueprint", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::Blueprint", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "ProposeBlueprint", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ProposeBlueprint", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_RejectBlueprint_sync", + "title": "Snippet for the reject_blueprint call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#reject_blueprint.", + "file": "telco_automation/reject_blueprint.rb", + "language": "RUBY", + "client_method": { + "short_name": "reject_blueprint", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#reject_blueprint", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::Blueprint", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "RejectBlueprint", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.RejectBlueprint", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ListBlueprintRevisions_sync", + "title": "Snippet for the list_blueprint_revisions call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_blueprint_revisions.", + "file": "telco_automation/list_blueprint_revisions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_blueprint_revisions", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_blueprint_revisions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsResponse", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "ListBlueprintRevisions", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ListBlueprintRevisions", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_SearchBlueprintRevisions_sync", + "title": "Snippet for the search_blueprint_revisions call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#search_blueprint_revisions.", + "file": "telco_automation/search_blueprint_revisions.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_blueprint_revisions", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#search_blueprint_revisions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsResponse", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "SearchBlueprintRevisions", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.SearchBlueprintRevisions", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_SearchDeploymentRevisions_sync", + "title": "Snippet for the search_deployment_revisions call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#search_deployment_revisions.", + "file": "telco_automation/search_deployment_revisions.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_deployment_revisions", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#search_deployment_revisions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsResponse", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "SearchDeploymentRevisions", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.SearchDeploymentRevisions", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_DiscardBlueprintChanges_sync", + "title": "Snippet for the discard_blueprint_changes call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#discard_blueprint_changes.", + "file": "telco_automation/discard_blueprint_changes.rb", + "language": "RUBY", + "client_method": { + "short_name": "discard_blueprint_changes", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#discard_blueprint_changes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "DiscardBlueprintChanges", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.DiscardBlueprintChanges", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ListPublicBlueprints_sync", + "title": "Snippet for the list_public_blueprints call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_public_blueprints.", + "file": "telco_automation/list_public_blueprints.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_public_blueprints", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_public_blueprints", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsResponse", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "ListPublicBlueprints", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ListPublicBlueprints", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_GetPublicBlueprint_sync", + "title": "Snippet for the get_public_blueprint call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_public_blueprint.", + "file": "telco_automation/get_public_blueprint.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_public_blueprint", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_public_blueprint", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::PublicBlueprint", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "GetPublicBlueprint", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.GetPublicBlueprint", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_CreateDeployment_sync", + "title": "Snippet for the create_deployment call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#create_deployment.", + "file": "telco_automation/create_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_deployment", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#create_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::Deployment", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "CreateDeployment", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.CreateDeployment", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_UpdateDeployment_sync", + "title": "Snippet for the update_deployment call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#update_deployment.", + "file": "telco_automation/update_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_deployment", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#update_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::Deployment", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "UpdateDeployment", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.UpdateDeployment", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_GetDeployment_sync", + "title": "Snippet for the get_deployment call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_deployment.", + "file": "telco_automation/get_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_deployment", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::Deployment", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "GetDeployment", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.GetDeployment", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_RemoveDeployment_sync", + "title": "Snippet for the remove_deployment call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#remove_deployment.", + "file": "telco_automation/remove_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "remove_deployment", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#remove_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "RemoveDeployment", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.RemoveDeployment", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ListDeployments_sync", + "title": "Snippet for the list_deployments call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_deployments.", + "file": "telco_automation/list_deployments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_deployments", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_deployments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::ListDeploymentsResponse", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "ListDeployments", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ListDeployments", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ListDeploymentRevisions_sync", + "title": "Snippet for the list_deployment_revisions call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_deployment_revisions.", + "file": "telco_automation/list_deployment_revisions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_deployment_revisions", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_deployment_revisions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsResponse", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "ListDeploymentRevisions", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ListDeploymentRevisions", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_DiscardDeploymentChanges_sync", + "title": "Snippet for the discard_deployment_changes call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#discard_deployment_changes.", + "file": "telco_automation/discard_deployment_changes.rb", + "language": "RUBY", + "client_method": { + "short_name": "discard_deployment_changes", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#discard_deployment_changes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "DiscardDeploymentChanges", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.DiscardDeploymentChanges", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ApplyDeployment_sync", + "title": "Snippet for the apply_deployment call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#apply_deployment.", + "file": "telco_automation/apply_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "apply_deployment", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#apply_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::Deployment", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "ApplyDeployment", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ApplyDeployment", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ComputeDeploymentStatus_sync", + "title": "Snippet for the compute_deployment_status call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#compute_deployment_status.", + "file": "telco_automation/compute_deployment_status.rb", + "language": "RUBY", + "client_method": { + "short_name": "compute_deployment_status", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#compute_deployment_status", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "ComputeDeploymentStatus", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ComputeDeploymentStatus", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_RollbackDeployment_sync", + "title": "Snippet for the rollback_deployment call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#rollback_deployment.", + "file": "telco_automation/rollback_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "rollback_deployment", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#rollback_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::Deployment", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "RollbackDeployment", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.RollbackDeployment", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_GetHydratedDeployment_sync", + "title": "Snippet for the get_hydrated_deployment call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_hydrated_deployment.", + "file": "telco_automation/get_hydrated_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_hydrated_deployment", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_hydrated_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::HydratedDeployment", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "GetHydratedDeployment", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.GetHydratedDeployment", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ListHydratedDeployments_sync", + "title": "Snippet for the list_hydrated_deployments call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_hydrated_deployments.", + "file": "telco_automation/list_hydrated_deployments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_hydrated_deployments", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_hydrated_deployments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsResponse", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "ListHydratedDeployments", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ListHydratedDeployments", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_UpdateHydratedDeployment_sync", + "title": "Snippet for the update_hydrated_deployment call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#update_hydrated_deployment.", + "file": "telco_automation/update_hydrated_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_hydrated_deployment", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#update_hydrated_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::HydratedDeployment", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "UpdateHydratedDeployment", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.UpdateHydratedDeployment", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ApplyHydratedDeployment_sync", + "title": "Snippet for the apply_hydrated_deployment call in the TelcoAutomation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#apply_hydrated_deployment.", + "file": "telco_automation/apply_hydrated_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "apply_hydrated_deployment", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#apply_hydrated_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TelcoAutomation::V1::HydratedDeployment", + "client": { + "short_name": "TelcoAutomation::Client", + "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" + }, + "method": { + "short_name": "ApplyHydratedDeployment", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ApplyHydratedDeployment", + "service": { + "short_name": "TelcoAutomation", + "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" + } + } + }, + "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-telco_automation-v1/snippets/telco_automation/apply_deployment.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/apply_deployment.rb new file mode 100644 index 000000000000..6ef9fad80a28 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/apply_deployment.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 telcoautomation_v1_generated_TelcoAutomation_ApplyDeployment_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the apply_deployment call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#apply_deployment. +# +def apply_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest.new + + # Call the apply_deployment method. + result = client.apply_deployment request + + # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. + p result +end +# [END telcoautomation_v1_generated_TelcoAutomation_ApplyDeployment_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/apply_hydrated_deployment.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/apply_hydrated_deployment.rb new file mode 100644 index 000000000000..2b072dc5c67e --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/apply_hydrated_deployment.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 telcoautomation_v1_generated_TelcoAutomation_ApplyHydratedDeployment_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the apply_hydrated_deployment call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#apply_hydrated_deployment. +# +def apply_hydrated_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest.new + + # Call the apply_hydrated_deployment method. + result = client.apply_hydrated_deployment request + + # The returned object is of type Google::Cloud::TelcoAutomation::V1::HydratedDeployment. + p result +end +# [END telcoautomation_v1_generated_TelcoAutomation_ApplyHydratedDeployment_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/approve_blueprint.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/approve_blueprint.rb new file mode 100644 index 000000000000..f575adec66b0 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/approve_blueprint.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 telcoautomation_v1_generated_TelcoAutomation_ApproveBlueprint_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the approve_blueprint call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#approve_blueprint. +# +def approve_blueprint + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest.new + + # Call the approve_blueprint method. + result = client.approve_blueprint request + + # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. + p result +end +# [END telcoautomation_v1_generated_TelcoAutomation_ApproveBlueprint_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/compute_deployment_status.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/compute_deployment_status.rb new file mode 100644 index 000000000000..649e4df861e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/compute_deployment_status.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 telcoautomation_v1_generated_TelcoAutomation_ComputeDeploymentStatus_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the compute_deployment_status call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#compute_deployment_status. +# +def compute_deployment_status + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest.new + + # Call the compute_deployment_status method. + result = client.compute_deployment_status request + + # The returned object is of type Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse. + p result +end +# [END telcoautomation_v1_generated_TelcoAutomation_ComputeDeploymentStatus_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_blueprint.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_blueprint.rb new file mode 100644 index 000000000000..fb48fce111ce --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_blueprint.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 telcoautomation_v1_generated_TelcoAutomation_CreateBlueprint_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the create_blueprint call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#create_blueprint. +# +def create_blueprint + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest.new + + # Call the create_blueprint method. + result = client.create_blueprint request + + # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. + p result +end +# [END telcoautomation_v1_generated_TelcoAutomation_CreateBlueprint_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_deployment.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_deployment.rb new file mode 100644 index 000000000000..50957be164fc --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_deployment.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 telcoautomation_v1_generated_TelcoAutomation_CreateDeployment_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the create_deployment call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#create_deployment. +# +def create_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest.new + + # Call the create_deployment method. + result = client.create_deployment request + + # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. + p result +end +# [END telcoautomation_v1_generated_TelcoAutomation_CreateDeployment_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_edge_slm.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_edge_slm.rb new file mode 100644 index 000000000000..09483c7f6561 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_edge_slm.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 telcoautomation_v1_generated_TelcoAutomation_CreateEdgeSlm_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the create_edge_slm call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#create_edge_slm. +# +def create_edge_slm + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest.new + + # Call the create_edge_slm method. + result = client.create_edge_slm request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END telcoautomation_v1_generated_TelcoAutomation_CreateEdgeSlm_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_orchestration_cluster.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_orchestration_cluster.rb new file mode 100644 index 000000000000..9e819520ccbe --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_orchestration_cluster.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 telcoautomation_v1_generated_TelcoAutomation_CreateOrchestrationCluster_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the create_orchestration_cluster call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#create_orchestration_cluster. +# +def create_orchestration_cluster + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest.new + + # Call the create_orchestration_cluster method. + result = client.create_orchestration_cluster request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END telcoautomation_v1_generated_TelcoAutomation_CreateOrchestrationCluster_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/delete_blueprint.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/delete_blueprint.rb new file mode 100644 index 000000000000..7d2053f3fbe9 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/delete_blueprint.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 telcoautomation_v1_generated_TelcoAutomation_DeleteBlueprint_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the delete_blueprint call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#delete_blueprint. +# +def delete_blueprint + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest.new + + # Call the delete_blueprint method. + result = client.delete_blueprint request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END telcoautomation_v1_generated_TelcoAutomation_DeleteBlueprint_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/delete_edge_slm.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/delete_edge_slm.rb new file mode 100644 index 000000000000..3c881a5faac3 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/delete_edge_slm.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 telcoautomation_v1_generated_TelcoAutomation_DeleteEdgeSlm_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the delete_edge_slm call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#delete_edge_slm. +# +def delete_edge_slm + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest.new + + # Call the delete_edge_slm method. + result = client.delete_edge_slm request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END telcoautomation_v1_generated_TelcoAutomation_DeleteEdgeSlm_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/delete_orchestration_cluster.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/delete_orchestration_cluster.rb new file mode 100644 index 000000000000..ec4c90ef42c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/delete_orchestration_cluster.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 telcoautomation_v1_generated_TelcoAutomation_DeleteOrchestrationCluster_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the delete_orchestration_cluster call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#delete_orchestration_cluster. +# +def delete_orchestration_cluster + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest.new + + # Call the delete_orchestration_cluster method. + result = client.delete_orchestration_cluster request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END telcoautomation_v1_generated_TelcoAutomation_DeleteOrchestrationCluster_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/discard_blueprint_changes.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/discard_blueprint_changes.rb new file mode 100644 index 000000000000..7a6b315bbc97 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/discard_blueprint_changes.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 telcoautomation_v1_generated_TelcoAutomation_DiscardBlueprintChanges_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the discard_blueprint_changes call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#discard_blueprint_changes. +# +def discard_blueprint_changes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest.new + + # Call the discard_blueprint_changes method. + result = client.discard_blueprint_changes request + + # The returned object is of type Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse. + p result +end +# [END telcoautomation_v1_generated_TelcoAutomation_DiscardBlueprintChanges_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/discard_deployment_changes.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/discard_deployment_changes.rb new file mode 100644 index 000000000000..4c200c82912b --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/discard_deployment_changes.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 telcoautomation_v1_generated_TelcoAutomation_DiscardDeploymentChanges_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the discard_deployment_changes call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#discard_deployment_changes. +# +def discard_deployment_changes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest.new + + # Call the discard_deployment_changes method. + result = client.discard_deployment_changes request + + # The returned object is of type Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse. + p result +end +# [END telcoautomation_v1_generated_TelcoAutomation_DiscardDeploymentChanges_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_blueprint.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_blueprint.rb new file mode 100644 index 000000000000..f6389e7206c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_blueprint.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 telcoautomation_v1_generated_TelcoAutomation_GetBlueprint_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the get_blueprint call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_blueprint. +# +def get_blueprint + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest.new + + # Call the get_blueprint method. + result = client.get_blueprint request + + # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. + p result +end +# [END telcoautomation_v1_generated_TelcoAutomation_GetBlueprint_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_deployment.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_deployment.rb new file mode 100644 index 000000000000..d7affc180770 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_deployment.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 telcoautomation_v1_generated_TelcoAutomation_GetDeployment_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the get_deployment call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_deployment. +# +def get_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest.new + + # Call the get_deployment method. + result = client.get_deployment request + + # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. + p result +end +# [END telcoautomation_v1_generated_TelcoAutomation_GetDeployment_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_edge_slm.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_edge_slm.rb new file mode 100644 index 000000000000..028ca2b921b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_edge_slm.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 telcoautomation_v1_generated_TelcoAutomation_GetEdgeSlm_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the get_edge_slm call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_edge_slm. +# +def get_edge_slm + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest.new + + # Call the get_edge_slm method. + result = client.get_edge_slm request + + # The returned object is of type Google::Cloud::TelcoAutomation::V1::EdgeSlm. + p result +end +# [END telcoautomation_v1_generated_TelcoAutomation_GetEdgeSlm_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_hydrated_deployment.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_hydrated_deployment.rb new file mode 100644 index 000000000000..e0fd8ecf6de2 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_hydrated_deployment.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 telcoautomation_v1_generated_TelcoAutomation_GetHydratedDeployment_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the get_hydrated_deployment call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_hydrated_deployment. +# +def get_hydrated_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest.new + + # Call the get_hydrated_deployment method. + result = client.get_hydrated_deployment request + + # The returned object is of type Google::Cloud::TelcoAutomation::V1::HydratedDeployment. + p result +end +# [END telcoautomation_v1_generated_TelcoAutomation_GetHydratedDeployment_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_orchestration_cluster.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_orchestration_cluster.rb new file mode 100644 index 000000000000..868d0765f0e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_orchestration_cluster.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 telcoautomation_v1_generated_TelcoAutomation_GetOrchestrationCluster_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the get_orchestration_cluster call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_orchestration_cluster. +# +def get_orchestration_cluster + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest.new + + # Call the get_orchestration_cluster method. + result = client.get_orchestration_cluster request + + # The returned object is of type Google::Cloud::TelcoAutomation::V1::OrchestrationCluster. + p result +end +# [END telcoautomation_v1_generated_TelcoAutomation_GetOrchestrationCluster_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_public_blueprint.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_public_blueprint.rb new file mode 100644 index 000000000000..042660f4b4e8 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_public_blueprint.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 telcoautomation_v1_generated_TelcoAutomation_GetPublicBlueprint_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the get_public_blueprint call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_public_blueprint. +# +def get_public_blueprint + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest.new + + # Call the get_public_blueprint method. + result = client.get_public_blueprint request + + # The returned object is of type Google::Cloud::TelcoAutomation::V1::PublicBlueprint. + p result +end +# [END telcoautomation_v1_generated_TelcoAutomation_GetPublicBlueprint_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_blueprint_revisions.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_blueprint_revisions.rb new file mode 100644 index 000000000000..6d392a9c3b56 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_blueprint_revisions.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 telcoautomation_v1_generated_TelcoAutomation_ListBlueprintRevisions_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the list_blueprint_revisions call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_blueprint_revisions. +# +def list_blueprint_revisions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest.new + + # Call the list_blueprint_revisions method. + result = client.list_blueprint_revisions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Blueprint. + p item + end +end +# [END telcoautomation_v1_generated_TelcoAutomation_ListBlueprintRevisions_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_blueprints.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_blueprints.rb new file mode 100644 index 000000000000..3c3110dd1491 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_blueprints.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 telcoautomation_v1_generated_TelcoAutomation_ListBlueprints_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the list_blueprints call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_blueprints. +# +def list_blueprints + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest.new + + # Call the list_blueprints method. + result = client.list_blueprints request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Blueprint. + p item + end +end +# [END telcoautomation_v1_generated_TelcoAutomation_ListBlueprints_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_deployment_revisions.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_deployment_revisions.rb new file mode 100644 index 000000000000..8135cf5b7fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_deployment_revisions.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 telcoautomation_v1_generated_TelcoAutomation_ListDeploymentRevisions_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the list_deployment_revisions call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_deployment_revisions. +# +def list_deployment_revisions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest.new + + # Call the list_deployment_revisions method. + result = client.list_deployment_revisions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Deployment. + p item + end +end +# [END telcoautomation_v1_generated_TelcoAutomation_ListDeploymentRevisions_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_deployments.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_deployments.rb new file mode 100644 index 000000000000..4c263b609502 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_deployments.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 telcoautomation_v1_generated_TelcoAutomation_ListDeployments_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the list_deployments call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_deployments. +# +def list_deployments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest.new + + # Call the list_deployments method. + result = client.list_deployments request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Deployment. + p item + end +end +# [END telcoautomation_v1_generated_TelcoAutomation_ListDeployments_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_edge_slms.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_edge_slms.rb new file mode 100644 index 000000000000..764597f3e805 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_edge_slms.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 telcoautomation_v1_generated_TelcoAutomation_ListEdgeSlms_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the list_edge_slms call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_edge_slms. +# +def list_edge_slms + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest.new + + # Call the list_edge_slms method. + result = client.list_edge_slms request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::TelcoAutomation::V1::EdgeSlm. + p item + end +end +# [END telcoautomation_v1_generated_TelcoAutomation_ListEdgeSlms_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_hydrated_deployments.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_hydrated_deployments.rb new file mode 100644 index 000000000000..5ef1508c264d --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_hydrated_deployments.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 telcoautomation_v1_generated_TelcoAutomation_ListHydratedDeployments_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the list_hydrated_deployments call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_hydrated_deployments. +# +def list_hydrated_deployments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest.new + + # Call the list_hydrated_deployments method. + result = client.list_hydrated_deployments request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment. + p item + end +end +# [END telcoautomation_v1_generated_TelcoAutomation_ListHydratedDeployments_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_orchestration_clusters.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_orchestration_clusters.rb new file mode 100644 index 000000000000..8843a3d25975 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_orchestration_clusters.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 telcoautomation_v1_generated_TelcoAutomation_ListOrchestrationClusters_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the list_orchestration_clusters call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_orchestration_clusters. +# +def list_orchestration_clusters + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest.new + + # Call the list_orchestration_clusters method. + result = client.list_orchestration_clusters request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster. + p item + end +end +# [END telcoautomation_v1_generated_TelcoAutomation_ListOrchestrationClusters_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_public_blueprints.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_public_blueprints.rb new file mode 100644 index 000000000000..e1b5503b4efd --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_public_blueprints.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 telcoautomation_v1_generated_TelcoAutomation_ListPublicBlueprints_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the list_public_blueprints call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_public_blueprints. +# +def list_public_blueprints + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest.new + + # Call the list_public_blueprints method. + result = client.list_public_blueprints request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::TelcoAutomation::V1::PublicBlueprint. + p item + end +end +# [END telcoautomation_v1_generated_TelcoAutomation_ListPublicBlueprints_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/propose_blueprint.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/propose_blueprint.rb new file mode 100644 index 000000000000..b7ec509c5f02 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/propose_blueprint.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 telcoautomation_v1_generated_TelcoAutomation_ProposeBlueprint_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the propose_blueprint call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#propose_blueprint. +# +def propose_blueprint + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest.new + + # Call the propose_blueprint method. + result = client.propose_blueprint request + + # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. + p result +end +# [END telcoautomation_v1_generated_TelcoAutomation_ProposeBlueprint_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/reject_blueprint.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/reject_blueprint.rb new file mode 100644 index 000000000000..75a4ea6ea8af --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/reject_blueprint.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 telcoautomation_v1_generated_TelcoAutomation_RejectBlueprint_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the reject_blueprint call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#reject_blueprint. +# +def reject_blueprint + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest.new + + # Call the reject_blueprint method. + result = client.reject_blueprint request + + # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. + p result +end +# [END telcoautomation_v1_generated_TelcoAutomation_RejectBlueprint_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/remove_deployment.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/remove_deployment.rb new file mode 100644 index 000000000000..bb2d2295d142 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/remove_deployment.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 telcoautomation_v1_generated_TelcoAutomation_RemoveDeployment_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the remove_deployment call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#remove_deployment. +# +def remove_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest.new + + # Call the remove_deployment method. + result = client.remove_deployment request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END telcoautomation_v1_generated_TelcoAutomation_RemoveDeployment_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/rollback_deployment.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/rollback_deployment.rb new file mode 100644 index 000000000000..b8ca6cdd4e1e --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/rollback_deployment.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 telcoautomation_v1_generated_TelcoAutomation_RollbackDeployment_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the rollback_deployment call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#rollback_deployment. +# +def rollback_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest.new + + # Call the rollback_deployment method. + result = client.rollback_deployment request + + # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. + p result +end +# [END telcoautomation_v1_generated_TelcoAutomation_RollbackDeployment_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/search_blueprint_revisions.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/search_blueprint_revisions.rb new file mode 100644 index 000000000000..decfa6d9bc27 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/search_blueprint_revisions.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 telcoautomation_v1_generated_TelcoAutomation_SearchBlueprintRevisions_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the search_blueprint_revisions call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#search_blueprint_revisions. +# +def search_blueprint_revisions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest.new + + # Call the search_blueprint_revisions method. + result = client.search_blueprint_revisions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Blueprint. + p item + end +end +# [END telcoautomation_v1_generated_TelcoAutomation_SearchBlueprintRevisions_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/search_deployment_revisions.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/search_deployment_revisions.rb new file mode 100644 index 000000000000..a17c4de2a015 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/search_deployment_revisions.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 telcoautomation_v1_generated_TelcoAutomation_SearchDeploymentRevisions_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the search_deployment_revisions call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#search_deployment_revisions. +# +def search_deployment_revisions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest.new + + # Call the search_deployment_revisions method. + result = client.search_deployment_revisions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Deployment. + p item + end +end +# [END telcoautomation_v1_generated_TelcoAutomation_SearchDeploymentRevisions_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/update_blueprint.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/update_blueprint.rb new file mode 100644 index 000000000000..1281abedf47a --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/update_blueprint.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 telcoautomation_v1_generated_TelcoAutomation_UpdateBlueprint_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the update_blueprint call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#update_blueprint. +# +def update_blueprint + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest.new + + # Call the update_blueprint method. + result = client.update_blueprint request + + # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. + p result +end +# [END telcoautomation_v1_generated_TelcoAutomation_UpdateBlueprint_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/update_deployment.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/update_deployment.rb new file mode 100644 index 000000000000..3baab957f9bb --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/update_deployment.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 telcoautomation_v1_generated_TelcoAutomation_UpdateDeployment_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the update_deployment call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#update_deployment. +# +def update_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest.new + + # Call the update_deployment method. + result = client.update_deployment request + + # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. + p result +end +# [END telcoautomation_v1_generated_TelcoAutomation_UpdateDeployment_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/update_hydrated_deployment.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/update_hydrated_deployment.rb new file mode 100644 index 000000000000..b99b772b91c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/update_hydrated_deployment.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 telcoautomation_v1_generated_TelcoAutomation_UpdateHydratedDeployment_sync] +require "google/cloud/telco_automation/v1" + +## +# Snippet for the update_hydrated_deployment call in the TelcoAutomation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#update_hydrated_deployment. +# +def update_hydrated_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest.new + + # Call the update_hydrated_deployment method. + result = client.update_hydrated_deployment request + + # The returned object is of type Google::Cloud::TelcoAutomation::V1::HydratedDeployment. + p result +end +# [END telcoautomation_v1_generated_TelcoAutomation_UpdateHydratedDeployment_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_operations_test.rb b/owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_operations_test.rb new file mode 100644 index 000000000000..eedbcf1982df --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_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/telcoautomation/v1/telcoautomation_pb" +require "google/cloud/telcoautomation/v1/telcoautomation_services_pb" +require "google/cloud/telco_automation/v1/telco_automation" + +class ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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::TelcoAutomation::V1::TelcoAutomation::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::TelcoAutomation::V1::TelcoAutomation::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::TelcoAutomation::V1::TelcoAutomation::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::TelcoAutomation::V1::TelcoAutomation::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::TelcoAutomation::V1::TelcoAutomation::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::TelcoAutomation::V1::TelcoAutomation::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::TelcoAutomation::V1::TelcoAutomation::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_paths_test.rb b/owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_paths_test.rb new file mode 100644 index 000000000000..e833fcbea5eb --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_paths_test.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/telco_automation/v1/telco_automation" + +class ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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_blueprint_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.blueprint_path project: "value0", location: "value1", orchestration_cluster: "value2", blueprint: "value3" + assert_equal "projects/value0/locations/value1/orchestrationClusters/value2/blueprints/value3", path + end + end + + def test_deployment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.deployment_path project: "value0", location: "value1", orchestration_cluster: "value2", deployment: "value3" + assert_equal "projects/value0/locations/value1/orchestrationClusters/value2/deployments/value3", path + end + end + + def test_edge_slm_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.edge_slm_path project: "value0", location: "value1", edge_slm: "value2" + assert_equal "projects/value0/locations/value1/edgeSlms/value2", path + end + end + + def test_hydrated_deployment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.hydrated_deployment_path project: "value0", location: "value1", orchestration_cluster: "value2", deployment: "value3", hydrated_deployment: "value4" + assert_equal "projects/value0/locations/value1/orchestrationClusters/value2/deployments/value3/hydratedDeployments/value4", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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_orchestration_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::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.orchestration_cluster_path project: "value0", location: "value1", orchestration_cluster: "value2" + assert_equal "projects/value0/locations/value1/orchestrationClusters/value2", path + end + end + + def test_public_blueprint_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.public_blueprint_path project: "value0", location: "value1", public_lueprint: "value2" + assert_equal "projects/value0/locations/value1/publicBlueprints/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_rest_test.rb b/owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_rest_test.rb new file mode 100644 index 000000000000..dfa385ab3434 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_rest_test.rb @@ -0,0 +1,2089 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/telcoautomation/v1/telcoautomation_pb" +require "google/cloud/telco_automation/v1/telco_automation/rest" + + +class ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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_orchestration_clusters + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersResponse.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_orchestration_clusters_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_list_orchestration_clusters_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_orchestration_clusters_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_orchestration_clusters({ parent: parent, page_size: 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_orchestration_clusters parent: parent, page_size: 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_orchestration_clusters ::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest.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_orchestration_clusters({ parent: parent, page_size: page_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_orchestration_clusters(::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest.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_orchestration_clusters_client_stub.call_count + end + end + end + + def test_get_orchestration_cluster + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_orchestration_cluster_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_get_orchestration_cluster_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_orchestration_cluster_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_orchestration_cluster({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_orchestration_cluster name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_orchestration_cluster ::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_orchestration_cluster({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_orchestration_cluster(::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_orchestration_cluster_client_stub.call_count + end + end + end + + def test_create_orchestration_cluster + # Create test objects. + 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" + orchestration_cluster_id = "hello world" + orchestration_cluster = {} + request_id = "hello world" + + create_orchestration_cluster_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_create_orchestration_cluster_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_orchestration_cluster_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_orchestration_cluster({ parent: parent, orchestration_cluster_id: orchestration_cluster_id, orchestration_cluster: orchestration_cluster, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_orchestration_cluster parent: parent, orchestration_cluster_id: orchestration_cluster_id, orchestration_cluster: orchestration_cluster, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_orchestration_cluster ::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest.new(parent: parent, orchestration_cluster_id: orchestration_cluster_id, orchestration_cluster: orchestration_cluster, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_orchestration_cluster({ parent: parent, orchestration_cluster_id: orchestration_cluster_id, orchestration_cluster: orchestration_cluster, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_orchestration_cluster(::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest.new(parent: parent, orchestration_cluster_id: orchestration_cluster_id, orchestration_cluster: orchestration_cluster, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_orchestration_cluster_client_stub.call_count + end + end + end + + def test_delete_orchestration_cluster + # Create test objects. + 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_orchestration_cluster_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_delete_orchestration_cluster_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_orchestration_cluster_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_orchestration_cluster({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_orchestration_cluster name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_orchestration_cluster ::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest.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_orchestration_cluster({ 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_orchestration_cluster(::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest.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_orchestration_cluster_client_stub.call_count + end + end + end + + def test_list_edge_slms + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsResponse.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_edge_slms_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_list_edge_slms_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_edge_slms_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_edge_slms({ parent: parent, page_size: 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_edge_slms parent: parent, page_size: 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_edge_slms ::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest.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_edge_slms({ parent: parent, page_size: page_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_edge_slms(::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest.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_edge_slms_client_stub.call_count + end + end + end + + def test_get_edge_slm + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::EdgeSlm.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_edge_slm_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_get_edge_slm_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_edge_slm_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_edge_slm({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_edge_slm name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_edge_slm ::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_edge_slm({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_edge_slm(::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_edge_slm_client_stub.call_count + end + end + end + + def test_create_edge_slm + # Create test objects. + 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" + edge_slm_id = "hello world" + edge_slm = {} + request_id = "hello world" + + create_edge_slm_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_create_edge_slm_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_edge_slm_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_edge_slm({ parent: parent, edge_slm_id: edge_slm_id, edge_slm: edge_slm, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_edge_slm parent: parent, edge_slm_id: edge_slm_id, edge_slm: edge_slm, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_edge_slm ::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest.new(parent: parent, edge_slm_id: edge_slm_id, edge_slm: edge_slm, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_edge_slm({ parent: parent, edge_slm_id: edge_slm_id, edge_slm: edge_slm, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_edge_slm(::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest.new(parent: parent, edge_slm_id: edge_slm_id, edge_slm: edge_slm, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_edge_slm_client_stub.call_count + end + end + end + + def test_delete_edge_slm + # Create test objects. + 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_edge_slm_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_delete_edge_slm_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_edge_slm_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_edge_slm({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_edge_slm name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_edge_slm ::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest.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_edge_slm({ 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_edge_slm(::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest.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_edge_slm_client_stub.call_count + end + end + end + + def test_create_blueprint + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::Blueprint.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + blueprint_id = "hello world" + blueprint = {} + + create_blueprint_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_create_blueprint_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_blueprint_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_blueprint({ parent: parent, blueprint_id: blueprint_id, blueprint: blueprint }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_blueprint parent: parent, blueprint_id: blueprint_id, blueprint: blueprint do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_blueprint ::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest.new(parent: parent, blueprint_id: blueprint_id, blueprint: blueprint) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_blueprint({ parent: parent, blueprint_id: blueprint_id, blueprint: blueprint }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_blueprint(::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest.new(parent: parent, blueprint_id: blueprint_id, blueprint: blueprint), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_blueprint_client_stub.call_count + end + end + end + + def test_update_blueprint + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::Blueprint.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + blueprint = {} + update_mask = {} + + update_blueprint_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_update_blueprint_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_blueprint_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_blueprint({ blueprint: blueprint, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_blueprint blueprint: blueprint, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_blueprint ::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest.new(blueprint: blueprint, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_blueprint({ blueprint: blueprint, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_blueprint(::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest.new(blueprint: blueprint, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_blueprint_client_stub.call_count + end + end + end + + def test_get_blueprint + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::Blueprint.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :BLUEPRINT_VIEW_UNSPECIFIED + + get_blueprint_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_get_blueprint_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_blueprint_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_blueprint({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_blueprint name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_blueprint ::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_blueprint({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_blueprint(::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_blueprint_client_stub.call_count + end + end + end + + def test_delete_blueprint + # 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_blueprint_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_delete_blueprint_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_blueprint_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_blueprint({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_blueprint name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_blueprint ::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_blueprint({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_blueprint(::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_blueprint_client_stub.call_count + end + end + end + + def test_list_blueprints + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::ListBlueprintsResponse.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_blueprints_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_list_blueprints_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_blueprints_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_blueprints({ 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_blueprints 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_blueprints ::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest.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_blueprints({ 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_blueprints(::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest.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_blueprints_client_stub.call_count + end + end + end + + def test_approve_blueprint + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::Blueprint.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + approve_blueprint_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_approve_blueprint_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, approve_blueprint_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.approve_blueprint({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.approve_blueprint name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.approve_blueprint ::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.approve_blueprint({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.approve_blueprint(::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, approve_blueprint_client_stub.call_count + end + end + end + + def test_propose_blueprint + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::Blueprint.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + propose_blueprint_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_propose_blueprint_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, propose_blueprint_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.propose_blueprint({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.propose_blueprint name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.propose_blueprint ::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.propose_blueprint({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.propose_blueprint(::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, propose_blueprint_client_stub.call_count + end + end + end + + def test_reject_blueprint + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::Blueprint.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + reject_blueprint_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_reject_blueprint_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, reject_blueprint_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.reject_blueprint({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.reject_blueprint name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.reject_blueprint ::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.reject_blueprint({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.reject_blueprint(::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, reject_blueprint_client_stub.call_count + end + end + end + + def test_list_blueprint_revisions + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + page_size = 42 + page_token = "hello world" + + list_blueprint_revisions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_list_blueprint_revisions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_blueprint_revisions_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_blueprint_revisions({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_blueprint_revisions name: name, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_blueprint_revisions ::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest.new(name: name, 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_blueprint_revisions({ name: name, 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_blueprint_revisions(::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest.new(name: name, 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_blueprint_revisions_client_stub.call_count + end + end + end + + def test_search_blueprint_revisions + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + query = "hello world" + page_size = 42 + page_token = "hello world" + + search_blueprint_revisions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_search_blueprint_revisions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_blueprint_revisions_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.search_blueprint_revisions({ parent: parent, query: query, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.search_blueprint_revisions parent: parent, query: query, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.search_blueprint_revisions ::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest.new(parent: parent, query: query, 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.search_blueprint_revisions({ parent: parent, query: query, 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.search_blueprint_revisions(::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest.new(parent: parent, query: query, 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, search_blueprint_revisions_client_stub.call_count + end + end + end + + def test_search_deployment_revisions + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + query = "hello world" + page_size = 42 + page_token = "hello world" + + search_deployment_revisions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_search_deployment_revisions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_deployment_revisions_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.search_deployment_revisions({ parent: parent, query: query, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.search_deployment_revisions parent: parent, query: query, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.search_deployment_revisions ::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest.new(parent: parent, query: query, 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.search_deployment_revisions({ parent: parent, query: query, 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.search_deployment_revisions(::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest.new(parent: parent, query: query, 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, search_deployment_revisions_client_stub.call_count + end + end + end + + def test_discard_blueprint_changes + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + discard_blueprint_changes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_discard_blueprint_changes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, discard_blueprint_changes_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.discard_blueprint_changes({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.discard_blueprint_changes name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.discard_blueprint_changes ::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.discard_blueprint_changes({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.discard_blueprint_changes(::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, discard_blueprint_changes_client_stub.call_count + end + end + end + + def test_list_public_blueprints + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsResponse.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_public_blueprints_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_list_public_blueprints_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_public_blueprints_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_public_blueprints({ 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_public_blueprints 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_public_blueprints ::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest.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_public_blueprints({ 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_public_blueprints(::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest.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_public_blueprints_client_stub.call_count + end + end + end + + def test_get_public_blueprint + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::PublicBlueprint.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_public_blueprint_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_get_public_blueprint_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_public_blueprint_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_public_blueprint({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_public_blueprint name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_public_blueprint ::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_public_blueprint({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_public_blueprint(::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_public_blueprint_client_stub.call_count + end + end + end + + def test_create_deployment + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::Deployment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + deployment_id = "hello world" + deployment = {} + + create_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_create_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_deployment_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_deployment({ parent: parent, deployment_id: deployment_id, deployment: deployment }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_deployment parent: parent, deployment_id: deployment_id, deployment: deployment do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_deployment ::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest.new(parent: parent, deployment_id: deployment_id, deployment: deployment) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_deployment({ parent: parent, deployment_id: deployment_id, deployment: deployment }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_deployment(::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest.new(parent: parent, deployment_id: deployment_id, deployment: deployment), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_deployment_client_stub.call_count + end + end + end + + def test_update_deployment + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::Deployment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + deployment = {} + update_mask = {} + + update_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_update_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_deployment_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_deployment({ deployment: deployment, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_deployment deployment: deployment, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_deployment ::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest.new(deployment: deployment, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_deployment({ deployment: deployment, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_deployment(::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest.new(deployment: deployment, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_deployment_client_stub.call_count + end + end + end + + def test_get_deployment + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::Deployment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :DEPLOYMENT_VIEW_UNSPECIFIED + + get_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_get_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_deployment_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_deployment({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_deployment name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_deployment ::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_deployment({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_deployment(::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_deployment_client_stub.call_count + end + end + end + + def test_remove_deployment + # 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" + + remove_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_remove_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, remove_deployment_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.remove_deployment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.remove_deployment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.remove_deployment ::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.remove_deployment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.remove_deployment(::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, remove_deployment_client_stub.call_count + end + end + end + + def test_list_deployments + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::ListDeploymentsResponse.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_deployments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_list_deployments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_deployments_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_deployments({ 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_deployments 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_deployments ::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest.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_deployments({ 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_deployments(::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest.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_deployments_client_stub.call_count + end + end + end + + def test_list_deployment_revisions + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + page_size = 42 + page_token = "hello world" + + list_deployment_revisions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_list_deployment_revisions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_deployment_revisions_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_deployment_revisions({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_deployment_revisions name: name, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_deployment_revisions ::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest.new(name: name, 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_deployment_revisions({ name: name, 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_deployment_revisions(::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest.new(name: name, 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_deployment_revisions_client_stub.call_count + end + end + end + + def test_discard_deployment_changes + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + discard_deployment_changes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_discard_deployment_changes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, discard_deployment_changes_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.discard_deployment_changes({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.discard_deployment_changes name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.discard_deployment_changes ::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.discard_deployment_changes({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.discard_deployment_changes(::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, discard_deployment_changes_client_stub.call_count + end + end + end + + def test_apply_deployment + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::Deployment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + apply_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_apply_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, apply_deployment_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.apply_deployment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.apply_deployment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.apply_deployment ::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.apply_deployment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.apply_deployment(::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, apply_deployment_client_stub.call_count + end + end + end + + def test_compute_deployment_status + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + compute_deployment_status_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_compute_deployment_status_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, compute_deployment_status_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.compute_deployment_status({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.compute_deployment_status name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.compute_deployment_status ::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.compute_deployment_status({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.compute_deployment_status(::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, compute_deployment_status_client_stub.call_count + end + end + end + + def test_rollback_deployment + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::Deployment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + revision_id = "hello world" + + rollback_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_rollback_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, rollback_deployment_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.rollback_deployment({ name: name, revision_id: revision_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.rollback_deployment name: name, revision_id: revision_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.rollback_deployment ::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest.new(name: name, revision_id: revision_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.rollback_deployment({ name: name, revision_id: revision_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.rollback_deployment(::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest.new(name: name, revision_id: revision_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, rollback_deployment_client_stub.call_count + end + end + end + + def test_get_hydrated_deployment + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_hydrated_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_get_hydrated_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_hydrated_deployment_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_hydrated_deployment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_hydrated_deployment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_hydrated_deployment ::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_hydrated_deployment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_hydrated_deployment(::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_hydrated_deployment_client_stub.call_count + end + end + end + + def test_list_hydrated_deployments + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsResponse.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_hydrated_deployments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_list_hydrated_deployments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_hydrated_deployments_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_hydrated_deployments({ 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_hydrated_deployments 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_hydrated_deployments ::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest.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_hydrated_deployments({ 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_hydrated_deployments(::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest.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_hydrated_deployments_client_stub.call_count + end + end + end + + def test_update_hydrated_deployment + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + hydrated_deployment = {} + update_mask = {} + + update_hydrated_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_update_hydrated_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_hydrated_deployment_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_hydrated_deployment({ hydrated_deployment: hydrated_deployment, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_hydrated_deployment hydrated_deployment: hydrated_deployment, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_hydrated_deployment ::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest.new(hydrated_deployment: hydrated_deployment, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_hydrated_deployment({ hydrated_deployment: hydrated_deployment, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_hydrated_deployment(::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest.new(hydrated_deployment: hydrated_deployment, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_hydrated_deployment_client_stub.call_count + end + end + end + + def test_apply_hydrated_deployment + # Create test objects. + client_result = ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + apply_hydrated_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_apply_hydrated_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, apply_hydrated_deployment_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.apply_hydrated_deployment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.apply_hydrated_deployment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.apply_hydrated_deployment ::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.apply_hydrated_deployment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.apply_hydrated_deployment(::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, apply_hydrated_deployment_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::TelcoAutomation::V1::TelcoAutomation::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::TelcoAutomation::V1::TelcoAutomation::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_test.rb b/owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_test.rb new file mode 100644 index 000000000000..c2be48e205f0 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_test.rb @@ -0,0 +1,2368 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/telcoautomation/v1/telcoautomation_pb" +require "google/cloud/telco_automation/v1/telco_automation" + +class ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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_orchestration_clusters + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_orchestration_clusters_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_orchestration_clusters, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest, 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_orchestration_clusters_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_orchestration_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_orchestration_clusters parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_orchestration_clusters ::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest.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_orchestration_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_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_orchestration_clusters(::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest.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_orchestration_clusters_client_stub.call_rpc_count + end + end + + def test_get_orchestration_cluster + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_orchestration_cluster_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_orchestration_cluster, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_orchestration_cluster_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_orchestration_cluster({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_orchestration_cluster name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_orchestration_cluster ::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_orchestration_cluster({ 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_orchestration_cluster(::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest.new(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_orchestration_cluster_client_stub.call_rpc_count + end + end + + def test_create_orchestration_cluster + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + orchestration_cluster_id = "hello world" + orchestration_cluster = {} + request_id = "hello world" + + create_orchestration_cluster_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_orchestration_cluster, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["orchestration_cluster_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster), request["orchestration_cluster"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_orchestration_cluster_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_orchestration_cluster({ parent: parent, orchestration_cluster_id: orchestration_cluster_id, orchestration_cluster: orchestration_cluster, 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_orchestration_cluster parent: parent, orchestration_cluster_id: orchestration_cluster_id, orchestration_cluster: orchestration_cluster, 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_orchestration_cluster ::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest.new(parent: parent, orchestration_cluster_id: orchestration_cluster_id, orchestration_cluster: orchestration_cluster, 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_orchestration_cluster({ parent: parent, orchestration_cluster_id: orchestration_cluster_id, orchestration_cluster: orchestration_cluster, 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_orchestration_cluster(::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest.new(parent: parent, orchestration_cluster_id: orchestration_cluster_id, orchestration_cluster: orchestration_cluster, 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_orchestration_cluster_client_stub.call_rpc_count + end + end + + def test_delete_orchestration_cluster + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_orchestration_cluster_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_orchestration_cluster, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_orchestration_cluster_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_orchestration_cluster({ 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_orchestration_cluster 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_orchestration_cluster ::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest.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_orchestration_cluster({ 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_orchestration_cluster(::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest.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_orchestration_cluster_client_stub.call_rpc_count + end + end + + def test_list_edge_slms + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_edge_slms_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_edge_slms, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest, 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_edge_slms_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_edge_slms({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_edge_slms parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_edge_slms ::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest.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_edge_slms({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_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_edge_slms(::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest.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_edge_slms_client_stub.call_rpc_count + end + end + + def test_get_edge_slm + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::EdgeSlm.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_edge_slm_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_edge_slm, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_edge_slm_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_edge_slm({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_edge_slm name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_edge_slm ::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_edge_slm({ 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_edge_slm(::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest.new(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_edge_slm_client_stub.call_rpc_count + end + end + + def test_create_edge_slm + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + edge_slm_id = "hello world" + edge_slm = {} + request_id = "hello world" + + create_edge_slm_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_edge_slm, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["edge_slm_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TelcoAutomation::V1::EdgeSlm), request["edge_slm"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_edge_slm_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_edge_slm({ parent: parent, edge_slm_id: edge_slm_id, edge_slm: edge_slm, 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_edge_slm parent: parent, edge_slm_id: edge_slm_id, edge_slm: edge_slm, 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_edge_slm ::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest.new(parent: parent, edge_slm_id: edge_slm_id, edge_slm: edge_slm, 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_edge_slm({ parent: parent, edge_slm_id: edge_slm_id, edge_slm: edge_slm, 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_edge_slm(::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest.new(parent: parent, edge_slm_id: edge_slm_id, edge_slm: edge_slm, 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_edge_slm_client_stub.call_rpc_count + end + end + + def test_delete_edge_slm + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_edge_slm_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_edge_slm, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_edge_slm_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_edge_slm({ 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_edge_slm 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_edge_slm ::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest.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_edge_slm({ 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_edge_slm(::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest.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_edge_slm_client_stub.call_rpc_count + end + end + + def test_create_blueprint + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::Blueprint.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + blueprint_id = "hello world" + blueprint = {} + + create_blueprint_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_blueprint, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["blueprint_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TelcoAutomation::V1::Blueprint), request["blueprint"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_blueprint_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_blueprint({ parent: parent, blueprint_id: blueprint_id, blueprint: blueprint }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_blueprint parent: parent, blueprint_id: blueprint_id, blueprint: blueprint do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_blueprint ::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest.new(parent: parent, blueprint_id: blueprint_id, blueprint: blueprint) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_blueprint({ parent: parent, blueprint_id: blueprint_id, blueprint: blueprint }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_blueprint(::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest.new(parent: parent, blueprint_id: blueprint_id, blueprint: blueprint), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_blueprint_client_stub.call_rpc_count + end + end + + def test_update_blueprint + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::Blueprint.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + blueprint = {} + update_mask = {} + + update_blueprint_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_blueprint, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TelcoAutomation::V1::Blueprint), request["blueprint"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_blueprint_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_blueprint({ blueprint: blueprint, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_blueprint blueprint: blueprint, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_blueprint ::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest.new(blueprint: blueprint, 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_blueprint({ blueprint: blueprint, 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_blueprint(::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest.new(blueprint: blueprint, 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_blueprint_client_stub.call_rpc_count + end + end + + def test_get_blueprint + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::Blueprint.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :BLUEPRINT_VIEW_UNSPECIFIED + + get_blueprint_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_blueprint, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest, request + assert_equal "hello world", request["name"] + assert_equal :BLUEPRINT_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_blueprint_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_blueprint({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_blueprint name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_blueprint ::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_blueprint({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_blueprint(::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_blueprint_client_stub.call_rpc_count + end + end + + def test_delete_blueprint + # 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_blueprint_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_blueprint, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_blueprint_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_blueprint({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_blueprint name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_blueprint ::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_blueprint({ 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_blueprint(::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest.new(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_blueprint_client_stub.call_rpc_count + end + end + + def test_list_blueprints + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::ListBlueprintsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_blueprints_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_blueprints, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest, 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_blueprints_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_blueprints({ 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_blueprints 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_blueprints ::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest.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_blueprints({ 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_blueprints(::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest.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_blueprints_client_stub.call_rpc_count + end + end + + def test_approve_blueprint + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::Blueprint.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + approve_blueprint_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :approve_blueprint, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, approve_blueprint_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.approve_blueprint({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.approve_blueprint name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.approve_blueprint ::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.approve_blueprint({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.approve_blueprint(::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, approve_blueprint_client_stub.call_rpc_count + end + end + + def test_propose_blueprint + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::Blueprint.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + propose_blueprint_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :propose_blueprint, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, propose_blueprint_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.propose_blueprint({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.propose_blueprint name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.propose_blueprint ::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.propose_blueprint({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.propose_blueprint(::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, propose_blueprint_client_stub.call_rpc_count + end + end + + def test_reject_blueprint + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::Blueprint.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + reject_blueprint_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :reject_blueprint, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, reject_blueprint_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.reject_blueprint({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.reject_blueprint name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.reject_blueprint ::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.reject_blueprint({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.reject_blueprint(::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, reject_blueprint_client_stub.call_rpc_count + end + end + + def test_list_blueprint_revisions + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + page_size = 42 + page_token = "hello world" + + list_blueprint_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_blueprint_revisions, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest, request + assert_equal "hello world", request["name"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_blueprint_revisions_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_blueprint_revisions({ name: name, 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_blueprint_revisions name: name, 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_blueprint_revisions ::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest.new(name: name, 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_blueprint_revisions({ name: name, 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_blueprint_revisions(::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest.new(name: name, 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_blueprint_revisions_client_stub.call_rpc_count + end + end + + def test_search_blueprint_revisions + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + query = "hello world" + page_size = 42 + page_token = "hello world" + + search_blueprint_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_blueprint_revisions, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["query"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_blueprint_revisions_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.search_blueprint_revisions({ parent: parent, query: query, 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.search_blueprint_revisions parent: parent, query: query, 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.search_blueprint_revisions ::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest.new(parent: parent, query: query, 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.search_blueprint_revisions({ parent: parent, query: query, 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.search_blueprint_revisions(::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest.new(parent: parent, query: query, 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, search_blueprint_revisions_client_stub.call_rpc_count + end + end + + def test_search_deployment_revisions + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + query = "hello world" + page_size = 42 + page_token = "hello world" + + search_deployment_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_deployment_revisions, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["query"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_deployment_revisions_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.search_deployment_revisions({ parent: parent, query: query, 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.search_deployment_revisions parent: parent, query: query, 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.search_deployment_revisions ::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest.new(parent: parent, query: query, 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.search_deployment_revisions({ parent: parent, query: query, 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.search_deployment_revisions(::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest.new(parent: parent, query: query, 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, search_deployment_revisions_client_stub.call_rpc_count + end + end + + def test_discard_blueprint_changes + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + discard_blueprint_changes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :discard_blueprint_changes, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, discard_blueprint_changes_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.discard_blueprint_changes({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.discard_blueprint_changes name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.discard_blueprint_changes ::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.discard_blueprint_changes({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.discard_blueprint_changes(::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, discard_blueprint_changes_client_stub.call_rpc_count + end + end + + def test_list_public_blueprints + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_public_blueprints_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_public_blueprints, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest, 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_public_blueprints_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_public_blueprints({ 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_public_blueprints 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_public_blueprints ::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest.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_public_blueprints({ 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_public_blueprints(::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest.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_public_blueprints_client_stub.call_rpc_count + end + end + + def test_get_public_blueprint + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::PublicBlueprint.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_public_blueprint_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_public_blueprint, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_public_blueprint_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_public_blueprint({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_public_blueprint name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_public_blueprint ::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_public_blueprint({ 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_public_blueprint(::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest.new(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_public_blueprint_client_stub.call_rpc_count + end + end + + def test_create_deployment + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::Deployment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + deployment_id = "hello world" + deployment = {} + + create_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_deployment, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["deployment_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TelcoAutomation::V1::Deployment), request["deployment"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_deployment_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_deployment({ parent: parent, deployment_id: deployment_id, deployment: deployment }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_deployment parent: parent, deployment_id: deployment_id, deployment: deployment do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_deployment ::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest.new(parent: parent, deployment_id: deployment_id, deployment: deployment) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_deployment({ parent: parent, deployment_id: deployment_id, deployment: deployment }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_deployment(::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest.new(parent: parent, deployment_id: deployment_id, deployment: deployment), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_deployment_client_stub.call_rpc_count + end + end + + def test_update_deployment + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::Deployment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + deployment = {} + update_mask = {} + + update_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_deployment, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TelcoAutomation::V1::Deployment), request["deployment"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_deployment_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_deployment({ deployment: deployment, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_deployment deployment: deployment, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_deployment ::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest.new(deployment: deployment, 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_deployment({ deployment: deployment, 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_deployment(::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest.new(deployment: deployment, 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_deployment_client_stub.call_rpc_count + end + end + + def test_get_deployment + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::Deployment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :DEPLOYMENT_VIEW_UNSPECIFIED + + get_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_deployment, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest, request + assert_equal "hello world", request["name"] + assert_equal :DEPLOYMENT_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_deployment_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_deployment({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_deployment name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_deployment ::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_deployment({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_deployment(::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_deployment_client_stub.call_rpc_count + end + end + + def test_remove_deployment + # 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" + + remove_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :remove_deployment, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, remove_deployment_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.remove_deployment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.remove_deployment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.remove_deployment ::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.remove_deployment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.remove_deployment(::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, remove_deployment_client_stub.call_rpc_count + end + end + + def test_list_deployments + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::ListDeploymentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_deployments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_deployments, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest, 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_deployments_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_deployments({ 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_deployments 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_deployments ::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest.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_deployments({ 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_deployments(::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest.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_deployments_client_stub.call_rpc_count + end + end + + def test_list_deployment_revisions + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + page_size = 42 + page_token = "hello world" + + list_deployment_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_deployment_revisions, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest, request + assert_equal "hello world", request["name"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_deployment_revisions_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_deployment_revisions({ name: name, 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_deployment_revisions name: name, 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_deployment_revisions ::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest.new(name: name, 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_deployment_revisions({ name: name, 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_deployment_revisions(::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest.new(name: name, 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_deployment_revisions_client_stub.call_rpc_count + end + end + + def test_discard_deployment_changes + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + discard_deployment_changes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :discard_deployment_changes, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, discard_deployment_changes_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.discard_deployment_changes({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.discard_deployment_changes name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.discard_deployment_changes ::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.discard_deployment_changes({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.discard_deployment_changes(::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, discard_deployment_changes_client_stub.call_rpc_count + end + end + + def test_apply_deployment + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::Deployment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + apply_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :apply_deployment, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, apply_deployment_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.apply_deployment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.apply_deployment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.apply_deployment ::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.apply_deployment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.apply_deployment(::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, apply_deployment_client_stub.call_rpc_count + end + end + + def test_compute_deployment_status + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + compute_deployment_status_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :compute_deployment_status, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, compute_deployment_status_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.compute_deployment_status({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.compute_deployment_status name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.compute_deployment_status ::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.compute_deployment_status({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.compute_deployment_status(::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, compute_deployment_status_client_stub.call_rpc_count + end + end + + def test_rollback_deployment + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::Deployment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_id = "hello world" + + rollback_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :rollback_deployment, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["revision_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, rollback_deployment_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.rollback_deployment({ name: name, revision_id: revision_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.rollback_deployment name: name, revision_id: revision_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.rollback_deployment ::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest.new(name: name, revision_id: revision_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.rollback_deployment({ name: name, revision_id: revision_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.rollback_deployment(::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest.new(name: name, revision_id: revision_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, rollback_deployment_client_stub.call_rpc_count + end + end + + def test_get_hydrated_deployment + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_hydrated_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_hydrated_deployment, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_hydrated_deployment_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_hydrated_deployment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_hydrated_deployment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_hydrated_deployment ::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_hydrated_deployment({ 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_hydrated_deployment(::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest.new(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_hydrated_deployment_client_stub.call_rpc_count + end + end + + def test_list_hydrated_deployments + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_hydrated_deployments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_hydrated_deployments, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest, 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_hydrated_deployments_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_hydrated_deployments({ 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_hydrated_deployments 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_hydrated_deployments ::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest.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_hydrated_deployments({ 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_hydrated_deployments(::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest.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_hydrated_deployments_client_stub.call_rpc_count + end + end + + def test_update_hydrated_deployment + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + hydrated_deployment = {} + update_mask = {} + + update_hydrated_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_hydrated_deployment, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment), request["hydrated_deployment"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_hydrated_deployment_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_hydrated_deployment({ hydrated_deployment: hydrated_deployment, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_hydrated_deployment hydrated_deployment: hydrated_deployment, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_hydrated_deployment ::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest.new(hydrated_deployment: hydrated_deployment, 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_hydrated_deployment({ hydrated_deployment: hydrated_deployment, 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_hydrated_deployment(::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest.new(hydrated_deployment: hydrated_deployment, 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_hydrated_deployment_client_stub.call_rpc_count + end + end + + def test_apply_hydrated_deployment + # Create GRPC objects. + grpc_response = ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + apply_hydrated_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :apply_hydrated_deployment, name + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, apply_hydrated_deployment_client_stub do + # Create client + client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.apply_hydrated_deployment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.apply_hydrated_deployment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.apply_hydrated_deployment ::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.apply_hydrated_deployment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.apply_hydrated_deployment(::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, apply_hydrated_deployment_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::TelcoAutomation::V1::TelcoAutomation::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::TelcoAutomation::V1::TelcoAutomation::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::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/test/helper.rb b/owl-bot-staging/google-cloud-telco_automation-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-telco_automation-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/.gitignore b/owl-bot-staging/google-cloud-text_to_speech-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-text_to_speech-v1/.repo-metadata.json new file mode 100644 index 000000000000..0f1680fa6d2d --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "texttospeech.googleapis.com", + "api_shortname": "texttospeech", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest", + "distribution_name": "google-cloud-text_to_speech-v1", + "is_cloud": true, + "language": "ruby", + "name": "texttospeech", + "name_pretty": "Cloud Text-to-Speech V1 API", + "product_documentation": "https://cloud.google.com/text-to-speech", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Text-to-Speech converts text or Speech Synthesis Markup Language (SSML) input into audio data of natural human speech. Note that google-cloud-text_to_speech-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-text_to_speech instead. See the readme for more details.", + "ruby-cloud-env-prefix": "TEXTTOSPEECH", + "ruby-cloud-product-url": "https://cloud.google.com/text-to-speech", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/.rubocop.yml b/owl-bot-staging/google-cloud-text_to_speech-v1/.rubocop.yml new file mode 100644 index 000000000000..dc3e19ac0403 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-text_to_speech-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-text_to_speech-v1.rb" diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/.toys.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1/.yardopts b/owl-bot-staging/google-cloud-text_to_speech-v1/.yardopts new file mode 100644 index 000000000000..b23b0b3b07e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Text-to-Speech 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-text_to_speech-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-text_to_speech-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..9eb74f158a54 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-text_to_speech-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-text_to_speech-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/text_to_speech/v1" + +client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/text_to_speech/v1" + +::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::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-text_to_speech-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/text_to_speech/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::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-text_to_speech-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-text_to_speech-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/Gemfile b/owl-bot-staging/google-cloud-text_to_speech-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/LICENSE.md b/owl-bot-staging/google-cloud-text_to_speech-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1/README.md b/owl-bot-staging/google-cloud-text_to_speech-v1/README.md new file mode 100644 index 000000000000..27409b96177e --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Text-to-Speech V1 API + +Synthesizes natural-sounding speech by applying powerful neural network models. + +Text-to-Speech converts text or Speech Synthesis Markup Language (SSML) input into audio data of natural human speech. + +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 Text-to-Speech V1 API. Most users should consider using +the main client gem, +[google-cloud-text_to_speech](https://rubygems.org/gems/google-cloud-text_to_speech). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-text_to_speech-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/texttospeech.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/text_to_speech/v1" + +client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new +request = ::Google::Cloud::TextToSpeech::V1::ListVoicesRequest.new # (request fields as keyword arguments...) +response = client.list_voices request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/text-to-speech) +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/text_to_speech/v1" +require "logger" + +client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::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-text_to_speech`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-text_to_speech-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-text_to_speech`. +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-text_to_speech-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-text_to_speech-v1/Rakefile b/owl-bot-staging/google-cloud-text_to_speech-v1/Rakefile new file mode 100644 index 000000000000..7db3ca6b5cb0 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["TEXTTOSPEECH_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["TEXTTOSPEECH_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["TEXTTOSPEECH_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 TEXTTOSPEECH_TEST_PROJECT=test123 TEXTTOSPEECH_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/text_to_speech/v1/text_to_speech/credentials" + ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["TEXTTOSPEECH_PROJECT"] = project + ENV["TEXTTOSPEECH_TEST_PROJECT"] = project + ENV["TEXTTOSPEECH_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-text_to_speech-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-text_to_speech-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-text_to_speech-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-text_to_speech-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-text_to_speech-v1" + header "google-cloud-text_to_speech-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-text_to_speech-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-text_to_speech-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-text_to_speech-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-text_to_speech-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-text_to_speech-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-text_to_speech-v1/gapic_metadata.json new file mode 100644 index 000000000000..16049d7c8a36 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/gapic_metadata.json @@ -0,0 +1,47 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.texttospeech.v1", + "libraryPackage": "::Google::Cloud::TextToSpeech::V1", + "services": { + "TextToSpeech": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client", + "rpcs": { + "ListVoices": { + "methods": [ + "list_voices" + ] + }, + "SynthesizeSpeech": { + "methods": [ + "synthesize_speech" + ] + }, + "StreamingSynthesize": { + "methods": [ + "streaming_synthesize" + ] + } + } + } + } + }, + "TextToSpeechLongAudioSynthesize": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client", + "rpcs": { + "SynthesizeLongAudio": { + "methods": [ + "synthesize_long_audio" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/google-cloud-text_to_speech-v1.gemspec b/owl-bot-staging/google-cloud-text_to_speech-v1/google-cloud-text_to_speech-v1.gemspec new file mode 100644 index 000000000000..fc9844c9372b --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/google-cloud-text_to_speech-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/text_to_speech/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-text_to_speech-v1" + gem.version = Google::Cloud::TextToSpeech::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Text-to-Speech converts text or Speech Synthesis Markup Language (SSML) input into audio data of natural human speech. Note that google-cloud-text_to_speech-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-text_to_speech instead. See the readme for more details." + gem.summary = "Synthesizes natural-sounding speech by applying powerful neural network models." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google-cloud-text_to_speech-v1.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google-cloud-text_to_speech-v1.rb new file mode 100644 index 000000000000..796720aff7fd --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google-cloud-text_to_speech-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/text_to_speech/v1" diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1.rb new file mode 100644 index 000000000000..4d6d2e5dfd49 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/text_to_speech/v1/text_to_speech" +require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize" +require "google/cloud/text_to_speech/v1/version" + +module Google + module Cloud + module TextToSpeech + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/text_to_speech/v1" + # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/text_to_speech/v1" + # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/text_to_speech/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/rest.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/rest.rb new file mode 100644 index 000000000000..410254eba135 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/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/text_to_speech/v1/text_to_speech/rest" +require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest" +require "google/cloud/text_to_speech/v1/version" + +module Google + module Cloud + module TextToSpeech + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/text_to_speech/v1/rest" + # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech.rb new file mode 100644 index 000000000000..ec1fb13e094d --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech.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/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/text_to_speech/v1/version" + +require "google/cloud/text_to_speech/v1/text_to_speech/credentials" +require "google/cloud/text_to_speech/v1/text_to_speech/paths" +require "google/cloud/text_to_speech/v1/text_to_speech/client" +require "google/cloud/text_to_speech/v1/text_to_speech/rest" + +module Google + module Cloud + module TextToSpeech + module V1 + ## + # Service that implements Google Cloud Text-to-Speech API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/text_to_speech/v1/text_to_speech" + # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/text_to_speech/v1/text_to_speech/rest" + # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.new + # + module TextToSpeech + end + end + end + end +end + +helper_path = ::File.join __dir__, "text_to_speech", "helpers.rb" +require "google/cloud/text_to_speech/v1/text_to_speech/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/client.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/client.rb new file mode 100644 index 000000000000..f538e52e5dfe --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/client.rb @@ -0,0 +1,655 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/texttospeech/v1/cloud_tts_pb" + +module Google + module Cloud + module TextToSpeech + module V1 + module TextToSpeech + ## + # Client for the TextToSpeech service. + # + # Service that implements Google Cloud Text-to-Speech API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "texttospeech.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :text_to_speech_stub + + ## + # Configure the TextToSpeech Client class. + # + # See {::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TextToSpeech clients + # ::Google::Cloud::TextToSpeech::V1::TextToSpeech::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", "TextToSpeech", "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.timeout = 300.0 + default_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TextToSpeech 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::TextToSpeech::V1::TextToSpeech::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 + @text_to_speech_stub.universe_domain + end + + ## + # Create a new TextToSpeech client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TextToSpeech 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/texttospeech/v1/cloud_tts_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 + + @text_to_speech_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::TextToSpeech::V1::TextToSpeech::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 + ) + + @text_to_speech_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 + @text_to_speech_stub.logger + end + + # Service calls + + ## + # Returns a list of Voice supported for synthesis. + # + # @overload list_voices(request, options = nil) + # Pass arguments to `list_voices` via a request object, either of type + # {::Google::Cloud::TextToSpeech::V1::ListVoicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TextToSpeech::V1::ListVoicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_voices(language_code: nil) + # Pass arguments to `list_voices` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param language_code [::String] + # Optional. Recommended. + # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + # If not specified, the API will return all supported voices. + # If specified, the ListVoices call will only return voices that can be used + # to synthesize this language_code. For example, if you specify `"en-NZ"`, + # all `"en-NZ"` voices will be returned. If you specify `"no"`, both + # `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be + # returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::TextToSpeech::V1::ListVoicesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::TextToSpeech::V1::ListVoicesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/text_to_speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TextToSpeech::V1::ListVoicesRequest.new + # + # # Call the list_voices method. + # result = client.list_voices request + # + # # The returned object is of type Google::Cloud::TextToSpeech::V1::ListVoicesResponse. + # p result + # + def list_voices request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1::ListVoicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_voices.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TextToSpeech::V1::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_voices.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_voices.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @text_to_speech_stub.call_rpc :list_voices, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Synthesizes speech synchronously: receive results after all text input + # has been processed. + # + # @overload synthesize_speech(request, options = nil) + # Pass arguments to `synthesize_speech` via a request object, either of type + # {::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload synthesize_speech(input: nil, voice: nil, audio_config: nil, advanced_voice_options: nil) + # Pass arguments to `synthesize_speech` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param input [::Google::Cloud::TextToSpeech::V1::SynthesisInput, ::Hash] + # Required. The Synthesizer requires either plain text or SSML as input. + # @param voice [::Google::Cloud::TextToSpeech::V1::VoiceSelectionParams, ::Hash] + # Required. The desired voice of the synthesized audio. + # @param audio_config [::Google::Cloud::TextToSpeech::V1::AudioConfig, ::Hash] + # Required. The configuration of the synthesized audio. + # @param advanced_voice_options [::Google::Cloud::TextToSpeech::V1::AdvancedVoiceOptions, ::Hash] + # Advanced voice options. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/text_to_speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest.new + # + # # Call the synthesize_speech method. + # result = client.synthesize_speech request + # + # # The returned object is of type Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse. + # p result + # + def synthesize_speech request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.synthesize_speech.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TextToSpeech::V1::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.synthesize_speech.timeout, + metadata: metadata, + retry_policy: @config.rpcs.synthesize_speech.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @text_to_speech_stub.call_rpc :synthesize_speech, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Performs bidirectional streaming speech synthesis: receives audio while + # sending text. + # + # @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeRequest, ::Hash>] + # An enumerable of {::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeRequest} 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::TextToSpeech::V1::StreamingSynthesizeResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeResponse>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/text_to_speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new + # + # # Create an input stream. + # input = Gapic::StreamInput.new + # + # # Call the streaming_synthesize method to start streaming. + # output = client.streaming_synthesize 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::TextToSpeech::V1::StreamingSynthesizeRequest.new + # input << Google::Cloud::TextToSpeech::V1::StreamingSynthesizeRequest.new + # input.close + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeResponse + # output.each do |current_response| + # p current_response + # end + # + def streaming_synthesize 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::TextToSpeech::V1::StreamingSynthesizeRequest + 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.streaming_synthesize.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TextToSpeech::V1::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.streaming_synthesize.timeout, + metadata: metadata, + retry_policy: @config.rpcs.streaming_synthesize.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @text_to_speech_stub.call_rpc :streaming_synthesize, request, 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 TextToSpeech API. + # + # This class represents the configuration for TextToSpeech, + # 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::TextToSpeech::V1::TextToSpeech::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_voices to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_voices.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_voices.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::TextToSpeech::V1::TextToSpeech::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 = "texttospeech.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 TextToSpeech 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_voices` + # @return [::Gapic::Config::Method] + # + attr_reader :list_voices + ## + # RPC-specific configuration for `synthesize_speech` + # @return [::Gapic::Config::Method] + # + attr_reader :synthesize_speech + ## + # RPC-specific configuration for `streaming_synthesize` + # @return [::Gapic::Config::Method] + # + attr_reader :streaming_synthesize + + # @private + def initialize parent_rpcs = nil + list_voices_config = parent_rpcs.list_voices if parent_rpcs.respond_to? :list_voices + @list_voices = ::Gapic::Config::Method.new list_voices_config + synthesize_speech_config = parent_rpcs.synthesize_speech if parent_rpcs.respond_to? :synthesize_speech + @synthesize_speech = ::Gapic::Config::Method.new synthesize_speech_config + streaming_synthesize_config = parent_rpcs.streaming_synthesize if parent_rpcs.respond_to? :streaming_synthesize + @streaming_synthesize = ::Gapic::Config::Method.new streaming_synthesize_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/credentials.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/credentials.rb new file mode 100644 index 000000000000..ae03a5f2f50e --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/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 TextToSpeech + module V1 + module TextToSpeech + # Credentials for the TextToSpeech API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "TEXTTOSPEECH_CREDENTIALS", + "TEXTTOSPEECH_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "TEXTTOSPEECH_CREDENTIALS_JSON", + "TEXTTOSPEECH_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-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/paths.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/paths.rb new file mode 100644 index 000000000000..742f694939cc --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module TextToSpeech + module V1 + module TextToSpeech + # Path helper methods for the TextToSpeech API. + module Paths + ## + # Create a fully-qualified Model resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/models/{model}` + # + # @param project [String] + # @param location [String] + # @param model [String] + # + # @return [::String] + def model_path project:, location:, model: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/models/#{model}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/rest.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/rest.rb new file mode 100644 index 000000000000..c624653e2965 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/rest.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 "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/text_to_speech/v1/version" + +require "google/cloud/text_to_speech/v1/text_to_speech/credentials" +require "google/cloud/text_to_speech/v1/text_to_speech/paths" +require "google/cloud/text_to_speech/v1/text_to_speech/rest/client" + +module Google + module Cloud + module TextToSpeech + module V1 + ## + # Service that implements Google Cloud Text-to-Speech API. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/text_to_speech/v1/text_to_speech/rest" + # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.new + # + module TextToSpeech + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/text_to_speech/v1/text_to_speech/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/rest/client.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/rest/client.rb new file mode 100644 index 000000000000..862337249dae --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/rest/client.rb @@ -0,0 +1,528 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/texttospeech/v1/cloud_tts_pb" +require "google/cloud/text_to_speech/v1/text_to_speech/rest/service_stub" + +module Google + module Cloud + module TextToSpeech + module V1 + module TextToSpeech + module Rest + ## + # REST client for the TextToSpeech service. + # + # Service that implements Google Cloud Text-to-Speech API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "texttospeech.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :text_to_speech_stub + + ## + # Configure the TextToSpeech Client class. + # + # See {::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TextToSpeech clients + # ::Google::Cloud::TextToSpeech::V1::TextToSpeech::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", "TextToSpeech", "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.timeout = 300.0 + default_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TextToSpeech 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::TextToSpeech::V1::TextToSpeech::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 + @text_to_speech_stub.universe_domain + end + + ## + # Create a new TextToSpeech REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TextToSpeech 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 + + @text_to_speech_stub = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @text_to_speech_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 + @text_to_speech_stub.logger + end + + # Service calls + + ## + # Returns a list of Voice supported for synthesis. + # + # @overload list_voices(request, options = nil) + # Pass arguments to `list_voices` via a request object, either of type + # {::Google::Cloud::TextToSpeech::V1::ListVoicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TextToSpeech::V1::ListVoicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_voices(language_code: nil) + # Pass arguments to `list_voices` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param language_code [::String] + # Optional. Recommended. + # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + # If not specified, the API will return all supported voices. + # If specified, the ListVoices call will only return voices that can be used + # to synthesize this language_code. For example, if you specify `"en-NZ"`, + # all `"en-NZ"` voices will be returned. If you specify `"no"`, both + # `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be + # returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TextToSpeech::V1::ListVoicesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TextToSpeech::V1::ListVoicesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/text_to_speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TextToSpeech::V1::ListVoicesRequest.new + # + # # Call the list_voices method. + # result = client.list_voices request + # + # # The returned object is of type Google::Cloud::TextToSpeech::V1::ListVoicesResponse. + # p result + # + def list_voices request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1::ListVoicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_voices.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TextToSpeech::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_voices.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_voices.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @text_to_speech_stub.list_voices request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Synthesizes speech synchronously: receive results after all text input + # has been processed. + # + # @overload synthesize_speech(request, options = nil) + # Pass arguments to `synthesize_speech` via a request object, either of type + # {::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload synthesize_speech(input: nil, voice: nil, audio_config: nil, advanced_voice_options: nil) + # Pass arguments to `synthesize_speech` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param input [::Google::Cloud::TextToSpeech::V1::SynthesisInput, ::Hash] + # Required. The Synthesizer requires either plain text or SSML as input. + # @param voice [::Google::Cloud::TextToSpeech::V1::VoiceSelectionParams, ::Hash] + # Required. The desired voice of the synthesized audio. + # @param audio_config [::Google::Cloud::TextToSpeech::V1::AudioConfig, ::Hash] + # Required. The configuration of the synthesized audio. + # @param advanced_voice_options [::Google::Cloud::TextToSpeech::V1::AdvancedVoiceOptions, ::Hash] + # Advanced voice options. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/text_to_speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest.new + # + # # Call the synthesize_speech method. + # result = client.synthesize_speech request + # + # # The returned object is of type Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse. + # p result + # + def synthesize_speech request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.synthesize_speech.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TextToSpeech::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.synthesize_speech.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.synthesize_speech.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @text_to_speech_stub.synthesize_speech request, 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 TextToSpeech REST API. + # + # This class represents the configuration for TextToSpeech 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::TextToSpeech::V1::TextToSpeech::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_voices to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_voices.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_voices.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 = "texttospeech.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 TextToSpeech 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_voices` + # @return [::Gapic::Config::Method] + # + attr_reader :list_voices + ## + # RPC-specific configuration for `synthesize_speech` + # @return [::Gapic::Config::Method] + # + attr_reader :synthesize_speech + + # @private + def initialize parent_rpcs = nil + list_voices_config = parent_rpcs.list_voices if parent_rpcs.respond_to? :list_voices + @list_voices = ::Gapic::Config::Method.new list_voices_config + synthesize_speech_config = parent_rpcs.synthesize_speech if parent_rpcs.respond_to? :synthesize_speech + @synthesize_speech = ::Gapic::Config::Method.new synthesize_speech_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/rest/service_stub.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/rest/service_stub.rb new file mode 100644 index 000000000000..2b4b9cdd5d6d --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/rest/service_stub.rb @@ -0,0 +1,200 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/texttospeech/v1/cloud_tts_pb" + +module Google + module Cloud + module TextToSpeech + module V1 + module TextToSpeech + module Rest + ## + # REST service stub for the TextToSpeech 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_voices REST call + # + # @param request_pb [::Google::Cloud::TextToSpeech::V1::ListVoicesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TextToSpeech::V1::ListVoicesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TextToSpeech::V1::ListVoicesResponse] + # A result object deserialized from the server's reply + def list_voices request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_voices_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_voices", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TextToSpeech::V1::ListVoicesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the synthesize_speech REST call + # + # @param request_pb [::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse] + # A result object deserialized from the server's reply + def synthesize_speech request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_synthesize_speech_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "synthesize_speech", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse.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_voices REST call + # + # @param request_pb [::Google::Cloud::TextToSpeech::V1::ListVoicesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_voices_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/voices", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the synthesize_speech REST call + # + # @param request_pb [::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_synthesize_speech_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/text:synthesize", + body: "*", + matches: [] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize.rb new file mode 100644 index 000000000000..5ac749d808a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize.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/text_to_speech/v1/version" + +require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/credentials" +require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/paths" +require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/operations" +require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/client" +require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest" + +module Google + module Cloud + module TextToSpeech + module V1 + ## + # Service that implements Google Cloud Text-to-Speech API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize" + # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest" + # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client.new + # + module TextToSpeechLongAudioSynthesize + end + end + end + end +end + +helper_path = ::File.join __dir__, "text_to_speech_long_audio_synthesize", "helpers.rb" +require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/client.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/client.rb new file mode 100644 index 000000000000..c0e39e1b0936 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/client.rb @@ -0,0 +1,510 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/texttospeech/v1/cloud_tts_lrs_pb" + +module Google + module Cloud + module TextToSpeech + module V1 + module TextToSpeechLongAudioSynthesize + ## + # Client for the TextToSpeechLongAudioSynthesize service. + # + # Service that implements Google Cloud Text-to-Speech API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "texttospeech.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :text_to_speech_long_audio_synthesize_stub + + ## + # Configure the TextToSpeechLongAudioSynthesize Client class. + # + # See {::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TextToSpeechLongAudioSynthesize clients + # ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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", "TextToSpeech", "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.synthesize_long_audio.timeout = 5000.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TextToSpeechLongAudioSynthesize 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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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 + @text_to_speech_long_audio_synthesize_stub.universe_domain + end + + ## + # Create a new TextToSpeechLongAudioSynthesize client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TextToSpeechLongAudioSynthesize 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/texttospeech/v1/cloud_tts_lrs_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 + + @text_to_speech_long_audio_synthesize_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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 + ) + + @text_to_speech_long_audio_synthesize_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 + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @text_to_speech_long_audio_synthesize_stub.logger + end + + # Service calls + + ## + # Synthesizes long form text asynchronously. + # + # @overload synthesize_long_audio(request, options = nil) + # Pass arguments to `synthesize_long_audio` via a request object, either of type + # {::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload synthesize_long_audio(parent: nil, input: nil, audio_config: nil, output_gcs_uri: nil, voice: nil) + # Pass arguments to `synthesize_long_audio` via keyword arguments. Note that at + # least one keyword argument is required. To 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 resource states of the request in the form of + # `projects/*/locations/*`. + # @param input [::Google::Cloud::TextToSpeech::V1::SynthesisInput, ::Hash] + # Required. The Synthesizer requires either plain text or SSML as input. + # @param audio_config [::Google::Cloud::TextToSpeech::V1::AudioConfig, ::Hash] + # Required. The configuration of the synthesized audio. + # @param output_gcs_uri [::String] + # Required. Specifies a Cloud Storage URI for the synthesis results. Must be + # specified in the format: `gs://bucket_name/object_name`, and the bucket + # must already exist. + # @param voice [::Google::Cloud::TextToSpeech::V1::VoiceSelectionParams, ::Hash] + # Required. The desired voice of the synthesized audio. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/text_to_speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest.new + # + # # Call the synthesize_long_audio method. + # result = client.synthesize_long_audio request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def synthesize_long_audio request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.synthesize_long_audio.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TextToSpeech::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.synthesize_long_audio.timeout, + metadata: metadata, + retry_policy: @config.rpcs.synthesize_long_audio.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @text_to_speech_long_audio_synthesize_stub.call_rpc :synthesize_long_audio, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 TextToSpeechLongAudioSynthesize API. + # + # This class represents the configuration for TextToSpeechLongAudioSynthesize, + # 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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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 + # # synthesize_long_audio to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.synthesize_long_audio.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.synthesize_long_audio.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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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 = "texttospeech.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 TextToSpeechLongAudioSynthesize 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 `synthesize_long_audio` + # @return [::Gapic::Config::Method] + # + attr_reader :synthesize_long_audio + + # @private + def initialize parent_rpcs = nil + synthesize_long_audio_config = parent_rpcs.synthesize_long_audio if parent_rpcs.respond_to? :synthesize_long_audio + @synthesize_long_audio = ::Gapic::Config::Method.new synthesize_long_audio_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/credentials.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/credentials.rb new file mode 100644 index 000000000000..df1224d64357 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/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 TextToSpeech + module V1 + module TextToSpeechLongAudioSynthesize + # Credentials for the TextToSpeechLongAudioSynthesize API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "TEXTTOSPEECH_CREDENTIALS", + "TEXTTOSPEECH_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "TEXTTOSPEECH_CREDENTIALS_JSON", + "TEXTTOSPEECH_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-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/operations.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/operations.rb new file mode 100644 index 000000000000..fadf9ad19fb8 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/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 TextToSpeech + module V1 + module TextToSpeechLongAudioSynthesize + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "texttospeech.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the TextToSpeechLongAudioSynthesize 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 TextToSpeechLongAudioSynthesize 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::TextToSpeech::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::TextToSpeech::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::TextToSpeech::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::TextToSpeech::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::TextToSpeech::V1::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 = "texttospeech.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-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/paths.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/paths.rb new file mode 100644 index 000000000000..3632788fa392 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module TextToSpeech + module V1 + module TextToSpeechLongAudioSynthesize + # Path helper methods for the TextToSpeechLongAudioSynthesize API. + module Paths + ## + # Create a fully-qualified Model resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/models/{model}` + # + # @param project [String] + # @param location [String] + # @param model [String] + # + # @return [::String] + def model_path project:, location:, model: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/models/#{model}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest.rb new file mode 100644 index 000000000000..eb8a249fb23a --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest.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 "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/text_to_speech/v1/version" + +require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/credentials" +require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/paths" +require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/operations" +require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/client" + +module Google + module Cloud + module TextToSpeech + module V1 + ## + # Service that implements Google Cloud Text-to-Speech API. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest" + # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client.new + # + module TextToSpeechLongAudioSynthesize + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/client.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/client.rb new file mode 100644 index 000000000000..06c4eb02a0f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/client.rb @@ -0,0 +1,460 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/texttospeech/v1/cloud_tts_lrs_pb" +require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/service_stub" + +module Google + module Cloud + module TextToSpeech + module V1 + module TextToSpeechLongAudioSynthesize + module Rest + ## + # REST client for the TextToSpeechLongAudioSynthesize service. + # + # Service that implements Google Cloud Text-to-Speech API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "texttospeech.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :text_to_speech_long_audio_synthesize_stub + + ## + # Configure the TextToSpeechLongAudioSynthesize Client class. + # + # See {::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TextToSpeechLongAudioSynthesize clients + # ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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", "TextToSpeech", "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.synthesize_long_audio.timeout = 5000.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TextToSpeechLongAudioSynthesize 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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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 + @text_to_speech_long_audio_synthesize_stub.universe_domain + end + + ## + # Create a new TextToSpeechLongAudioSynthesize REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TextToSpeechLongAudioSynthesize 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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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 + + @text_to_speech_long_audio_synthesize_stub = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @text_to_speech_long_audio_synthesize_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 + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @text_to_speech_long_audio_synthesize_stub.logger + end + + # Service calls + + ## + # Synthesizes long form text asynchronously. + # + # @overload synthesize_long_audio(request, options = nil) + # Pass arguments to `synthesize_long_audio` via a request object, either of type + # {::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload synthesize_long_audio(parent: nil, input: nil, audio_config: nil, output_gcs_uri: nil, voice: nil) + # Pass arguments to `synthesize_long_audio` via keyword arguments. Note that at + # least one keyword argument is required. To 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 resource states of the request in the form of + # `projects/*/locations/*`. + # @param input [::Google::Cloud::TextToSpeech::V1::SynthesisInput, ::Hash] + # Required. The Synthesizer requires either plain text or SSML as input. + # @param audio_config [::Google::Cloud::TextToSpeech::V1::AudioConfig, ::Hash] + # Required. The configuration of the synthesized audio. + # @param output_gcs_uri [::String] + # Required. Specifies a Cloud Storage URI for the synthesis results. Must be + # specified in the format: `gs://bucket_name/object_name`, and the bucket + # must already exist. + # @param voice [::Google::Cloud::TextToSpeech::V1::VoiceSelectionParams, ::Hash] + # Required. The desired voice of the synthesized audio. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/text_to_speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest.new + # + # # Call the synthesize_long_audio method. + # result = client.synthesize_long_audio request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def synthesize_long_audio request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.synthesize_long_audio.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TextToSpeech::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.synthesize_long_audio.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.synthesize_long_audio.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @text_to_speech_long_audio_synthesize_stub.synthesize_long_audio request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 TextToSpeechLongAudioSynthesize REST API. + # + # This class represents the configuration for TextToSpeechLongAudioSynthesize 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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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 + # # synthesize_long_audio to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.synthesize_long_audio.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.synthesize_long_audio.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 = "texttospeech.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 TextToSpeechLongAudioSynthesize 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 `synthesize_long_audio` + # @return [::Gapic::Config::Method] + # + attr_reader :synthesize_long_audio + + # @private + def initialize parent_rpcs = nil + synthesize_long_audio_config = parent_rpcs.synthesize_long_audio if parent_rpcs.respond_to? :synthesize_long_audio + @synthesize_long_audio = ::Gapic::Config::Method.new synthesize_long_audio_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/operations.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/operations.rb new file mode 100644 index 000000000000..166fbb391f2b --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/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 TextToSpeech + module V1 + module TextToSpeechLongAudioSynthesize + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "texttospeech.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the TextToSpeechLongAudioSynthesize 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 TextToSpeechLongAudioSynthesize 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::TextToSpeech::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::TextToSpeech::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::TextToSpeech::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::TextToSpeech::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "texttospeech.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{^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-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/service_stub.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/service_stub.rb new file mode 100644 index 000000000000..865f7c9fc35b --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/service_stub.rb @@ -0,0 +1,143 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/texttospeech/v1/cloud_tts_lrs_pb" + +module Google + module Cloud + module TextToSpeech + module V1 + module TextToSpeechLongAudioSynthesize + module Rest + ## + # REST service stub for the TextToSpeechLongAudioSynthesize 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 synthesize_long_audio REST call + # + # @param request_pb [::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def synthesize_long_audio request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_synthesize_long_audio_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "synthesize_long_audio", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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 synthesize_long_audio REST call + # + # @param request_pb [::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_synthesize_long_audio_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:synthesizeLongAudio", + body: "*", + 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-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/version.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/version.rb new file mode 100644 index 000000000000..bac4947af0ac --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/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 TextToSpeech + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_lrs_pb.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_lrs_pb.rb new file mode 100644 index 000000000000..14296d90aed6 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_lrs_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/texttospeech/v1/cloud_tts_lrs.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/cloud/texttospeech/v1/cloud_tts_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n0google/cloud/texttospeech/v1/cloud_tts_lrs.proto\x12\x1cgoogle.cloud.texttospeech.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a,google/cloud/texttospeech/v1/cloud_tts.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x99\x02\n\x1aSynthesizeLongAudioRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12@\n\x05input\x18\x02 \x01(\x0b\x32,.google.cloud.texttospeech.v1.SynthesisInputB\x03\xe0\x41\x02\x12\x44\n\x0c\x61udio_config\x18\x03 \x01(\x0b\x32).google.cloud.texttospeech.v1.AudioConfigB\x03\xe0\x41\x02\x12\x1b\n\x0eoutput_gcs_uri\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x46\n\x05voice\x18\x05 \x01(\x0b\x32\x32.google.cloud.texttospeech.v1.VoiceSelectionParamsB\x03\xe0\x41\x02\"\x1d\n\x1bSynthesizeLongAudioResponse\"\xa4\x01\n\x1bSynthesizeLongAudioMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x10last_update_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01\x12\x1b\n\x13progress_percentage\x18\x03 \x01(\x01\x32\x9f\x03\n\x1fTextToSpeechLongAudioSynthesize\x12\xaa\x02\n\x13SynthesizeLongAudio\x12\x38.google.cloud.texttospeech.v1.SynthesizeLongAudioRequest\x1a\x1d.google.longrunning.Operation\"\xb9\x01\xca\x41t\n8google.cloud.texttospeech.v1.SynthesizeLongAudioResponse\x12\x38google.cloud.texttospeech.v1.SynthesizeLongAudioMetadata\x82\xd3\xe4\x93\x02<\"7/v1/{parent=projects/*/locations/*}:synthesizeLongAudio:\x01*\x1aO\xca\x41\x1btexttospeech.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xef\x01\n com.google.cloud.texttospeech.v1B#TextToSpeechLongAudioSynthesisProtoP\x01ZDcloud.google.com/go/texttospeech/apiv1/texttospeechpb;texttospeechpb\xaa\x02\x1cGoogle.Cloud.TextToSpeech.V1\xca\x02\x1cGoogle\\Cloud\\TextToSpeech\\V1\xea\x02\x1fGoogle::Cloud::TextToSpeech::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module TextToSpeech + module V1 + SynthesizeLongAudioRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.SynthesizeLongAudioRequest").msgclass + SynthesizeLongAudioResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.SynthesizeLongAudioResponse").msgclass + SynthesizeLongAudioMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.SynthesizeLongAudioMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_lrs_services_pb.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_lrs_services_pb.rb new file mode 100644 index 000000000000..a814fd22032f --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_lrs_services_pb.rb @@ -0,0 +1,45 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/texttospeech/v1/cloud_tts_lrs.proto for package 'Google.Cloud.TextToSpeech.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/texttospeech/v1/cloud_tts_lrs_pb' + +module Google + module Cloud + module TextToSpeech + module V1 + module TextToSpeechLongAudioSynthesize + # Service that implements Google Cloud Text-to-Speech API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.texttospeech.v1.TextToSpeechLongAudioSynthesize' + + # Synthesizes long form text asynchronously. + rpc :SynthesizeLongAudio, ::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_pb.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_pb.rb new file mode 100644 index 000000000000..073184080aaf --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_pb.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/texttospeech/v1/cloud_tts.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n,google/cloud/texttospeech/v1/cloud_tts.proto\x12\x1cgoogle.cloud.texttospeech.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"/\n\x11ListVoicesRequest\x12\x1a\n\rlanguage_code\x18\x01 \x01(\tB\x03\xe0\x41\x01\"I\n\x12ListVoicesResponse\x12\x33\n\x06voices\x18\x01 \x03(\x0b\x32#.google.cloud.texttospeech.v1.Voice\"\x94\x01\n\x05Voice\x12\x16\n\x0elanguage_codes\x18\x01 \x03(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x42\n\x0bssml_gender\x18\x03 \x01(\x0e\x32-.google.cloud.texttospeech.v1.SsmlVoiceGender\x12!\n\x19natural_sample_rate_hertz\x18\x04 \x01(\x05\"\x8a\x01\n\x14\x41\x64vancedVoiceOptions\x12*\n\x1dlow_latency_journey_synthesis\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12$\n\x14relax_safety_filters\x18\x08 \x01(\x08\x42\x06\xe0\x41\x04\xe0\x41\x01\x42 \n\x1e_low_latency_journey_synthesis\"\xdd\x02\n\x17SynthesizeSpeechRequest\x12@\n\x05input\x18\x01 \x01(\x0b\x32,.google.cloud.texttospeech.v1.SynthesisInputB\x03\xe0\x41\x02\x12\x46\n\x05voice\x18\x02 \x01(\x0b\x32\x32.google.cloud.texttospeech.v1.VoiceSelectionParamsB\x03\xe0\x41\x02\x12\x44\n\x0c\x61udio_config\x18\x03 \x01(\x0b\x32).google.cloud.texttospeech.v1.AudioConfigB\x03\xe0\x41\x02\x12W\n\x16\x61\x64vanced_voice_options\x18\x08 \x01(\x0b\x32\x32.google.cloud.texttospeech.v1.AdvancedVoiceOptionsH\x00\x88\x01\x01\x42\x19\n\x17_advanced_voice_options\"\xa2\x03\n\x19\x43ustomPronunciationParams\x12\x13\n\x06phrase\x18\x01 \x01(\tH\x00\x88\x01\x01\x12h\n\x11phonetic_encoding\x18\x02 \x01(\x0e\x32H.google.cloud.texttospeech.v1.CustomPronunciationParams.PhoneticEncodingH\x01\x88\x01\x01\x12\x1a\n\rpronunciation\x18\x03 \x01(\tH\x02\x88\x01\x01\"\xb6\x01\n\x10PhoneticEncoding\x12!\n\x1dPHONETIC_ENCODING_UNSPECIFIED\x10\x00\x12\x19\n\x15PHONETIC_ENCODING_IPA\x10\x01\x12\x1d\n\x19PHONETIC_ENCODING_X_SAMPA\x10\x02\x12\'\n#PHONETIC_ENCODING_JAPANESE_YOMIGANA\x10\x03\x12\x1c\n\x18PHONETIC_ENCODING_PINYIN\x10\x04\x42\t\n\x07_phraseB\x14\n\x12_phonetic_encodingB\x10\n\x0e_pronunciation\"g\n\x14\x43ustomPronunciations\x12O\n\x0epronunciations\x18\x01 \x03(\x0b\x32\x37.google.cloud.texttospeech.v1.CustomPronunciationParams\"\x90\x01\n\x12MultiSpeakerMarkup\x12I\n\x05turns\x18\x01 \x03(\x0b\x32\x35.google.cloud.texttospeech.v1.MultiSpeakerMarkup.TurnB\x03\xe0\x41\x02\x1a/\n\x04Turn\x12\x14\n\x07speaker\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04text\x18\x02 \x01(\tB\x03\xe0\x41\x02\"P\n\x19MultispeakerPrebuiltVoice\x12\x1a\n\rspeaker_alias\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nspeaker_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"v\n\x17MultiSpeakerVoiceConfig\x12[\n\x15speaker_voice_configs\x18\x02 \x03(\x0b\x32\x37.google.cloud.texttospeech.v1.MultispeakerPrebuiltVoiceB\x03\xe0\x41\x02\"\x9c\x02\n\x0eSynthesisInput\x12\x0e\n\x04text\x18\x01 \x01(\tH\x00\x12\x10\n\x06markup\x18\x05 \x01(\tH\x00\x12\x0e\n\x04ssml\x18\x02 \x01(\tH\x00\x12P\n\x14multi_speaker_markup\x18\x04 \x01(\x0b\x32\x30.google.cloud.texttospeech.v1.MultiSpeakerMarkupH\x00\x12\x13\n\x06prompt\x18\x06 \x01(\tH\x01\x88\x01\x01\x12V\n\x15\x63ustom_pronunciations\x18\x03 \x01(\x0b\x32\x32.google.cloud.texttospeech.v1.CustomPronunciationsB\x03\xe0\x41\x01\x42\x0e\n\x0cinput_sourceB\t\n\x07_prompt\"\x8e\x03\n\x14VoiceSelectionParams\x12\x1a\n\rlanguage_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x42\n\x0bssml_gender\x18\x03 \x01(\x0e\x32-.google.cloud.texttospeech.v1.SsmlVoiceGender\x12\x45\n\x0c\x63ustom_voice\x18\x04 \x01(\x0b\x32/.google.cloud.texttospeech.v1.CustomVoiceParams\x12H\n\x0bvoice_clone\x18\x05 \x01(\x0b\x32..google.cloud.texttospeech.v1.VoiceCloneParamsB\x03\xe0\x41\x01\x12\x17\n\nmodel_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12^\n\x1amulti_speaker_voice_config\x18\x07 \x01(\x0b\x32\x35.google.cloud.texttospeech.v1.MultiSpeakerVoiceConfigB\x03\xe0\x41\x01\"\xf1\x01\n\x0b\x41udioConfig\x12H\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32+.google.cloud.texttospeech.v1.AudioEncodingB\x03\xe0\x41\x02\x12\x1d\n\rspeaking_rate\x18\x02 \x01(\x01\x42\x06\xe0\x41\x04\xe0\x41\x01\x12\x15\n\x05pitch\x18\x03 \x01(\x01\x42\x06\xe0\x41\x04\xe0\x41\x01\x12\x1e\n\x0evolume_gain_db\x18\x04 \x01(\x01\x42\x06\xe0\x41\x04\xe0\x41\x01\x12\x1e\n\x11sample_rate_hertz\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\"\n\x12\x65\x66\x66\x65\x63ts_profile_id\x18\x06 \x03(\tB\x06\xe0\x41\x04\xe0\x41\x01\"\xf1\x01\n\x11\x43ustomVoiceParams\x12\x32\n\x05model\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12\\\n\x0ereported_usage\x18\x03 \x01(\x0e\x32=.google.cloud.texttospeech.v1.CustomVoiceParams.ReportedUsageB\x05\x18\x01\xe0\x41\x01\"J\n\rReportedUsage\x12\x1e\n\x1aREPORTED_USAGE_UNSPECIFIED\x10\x00\x12\x0c\n\x08REALTIME\x10\x01\x12\x0b\n\x07OFFLINE\x10\x02\"2\n\x10VoiceCloneParams\x12\x1e\n\x11voice_cloning_key\x18\x01 \x01(\tB\x03\xe0\x41\x02\"1\n\x18SynthesizeSpeechResponse\x12\x15\n\raudio_content\x18\x01 \x01(\x0c\"\x9f\x01\n\x14StreamingAudioConfig\x12H\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32+.google.cloud.texttospeech.v1.AudioEncodingB\x03\xe0\x41\x02\x12\x1e\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1d\n\rspeaking_rate\x18\x03 \x01(\x01\x42\x06\xe0\x41\x04\xe0\x41\x01\"\x94\x02\n\x19StreamingSynthesizeConfig\x12\x46\n\x05voice\x18\x01 \x01(\x0b\x32\x32.google.cloud.texttospeech.v1.VoiceSelectionParamsB\x03\xe0\x41\x02\x12W\n\x16streaming_audio_config\x18\x04 \x01(\x0b\x32\x32.google.cloud.texttospeech.v1.StreamingAudioConfigB\x03\xe0\x41\x01\x12V\n\x15\x63ustom_pronunciations\x18\x05 \x01(\x0b\x32\x32.google.cloud.texttospeech.v1.CustomPronunciationsB\x03\xe0\x41\x01\"\xbd\x01\n\x17StreamingSynthesisInput\x12\x0e\n\x04text\x18\x01 \x01(\tH\x00\x12\x10\n\x06markup\x18\x05 \x01(\tH\x00\x12P\n\x14multi_speaker_markup\x18\x07 \x01(\x0b\x32\x30.google.cloud.texttospeech.v1.MultiSpeakerMarkupH\x00\x12\x13\n\x06prompt\x18\x06 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0cinput_sourceB\t\n\x07_prompt\"\xce\x01\n\x1aStreamingSynthesizeRequest\x12S\n\x10streaming_config\x18\x01 \x01(\x0b\x32\x37.google.cloud.texttospeech.v1.StreamingSynthesizeConfigH\x00\x12\x46\n\x05input\x18\x02 \x01(\x0b\x32\x35.google.cloud.texttospeech.v1.StreamingSynthesisInputH\x00\x42\x13\n\x11streaming_request\"4\n\x1bStreamingSynthesizeResponse\x12\x15\n\raudio_content\x18\x01 \x01(\x0c*W\n\x0fSsmlVoiceGender\x12!\n\x1dSSML_VOICE_GENDER_UNSPECIFIED\x10\x00\x12\x08\n\x04MALE\x10\x01\x12\n\n\x06\x46\x45MALE\x10\x02\x12\x0b\n\x07NEUTRAL\x10\x03*{\n\rAudioEncoding\x12\x1e\n\x1a\x41UDIO_ENCODING_UNSPECIFIED\x10\x00\x12\x0c\n\x08LINEAR16\x10\x01\x12\x07\n\x03MP3\x10\x02\x12\x0c\n\x08OGG_OPUS\x10\x03\x12\t\n\x05MULAW\x10\x05\x12\x08\n\x04\x41LAW\x10\x06\x12\x07\n\x03PCM\x10\x07\x12\x07\n\x03M4A\x10\x08\x32\xc7\x04\n\x0cTextToSpeech\x12\x93\x01\n\nListVoices\x12/.google.cloud.texttospeech.v1.ListVoicesRequest\x1a\x30.google.cloud.texttospeech.v1.ListVoicesResponse\"\"\xda\x41\rlanguage_code\x82\xd3\xe4\x93\x02\x0c\x12\n/v1/voices\x12\xbc\x01\n\x10SynthesizeSpeech\x12\x35.google.cloud.texttospeech.v1.SynthesizeSpeechRequest\x1a\x36.google.cloud.texttospeech.v1.SynthesizeSpeechResponse\"9\xda\x41\x18input,voice,audio_config\x82\xd3\xe4\x93\x02\x18\"\x13/v1/text:synthesize:\x01*\x12\x90\x01\n\x13StreamingSynthesize\x12\x38.google.cloud.texttospeech.v1.StreamingSynthesizeRequest\x1a\x39.google.cloud.texttospeech.v1.StreamingSynthesizeResponse\"\x00(\x01\x30\x01\x1aO\xca\x41\x1btexttospeech.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbc\x02\n com.google.cloud.texttospeech.v1B\x11TextToSpeechProtoP\x01ZDcloud.google.com/go/texttospeech/apiv1/texttospeechpb;texttospeechpb\xa2\x02\x04\x43TTS\xaa\x02\x1cGoogle.Cloud.TextToSpeech.V1\xca\x02\x1cGoogle\\Cloud\\TextToSpeech\\V1\xea\x02\x1fGoogle::Cloud::TextToSpeech::V1\xea\x41U\n\x1b\x61utoml.googleapis.com/Model\x12\x36projects/{project}/locations/{location}/models/{model}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module TextToSpeech + module V1 + ListVoicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.ListVoicesRequest").msgclass + ListVoicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.ListVoicesResponse").msgclass + Voice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.Voice").msgclass + AdvancedVoiceOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.AdvancedVoiceOptions").msgclass + SynthesizeSpeechRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.SynthesizeSpeechRequest").msgclass + CustomPronunciationParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.CustomPronunciationParams").msgclass + CustomPronunciationParams::PhoneticEncoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.CustomPronunciationParams.PhoneticEncoding").enummodule + CustomPronunciations = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.CustomPronunciations").msgclass + MultiSpeakerMarkup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.MultiSpeakerMarkup").msgclass + MultiSpeakerMarkup::Turn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.MultiSpeakerMarkup.Turn").msgclass + MultispeakerPrebuiltVoice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.MultispeakerPrebuiltVoice").msgclass + MultiSpeakerVoiceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.MultiSpeakerVoiceConfig").msgclass + SynthesisInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.SynthesisInput").msgclass + VoiceSelectionParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.VoiceSelectionParams").msgclass + AudioConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.AudioConfig").msgclass + CustomVoiceParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.CustomVoiceParams").msgclass + CustomVoiceParams::ReportedUsage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.CustomVoiceParams.ReportedUsage").enummodule + VoiceCloneParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.VoiceCloneParams").msgclass + SynthesizeSpeechResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.SynthesizeSpeechResponse").msgclass + StreamingAudioConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.StreamingAudioConfig").msgclass + StreamingSynthesizeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.StreamingSynthesizeConfig").msgclass + StreamingSynthesisInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.StreamingSynthesisInput").msgclass + StreamingSynthesizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.StreamingSynthesizeRequest").msgclass + StreamingSynthesizeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.StreamingSynthesizeResponse").msgclass + SsmlVoiceGender = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.SsmlVoiceGender").enummodule + AudioEncoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.AudioEncoding").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_services_pb.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_services_pb.rb new file mode 100644 index 000000000000..45222db99258 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/texttospeech/v1/cloud_tts.proto for package 'Google.Cloud.TextToSpeech.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/texttospeech/v1/cloud_tts_pb' + +module Google + module Cloud + module TextToSpeech + module V1 + module TextToSpeech + # Service that implements Google Cloud Text-to-Speech API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.texttospeech.v1.TextToSpeech' + + # Returns a list of Voice supported for synthesis. + rpc :ListVoices, ::Google::Cloud::TextToSpeech::V1::ListVoicesRequest, ::Google::Cloud::TextToSpeech::V1::ListVoicesResponse + # Synthesizes speech synchronously: receive results after all text input + # has been processed. + rpc :SynthesizeSpeech, ::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest, ::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse + # Performs bidirectional streaming speech synthesis: receives audio while + # sending text. + rpc :StreamingSynthesize, stream(::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeRequest), stream(::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeResponse) + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/README.md new file mode 100644 index 000000000000..ccb07287720d --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Text-to-Speech 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-text_to_speech-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # 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. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + # + # Example: + # + # 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 + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # 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 + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # 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 + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1/proto_docs/google/cloud/texttospeech/v1/cloud_tts.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/cloud/texttospeech/v1/cloud_tts.rb new file mode 100644 index 000000000000..957a73931130 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/cloud/texttospeech/v1/cloud_tts.rb @@ -0,0 +1,583 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module TextToSpeech + module V1 + # The top-level message sent by the client for the `ListVoices` method. + # @!attribute [rw] language_code + # @return [::String] + # Optional. Recommended. + # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + # If not specified, the API will return all supported voices. + # If specified, the ListVoices call will only return voices that can be used + # to synthesize this language_code. For example, if you specify `"en-NZ"`, + # all `"en-NZ"` voices will be returned. If you specify `"no"`, both + # `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be + # returned. + class ListVoicesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The message returned to the client by the `ListVoices` method. + # @!attribute [rw] voices + # @return [::Array<::Google::Cloud::TextToSpeech::V1::Voice>] + # The list of voices. + class ListVoicesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Description of a voice supported by the TTS service. + # @!attribute [rw] language_codes + # @return [::Array<::String>] + # The languages that this voice supports, expressed as + # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g. + # "en-US", "es-419", "cmn-tw"). + # @!attribute [rw] name + # @return [::String] + # The name of this voice. Each distinct voice has a unique name. + # @!attribute [rw] ssml_gender + # @return [::Google::Cloud::TextToSpeech::V1::SsmlVoiceGender] + # The gender of this voice. + # @!attribute [rw] natural_sample_rate_hertz + # @return [::Integer] + # The natural sample rate (in hertz) for this voice. + class Voice + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Used for advanced voice options. + # @!attribute [rw] low_latency_journey_synthesis + # @return [::Boolean] + # Only for Journey voices. If false, the synthesis is context aware + # and has a higher latency. + # @!attribute [rw] relax_safety_filters + # @return [::Boolean] + # Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only + # supported for accounts linked to Invoiced (Offline) Cloud billing accounts. + # Otherwise, will return result + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + class AdvancedVoiceOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The top-level message sent by the client for the `SynthesizeSpeech` method. + # @!attribute [rw] input + # @return [::Google::Cloud::TextToSpeech::V1::SynthesisInput] + # Required. The Synthesizer requires either plain text or SSML as input. + # @!attribute [rw] voice + # @return [::Google::Cloud::TextToSpeech::V1::VoiceSelectionParams] + # Required. The desired voice of the synthesized audio. + # @!attribute [rw] audio_config + # @return [::Google::Cloud::TextToSpeech::V1::AudioConfig] + # Required. The configuration of the synthesized audio. + # @!attribute [rw] advanced_voice_options + # @return [::Google::Cloud::TextToSpeech::V1::AdvancedVoiceOptions] + # Advanced voice options. + class SynthesizeSpeechRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Pronunciation customization for a phrase. + # @!attribute [rw] phrase + # @return [::String] + # The phrase to which the customization is applied. + # The phrase can be multiple words, such as proper nouns, but shouldn't span + # the length of the sentence. + # @!attribute [rw] phonetic_encoding + # @return [::Google::Cloud::TextToSpeech::V1::CustomPronunciationParams::PhoneticEncoding] + # The phonetic encoding of the phrase. + # @!attribute [rw] pronunciation + # @return [::String] + # The pronunciation of the phrase. This must be in the phonetic encoding + # specified above. + class CustomPronunciationParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The phonetic encoding of the phrase. + module PhoneticEncoding + # Not specified. + PHONETIC_ENCODING_UNSPECIFIED = 0 + + # IPA, such as apple -> ˈæpəl. + # https://en.wikipedia.org/wiki/International_Phonetic_Alphabet + PHONETIC_ENCODING_IPA = 1 + + # X-SAMPA, such as apple -> "{p@l". + # https://en.wikipedia.org/wiki/X-SAMPA + PHONETIC_ENCODING_X_SAMPA = 2 + + # For reading-to-pron conversion to work well, the `pronunciation` field + # should only contain Kanji, Hiragana, and Katakana. + # + # The pronunciation can also contain pitch accents. + # The start of a pitch phrase is specified with `^` and the down-pitch + # position is specified with `!`, for example: + # + # phrase:端 pronunciation:^はし + # phrase:箸 pronunciation:^は!し + # phrase:橋 pronunciation:^はし! + # + # We currently only support the Tokyo dialect, which allows at most one + # down-pitch per phrase (i.e. at most one `!` between `^`). + PHONETIC_ENCODING_JAPANESE_YOMIGANA = 3 + + # Used to specify pronunciations for Mandarin words. See + # https://en.wikipedia.org/wiki/Pinyin. + # + # For example: 朝阳, the pronunciation is "chao2 yang2". The number + # represents the tone, and there is a space between syllables. Neutral + # tones are represented by 5, for example 孩子 "hai2 zi5". + PHONETIC_ENCODING_PINYIN = 4 + end + end + + # A collection of pronunciation customizations. + # @!attribute [rw] pronunciations + # @return [::Array<::Google::Cloud::TextToSpeech::V1::CustomPronunciationParams>] + # The pronunciation customizations are applied. + class CustomPronunciations + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A collection of turns for multi-speaker synthesis. + # @!attribute [rw] turns + # @return [::Array<::Google::Cloud::TextToSpeech::V1::MultiSpeakerMarkup::Turn>] + # Required. Speaker turns. + class MultiSpeakerMarkup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A multi-speaker turn. + # @!attribute [rw] speaker + # @return [::String] + # Required. The speaker of the turn, for example, 'O' or 'Q'. Please refer + # to documentation for available speakers. + # @!attribute [rw] text + # @return [::String] + # Required. The text to speak. + class Turn + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Configuration for a single speaker in a Gemini TTS multi-speaker setup. + # Enables dialogue between two speakers. + # @!attribute [rw] speaker_alias + # @return [::String] + # Required. The speaker alias of the voice. This is the user-chosen speaker + # name that is used in the multispeaker text input, such as "Speaker1". + # @!attribute [rw] speaker_id + # @return [::String] + # Required. The speaker ID of the voice. See + # https://cloud.google.com/text-to-speech/docs/gemini-tts#voice_options + # for available values. + class MultispeakerPrebuiltVoice + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for a multi-speaker text-to-speech setup. Enables the use of up + # to two distinct voices in a single synthesis request. + # @!attribute [rw] speaker_voice_configs + # @return [::Array<::Google::Cloud::TextToSpeech::V1::MultispeakerPrebuiltVoice>] + # Required. A list of configurations for the voices of the speakers. Exactly + # two speaker voice configurations must be provided. + class MultiSpeakerVoiceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains text input to be synthesized. Either `text` or `ssml` must be + # supplied. Supplying both or neither returns + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. The + # input size is limited to 5000 bytes. + # @!attribute [rw] text + # @return [::String] + # The raw text to be synthesized. + # + # Note: The following fields are mutually exclusive: `text`, `markup`, `ssml`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] markup + # @return [::String] + # Markup for HD voices specifically. This field may not be used with any + # other voices. + # + # Note: The following fields are mutually exclusive: `markup`, `text`, `ssml`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] ssml + # @return [::String] + # The SSML document to be synthesized. The SSML document must be valid + # and well-formed. Otherwise the RPC will fail and return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. For + # more information, see + # [SSML](https://cloud.google.com/text-to-speech/docs/ssml). + # + # Note: The following fields are mutually exclusive: `ssml`, `text`, `markup`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] multi_speaker_markup + # @return [::Google::Cloud::TextToSpeech::V1::MultiSpeakerMarkup] + # The multi-speaker input to be synthesized. Only applicable for + # multi-speaker synthesis. + # + # Note: The following fields are mutually exclusive: `multi_speaker_markup`, `text`, `markup`, `ssml`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] prompt + # @return [::String] + # This system instruction is supported only for controllable/promptable voice + # models. If this system instruction is used, we pass the unedited text to + # Gemini-TTS. Otherwise, a default system instruction is used. AI Studio + # calls this system instruction, Style Instructions. + # @!attribute [rw] custom_pronunciations + # @return [::Google::Cloud::TextToSpeech::V1::CustomPronunciations] + # Optional. The pronunciation customizations are applied to the input. If + # this is set, the input is synthesized using the given pronunciation + # customizations. + # + # The initial support is for en-us, with plans to expand to other locales in + # the future. Instant Clone voices aren't supported. + # + # In order to customize the pronunciation of a phrase, there must be an exact + # match of the phrase in the input types. If using SSML, the phrase must not + # be inside a phoneme tag. + class SynthesisInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Description of which voice to use for a synthesis request. + # @!attribute [rw] language_code + # @return [::String] + # Required. The language (and potentially also the region) of the voice + # expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + # language tag, e.g. "en-US". This should not include a script tag (e.g. use + # "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred + # from the input provided in the SynthesisInput. The TTS service + # will use this parameter to help choose an appropriate voice. Note that + # the TTS service may choose a voice with a slightly different language code + # than the one selected; it may substitute a different region + # (e.g. using en-US rather than en-CA if there isn't a Canadian voice + # available), or even a different language, e.g. using "nb" (Norwegian + # Bokmal) instead of "no" (Norwegian)". + # @!attribute [rw] name + # @return [::String] + # The name of the voice. If both the name and the gender are not set, + # the service will choose a voice based on the other parameters such as + # language_code. + # @!attribute [rw] ssml_gender + # @return [::Google::Cloud::TextToSpeech::V1::SsmlVoiceGender] + # The preferred gender of the voice. If not set, the service will + # choose a voice based on the other parameters such as language_code and + # name. Note that this is only a preference, not requirement; if a + # voice of the appropriate gender is not available, the synthesizer should + # substitute a voice with a different gender rather than failing the request. + # @!attribute [rw] custom_voice + # @return [::Google::Cloud::TextToSpeech::V1::CustomVoiceParams] + # The configuration for a custom voice. If [CustomVoiceParams.model] is set, + # the service will choose the custom voice matching the specified + # configuration. + # @!attribute [rw] voice_clone + # @return [::Google::Cloud::TextToSpeech::V1::VoiceCloneParams] + # Optional. The configuration for a voice clone. If + # [VoiceCloneParams.voice_clone_key] is set, the service chooses the voice + # clone matching the specified configuration. + # @!attribute [rw] model_name + # @return [::String] + # Optional. The name of the model. If set, the service will choose the model + # matching the specified configuration. + # @!attribute [rw] multi_speaker_voice_config + # @return [::Google::Cloud::TextToSpeech::V1::MultiSpeakerVoiceConfig] + # Optional. The configuration for a Gemini multi-speaker text-to-speech + # setup. Enables the use of two distinct voices in a single synthesis + # request. + class VoiceSelectionParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Description of audio data to be synthesized. + # @!attribute [rw] audio_encoding + # @return [::Google::Cloud::TextToSpeech::V1::AudioEncoding] + # Required. The format of the audio byte stream. + # @!attribute [rw] speaking_rate + # @return [::Float] + # Optional. Input only. Speaking rate/speed, in the range [0.25, 2.0]. 1.0 is + # the normal native speed supported by the specific voice. 2.0 is twice as + # fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 + # speed. Any other values < 0.25 or > 2.0 will return an error. + # @!attribute [rw] pitch + # @return [::Float] + # Optional. Input only. Speaking pitch, in the range [-20.0, 20.0]. 20 means + # increase 20 semitones from the original pitch. -20 means decrease 20 + # semitones from the original pitch. + # @!attribute [rw] volume_gain_db + # @return [::Float] + # Optional. Input only. Volume gain (in dB) of the normal native volume + # supported by the specific voice, in the range [-96.0, 16.0]. If unset, or + # set to a value of 0.0 (dB), will play at normal native signal amplitude. A + # value of -6.0 (dB) will play at approximately half the amplitude of the + # normal native signal amplitude. A value of +6.0 (dB) will play at + # approximately twice the amplitude of the normal native signal amplitude. + # Strongly recommend not to exceed +10 (dB) as there's usually no effective + # increase in loudness for any value greater than that. + # @!attribute [rw] sample_rate_hertz + # @return [::Integer] + # Optional. The synthesis sample rate (in hertz) for this audio. When this is + # specified in SynthesizeSpeechRequest, if this is different from the voice's + # natural sample rate, then the synthesizer will honor this request by + # converting to the desired sample rate (which might result in worse audio + # quality), unless the specified sample rate is not supported for the + # encoding chosen, in which case it will fail the request and return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + # @!attribute [rw] effects_profile_id + # @return [::Array<::String>] + # Optional. Input only. An identifier which selects 'audio effects' profiles + # that are applied on (post synthesized) text to speech. Effects are applied + # on top of each other in the order they are given. See + # [audio + # profiles](https://cloud.google.com/text-to-speech/docs/audio-profiles) for + # current supported profile ids. + class AudioConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Description of the custom voice to be synthesized. + # @!attribute [rw] model + # @return [::String] + # Required. The name of the AutoML model that synthesizes the custom voice. + # @!attribute [rw] reported_usage + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::TextToSpeech::V1::CustomVoiceParams::ReportedUsage] + # Optional. Deprecated. The usage of the synthesized audio to be reported. + class CustomVoiceParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Deprecated. The usage of the synthesized audio. Usage does not affect + # billing. + module ReportedUsage + # Request with reported usage unspecified will be rejected. + REPORTED_USAGE_UNSPECIFIED = 0 + + # For scenarios where the synthesized audio is not downloadable and can + # only be used once. For example, real-time request in IVR system. + REALTIME = 1 + + # For scenarios where the synthesized audio is downloadable and can be + # reused. For example, the synthesized audio is downloaded, stored in + # customer service system and played repeatedly. + OFFLINE = 2 + end + end + + # The configuration of Voice Clone feature. + # @!attribute [rw] voice_cloning_key + # @return [::String] + # Required. Created by GenerateVoiceCloningKey. + class VoiceCloneParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The message returned to the client by the `SynthesizeSpeech` method. + # @!attribute [rw] audio_content + # @return [::String] + # The audio data bytes encoded as specified in the request, including the + # header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS). + # For LINEAR16 audio, we include the WAV header. Note: as + # with all bytes fields, protobuffers use a pure binary representation, + # whereas JSON representations use base64. + class SynthesizeSpeechResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Description of the desired output audio data. + # @!attribute [rw] audio_encoding + # @return [::Google::Cloud::TextToSpeech::V1::AudioEncoding] + # Required. The format of the audio byte stream. + # Streaming supports PCM, ALAW, MULAW and OGG_OPUS. All other encodings + # return an error. + # @!attribute [rw] sample_rate_hertz + # @return [::Integer] + # Optional. The synthesis sample rate (in hertz) for this audio. + # @!attribute [rw] speaking_rate + # @return [::Float] + # Optional. Input only. Speaking rate/speed, in the range [0.25, 2.0]. 1.0 is + # the normal native speed supported by the specific voice. 2.0 is twice as + # fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 + # speed. Any other values < 0.25 or > 2.0 will return an error. + class StreamingAudioConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides configuration information for the StreamingSynthesize request. + # @!attribute [rw] voice + # @return [::Google::Cloud::TextToSpeech::V1::VoiceSelectionParams] + # Required. The desired voice of the synthesized audio. + # @!attribute [rw] streaming_audio_config + # @return [::Google::Cloud::TextToSpeech::V1::StreamingAudioConfig] + # Optional. The configuration of the synthesized audio. + # @!attribute [rw] custom_pronunciations + # @return [::Google::Cloud::TextToSpeech::V1::CustomPronunciations] + # Optional. The pronunciation customizations are applied to the input. If + # this is set, the input is synthesized using the given pronunciation + # customizations. + # + # The initial support is for en-us, with plans to expand to other locales in + # the future. Instant Clone voices aren't supported. + # + # In order to customize the pronunciation of a phrase, there must be an exact + # match of the phrase in the input types. If using SSML, the phrase must not + # be inside a phoneme tag. + class StreamingSynthesizeConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input to be synthesized. + # @!attribute [rw] text + # @return [::String] + # The raw text to be synthesized. It is recommended that each input + # contains complete, terminating sentences, which results in better prosody + # in the output audio. + # + # Note: The following fields are mutually exclusive: `text`, `markup`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] markup + # @return [::String] + # Markup for HD voices specifically. This field may not be used with any + # other voices. + # + # Note: The following fields are mutually exclusive: `markup`, `text`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] multi_speaker_markup + # @return [::Google::Cloud::TextToSpeech::V1::MultiSpeakerMarkup] + # Multi-speaker markup for Gemini TTS. This field may not + # be used with any other voices. + # + # Note: The following fields are mutually exclusive: `multi_speaker_markup`, `text`, `markup`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] prompt + # @return [::String] + # This is system instruction supported only for controllable voice models. + class StreamingSynthesisInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `StreamingSynthesize` method. Multiple + # `StreamingSynthesizeRequest` messages are sent in one call. + # The first message must contain a `streaming_config` that + # fully specifies the request configuration and must not contain `input`. All + # subsequent messages must only have `input` set. + # @!attribute [rw] streaming_config + # @return [::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeConfig] + # StreamingSynthesizeConfig to be used in this streaming attempt. Only + # specified in the first message sent in a `StreamingSynthesize` call. + # + # Note: The following fields are mutually exclusive: `streaming_config`, `input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] input + # @return [::Google::Cloud::TextToSpeech::V1::StreamingSynthesisInput] + # Input to synthesize. Specified in all messages but the first in a + # `StreamingSynthesize` call. + # + # Note: The following fields are mutually exclusive: `input`, `streaming_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class StreamingSynthesizeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `StreamingSynthesizeResponse` is the only message returned to the + # client by `StreamingSynthesize` method. A series of zero or more + # `StreamingSynthesizeResponse` messages are streamed back to the client. + # @!attribute [rw] audio_content + # @return [::String] + # The audio data bytes encoded as specified in the request. This is + # headerless LINEAR16 audio with a sample rate of 24000. + class StreamingSynthesizeResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Gender of the voice as described in + # [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice). + module SsmlVoiceGender + # An unspecified gender. + # In VoiceSelectionParams, this means that the client doesn't care which + # gender the selected voice will have. In the Voice field of + # ListVoicesResponse, this may mean that the voice doesn't fit any of the + # other categories in this enum, or that the gender of the voice isn't known. + SSML_VOICE_GENDER_UNSPECIFIED = 0 + + # A male voice. + MALE = 1 + + # A female voice. + FEMALE = 2 + + # A gender-neutral voice. This voice is not yet supported. + NEUTRAL = 3 + end + + # Configuration to set up audio encoder. The encoding determines the output + # audio format that we'd like. + module AudioEncoding + # Not specified. Only used by GenerateVoiceCloningKey. Otherwise, will return + # result + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + AUDIO_ENCODING_UNSPECIFIED = 0 + + # Uncompressed 16-bit signed little-endian samples (Linear PCM). + # Audio content returned as LINEAR16 also contains a WAV header. + LINEAR16 = 1 + + # MP3 audio at 32kbps. + MP3 = 2 + + # Opus encoded audio wrapped in an ogg container. The result is a + # file which can be played natively on Android, and in browsers (at least + # Chrome and Firefox). The quality of the encoding is considerably higher + # than MP3 while using approximately the same bitrate. + OGG_OPUS = 3 + + # 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. + # Audio content returned as MULAW also contains a WAV header. + MULAW = 5 + + # 8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law. + # Audio content returned as ALAW also contains a WAV header. + ALAW = 6 + + # Uncompressed 16-bit signed little-endian samples (Linear PCM). + # Note that as opposed to LINEAR16, audio won't be wrapped in a WAV (or + # any other) header. + PCM = 7 + + # M4A audio. + M4A = 8 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/cloud/texttospeech/v1/cloud_tts_lrs.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/cloud/texttospeech/v1/cloud_tts_lrs.rb new file mode 100644 index 000000000000..661006f03010 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/cloud/texttospeech/v1/cloud_tts_lrs.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module TextToSpeech + module V1 + # The top-level message sent by the client for the + # `SynthesizeLongAudio` method. + # @!attribute [rw] parent + # @return [::String] + # The resource states of the request in the form of + # `projects/*/locations/*`. + # @!attribute [rw] input + # @return [::Google::Cloud::TextToSpeech::V1::SynthesisInput] + # Required. The Synthesizer requires either plain text or SSML as input. + # @!attribute [rw] audio_config + # @return [::Google::Cloud::TextToSpeech::V1::AudioConfig] + # Required. The configuration of the synthesized audio. + # @!attribute [rw] output_gcs_uri + # @return [::String] + # Required. Specifies a Cloud Storage URI for the synthesis results. Must be + # specified in the format: `gs://bucket_name/object_name`, and the bucket + # must already exist. + # @!attribute [rw] voice + # @return [::Google::Cloud::TextToSpeech::V1::VoiceSelectionParams] + # Required. The desired voice of the synthesized audio. + class SynthesizeLongAudioRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The message returned to the client by the `SynthesizeLongAudio` method. + class SynthesizeLongAudioResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for response returned by the `SynthesizeLongAudio` method. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Time when the request was received. + # @!attribute [rw] last_update_time + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::Timestamp] + # Deprecated. Do not use. + # @!attribute [rw] progress_percentage + # @return [::Float] + # The progress of the most recent processing update in percentage, ie. 70.0%. + class SynthesizeLongAudioMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/Gemfile new file mode 100644 index 000000000000..7976a33d4ee6 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1", path: "../" +else + gem "google-cloud-text_to_speech-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-text_to_speech-v1/snippets/snippet_metadata_google.cloud.texttospeech.v1.json b/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/snippet_metadata_google.cloud.texttospeech.v1.json new file mode 100644 index 000000000000..69310b5a3978 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/snippet_metadata_google.cloud.texttospeech.v1.json @@ -0,0 +1,175 @@ +{ + "client_library": { + "name": "google-cloud-text_to_speech-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.texttospeech.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "texttospeech_v1_generated_TextToSpeech_ListVoices_sync", + "title": "Snippet for the list_voices call in the TextToSpeech service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TextToSpeech::V1::TextToSpeech::Client#list_voices.", + "file": "text_to_speech/list_voices.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_voices", + "full_name": "::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client#list_voices", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TextToSpeech::V1::ListVoicesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TextToSpeech::V1::ListVoicesResponse", + "client": { + "short_name": "TextToSpeech::Client", + "full_name": "::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client" + }, + "method": { + "short_name": "ListVoices", + "full_name": "google.cloud.texttospeech.v1.TextToSpeech.ListVoices", + "service": { + "short_name": "TextToSpeech", + "full_name": "google.cloud.texttospeech.v1.TextToSpeech" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "texttospeech_v1_generated_TextToSpeech_SynthesizeSpeech_sync", + "title": "Snippet for the synthesize_speech call in the TextToSpeech service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TextToSpeech::V1::TextToSpeech::Client#synthesize_speech.", + "file": "text_to_speech/synthesize_speech.rb", + "language": "RUBY", + "client_method": { + "short_name": "synthesize_speech", + "full_name": "::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client#synthesize_speech", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse", + "client": { + "short_name": "TextToSpeech::Client", + "full_name": "::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client" + }, + "method": { + "short_name": "SynthesizeSpeech", + "full_name": "google.cloud.texttospeech.v1.TextToSpeech.SynthesizeSpeech", + "service": { + "short_name": "TextToSpeech", + "full_name": "google.cloud.texttospeech.v1.TextToSpeech" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "texttospeech_v1_generated_TextToSpeech_StreamingSynthesize_sync", + "title": "Snippet for the streaming_synthesize call in the TextToSpeech service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TextToSpeech::V1::TextToSpeech::Client#streaming_synthesize.", + "file": "text_to_speech/streaming_synthesize.rb", + "language": "RUBY", + "client_method": { + "short_name": "streaming_synthesize", + "full_name": "::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client#streaming_synthesize", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeResponse", + "client": { + "short_name": "TextToSpeech::Client", + "full_name": "::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client" + }, + "method": { + "short_name": "StreamingSynthesize", + "full_name": "google.cloud.texttospeech.v1.TextToSpeech.StreamingSynthesize", + "service": { + "short_name": "TextToSpeech", + "full_name": "google.cloud.texttospeech.v1.TextToSpeech" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 55, + "type": "FULL" + } + ] + }, + { + "region_tag": "texttospeech_v1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_sync", + "title": "Snippet for the synthesize_long_audio call in the TextToSpeechLongAudioSynthesize service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client#synthesize_long_audio.", + "file": "text_to_speech_long_audio_synthesize/synthesize_long_audio.rb", + "language": "RUBY", + "client_method": { + "short_name": "synthesize_long_audio", + "full_name": "::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client#synthesize_long_audio", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "TextToSpeechLongAudioSynthesize::Client", + "full_name": "::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client" + }, + "method": { + "short_name": "SynthesizeLongAudio", + "full_name": "google.cloud.texttospeech.v1.TextToSpeechLongAudioSynthesize.SynthesizeLongAudio", + "service": { + "short_name": "TextToSpeechLongAudioSynthesize", + "full_name": "google.cloud.texttospeech.v1.TextToSpeechLongAudioSynthesize" + } + } + }, + "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-text_to_speech-v1/snippets/text_to_speech/list_voices.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech/list_voices.rb new file mode 100644 index 000000000000..dcedec6e5a0c --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech/list_voices.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 texttospeech_v1_generated_TextToSpeech_ListVoices_sync] +require "google/cloud/text_to_speech/v1" + +## +# Snippet for the list_voices call in the TextToSpeech service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TextToSpeech::V1::TextToSpeech::Client#list_voices. +# +def list_voices + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TextToSpeech::V1::ListVoicesRequest.new + + # Call the list_voices method. + result = client.list_voices request + + # The returned object is of type Google::Cloud::TextToSpeech::V1::ListVoicesResponse. + p result +end +# [END texttospeech_v1_generated_TextToSpeech_ListVoices_sync] diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech/streaming_synthesize.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech/streaming_synthesize.rb new file mode 100644 index 000000000000..12502cdb1184 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech/streaming_synthesize.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 texttospeech_v1_generated_TextToSpeech_StreamingSynthesize_sync] +require "google/cloud/text_to_speech/v1" + +## +# Snippet for the streaming_synthesize call in the TextToSpeech service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TextToSpeech::V1::TextToSpeech::Client#streaming_synthesize. +# +def streaming_synthesize + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new + + # Create an input stream. + input = Gapic::StreamInput.new + + # Call the streaming_synthesize method to start streaming. + output = client.streaming_synthesize 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::TextToSpeech::V1::StreamingSynthesizeRequest.new + input << Google::Cloud::TextToSpeech::V1::StreamingSynthesizeRequest.new + input.close + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeResponse + output.each do |current_response| + p current_response + end +end +# [END texttospeech_v1_generated_TextToSpeech_StreamingSynthesize_sync] diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech/synthesize_speech.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech/synthesize_speech.rb new file mode 100644 index 000000000000..47f43d5a430b --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech/synthesize_speech.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 texttospeech_v1_generated_TextToSpeech_SynthesizeSpeech_sync] +require "google/cloud/text_to_speech/v1" + +## +# Snippet for the synthesize_speech call in the TextToSpeech service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TextToSpeech::V1::TextToSpeech::Client#synthesize_speech. +# +def synthesize_speech + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest.new + + # Call the synthesize_speech method. + result = client.synthesize_speech request + + # The returned object is of type Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse. + p result +end +# [END texttospeech_v1_generated_TextToSpeech_SynthesizeSpeech_sync] diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech_long_audio_synthesize/synthesize_long_audio.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech_long_audio_synthesize/synthesize_long_audio.rb new file mode 100644 index 000000000000..735a14416d4b --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech_long_audio_synthesize/synthesize_long_audio.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 texttospeech_v1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_sync] +require "google/cloud/text_to_speech/v1" + +## +# Snippet for the synthesize_long_audio call in the TextToSpeechLongAudioSynthesize service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client#synthesize_long_audio. +# +def synthesize_long_audio + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest.new + + # Call the synthesize_long_audio method. + result = client.synthesize_long_audio request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END texttospeech_v1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_sync] diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_operations_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_operations_test.rb new file mode 100644 index 000000000000..db4bf31d4508 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_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/texttospeech/v1/cloud_tts_lrs_pb" +require "google/cloud/texttospeech/v1/cloud_tts_lrs_services_pb" +require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize" + +class ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_paths_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_paths_test.rb new file mode 100644 index 000000000000..7b3d9ca4c355 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_paths_test.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 "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize" + +class ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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_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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.model_path project: "value0", location: "value1", model: "value2" + assert_equal "projects/value0/locations/value1/models/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_rest_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_rest_test.rb new file mode 100644 index 000000000000..9163bb0d1bf4 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_rest_test.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 "helper" +require "gapic/rest" +require "google/cloud/texttospeech/v1/cloud_tts_lrs_pb" +require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest" + + +class ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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_synthesize_long_audio + # Create test objects. + 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" + input = {} + audio_config = {} + output_gcs_uri = "hello world" + voice = {} + + synthesize_long_audio_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::ServiceStub.stub :transcode_synthesize_long_audio_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, synthesize_long_audio_client_stub do + # Create client + client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.synthesize_long_audio({ parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.synthesize_long_audio parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.synthesize_long_audio ::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest.new(parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.synthesize_long_audio({ parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.synthesize_long_audio(::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest.new(parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, synthesize_long_audio_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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_test.rb new file mode 100644 index 000000000000..43ec433e106d --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_test.rb @@ -0,0 +1,189 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/texttospeech/v1/cloud_tts_lrs_pb" +require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize" + +class ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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_synthesize_long_audio + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + input = {} + audio_config = {} + output_gcs_uri = "hello world" + voice = {} + + synthesize_long_audio_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :synthesize_long_audio, name + assert_kind_of ::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1::SynthesisInput), request["input"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1::AudioConfig), request["audio_config"] + assert_equal "hello world", request["output_gcs_uri"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1::VoiceSelectionParams), request["voice"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, synthesize_long_audio_client_stub do + # Create client + client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.synthesize_long_audio({ parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.synthesize_long_audio parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.synthesize_long_audio ::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest.new(parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.synthesize_long_audio({ parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.synthesize_long_audio(::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest.new(parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, synthesize_long_audio_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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_paths_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_paths_test.rb new file mode 100644 index 000000000000..9a2c35e6af4b --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_paths_test.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 "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/text_to_speech/v1/text_to_speech" + +class ::Google::Cloud::TextToSpeech::V1::TextToSpeech::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_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::TextToSpeech::V1::TextToSpeech::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.model_path project: "value0", location: "value1", model: "value2" + assert_equal "projects/value0/locations/value1/models/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_rest_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_rest_test.rb new file mode 100644 index 000000000000..a521af9545c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_rest_test.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/texttospeech/v1/cloud_tts_pb" +require "google/cloud/text_to_speech/v1/text_to_speech/rest" + + +class ::Google::Cloud::TextToSpeech::V1::TextToSpeech::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_voices + # Create test objects. + client_result = ::Google::Cloud::TextToSpeech::V1::ListVoicesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + language_code = "hello world" + + list_voices_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::ServiceStub.stub :transcode_list_voices_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_voices_client_stub do + # Create client + client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_voices({ language_code: language_code }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_voices language_code: language_code do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_voices ::Google::Cloud::TextToSpeech::V1::ListVoicesRequest.new(language_code: language_code) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_voices({ language_code: language_code }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_voices(::Google::Cloud::TextToSpeech::V1::ListVoicesRequest.new(language_code: language_code), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_voices_client_stub.call_count + end + end + end + + def test_synthesize_speech + # Create test objects. + client_result = ::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + input = {} + voice = {} + audio_config = {} + advanced_voice_options = {} + + synthesize_speech_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::ServiceStub.stub :transcode_synthesize_speech_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, synthesize_speech_client_stub do + # Create client + client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.synthesize_speech({ input: input, voice: voice, audio_config: audio_config, advanced_voice_options: advanced_voice_options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.synthesize_speech input: input, voice: voice, audio_config: audio_config, advanced_voice_options: advanced_voice_options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.synthesize_speech ::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest.new(input: input, voice: voice, audio_config: audio_config, advanced_voice_options: advanced_voice_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.synthesize_speech({ input: input, voice: voice, audio_config: audio_config, advanced_voice_options: advanced_voice_options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.synthesize_speech(::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest.new(input: input, voice: voice, audio_config: audio_config, advanced_voice_options: advanced_voice_options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, synthesize_speech_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::TextToSpeech::V1::TextToSpeech::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::TextToSpeech::V1::TextToSpeech::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_test.rb new file mode 100644 index 000000000000..ccce604bf027 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_test.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! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/texttospeech/v1/cloud_tts_pb" +require "google/cloud/text_to_speech/v1/text_to_speech" + +class ::Google::Cloud::TextToSpeech::V1::TextToSpeech::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_voices + # Create GRPC objects. + grpc_response = ::Google::Cloud::TextToSpeech::V1::ListVoicesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + language_code = "hello world" + + list_voices_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_voices, name + assert_kind_of ::Google::Cloud::TextToSpeech::V1::ListVoicesRequest, request + assert_equal "hello world", request["language_code"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_voices_client_stub do + # Create client + client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_voices({ language_code: language_code }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_voices language_code: language_code do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_voices ::Google::Cloud::TextToSpeech::V1::ListVoicesRequest.new(language_code: language_code) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_voices({ language_code: language_code }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_voices(::Google::Cloud::TextToSpeech::V1::ListVoicesRequest.new(language_code: language_code), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_voices_client_stub.call_rpc_count + end + end + + def test_synthesize_speech + # Create GRPC objects. + grpc_response = ::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + input = {} + voice = {} + audio_config = {} + advanced_voice_options = {} + + synthesize_speech_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :synthesize_speech, name + assert_kind_of ::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1::SynthesisInput), request["input"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1::VoiceSelectionParams), request["voice"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1::AudioConfig), request["audio_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1::AdvancedVoiceOptions), request["advanced_voice_options"] + assert request.has_advanced_voice_options? + refute_nil options + end + + Gapic::ServiceStub.stub :new, synthesize_speech_client_stub do + # Create client + client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.synthesize_speech({ input: input, voice: voice, audio_config: audio_config, advanced_voice_options: advanced_voice_options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.synthesize_speech input: input, voice: voice, audio_config: audio_config, advanced_voice_options: advanced_voice_options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.synthesize_speech ::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest.new(input: input, voice: voice, audio_config: audio_config, advanced_voice_options: advanced_voice_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.synthesize_speech({ input: input, voice: voice, audio_config: audio_config, advanced_voice_options: advanced_voice_options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.synthesize_speech(::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest.new(input: input, voice: voice, audio_config: audio_config, advanced_voice_options: advanced_voice_options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, synthesize_speech_client_stub.call_rpc_count + end + end + + def test_streaming_synthesize + # Create GRPC objects. + grpc_response = ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeResponse.new + grpc_operation = GRPC::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. + streaming_config = {} + + streaming_synthesize_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :streaming_synthesize, name + assert_kind_of Enumerable, request + refute_nil options + request + end + + Gapic::ServiceStub.stub :new, streaming_synthesize_client_stub do + # Create client + client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new do |config| + config.credentials = grpc_channel + end + + # Use enumerable object with hash and protobuf object. + request_hash = { streaming_config: streaming_config } + request_proto = ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeRequest.new streaming_config: streaming_config + enum_input = [request_hash, request_proto].to_enum + client.streaming_synthesize enum_input do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeResponse, r + end + assert_equal grpc_operation, operation + end + + # Use stream input object (from gapic-common). + request_hash = { streaming_config: streaming_config } + request_proto = ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeRequest.new streaming_config: streaming_config + stream_input = Gapic::StreamInput.new + client.streaming_synthesize stream_input do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeResponse, 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 = { streaming_config: streaming_config } + request_proto = ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeRequest.new streaming_config: streaming_config + enum_input = [request_hash, request_proto].to_enum + client.streaming_synthesize enum_input, grpc_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeResponse, r + end + assert_equal grpc_operation, operation + end + + # Use stream input object (from gapic-common) with options. + request_hash = { streaming_config: streaming_config } + request_proto = ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeRequest.new streaming_config: streaming_config + stream_input = Gapic::StreamInput.new + client.streaming_synthesize stream_input, grpc_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeResponse, 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, streaming_synthesize_client_stub.call_rpc_count + streaming_synthesize_client_stub.requests.each do |request| + request.to_a.each do |r| + assert_kind_of ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeRequest, r + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeConfig), r["streaming_config"] + assert_equal :streaming_config, r.streaming_request + end + end + 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::TextToSpeech::V1::TextToSpeech::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::TextToSpeech::V1::TextToSpeech::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::TextToSpeech::V1::TextToSpeech::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/test/helper.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.gitignore b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.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-text_to_speech-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.repo-metadata.json new file mode 100644 index 000000000000..62505f56579f --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "texttospeech.googleapis.com", + "api_shortname": "texttospeech", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1beta1/latest", + "distribution_name": "google-cloud-text_to_speech-v1beta1", + "is_cloud": true, + "language": "ruby", + "name": "texttospeech", + "name_pretty": "Cloud Text-to-Speech V1beta1 API", + "product_documentation": "https://cloud.google.com/text-to-speech", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Text-to-Speech converts text or Speech Synthesis Markup Language (SSML) input into audio data of natural human speech. Note that google-cloud-text_to_speech-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-text_to_speech instead. See the readme for more details.", + "ruby-cloud-env-prefix": "TEXTTOSPEECH", + "ruby-cloud-product-url": "https://cloud.google.com/text-to-speech", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.rubocop.yml new file mode 100644 index 000000000000..1902584e3617 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-text_to_speech-v1beta1.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-text_to_speech-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.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-text_to_speech-v1beta1/.yardopts b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.yardopts new file mode 100644 index 000000000000..e1ca395542bf --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Text-to-Speech V1beta1 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-text_to_speech-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/AUTHENTICATION.md new file mode 100644 index 000000000000..b8cf76c40475 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-text_to_speech-v1beta1 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-text_to_speech-v1beta1 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/text_to_speech/v1beta1" + +client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/text_to_speech/v1beta1" + +::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::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-text_to_speech-v1beta1 +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/text_to_speech/v1beta1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::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-text_to_speech-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/Gemfile b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/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-text_to_speech-v1beta1/README.md b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/README.md new file mode 100644 index 000000000000..164b19d0e5ab --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Text-to-Speech V1beta1 API + +Synthesizes natural-sounding speech by applying powerful neural network models. + +Text-to-Speech converts text or Speech Synthesis Markup Language (SSML) input into audio data of natural human speech. + +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 Text-to-Speech V1beta1 API. Most users should consider using +the main client gem, +[google-cloud-text_to_speech](https://rubygems.org/gems/google-cloud-text_to_speech). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-text_to_speech-v1beta1 +``` + +## 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/texttospeech.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/text_to_speech/v1beta1" + +client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new +request = ::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest.new # (request fields as keyword arguments...) +response = client.list_voices request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1beta1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/text-to-speech) +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/text_to_speech/v1beta1" +require "logger" + +client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::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-text_to_speech`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-text_to_speech-v1beta1`. +_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-text_to_speech`. +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-text_to_speech-v1beta1`. + +### 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-text_to_speech-v1beta1/Rakefile b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/Rakefile new file mode 100644 index 000000000000..d2ce03364134 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/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-text_to_speech-v1beta1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["TEXTTOSPEECH_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["TEXTTOSPEECH_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["TEXTTOSPEECH_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 TEXTTOSPEECH_TEST_PROJECT=test123 TEXTTOSPEECH_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/text_to_speech/v1beta1/text_to_speech/credentials" + ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["TEXTTOSPEECH_PROJECT"] = project + ENV["TEXTTOSPEECH_TEST_PROJECT"] = project + ENV["TEXTTOSPEECH_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-text_to_speech-v1beta1 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-text_to_speech-v1beta1 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-text_to_speech-v1beta1 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-text_to_speech-v1beta1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-text_to_speech-v1beta1" + header "google-cloud-text_to_speech-v1beta1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-text_to_speech-v1beta1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-text_to_speech-v1beta1 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-text_to_speech-v1beta1 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-text_to_speech-v1beta1 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-text_to_speech-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/gapic_metadata.json new file mode 100644 index 000000000000..ad2335193dfe --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/gapic_metadata.json @@ -0,0 +1,47 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.texttospeech.v1beta1", + "libraryPackage": "::Google::Cloud::TextToSpeech::V1beta1", + "services": { + "TextToSpeech": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client", + "rpcs": { + "ListVoices": { + "methods": [ + "list_voices" + ] + }, + "SynthesizeSpeech": { + "methods": [ + "synthesize_speech" + ] + }, + "StreamingSynthesize": { + "methods": [ + "streaming_synthesize" + ] + } + } + } + } + }, + "TextToSpeechLongAudioSynthesize": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client", + "rpcs": { + "SynthesizeLongAudio": { + "methods": [ + "synthesize_long_audio" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/google-cloud-text_to_speech-v1beta1.gemspec b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/google-cloud-text_to_speech-v1beta1.gemspec new file mode 100644 index 000000000000..d7b0ae8fb093 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/google-cloud-text_to_speech-v1beta1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/text_to_speech/v1beta1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-text_to_speech-v1beta1" + gem.version = Google::Cloud::TextToSpeech::V1beta1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Text-to-Speech converts text or Speech Synthesis Markup Language (SSML) input into audio data of natural human speech. Note that google-cloud-text_to_speech-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-text_to_speech instead. See the readme for more details." + gem.summary = "Synthesizes natural-sounding speech by applying powerful neural network models." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google-cloud-text_to_speech-v1beta1.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google-cloud-text_to_speech-v1beta1.rb new file mode 100644 index 000000000000..0d9b902cd048 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google-cloud-text_to_speech-v1beta1.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/text_to_speech/v1beta1" diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1.rb new file mode 100644 index 000000000000..5e90ad3198ba --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/text_to_speech/v1beta1/text_to_speech" +require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize" +require "google/cloud/text_to_speech/v1beta1/version" + +module Google + module Cloud + module TextToSpeech + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/text_to_speech/v1beta1" + # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/text_to_speech/v1beta1" + # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new + # + module V1beta1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" +require "google/cloud/text_to_speech/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/rest.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/rest.rb new file mode 100644 index 000000000000..e5fbca0fbb22 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/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/text_to_speech/v1beta1/text_to_speech/rest" +require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest" +require "google/cloud/text_to_speech/v1beta1/version" + +module Google + module Cloud + module TextToSpeech + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/text_to_speech/v1beta1/rest" + # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new + # + module V1beta1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech.rb new file mode 100644 index 000000000000..b1bcd5fb1511 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech.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/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/text_to_speech/v1beta1/version" + +require "google/cloud/text_to_speech/v1beta1/text_to_speech/credentials" +require "google/cloud/text_to_speech/v1beta1/text_to_speech/paths" +require "google/cloud/text_to_speech/v1beta1/text_to_speech/client" +require "google/cloud/text_to_speech/v1beta1/text_to_speech/rest" + +module Google + module Cloud + module TextToSpeech + module V1beta1 + ## + # Service that implements Google Cloud Text-to-Speech API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/text_to_speech/v1beta1/text_to_speech" + # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/text_to_speech/v1beta1/text_to_speech/rest" + # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new + # + module TextToSpeech + end + end + end + end +end + +helper_path = ::File.join __dir__, "text_to_speech", "helpers.rb" +require "google/cloud/text_to_speech/v1beta1/text_to_speech/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/client.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/client.rb new file mode 100644 index 000000000000..c6f42a492766 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/client.rb @@ -0,0 +1,657 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/texttospeech/v1beta1/cloud_tts_pb" + +module Google + module Cloud + module TextToSpeech + module V1beta1 + module TextToSpeech + ## + # Client for the TextToSpeech service. + # + # Service that implements Google Cloud Text-to-Speech API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "texttospeech.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :text_to_speech_stub + + ## + # Configure the TextToSpeech Client class. + # + # See {::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TextToSpeech clients + # ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::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", "TextToSpeech", "V1beta1"] + 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.timeout = 300.0 + default_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TextToSpeech 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::TextToSpeech::V1beta1::TextToSpeech::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 + @text_to_speech_stub.universe_domain + end + + ## + # Create a new TextToSpeech client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TextToSpeech 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/texttospeech/v1beta1/cloud_tts_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 + + @text_to_speech_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::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 + ) + + @text_to_speech_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 + @text_to_speech_stub.logger + end + + # Service calls + + ## + # Returns a list of Voice supported for synthesis. + # + # @overload list_voices(request, options = nil) + # Pass arguments to `list_voices` via a request object, either of type + # {::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_voices(language_code: nil) + # Pass arguments to `list_voices` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param language_code [::String] + # Optional. Recommended. + # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + # If not specified, the API will return all supported voices. + # If specified, the ListVoices call will only return voices that can be used + # to synthesize this language_code. For example, if you specify `"en-NZ"`, + # all `"en-NZ"` voices will be returned. If you specify `"no"`, both + # `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be + # returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/text_to_speech/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest.new + # + # # Call the list_voices method. + # result = client.list_voices request + # + # # The returned object is of type Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse. + # p result + # + def list_voices request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_voices.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TextToSpeech::V1beta1::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_voices.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_voices.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @text_to_speech_stub.call_rpc :list_voices, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Synthesizes speech synchronously: receive results after all text input + # has been processed. + # + # @overload synthesize_speech(request, options = nil) + # Pass arguments to `synthesize_speech` via a request object, either of type + # {::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload synthesize_speech(input: nil, voice: nil, audio_config: nil, enable_time_pointing: nil, advanced_voice_options: nil) + # Pass arguments to `synthesize_speech` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param input [::Google::Cloud::TextToSpeech::V1beta1::SynthesisInput, ::Hash] + # Required. The Synthesizer requires either plain text or SSML as input. + # @param voice [::Google::Cloud::TextToSpeech::V1beta1::VoiceSelectionParams, ::Hash] + # Required. The desired voice of the synthesized audio. + # @param audio_config [::Google::Cloud::TextToSpeech::V1beta1::AudioConfig, ::Hash] + # Required. The configuration of the synthesized audio. + # @param enable_time_pointing [::Array<::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest::TimepointType>] + # Whether and what timepoints are returned in the response. + # @param advanced_voice_options [::Google::Cloud::TextToSpeech::V1beta1::AdvancedVoiceOptions, ::Hash] + # Advanced voice options. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/text_to_speech/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest.new + # + # # Call the synthesize_speech method. + # result = client.synthesize_speech request + # + # # The returned object is of type Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse. + # p result + # + def synthesize_speech request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.synthesize_speech.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TextToSpeech::V1beta1::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.synthesize_speech.timeout, + metadata: metadata, + retry_policy: @config.rpcs.synthesize_speech.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @text_to_speech_stub.call_rpc :synthesize_speech, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Performs bidirectional streaming speech synthesis: receives audio while + # sending text. + # + # @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeRequest, ::Hash>] + # An enumerable of {::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeRequest} 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::TextToSpeech::V1beta1::StreamingSynthesizeResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeResponse>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/text_to_speech/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new + # + # # Create an input stream. + # input = Gapic::StreamInput.new + # + # # Call the streaming_synthesize method to start streaming. + # output = client.streaming_synthesize 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::TextToSpeech::V1beta1::StreamingSynthesizeRequest.new + # input << Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeRequest.new + # input.close + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeResponse + # output.each do |current_response| + # p current_response + # end + # + def streaming_synthesize 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::TextToSpeech::V1beta1::StreamingSynthesizeRequest + 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.streaming_synthesize.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TextToSpeech::V1beta1::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.streaming_synthesize.timeout, + metadata: metadata, + retry_policy: @config.rpcs.streaming_synthesize.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @text_to_speech_stub.call_rpc :streaming_synthesize, request, 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 TextToSpeech API. + # + # This class represents the configuration for TextToSpeech, + # 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::TextToSpeech::V1beta1::TextToSpeech::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_voices to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_voices.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_voices.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::TextToSpeech::V1beta1::TextToSpeech::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 = "texttospeech.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 TextToSpeech 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_voices` + # @return [::Gapic::Config::Method] + # + attr_reader :list_voices + ## + # RPC-specific configuration for `synthesize_speech` + # @return [::Gapic::Config::Method] + # + attr_reader :synthesize_speech + ## + # RPC-specific configuration for `streaming_synthesize` + # @return [::Gapic::Config::Method] + # + attr_reader :streaming_synthesize + + # @private + def initialize parent_rpcs = nil + list_voices_config = parent_rpcs.list_voices if parent_rpcs.respond_to? :list_voices + @list_voices = ::Gapic::Config::Method.new list_voices_config + synthesize_speech_config = parent_rpcs.synthesize_speech if parent_rpcs.respond_to? :synthesize_speech + @synthesize_speech = ::Gapic::Config::Method.new synthesize_speech_config + streaming_synthesize_config = parent_rpcs.streaming_synthesize if parent_rpcs.respond_to? :streaming_synthesize + @streaming_synthesize = ::Gapic::Config::Method.new streaming_synthesize_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/credentials.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/credentials.rb new file mode 100644 index 000000000000..20cb9a5a0f32 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/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 TextToSpeech + module V1beta1 + module TextToSpeech + # Credentials for the TextToSpeech API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "TEXTTOSPEECH_CREDENTIALS", + "TEXTTOSPEECH_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "TEXTTOSPEECH_CREDENTIALS_JSON", + "TEXTTOSPEECH_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-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/paths.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/paths.rb new file mode 100644 index 000000000000..8d480777bee8 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module TextToSpeech + module V1beta1 + module TextToSpeech + # Path helper methods for the TextToSpeech API. + module Paths + ## + # Create a fully-qualified Model resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/models/{model}` + # + # @param project [String] + # @param location [String] + # @param model [String] + # + # @return [::String] + def model_path project:, location:, model: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/models/#{model}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/rest.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/rest.rb new file mode 100644 index 000000000000..f01222022b03 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/rest.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 "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/text_to_speech/v1beta1/version" + +require "google/cloud/text_to_speech/v1beta1/text_to_speech/credentials" +require "google/cloud/text_to_speech/v1beta1/text_to_speech/paths" +require "google/cloud/text_to_speech/v1beta1/text_to_speech/rest/client" + +module Google + module Cloud + module TextToSpeech + module V1beta1 + ## + # Service that implements Google Cloud Text-to-Speech API. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/text_to_speech/v1beta1/text_to_speech/rest" + # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new + # + module TextToSpeech + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/text_to_speech/v1beta1/text_to_speech/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/rest/client.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/rest/client.rb new file mode 100644 index 000000000000..75ecc2cb5a4f --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/rest/client.rb @@ -0,0 +1,530 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/texttospeech/v1beta1/cloud_tts_pb" +require "google/cloud/text_to_speech/v1beta1/text_to_speech/rest/service_stub" + +module Google + module Cloud + module TextToSpeech + module V1beta1 + module TextToSpeech + module Rest + ## + # REST client for the TextToSpeech service. + # + # Service that implements Google Cloud Text-to-Speech API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "texttospeech.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :text_to_speech_stub + + ## + # Configure the TextToSpeech Client class. + # + # See {::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TextToSpeech clients + # ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::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", "TextToSpeech", "V1beta1"] + 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.timeout = 300.0 + default_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TextToSpeech 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::TextToSpeech::V1beta1::TextToSpeech::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 + @text_to_speech_stub.universe_domain + end + + ## + # Create a new TextToSpeech REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TextToSpeech 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 + + @text_to_speech_stub = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @text_to_speech_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 + @text_to_speech_stub.logger + end + + # Service calls + + ## + # Returns a list of Voice supported for synthesis. + # + # @overload list_voices(request, options = nil) + # Pass arguments to `list_voices` via a request object, either of type + # {::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_voices(language_code: nil) + # Pass arguments to `list_voices` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param language_code [::String] + # Optional. Recommended. + # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + # If not specified, the API will return all supported voices. + # If specified, the ListVoices call will only return voices that can be used + # to synthesize this language_code. For example, if you specify `"en-NZ"`, + # all `"en-NZ"` voices will be returned. If you specify `"no"`, both + # `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be + # returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/text_to_speech/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest.new + # + # # Call the list_voices method. + # result = client.list_voices request + # + # # The returned object is of type Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse. + # p result + # + def list_voices request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_voices.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TextToSpeech::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_voices.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_voices.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @text_to_speech_stub.list_voices request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Synthesizes speech synchronously: receive results after all text input + # has been processed. + # + # @overload synthesize_speech(request, options = nil) + # Pass arguments to `synthesize_speech` via a request object, either of type + # {::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload synthesize_speech(input: nil, voice: nil, audio_config: nil, enable_time_pointing: nil, advanced_voice_options: nil) + # Pass arguments to `synthesize_speech` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param input [::Google::Cloud::TextToSpeech::V1beta1::SynthesisInput, ::Hash] + # Required. The Synthesizer requires either plain text or SSML as input. + # @param voice [::Google::Cloud::TextToSpeech::V1beta1::VoiceSelectionParams, ::Hash] + # Required. The desired voice of the synthesized audio. + # @param audio_config [::Google::Cloud::TextToSpeech::V1beta1::AudioConfig, ::Hash] + # Required. The configuration of the synthesized audio. + # @param enable_time_pointing [::Array<::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest::TimepointType>] + # Whether and what timepoints are returned in the response. + # @param advanced_voice_options [::Google::Cloud::TextToSpeech::V1beta1::AdvancedVoiceOptions, ::Hash] + # Advanced voice options. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/text_to_speech/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest.new + # + # # Call the synthesize_speech method. + # result = client.synthesize_speech request + # + # # The returned object is of type Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse. + # p result + # + def synthesize_speech request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.synthesize_speech.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TextToSpeech::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.synthesize_speech.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.synthesize_speech.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @text_to_speech_stub.synthesize_speech request, 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 TextToSpeech REST API. + # + # This class represents the configuration for TextToSpeech 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::TextToSpeech::V1beta1::TextToSpeech::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_voices to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_voices.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_voices.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 = "texttospeech.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 TextToSpeech 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_voices` + # @return [::Gapic::Config::Method] + # + attr_reader :list_voices + ## + # RPC-specific configuration for `synthesize_speech` + # @return [::Gapic::Config::Method] + # + attr_reader :synthesize_speech + + # @private + def initialize parent_rpcs = nil + list_voices_config = parent_rpcs.list_voices if parent_rpcs.respond_to? :list_voices + @list_voices = ::Gapic::Config::Method.new list_voices_config + synthesize_speech_config = parent_rpcs.synthesize_speech if parent_rpcs.respond_to? :synthesize_speech + @synthesize_speech = ::Gapic::Config::Method.new synthesize_speech_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/rest/service_stub.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/rest/service_stub.rb new file mode 100644 index 000000000000..649d72d8ea28 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/rest/service_stub.rb @@ -0,0 +1,200 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/texttospeech/v1beta1/cloud_tts_pb" + +module Google + module Cloud + module TextToSpeech + module V1beta1 + module TextToSpeech + module Rest + ## + # REST service stub for the TextToSpeech 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_voices REST call + # + # @param request_pb [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse] + # A result object deserialized from the server's reply + def list_voices request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_voices_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_voices", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the synthesize_speech REST call + # + # @param request_pb [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse] + # A result object deserialized from the server's reply + def synthesize_speech request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_synthesize_speech_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "synthesize_speech", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse.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_voices REST call + # + # @param request_pb [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_voices_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/voices", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the synthesize_speech REST call + # + # @param request_pb [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_synthesize_speech_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/text:synthesize", + body: "*", + matches: [] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize.rb new file mode 100644 index 000000000000..9e9b19a683b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize.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/text_to_speech/v1beta1/version" + +require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/credentials" +require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/paths" +require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/operations" +require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/client" +require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest" + +module Google + module Cloud + module TextToSpeech + module V1beta1 + ## + # Service that implements Google Cloud Text-to-Speech API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize" + # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest" + # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::Client.new + # + module TextToSpeechLongAudioSynthesize + end + end + end + end +end + +helper_path = ::File.join __dir__, "text_to_speech_long_audio_synthesize", "helpers.rb" +require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/client.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/client.rb new file mode 100644 index 000000000000..dd7cf39daa54 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/client.rb @@ -0,0 +1,510 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/texttospeech/v1beta1/cloud_tts_lrs_pb" + +module Google + module Cloud + module TextToSpeech + module V1beta1 + module TextToSpeechLongAudioSynthesize + ## + # Client for the TextToSpeechLongAudioSynthesize service. + # + # Service that implements Google Cloud Text-to-Speech API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "texttospeech.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :text_to_speech_long_audio_synthesize_stub + + ## + # Configure the TextToSpeechLongAudioSynthesize Client class. + # + # See {::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TextToSpeechLongAudioSynthesize clients + # ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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", "TextToSpeech", "V1beta1"] + 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.synthesize_long_audio.timeout = 5000.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TextToSpeechLongAudioSynthesize 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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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 + @text_to_speech_long_audio_synthesize_stub.universe_domain + end + + ## + # Create a new TextToSpeechLongAudioSynthesize client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TextToSpeechLongAudioSynthesize 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/texttospeech/v1beta1/cloud_tts_lrs_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 + + @text_to_speech_long_audio_synthesize_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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 + ) + + @text_to_speech_long_audio_synthesize_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 + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @text_to_speech_long_audio_synthesize_stub.logger + end + + # Service calls + + ## + # Synthesizes long form text asynchronously. + # + # @overload synthesize_long_audio(request, options = nil) + # Pass arguments to `synthesize_long_audio` via a request object, either of type + # {::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload synthesize_long_audio(parent: nil, input: nil, audio_config: nil, output_gcs_uri: nil, voice: nil) + # Pass arguments to `synthesize_long_audio` via keyword arguments. Note that at + # least one keyword argument is required. To 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 resource states of the request in the form of + # `projects/*/locations/*`. + # @param input [::Google::Cloud::TextToSpeech::V1beta1::SynthesisInput, ::Hash] + # Required. The Synthesizer requires either plain text or SSML as input. + # @param audio_config [::Google::Cloud::TextToSpeech::V1beta1::AudioConfig, ::Hash] + # Required. The configuration of the synthesized audio. + # @param output_gcs_uri [::String] + # Required. Specifies a Cloud Storage URI for the synthesis results. Must be + # specified in the format: `gs://bucket_name/object_name`, and the bucket + # must already exist. + # @param voice [::Google::Cloud::TextToSpeech::V1beta1::VoiceSelectionParams, ::Hash] + # Required. The desired voice of the synthesized audio. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/text_to_speech/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest.new + # + # # Call the synthesize_long_audio method. + # result = client.synthesize_long_audio request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def synthesize_long_audio request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.synthesize_long_audio.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TextToSpeech::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.synthesize_long_audio.timeout, + metadata: metadata, + retry_policy: @config.rpcs.synthesize_long_audio.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @text_to_speech_long_audio_synthesize_stub.call_rpc :synthesize_long_audio, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 TextToSpeechLongAudioSynthesize API. + # + # This class represents the configuration for TextToSpeechLongAudioSynthesize, + # 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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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 + # # synthesize_long_audio to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.synthesize_long_audio.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.synthesize_long_audio.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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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 = "texttospeech.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 TextToSpeechLongAudioSynthesize 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 `synthesize_long_audio` + # @return [::Gapic::Config::Method] + # + attr_reader :synthesize_long_audio + + # @private + def initialize parent_rpcs = nil + synthesize_long_audio_config = parent_rpcs.synthesize_long_audio if parent_rpcs.respond_to? :synthesize_long_audio + @synthesize_long_audio = ::Gapic::Config::Method.new synthesize_long_audio_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/credentials.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/credentials.rb new file mode 100644 index 000000000000..73270e7cae0f --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/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 TextToSpeech + module V1beta1 + module TextToSpeechLongAudioSynthesize + # Credentials for the TextToSpeechLongAudioSynthesize API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "TEXTTOSPEECH_CREDENTIALS", + "TEXTTOSPEECH_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "TEXTTOSPEECH_CREDENTIALS_JSON", + "TEXTTOSPEECH_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-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/operations.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/operations.rb new file mode 100644 index 000000000000..088a5688cb57 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/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 TextToSpeech + module V1beta1 + module TextToSpeechLongAudioSynthesize + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "texttospeech.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the TextToSpeechLongAudioSynthesize 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 TextToSpeechLongAudioSynthesize 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::TextToSpeech::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::TextToSpeech::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::TextToSpeech::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::TextToSpeech::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::TextToSpeech::V1beta1::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 = "texttospeech.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-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/paths.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/paths.rb new file mode 100644 index 000000000000..b964dee446f0 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module TextToSpeech + module V1beta1 + module TextToSpeechLongAudioSynthesize + # Path helper methods for the TextToSpeechLongAudioSynthesize API. + module Paths + ## + # Create a fully-qualified Model resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/models/{model}` + # + # @param project [String] + # @param location [String] + # @param model [String] + # + # @return [::String] + def model_path project:, location:, model: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/models/#{model}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest.rb new file mode 100644 index 000000000000..8ecb924df3d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest.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 "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/text_to_speech/v1beta1/version" + +require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/credentials" +require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/paths" +require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/operations" +require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/client" + +module Google + module Cloud + module TextToSpeech + module V1beta1 + ## + # Service that implements Google Cloud Text-to-Speech API. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest" + # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::Client.new + # + module TextToSpeechLongAudioSynthesize + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/client.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/client.rb new file mode 100644 index 000000000000..7d208e743c42 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/client.rb @@ -0,0 +1,460 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/texttospeech/v1beta1/cloud_tts_lrs_pb" +require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/service_stub" + +module Google + module Cloud + module TextToSpeech + module V1beta1 + module TextToSpeechLongAudioSynthesize + module Rest + ## + # REST client for the TextToSpeechLongAudioSynthesize service. + # + # Service that implements Google Cloud Text-to-Speech API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "texttospeech.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :text_to_speech_long_audio_synthesize_stub + + ## + # Configure the TextToSpeechLongAudioSynthesize Client class. + # + # See {::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TextToSpeechLongAudioSynthesize clients + # ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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", "TextToSpeech", "V1beta1"] + 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.synthesize_long_audio.timeout = 5000.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TextToSpeechLongAudioSynthesize 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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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 + @text_to_speech_long_audio_synthesize_stub.universe_domain + end + + ## + # Create a new TextToSpeechLongAudioSynthesize REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TextToSpeechLongAudioSynthesize 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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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 + + @text_to_speech_long_audio_synthesize_stub = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @text_to_speech_long_audio_synthesize_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 + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @text_to_speech_long_audio_synthesize_stub.logger + end + + # Service calls + + ## + # Synthesizes long form text asynchronously. + # + # @overload synthesize_long_audio(request, options = nil) + # Pass arguments to `synthesize_long_audio` via a request object, either of type + # {::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload synthesize_long_audio(parent: nil, input: nil, audio_config: nil, output_gcs_uri: nil, voice: nil) + # Pass arguments to `synthesize_long_audio` via keyword arguments. Note that at + # least one keyword argument is required. To 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 resource states of the request in the form of + # `projects/*/locations/*`. + # @param input [::Google::Cloud::TextToSpeech::V1beta1::SynthesisInput, ::Hash] + # Required. The Synthesizer requires either plain text or SSML as input. + # @param audio_config [::Google::Cloud::TextToSpeech::V1beta1::AudioConfig, ::Hash] + # Required. The configuration of the synthesized audio. + # @param output_gcs_uri [::String] + # Required. Specifies a Cloud Storage URI for the synthesis results. Must be + # specified in the format: `gs://bucket_name/object_name`, and the bucket + # must already exist. + # @param voice [::Google::Cloud::TextToSpeech::V1beta1::VoiceSelectionParams, ::Hash] + # Required. The desired voice of the synthesized audio. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/text_to_speech/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest.new + # + # # Call the synthesize_long_audio method. + # result = client.synthesize_long_audio request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def synthesize_long_audio request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.synthesize_long_audio.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::TextToSpeech::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.synthesize_long_audio.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.synthesize_long_audio.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @text_to_speech_long_audio_synthesize_stub.synthesize_long_audio request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 TextToSpeechLongAudioSynthesize REST API. + # + # This class represents the configuration for TextToSpeechLongAudioSynthesize 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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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 + # # synthesize_long_audio to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.synthesize_long_audio.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.synthesize_long_audio.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 = "texttospeech.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 TextToSpeechLongAudioSynthesize 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 `synthesize_long_audio` + # @return [::Gapic::Config::Method] + # + attr_reader :synthesize_long_audio + + # @private + def initialize parent_rpcs = nil + synthesize_long_audio_config = parent_rpcs.synthesize_long_audio if parent_rpcs.respond_to? :synthesize_long_audio + @synthesize_long_audio = ::Gapic::Config::Method.new synthesize_long_audio_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/operations.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/operations.rb new file mode 100644 index 000000000000..8250012f372b --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/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 TextToSpeech + module V1beta1 + module TextToSpeechLongAudioSynthesize + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "texttospeech.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the TextToSpeechLongAudioSynthesize 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 TextToSpeechLongAudioSynthesize 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::TextToSpeech::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::TextToSpeech::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::TextToSpeech::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::TextToSpeech::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "texttospeech.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: "/v1beta1/{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: "/v1beta1/{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-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/service_stub.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/service_stub.rb new file mode 100644 index 000000000000..bd08eb3a2f11 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/service_stub.rb @@ -0,0 +1,143 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/texttospeech/v1beta1/cloud_tts_lrs_pb" + +module Google + module Cloud + module TextToSpeech + module V1beta1 + module TextToSpeechLongAudioSynthesize + module Rest + ## + # REST service stub for the TextToSpeechLongAudioSynthesize 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 synthesize_long_audio REST call + # + # @param request_pb [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def synthesize_long_audio request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_synthesize_long_audio_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "synthesize_long_audio", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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 synthesize_long_audio REST call + # + # @param request_pb [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_synthesize_long_audio_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{parent}:synthesizeLongAudio", + body: "*", + 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-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/version.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/version.rb new file mode 100644 index 000000000000..e867e4eac333 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/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 TextToSpeech + module V1beta1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/texttospeech/v1beta1/cloud_tts_lrs_pb.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/texttospeech/v1beta1/cloud_tts_lrs_pb.rb new file mode 100644 index 000000000000..196a9e031108 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/texttospeech/v1beta1/cloud_tts_lrs_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/texttospeech/v1beta1/cloud_tts_lrs.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/cloud/texttospeech/v1beta1/cloud_tts_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n5google/cloud/texttospeech/v1beta1/cloud_tts_lrs.proto\x12!google.cloud.texttospeech.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x31google/cloud/texttospeech/v1beta1/cloud_tts.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa8\x02\n\x1aSynthesizeLongAudioRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x45\n\x05input\x18\x02 \x01(\x0b\x32\x31.google.cloud.texttospeech.v1beta1.SynthesisInputB\x03\xe0\x41\x02\x12I\n\x0c\x61udio_config\x18\x03 \x01(\x0b\x32..google.cloud.texttospeech.v1beta1.AudioConfigB\x03\xe0\x41\x02\x12\x1b\n\x0eoutput_gcs_uri\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12K\n\x05voice\x18\x05 \x01(\x0b\x32\x37.google.cloud.texttospeech.v1beta1.VoiceSelectionParamsB\x03\xe0\x41\x02\"\x1d\n\x1bSynthesizeLongAudioResponse\"\xa4\x01\n\x1bSynthesizeLongAudioMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x10last_update_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01\x12\x1b\n\x13progress_percentage\x18\x03 \x01(\x01\x32\xb3\x03\n\x1fTextToSpeechLongAudioSynthesize\x12\xbe\x02\n\x13SynthesizeLongAudio\x12=.google.cloud.texttospeech.v1beta1.SynthesizeLongAudioRequest\x1a\x1d.google.longrunning.Operation\"\xc8\x01\xca\x41~\n=google.cloud.texttospeech.v1beta1.SynthesizeLongAudioResponse\x12=google.cloud.texttospeech.v1beta1.SynthesizeLongAudioMetadata\x82\xd3\xe4\x93\x02\x41\"\n\rTimepointType\x12\x1e\n\x1aTIMEPOINT_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tSSML_MARK\x10\x01\x42\x19\n\x17_advanced_voice_options\"\xa7\x03\n\x19\x43ustomPronunciationParams\x12\x13\n\x06phrase\x18\x01 \x01(\tH\x00\x88\x01\x01\x12m\n\x11phonetic_encoding\x18\x02 \x01(\x0e\x32M.google.cloud.texttospeech.v1beta1.CustomPronunciationParams.PhoneticEncodingH\x01\x88\x01\x01\x12\x1a\n\rpronunciation\x18\x03 \x01(\tH\x02\x88\x01\x01\"\xb6\x01\n\x10PhoneticEncoding\x12!\n\x1dPHONETIC_ENCODING_UNSPECIFIED\x10\x00\x12\x19\n\x15PHONETIC_ENCODING_IPA\x10\x01\x12\x1d\n\x19PHONETIC_ENCODING_X_SAMPA\x10\x02\x12\'\n#PHONETIC_ENCODING_JAPANESE_YOMIGANA\x10\x03\x12\x1c\n\x18PHONETIC_ENCODING_PINYIN\x10\x04\x42\t\n\x07_phraseB\x14\n\x12_phonetic_encodingB\x10\n\x0e_pronunciation\"l\n\x14\x43ustomPronunciations\x12T\n\x0epronunciations\x18\x01 \x03(\x0b\x32<.google.cloud.texttospeech.v1beta1.CustomPronunciationParams\"\x95\x01\n\x12MultiSpeakerMarkup\x12N\n\x05turns\x18\x01 \x03(\x0b\x32:.google.cloud.texttospeech.v1beta1.MultiSpeakerMarkup.TurnB\x03\xe0\x41\x02\x1a/\n\x04Turn\x12\x14\n\x07speaker\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04text\x18\x02 \x01(\tB\x03\xe0\x41\x02\"P\n\x19MultispeakerPrebuiltVoice\x12\x1a\n\rspeaker_alias\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nspeaker_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"{\n\x17MultiSpeakerVoiceConfig\x12`\n\x15speaker_voice_configs\x18\x02 \x03(\x0b\x32<.google.cloud.texttospeech.v1beta1.MultispeakerPrebuiltVoiceB\x03\xe0\x41\x02\"\xa6\x02\n\x0eSynthesisInput\x12\x0e\n\x04text\x18\x01 \x01(\tH\x00\x12\x10\n\x06markup\x18\x05 \x01(\tH\x00\x12\x0e\n\x04ssml\x18\x02 \x01(\tH\x00\x12U\n\x14multi_speaker_markup\x18\x04 \x01(\x0b\x32\x35.google.cloud.texttospeech.v1beta1.MultiSpeakerMarkupH\x00\x12\x13\n\x06prompt\x18\x06 \x01(\tH\x01\x88\x01\x01\x12[\n\x15\x63ustom_pronunciations\x18\x03 \x01(\x0b\x32\x37.google.cloud.texttospeech.v1beta1.CustomPronunciationsB\x03\xe0\x41\x01\x42\x0e\n\x0cinput_sourceB\t\n\x07_prompt\"\xa2\x03\n\x14VoiceSelectionParams\x12\x1a\n\rlanguage_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x02 \x01(\t\x12G\n\x0bssml_gender\x18\x03 \x01(\x0e\x32\x32.google.cloud.texttospeech.v1beta1.SsmlVoiceGender\x12J\n\x0c\x63ustom_voice\x18\x04 \x01(\x0b\x32\x34.google.cloud.texttospeech.v1beta1.CustomVoiceParams\x12M\n\x0bvoice_clone\x18\x05 \x01(\x0b\x32\x33.google.cloud.texttospeech.v1beta1.VoiceCloneParamsB\x03\xe0\x41\x01\x12\x17\n\nmodel_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x63\n\x1amulti_speaker_voice_config\x18\x07 \x01(\x0b\x32:.google.cloud.texttospeech.v1beta1.MultiSpeakerVoiceConfigB\x03\xe0\x41\x01\"\xf6\x01\n\x0b\x41udioConfig\x12M\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32\x30.google.cloud.texttospeech.v1beta1.AudioEncodingB\x03\xe0\x41\x02\x12\x1d\n\rspeaking_rate\x18\x02 \x01(\x01\x42\x06\xe0\x41\x04\xe0\x41\x01\x12\x15\n\x05pitch\x18\x03 \x01(\x01\x42\x06\xe0\x41\x04\xe0\x41\x01\x12\x1e\n\x0evolume_gain_db\x18\x04 \x01(\x01\x42\x06\xe0\x41\x04\xe0\x41\x01\x12\x1e\n\x11sample_rate_hertz\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\"\n\x12\x65\x66\x66\x65\x63ts_profile_id\x18\x06 \x03(\tB\x06\xe0\x41\x04\xe0\x41\x01\"\xf6\x01\n\x11\x43ustomVoiceParams\x12\x32\n\x05model\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12\x61\n\x0ereported_usage\x18\x03 \x01(\x0e\x32\x42.google.cloud.texttospeech.v1beta1.CustomVoiceParams.ReportedUsageB\x05\x18\x01\xe0\x41\x01\"J\n\rReportedUsage\x12\x1e\n\x1aREPORTED_USAGE_UNSPECIFIED\x10\x00\x12\x0c\n\x08REALTIME\x10\x01\x12\x0b\n\x07OFFLINE\x10\x02\"2\n\x10VoiceCloneParams\x12\x1e\n\x11voice_cloning_key\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xb9\x01\n\x18SynthesizeSpeechResponse\x12\x15\n\raudio_content\x18\x01 \x01(\x0c\x12@\n\ntimepoints\x18\x02 \x03(\x0b\x32,.google.cloud.texttospeech.v1beta1.Timepoint\x12\x44\n\x0c\x61udio_config\x18\x04 \x01(\x0b\x32..google.cloud.texttospeech.v1beta1.AudioConfig\"4\n\tTimepoint\x12\x11\n\tmark_name\x18\x04 \x01(\t\x12\x14\n\x0ctime_seconds\x18\x03 \x01(\x01\"\xa4\x01\n\x14StreamingAudioConfig\x12M\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32\x30.google.cloud.texttospeech.v1beta1.AudioEncodingB\x03\xe0\x41\x02\x12\x1e\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1d\n\rspeaking_rate\x18\x03 \x01(\x01\x42\x06\xe0\x41\x04\xe0\x41\x01\"\xa3\x02\n\x19StreamingSynthesizeConfig\x12K\n\x05voice\x18\x01 \x01(\x0b\x32\x37.google.cloud.texttospeech.v1beta1.VoiceSelectionParamsB\x03\xe0\x41\x02\x12\\\n\x16streaming_audio_config\x18\x04 \x01(\x0b\x32\x37.google.cloud.texttospeech.v1beta1.StreamingAudioConfigB\x03\xe0\x41\x01\x12[\n\x15\x63ustom_pronunciations\x18\x05 \x01(\x0b\x32\x37.google.cloud.texttospeech.v1beta1.CustomPronunciationsB\x03\xe0\x41\x01\"\xc2\x01\n\x17StreamingSynthesisInput\x12\x0e\n\x04text\x18\x01 \x01(\tH\x00\x12\x10\n\x06markup\x18\x05 \x01(\tH\x00\x12U\n\x14multi_speaker_markup\x18\x07 \x01(\x0b\x32\x35.google.cloud.texttospeech.v1beta1.MultiSpeakerMarkupH\x00\x12\x13\n\x06prompt\x18\x06 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0cinput_sourceB\t\n\x07_prompt\"\xd8\x01\n\x1aStreamingSynthesizeRequest\x12X\n\x10streaming_config\x18\x01 \x01(\x0b\x32<.google.cloud.texttospeech.v1beta1.StreamingSynthesizeConfigH\x00\x12K\n\x05input\x18\x02 \x01(\x0b\x32:.google.cloud.texttospeech.v1beta1.StreamingSynthesisInputH\x00\x42\x13\n\x11streaming_request\"4\n\x1bStreamingSynthesizeResponse\x12\x15\n\raudio_content\x18\x01 \x01(\x0c*W\n\x0fSsmlVoiceGender\x12!\n\x1dSSML_VOICE_GENDER_UNSPECIFIED\x10\x00\x12\x08\n\x04MALE\x10\x01\x12\n\n\x06\x46\x45MALE\x10\x02\x12\x0b\n\x07NEUTRAL\x10\x03*\x8c\x01\n\rAudioEncoding\x12\x1e\n\x1a\x41UDIO_ENCODING_UNSPECIFIED\x10\x00\x12\x0c\n\x08LINEAR16\x10\x01\x12\x07\n\x03MP3\x10\x02\x12\x0f\n\x0bMP3_64_KBPS\x10\x04\x12\x0c\n\x08OGG_OPUS\x10\x03\x12\t\n\x05MULAW\x10\x05\x12\x08\n\x04\x41LAW\x10\x06\x12\x07\n\x03PCM\x10\x07\x12\x07\n\x03M4A\x10\x08\x32\xef\x04\n\x0cTextToSpeech\x12\xa2\x01\n\nListVoices\x12\x34.google.cloud.texttospeech.v1beta1.ListVoicesRequest\x1a\x35.google.cloud.texttospeech.v1beta1.ListVoicesResponse\"\'\xda\x41\rlanguage_code\x82\xd3\xe4\x93\x02\x11\x12\x0f/v1beta1/voices\x12\xcb\x01\n\x10SynthesizeSpeech\x12:.google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest\x1a;.google.cloud.texttospeech.v1beta1.SynthesizeSpeechResponse\">\xda\x41\x18input,voice,audio_config\x82\xd3\xe4\x93\x02\x1d\"\x18/v1beta1/text:synthesize:\x01*\x12\x9a\x01\n\x13StreamingSynthesize\x12=.google.cloud.texttospeech.v1beta1.StreamingSynthesizeRequest\x1a>.google.cloud.texttospeech.v1beta1.StreamingSynthesizeResponse\"\x00(\x01\x30\x01\x1aO\xca\x41\x1btexttospeech.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd5\x02\n%com.google.cloud.texttospeech.v1beta1B\x11TextToSpeechProtoP\x01ZIcloud.google.com/go/texttospeech/apiv1beta1/texttospeechpb;texttospeechpb\xa2\x02\x04\x43TTS\xaa\x02!Google.Cloud.TextToSpeech.V1Beta1\xca\x02!Google\\Cloud\\TextToSpeech\\V1beta1\xea\x02$Google::Cloud::TextToSpeech::V1beta1\xea\x41U\n\x1b\x61utoml.googleapis.com/Model\x12\x36projects/{project}/locations/{location}/models/{model}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module TextToSpeech + module V1beta1 + ListVoicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.ListVoicesRequest").msgclass + ListVoicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.ListVoicesResponse").msgclass + Voice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.Voice").msgclass + AdvancedVoiceOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions").msgclass + SynthesizeSpeechRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest").msgclass + SynthesizeSpeechRequest::TimepointType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest.TimepointType").enummodule + CustomPronunciationParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.CustomPronunciationParams").msgclass + CustomPronunciationParams::PhoneticEncoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.CustomPronunciationParams.PhoneticEncoding").enummodule + CustomPronunciations = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.CustomPronunciations").msgclass + MultiSpeakerMarkup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.MultiSpeakerMarkup").msgclass + MultiSpeakerMarkup::Turn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.MultiSpeakerMarkup.Turn").msgclass + MultispeakerPrebuiltVoice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.MultispeakerPrebuiltVoice").msgclass + MultiSpeakerVoiceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.MultiSpeakerVoiceConfig").msgclass + SynthesisInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.SynthesisInput").msgclass + VoiceSelectionParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.VoiceSelectionParams").msgclass + AudioConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.AudioConfig").msgclass + CustomVoiceParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.CustomVoiceParams").msgclass + CustomVoiceParams::ReportedUsage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.CustomVoiceParams.ReportedUsage").enummodule + VoiceCloneParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.VoiceCloneParams").msgclass + SynthesizeSpeechResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.SynthesizeSpeechResponse").msgclass + Timepoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.Timepoint").msgclass + StreamingAudioConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.StreamingAudioConfig").msgclass + StreamingSynthesizeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.StreamingSynthesizeConfig").msgclass + StreamingSynthesisInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.StreamingSynthesisInput").msgclass + StreamingSynthesizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.StreamingSynthesizeRequest").msgclass + StreamingSynthesizeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.StreamingSynthesizeResponse").msgclass + SsmlVoiceGender = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.SsmlVoiceGender").enummodule + AudioEncoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.AudioEncoding").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/texttospeech/v1beta1/cloud_tts_services_pb.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/texttospeech/v1beta1/cloud_tts_services_pb.rb new file mode 100644 index 000000000000..cd9155f58667 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/texttospeech/v1beta1/cloud_tts_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/texttospeech/v1beta1/cloud_tts.proto for package 'Google.Cloud.TextToSpeech.V1beta1' +# 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/texttospeech/v1beta1/cloud_tts_pb' + +module Google + module Cloud + module TextToSpeech + module V1beta1 + module TextToSpeech + # Service that implements Google Cloud Text-to-Speech API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.texttospeech.v1beta1.TextToSpeech' + + # Returns a list of Voice supported for synthesis. + rpc :ListVoices, ::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest, ::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse + # Synthesizes speech synchronously: receive results after all text input + # has been processed. + rpc :SynthesizeSpeech, ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest, ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse + # Performs bidirectional streaming speech synthesis: receives audio while + # sending text. + rpc :StreamingSynthesize, stream(::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeRequest), stream(::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeResponse) + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/README.md new file mode 100644 index 000000000000..86ce92848b79 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Text-to-Speech V1beta1 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-text_to_speech-v1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # 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. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + # + # Example: + # + # 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 + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # 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 + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # 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 + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/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-text_to_speech-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/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-text_to_speech-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/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-text_to_speech-v1beta1/proto_docs/google/cloud/texttospeech/v1beta1/cloud_tts.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/cloud/texttospeech/v1beta1/cloud_tts.rb new file mode 100644 index 000000000000..030e04028192 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/cloud/texttospeech/v1beta1/cloud_tts.rb @@ -0,0 +1,618 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module TextToSpeech + module V1beta1 + # The top-level message sent by the client for the `ListVoices` method. + # @!attribute [rw] language_code + # @return [::String] + # Optional. Recommended. + # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + # If not specified, the API will return all supported voices. + # If specified, the ListVoices call will only return voices that can be used + # to synthesize this language_code. For example, if you specify `"en-NZ"`, + # all `"en-NZ"` voices will be returned. If you specify `"no"`, both + # `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be + # returned. + class ListVoicesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The message returned to the client by the `ListVoices` method. + # @!attribute [rw] voices + # @return [::Array<::Google::Cloud::TextToSpeech::V1beta1::Voice>] + # The list of voices. + class ListVoicesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Description of a voice supported by the TTS service. + # @!attribute [rw] language_codes + # @return [::Array<::String>] + # The languages that this voice supports, expressed as + # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g. + # "en-US", "es-419", "cmn-tw"). + # @!attribute [rw] name + # @return [::String] + # The name of this voice. Each distinct voice has a unique name. + # @!attribute [rw] ssml_gender + # @return [::Google::Cloud::TextToSpeech::V1beta1::SsmlVoiceGender] + # The gender of this voice. + # @!attribute [rw] natural_sample_rate_hertz + # @return [::Integer] + # The natural sample rate (in hertz) for this voice. + class Voice + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Used for advanced voice options. + # @!attribute [rw] low_latency_journey_synthesis + # @return [::Boolean] + # Only for Journey voices. If false, the synthesis is context aware + # and has a higher latency. + # @!attribute [rw] relax_safety_filters + # @return [::Boolean] + # Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only + # supported for accounts linked to Invoiced (Offline) Cloud billing accounts. + # Otherwise, will return result + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + class AdvancedVoiceOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The top-level message sent by the client for the `SynthesizeSpeech` method. + # @!attribute [rw] input + # @return [::Google::Cloud::TextToSpeech::V1beta1::SynthesisInput] + # Required. The Synthesizer requires either plain text or SSML as input. + # @!attribute [rw] voice + # @return [::Google::Cloud::TextToSpeech::V1beta1::VoiceSelectionParams] + # Required. The desired voice of the synthesized audio. + # @!attribute [rw] audio_config + # @return [::Google::Cloud::TextToSpeech::V1beta1::AudioConfig] + # Required. The configuration of the synthesized audio. + # @!attribute [rw] enable_time_pointing + # @return [::Array<::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest::TimepointType>] + # Whether and what timepoints are returned in the response. + # @!attribute [rw] advanced_voice_options + # @return [::Google::Cloud::TextToSpeech::V1beta1::AdvancedVoiceOptions] + # Advanced voice options. + class SynthesizeSpeechRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of timepoint information that is returned in the response. + module TimepointType + # Not specified. No timepoint information will be returned. + TIMEPOINT_TYPE_UNSPECIFIED = 0 + + # Timepoint information of `` tags in SSML input will be returned. + SSML_MARK = 1 + end + end + + # Pronunciation customization for a phrase. + # @!attribute [rw] phrase + # @return [::String] + # The phrase to which the customization is applied. + # The phrase can be multiple words, such as proper nouns, but shouldn't span + # the length of the sentence. + # @!attribute [rw] phonetic_encoding + # @return [::Google::Cloud::TextToSpeech::V1beta1::CustomPronunciationParams::PhoneticEncoding] + # The phonetic encoding of the phrase. + # @!attribute [rw] pronunciation + # @return [::String] + # The pronunciation of the phrase. This must be in the phonetic encoding + # specified above. + class CustomPronunciationParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The phonetic encoding of the phrase. + module PhoneticEncoding + # Not specified. + PHONETIC_ENCODING_UNSPECIFIED = 0 + + # IPA, such as apple -> ˈæpəl. + # https://en.wikipedia.org/wiki/International_Phonetic_Alphabet + PHONETIC_ENCODING_IPA = 1 + + # X-SAMPA, such as apple -> "{p@l". + # https://en.wikipedia.org/wiki/X-SAMPA + PHONETIC_ENCODING_X_SAMPA = 2 + + # For reading-to-pron conversion to work well, the `pronunciation` field + # should only contain Kanji, Hiragana, and Katakana. + # + # The pronunciation can also contain pitch accents. + # The start of a pitch phrase is specified with `^` and the down-pitch + # position is specified with `!`, for example: + # + # phrase:端 pronunciation:^はし + # phrase:箸 pronunciation:^は!し + # phrase:橋 pronunciation:^はし! + # + # We currently only support the Tokyo dialect, which allows at most one + # down-pitch per phrase (i.e. at most one `!` between `^`). + PHONETIC_ENCODING_JAPANESE_YOMIGANA = 3 + + # Used to specify pronunciations for Mandarin words. See + # https://en.wikipedia.org/wiki/Pinyin. + # + # For example: 朝阳, the pronunciation is "chao2 yang2". The number + # represents the tone, and there is a space between syllables. Neutral + # tones are represented by 5, for example 孩子 "hai2 zi5". + PHONETIC_ENCODING_PINYIN = 4 + end + end + + # A collection of pronunciation customizations. + # @!attribute [rw] pronunciations + # @return [::Array<::Google::Cloud::TextToSpeech::V1beta1::CustomPronunciationParams>] + # The pronunciation customizations are applied. + class CustomPronunciations + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A collection of turns for multi-speaker synthesis. + # @!attribute [rw] turns + # @return [::Array<::Google::Cloud::TextToSpeech::V1beta1::MultiSpeakerMarkup::Turn>] + # Required. Speaker turns. + class MultiSpeakerMarkup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A multi-speaker turn. + # @!attribute [rw] speaker + # @return [::String] + # Required. The speaker of the turn, for example, 'O' or 'Q'. Please refer + # to documentation for available speakers. + # @!attribute [rw] text + # @return [::String] + # Required. The text to speak. + class Turn + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Configuration for a single speaker in a Gemini TTS multi-speaker setup. + # Enables dialogue between two speakers. + # @!attribute [rw] speaker_alias + # @return [::String] + # Required. The speaker alias of the voice. This is the user-chosen speaker + # name that is used in the multispeaker text input, such as "Speaker1". + # @!attribute [rw] speaker_id + # @return [::String] + # Required. The speaker ID of the voice. See + # https://cloud.google.com/text-to-speech/docs/gemini-tts#voice_options + # for available values. + class MultispeakerPrebuiltVoice + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for a multi-speaker text-to-speech setup. Enables the use of up + # to two distinct voices in a single synthesis request. + # @!attribute [rw] speaker_voice_configs + # @return [::Array<::Google::Cloud::TextToSpeech::V1beta1::MultispeakerPrebuiltVoice>] + # Required. A list of configurations for the voices of the speakers. Exactly + # two speaker voice configurations must be provided. + class MultiSpeakerVoiceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains text input to be synthesized. Either `text` or `ssml` must be + # supplied. Supplying both or neither returns + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. The + # input size is limited to 5000 bytes. + # @!attribute [rw] text + # @return [::String] + # The raw text to be synthesized. + # + # Note: The following fields are mutually exclusive: `text`, `markup`, `ssml`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] markup + # @return [::String] + # Markup for HD voices specifically. This field may not be used with any + # other voices. + # + # Note: The following fields are mutually exclusive: `markup`, `text`, `ssml`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] ssml + # @return [::String] + # The SSML document to be synthesized. The SSML document must be valid + # and well-formed. Otherwise the RPC will fail and return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. For + # more information, see + # [SSML](https://cloud.google.com/text-to-speech/docs/ssml). + # + # Note: The following fields are mutually exclusive: `ssml`, `text`, `markup`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] multi_speaker_markup + # @return [::Google::Cloud::TextToSpeech::V1beta1::MultiSpeakerMarkup] + # The multi-speaker input to be synthesized. Only applicable for + # multi-speaker synthesis. + # + # Note: The following fields are mutually exclusive: `multi_speaker_markup`, `text`, `markup`, `ssml`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] prompt + # @return [::String] + # This system instruction is supported only for controllable/promptable voice + # models. If this system instruction is used, we pass the unedited text to + # Gemini-TTS. Otherwise, a default system instruction is used. AI Studio + # calls this system instruction, Style Instructions. + # @!attribute [rw] custom_pronunciations + # @return [::Google::Cloud::TextToSpeech::V1beta1::CustomPronunciations] + # Optional. The pronunciation customizations are applied to the input. If + # this is set, the input is synthesized using the given pronunciation + # customizations. + # + # The initial support is for en-us, with plans to expand to other locales in + # the future. Instant Clone voices aren't supported. + # + # In order to customize the pronunciation of a phrase, there must be an exact + # match of the phrase in the input types. If using SSML, the phrase must not + # be inside a phoneme tag. + class SynthesisInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Description of which voice to use for a synthesis request. + # @!attribute [rw] language_code + # @return [::String] + # Required. The language (and potentially also the region) of the voice + # expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + # language tag, e.g. "en-US". This should not include a script tag (e.g. use + # "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred + # from the input provided in the SynthesisInput. The TTS service + # will use this parameter to help choose an appropriate voice. Note that + # the TTS service may choose a voice with a slightly different language code + # than the one selected; it may substitute a different region + # (e.g. using en-US rather than en-CA if there isn't a Canadian voice + # available), or even a different language, e.g. using "nb" (Norwegian + # Bokmal) instead of "no" (Norwegian)". + # @!attribute [rw] name + # @return [::String] + # The name of the voice. If both the name and the gender are not set, + # the service will choose a voice based on the other parameters such as + # language_code. + # @!attribute [rw] ssml_gender + # @return [::Google::Cloud::TextToSpeech::V1beta1::SsmlVoiceGender] + # The preferred gender of the voice. If not set, the service will + # choose a voice based on the other parameters such as language_code and + # name. Note that this is only a preference, not requirement; if a + # voice of the appropriate gender is not available, the synthesizer should + # substitute a voice with a different gender rather than failing the request. + # @!attribute [rw] custom_voice + # @return [::Google::Cloud::TextToSpeech::V1beta1::CustomVoiceParams] + # The configuration for a custom voice. If [CustomVoiceParams.model] is set, + # the service will choose the custom voice matching the specified + # configuration. + # @!attribute [rw] voice_clone + # @return [::Google::Cloud::TextToSpeech::V1beta1::VoiceCloneParams] + # Optional. The configuration for a voice clone. If + # [VoiceCloneParams.voice_clone_key] is set, the service chooses the voice + # clone matching the specified configuration. + # @!attribute [rw] model_name + # @return [::String] + # Optional. The name of the model. If set, the service will choose the model + # matching the specified configuration. + # @!attribute [rw] multi_speaker_voice_config + # @return [::Google::Cloud::TextToSpeech::V1beta1::MultiSpeakerVoiceConfig] + # Optional. The configuration for a Gemini multi-speaker text-to-speech + # setup. Enables the use of two distinct voices in a single synthesis + # request. + class VoiceSelectionParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Description of audio data to be synthesized. + # @!attribute [rw] audio_encoding + # @return [::Google::Cloud::TextToSpeech::V1beta1::AudioEncoding] + # Required. The format of the audio byte stream. + # @!attribute [rw] speaking_rate + # @return [::Float] + # Optional. Input only. Speaking rate/speed, in the range [0.25, 2.0]. 1.0 is + # the normal native speed supported by the specific voice. 2.0 is twice as + # fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 + # speed. Any other values < 0.25 or > 2.0 will return an error. + # @!attribute [rw] pitch + # @return [::Float] + # Optional. Input only. Speaking pitch, in the range [-20.0, 20.0]. 20 means + # increase 20 semitones from the original pitch. -20 means decrease 20 + # semitones from the original pitch. + # @!attribute [rw] volume_gain_db + # @return [::Float] + # Optional. Input only. Volume gain (in dB) of the normal native volume + # supported by the specific voice, in the range [-96.0, 16.0]. If unset, or + # set to a value of 0.0 (dB), will play at normal native signal amplitude. A + # value of -6.0 (dB) will play at approximately half the amplitude of the + # normal native signal amplitude. A value of +6.0 (dB) will play at + # approximately twice the amplitude of the normal native signal amplitude. + # Strongly recommend not to exceed +10 (dB) as there's usually no effective + # increase in loudness for any value greater than that. + # @!attribute [rw] sample_rate_hertz + # @return [::Integer] + # Optional. The synthesis sample rate (in hertz) for this audio. When this is + # specified in SynthesizeSpeechRequest, if this is different from the voice's + # natural sample rate, then the synthesizer will honor this request by + # converting to the desired sample rate (which might result in worse audio + # quality), unless the specified sample rate is not supported for the + # encoding chosen, in which case it will fail the request and return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + # @!attribute [rw] effects_profile_id + # @return [::Array<::String>] + # Optional. Input only. An identifier which selects 'audio effects' profiles + # that are applied on (post synthesized) text to speech. Effects are applied + # on top of each other in the order they are given. See + # [audio + # profiles](https://cloud.google.com/text-to-speech/docs/audio-profiles) for + # current supported profile ids. + class AudioConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Description of the custom voice to be synthesized. + # @!attribute [rw] model + # @return [::String] + # Required. The name of the AutoML model that synthesizes the custom voice. + # @!attribute [rw] reported_usage + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::TextToSpeech::V1beta1::CustomVoiceParams::ReportedUsage] + # Optional. Deprecated. The usage of the synthesized audio to be reported. + class CustomVoiceParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Deprecated. The usage of the synthesized audio. Usage does not affect + # billing. + module ReportedUsage + # Request with reported usage unspecified will be rejected. + REPORTED_USAGE_UNSPECIFIED = 0 + + # For scenarios where the synthesized audio is not downloadable and can + # only be used once. For example, real-time request in IVR system. + REALTIME = 1 + + # For scenarios where the synthesized audio is downloadable and can be + # reused. For example, the synthesized audio is downloaded, stored in + # customer service system and played repeatedly. + OFFLINE = 2 + end + end + + # The configuration of Voice Clone feature. + # @!attribute [rw] voice_cloning_key + # @return [::String] + # Required. Created by GenerateVoiceCloningKey. + class VoiceCloneParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The message returned to the client by the `SynthesizeSpeech` method. + # @!attribute [rw] audio_content + # @return [::String] + # The audio data bytes encoded as specified in the request, including the + # header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS). + # For LINEAR16 audio, we include the WAV header. Note: as + # with all bytes fields, protobuffers use a pure binary representation, + # whereas JSON representations use base64. + # @!attribute [rw] timepoints + # @return [::Array<::Google::Cloud::TextToSpeech::V1beta1::Timepoint>] + # A link between a position in the original request input and a corresponding + # time in the output audio. It's only supported via `` of SSML input. + # @!attribute [rw] audio_config + # @return [::Google::Cloud::TextToSpeech::V1beta1::AudioConfig] + # The audio metadata of `audio_content`. + class SynthesizeSpeechResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This contains a mapping between a certain point in the input text and a + # corresponding time in the output audio. + # @!attribute [rw] mark_name + # @return [::String] + # Timepoint name as received from the client within `` tag. + # @!attribute [rw] time_seconds + # @return [::Float] + # Time offset in seconds from the start of the synthesized audio. + class Timepoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Description of the desired output audio data. + # @!attribute [rw] audio_encoding + # @return [::Google::Cloud::TextToSpeech::V1beta1::AudioEncoding] + # Required. The format of the audio byte stream. + # Streaming supports PCM, ALAW, MULAW and OGG_OPUS. All other encodings + # return an error. + # @!attribute [rw] sample_rate_hertz + # @return [::Integer] + # Optional. The synthesis sample rate (in hertz) for this audio. + # @!attribute [rw] speaking_rate + # @return [::Float] + # Optional. Input only. Speaking rate/speed, in the range [0.25, 2.0]. 1.0 is + # the normal native speed supported by the specific voice. 2.0 is twice as + # fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 + # speed. Any other values < 0.25 or > 2.0 will return an error. + class StreamingAudioConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides configuration information for the StreamingSynthesize request. + # @!attribute [rw] voice + # @return [::Google::Cloud::TextToSpeech::V1beta1::VoiceSelectionParams] + # Required. The desired voice of the synthesized audio. + # @!attribute [rw] streaming_audio_config + # @return [::Google::Cloud::TextToSpeech::V1beta1::StreamingAudioConfig] + # Optional. The configuration of the synthesized audio. + # @!attribute [rw] custom_pronunciations + # @return [::Google::Cloud::TextToSpeech::V1beta1::CustomPronunciations] + # Optional. The pronunciation customizations are applied to the input. If + # this is set, the input is synthesized using the given pronunciation + # customizations. + # + # The initial support is for en-us, with plans to expand to other locales in + # the future. Instant Clone voices aren't supported. + # + # In order to customize the pronunciation of a phrase, there must be an exact + # match of the phrase in the input types. If using SSML, the phrase must not + # be inside a phoneme tag. + class StreamingSynthesizeConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input to be synthesized. + # @!attribute [rw] text + # @return [::String] + # The raw text to be synthesized. It is recommended that each input + # contains complete, terminating sentences, which results in better prosody + # in the output audio. + # + # Note: The following fields are mutually exclusive: `text`, `markup`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] markup + # @return [::String] + # Markup for HD voices specifically. This field may not be used with any + # other voices. + # + # Note: The following fields are mutually exclusive: `markup`, `text`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] multi_speaker_markup + # @return [::Google::Cloud::TextToSpeech::V1beta1::MultiSpeakerMarkup] + # Multi-speaker markup for Gemini TTS. This field may not + # be used with any other voices. + # + # Note: The following fields are mutually exclusive: `multi_speaker_markup`, `text`, `markup`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] prompt + # @return [::String] + # This is system instruction supported only for controllable voice models. + class StreamingSynthesisInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `StreamingSynthesize` method. Multiple + # `StreamingSynthesizeRequest` messages are sent in one call. + # The first message must contain a `streaming_config` that + # fully specifies the request configuration and must not contain `input`. All + # subsequent messages must only have `input` set. + # @!attribute [rw] streaming_config + # @return [::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeConfig] + # StreamingSynthesizeConfig to be used in this streaming attempt. Only + # specified in the first message sent in a `StreamingSynthesize` call. + # + # Note: The following fields are mutually exclusive: `streaming_config`, `input`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] input + # @return [::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesisInput] + # Input to synthesize. Specified in all messages but the first in a + # `StreamingSynthesize` call. + # + # Note: The following fields are mutually exclusive: `input`, `streaming_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class StreamingSynthesizeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `StreamingSynthesizeResponse` is the only message returned to the + # client by `StreamingSynthesize` method. A series of zero or more + # `StreamingSynthesizeResponse` messages are streamed back to the client. + # @!attribute [rw] audio_content + # @return [::String] + # The audio data bytes encoded as specified in the request. This is + # headerless LINEAR16 audio with a sample rate of 24000. + class StreamingSynthesizeResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Gender of the voice as described in + # [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice). + module SsmlVoiceGender + # An unspecified gender. + # In VoiceSelectionParams, this means that the client doesn't care which + # gender the selected voice will have. In the Voice field of + # ListVoicesResponse, this may mean that the voice doesn't fit any of the + # other categories in this enum, or that the gender of the voice isn't known. + SSML_VOICE_GENDER_UNSPECIFIED = 0 + + # A male voice. + MALE = 1 + + # A female voice. + FEMALE = 2 + + # A gender-neutral voice. This voice is not yet supported. + NEUTRAL = 3 + end + + # Configuration to set up audio encoder. The encoding determines the output + # audio format that we'd like. + module AudioEncoding + # Not specified. Only used by GenerateVoiceCloningKey. Otherwise, will return + # result + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + AUDIO_ENCODING_UNSPECIFIED = 0 + + # Uncompressed 16-bit signed little-endian samples (Linear PCM). + # Audio content returned as LINEAR16 also contains a WAV header. + LINEAR16 = 1 + + # MP3 audio at 32kbps. + MP3 = 2 + + # MP3 at 64kbps. + MP3_64_KBPS = 4 + + # Opus encoded audio wrapped in an ogg container. The result is a + # file which can be played natively on Android, and in browsers (at least + # Chrome and Firefox). The quality of the encoding is considerably higher + # than MP3 while using approximately the same bitrate. + OGG_OPUS = 3 + + # 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. + # Audio content returned as MULAW also contains a WAV header. + MULAW = 5 + + # 8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law. + # Audio content returned as ALAW also contains a WAV header. + ALAW = 6 + + # Uncompressed 16-bit signed little-endian samples (Linear PCM). + # Note that as opposed to LINEAR16, audio won't be wrapped in a WAV (or + # any other) header. + PCM = 7 + + # M4A audio. + M4A = 8 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/cloud/texttospeech/v1beta1/cloud_tts_lrs.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/cloud/texttospeech/v1beta1/cloud_tts_lrs.rb new file mode 100644 index 000000000000..c155bf275945 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/cloud/texttospeech/v1beta1/cloud_tts_lrs.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module TextToSpeech + module V1beta1 + # The top-level message sent by the client for the + # `SynthesizeLongAudio` method. + # @!attribute [rw] parent + # @return [::String] + # The resource states of the request in the form of + # `projects/*/locations/*`. + # @!attribute [rw] input + # @return [::Google::Cloud::TextToSpeech::V1beta1::SynthesisInput] + # Required. The Synthesizer requires either plain text or SSML as input. + # @!attribute [rw] audio_config + # @return [::Google::Cloud::TextToSpeech::V1beta1::AudioConfig] + # Required. The configuration of the synthesized audio. + # @!attribute [rw] output_gcs_uri + # @return [::String] + # Required. Specifies a Cloud Storage URI for the synthesis results. Must be + # specified in the format: `gs://bucket_name/object_name`, and the bucket + # must already exist. + # @!attribute [rw] voice + # @return [::Google::Cloud::TextToSpeech::V1beta1::VoiceSelectionParams] + # Required. The desired voice of the synthesized audio. + class SynthesizeLongAudioRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The message returned to the client by the `SynthesizeLongAudio` method. + class SynthesizeLongAudioResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for response returned by the `SynthesizeLongAudio` method. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Time when the request was received. + # @!attribute [rw] last_update_time + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::Timestamp] + # Deprecated. Do not use. + # @!attribute [rw] progress_percentage + # @return [::Float] + # The progress of the most recent processing update in percentage, ie. 70.0%. + class SynthesizeLongAudioMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/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-text_to_speech-v1beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/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-text_to_speech-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/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-text_to_speech-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/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-text_to_speech-v1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/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-text_to_speech-v1beta1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/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-text_to_speech-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/Gemfile new file mode 100644 index 000000000000..d5f0f822f878 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/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-text_to_speech-v1beta1", path: "../" +else + gem "google-cloud-text_to_speech-v1beta1" +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-text_to_speech-v1beta1/snippets/snippet_metadata_google.cloud.texttospeech.v1beta1.json b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/snippet_metadata_google.cloud.texttospeech.v1beta1.json new file mode 100644 index 000000000000..37611738d746 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/snippet_metadata_google.cloud.texttospeech.v1beta1.json @@ -0,0 +1,175 @@ +{ + "client_library": { + "name": "google-cloud-text_to_speech-v1beta1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.texttospeech.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "region_tag": "texttospeech_v1beta1_generated_TextToSpeech_ListVoices_sync", + "title": "Snippet for the list_voices call in the TextToSpeech service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client#list_voices.", + "file": "text_to_speech/list_voices.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_voices", + "full_name": "::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client#list_voices", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse", + "client": { + "short_name": "TextToSpeech::Client", + "full_name": "::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client" + }, + "method": { + "short_name": "ListVoices", + "full_name": "google.cloud.texttospeech.v1beta1.TextToSpeech.ListVoices", + "service": { + "short_name": "TextToSpeech", + "full_name": "google.cloud.texttospeech.v1beta1.TextToSpeech" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "texttospeech_v1beta1_generated_TextToSpeech_SynthesizeSpeech_sync", + "title": "Snippet for the synthesize_speech call in the TextToSpeech service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client#synthesize_speech.", + "file": "text_to_speech/synthesize_speech.rb", + "language": "RUBY", + "client_method": { + "short_name": "synthesize_speech", + "full_name": "::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client#synthesize_speech", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse", + "client": { + "short_name": "TextToSpeech::Client", + "full_name": "::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client" + }, + "method": { + "short_name": "SynthesizeSpeech", + "full_name": "google.cloud.texttospeech.v1beta1.TextToSpeech.SynthesizeSpeech", + "service": { + "short_name": "TextToSpeech", + "full_name": "google.cloud.texttospeech.v1beta1.TextToSpeech" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "texttospeech_v1beta1_generated_TextToSpeech_StreamingSynthesize_sync", + "title": "Snippet for the streaming_synthesize call in the TextToSpeech service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client#streaming_synthesize.", + "file": "text_to_speech/streaming_synthesize.rb", + "language": "RUBY", + "client_method": { + "short_name": "streaming_synthesize", + "full_name": "::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client#streaming_synthesize", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeResponse", + "client": { + "short_name": "TextToSpeech::Client", + "full_name": "::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client" + }, + "method": { + "short_name": "StreamingSynthesize", + "full_name": "google.cloud.texttospeech.v1beta1.TextToSpeech.StreamingSynthesize", + "service": { + "short_name": "TextToSpeech", + "full_name": "google.cloud.texttospeech.v1beta1.TextToSpeech" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 55, + "type": "FULL" + } + ] + }, + { + "region_tag": "texttospeech_v1beta1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_sync", + "title": "Snippet for the synthesize_long_audio call in the TextToSpeechLongAudioSynthesize service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client#synthesize_long_audio.", + "file": "text_to_speech_long_audio_synthesize/synthesize_long_audio.rb", + "language": "RUBY", + "client_method": { + "short_name": "synthesize_long_audio", + "full_name": "::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client#synthesize_long_audio", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "TextToSpeechLongAudioSynthesize::Client", + "full_name": "::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client" + }, + "method": { + "short_name": "SynthesizeLongAudio", + "full_name": "google.cloud.texttospeech.v1beta1.TextToSpeechLongAudioSynthesize.SynthesizeLongAudio", + "service": { + "short_name": "TextToSpeechLongAudioSynthesize", + "full_name": "google.cloud.texttospeech.v1beta1.TextToSpeechLongAudioSynthesize" + } + } + }, + "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-text_to_speech-v1beta1/snippets/text_to_speech/list_voices.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech/list_voices.rb new file mode 100644 index 000000000000..72a6f7d574e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech/list_voices.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 texttospeech_v1beta1_generated_TextToSpeech_ListVoices_sync] +require "google/cloud/text_to_speech/v1beta1" + +## +# Snippet for the list_voices call in the TextToSpeech service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client#list_voices. +# +def list_voices + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest.new + + # Call the list_voices method. + result = client.list_voices request + + # The returned object is of type Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse. + p result +end +# [END texttospeech_v1beta1_generated_TextToSpeech_ListVoices_sync] diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech/streaming_synthesize.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech/streaming_synthesize.rb new file mode 100644 index 000000000000..69970b81486e --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech/streaming_synthesize.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 texttospeech_v1beta1_generated_TextToSpeech_StreamingSynthesize_sync] +require "google/cloud/text_to_speech/v1beta1" + +## +# Snippet for the streaming_synthesize call in the TextToSpeech service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client#streaming_synthesize. +# +def streaming_synthesize + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new + + # Create an input stream. + input = Gapic::StreamInput.new + + # Call the streaming_synthesize method to start streaming. + output = client.streaming_synthesize 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::TextToSpeech::V1beta1::StreamingSynthesizeRequest.new + input << Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeRequest.new + input.close + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeResponse + output.each do |current_response| + p current_response + end +end +# [END texttospeech_v1beta1_generated_TextToSpeech_StreamingSynthesize_sync] diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech/synthesize_speech.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech/synthesize_speech.rb new file mode 100644 index 000000000000..9ec83074902f --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech/synthesize_speech.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 texttospeech_v1beta1_generated_TextToSpeech_SynthesizeSpeech_sync] +require "google/cloud/text_to_speech/v1beta1" + +## +# Snippet for the synthesize_speech call in the TextToSpeech service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client#synthesize_speech. +# +def synthesize_speech + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest.new + + # Call the synthesize_speech method. + result = client.synthesize_speech request + + # The returned object is of type Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse. + p result +end +# [END texttospeech_v1beta1_generated_TextToSpeech_SynthesizeSpeech_sync] diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech_long_audio_synthesize/synthesize_long_audio.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech_long_audio_synthesize/synthesize_long_audio.rb new file mode 100644 index 000000000000..ea7685188b99 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech_long_audio_synthesize/synthesize_long_audio.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 texttospeech_v1beta1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_sync] +require "google/cloud/text_to_speech/v1beta1" + +## +# Snippet for the synthesize_long_audio call in the TextToSpeechLongAudioSynthesize service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client#synthesize_long_audio. +# +def synthesize_long_audio + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest.new + + # Call the synthesize_long_audio method. + result = client.synthesize_long_audio request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END texttospeech_v1beta1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_sync] diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_operations_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_operations_test.rb new file mode 100644 index 000000000000..9f679ded2226 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_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/texttospeech/v1beta1/cloud_tts_lrs_pb" +require "google/cloud/texttospeech/v1beta1/cloud_tts_lrs_services_pb" +require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize" + +class ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_paths_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_paths_test.rb new file mode 100644 index 000000000000..434f49ebc8f3 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_paths_test.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 "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize" + +class ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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_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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.model_path project: "value0", location: "value1", model: "value2" + assert_equal "projects/value0/locations/value1/models/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_rest_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_rest_test.rb new file mode 100644 index 000000000000..8cc355c8b862 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_rest_test.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 "helper" +require "gapic/rest" +require "google/cloud/texttospeech/v1beta1/cloud_tts_lrs_pb" +require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest" + + +class ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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_synthesize_long_audio + # Create test objects. + 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" + input = {} + audio_config = {} + output_gcs_uri = "hello world" + voice = {} + + synthesize_long_audio_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::ServiceStub.stub :transcode_synthesize_long_audio_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, synthesize_long_audio_client_stub do + # Create client + client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.synthesize_long_audio({ parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.synthesize_long_audio parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.synthesize_long_audio ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest.new(parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.synthesize_long_audio({ parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.synthesize_long_audio(::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest.new(parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, synthesize_long_audio_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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_test.rb new file mode 100644 index 000000000000..5671468e58a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_test.rb @@ -0,0 +1,189 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/texttospeech/v1beta1/cloud_tts_lrs_pb" +require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize" + +class ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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_synthesize_long_audio + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + input = {} + audio_config = {} + output_gcs_uri = "hello world" + voice = {} + + synthesize_long_audio_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :synthesize_long_audio, name + assert_kind_of ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1beta1::SynthesisInput), request["input"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1beta1::AudioConfig), request["audio_config"] + assert_equal "hello world", request["output_gcs_uri"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1beta1::VoiceSelectionParams), request["voice"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, synthesize_long_audio_client_stub do + # Create client + client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.synthesize_long_audio({ parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.synthesize_long_audio parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.synthesize_long_audio ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest.new(parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.synthesize_long_audio({ parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.synthesize_long_audio(::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest.new(parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, synthesize_long_audio_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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_paths_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_paths_test.rb new file mode 100644 index 000000000000..0dd55bde46da --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_paths_test.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 "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/text_to_speech/v1beta1/text_to_speech" + +class ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::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_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::TextToSpeech::V1beta1::TextToSpeech::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.model_path project: "value0", location: "value1", model: "value2" + assert_equal "projects/value0/locations/value1/models/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_rest_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_rest_test.rb new file mode 100644 index 000000000000..acb908987e5e --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_rest_test.rb @@ -0,0 +1,211 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/texttospeech/v1beta1/cloud_tts_pb" +require "google/cloud/text_to_speech/v1beta1/text_to_speech/rest" + + +class ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::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_voices + # Create test objects. + client_result = ::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + language_code = "hello world" + + list_voices_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::ServiceStub.stub :transcode_list_voices_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_voices_client_stub do + # Create client + client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_voices({ language_code: language_code }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_voices language_code: language_code do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_voices ::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest.new(language_code: language_code) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_voices({ language_code: language_code }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_voices(::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest.new(language_code: language_code), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_voices_client_stub.call_count + end + end + end + + def test_synthesize_speech + # Create test objects. + client_result = ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + input = {} + voice = {} + audio_config = {} + enable_time_pointing = [:TIMEPOINT_TYPE_UNSPECIFIED] + advanced_voice_options = {} + + synthesize_speech_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::ServiceStub.stub :transcode_synthesize_speech_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, synthesize_speech_client_stub do + # Create client + client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.synthesize_speech({ input: input, voice: voice, audio_config: audio_config, enable_time_pointing: enable_time_pointing, advanced_voice_options: advanced_voice_options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.synthesize_speech input: input, voice: voice, audio_config: audio_config, enable_time_pointing: enable_time_pointing, advanced_voice_options: advanced_voice_options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.synthesize_speech ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest.new(input: input, voice: voice, audio_config: audio_config, enable_time_pointing: enable_time_pointing, advanced_voice_options: advanced_voice_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.synthesize_speech({ input: input, voice: voice, audio_config: audio_config, enable_time_pointing: enable_time_pointing, advanced_voice_options: advanced_voice_options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.synthesize_speech(::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest.new(input: input, voice: voice, audio_config: audio_config, enable_time_pointing: enable_time_pointing, advanced_voice_options: advanced_voice_options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, synthesize_speech_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::TextToSpeech::V1beta1::TextToSpeech::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::TextToSpeech::V1beta1::TextToSpeech::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_test.rb new file mode 100644 index 000000000000..b789760fe045 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_test.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! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/texttospeech/v1beta1/cloud_tts_pb" +require "google/cloud/text_to_speech/v1beta1/text_to_speech" + +class ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::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_voices + # Create GRPC objects. + grpc_response = ::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + language_code = "hello world" + + list_voices_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_voices, name + assert_kind_of ::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest, request + assert_equal "hello world", request["language_code"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_voices_client_stub do + # Create client + client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_voices({ language_code: language_code }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_voices language_code: language_code do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_voices ::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest.new(language_code: language_code) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_voices({ language_code: language_code }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_voices(::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest.new(language_code: language_code), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_voices_client_stub.call_rpc_count + end + end + + def test_synthesize_speech + # Create GRPC objects. + grpc_response = ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + input = {} + voice = {} + audio_config = {} + enable_time_pointing = [:TIMEPOINT_TYPE_UNSPECIFIED] + advanced_voice_options = {} + + synthesize_speech_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :synthesize_speech, name + assert_kind_of ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1beta1::SynthesisInput), request["input"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1beta1::VoiceSelectionParams), request["voice"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1beta1::AudioConfig), request["audio_config"] + assert_equal [:TIMEPOINT_TYPE_UNSPECIFIED], request["enable_time_pointing"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1beta1::AdvancedVoiceOptions), request["advanced_voice_options"] + assert request.has_advanced_voice_options? + refute_nil options + end + + Gapic::ServiceStub.stub :new, synthesize_speech_client_stub do + # Create client + client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.synthesize_speech({ input: input, voice: voice, audio_config: audio_config, enable_time_pointing: enable_time_pointing, advanced_voice_options: advanced_voice_options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.synthesize_speech input: input, voice: voice, audio_config: audio_config, enable_time_pointing: enable_time_pointing, advanced_voice_options: advanced_voice_options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.synthesize_speech ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest.new(input: input, voice: voice, audio_config: audio_config, enable_time_pointing: enable_time_pointing, advanced_voice_options: advanced_voice_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.synthesize_speech({ input: input, voice: voice, audio_config: audio_config, enable_time_pointing: enable_time_pointing, advanced_voice_options: advanced_voice_options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.synthesize_speech(::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest.new(input: input, voice: voice, audio_config: audio_config, enable_time_pointing: enable_time_pointing, advanced_voice_options: advanced_voice_options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, synthesize_speech_client_stub.call_rpc_count + end + end + + def test_streaming_synthesize + # Create GRPC objects. + grpc_response = ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeResponse.new + grpc_operation = GRPC::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. + streaming_config = {} + + streaming_synthesize_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :streaming_synthesize, name + assert_kind_of Enumerable, request + refute_nil options + request + end + + Gapic::ServiceStub.stub :new, streaming_synthesize_client_stub do + # Create client + client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new do |config| + config.credentials = grpc_channel + end + + # Use enumerable object with hash and protobuf object. + request_hash = { streaming_config: streaming_config } + request_proto = ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeRequest.new streaming_config: streaming_config + enum_input = [request_hash, request_proto].to_enum + client.streaming_synthesize enum_input do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeResponse, r + end + assert_equal grpc_operation, operation + end + + # Use stream input object (from gapic-common). + request_hash = { streaming_config: streaming_config } + request_proto = ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeRequest.new streaming_config: streaming_config + stream_input = Gapic::StreamInput.new + client.streaming_synthesize stream_input do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeResponse, 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 = { streaming_config: streaming_config } + request_proto = ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeRequest.new streaming_config: streaming_config + enum_input = [request_hash, request_proto].to_enum + client.streaming_synthesize enum_input, grpc_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeResponse, r + end + assert_equal grpc_operation, operation + end + + # Use stream input object (from gapic-common) with options. + request_hash = { streaming_config: streaming_config } + request_proto = ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeRequest.new streaming_config: streaming_config + stream_input = Gapic::StreamInput.new + client.streaming_synthesize stream_input, grpc_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeResponse, 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, streaming_synthesize_client_stub.call_rpc_count + streaming_synthesize_client_stub.requests.each do |request| + request.to_a.each do |r| + assert_kind_of ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeRequest, r + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeConfig), r["streaming_config"] + assert_equal :streaming_config, r.streaming_request + end + end + 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::TextToSpeech::V1beta1::TextToSpeech::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::TextToSpeech::V1beta1::TextToSpeech::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::TextToSpeech::V1beta1::TextToSpeech::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-tpu-v1/.gitignore b/owl-bot-staging/google-cloud-tpu-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-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-tpu-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-tpu-v1/.repo-metadata.json new file mode 100644 index 000000000000..382bdf22eb6e --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "tpu.googleapis.com", + "api_shortname": "tpu", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-tpu-v1/latest", + "distribution_name": "google-cloud-tpu-v1", + "is_cloud": true, + "language": "ruby", + "name": "tpu", + "name_pretty": "Cloud TPU V1 API", + "product_documentation": "https://cloud.google.com/tpu/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Tensor Processing Units (TPUs) are Google's custom-developed application-specific integrated circuits (ASICs) used to accelerate machine learning workloads. Cloud TPUs allow you to access TPUs from Compute Engine, Google Kubernetes Engine and AI Platform. Note that google-cloud-tpu-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-tpu instead. See the readme for more details.", + "ruby-cloud-env-prefix": "CLOUD_TPU", + "ruby-cloud-product-url": "https://cloud.google.com/tpu/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-tpu-v1/.rubocop.yml b/owl-bot-staging/google-cloud-tpu-v1/.rubocop.yml new file mode 100644 index 000000000000..0db23e57cdbd --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-tpu-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-tpu-v1.rb" diff --git a/owl-bot-staging/google-cloud-tpu-v1/.toys.rb b/owl-bot-staging/google-cloud-tpu-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-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-tpu-v1/.yardopts b/owl-bot-staging/google-cloud-tpu-v1/.yardopts new file mode 100644 index 000000000000..f2c8ec30b07e --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud TPU 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-tpu-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-tpu-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..dcd3772bc00e --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-tpu-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-tpu-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/tpu/v1" + +client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/tpu/v1" + +::Google::Cloud::Tpu::V1::Tpu::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Tpu::V1::Tpu::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-tpu-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/tpu/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Tpu::V1::Tpu::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-tpu-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-tpu-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-tpu-v1/Gemfile b/owl-bot-staging/google-cloud-tpu-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-tpu-v1/LICENSE.md b/owl-bot-staging/google-cloud-tpu-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-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-tpu-v1/README.md b/owl-bot-staging/google-cloud-tpu-v1/README.md new file mode 100644 index 000000000000..8e5f3796c7e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud TPU V1 API + +TPU API provides customers with access to Google TPU technology. + +Tensor Processing Units (TPUs) are Google's custom-developed application-specific integrated circuits (ASICs) used to accelerate machine learning workloads. Cloud TPUs allow you to access TPUs from Compute Engine, Google Kubernetes Engine and AI Platform. + +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 TPU V1 API. Most users should consider using +the main client gem, +[google-cloud-tpu](https://rubygems.org/gems/google-cloud-tpu). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-tpu-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/tpu.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/tpu/v1" + +client = ::Google::Cloud::Tpu::V1::Tpu::Client.new +request = ::Google::Cloud::Tpu::V1::ListNodesRequest.new # (request fields as keyword arguments...) +response = client.list_nodes request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-tpu-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/tpu/) +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/tpu/v1" +require "logger" + +client = ::Google::Cloud::Tpu::V1::Tpu::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-tpu`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-tpu-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-tpu`. +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-tpu-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-tpu-v1/Rakefile b/owl-bot-staging/google-cloud-tpu-v1/Rakefile new file mode 100644 index 000000000000..6973baaa474a --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-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-tpu-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["CLOUD_TPU_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["CLOUD_TPU_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["CLOUD_TPU_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 CLOUD_TPU_TEST_PROJECT=test123 CLOUD_TPU_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/tpu/v1/tpu/credentials" + ::Google::Cloud::Tpu::V1::Tpu::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["CLOUD_TPU_PROJECT"] = project + ENV["CLOUD_TPU_TEST_PROJECT"] = project + ENV["CLOUD_TPU_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-tpu-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-tpu-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-tpu-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-tpu-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-tpu-v1" + header "google-cloud-tpu-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-tpu-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-tpu-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-tpu-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-tpu-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-tpu-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-tpu-v1/gapic_metadata.json new file mode 100644 index 000000000000..d3485f86c0f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-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.tpu.v1", + "libraryPackage": "::Google::Cloud::Tpu::V1", + "services": { + "Tpu": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Tpu::V1::Tpu::Client", + "rpcs": { + "ListNodes": { + "methods": [ + "list_nodes" + ] + }, + "GetNode": { + "methods": [ + "get_node" + ] + }, + "CreateNode": { + "methods": [ + "create_node" + ] + }, + "DeleteNode": { + "methods": [ + "delete_node" + ] + }, + "ReimageNode": { + "methods": [ + "reimage_node" + ] + }, + "StopNode": { + "methods": [ + "stop_node" + ] + }, + "StartNode": { + "methods": [ + "start_node" + ] + }, + "ListTensorFlowVersions": { + "methods": [ + "list_tensor_flow_versions" + ] + }, + "GetTensorFlowVersion": { + "methods": [ + "get_tensor_flow_version" + ] + }, + "ListAcceleratorTypes": { + "methods": [ + "list_accelerator_types" + ] + }, + "GetAcceleratorType": { + "methods": [ + "get_accelerator_type" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-tpu-v1/google-cloud-tpu-v1.gemspec b/owl-bot-staging/google-cloud-tpu-v1/google-cloud-tpu-v1.gemspec new file mode 100644 index 000000000000..a0c096780448 --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/google-cloud-tpu-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/tpu/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-tpu-v1" + gem.version = Google::Cloud::Tpu::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Tensor Processing Units (TPUs) are Google's custom-developed application-specific integrated circuits (ASICs) used to accelerate machine learning workloads. Cloud TPUs allow you to access TPUs from Compute Engine, Google Kubernetes Engine and AI Platform. Note that google-cloud-tpu-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-tpu instead. See the readme for more details." + gem.summary = "TPU API provides customers with access to Google TPU technology." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-tpu-v1/lib/google-cloud-tpu-v1.rb b/owl-bot-staging/google-cloud-tpu-v1/lib/google-cloud-tpu-v1.rb new file mode 100644 index 000000000000..feffd3cd43da --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/lib/google-cloud-tpu-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/tpu/v1" diff --git a/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1.rb b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1.rb new file mode 100644 index 000000000000..04462f2cc2c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/tpu/v1/tpu" +require "google/cloud/tpu/v1/version" + +module Google + module Cloud + module Tpu + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/tpu/v1" + # client = ::Google::Cloud::Tpu::V1::Tpu::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/tpu/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/cloud_tpu_pb.rb b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/cloud_tpu_pb.rb new file mode 100644 index 000000000000..ef5ed72337db --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/cloud_tpu_pb.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/tpu/v1/cloud_tpu.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/timestamp_pb' + + +descriptor_data = "\n#google/cloud/tpu/v1/cloud_tpu.proto\x12\x13google.cloud.tpu.v1\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\x1fgoogle/protobuf/timestamp.proto\"9\n\x10SchedulingConfig\x12\x13\n\x0bpreemptible\x18\x01 \x01(\x08\x12\x10\n\x08reserved\x18\x02 \x01(\x08\"3\n\x0fNetworkEndpoint\x12\x12\n\nip_address\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\x05\"\xc1\n\n\x04Node\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x1d\n\x10\x61\x63\x63\x65lerator_type\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\nip_address\x18\x08 \x01(\tB\x02\x18\x01\x12\x10\n\x04port\x18\x0e \x01(\tB\x02\x18\x01\x12\x33\n\x05state\x18\t \x01(\x0e\x32\x1f.google.cloud.tpu.v1.Node.StateB\x03\xe0\x41\x03\x12\x1f\n\x12health_description\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12tensorflow_version\x18\x0b \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07network\x18\x0c \x01(\t\x12\x12\n\ncidr_block\x18\r \x01(\t\x12\x1c\n\x0fservice_account\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x11scheduling_config\x18\x11 \x01(\x0b\x32%.google.cloud.tpu.v1.SchedulingConfig\x12\x44\n\x11network_endpoints\x18\x15 \x03(\x0b\x32$.google.cloud.tpu.v1.NetworkEndpointB\x03\xe0\x41\x03\x12\x30\n\x06health\x18\x16 \x01(\x0e\x32 .google.cloud.tpu.v1.Node.Health\x12\x35\n\x06labels\x18\x18 \x03(\x0b\x32%.google.cloud.tpu.v1.Node.LabelsEntry\x12\x1e\n\x16use_service_networking\x18\x1b \x01(\x08\x12>\n\x0b\x61pi_version\x18& \x01(\x0e\x32$.google.cloud.tpu.v1.Node.ApiVersionB\x03\xe0\x41\x03\x12\x33\n\x08symptoms\x18\' \x03(\x0b\x32\x1c.google.cloud.tpu.v1.SymptomB\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\"\xee\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0e\n\nRESTARTING\x10\x03\x12\r\n\tREIMAGING\x10\x04\x12\x0c\n\x08\x44\x45LETING\x10\x05\x12\r\n\tREPAIRING\x10\x06\x12\x0b\n\x07STOPPED\x10\x08\x12\x0c\n\x08STOPPING\x10\t\x12\x0c\n\x08STARTING\x10\n\x12\r\n\tPREEMPTED\x10\x0b\x12\x0e\n\nTERMINATED\x10\x0c\x12\n\n\x06HIDING\x10\r\x12\n\n\x06HIDDEN\x10\x0e\x12\x0c\n\x08UNHIDING\x10\x0f\x12\x0b\n\x07UNKNOWN\x10\x10\"\x89\x01\n\x06Health\x12\x16\n\x12HEALTH_UNSPECIFIED\x10\x00\x12\x0b\n\x07HEALTHY\x10\x01\x12\x18\n\x14\x44\x45PRECATED_UNHEALTHY\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x18\n\x14UNHEALTHY_TENSORFLOW\x10\x04\x12\x19\n\x15UNHEALTHY_MAINTENANCE\x10\x05\"O\n\nApiVersion\x12\x1b\n\x17\x41PI_VERSION_UNSPECIFIED\x10\x00\x12\r\n\tV1_ALPHA1\x10\x01\x12\x06\n\x02V1\x10\x02\x12\r\n\tV2_ALPHA1\x10\x03:R\xea\x41O\n\x17tpu.googleapis.com/Node\x12\x34projects/{project}/locations/{location}/nodes/{node}\"j\n\x10ListNodesRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17tpu.googleapis.com/Node\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"k\n\x11ListNodesResponse\x12(\n\x05nodes\x18\x01 \x03(\x0b\x32\x19.google.cloud.tpu.v1.Node\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"?\n\x0eGetNodeRequest\x12-\n\x04name\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\n\x17tpu.googleapis.com/Node\"\x83\x01\n\x11\x43reateNodeRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17tpu.googleapis.com/Node\x12\x0f\n\x07node_id\x18\x02 \x01(\t\x12,\n\x04node\x18\x03 \x01(\x0b\x32\x19.google.cloud.tpu.v1.NodeB\x03\xe0\x41\x02\"B\n\x11\x44\x65leteNodeRequest\x12-\n\x04name\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\n\x17tpu.googleapis.com/Node\">\n\x12ReimageNodeRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\x12tensorflow_version\x18\x02 \x01(\t\"\x1f\n\x0fStopNodeRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\" \n\x10StartNodeRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\xaf\x01\n\x11TensorFlowVersion\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t:{\xea\x41x\n$tpu.googleapis.com/TensorFlowVersion\x12Pprojects/{project}/locations/{location}/tensorFlowVersions/{tensor_flow_version}\"Y\n\x1bGetTensorFlowVersionRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$tpu.googleapis.com/TensorFlowVersion\"\xa6\x01\n\x1dListTensorFlowVersionsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$tpu.googleapis.com/TensorFlowVersion\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\x12\x10\n\x08order_by\x18\x06 \x01(\t\"\x93\x01\n\x1eListTensorFlowVersionsResponse\x12\x43\n\x13tensorflow_versions\x18\x01 \x03(\x0b\x32&.google.cloud.tpu.v1.TensorFlowVersion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xa3\x01\n\x0f\x41\x63\x63\x65leratorType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t:t\xea\x41q\n\"tpu.googleapis.com/AcceleratorType\x12Kprojects/{project}/locations/{location}/acceleratorTypes/{accelerator_type}\"U\n\x19GetAcceleratorTypeRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"tpu.googleapis.com/AcceleratorType\"\xa2\x01\n\x1bListAcceleratorTypesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"tpu.googleapis.com/AcceleratorType\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\x12\x10\n\x08order_by\x18\x06 \x01(\t\"\x8d\x01\n\x1cListAcceleratorTypesResponse\x12?\n\x11\x61\x63\x63\x65lerator_types\x18\x01 \x03(\x0b\x32$.google.cloud.tpu.v1.AcceleratorType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xd6\x01\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\"\xc5\x02\n\x07Symptom\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x0csymptom_type\x18\x02 \x01(\x0e\x32(.google.cloud.tpu.v1.Symptom.SymptomType\x12\x0f\n\x07\x64\x65tails\x18\x03 \x01(\t\x12\x11\n\tworker_id\x18\x04 \x01(\t\"\xa4\x01\n\x0bSymptomType\x12\x1c\n\x18SYMPTOM_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nLOW_MEMORY\x10\x01\x12\x11\n\rOUT_OF_MEMORY\x10\x02\x12\x15\n\x11\x45XECUTE_TIMED_OUT\x10\x03\x12\x13\n\x0fMESH_BUILD_FAIL\x10\x04\x12\x15\n\x11HBM_OUT_OF_MEMORY\x10\x05\x12\x11\n\rPROJECT_ABUSE\x10\x06\x32\xde\x0f\n\x03Tpu\x12\x96\x01\n\tListNodes\x12%.google.cloud.tpu.v1.ListNodesRequest\x1a&.google.cloud.tpu.v1.ListNodesResponse\":\xda\x41\x06parent\x82\xd3\xe4\x93\x02+\x12)/v1/{parent=projects/*/locations/*}/nodes\x12\x83\x01\n\x07GetNode\x12#.google.cloud.tpu.v1.GetNodeRequest\x1a\x19.google.cloud.tpu.v1.Node\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+\x12)/v1/{name=projects/*/locations/*/nodes/*}\x12\xbe\x01\n\nCreateNode\x12&.google.cloud.tpu.v1.CreateNodeRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41\x19\n\x04Node\x12\x11OperationMetadata\xda\x41\x13parent,node,node_id\x82\xd3\xe4\x93\x02\x31\")/v1/{parent=projects/*/locations/*}/nodes:\x04node\x12\xa9\x01\n\nDeleteNode\x12&.google.cloud.tpu.v1.DeleteNodeRequest\x1a\x1d.google.longrunning.Operation\"T\xca\x41\x19\n\x04Node\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02+*)/v1/{name=projects/*/locations/*/nodes/*}\x12\xaf\x01\n\x0bReimageNode\x12\'.google.cloud.tpu.v1.ReimageNodeRequest\x1a\x1d.google.longrunning.Operation\"X\xca\x41\x19\n\x04Node\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/locations/*/nodes/*}:reimage:\x01*\x12\xa6\x01\n\x08StopNode\x12$.google.cloud.tpu.v1.StopNodeRequest\x1a\x1d.google.longrunning.Operation\"U\xca\x41\x19\n\x04Node\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\x33\"./v1/{name=projects/*/locations/*/nodes/*}:stop:\x01*\x12\xa9\x01\n\tStartNode\x12%.google.cloud.tpu.v1.StartNodeRequest\x1a\x1d.google.longrunning.Operation\"V\xca\x41\x19\n\x04Node\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\x34\"//v1/{name=projects/*/locations/*/nodes/*}:start:\x01*\x12\xca\x01\n\x16ListTensorFlowVersions\x12\x32.google.cloud.tpu.v1.ListTensorFlowVersionsRequest\x1a\x33.google.cloud.tpu.v1.ListTensorFlowVersionsResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{parent=projects/*/locations/*}/tensorflowVersions\x12\xb7\x01\n\x14GetTensorFlowVersion\x12\x30.google.cloud.tpu.v1.GetTensorFlowVersionRequest\x1a&.google.cloud.tpu.v1.TensorFlowVersion\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/locations/*/tensorflowVersions/*}\x12\xc2\x01\n\x14ListAcceleratorTypes\x12\x30.google.cloud.tpu.v1.ListAcceleratorTypesRequest\x1a\x31.google.cloud.tpu.v1.ListAcceleratorTypesResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*}/acceleratorTypes\x12\xaf\x01\n\x12GetAcceleratorType\x12..google.cloud.tpu.v1.GetAcceleratorTypeRequest\x1a$.google.cloud.tpu.v1.AcceleratorType\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/acceleratorTypes/*}\x1a\x46\xca\x41\x12tpu.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBU\n\x17\x63om.google.cloud.tpu.v1B\rCloudTpuProtoP\x01Z)cloud.google.com/go/tpu/apiv1/tpupb;tpupbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Tpu + module V1 + SchedulingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.SchedulingConfig").msgclass + NetworkEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.NetworkEndpoint").msgclass + Node = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.Node").msgclass + Node::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.Node.State").enummodule + Node::Health = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.Node.Health").enummodule + Node::ApiVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.Node.ApiVersion").enummodule + ListNodesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.ListNodesRequest").msgclass + ListNodesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.ListNodesResponse").msgclass + GetNodeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.GetNodeRequest").msgclass + CreateNodeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.CreateNodeRequest").msgclass + DeleteNodeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.DeleteNodeRequest").msgclass + ReimageNodeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.ReimageNodeRequest").msgclass + StopNodeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.StopNodeRequest").msgclass + StartNodeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.StartNodeRequest").msgclass + TensorFlowVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.TensorFlowVersion").msgclass + GetTensorFlowVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.GetTensorFlowVersionRequest").msgclass + ListTensorFlowVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.ListTensorFlowVersionsRequest").msgclass + ListTensorFlowVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.ListTensorFlowVersionsResponse").msgclass + AcceleratorType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.AcceleratorType").msgclass + GetAcceleratorTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.GetAcceleratorTypeRequest").msgclass + ListAcceleratorTypesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.ListAcceleratorTypesRequest").msgclass + ListAcceleratorTypesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.ListAcceleratorTypesResponse").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.OperationMetadata").msgclass + Symptom = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.Symptom").msgclass + Symptom::SymptomType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.Symptom.SymptomType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/cloud_tpu_services_pb.rb b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/cloud_tpu_services_pb.rb new file mode 100644 index 000000000000..2aafa9ceccbb --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/cloud_tpu_services_pb.rb @@ -0,0 +1,67 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/tpu/v1/cloud_tpu.proto for package 'google.cloud.tpu.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/tpu/v1/cloud_tpu_pb' + +module Google + module Cloud + module Tpu + module V1 + module Tpu + # Manages TPU nodes and other resources + # + # TPU API v1 + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.tpu.v1.Tpu' + + # Lists nodes. + rpc :ListNodes, ::Google::Cloud::Tpu::V1::ListNodesRequest, ::Google::Cloud::Tpu::V1::ListNodesResponse + # Gets the details of a node. + rpc :GetNode, ::Google::Cloud::Tpu::V1::GetNodeRequest, ::Google::Cloud::Tpu::V1::Node + # Creates a node. + rpc :CreateNode, ::Google::Cloud::Tpu::V1::CreateNodeRequest, ::Google::Longrunning::Operation + # Deletes a node. + rpc :DeleteNode, ::Google::Cloud::Tpu::V1::DeleteNodeRequest, ::Google::Longrunning::Operation + # Reimages a node's OS. + rpc :ReimageNode, ::Google::Cloud::Tpu::V1::ReimageNodeRequest, ::Google::Longrunning::Operation + # Stops a node, this operation is only available with single TPU nodes. + rpc :StopNode, ::Google::Cloud::Tpu::V1::StopNodeRequest, ::Google::Longrunning::Operation + # Starts a node. + rpc :StartNode, ::Google::Cloud::Tpu::V1::StartNodeRequest, ::Google::Longrunning::Operation + # List TensorFlow versions supported by this API. + rpc :ListTensorFlowVersions, ::Google::Cloud::Tpu::V1::ListTensorFlowVersionsRequest, ::Google::Cloud::Tpu::V1::ListTensorFlowVersionsResponse + # Gets TensorFlow Version. + rpc :GetTensorFlowVersion, ::Google::Cloud::Tpu::V1::GetTensorFlowVersionRequest, ::Google::Cloud::Tpu::V1::TensorFlowVersion + # Lists accelerator types supported by this API. + rpc :ListAcceleratorTypes, ::Google::Cloud::Tpu::V1::ListAcceleratorTypesRequest, ::Google::Cloud::Tpu::V1::ListAcceleratorTypesResponse + # Gets AcceleratorType. + rpc :GetAcceleratorType, ::Google::Cloud::Tpu::V1::GetAcceleratorTypeRequest, ::Google::Cloud::Tpu::V1::AcceleratorType + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu.rb b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu.rb new file mode 100644 index 000000000000..30ee70ee9626 --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu.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 "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/tpu/v1/version" + +require "google/cloud/tpu/v1/tpu/credentials" +require "google/cloud/tpu/v1/tpu/paths" +require "google/cloud/tpu/v1/tpu/operations" +require "google/cloud/tpu/v1/tpu/client" + +module Google + module Cloud + module Tpu + module V1 + ## + # Manages TPU nodes and other resources + # + # TPU API v1 + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/tpu/v1/tpu" + # client = ::Google::Cloud::Tpu::V1::Tpu::Client.new + # + module Tpu + end + end + end + end +end + +helper_path = ::File.join __dir__, "tpu", "helpers.rb" +require "google/cloud/tpu/v1/tpu/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/client.rb b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/client.rb new file mode 100644 index 000000000000..2b7b841df38b --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/client.rb @@ -0,0 +1,1517 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/tpu/v1/cloud_tpu_pb" +require "google/cloud/location" + +module Google + module Cloud + module Tpu + module V1 + module Tpu + ## + # Client for the Tpu service. + # + # Manages TPU nodes and other resources + # + # TPU API v1 + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "tpu.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :tpu_stub + + ## + # Configure the Tpu Client class. + # + # See {::Google::Cloud::Tpu::V1::Tpu::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Tpu clients + # ::Google::Cloud::Tpu::V1::Tpu::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", "Tpu", "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.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Tpu 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::Tpu::V1::Tpu::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 + @tpu_stub.universe_domain + end + + ## + # Create a new Tpu client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Tpu::V1::Tpu::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Tpu 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/tpu/v1/cloud_tpu_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 + + @tpu_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Tpu::V1::Tpu::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 + ) + + @tpu_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 = @tpu_stub.endpoint + config.universe_domain = @tpu_stub.universe_domain + config.logger = @tpu_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Tpu::V1::Tpu::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 + @tpu_stub.logger + end + + # Service calls + + ## + # Lists nodes. + # + # @overload list_nodes(request, options = nil) + # Pass arguments to `list_nodes` via a request object, either of type + # {::Google::Cloud::Tpu::V1::ListNodesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tpu::V1::ListNodesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_nodes(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_nodes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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. + # @param page_size [::Integer] + # The maximum number of items to return. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Tpu::V1::Node>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Tpu::V1::Node>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tpu/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tpu::V1::Tpu::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tpu::V1::ListNodesRequest.new + # + # # Call the list_nodes method. + # result = client.list_nodes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Tpu::V1::Node. + # p item + # end + # + def list_nodes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tpu::V1::ListNodesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_nodes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tpu::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_nodes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_nodes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tpu_stub.call_rpc :list_nodes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @tpu_stub, :list_nodes, 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 node. + # + # @overload get_node(request, options = nil) + # Pass arguments to `get_node` via a request object, either of type + # {::Google::Cloud::Tpu::V1::GetNodeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tpu::V1::GetNodeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_node(name: nil) + # Pass arguments to `get_node` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tpu::V1::Node] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tpu::V1::Node] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tpu/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tpu::V1::Tpu::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tpu::V1::GetNodeRequest.new + # + # # Call the get_node method. + # result = client.get_node request + # + # # The returned object is of type Google::Cloud::Tpu::V1::Node. + # p result + # + def get_node request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tpu::V1::GetNodeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_node.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tpu::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_node.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_node.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tpu_stub.call_rpc :get_node, request, 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 node. + # + # @overload create_node(request, options = nil) + # Pass arguments to `create_node` via a request object, either of type + # {::Google::Cloud::Tpu::V1::CreateNodeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tpu::V1::CreateNodeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_node(parent: nil, node_id: nil, node: nil) + # Pass arguments to `create_node` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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. + # @param node_id [::String] + # The unqualified resource name. + # @param node [::Google::Cloud::Tpu::V1::Node, ::Hash] + # Required. The node. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tpu/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tpu::V1::Tpu::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tpu::V1::CreateNodeRequest.new + # + # # Call the create_node method. + # result = client.create_node request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_node request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tpu::V1::CreateNodeRequest + + # Converts hash and nil to 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_node.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tpu::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_node.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_node.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tpu_stub.call_rpc :create_node, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 node. + # + # @overload delete_node(request, options = nil) + # Pass arguments to `delete_node` via a request object, either of type + # {::Google::Cloud::Tpu::V1::DeleteNodeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tpu::V1::DeleteNodeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_node(name: nil) + # Pass arguments to `delete_node` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource 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/tpu/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tpu::V1::Tpu::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tpu::V1::DeleteNodeRequest.new + # + # # Call the delete_node method. + # result = client.delete_node request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_node request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tpu::V1::DeleteNodeRequest + + # Converts hash and nil to 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_node.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tpu::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_node.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_node.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tpu_stub.call_rpc :delete_node, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Reimages a node's OS. + # + # @overload reimage_node(request, options = nil) + # Pass arguments to `reimage_node` via a request object, either of type + # {::Google::Cloud::Tpu::V1::ReimageNodeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tpu::V1::ReimageNodeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload reimage_node(name: nil, tensorflow_version: nil) + # Pass arguments to `reimage_node` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The resource name. + # @param tensorflow_version [::String] + # The version for reimage 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/tpu/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tpu::V1::Tpu::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tpu::V1::ReimageNodeRequest.new + # + # # Call the reimage_node method. + # result = client.reimage_node request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def reimage_node request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tpu::V1::ReimageNodeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.reimage_node.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tpu::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.reimage_node.timeout, + metadata: metadata, + retry_policy: @config.rpcs.reimage_node.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tpu_stub.call_rpc :reimage_node, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Stops a node, this operation is only available with single TPU nodes. + # + # @overload stop_node(request, options = nil) + # Pass arguments to `stop_node` via a request object, either of type + # {::Google::Cloud::Tpu::V1::StopNodeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tpu::V1::StopNodeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload stop_node(name: nil) + # Pass arguments to `stop_node` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The resource 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/tpu/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tpu::V1::Tpu::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tpu::V1::StopNodeRequest.new + # + # # Call the stop_node method. + # result = client.stop_node request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def stop_node request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tpu::V1::StopNodeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.stop_node.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tpu::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.stop_node.timeout, + metadata: metadata, + retry_policy: @config.rpcs.stop_node.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tpu_stub.call_rpc :stop_node, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts a node. + # + # @overload start_node(request, options = nil) + # Pass arguments to `start_node` via a request object, either of type + # {::Google::Cloud::Tpu::V1::StartNodeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tpu::V1::StartNodeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload start_node(name: nil) + # Pass arguments to `start_node` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The resource 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/tpu/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tpu::V1::Tpu::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tpu::V1::StartNodeRequest.new + # + # # Call the start_node method. + # result = client.start_node request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def start_node request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tpu::V1::StartNodeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.start_node.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tpu::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.start_node.timeout, + metadata: metadata, + retry_policy: @config.rpcs.start_node.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tpu_stub.call_rpc :start_node, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 TensorFlow versions supported by this API. + # + # @overload list_tensor_flow_versions(request, options = nil) + # Pass arguments to `list_tensor_flow_versions` via a request object, either of type + # {::Google::Cloud::Tpu::V1::ListTensorFlowVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tpu::V1::ListTensorFlowVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_tensor_flow_versions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_tensor_flow_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 resource name. + # @param page_size [::Integer] + # The maximum number of items to return. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # @param filter [::String] + # List filter. + # @param order_by [::String] + # Sort results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Tpu::V1::TensorFlowVersion>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Tpu::V1::TensorFlowVersion>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tpu/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tpu::V1::Tpu::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tpu::V1::ListTensorFlowVersionsRequest.new + # + # # Call the list_tensor_flow_versions method. + # result = client.list_tensor_flow_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::Tpu::V1::TensorFlowVersion. + # p item + # end + # + def list_tensor_flow_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tpu::V1::ListTensorFlowVersionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_tensor_flow_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::Tpu::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_tensor_flow_versions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_tensor_flow_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tpu_stub.call_rpc :list_tensor_flow_versions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @tpu_stub, :list_tensor_flow_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 + + ## + # Gets TensorFlow Version. + # + # @overload get_tensor_flow_version(request, options = nil) + # Pass arguments to `get_tensor_flow_version` via a request object, either of type + # {::Google::Cloud::Tpu::V1::GetTensorFlowVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tpu::V1::GetTensorFlowVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_tensor_flow_version(name: nil) + # Pass arguments to `get_tensor_flow_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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tpu::V1::TensorFlowVersion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tpu::V1::TensorFlowVersion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tpu/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tpu::V1::Tpu::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tpu::V1::GetTensorFlowVersionRequest.new + # + # # Call the get_tensor_flow_version method. + # result = client.get_tensor_flow_version request + # + # # The returned object is of type Google::Cloud::Tpu::V1::TensorFlowVersion. + # p result + # + def get_tensor_flow_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tpu::V1::GetTensorFlowVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_tensor_flow_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::Tpu::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_tensor_flow_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_tensor_flow_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tpu_stub.call_rpc :get_tensor_flow_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 accelerator types supported by this API. + # + # @overload list_accelerator_types(request, options = nil) + # Pass arguments to `list_accelerator_types` via a request object, either of type + # {::Google::Cloud::Tpu::V1::ListAcceleratorTypesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tpu::V1::ListAcceleratorTypesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_accelerator_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_accelerator_types` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name. + # @param page_size [::Integer] + # The maximum number of items to return. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # @param filter [::String] + # List filter. + # @param order_by [::String] + # Sort results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Tpu::V1::AcceleratorType>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Tpu::V1::AcceleratorType>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tpu/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tpu::V1::Tpu::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tpu::V1::ListAcceleratorTypesRequest.new + # + # # Call the list_accelerator_types method. + # result = client.list_accelerator_types request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Tpu::V1::AcceleratorType. + # p item + # end + # + def list_accelerator_types request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tpu::V1::ListAcceleratorTypesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_accelerator_types.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tpu::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_accelerator_types.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_accelerator_types.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tpu_stub.call_rpc :list_accelerator_types, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @tpu_stub, :list_accelerator_types, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets AcceleratorType. + # + # @overload get_accelerator_type(request, options = nil) + # Pass arguments to `get_accelerator_type` via a request object, either of type + # {::Google::Cloud::Tpu::V1::GetAcceleratorTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Tpu::V1::GetAcceleratorTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_accelerator_type(name: nil) + # Pass arguments to `get_accelerator_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Tpu::V1::AcceleratorType] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Tpu::V1::AcceleratorType] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/tpu/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Tpu::V1::Tpu::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Tpu::V1::GetAcceleratorTypeRequest.new + # + # # Call the get_accelerator_type method. + # result = client.get_accelerator_type request + # + # # The returned object is of type Google::Cloud::Tpu::V1::AcceleratorType. + # p result + # + def get_accelerator_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tpu::V1::GetAcceleratorTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_accelerator_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Tpu::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_accelerator_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_accelerator_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @tpu_stub.call_rpc :get_accelerator_type, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Tpu API. + # + # This class represents the configuration for Tpu, + # 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::Tpu::V1::Tpu::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_nodes to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Tpu::V1::Tpu::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_nodes.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_nodes.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::Tpu::V1::Tpu::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 = "tpu.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 Tpu 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_nodes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_nodes + ## + # RPC-specific configuration for `get_node` + # @return [::Gapic::Config::Method] + # + attr_reader :get_node + ## + # RPC-specific configuration for `create_node` + # @return [::Gapic::Config::Method] + # + attr_reader :create_node + ## + # RPC-specific configuration for `delete_node` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_node + ## + # RPC-specific configuration for `reimage_node` + # @return [::Gapic::Config::Method] + # + attr_reader :reimage_node + ## + # RPC-specific configuration for `stop_node` + # @return [::Gapic::Config::Method] + # + attr_reader :stop_node + ## + # RPC-specific configuration for `start_node` + # @return [::Gapic::Config::Method] + # + attr_reader :start_node + ## + # RPC-specific configuration for `list_tensor_flow_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tensor_flow_versions + ## + # RPC-specific configuration for `get_tensor_flow_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_tensor_flow_version + ## + # RPC-specific configuration for `list_accelerator_types` + # @return [::Gapic::Config::Method] + # + attr_reader :list_accelerator_types + ## + # RPC-specific configuration for `get_accelerator_type` + # @return [::Gapic::Config::Method] + # + attr_reader :get_accelerator_type + + # @private + def initialize parent_rpcs = nil + list_nodes_config = parent_rpcs.list_nodes if parent_rpcs.respond_to? :list_nodes + @list_nodes = ::Gapic::Config::Method.new list_nodes_config + get_node_config = parent_rpcs.get_node if parent_rpcs.respond_to? :get_node + @get_node = ::Gapic::Config::Method.new get_node_config + create_node_config = parent_rpcs.create_node if parent_rpcs.respond_to? :create_node + @create_node = ::Gapic::Config::Method.new create_node_config + delete_node_config = parent_rpcs.delete_node if parent_rpcs.respond_to? :delete_node + @delete_node = ::Gapic::Config::Method.new delete_node_config + reimage_node_config = parent_rpcs.reimage_node if parent_rpcs.respond_to? :reimage_node + @reimage_node = ::Gapic::Config::Method.new reimage_node_config + stop_node_config = parent_rpcs.stop_node if parent_rpcs.respond_to? :stop_node + @stop_node = ::Gapic::Config::Method.new stop_node_config + start_node_config = parent_rpcs.start_node if parent_rpcs.respond_to? :start_node + @start_node = ::Gapic::Config::Method.new start_node_config + list_tensor_flow_versions_config = parent_rpcs.list_tensor_flow_versions if parent_rpcs.respond_to? :list_tensor_flow_versions + @list_tensor_flow_versions = ::Gapic::Config::Method.new list_tensor_flow_versions_config + get_tensor_flow_version_config = parent_rpcs.get_tensor_flow_version if parent_rpcs.respond_to? :get_tensor_flow_version + @get_tensor_flow_version = ::Gapic::Config::Method.new get_tensor_flow_version_config + list_accelerator_types_config = parent_rpcs.list_accelerator_types if parent_rpcs.respond_to? :list_accelerator_types + @list_accelerator_types = ::Gapic::Config::Method.new list_accelerator_types_config + get_accelerator_type_config = parent_rpcs.get_accelerator_type if parent_rpcs.respond_to? :get_accelerator_type + @get_accelerator_type = ::Gapic::Config::Method.new get_accelerator_type_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/credentials.rb b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/credentials.rb new file mode 100644 index 000000000000..9c95a410d65c --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/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 Tpu + module V1 + module Tpu + # Credentials for the Tpu API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "CLOUD_TPU_CREDENTIALS", + "CLOUD_TPU_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "CLOUD_TPU_CREDENTIALS_JSON", + "CLOUD_TPU_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-tpu-v1/lib/google/cloud/tpu/v1/tpu/operations.rb b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/operations.rb new file mode 100644 index 000000000000..2705f05c388e --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/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 Tpu + module V1 + module Tpu + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "tpu.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Tpu 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 Tpu 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::Tpu::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Tpu::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Tpu::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Tpu::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Tpu::V1::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 = "tpu.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-tpu-v1/lib/google/cloud/tpu/v1/tpu/paths.rb b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/paths.rb new file mode 100644 index 000000000000..e459e1626bc7 --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/paths.rb @@ -0,0 +1,107 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Tpu + module V1 + module Tpu + # Path helper methods for the Tpu API. + module Paths + ## + # Create a fully-qualified AcceleratorType resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/acceleratorTypes/{accelerator_type}` + # + # @param project [String] + # @param location [String] + # @param accelerator_type [String] + # + # @return [::String] + def accelerator_type_path project:, location:, accelerator_type: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/acceleratorTypes/#{accelerator_type}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified Node resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/nodes/{node}` + # + # @param project [String] + # @param location [String] + # @param node [String] + # + # @return [::String] + def node_path project:, location:, node: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/nodes/#{node}" + end + + ## + # Create a fully-qualified TensorFlowVersion resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/tensorFlowVersions/{tensor_flow_version}` + # + # @param project [String] + # @param location [String] + # @param tensor_flow_version [String] + # + # @return [::String] + def tensor_flow_version_path project:, location:, tensor_flow_version: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/tensorFlowVersions/#{tensor_flow_version}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/version.rb b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/version.rb new file mode 100644 index 000000000000..371ff2ba232b --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/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 Tpu + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tpu-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/README.md new file mode 100644 index 000000000000..f1be9ff90bac --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud TPU 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-tpu-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # 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. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + # + # Example: + # + # 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 + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # 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 + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # 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 + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-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-tpu-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-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-tpu-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-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-tpu-v1/proto_docs/google/cloud/tpu/v1/cloud_tpu.rb b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/cloud/tpu/v1/cloud_tpu.rb new file mode 100644 index 000000000000..337015bf0ead --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/cloud/tpu/v1/cloud_tpu.rb @@ -0,0 +1,521 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Tpu + module V1 + # Sets the scheduling options for this node. + # @!attribute [rw] preemptible + # @return [::Boolean] + # Defines whether the node is preemptible. + # @!attribute [rw] reserved + # @return [::Boolean] + # Whether the node is created under a reservation. + class SchedulingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A network endpoint over which a TPU worker can be reached. + # @!attribute [rw] ip_address + # @return [::String] + # The IP address of this network endpoint. + # @!attribute [rw] port + # @return [::Integer] + # The port of this network endpoint. + class NetworkEndpoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A TPU instance. + # @!attribute [r] name + # @return [::String] + # Output only. Immutable. The name of the TPU + # @!attribute [rw] description + # @return [::String] + # The user-supplied description of the TPU. Maximum of 512 characters. + # @!attribute [rw] accelerator_type + # @return [::String] + # Required. The type of hardware accelerators associated with this node. + # @!attribute [rw] ip_address + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Output only. DEPRECATED! Use network_endpoints instead. + # The network address for the TPU Node as visible to Compute Engine + # instances. + # @!attribute [rw] port + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Output only. DEPRECATED! Use network_endpoints instead. + # The network port for the TPU Node as visible to Compute Engine instances. + # @!attribute [r] state + # @return [::Google::Cloud::Tpu::V1::Node::State] + # Output only. The current state for the TPU Node. + # @!attribute [r] health_description + # @return [::String] + # Output only. If this field is populated, it contains a description of why + # the TPU Node is unhealthy. + # @!attribute [rw] tensorflow_version + # @return [::String] + # Required. The version of Tensorflow running in the Node. + # @!attribute [rw] network + # @return [::String] + # The name of a network they wish to peer the TPU node to. It must be a + # preexisting Compute Engine network inside of the project on which this API + # has been activated. If none is provided, "default" will be used. + # @!attribute [rw] cidr_block + # @return [::String] + # The CIDR block that the TPU node will use when selecting an IP address. + # This CIDR block must be a /29 block; the Compute Engine networks API + # forbids a smaller block, and using a larger block would be wasteful (a + # node can only consume one IP address). Errors will occur if the CIDR block + # has already been used for a currently existing TPU node, the CIDR block + # conflicts with any subnetworks in the user's provided network, or the + # provided network is peered with another network that is using that CIDR + # block. + # @!attribute [r] service_account + # @return [::String] + # Output only. The service account used to run the tensor flow services + # within the node. To share resources, including Google Cloud Storage data, + # with the Tensorflow job running in the Node, this account must have + # permissions to that data. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the node was created. + # @!attribute [rw] scheduling_config + # @return [::Google::Cloud::Tpu::V1::SchedulingConfig] + # The scheduling options for this node. + # @!attribute [r] network_endpoints + # @return [::Array<::Google::Cloud::Tpu::V1::NetworkEndpoint>] + # Output only. The network endpoints where TPU workers can be accessed and + # sent work. It is recommended that Tensorflow clients of the node reach out + # to the 0th entry in this map first. + # @!attribute [rw] health + # @return [::Google::Cloud::Tpu::V1::Node::Health] + # The health status of the TPU node. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Resource labels to represent user-provided metadata. + # @!attribute [rw] use_service_networking + # @return [::Boolean] + # Whether the VPC peering for the node is set up through Service Networking + # API. The VPC Peering should be set up before provisioning the node. + # If this field is set, cidr_block field should not be specified. If the + # network, that you want to peer the TPU Node to, is Shared VPC networks, + # the node must be created with this this field enabled. + # @!attribute [r] api_version + # @return [::Google::Cloud::Tpu::V1::Node::ApiVersion] + # Output only. The API version that created this Node. + # @!attribute [r] symptoms + # @return [::Array<::Google::Cloud::Tpu::V1::Symptom>] + # Output only. The Symptoms that have occurred to the TPU Node. + class Node + 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 + + # Represents the different states of a TPU node during its lifecycle. + module State + # TPU node state is not known/set. + STATE_UNSPECIFIED = 0 + + # TPU node is being created. + CREATING = 1 + + # TPU node has been created. + READY = 2 + + # TPU node is restarting. + RESTARTING = 3 + + # TPU node is undergoing reimaging. + REIMAGING = 4 + + # TPU node is being deleted. + DELETING = 5 + + # TPU node is being repaired and may be unusable. Details can be + # found in the `help_description` field. + REPAIRING = 6 + + # TPU node is stopped. + STOPPED = 8 + + # TPU node is currently stopping. + STOPPING = 9 + + # TPU node is currently starting. + STARTING = 10 + + # TPU node has been preempted. Only applies to Preemptible TPU Nodes. + PREEMPTED = 11 + + # TPU node has been terminated due to maintenance or has reached the end of + # its life cycle (for preemptible nodes). + TERMINATED = 12 + + # TPU node is currently hiding. + HIDING = 13 + + # TPU node has been hidden. + HIDDEN = 14 + + # TPU node is currently unhiding. + UNHIDING = 15 + + # TPU node has unknown state after a failed repair. + UNKNOWN = 16 + end + + # Health defines the status of a TPU node as reported by + # Health Monitor. + module Health + # Health status is unknown: not initialized or failed to retrieve. + HEALTH_UNSPECIFIED = 0 + + # The resource is healthy. + HEALTHY = 1 + + # The resource is unhealthy. + DEPRECATED_UNHEALTHY = 2 + + # The resource is unresponsive. + TIMEOUT = 3 + + # The in-guest ML stack is unhealthy. + UNHEALTHY_TENSORFLOW = 4 + + # The node is under maintenance/priority boost caused rescheduling and + # will resume running once rescheduled. + UNHEALTHY_MAINTENANCE = 5 + end + + # TPU API Version. + module ApiVersion + # API version is unknown. + API_VERSION_UNSPECIFIED = 0 + + # TPU API V1Alpha1 version. + V1_ALPHA1 = 1 + + # TPU API V1 version. + V1 = 2 + + # TPU API V2Alpha1 version. + V2_ALPHA1 = 3 + end + end + + # Request for {::Google::Cloud::Tpu::V1::Tpu::Client#list_nodes ListNodes}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous List request, if any. + class ListNodesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for {::Google::Cloud::Tpu::V1::Tpu::Client#list_nodes ListNodes}. + # @!attribute [rw] nodes + # @return [::Array<::Google::Cloud::Tpu::V1::Node>] + # The listed nodes. + # @!attribute [rw] next_page_token + # @return [::String] + # The next page token or empty if none. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListNodesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for {::Google::Cloud::Tpu::V1::Tpu::Client#get_node GetNode}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name. + class GetNodeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for {::Google::Cloud::Tpu::V1::Tpu::Client#create_node CreateNode}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name. + # @!attribute [rw] node_id + # @return [::String] + # The unqualified resource name. + # @!attribute [rw] node + # @return [::Google::Cloud::Tpu::V1::Node] + # Required. The node. + class CreateNodeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for {::Google::Cloud::Tpu::V1::Tpu::Client#delete_node DeleteNode}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name. + class DeleteNodeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for {::Google::Cloud::Tpu::V1::Tpu::Client#reimage_node ReimageNode}. + # @!attribute [rw] name + # @return [::String] + # The resource name. + # @!attribute [rw] tensorflow_version + # @return [::String] + # The version for reimage to create. + class ReimageNodeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for {::Google::Cloud::Tpu::V1::Tpu::Client#stop_node StopNode}. + # @!attribute [rw] name + # @return [::String] + # The resource name. + class StopNodeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for {::Google::Cloud::Tpu::V1::Tpu::Client#start_node StartNode}. + # @!attribute [rw] name + # @return [::String] + # The resource name. + class StartNodeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A tensorflow version that a Node can be configured with. + # @!attribute [rw] name + # @return [::String] + # The resource name. + # @!attribute [rw] version + # @return [::String] + # the tensorflow version. + class TensorFlowVersion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for + # {::Google::Cloud::Tpu::V1::Tpu::Client#get_tensor_flow_version GetTensorFlowVersion}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name. + class GetTensorFlowVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for + # {::Google::Cloud::Tpu::V1::Tpu::Client#list_tensor_flow_versions ListTensorFlowVersions}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous List request, if any. + # @!attribute [rw] filter + # @return [::String] + # List filter. + # @!attribute [rw] order_by + # @return [::String] + # Sort results. + class ListTensorFlowVersionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for + # {::Google::Cloud::Tpu::V1::Tpu::Client#list_tensor_flow_versions ListTensorFlowVersions}. + # @!attribute [rw] tensorflow_versions + # @return [::Array<::Google::Cloud::Tpu::V1::TensorFlowVersion>] + # The listed nodes. + # @!attribute [rw] next_page_token + # @return [::String] + # The next page token or empty if none. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListTensorFlowVersionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A accelerator type that a Node can be configured with. + # @!attribute [rw] name + # @return [::String] + # The resource name. + # @!attribute [rw] type + # @return [::String] + # the accelerator type. + class AcceleratorType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for {::Google::Cloud::Tpu::V1::Tpu::Client#get_accelerator_type GetAcceleratorType}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name. + class GetAcceleratorTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for + # {::Google::Cloud::Tpu::V1::Tpu::Client#list_accelerator_types ListAcceleratorTypes}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous List request, if any. + # @!attribute [rw] filter + # @return [::String] + # List filter. + # @!attribute [rw] order_by + # @return [::String] + # Sort results. + class ListAcceleratorTypesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for + # {::Google::Cloud::Tpu::V1::Tpu::Client#list_accelerator_types ListAcceleratorTypes}. + # @!attribute [rw] accelerator_types + # @return [::Array<::Google::Cloud::Tpu::V1::AcceleratorType>] + # The listed nodes. + # @!attribute [rw] next_page_token + # @return [::String] + # The next page token or empty if none. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListAcceleratorTypesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata describing an {::Google::Longrunning::Operation 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] + # Target of the operation - for example + # projects/project-1/connectivityTests/test-1 + # @!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] + # Specifies if cancellation was requested for the operation. + # @!attribute [rw] api_version + # @return [::String] + # API version. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Symptom instance. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Timestamp when the Symptom is created. + # @!attribute [rw] symptom_type + # @return [::Google::Cloud::Tpu::V1::Symptom::SymptomType] + # Type of the Symptom. + # @!attribute [rw] details + # @return [::String] + # Detailed information of the current Symptom. + # @!attribute [rw] worker_id + # @return [::String] + # A string used to uniquely distinguish a worker within a TPU node. + class Symptom + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # SymptomType represents the different types of Symptoms that a TPU can be + # at. + module SymptomType + # Unspecified symptom. + SYMPTOM_TYPE_UNSPECIFIED = 0 + + # TPU VM memory is low. + LOW_MEMORY = 1 + + # TPU runtime is out of memory. + OUT_OF_MEMORY = 2 + + # TPU runtime execution has timed out. + EXECUTE_TIMED_OUT = 3 + + # TPU runtime fails to construct a mesh that recognizes each TPU device's + # neighbors. + MESH_BUILD_FAIL = 4 + + # TPU HBM is out of memory. + HBM_OUT_OF_MEMORY = 5 + + # Abusive behaviors have been identified on the current project. + PROJECT_ABUSE = 6 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-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-tpu-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-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-tpu-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-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-tpu-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-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-tpu-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-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-tpu-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-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-tpu-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-tpu-v1/snippets/Gemfile new file mode 100644 index 000000000000..8e8e1bbc6e73 --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-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-tpu-v1", path: "../" +else + gem "google-cloud-tpu-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-tpu-v1/snippets/snippet_metadata_google.cloud.tpu.v1.json b/owl-bot-staging/google-cloud-tpu-v1/snippets/snippet_metadata_google.cloud.tpu.v1.json new file mode 100644 index 000000000000..8d24f0d69dda --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/snippets/snippet_metadata_google.cloud.tpu.v1.json @@ -0,0 +1,455 @@ +{ + "client_library": { + "name": "google-cloud-tpu-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.tpu.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "tpu_v1_generated_Tpu_ListNodes_sync", + "title": "Snippet for the list_nodes call in the Tpu service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tpu::V1::Tpu::Client#list_nodes.", + "file": "tpu/list_nodes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_nodes", + "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client#list_nodes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tpu::V1::ListNodesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tpu::V1::ListNodesResponse", + "client": { + "short_name": "Tpu::Client", + "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client" + }, + "method": { + "short_name": "ListNodes", + "full_name": "google.cloud.tpu.v1.Tpu.ListNodes", + "service": { + "short_name": "Tpu", + "full_name": "google.cloud.tpu.v1.Tpu" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "tpu_v1_generated_Tpu_GetNode_sync", + "title": "Snippet for the get_node call in the Tpu service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tpu::V1::Tpu::Client#get_node.", + "file": "tpu/get_node.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_node", + "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client#get_node", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tpu::V1::GetNodeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tpu::V1::Node", + "client": { + "short_name": "Tpu::Client", + "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client" + }, + "method": { + "short_name": "GetNode", + "full_name": "google.cloud.tpu.v1.Tpu.GetNode", + "service": { + "short_name": "Tpu", + "full_name": "google.cloud.tpu.v1.Tpu" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "tpu_v1_generated_Tpu_CreateNode_sync", + "title": "Snippet for the create_node call in the Tpu service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tpu::V1::Tpu::Client#create_node.", + "file": "tpu/create_node.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_node", + "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client#create_node", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tpu::V1::CreateNodeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Tpu::Client", + "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client" + }, + "method": { + "short_name": "CreateNode", + "full_name": "google.cloud.tpu.v1.Tpu.CreateNode", + "service": { + "short_name": "Tpu", + "full_name": "google.cloud.tpu.v1.Tpu" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "tpu_v1_generated_Tpu_DeleteNode_sync", + "title": "Snippet for the delete_node call in the Tpu service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tpu::V1::Tpu::Client#delete_node.", + "file": "tpu/delete_node.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_node", + "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client#delete_node", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tpu::V1::DeleteNodeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Tpu::Client", + "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client" + }, + "method": { + "short_name": "DeleteNode", + "full_name": "google.cloud.tpu.v1.Tpu.DeleteNode", + "service": { + "short_name": "Tpu", + "full_name": "google.cloud.tpu.v1.Tpu" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "tpu_v1_generated_Tpu_ReimageNode_sync", + "title": "Snippet for the reimage_node call in the Tpu service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tpu::V1::Tpu::Client#reimage_node.", + "file": "tpu/reimage_node.rb", + "language": "RUBY", + "client_method": { + "short_name": "reimage_node", + "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client#reimage_node", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tpu::V1::ReimageNodeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Tpu::Client", + "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client" + }, + "method": { + "short_name": "ReimageNode", + "full_name": "google.cloud.tpu.v1.Tpu.ReimageNode", + "service": { + "short_name": "Tpu", + "full_name": "google.cloud.tpu.v1.Tpu" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "tpu_v1_generated_Tpu_StopNode_sync", + "title": "Snippet for the stop_node call in the Tpu service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tpu::V1::Tpu::Client#stop_node.", + "file": "tpu/stop_node.rb", + "language": "RUBY", + "client_method": { + "short_name": "stop_node", + "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client#stop_node", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tpu::V1::StopNodeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Tpu::Client", + "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client" + }, + "method": { + "short_name": "StopNode", + "full_name": "google.cloud.tpu.v1.Tpu.StopNode", + "service": { + "short_name": "Tpu", + "full_name": "google.cloud.tpu.v1.Tpu" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "tpu_v1_generated_Tpu_StartNode_sync", + "title": "Snippet for the start_node call in the Tpu service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tpu::V1::Tpu::Client#start_node.", + "file": "tpu/start_node.rb", + "language": "RUBY", + "client_method": { + "short_name": "start_node", + "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client#start_node", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tpu::V1::StartNodeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Tpu::Client", + "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client" + }, + "method": { + "short_name": "StartNode", + "full_name": "google.cloud.tpu.v1.Tpu.StartNode", + "service": { + "short_name": "Tpu", + "full_name": "google.cloud.tpu.v1.Tpu" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "tpu_v1_generated_Tpu_ListTensorFlowVersions_sync", + "title": "Snippet for the list_tensor_flow_versions call in the Tpu service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tpu::V1::Tpu::Client#list_tensor_flow_versions.", + "file": "tpu/list_tensor_flow_versions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_tensor_flow_versions", + "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client#list_tensor_flow_versions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tpu::V1::ListTensorFlowVersionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tpu::V1::ListTensorFlowVersionsResponse", + "client": { + "short_name": "Tpu::Client", + "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client" + }, + "method": { + "short_name": "ListTensorFlowVersions", + "full_name": "google.cloud.tpu.v1.Tpu.ListTensorFlowVersions", + "service": { + "short_name": "Tpu", + "full_name": "google.cloud.tpu.v1.Tpu" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "tpu_v1_generated_Tpu_GetTensorFlowVersion_sync", + "title": "Snippet for the get_tensor_flow_version call in the Tpu service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tpu::V1::Tpu::Client#get_tensor_flow_version.", + "file": "tpu/get_tensor_flow_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_tensor_flow_version", + "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client#get_tensor_flow_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tpu::V1::GetTensorFlowVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tpu::V1::TensorFlowVersion", + "client": { + "short_name": "Tpu::Client", + "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client" + }, + "method": { + "short_name": "GetTensorFlowVersion", + "full_name": "google.cloud.tpu.v1.Tpu.GetTensorFlowVersion", + "service": { + "short_name": "Tpu", + "full_name": "google.cloud.tpu.v1.Tpu" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "tpu_v1_generated_Tpu_ListAcceleratorTypes_sync", + "title": "Snippet for the list_accelerator_types call in the Tpu service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tpu::V1::Tpu::Client#list_accelerator_types.", + "file": "tpu/list_accelerator_types.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_accelerator_types", + "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client#list_accelerator_types", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tpu::V1::ListAcceleratorTypesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tpu::V1::ListAcceleratorTypesResponse", + "client": { + "short_name": "Tpu::Client", + "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client" + }, + "method": { + "short_name": "ListAcceleratorTypes", + "full_name": "google.cloud.tpu.v1.Tpu.ListAcceleratorTypes", + "service": { + "short_name": "Tpu", + "full_name": "google.cloud.tpu.v1.Tpu" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "tpu_v1_generated_Tpu_GetAcceleratorType_sync", + "title": "Snippet for the get_accelerator_type call in the Tpu service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tpu::V1::Tpu::Client#get_accelerator_type.", + "file": "tpu/get_accelerator_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_accelerator_type", + "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client#get_accelerator_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Tpu::V1::GetAcceleratorTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Tpu::V1::AcceleratorType", + "client": { + "short_name": "Tpu::Client", + "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client" + }, + "method": { + "short_name": "GetAcceleratorType", + "full_name": "google.cloud.tpu.v1.Tpu.GetAcceleratorType", + "service": { + "short_name": "Tpu", + "full_name": "google.cloud.tpu.v1.Tpu" + } + } + }, + "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-tpu-v1/snippets/tpu/create_node.rb b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/create_node.rb new file mode 100644 index 000000000000..d1c45f76a1a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/create_node.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 tpu_v1_generated_Tpu_CreateNode_sync] +require "google/cloud/tpu/v1" + +## +# Snippet for the create_node call in the Tpu service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tpu::V1::Tpu::Client#create_node. +# +def create_node + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tpu::V1::Tpu::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tpu::V1::CreateNodeRequest.new + + # Call the create_node method. + result = client.create_node request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END tpu_v1_generated_Tpu_CreateNode_sync] diff --git a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/delete_node.rb b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/delete_node.rb new file mode 100644 index 000000000000..461da43fb962 --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/delete_node.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 tpu_v1_generated_Tpu_DeleteNode_sync] +require "google/cloud/tpu/v1" + +## +# Snippet for the delete_node call in the Tpu service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tpu::V1::Tpu::Client#delete_node. +# +def delete_node + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tpu::V1::Tpu::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tpu::V1::DeleteNodeRequest.new + + # Call the delete_node method. + result = client.delete_node request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END tpu_v1_generated_Tpu_DeleteNode_sync] diff --git a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/get_accelerator_type.rb b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/get_accelerator_type.rb new file mode 100644 index 000000000000..01933680099e --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/get_accelerator_type.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START tpu_v1_generated_Tpu_GetAcceleratorType_sync] +require "google/cloud/tpu/v1" + +## +# Snippet for the get_accelerator_type call in the Tpu service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tpu::V1::Tpu::Client#get_accelerator_type. +# +def get_accelerator_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tpu::V1::Tpu::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tpu::V1::GetAcceleratorTypeRequest.new + + # Call the get_accelerator_type method. + result = client.get_accelerator_type request + + # The returned object is of type Google::Cloud::Tpu::V1::AcceleratorType. + p result +end +# [END tpu_v1_generated_Tpu_GetAcceleratorType_sync] diff --git a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/get_node.rb b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/get_node.rb new file mode 100644 index 000000000000..8f5fd80cf9f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/get_node.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 tpu_v1_generated_Tpu_GetNode_sync] +require "google/cloud/tpu/v1" + +## +# Snippet for the get_node call in the Tpu service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tpu::V1::Tpu::Client#get_node. +# +def get_node + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tpu::V1::Tpu::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tpu::V1::GetNodeRequest.new + + # Call the get_node method. + result = client.get_node request + + # The returned object is of type Google::Cloud::Tpu::V1::Node. + p result +end +# [END tpu_v1_generated_Tpu_GetNode_sync] diff --git a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/get_tensor_flow_version.rb b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/get_tensor_flow_version.rb new file mode 100644 index 000000000000..f8602be5c5da --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/get_tensor_flow_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 tpu_v1_generated_Tpu_GetTensorFlowVersion_sync] +require "google/cloud/tpu/v1" + +## +# Snippet for the get_tensor_flow_version call in the Tpu service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tpu::V1::Tpu::Client#get_tensor_flow_version. +# +def get_tensor_flow_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tpu::V1::Tpu::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tpu::V1::GetTensorFlowVersionRequest.new + + # Call the get_tensor_flow_version method. + result = client.get_tensor_flow_version request + + # The returned object is of type Google::Cloud::Tpu::V1::TensorFlowVersion. + p result +end +# [END tpu_v1_generated_Tpu_GetTensorFlowVersion_sync] diff --git a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/list_accelerator_types.rb b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/list_accelerator_types.rb new file mode 100644 index 000000000000..98fd7b460c0e --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/list_accelerator_types.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START tpu_v1_generated_Tpu_ListAcceleratorTypes_sync] +require "google/cloud/tpu/v1" + +## +# Snippet for the list_accelerator_types call in the Tpu service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tpu::V1::Tpu::Client#list_accelerator_types. +# +def list_accelerator_types + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tpu::V1::Tpu::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tpu::V1::ListAcceleratorTypesRequest.new + + # Call the list_accelerator_types method. + result = client.list_accelerator_types request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Tpu::V1::AcceleratorType. + p item + end +end +# [END tpu_v1_generated_Tpu_ListAcceleratorTypes_sync] diff --git a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/list_nodes.rb b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/list_nodes.rb new file mode 100644 index 000000000000..12cc06e1969a --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/list_nodes.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 tpu_v1_generated_Tpu_ListNodes_sync] +require "google/cloud/tpu/v1" + +## +# Snippet for the list_nodes call in the Tpu service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tpu::V1::Tpu::Client#list_nodes. +# +def list_nodes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tpu::V1::Tpu::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tpu::V1::ListNodesRequest.new + + # Call the list_nodes method. + result = client.list_nodes request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Tpu::V1::Node. + p item + end +end +# [END tpu_v1_generated_Tpu_ListNodes_sync] diff --git a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/list_tensor_flow_versions.rb b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/list_tensor_flow_versions.rb new file mode 100644 index 000000000000..ca3d984b9276 --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/list_tensor_flow_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 tpu_v1_generated_Tpu_ListTensorFlowVersions_sync] +require "google/cloud/tpu/v1" + +## +# Snippet for the list_tensor_flow_versions call in the Tpu service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tpu::V1::Tpu::Client#list_tensor_flow_versions. +# +def list_tensor_flow_versions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tpu::V1::Tpu::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tpu::V1::ListTensorFlowVersionsRequest.new + + # Call the list_tensor_flow_versions method. + result = client.list_tensor_flow_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::Tpu::V1::TensorFlowVersion. + p item + end +end +# [END tpu_v1_generated_Tpu_ListTensorFlowVersions_sync] diff --git a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/reimage_node.rb b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/reimage_node.rb new file mode 100644 index 000000000000..8af8741cff8f --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/reimage_node.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 tpu_v1_generated_Tpu_ReimageNode_sync] +require "google/cloud/tpu/v1" + +## +# Snippet for the reimage_node call in the Tpu service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tpu::V1::Tpu::Client#reimage_node. +# +def reimage_node + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tpu::V1::Tpu::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tpu::V1::ReimageNodeRequest.new + + # Call the reimage_node method. + result = client.reimage_node request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END tpu_v1_generated_Tpu_ReimageNode_sync] diff --git a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/start_node.rb b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/start_node.rb new file mode 100644 index 000000000000..f4bcab475e2c --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/start_node.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 tpu_v1_generated_Tpu_StartNode_sync] +require "google/cloud/tpu/v1" + +## +# Snippet for the start_node call in the Tpu service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tpu::V1::Tpu::Client#start_node. +# +def start_node + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tpu::V1::Tpu::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tpu::V1::StartNodeRequest.new + + # Call the start_node method. + result = client.start_node request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END tpu_v1_generated_Tpu_StartNode_sync] diff --git a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/stop_node.rb b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/stop_node.rb new file mode 100644 index 000000000000..8d4b1be90049 --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/stop_node.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 tpu_v1_generated_Tpu_StopNode_sync] +require "google/cloud/tpu/v1" + +## +# Snippet for the stop_node call in the Tpu service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Tpu::V1::Tpu::Client#stop_node. +# +def stop_node + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Tpu::V1::Tpu::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Tpu::V1::StopNodeRequest.new + + # Call the stop_node method. + result = client.stop_node request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END tpu_v1_generated_Tpu_StopNode_sync] diff --git a/owl-bot-staging/google-cloud-tpu-v1/test/google/cloud/tpu/v1/tpu_operations_test.rb b/owl-bot-staging/google-cloud-tpu-v1/test/google/cloud/tpu/v1/tpu_operations_test.rb new file mode 100644 index 000000000000..ad025ce2f9bc --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/test/google/cloud/tpu/v1/tpu_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/tpu/v1/cloud_tpu_pb" +require "google/cloud/tpu/v1/cloud_tpu_services_pb" +require "google/cloud/tpu/v1/tpu" + +class ::Google::Cloud::Tpu::V1::Tpu::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::Tpu::V1::Tpu::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::Tpu::V1::Tpu::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::Tpu::V1::Tpu::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::Tpu::V1::Tpu::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::Tpu::V1::Tpu::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::Tpu::V1::Tpu::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::Tpu::V1::Tpu::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-tpu-v1/test/google/cloud/tpu/v1/tpu_paths_test.rb b/owl-bot-staging/google-cloud-tpu-v1/test/google/cloud/tpu/v1/tpu_paths_test.rb new file mode 100644 index 000000000000..4ceac4e2e690 --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/test/google/cloud/tpu/v1/tpu_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/tpu/v1/tpu" + +class ::Google::Cloud::Tpu::V1::Tpu::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_accelerator_type_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.accelerator_type_path project: "value0", location: "value1", accelerator_type: "value2" + assert_equal "projects/value0/locations/value1/acceleratorTypes/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::Tpu::V1::Tpu::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_node_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.node_path project: "value0", location: "value1", node: "value2" + assert_equal "projects/value0/locations/value1/nodes/value2", path + end + end + + def test_tensor_flow_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::Tpu::V1::Tpu::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.tensor_flow_version_path project: "value0", location: "value1", tensor_flow_version: "value2" + assert_equal "projects/value0/locations/value1/tensorFlowVersions/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-tpu-v1/test/google/cloud/tpu/v1/tpu_test.rb b/owl-bot-staging/google-cloud-tpu-v1/test/google/cloud/tpu/v1/tpu_test.rb new file mode 100644 index 000000000000..96dc840e4d05 --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/test/google/cloud/tpu/v1/tpu_test.rb @@ -0,0 +1,822 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/tpu/v1/cloud_tpu_pb" +require "google/cloud/tpu/v1/tpu" + +class ::Google::Cloud::Tpu::V1::Tpu::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_nodes + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tpu::V1::ListNodesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_nodes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_nodes, name + assert_kind_of ::Google::Cloud::Tpu::V1::ListNodesRequest, 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_nodes_client_stub do + # Create client + client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_nodes({ 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_nodes 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_nodes ::Google::Cloud::Tpu::V1::ListNodesRequest.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_nodes({ 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_nodes(::Google::Cloud::Tpu::V1::ListNodesRequest.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_nodes_client_stub.call_rpc_count + end + end + + def test_get_node + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tpu::V1::Node.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_node_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_node, name + assert_kind_of ::Google::Cloud::Tpu::V1::GetNodeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_node_client_stub do + # Create client + client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_node({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_node name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_node ::Google::Cloud::Tpu::V1::GetNodeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_node({ 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_node(::Google::Cloud::Tpu::V1::GetNodeRequest.new(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_node_client_stub.call_rpc_count + end + end + + def test_create_node + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + node_id = "hello world" + node = {} + + create_node_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_node, name + assert_kind_of ::Google::Cloud::Tpu::V1::CreateNodeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["node_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Tpu::V1::Node), request["node"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_node_client_stub do + # Create client + client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_node({ parent: parent, node_id: node_id, node: node }) do |response, 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_node parent: parent, node_id: node_id, node: node do |response, 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_node ::Google::Cloud::Tpu::V1::CreateNodeRequest.new(parent: parent, node_id: node_id, node: node) do |response, operation| + assert_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_node({ parent: parent, node_id: node_id, node: node }, grpc_options) do |response, operation| + assert_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_node(::Google::Cloud::Tpu::V1::CreateNodeRequest.new(parent: parent, node_id: node_id, node: node), grpc_options) do |response, operation| + assert_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_node_client_stub.call_rpc_count + end + end + + def test_delete_node + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_node_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_node, name + assert_kind_of ::Google::Cloud::Tpu::V1::DeleteNodeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_node_client_stub do + # Create client + client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_node({ name: 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_node name: 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_node ::Google::Cloud::Tpu::V1::DeleteNodeRequest.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_node({ 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_node(::Google::Cloud::Tpu::V1::DeleteNodeRequest.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_node_client_stub.call_rpc_count + end + end + + def test_reimage_node + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + tensorflow_version = "hello world" + + reimage_node_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :reimage_node, name + assert_kind_of ::Google::Cloud::Tpu::V1::ReimageNodeRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["tensorflow_version"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, reimage_node_client_stub do + # Create client + client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.reimage_node({ name: name, tensorflow_version: tensorflow_version }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.reimage_node name: name, tensorflow_version: tensorflow_version do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.reimage_node ::Google::Cloud::Tpu::V1::ReimageNodeRequest.new(name: name, tensorflow_version: tensorflow_version) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.reimage_node({ name: name, tensorflow_version: tensorflow_version }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.reimage_node(::Google::Cloud::Tpu::V1::ReimageNodeRequest.new(name: name, tensorflow_version: tensorflow_version), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, reimage_node_client_stub.call_rpc_count + end + end + + def test_stop_node + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + stop_node_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :stop_node, name + assert_kind_of ::Google::Cloud::Tpu::V1::StopNodeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, stop_node_client_stub do + # Create client + client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.stop_node({ name: 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.stop_node name: 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.stop_node ::Google::Cloud::Tpu::V1::StopNodeRequest.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.stop_node({ 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.stop_node(::Google::Cloud::Tpu::V1::StopNodeRequest.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, stop_node_client_stub.call_rpc_count + end + end + + def test_start_node + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + start_node_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :start_node, name + assert_kind_of ::Google::Cloud::Tpu::V1::StartNodeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, start_node_client_stub do + # Create client + client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.start_node({ name: 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.start_node name: 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.start_node ::Google::Cloud::Tpu::V1::StartNodeRequest.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.start_node({ 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.start_node(::Google::Cloud::Tpu::V1::StartNodeRequest.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, start_node_client_stub.call_rpc_count + end + end + + def test_list_tensor_flow_versions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tpu::V1::ListTensorFlowVersionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_tensor_flow_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_tensor_flow_versions, name + assert_kind_of ::Google::Cloud::Tpu::V1::ListTensorFlowVersionsRequest, 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_tensor_flow_versions_client_stub do + # Create client + client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_tensor_flow_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_tensor_flow_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_tensor_flow_versions ::Google::Cloud::Tpu::V1::ListTensorFlowVersionsRequest.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_tensor_flow_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_tensor_flow_versions(::Google::Cloud::Tpu::V1::ListTensorFlowVersionsRequest.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_tensor_flow_versions_client_stub.call_rpc_count + end + end + + def test_get_tensor_flow_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tpu::V1::TensorFlowVersion.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_tensor_flow_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_tensor_flow_version, name + assert_kind_of ::Google::Cloud::Tpu::V1::GetTensorFlowVersionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_tensor_flow_version_client_stub do + # Create client + client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_tensor_flow_version({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_tensor_flow_version name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_tensor_flow_version ::Google::Cloud::Tpu::V1::GetTensorFlowVersionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_tensor_flow_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_tensor_flow_version(::Google::Cloud::Tpu::V1::GetTensorFlowVersionRequest.new(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_tensor_flow_version_client_stub.call_rpc_count + end + end + + def test_list_accelerator_types + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tpu::V1::ListAcceleratorTypesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_accelerator_types_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_accelerator_types, name + assert_kind_of ::Google::Cloud::Tpu::V1::ListAcceleratorTypesRequest, 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_accelerator_types_client_stub do + # Create client + client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_accelerator_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_accelerator_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_accelerator_types ::Google::Cloud::Tpu::V1::ListAcceleratorTypesRequest.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_accelerator_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_accelerator_types(::Google::Cloud::Tpu::V1::ListAcceleratorTypesRequest.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_accelerator_types_client_stub.call_rpc_count + end + end + + def test_get_accelerator_type + # Create GRPC objects. + grpc_response = ::Google::Cloud::Tpu::V1::AcceleratorType.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_accelerator_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_accelerator_type, name + assert_kind_of ::Google::Cloud::Tpu::V1::GetAcceleratorTypeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_accelerator_type_client_stub do + # Create client + client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_accelerator_type({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_accelerator_type name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_accelerator_type ::Google::Cloud::Tpu::V1::GetAcceleratorTypeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_accelerator_type({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_accelerator_type(::Google::Cloud::Tpu::V1::GetAcceleratorTypeRequest.new(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_accelerator_type_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::Tpu::V1::Tpu::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::Tpu::V1::Tpu::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::Tpu::V1::Tpu::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Tpu::V1::Tpu::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::Tpu::V1::Tpu::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Tpu::V1::Tpu::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-tpu-v1/test/helper.rb b/owl-bot-staging/google-cloud-tpu-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-tpu-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-trace-v1/.gitignore b/owl-bot-staging/google-cloud-trace-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-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-trace-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-trace-v1/.repo-metadata.json new file mode 100644 index 000000000000..d328c585f392 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "cloudtrace.googleapis.com", + "api_shortname": "cloudtrace", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-trace-v1/latest", + "distribution_name": "google-cloud-trace-v1", + "is_cloud": true, + "language": "ruby", + "name": "cloudtrace", + "name_pretty": "Cloud Trace V1 API", + "product_documentation": "https://cloud.google.com/trace", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The Cloud Trace API lets you send and retrieve latency data to and from Cloud Trace. This API provides low-level interfaces for interacting directly with the feature. For some languages, you can use OpenTelemetry, a set of open source tracing and stats instrumentation libraries that work with multiple backends. Note that google-cloud-trace-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-trace instead. See the readme for more details.", + "ruby-cloud-env-prefix": "TRACE", + "ruby-cloud-product-url": "https://cloud.google.com/trace", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-trace-v1/.rubocop.yml b/owl-bot-staging/google-cloud-trace-v1/.rubocop.yml new file mode 100644 index 000000000000..497c946242fd --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-trace-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-trace-v1.rb" diff --git a/owl-bot-staging/google-cloud-trace-v1/.toys.rb b/owl-bot-staging/google-cloud-trace-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-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-trace-v1/.yardopts b/owl-bot-staging/google-cloud-trace-v1/.yardopts new file mode 100644 index 000000000000..a9ea6aa99950 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Trace 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-trace-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-trace-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..ce2edb9aa12f --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-trace-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-trace-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/trace/v1" + +client = ::Google::Cloud::Trace::V1::TraceService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/trace/v1" + +::Google::Cloud::Trace::V1::TraceService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Trace::V1::TraceService::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-trace-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/trace/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Trace::V1::TraceService::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-trace-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-trace-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-trace-v1/Gemfile b/owl-bot-staging/google-cloud-trace-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-trace-v1/LICENSE.md b/owl-bot-staging/google-cloud-trace-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-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-trace-v1/README.md b/owl-bot-staging/google-cloud-trace-v1/README.md new file mode 100644 index 000000000000..488c98aabfe3 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Trace V1 API + +Sends application trace data to Stackdriver Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Trace API directly. If you are looking to instrument your application for Stackdriver Trace, we recommend using OpenTelemetry. + +The Cloud Trace API lets you send and retrieve latency data to and from Cloud Trace. This API provides low-level interfaces for interacting directly with the feature. For some languages, you can use OpenTelemetry, a set of open source tracing and stats instrumentation libraries that work with multiple backends. + +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 Trace V1 API. Most users should consider using +the main client gem, +[google-cloud-trace](https://rubygems.org/gems/google-cloud-trace). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-trace-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/cloudtrace.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/trace/v1" + +client = ::Google::Cloud::Trace::V1::TraceService::Client.new +request = ::Google::Cloud::Trace::V1::ListTracesRequest.new # (request fields as keyword arguments...) +response = client.list_traces request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-trace-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/trace) +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/trace/v1" +require "logger" + +client = ::Google::Cloud::Trace::V1::TraceService::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-trace`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-trace-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-trace`. +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-trace-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-trace-v1/Rakefile b/owl-bot-staging/google-cloud-trace-v1/Rakefile new file mode 100644 index 000000000000..663b8d0b3857 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-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-trace-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["TRACE_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["TRACE_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["TRACE_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 TRACE_TEST_PROJECT=test123 TRACE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/trace/v1/trace_service/credentials" + ::Google::Cloud::Trace::V1::TraceService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["TRACE_PROJECT"] = project + ENV["TRACE_TEST_PROJECT"] = project + ENV["TRACE_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-trace-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-trace-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-trace-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-trace-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-trace-v1" + header "google-cloud-trace-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-trace-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-trace-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-trace-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-trace-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-trace-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-trace-v1/gapic_metadata.json new file mode 100644 index 000000000000..c869538c2a6c --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-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.devtools.cloudtrace.v1", + "libraryPackage": "::Google::Cloud::Trace::V1", + "services": { + "TraceService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Trace::V1::TraceService::Client", + "rpcs": { + "ListTraces": { + "methods": [ + "list_traces" + ] + }, + "GetTrace": { + "methods": [ + "get_trace" + ] + }, + "PatchTraces": { + "methods": [ + "patch_traces" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-trace-v1/google-cloud-trace-v1.gemspec b/owl-bot-staging/google-cloud-trace-v1/google-cloud-trace-v1.gemspec new file mode 100644 index 000000000000..664737ad67c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/google-cloud-trace-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/trace/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-trace-v1" + gem.version = Google::Cloud::Trace::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The Cloud Trace API lets you send and retrieve latency data to and from Cloud Trace. This API provides low-level interfaces for interacting directly with the feature. For some languages, you can use OpenTelemetry, a set of open source tracing and stats instrumentation libraries that work with multiple backends. Note that google-cloud-trace-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-trace instead. See the readme for more details." + gem.summary = "Sends application trace data to Stackdriver Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Trace API directly. If you are looking to instrument your application for Stackdriver Trace, we recommend using OpenTelemetry." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-trace-v1/lib/google-cloud-trace-v1.rb b/owl-bot-staging/google-cloud-trace-v1/lib/google-cloud-trace-v1.rb new file mode 100644 index 000000000000..d0d18e420960 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/lib/google-cloud-trace-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/trace/v1" diff --git a/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1.rb b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1.rb new file mode 100644 index 000000000000..bdd9cdacfccf --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/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/trace/v1/trace_service" +require "google/cloud/trace/v1/version" + +module Google + module Cloud + module Trace + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/trace/v1" + # client = ::Google::Cloud::Trace::V1::TraceService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/trace/v1" + # client = ::Google::Cloud::Trace::V1::TraceService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/trace/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/rest.rb b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/rest.rb new file mode 100644 index 000000000000..9e774bceaca2 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/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/trace/v1/trace_service/rest" +require "google/cloud/trace/v1/version" + +module Google + module Cloud + module Trace + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/trace/v1/rest" + # client = ::Google::Cloud::Trace::V1::TraceService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service.rb b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service.rb new file mode 100644 index 000000000000..4f7face77bb1 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/trace/v1/version" + +require "google/cloud/trace/v1/trace_service/credentials" +require "google/cloud/trace/v1/trace_service/client" +require "google/cloud/trace/v1/trace_service/rest" + +module Google + module Cloud + module Trace + module V1 + ## + # This file describes an API for collecting and viewing traces and spans + # within a trace. A Trace is a collection of spans corresponding to a single + # operation or set of operations for an application. A span is an individual + # timed event which forms a node of the trace tree. Spans for a single trace + # may span multiple services. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/trace/v1/trace_service" + # client = ::Google::Cloud::Trace::V1::TraceService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/trace/v1/trace_service/rest" + # client = ::Google::Cloud::Trace::V1::TraceService::Rest::Client.new + # + module TraceService + end + end + end + end +end + +helper_path = ::File.join __dir__, "trace_service", "helpers.rb" +require "google/cloud/trace/v1/trace_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/client.rb b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/client.rb new file mode 100644 index 000000000000..14e8613b2622 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/client.rb @@ -0,0 +1,753 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/devtools/cloudtrace/v1/trace_pb" + +module Google + module Cloud + module Trace + module V1 + module TraceService + ## + # Client for the TraceService service. + # + # This file describes an API for collecting and viewing traces and spans + # within a trace. A Trace is a collection of spans corresponding to a single + # operation or set of operations for an application. A span is an individual + # timed event which forms a node of the trace tree. Spans for a single trace + # may span multiple services. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudtrace.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :trace_service_stub + + ## + # Configure the TraceService Client class. + # + # See {::Google::Cloud::Trace::V1::TraceService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TraceService clients + # ::Google::Cloud::Trace::V1::TraceService::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", "Trace", "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_traces.timeout = 45.0 + default_config.rpcs.list_traces.retry_policy = { + initial_delay: 0.1, max_delay: 1.0, multiplier: 1.2, retry_codes: [14, 4] + } + + default_config.rpcs.get_trace.timeout = 45.0 + default_config.rpcs.get_trace.retry_policy = { + initial_delay: 0.1, max_delay: 1.0, multiplier: 1.2, retry_codes: [14, 4] + } + + default_config.rpcs.patch_traces.timeout = 45.0 + default_config.rpcs.patch_traces.retry_policy = { + initial_delay: 0.1, max_delay: 1.0, multiplier: 1.2, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TraceService 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::Trace::V1::TraceService::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 + @trace_service_stub.universe_domain + end + + ## + # Create a new TraceService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Trace::V1::TraceService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Trace::V1::TraceService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TraceService 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/devtools/cloudtrace/v1/trace_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 + + @trace_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Trace::V1::TraceService::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 + ) + + @trace_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 + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @trace_service_stub.logger + end + + # Service calls + + ## + # Returns of a list of traces that match the specified filter conditions. + # + # @overload list_traces(request, options = nil) + # Pass arguments to `list_traces` via a request object, either of type + # {::Google::Cloud::Trace::V1::ListTracesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Trace::V1::ListTracesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_traces(project_id: nil, view: nil, page_size: nil, page_token: nil, start_time: nil, end_time: nil, filter: nil, order_by: nil) + # Pass arguments to `list_traces` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param project_id [::String] + # Required. ID of the Cloud project where the trace data is stored. + # @param view [::Google::Cloud::Trace::V1::ListTracesRequest::ViewType] + # Optional. Type of data returned for traces in the list. Default is + # `MINIMAL`. + # @param page_size [::Integer] + # Optional. Maximum number of traces to return. If not specified or <= 0, the + # implementation selects a reasonable value. The implementation may + # return fewer traces than the requested page size. + # @param page_token [::String] + # Token identifying the page of results to return. If provided, use the + # value of the `next_page_token` field from a previous request. + # @param start_time [::Google::Protobuf::Timestamp, ::Hash] + # Start of the time interval (inclusive) during which the trace data was + # collected from the application. + # @param end_time [::Google::Protobuf::Timestamp, ::Hash] + # End of the time interval (inclusive) during which the trace data was + # collected from the application. + # @param filter [::String] + # Optional. A filter against labels for the request. + # + # By default, searches use prefix matching. To specify exact match, prepend + # a plus symbol (`+`) to the search term. + # Multiple terms are ANDed. Syntax: + # + # * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root + # span starts with `NAME_PREFIX`. + # * `+root:NAME` or `+NAME`: Return traces where any root span's name is + # exactly `NAME`. + # * `span:NAME_PREFIX`: Return traces where any span starts with + # `NAME_PREFIX`. + # * `+span:NAME`: Return traces where any span's name is exactly + # `NAME`. + # * `latency:DURATION`: Return traces whose overall latency is + # greater or equal to than `DURATION`. Accepted units are nanoseconds + # (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For + # example, `latency:24ms` returns traces whose overall latency + # is greater than or equal to 24 milliseconds. + # * `label:LABEL_KEY`: Return all traces containing the specified + # label key (exact match, case-sensitive) regardless of the key:value + # pair's value (including empty values). + # * `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified + # label key (exact match, case-sensitive) whose value starts with + # `VALUE_PREFIX`. Both a key and a value must be specified. + # * `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair + # exactly matching the specified text. Both a key and a value must be + # specified. + # * `method:VALUE`: Equivalent to `/http/method:VALUE`. + # * `url:VALUE`: Equivalent to `/http/url:VALUE`. + # @param order_by [::String] + # Optional. Field used to sort the returned traces. + # Can be one of the following: + # + # * `trace_id` + # * `name` (`name` field of root span in the trace) + # * `duration` (difference between `end_time` and `start_time` fields of + # the root span) + # * `start` (`start_time` field of the root span) + # + # Descending order can be specified by appending `desc` to the sort field + # (for example, `name desc`). + # + # Only one sort field is permitted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Trace::V1::Trace>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Trace::V1::Trace>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/trace/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Trace::V1::TraceService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Trace::V1::ListTracesRequest.new + # + # # Call the list_traces method. + # result = client.list_traces request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Trace::V1::Trace. + # p item + # end + # + def list_traces request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Trace::V1::ListTracesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_traces.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Trace::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.project_id + header_params["project_id"] = request.project_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_traces.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_traces.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trace_service_stub.call_rpc :list_traces, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @trace_service_stub, :list_traces, 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 single trace by its ID. + # + # @overload get_trace(request, options = nil) + # Pass arguments to `get_trace` via a request object, either of type + # {::Google::Cloud::Trace::V1::GetTraceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Trace::V1::GetTraceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_trace(project_id: nil, trace_id: nil) + # Pass arguments to `get_trace` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param project_id [::String] + # Required. ID of the Cloud project where the trace data is stored. + # @param trace_id [::String] + # Required. ID of the trace to return. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Trace::V1::Trace] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Trace::V1::Trace] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/trace/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Trace::V1::TraceService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Trace::V1::GetTraceRequest.new + # + # # Call the get_trace method. + # result = client.get_trace request + # + # # The returned object is of type Google::Cloud::Trace::V1::Trace. + # p result + # + def get_trace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Trace::V1::GetTraceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_trace.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Trace::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.project_id + header_params["project_id"] = request.project_id + end + if request.trace_id + header_params["trace_id"] = request.trace_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.get_trace.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_trace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trace_service_stub.call_rpc :get_trace, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sends new traces to Stackdriver Trace or updates existing traces. If the ID + # of a trace that you send matches that of an existing trace, any fields + # in the existing trace and its spans are overwritten by the provided values, + # and any new fields provided are merged with the existing trace data. If the + # ID does not match, a new trace is created. + # + # @overload patch_traces(request, options = nil) + # Pass arguments to `patch_traces` via a request object, either of type + # {::Google::Cloud::Trace::V1::PatchTracesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Trace::V1::PatchTracesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload patch_traces(project_id: nil, traces: nil) + # Pass arguments to `patch_traces` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param project_id [::String] + # Required. ID of the Cloud project where the trace data is stored. + # @param traces [::Google::Cloud::Trace::V1::Traces, ::Hash] + # Required. The body of the message. + # + # @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/trace/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Trace::V1::TraceService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Trace::V1::PatchTracesRequest.new + # + # # Call the patch_traces method. + # result = client.patch_traces request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def patch_traces request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Trace::V1::PatchTracesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.patch_traces.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Trace::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.project_id + header_params["project_id"] = request.project_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.patch_traces.timeout, + metadata: metadata, + retry_policy: @config.rpcs.patch_traces.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trace_service_stub.call_rpc :patch_traces, request, 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 TraceService API. + # + # This class represents the configuration for TraceService, + # 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::Trace::V1::TraceService::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_traces to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Trace::V1::TraceService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_traces.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Trace::V1::TraceService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_traces.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::Trace::V1::TraceService::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 = "cloudtrace.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 TraceService 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_traces` + # @return [::Gapic::Config::Method] + # + attr_reader :list_traces + ## + # RPC-specific configuration for `get_trace` + # @return [::Gapic::Config::Method] + # + attr_reader :get_trace + ## + # RPC-specific configuration for `patch_traces` + # @return [::Gapic::Config::Method] + # + attr_reader :patch_traces + + # @private + def initialize parent_rpcs = nil + list_traces_config = parent_rpcs.list_traces if parent_rpcs.respond_to? :list_traces + @list_traces = ::Gapic::Config::Method.new list_traces_config + get_trace_config = parent_rpcs.get_trace if parent_rpcs.respond_to? :get_trace + @get_trace = ::Gapic::Config::Method.new get_trace_config + patch_traces_config = parent_rpcs.patch_traces if parent_rpcs.respond_to? :patch_traces + @patch_traces = ::Gapic::Config::Method.new patch_traces_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/credentials.rb b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/credentials.rb new file mode 100644 index 000000000000..b71df52a528b --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/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 Trace + module V1 + module TraceService + # Credentials for the TraceService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/trace.append", + "https://www.googleapis.com/auth/trace.readonly" + ] + self.env_vars = [ + "TRACE_CREDENTIALS", + "TRACE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "TRACE_CREDENTIALS_JSON", + "TRACE_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-trace-v1/lib/google/cloud/trace/v1/trace_service/rest.rb b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/rest.rb new file mode 100644 index 000000000000..5de97dd38be4 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/trace/v1/version" + +require "google/cloud/trace/v1/trace_service/credentials" +require "google/cloud/trace/v1/trace_service/rest/client" + +module Google + module Cloud + module Trace + module V1 + ## + # This file describes an API for collecting and viewing traces and spans + # within a trace. A Trace is a collection of spans corresponding to a single + # operation or set of operations for an application. A span is an individual + # timed event which forms a node of the trace tree. Spans for a single trace + # may span multiple services. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/trace/v1/trace_service/rest" + # client = ::Google::Cloud::Trace::V1::TraceService::Rest::Client.new + # + module TraceService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/trace/v1/trace_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/rest/client.rb b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/rest/client.rb new file mode 100644 index 000000000000..b3a5a3771116 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/rest/client.rb @@ -0,0 +1,686 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/devtools/cloudtrace/v1/trace_pb" +require "google/cloud/trace/v1/trace_service/rest/service_stub" + +module Google + module Cloud + module Trace + module V1 + module TraceService + module Rest + ## + # REST client for the TraceService service. + # + # This file describes an API for collecting and viewing traces and spans + # within a trace. A Trace is a collection of spans corresponding to a single + # operation or set of operations for an application. A span is an individual + # timed event which forms a node of the trace tree. Spans for a single trace + # may span multiple services. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudtrace.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :trace_service_stub + + ## + # Configure the TraceService Client class. + # + # See {::Google::Cloud::Trace::V1::TraceService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TraceService clients + # ::Google::Cloud::Trace::V1::TraceService::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", "Trace", "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_traces.timeout = 45.0 + default_config.rpcs.list_traces.retry_policy = { + initial_delay: 0.1, max_delay: 1.0, multiplier: 1.2, retry_codes: [14, 4] + } + + default_config.rpcs.get_trace.timeout = 45.0 + default_config.rpcs.get_trace.retry_policy = { + initial_delay: 0.1, max_delay: 1.0, multiplier: 1.2, retry_codes: [14, 4] + } + + default_config.rpcs.patch_traces.timeout = 45.0 + default_config.rpcs.patch_traces.retry_policy = { + initial_delay: 0.1, max_delay: 1.0, multiplier: 1.2, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TraceService 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::Trace::V1::TraceService::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 + @trace_service_stub.universe_domain + end + + ## + # Create a new TraceService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Trace::V1::TraceService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Trace::V1::TraceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TraceService 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 + + @trace_service_stub = ::Google::Cloud::Trace::V1::TraceService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @trace_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 + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @trace_service_stub.logger + end + + # Service calls + + ## + # Returns of a list of traces that match the specified filter conditions. + # + # @overload list_traces(request, options = nil) + # Pass arguments to `list_traces` via a request object, either of type + # {::Google::Cloud::Trace::V1::ListTracesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Trace::V1::ListTracesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_traces(project_id: nil, view: nil, page_size: nil, page_token: nil, start_time: nil, end_time: nil, filter: nil, order_by: nil) + # Pass arguments to `list_traces` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param project_id [::String] + # Required. ID of the Cloud project where the trace data is stored. + # @param view [::Google::Cloud::Trace::V1::ListTracesRequest::ViewType] + # Optional. Type of data returned for traces in the list. Default is + # `MINIMAL`. + # @param page_size [::Integer] + # Optional. Maximum number of traces to return. If not specified or <= 0, the + # implementation selects a reasonable value. The implementation may + # return fewer traces than the requested page size. + # @param page_token [::String] + # Token identifying the page of results to return. If provided, use the + # value of the `next_page_token` field from a previous request. + # @param start_time [::Google::Protobuf::Timestamp, ::Hash] + # Start of the time interval (inclusive) during which the trace data was + # collected from the application. + # @param end_time [::Google::Protobuf::Timestamp, ::Hash] + # End of the time interval (inclusive) during which the trace data was + # collected from the application. + # @param filter [::String] + # Optional. A filter against labels for the request. + # + # By default, searches use prefix matching. To specify exact match, prepend + # a plus symbol (`+`) to the search term. + # Multiple terms are ANDed. Syntax: + # + # * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root + # span starts with `NAME_PREFIX`. + # * `+root:NAME` or `+NAME`: Return traces where any root span's name is + # exactly `NAME`. + # * `span:NAME_PREFIX`: Return traces where any span starts with + # `NAME_PREFIX`. + # * `+span:NAME`: Return traces where any span's name is exactly + # `NAME`. + # * `latency:DURATION`: Return traces whose overall latency is + # greater or equal to than `DURATION`. Accepted units are nanoseconds + # (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For + # example, `latency:24ms` returns traces whose overall latency + # is greater than or equal to 24 milliseconds. + # * `label:LABEL_KEY`: Return all traces containing the specified + # label key (exact match, case-sensitive) regardless of the key:value + # pair's value (including empty values). + # * `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified + # label key (exact match, case-sensitive) whose value starts with + # `VALUE_PREFIX`. Both a key and a value must be specified. + # * `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair + # exactly matching the specified text. Both a key and a value must be + # specified. + # * `method:VALUE`: Equivalent to `/http/method:VALUE`. + # * `url:VALUE`: Equivalent to `/http/url:VALUE`. + # @param order_by [::String] + # Optional. Field used to sort the returned traces. + # Can be one of the following: + # + # * `trace_id` + # * `name` (`name` field of root span in the trace) + # * `duration` (difference between `end_time` and `start_time` fields of + # the root span) + # * `start` (`start_time` field of the root span) + # + # Descending order can be specified by appending `desc` to the sort field + # (for example, `name desc`). + # + # Only one sort field is permitted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Trace::V1::Trace>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Trace::V1::Trace>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/trace/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Trace::V1::TraceService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Trace::V1::ListTracesRequest.new + # + # # Call the list_traces method. + # result = client.list_traces request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Trace::V1::Trace. + # p item + # end + # + def list_traces request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Trace::V1::ListTracesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_traces.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Trace::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_traces.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_traces.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trace_service_stub.list_traces request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @trace_service_stub, :list_traces, "traces", 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 single trace by its ID. + # + # @overload get_trace(request, options = nil) + # Pass arguments to `get_trace` via a request object, either of type + # {::Google::Cloud::Trace::V1::GetTraceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Trace::V1::GetTraceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_trace(project_id: nil, trace_id: nil) + # Pass arguments to `get_trace` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param project_id [::String] + # Required. ID of the Cloud project where the trace data is stored. + # @param trace_id [::String] + # Required. ID of the trace to return. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Trace::V1::Trace] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Trace::V1::Trace] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/trace/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Trace::V1::TraceService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Trace::V1::GetTraceRequest.new + # + # # Call the get_trace method. + # result = client.get_trace request + # + # # The returned object is of type Google::Cloud::Trace::V1::Trace. + # p result + # + def get_trace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Trace::V1::GetTraceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_trace.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Trace::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_trace.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_trace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trace_service_stub.get_trace request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sends new traces to Stackdriver Trace or updates existing traces. If the ID + # of a trace that you send matches that of an existing trace, any fields + # in the existing trace and its spans are overwritten by the provided values, + # and any new fields provided are merged with the existing trace data. If the + # ID does not match, a new trace is created. + # + # @overload patch_traces(request, options = nil) + # Pass arguments to `patch_traces` via a request object, either of type + # {::Google::Cloud::Trace::V1::PatchTracesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Trace::V1::PatchTracesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload patch_traces(project_id: nil, traces: nil) + # Pass arguments to `patch_traces` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param project_id [::String] + # Required. ID of the Cloud project where the trace data is stored. + # @param traces [::Google::Cloud::Trace::V1::Traces, ::Hash] + # Required. The body of the message. + # @yield [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/trace/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Trace::V1::TraceService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Trace::V1::PatchTracesRequest.new + # + # # Call the patch_traces method. + # result = client.patch_traces request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def patch_traces request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Trace::V1::PatchTracesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.patch_traces.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Trace::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.patch_traces.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.patch_traces.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trace_service_stub.patch_traces request, 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 TraceService REST API. + # + # This class represents the configuration for TraceService 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::Trace::V1::TraceService::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_traces to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Trace::V1::TraceService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_traces.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Trace::V1::TraceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_traces.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 = "cloudtrace.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 TraceService 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_traces` + # @return [::Gapic::Config::Method] + # + attr_reader :list_traces + ## + # RPC-specific configuration for `get_trace` + # @return [::Gapic::Config::Method] + # + attr_reader :get_trace + ## + # RPC-specific configuration for `patch_traces` + # @return [::Gapic::Config::Method] + # + attr_reader :patch_traces + + # @private + def initialize parent_rpcs = nil + list_traces_config = parent_rpcs.list_traces if parent_rpcs.respond_to? :list_traces + @list_traces = ::Gapic::Config::Method.new list_traces_config + get_trace_config = parent_rpcs.get_trace if parent_rpcs.respond_to? :get_trace + @get_trace = ::Gapic::Config::Method.new get_trace_config + patch_traces_config = parent_rpcs.patch_traces if parent_rpcs.respond_to? :patch_traces + @patch_traces = ::Gapic::Config::Method.new patch_traces_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/rest/service_stub.rb new file mode 100644 index 000000000000..68870f715db3 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/rest/service_stub.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 "google/devtools/cloudtrace/v1/trace_pb" + +module Google + module Cloud + module Trace + module V1 + module TraceService + module Rest + ## + # REST service stub for the TraceService 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_traces REST call + # + # @param request_pb [::Google::Cloud::Trace::V1::ListTracesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Trace::V1::ListTracesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Trace::V1::ListTracesResponse] + # A result object deserialized from the server's reply + def list_traces request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_traces_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_traces", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Trace::V1::ListTracesResponse.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_trace REST call + # + # @param request_pb [::Google::Cloud::Trace::V1::GetTraceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Trace::V1::Trace] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Trace::V1::Trace] + # A result object deserialized from the server's reply + def get_trace request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_trace_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_trace", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Trace::V1::Trace.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the patch_traces REST call + # + # @param request_pb [::Google::Cloud::Trace::V1::PatchTracesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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 patch_traces request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_patch_traces_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "patch_traces", + 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_traces REST call + # + # @param request_pb [::Google::Cloud::Trace::V1::ListTracesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_traces_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/projects/{project_id}/traces", + matches: [ + ["project_id", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_trace REST call + # + # @param request_pb [::Google::Cloud::Trace::V1::GetTraceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_trace_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/projects/{project_id}/traces/{trace_id}", + matches: [ + ["project_id", %r{^[^/]+/?$}, false], + ["trace_id", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the patch_traces REST call + # + # @param request_pb [::Google::Cloud::Trace::V1::PatchTracesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_patch_traces_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/projects/{project_id}/traces", + body: "traces", + matches: [ + ["project_id", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/version.rb b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/version.rb new file mode 100644 index 000000000000..57e91ef8eec8 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/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 Trace + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-trace-v1/lib/google/devtools/cloudtrace/v1/trace_pb.rb b/owl-bot-staging/google-cloud-trace-v1/lib/google/devtools/cloudtrace/v1/trace_pb.rb new file mode 100644 index 000000000000..02c25e7b258a --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/lib/google/devtools/cloudtrace/v1/trace_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/cloudtrace/v1/trace.proto + +require 'google/protobuf' + +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/timestamp_pb' +require 'google/api/annotations_pb' + + +descriptor_data = "\n)google/devtools/cloudtrace/v1/trace.proto\x12\x1dgoogle.devtools.cloudtrace.v1\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto\"f\n\x05Trace\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x10\n\x08trace_id\x18\x02 \x01(\t\x12\x37\n\x05spans\x18\x03 \x03(\x0b\x32(.google.devtools.cloudtrace.v1.TraceSpan\">\n\x06Traces\x12\x34\n\x06traces\x18\x01 \x03(\x0b\x32$.google.devtools.cloudtrace.v1.Trace\"\xa2\x03\n\tTraceSpan\x12\x0f\n\x07span_id\x18\x01 \x01(\x06\x12?\n\x04kind\x18\x02 \x01(\x0e\x32\x31.google.devtools.cloudtrace.v1.TraceSpan.SpanKind\x12\x0c\n\x04name\x18\x03 \x01(\t\x12.\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1b\n\x0eparent_span_id\x18\x06 \x01(\x06\x42\x03\xe0\x41\x01\x12\x44\n\x06labels\x18\x07 \x03(\x0b\x32\x34.google.devtools.cloudtrace.v1.TraceSpan.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"E\n\x08SpanKind\x12\x19\n\x15SPAN_KIND_UNSPECIFIED\x10\x00\x12\x0e\n\nRPC_SERVER\x10\x01\x12\x0e\n\nRPC_CLIENT\x10\x02\"\x80\x03\n\x11ListTracesRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12L\n\x04view\x18\x02 \x01(\x0e\x32\x39.google.devtools.cloudtrace.v1.ListTracesRequest.ViewTypeB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x12\n\npage_token\x18\x04 \x01(\t\x12.\n\nstart_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x06\x66ilter\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x08 \x01(\tB\x03\xe0\x41\x01\"N\n\x08ViewType\x12\x19\n\x15VIEW_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07MINIMAL\x10\x01\x12\x0c\n\x08ROOTSPAN\x10\x02\x12\x0c\n\x08\x43OMPLETE\x10\x03\"c\n\x12ListTracesResponse\x12\x34\n\x06traces\x18\x01 \x03(\x0b\x32$.google.devtools.cloudtrace.v1.Trace\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"A\n\x0fGetTraceRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08trace_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"i\n\x12PatchTracesRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12:\n\x06traces\x18\x02 \x01(\x0b\x32%.google.devtools.cloudtrace.v1.TracesB\x03\xe0\x41\x02\x32\xb5\x05\n\x0cTraceService\x12\xa8\x01\n\nListTraces\x12\x30.google.devtools.cloudtrace.v1.ListTracesRequest\x1a\x31.google.devtools.cloudtrace.v1.ListTracesResponse\"5\xda\x41\nproject_id\x82\xd3\xe4\x93\x02\"\x12 /v1/projects/{project_id}/traces\x12\xab\x01\n\x08GetTrace\x12..google.devtools.cloudtrace.v1.GetTraceRequest\x1a$.google.devtools.cloudtrace.v1.Trace\"I\xda\x41\x13project_id,trace_id\x82\xd3\xe4\x93\x02-\x12+/v1/projects/{project_id}/traces/{trace_id}\x12\x9e\x01\n\x0bPatchTraces\x12\x31.google.devtools.cloudtrace.v1.PatchTracesRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x11project_id,traces\x82\xd3\xe4\x93\x02*2 /v1/projects/{project_id}/traces:\x06traces\x1a\xaa\x01\xca\x41\x19\x63loudtrace.googleapis.com\xd2\x41\x8a\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/trace.append,https://www.googleapis.com/auth/trace.readonlyB\xad\x01\n!com.google.devtools.cloudtrace.v1B\nTraceProtoP\x01Z/cloud.google.com/go/trace/apiv1/tracepb;tracepb\xaa\x02\x15Google.Cloud.Trace.V1\xca\x02\x15Google\\Cloud\\Trace\\V1\xea\x02\x18Google::Cloud::Trace::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Trace + module V1 + Trace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v1.Trace").msgclass + Traces = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v1.Traces").msgclass + TraceSpan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v1.TraceSpan").msgclass + TraceSpan::SpanKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v1.TraceSpan.SpanKind").enummodule + ListTracesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v1.ListTracesRequest").msgclass + ListTracesRequest::ViewType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v1.ListTracesRequest.ViewType").enummodule + ListTracesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v1.ListTracesResponse").msgclass + GetTraceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v1.GetTraceRequest").msgclass + PatchTracesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v1.PatchTracesRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-trace-v1/lib/google/devtools/cloudtrace/v1/trace_services_pb.rb b/owl-bot-staging/google-cloud-trace-v1/lib/google/devtools/cloudtrace/v1/trace_services_pb.rb new file mode 100644 index 000000000000..56320be47991 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/lib/google/devtools/cloudtrace/v1/trace_services_pb.rb @@ -0,0 +1,57 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/devtools/cloudtrace/v1/trace.proto for package 'Google.Cloud.Trace.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/devtools/cloudtrace/v1/trace_pb' + +module Google + module Cloud + module Trace + module V1 + module TraceService + # This file describes an API for collecting and viewing traces and spans + # within a trace. A Trace is a collection of spans corresponding to a single + # operation or set of operations for an application. A span is an individual + # timed event which forms a node of the trace tree. Spans for a single trace + # may span multiple services. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.devtools.cloudtrace.v1.TraceService' + + # Returns of a list of traces that match the specified filter conditions. + rpc :ListTraces, ::Google::Cloud::Trace::V1::ListTracesRequest, ::Google::Cloud::Trace::V1::ListTracesResponse + # Gets a single trace by its ID. + rpc :GetTrace, ::Google::Cloud::Trace::V1::GetTraceRequest, ::Google::Cloud::Trace::V1::Trace + # Sends new traces to Stackdriver Trace or updates existing traces. If the ID + # of a trace that you send matches that of an existing trace, any fields + # in the existing trace and its spans are overwritten by the provided values, + # and any new fields provided are merged with the existing trace data. If the + # ID does not match, a new trace is created. + rpc :PatchTraces, ::Google::Cloud::Trace::V1::PatchTracesRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-trace-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-trace-v1/proto_docs/README.md new file mode 100644 index 000000000000..8f04d0cc9e5b --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Trace 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-trace-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-trace-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # 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. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + # + # Example: + # + # 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 + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # 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 + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # 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 + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-trace-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-trace-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-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-trace-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-trace-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-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-trace-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-trace-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-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-trace-v1/proto_docs/google/devtools/cloudtrace/v1/trace.rb b/owl-bot-staging/google-cloud-trace-v1/proto_docs/google/devtools/cloudtrace/v1/trace.rb new file mode 100644 index 000000000000..f10fa9094e2d --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/proto_docs/google/devtools/cloudtrace/v1/trace.rb @@ -0,0 +1,287 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Trace + module V1 + # A trace describes how long it takes for an application to perform an + # operation. It consists of a set of spans, each of which represent a single + # timed event within the operation. + # @!attribute [rw] project_id + # @return [::String] + # Project ID of the Cloud project where the trace data is stored. + # @!attribute [rw] trace_id + # @return [::String] + # Globally unique identifier for the trace. This identifier is a 128-bit + # numeric value formatted as a 32-byte hex string. For example, + # `382d4f4c6b7bb2f4a972559d9085001d`. + # @!attribute [rw] spans + # @return [::Array<::Google::Cloud::Trace::V1::TraceSpan>] + # Collection of spans in the trace. + class Trace + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List of new or updated traces. + # @!attribute [rw] traces + # @return [::Array<::Google::Cloud::Trace::V1::Trace>] + # List of traces. + class Traces + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A span represents a single timed event within a trace. Spans can be nested + # and form a trace tree. Often, a trace contains a root span that describes the + # end-to-end latency of an operation and, optionally, one or more subspans for + # its suboperations. Spans do not need to be contiguous. There may be gaps + # between spans in a trace. + # @!attribute [rw] span_id + # @return [::Integer] + # Identifier for the span. Must be a 64-bit integer other than 0 and + # unique within a trace. For example, `2205310701640571284`. + # @!attribute [rw] kind + # @return [::Google::Cloud::Trace::V1::TraceSpan::SpanKind] + # Distinguishes between spans generated in a particular context. For example, + # two spans with the same name may be distinguished using `RPC_CLIENT` + # and `RPC_SERVER` to identify queueing latency associated with the span. + # @!attribute [rw] name + # @return [::String] + # Name of the span. Must be less than 128 bytes. The span name is sanitized + # and displayed in the Stackdriver Trace tool in the + # Google Cloud Platform Console. + # The name may be a method name or some other per-call site name. + # For the same executable and the same call point, a best practice is + # to use a consistent name, which makes it easier to correlate + # cross-trace spans. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Start time of the span in nanoseconds from the UNIX epoch. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # End time of the span in nanoseconds from the UNIX epoch. + # @!attribute [rw] parent_span_id + # @return [::Integer] + # Optional. ID of the parent span, if any. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Collection of labels associated with the span. Label keys must be less than + # 128 bytes. Label values must be less than 16 kilobytes (10MB for + # `/stacktrace` values). + # + # Some predefined label keys exist, or you may create your own. When creating + # your own, we recommend the following formats: + # + # * `/category/product/key` for agents of well-known products (e.g. + # `/db/mongodb/read_size`). + # * `short_host/path/key` for domain-specific keys (e.g. + # `foo.com/myproduct/bar`) + # + # Predefined labels include: + # + # * `/agent` + # * `/component` + # * `/error/message` + # * `/error/name` + # * `/http/client_city` + # * `/http/client_country` + # * `/http/client_protocol` + # * `/http/client_region` + # * `/http/host` + # * `/http/method` + # * `/http/path` + # * `/http/redirected_url` + # * `/http/request/size` + # * `/http/response/size` + # * `/http/route` + # * `/http/status_code` + # * `/http/url` + # * `/http/user_agent` + # * `/pid` + # * `/stacktrace` + # * `/tid` + class TraceSpan + 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 + + # Type of span. Can be used to specify additional relationships between spans + # in addition to a parent/child relationship. + module SpanKind + # Unspecified. + SPAN_KIND_UNSPECIFIED = 0 + + # Indicates that the span covers server-side handling of an RPC or other + # remote network request. + RPC_SERVER = 1 + + # Indicates that the span covers the client-side wrapper around an RPC or + # other remote request. + RPC_CLIENT = 2 + end + end + + # The request message for the `ListTraces` method. All fields are required + # unless specified. + # @!attribute [rw] project_id + # @return [::String] + # Required. ID of the Cloud project where the trace data is stored. + # @!attribute [rw] view + # @return [::Google::Cloud::Trace::V1::ListTracesRequest::ViewType] + # Optional. Type of data returned for traces in the list. Default is + # `MINIMAL`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of traces to return. If not specified or <= 0, the + # implementation selects a reasonable value. The implementation may + # return fewer traces than the requested page size. + # @!attribute [rw] page_token + # @return [::String] + # Token identifying the page of results to return. If provided, use the + # value of the `next_page_token` field from a previous request. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Start of the time interval (inclusive) during which the trace data was + # collected from the application. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # End of the time interval (inclusive) during which the trace data was + # collected from the application. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter against labels for the request. + # + # By default, searches use prefix matching. To specify exact match, prepend + # a plus symbol (`+`) to the search term. + # Multiple terms are ANDed. Syntax: + # + # * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root + # span starts with `NAME_PREFIX`. + # * `+root:NAME` or `+NAME`: Return traces where any root span's name is + # exactly `NAME`. + # * `span:NAME_PREFIX`: Return traces where any span starts with + # `NAME_PREFIX`. + # * `+span:NAME`: Return traces where any span's name is exactly + # `NAME`. + # * `latency:DURATION`: Return traces whose overall latency is + # greater or equal to than `DURATION`. Accepted units are nanoseconds + # (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For + # example, `latency:24ms` returns traces whose overall latency + # is greater than or equal to 24 milliseconds. + # * `label:LABEL_KEY`: Return all traces containing the specified + # label key (exact match, case-sensitive) regardless of the key:value + # pair's value (including empty values). + # * `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified + # label key (exact match, case-sensitive) whose value starts with + # `VALUE_PREFIX`. Both a key and a value must be specified. + # * `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair + # exactly matching the specified text. Both a key and a value must be + # specified. + # * `method:VALUE`: Equivalent to `/http/method:VALUE`. + # * `url:VALUE`: Equivalent to `/http/url:VALUE`. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field used to sort the returned traces. + # Can be one of the following: + # + # * `trace_id` + # * `name` (`name` field of root span in the trace) + # * `duration` (difference between `end_time` and `start_time` fields of + # the root span) + # * `start` (`start_time` field of the root span) + # + # Descending order can be specified by appending `desc` to the sort field + # (for example, `name desc`). + # + # Only one sort field is permitted. + class ListTracesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of data returned for traces in the list. + module ViewType + # Default is `MINIMAL` if unspecified. + VIEW_TYPE_UNSPECIFIED = 0 + + # Minimal view of the trace record that contains only the project + # and trace IDs. + MINIMAL = 1 + + # Root span view of the trace record that returns the root spans along + # with the minimal trace data. + ROOTSPAN = 2 + + # Complete view of the trace record that contains the actual trace data. + # This is equivalent to calling the REST `get` or RPC `GetTrace` method + # using the ID of each listed trace. + COMPLETE = 3 + end + end + + # The response message for the `ListTraces` method. + # @!attribute [rw] traces + # @return [::Array<::Google::Cloud::Trace::V1::Trace>] + # List of trace records as specified by the view parameter. + # @!attribute [rw] next_page_token + # @return [::String] + # If defined, indicates that there are more traces that match the request + # and that this value should be passed to the next request to continue + # retrieving additional traces. + class ListTracesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the `GetTrace` method. + # @!attribute [rw] project_id + # @return [::String] + # Required. ID of the Cloud project where the trace data is stored. + # @!attribute [rw] trace_id + # @return [::String] + # Required. ID of the trace to return. + class GetTraceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the `PatchTraces` method. + # @!attribute [rw] project_id + # @return [::String] + # Required. ID of the Cloud project where the trace data is stored. + # @!attribute [rw] traces + # @return [::Google::Cloud::Trace::V1::Traces] + # Required. The body of the message. + class PatchTracesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-trace-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-trace-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-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-trace-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-trace-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-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-trace-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-trace-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-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-trace-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-trace-v1/snippets/Gemfile new file mode 100644 index 000000000000..c09bc4f74260 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-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-trace-v1", path: "../" +else + gem "google-cloud-trace-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-trace-v1/snippets/snippet_metadata_google.devtools.cloudtrace.v1.json b/owl-bot-staging/google-cloud-trace-v1/snippets/snippet_metadata_google.devtools.cloudtrace.v1.json new file mode 100644 index 000000000000..314aca148ab2 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/snippets/snippet_metadata_google.devtools.cloudtrace.v1.json @@ -0,0 +1,135 @@ +{ + "client_library": { + "name": "google-cloud-trace-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.devtools.cloudtrace.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "cloudtrace_v1_generated_TraceService_ListTraces_sync", + "title": "Snippet for the list_traces call in the TraceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Trace::V1::TraceService::Client#list_traces.", + "file": "trace_service/list_traces.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_traces", + "full_name": "::Google::Cloud::Trace::V1::TraceService::Client#list_traces", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Trace::V1::ListTracesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Trace::V1::ListTracesResponse", + "client": { + "short_name": "TraceService::Client", + "full_name": "::Google::Cloud::Trace::V1::TraceService::Client" + }, + "method": { + "short_name": "ListTraces", + "full_name": "google.devtools.cloudtrace.v1.TraceService.ListTraces", + "service": { + "short_name": "TraceService", + "full_name": "google.devtools.cloudtrace.v1.TraceService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtrace_v1_generated_TraceService_GetTrace_sync", + "title": "Snippet for the get_trace call in the TraceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Trace::V1::TraceService::Client#get_trace.", + "file": "trace_service/get_trace.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_trace", + "full_name": "::Google::Cloud::Trace::V1::TraceService::Client#get_trace", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Trace::V1::GetTraceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Trace::V1::Trace", + "client": { + "short_name": "TraceService::Client", + "full_name": "::Google::Cloud::Trace::V1::TraceService::Client" + }, + "method": { + "short_name": "GetTrace", + "full_name": "google.devtools.cloudtrace.v1.TraceService.GetTrace", + "service": { + "short_name": "TraceService", + "full_name": "google.devtools.cloudtrace.v1.TraceService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtrace_v1_generated_TraceService_PatchTraces_sync", + "title": "Snippet for the patch_traces call in the TraceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Trace::V1::TraceService::Client#patch_traces.", + "file": "trace_service/patch_traces.rb", + "language": "RUBY", + "client_method": { + "short_name": "patch_traces", + "full_name": "::Google::Cloud::Trace::V1::TraceService::Client#patch_traces", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Trace::V1::PatchTracesRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "TraceService::Client", + "full_name": "::Google::Cloud::Trace::V1::TraceService::Client" + }, + "method": { + "short_name": "PatchTraces", + "full_name": "google.devtools.cloudtrace.v1.TraceService.PatchTraces", + "service": { + "short_name": "TraceService", + "full_name": "google.devtools.cloudtrace.v1.TraceService" + } + } + }, + "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-trace-v1/snippets/trace_service/get_trace.rb b/owl-bot-staging/google-cloud-trace-v1/snippets/trace_service/get_trace.rb new file mode 100644 index 000000000000..cda36e0edbd3 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/snippets/trace_service/get_trace.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 cloudtrace_v1_generated_TraceService_GetTrace_sync] +require "google/cloud/trace/v1" + +## +# Snippet for the get_trace call in the TraceService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Trace::V1::TraceService::Client#get_trace. +# +def get_trace + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Trace::V1::TraceService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Trace::V1::GetTraceRequest.new + + # Call the get_trace method. + result = client.get_trace request + + # The returned object is of type Google::Cloud::Trace::V1::Trace. + p result +end +# [END cloudtrace_v1_generated_TraceService_GetTrace_sync] diff --git a/owl-bot-staging/google-cloud-trace-v1/snippets/trace_service/list_traces.rb b/owl-bot-staging/google-cloud-trace-v1/snippets/trace_service/list_traces.rb new file mode 100644 index 000000000000..17cca45ee65e --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/snippets/trace_service/list_traces.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 cloudtrace_v1_generated_TraceService_ListTraces_sync] +require "google/cloud/trace/v1" + +## +# Snippet for the list_traces call in the TraceService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Trace::V1::TraceService::Client#list_traces. +# +def list_traces + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Trace::V1::TraceService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Trace::V1::ListTracesRequest.new + + # Call the list_traces method. + result = client.list_traces request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Trace::V1::Trace. + p item + end +end +# [END cloudtrace_v1_generated_TraceService_ListTraces_sync] diff --git a/owl-bot-staging/google-cloud-trace-v1/snippets/trace_service/patch_traces.rb b/owl-bot-staging/google-cloud-trace-v1/snippets/trace_service/patch_traces.rb new file mode 100644 index 000000000000..1a9f634e125c --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/snippets/trace_service/patch_traces.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 cloudtrace_v1_generated_TraceService_PatchTraces_sync] +require "google/cloud/trace/v1" + +## +# Snippet for the patch_traces call in the TraceService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Trace::V1::TraceService::Client#patch_traces. +# +def patch_traces + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Trace::V1::TraceService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Trace::V1::PatchTracesRequest.new + + # Call the patch_traces method. + result = client.patch_traces request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END cloudtrace_v1_generated_TraceService_PatchTraces_sync] diff --git a/owl-bot-staging/google-cloud-trace-v1/test/google/cloud/trace/v1/trace_service_rest_test.rb b/owl-bot-staging/google-cloud-trace-v1/test/google/cloud/trace/v1/trace_service_rest_test.rb new file mode 100644 index 000000000000..600d2460da19 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/test/google/cloud/trace/v1/trace_service_rest_test.rb @@ -0,0 +1,270 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/devtools/cloudtrace/v1/trace_pb" +require "google/cloud/trace/v1/trace_service/rest" + + +class ::Google::Cloud::Trace::V1::TraceService::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_traces + # Create test objects. + client_result = ::Google::Cloud::Trace::V1::ListTracesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + project_id = "hello world" + view = :VIEW_TYPE_UNSPECIFIED + page_size = 42 + page_token = "hello world" + start_time = {} + end_time = {} + filter = "hello world" + order_by = "hello world" + + list_traces_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Trace::V1::TraceService::Rest::ServiceStub.stub :transcode_list_traces_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_traces_client_stub do + # Create client + client = ::Google::Cloud::Trace::V1::TraceService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_traces({ project_id: project_id, view: view, page_size: page_size, page_token: page_token, start_time: start_time, end_time: end_time, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_traces project_id: project_id, view: view, page_size: page_size, page_token: page_token, start_time: start_time, end_time: end_time, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_traces ::Google::Cloud::Trace::V1::ListTracesRequest.new(project_id: project_id, view: view, page_size: page_size, page_token: page_token, start_time: start_time, end_time: end_time, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_traces({ project_id: project_id, view: view, page_size: page_size, page_token: page_token, start_time: start_time, end_time: end_time, 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_traces(::Google::Cloud::Trace::V1::ListTracesRequest.new(project_id: project_id, view: view, page_size: page_size, page_token: page_token, start_time: start_time, end_time: end_time, 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_traces_client_stub.call_count + end + end + end + + def test_get_trace + # Create test objects. + client_result = ::Google::Cloud::Trace::V1::Trace.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + project_id = "hello world" + trace_id = "hello world" + + get_trace_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Trace::V1::TraceService::Rest::ServiceStub.stub :transcode_get_trace_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_trace_client_stub do + # Create client + client = ::Google::Cloud::Trace::V1::TraceService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_trace({ project_id: project_id, trace_id: trace_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_trace project_id: project_id, trace_id: trace_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_trace ::Google::Cloud::Trace::V1::GetTraceRequest.new(project_id: project_id, trace_id: trace_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_trace({ project_id: project_id, trace_id: trace_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_trace(::Google::Cloud::Trace::V1::GetTraceRequest.new(project_id: project_id, trace_id: trace_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_trace_client_stub.call_count + end + end + end + + def test_patch_traces + # 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. + project_id = "hello world" + traces = {} + + patch_traces_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Trace::V1::TraceService::Rest::ServiceStub.stub :transcode_patch_traces_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, patch_traces_client_stub do + # Create client + client = ::Google::Cloud::Trace::V1::TraceService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.patch_traces({ project_id: project_id, traces: traces }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.patch_traces project_id: project_id, traces: traces do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.patch_traces ::Google::Cloud::Trace::V1::PatchTracesRequest.new(project_id: project_id, traces: traces) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.patch_traces({ project_id: project_id, traces: traces }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.patch_traces(::Google::Cloud::Trace::V1::PatchTracesRequest.new(project_id: project_id, traces: traces), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, patch_traces_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::Trace::V1::TraceService::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::Trace::V1::TraceService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-trace-v1/test/google/cloud/trace/v1/trace_service_test.rb b/owl-bot-staging/google-cloud-trace-v1/test/google/cloud/trace/v1/trace_service_test.rb new file mode 100644 index 000000000000..cf06253597e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/test/google/cloud/trace/v1/trace_service_test.rb @@ -0,0 +1,301 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/devtools/cloudtrace/v1/trace_pb" +require "google/cloud/trace/v1/trace_service" + +class ::Google::Cloud::Trace::V1::TraceService::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_traces + # Create GRPC objects. + grpc_response = ::Google::Cloud::Trace::V1::ListTracesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + project_id = "hello world" + view = :VIEW_TYPE_UNSPECIFIED + page_size = 42 + page_token = "hello world" + start_time = {} + end_time = {} + filter = "hello world" + order_by = "hello world" + + list_traces_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_traces, name + assert_kind_of ::Google::Cloud::Trace::V1::ListTracesRequest, request + assert_equal "hello world", request["project_id"] + assert_equal :VIEW_TYPE_UNSPECIFIED, request["view"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["start_time"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["end_time"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_traces_client_stub do + # Create client + client = ::Google::Cloud::Trace::V1::TraceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_traces({ project_id: project_id, view: view, page_size: page_size, page_token: page_token, start_time: start_time, end_time: end_time, filter: filter, order_by: 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_traces project_id: project_id, view: view, page_size: page_size, page_token: page_token, start_time: start_time, end_time: end_time, filter: filter, order_by: 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_traces ::Google::Cloud::Trace::V1::ListTracesRequest.new(project_id: project_id, view: view, page_size: page_size, page_token: page_token, start_time: start_time, end_time: end_time, filter: filter, order_by: 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_traces({ project_id: project_id, view: view, page_size: page_size, page_token: page_token, start_time: start_time, end_time: end_time, filter: filter, order_by: order_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_traces(::Google::Cloud::Trace::V1::ListTracesRequest.new(project_id: project_id, view: view, page_size: page_size, page_token: page_token, start_time: start_time, end_time: end_time, filter: filter, order_by: order_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_traces_client_stub.call_rpc_count + end + end + + def test_get_trace + # Create GRPC objects. + grpc_response = ::Google::Cloud::Trace::V1::Trace.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + project_id = "hello world" + trace_id = "hello world" + + get_trace_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_trace, name + assert_kind_of ::Google::Cloud::Trace::V1::GetTraceRequest, request + assert_equal "hello world", request["project_id"] + assert_equal "hello world", request["trace_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_trace_client_stub do + # Create client + client = ::Google::Cloud::Trace::V1::TraceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_trace({ project_id: project_id, trace_id: trace_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_trace project_id: project_id, trace_id: trace_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_trace ::Google::Cloud::Trace::V1::GetTraceRequest.new(project_id: project_id, trace_id: trace_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_trace({ project_id: project_id, trace_id: trace_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_trace(::Google::Cloud::Trace::V1::GetTraceRequest.new(project_id: project_id, trace_id: trace_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_trace_client_stub.call_rpc_count + end + end + + def test_patch_traces + # 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. + project_id = "hello world" + traces = {} + + patch_traces_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :patch_traces, name + assert_kind_of ::Google::Cloud::Trace::V1::PatchTracesRequest, request + assert_equal "hello world", request["project_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Trace::V1::Traces), request["traces"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, patch_traces_client_stub do + # Create client + client = ::Google::Cloud::Trace::V1::TraceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.patch_traces({ project_id: project_id, traces: traces }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.patch_traces project_id: project_id, traces: traces do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.patch_traces ::Google::Cloud::Trace::V1::PatchTracesRequest.new(project_id: project_id, traces: traces) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.patch_traces({ project_id: project_id, traces: traces }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.patch_traces(::Google::Cloud::Trace::V1::PatchTracesRequest.new(project_id: project_id, traces: traces), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, patch_traces_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::Trace::V1::TraceService::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::Trace::V1::TraceService::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::Trace::V1::TraceService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Trace::V1::TraceService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-trace-v1/test/helper.rb b/owl-bot-staging/google-cloud-trace-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-trace-v2/.gitignore b/owl-bot-staging/google-cloud-trace-v2/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-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-trace-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-trace-v2/.repo-metadata.json new file mode 100644 index 000000000000..67811910934d --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "cloudtrace.googleapis.com", + "api_shortname": "cloudtrace", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-trace-v2/latest", + "distribution_name": "google-cloud-trace-v2", + "is_cloud": true, + "language": "ruby", + "name": "cloudtrace", + "name_pretty": "Cloud Trace V2 API", + "product_documentation": "https://cloud.google.com/trace", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The Cloud Trace API lets you send and retrieve latency data to and from Cloud Trace. This API provides low-level interfaces for interacting directly with the feature. For some languages, you can use OpenTelemetry, a set of open source tracing and stats instrumentation libraries that work with multiple backends. Note that google-cloud-trace-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-trace instead. See the readme for more details.", + "ruby-cloud-env-prefix": "TRACE", + "ruby-cloud-product-url": "https://cloud.google.com/trace", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-trace-v2/.rubocop.yml b/owl-bot-staging/google-cloud-trace-v2/.rubocop.yml new file mode 100644 index 000000000000..f3216e912f4e --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-trace-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-trace-v2.rb" diff --git a/owl-bot-staging/google-cloud-trace-v2/.toys.rb b/owl-bot-staging/google-cloud-trace-v2/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-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-trace-v2/.yardopts b/owl-bot-staging/google-cloud-trace-v2/.yardopts new file mode 100644 index 000000000000..6c8fa994b18f --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Trace 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-trace-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-trace-v2/AUTHENTICATION.md new file mode 100644 index 000000000000..cd2b7cadfb3d --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-trace-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-trace-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/trace/v2" + +client = ::Google::Cloud::Trace::V2::TraceService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/trace/v2" + +::Google::Cloud::Trace::V2::TraceService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Trace::V2::TraceService::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-trace-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/trace/v2" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Trace::V2::TraceService::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-trace-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-trace-v2/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-trace-v2/Gemfile b/owl-bot-staging/google-cloud-trace-v2/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-trace-v2/LICENSE.md b/owl-bot-staging/google-cloud-trace-v2/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-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-trace-v2/README.md b/owl-bot-staging/google-cloud-trace-v2/README.md new file mode 100644 index 000000000000..1ff702d96ad8 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Trace V2 API + +Sends application trace data to Stackdriver Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Trace API directly. If you are looking to instrument your application for Stackdriver Trace, we recommend using OpenTelemetry. + +The Cloud Trace API lets you send and retrieve latency data to and from Cloud Trace. This API provides low-level interfaces for interacting directly with the feature. For some languages, you can use OpenTelemetry, a set of open source tracing and stats instrumentation libraries that work with multiple backends. + +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 Trace V2 API. Most users should consider using +the main client gem, +[google-cloud-trace](https://rubygems.org/gems/google-cloud-trace). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-trace-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/cloudtrace.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/trace/v2" + +client = ::Google::Cloud::Trace::V2::TraceService::Client.new +request = ::Google::Cloud::Trace::V2::BatchWriteSpansRequest.new # (request fields as keyword arguments...) +response = client.batch_write_spans request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-trace-v2/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/trace) +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/trace/v2" +require "logger" + +client = ::Google::Cloud::Trace::V2::TraceService::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-trace`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-trace-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-trace`. +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-trace-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-trace-v2/Rakefile b/owl-bot-staging/google-cloud-trace-v2/Rakefile new file mode 100644 index 000000000000..010c4e0623c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-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-trace-v2 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["TRACE_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["TRACE_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["TRACE_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 TRACE_TEST_PROJECT=test123 TRACE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/trace/v2/trace_service/credentials" + ::Google::Cloud::Trace::V2::TraceService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["TRACE_PROJECT"] = project + ENV["TRACE_TEST_PROJECT"] = project + ENV["TRACE_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-trace-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-trace-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-trace-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-trace-v2 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-trace-v2" + header "google-cloud-trace-v2 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-trace-v2 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-trace-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-trace-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-trace-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-trace-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-trace-v2/gapic_metadata.json new file mode 100644 index 000000000000..9cd82cbd9ba1 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/gapic_metadata.json @@ -0,0 +1,28 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.devtools.cloudtrace.v2", + "libraryPackage": "::Google::Cloud::Trace::V2", + "services": { + "TraceService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Trace::V2::TraceService::Client", + "rpcs": { + "BatchWriteSpans": { + "methods": [ + "batch_write_spans" + ] + }, + "CreateSpan": { + "methods": [ + "create_span" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-trace-v2/google-cloud-trace-v2.gemspec b/owl-bot-staging/google-cloud-trace-v2/google-cloud-trace-v2.gemspec new file mode 100644 index 000000000000..93a50148c12a --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/google-cloud-trace-v2.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/trace/v2/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-trace-v2" + gem.version = Google::Cloud::Trace::V2::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The Cloud Trace API lets you send and retrieve latency data to and from Cloud Trace. This API provides low-level interfaces for interacting directly with the feature. For some languages, you can use OpenTelemetry, a set of open source tracing and stats instrumentation libraries that work with multiple backends. Note that google-cloud-trace-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-trace instead. See the readme for more details." + gem.summary = "Sends application trace data to Stackdriver Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Trace API directly. If you are looking to instrument your application for Stackdriver Trace, we recommend using OpenTelemetry." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google-cloud-trace-v2.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google-cloud-trace-v2.rb new file mode 100644 index 000000000000..f27f8272e44b --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/lib/google-cloud-trace-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/trace/v2" diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2.rb new file mode 100644 index 000000000000..c1e11a6a5167 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/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/trace/v2/trace_service" +require "google/cloud/trace/v2/version" + +module Google + module Cloud + module Trace + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/trace/v2" + # client = ::Google::Cloud::Trace::V2::TraceService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/trace/v2" + # client = ::Google::Cloud::Trace::V2::TraceService::Rest::Client.new + # + module V2 + end + end + end +end + +helper_path = ::File.join __dir__, "v2", "_helpers.rb" +require "google/cloud/trace/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/rest.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/rest.rb new file mode 100644 index 000000000000..531187513daf --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/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/trace/v2/trace_service/rest" +require "google/cloud/trace/v2/version" + +module Google + module Cloud + module Trace + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/trace/v2/rest" + # client = ::Google::Cloud::Trace::V2::TraceService::Rest::Client.new + # + module V2 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service.rb new file mode 100644 index 000000000000..71726f38d623 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_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/trace/v2/version" + +require "google/cloud/trace/v2/trace_service/credentials" +require "google/cloud/trace/v2/trace_service/paths" +require "google/cloud/trace/v2/trace_service/client" +require "google/cloud/trace/v2/trace_service/rest" + +module Google + module Cloud + module Trace + module V2 + ## + # Service for collecting and viewing traces and spans within a trace. + # + # A trace is a collection of spans corresponding to a single + # operation or a set of operations in an application. + # + # A span is an individual timed event which forms a node of the trace tree. + # A single trace can contain spans from multiple services. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/trace/v2/trace_service" + # client = ::Google::Cloud::Trace::V2::TraceService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/trace/v2/trace_service/rest" + # client = ::Google::Cloud::Trace::V2::TraceService::Rest::Client.new + # + module TraceService + end + end + end + end +end + +helper_path = ::File.join __dir__, "trace_service", "helpers.rb" +require "google/cloud/trace/v2/trace_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/client.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/client.rb new file mode 100644 index 000000000000..1f59d76e257f --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/client.rb @@ -0,0 +1,643 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/devtools/cloudtrace/v2/tracing_pb" + +module Google + module Cloud + module Trace + module V2 + module TraceService + ## + # Client for the TraceService service. + # + # Service for collecting and viewing traces and spans within a trace. + # + # A trace is a collection of spans corresponding to a single + # operation or a set of operations in an application. + # + # A span is an individual timed event which forms a node of the trace tree. + # A single trace can contain spans from multiple services. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudtrace.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :trace_service_stub + + ## + # Configure the TraceService Client class. + # + # See {::Google::Cloud::Trace::V2::TraceService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TraceService clients + # ::Google::Cloud::Trace::V2::TraceService::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", "Trace", "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.rpcs.batch_write_spans.timeout = 120.0 + default_config.rpcs.batch_write_spans.retry_policy = { + initial_delay: 0.1, max_delay: 30.0, multiplier: 2, retry_codes: [14, 4] + } + + default_config.rpcs.create_span.timeout = 120.0 + default_config.rpcs.create_span.retry_policy = { + initial_delay: 0.1, max_delay: 1.0, multiplier: 1.2, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TraceService 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::Trace::V2::TraceService::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 + @trace_service_stub.universe_domain + end + + ## + # Create a new TraceService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Trace::V2::TraceService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Trace::V2::TraceService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TraceService 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/devtools/cloudtrace/v2/tracing_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 + + @trace_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Trace::V2::TraceService::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 + ) + + @trace_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 + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @trace_service_stub.logger + end + + # Service calls + + ## + # Batch writes new spans to new or existing traces. You cannot update + # existing spans. + # + # @overload batch_write_spans(request, options = nil) + # Pass arguments to `batch_write_spans` via a request object, either of type + # {::Google::Cloud::Trace::V2::BatchWriteSpansRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Trace::V2::BatchWriteSpansRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_spans(name: nil, spans: nil) + # Pass arguments to `batch_write_spans` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 project where the spans belong. The format is + # `projects/[PROJECT_ID]`. + # @param spans [::Array<::Google::Cloud::Trace::V2::Span, ::Hash>] + # Required. A list of new spans. The span names must not match existing + # spans, otherwise the results are undefined. + # + # @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/trace/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Trace::V2::TraceService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Trace::V2::BatchWriteSpansRequest.new + # + # # Call the batch_write_spans method. + # result = client.batch_write_spans request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def batch_write_spans request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Trace::V2::BatchWriteSpansRequest + + # Converts hash and nil to 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_spans.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Trace::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.batch_write_spans.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_write_spans.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trace_service_stub.call_rpc :batch_write_spans, request, 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 span. + # + # @overload create_span(request, options = nil) + # Pass arguments to `create_span` via a request object, either of type + # {::Google::Cloud::Trace::V2::Span} or an equivalent Hash. + # + # @param request [::Google::Cloud::Trace::V2::Span, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_span(name: nil, span_id: nil, parent_span_id: nil, display_name: nil, start_time: nil, end_time: nil, attributes: nil, stack_trace: nil, time_events: nil, links: nil, status: nil, same_process_as_parent_span: nil, child_span_count: nil, span_kind: nil) + # Pass arguments to `create_span` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the span in the following format: + # + # * `projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]` + # + # `[TRACE_ID]` is a unique identifier for a trace within a project; + # it is a 32-character hexadecimal encoding of a 16-byte array. It should + # not be zero. + # + # `[SPAN_ID]` is a unique identifier for a span within a trace; it + # is a 16-character hexadecimal encoding of an 8-byte array. It should not + # be zero. + # . + # @param span_id [::String] + # Required. The `[SPAN_ID]` portion of the span's resource name. + # @param parent_span_id [::String] + # The `[SPAN_ID]` of this span's parent span. If this is a root span, + # then this field must be empty. + # @param display_name [::Google::Cloud::Trace::V2::TruncatableString, ::Hash] + # Required. A description of the span's operation (up to 128 bytes). + # Cloud Trace displays the description in the + # Cloud console. + # For example, the display name can be a qualified method name or a file name + # and a line number where the operation is called. A best practice is to use + # the same display name within an application and at the same call point. + # This makes it easier to correlate spans in different traces. + # @param start_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. The start time of the span. On the client side, this is the time + # kept by the local machine where the span execution starts. On the server + # side, this is the time when the server's application handler starts + # running. + # @param end_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. The end time of the span. On the client side, this is the time + # kept by the local machine where the span execution ends. On the server + # side, this is the time when the server application handler stops running. + # @param attributes [::Google::Cloud::Trace::V2::Span::Attributes, ::Hash] + # A set of attributes on the span. You can have up to 32 attributes per + # span. + # @param stack_trace [::Google::Cloud::Trace::V2::StackTrace, ::Hash] + # Stack trace captured at the start of the span. + # @param time_events [::Google::Cloud::Trace::V2::Span::TimeEvents, ::Hash] + # A set of time events. You can have up to 32 annotations and 128 message + # events per span. + # @param links [::Google::Cloud::Trace::V2::Span::Links, ::Hash] + # Links associated with the span. You can have up to 128 links per Span. + # @param status [::Google::Rpc::Status, ::Hash] + # Optional. The final status for this span. + # @param same_process_as_parent_span [::Google::Protobuf::BoolValue, ::Hash] + # Optional. Set this parameter to indicate whether this span is in + # the same process as its parent. If you do not set this parameter, + # Trace is unable to take advantage of this helpful information. + # @param child_span_count [::Google::Protobuf::Int32Value, ::Hash] + # Optional. The number of child spans that were generated while this span + # was active. If set, allows implementation to detect missing child spans. + # @param span_kind [::Google::Cloud::Trace::V2::Span::SpanKind] + # Optional. Distinguishes between spans generated in a particular context. + # For example, two spans with the same name may be distinguished using + # `CLIENT` (caller) and `SERVER` (callee) to identify an RPC call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Trace::V2::Span] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Trace::V2::Span] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/trace/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Trace::V2::TraceService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Trace::V2::Span.new + # + # # Call the create_span method. + # result = client.create_span request + # + # # The returned object is of type Google::Cloud::Trace::V2::Span. + # p result + # + def create_span request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Trace::V2::Span + + # Converts hash and nil to 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_span.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Trace::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.create_span.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_span.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trace_service_stub.call_rpc :create_span, request, 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 TraceService API. + # + # This class represents the configuration for TraceService, + # 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::Trace::V2::TraceService::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 + # # batch_write_spans to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Trace::V2::TraceService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.batch_write_spans.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Trace::V2::TraceService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.batch_write_spans.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::Trace::V2::TraceService::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 = "cloudtrace.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 TraceService 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 `batch_write_spans` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_write_spans + ## + # RPC-specific configuration for `create_span` + # @return [::Gapic::Config::Method] + # + attr_reader :create_span + + # @private + def initialize parent_rpcs = nil + batch_write_spans_config = parent_rpcs.batch_write_spans if parent_rpcs.respond_to? :batch_write_spans + @batch_write_spans = ::Gapic::Config::Method.new batch_write_spans_config + create_span_config = parent_rpcs.create_span if parent_rpcs.respond_to? :create_span + @create_span = ::Gapic::Config::Method.new create_span_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/credentials.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/credentials.rb new file mode 100644 index 000000000000..db91afb17b6c --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/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 Trace + module V2 + module TraceService + # Credentials for the TraceService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/trace.append" + ] + self.env_vars = [ + "TRACE_CREDENTIALS", + "TRACE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "TRACE_CREDENTIALS_JSON", + "TRACE_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-trace-v2/lib/google/cloud/trace/v2/trace_service/paths.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/paths.rb new file mode 100644 index 000000000000..25d2b38e26ac --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Trace + module V2 + module TraceService + # Path helper methods for the TraceService API. + module Paths + ## + # 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 Span resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/traces/{trace}/spans/{span}` + # + # @param project [String] + # @param trace [String] + # @param span [String] + # + # @return [::String] + def span_path project:, trace:, span: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "trace cannot contain /" if trace.to_s.include? "/" + + "projects/#{project}/traces/#{trace}/spans/#{span}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/rest.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/rest.rb new file mode 100644 index 000000000000..0f21f9aa2181 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/rest.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/trace/v2/version" + +require "google/cloud/trace/v2/trace_service/credentials" +require "google/cloud/trace/v2/trace_service/paths" +require "google/cloud/trace/v2/trace_service/rest/client" + +module Google + module Cloud + module Trace + module V2 + ## + # Service for collecting and viewing traces and spans within a trace. + # + # A trace is a collection of spans corresponding to a single + # operation or a set of operations in an application. + # + # A span is an individual timed event which forms a node of the trace tree. + # A single trace can contain spans from multiple services. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/trace/v2/trace_service/rest" + # client = ::Google::Cloud::Trace::V2::TraceService::Rest::Client.new + # + module TraceService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/trace/v2/trace_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/rest/client.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/rest/client.rb new file mode 100644 index 000000000000..a96278916b0a --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/rest/client.rb @@ -0,0 +1,586 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/devtools/cloudtrace/v2/tracing_pb" +require "google/cloud/trace/v2/trace_service/rest/service_stub" + +module Google + module Cloud + module Trace + module V2 + module TraceService + module Rest + ## + # REST client for the TraceService service. + # + # Service for collecting and viewing traces and spans within a trace. + # + # A trace is a collection of spans corresponding to a single + # operation or a set of operations in an application. + # + # A span is an individual timed event which forms a node of the trace tree. + # A single trace can contain spans from multiple services. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudtrace.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :trace_service_stub + + ## + # Configure the TraceService Client class. + # + # See {::Google::Cloud::Trace::V2::TraceService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TraceService clients + # ::Google::Cloud::Trace::V2::TraceService::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", "Trace", "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.rpcs.batch_write_spans.timeout = 120.0 + default_config.rpcs.batch_write_spans.retry_policy = { + initial_delay: 0.1, max_delay: 30.0, multiplier: 2, retry_codes: [14, 4] + } + + default_config.rpcs.create_span.timeout = 120.0 + default_config.rpcs.create_span.retry_policy = { + initial_delay: 0.1, max_delay: 1.0, multiplier: 1.2, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TraceService 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::Trace::V2::TraceService::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 + @trace_service_stub.universe_domain + end + + ## + # Create a new TraceService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Trace::V2::TraceService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Trace::V2::TraceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TraceService 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 + + @trace_service_stub = ::Google::Cloud::Trace::V2::TraceService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @trace_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 + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @trace_service_stub.logger + end + + # Service calls + + ## + # Batch writes new spans to new or existing traces. You cannot update + # existing spans. + # + # @overload batch_write_spans(request, options = nil) + # Pass arguments to `batch_write_spans` via a request object, either of type + # {::Google::Cloud::Trace::V2::BatchWriteSpansRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Trace::V2::BatchWriteSpansRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_spans(name: nil, spans: nil) + # Pass arguments to `batch_write_spans` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 project where the spans belong. The format is + # `projects/[PROJECT_ID]`. + # @param spans [::Array<::Google::Cloud::Trace::V2::Span, ::Hash>] + # Required. A list of new spans. The span names must not match existing + # spans, otherwise the results are undefined. + # @yield [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/trace/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Trace::V2::TraceService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Trace::V2::BatchWriteSpansRequest.new + # + # # Call the batch_write_spans method. + # result = client.batch_write_spans request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def batch_write_spans request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Trace::V2::BatchWriteSpansRequest + + # Converts hash and nil to an 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_spans.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Trace::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.batch_write_spans.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_write_spans.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trace_service_stub.batch_write_spans request, 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 span. + # + # @overload create_span(request, options = nil) + # Pass arguments to `create_span` via a request object, either of type + # {::Google::Cloud::Trace::V2::Span} or an equivalent Hash. + # + # @param request [::Google::Cloud::Trace::V2::Span, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_span(name: nil, span_id: nil, parent_span_id: nil, display_name: nil, start_time: nil, end_time: nil, attributes: nil, stack_trace: nil, time_events: nil, links: nil, status: nil, same_process_as_parent_span: nil, child_span_count: nil, span_kind: nil) + # Pass arguments to `create_span` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the span in the following format: + # + # * `projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]` + # + # `[TRACE_ID]` is a unique identifier for a trace within a project; + # it is a 32-character hexadecimal encoding of a 16-byte array. It should + # not be zero. + # + # `[SPAN_ID]` is a unique identifier for a span within a trace; it + # is a 16-character hexadecimal encoding of an 8-byte array. It should not + # be zero. + # . + # @param span_id [::String] + # Required. The `[SPAN_ID]` portion of the span's resource name. + # @param parent_span_id [::String] + # The `[SPAN_ID]` of this span's parent span. If this is a root span, + # then this field must be empty. + # @param display_name [::Google::Cloud::Trace::V2::TruncatableString, ::Hash] + # Required. A description of the span's operation (up to 128 bytes). + # Cloud Trace displays the description in the + # Cloud console. + # For example, the display name can be a qualified method name or a file name + # and a line number where the operation is called. A best practice is to use + # the same display name within an application and at the same call point. + # This makes it easier to correlate spans in different traces. + # @param start_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. The start time of the span. On the client side, this is the time + # kept by the local machine where the span execution starts. On the server + # side, this is the time when the server's application handler starts + # running. + # @param end_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. The end time of the span. On the client side, this is the time + # kept by the local machine where the span execution ends. On the server + # side, this is the time when the server application handler stops running. + # @param attributes [::Google::Cloud::Trace::V2::Span::Attributes, ::Hash] + # A set of attributes on the span. You can have up to 32 attributes per + # span. + # @param stack_trace [::Google::Cloud::Trace::V2::StackTrace, ::Hash] + # Stack trace captured at the start of the span. + # @param time_events [::Google::Cloud::Trace::V2::Span::TimeEvents, ::Hash] + # A set of time events. You can have up to 32 annotations and 128 message + # events per span. + # @param links [::Google::Cloud::Trace::V2::Span::Links, ::Hash] + # Links associated with the span. You can have up to 128 links per Span. + # @param status [::Google::Rpc::Status, ::Hash] + # Optional. The final status for this span. + # @param same_process_as_parent_span [::Google::Protobuf::BoolValue, ::Hash] + # Optional. Set this parameter to indicate whether this span is in + # the same process as its parent. If you do not set this parameter, + # Trace is unable to take advantage of this helpful information. + # @param child_span_count [::Google::Protobuf::Int32Value, ::Hash] + # Optional. The number of child spans that were generated while this span + # was active. If set, allows implementation to detect missing child spans. + # @param span_kind [::Google::Cloud::Trace::V2::Span::SpanKind] + # Optional. Distinguishes between spans generated in a particular context. + # For example, two spans with the same name may be distinguished using + # `CLIENT` (caller) and `SERVER` (callee) to identify an RPC call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Trace::V2::Span] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Trace::V2::Span] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/trace/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Trace::V2::TraceService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Trace::V2::Span.new + # + # # Call the create_span method. + # result = client.create_span request + # + # # The returned object is of type Google::Cloud::Trace::V2::Span. + # p result + # + def create_span request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Trace::V2::Span + + # Converts hash and nil to an 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_span.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Trace::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_span.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_span.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @trace_service_stub.create_span request, 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 TraceService REST API. + # + # This class represents the configuration for TraceService 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::Trace::V2::TraceService::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 + # # batch_write_spans to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Trace::V2::TraceService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.batch_write_spans.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Trace::V2::TraceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.batch_write_spans.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 = "cloudtrace.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 TraceService 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 `batch_write_spans` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_write_spans + ## + # RPC-specific configuration for `create_span` + # @return [::Gapic::Config::Method] + # + attr_reader :create_span + + # @private + def initialize parent_rpcs = nil + batch_write_spans_config = parent_rpcs.batch_write_spans if parent_rpcs.respond_to? :batch_write_spans + @batch_write_spans = ::Gapic::Config::Method.new batch_write_spans_config + create_span_config = parent_rpcs.create_span if parent_rpcs.respond_to? :create_span + @create_span = ::Gapic::Config::Method.new create_span_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/rest/service_stub.rb new file mode 100644 index 000000000000..bd1feae3a232 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/rest/service_stub.rb @@ -0,0 +1,205 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/devtools/cloudtrace/v2/tracing_pb" + +module Google + module Cloud + module Trace + module V2 + module TraceService + module Rest + ## + # REST service stub for the TraceService 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 batch_write_spans REST call + # + # @param request_pb [::Google::Cloud::Trace::V2::BatchWriteSpansRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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 batch_write_spans request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_write_spans_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_spans", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_span REST call + # + # @param request_pb [::Google::Cloud::Trace::V2::Span] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Trace::V2::Span] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Trace::V2::Span] + # A result object deserialized from the server's reply + def create_span request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_span_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_span", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Trace::V2::Span.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 batch_write_spans REST call + # + # @param request_pb [::Google::Cloud::Trace::V2::BatchWriteSpansRequest] + # 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_spans_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}/traces:batchWrite", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_span REST call + # + # @param request_pb [::Google::Cloud::Trace::V2::Span] + # 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_span_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/traces/[^/]+/spans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/version.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/version.rb new file mode 100644 index 000000000000..d2142daddb36 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/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 Trace + module V2 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google/devtools/cloudtrace/v2/trace_pb.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/devtools/cloudtrace/v2/trace_pb.rb new file mode 100644 index 000000000000..f7c5cc2b9fdf --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/lib/google/devtools/cloudtrace/v2/trace_pb.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/cloudtrace/v2/trace.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n)google/devtools/cloudtrace/v2/trace.proto\x12\x1dgoogle.devtools.cloudtrace.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"\xf1\x11\n\x04Span\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07span_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x0eparent_span_id\x18\x03 \x01(\t\x12K\n\x0c\x64isplay_name\x18\x04 \x01(\x0b\x32\x30.google.devtools.cloudtrace.v2.TruncatableStringB\x03\xe0\x41\x02\x12\x33\n\nstart_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x31\n\x08\x65nd_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x42\n\nattributes\x18\x07 \x01(\x0b\x32..google.devtools.cloudtrace.v2.Span.Attributes\x12>\n\x0bstack_trace\x18\x08 \x01(\x0b\x32).google.devtools.cloudtrace.v2.StackTrace\x12\x43\n\x0btime_events\x18\t \x01(\x0b\x32..google.devtools.cloudtrace.v2.Span.TimeEvents\x12\x38\n\x05links\x18\n \x01(\x0b\x32).google.devtools.cloudtrace.v2.Span.Links\x12\'\n\x06status\x18\x0b \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x01\x12\x44\n\x1bsame_process_as_parent_span\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x01\x12:\n\x10\x63hild_span_count\x18\r \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x01\x12\x44\n\tspan_kind\x18\x0e \x01(\x0e\x32,.google.devtools.cloudtrace.v2.Span.SpanKindB\x03\xe0\x41\x01\x1a\xeb\x01\n\nAttributes\x12W\n\rattribute_map\x18\x01 \x03(\x0b\x32@.google.devtools.cloudtrace.v2.Span.Attributes.AttributeMapEntry\x12 \n\x18\x64ropped_attributes_count\x18\x02 \x01(\x05\x1a\x62\n\x11\x41ttributeMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12<\n\x05value\x18\x02 \x01(\x0b\x32-.google.devtools.cloudtrace.v2.AttributeValue:\x02\x38\x01\x1a\xdf\x04\n\tTimeEvent\x12(\n\x04time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12N\n\nannotation\x18\x02 \x01(\x0b\x32\x38.google.devtools.cloudtrace.v2.Span.TimeEvent.AnnotationH\x00\x12S\n\rmessage_event\x18\x03 \x01(\x0b\x32:.google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEventH\x00\x1a\x97\x01\n\nAnnotation\x12\x45\n\x0b\x64\x65scription\x18\x01 \x01(\x0b\x32\x30.google.devtools.cloudtrace.v2.TruncatableString\x12\x42\n\nattributes\x18\x02 \x01(\x0b\x32..google.devtools.cloudtrace.v2.Span.Attributes\x1a\xdf\x01\n\x0cMessageEvent\x12M\n\x04type\x18\x01 \x01(\x0e\x32?.google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent.Type\x12\n\n\x02id\x18\x02 \x01(\x03\x12\x1f\n\x17uncompressed_size_bytes\x18\x03 \x01(\x03\x12\x1d\n\x15\x63ompressed_size_bytes\x18\x04 \x01(\x03\"4\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04SENT\x10\x01\x12\x0c\n\x08RECEIVED\x10\x02\x42\x07\n\x05value\x1a\x98\x01\n\nTimeEvents\x12\x41\n\ntime_event\x18\x01 \x03(\x0b\x32-.google.devtools.cloudtrace.v2.Span.TimeEvent\x12!\n\x19\x64ropped_annotations_count\x18\x02 \x01(\x05\x12$\n\x1c\x64ropped_message_events_count\x18\x03 \x01(\x05\x1a\xf7\x01\n\x04Link\x12\x10\n\x08trace_id\x18\x01 \x01(\t\x12\x0f\n\x07span_id\x18\x02 \x01(\t\x12;\n\x04type\x18\x03 \x01(\x0e\x32-.google.devtools.cloudtrace.v2.Span.Link.Type\x12\x42\n\nattributes\x18\x04 \x01(\x0b\x32..google.devtools.cloudtrace.v2.Span.Attributes\"K\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x43HILD_LINKED_SPAN\x10\x01\x12\x16\n\x12PARENT_LINKED_SPAN\x10\x02\x1a\\\n\x05Links\x12\x36\n\x04link\x18\x01 \x03(\x0b\x32(.google.devtools.cloudtrace.v2.Span.Link\x12\x1b\n\x13\x64ropped_links_count\x18\x02 \x01(\x05\"g\n\x08SpanKind\x12\x19\n\x15SPAN_KIND_UNSPECIFIED\x10\x00\x12\x0c\n\x08INTERNAL\x10\x01\x12\n\n\x06SERVER\x10\x02\x12\n\n\x06\x43LIENT\x10\x03\x12\x0c\n\x08PRODUCER\x10\x04\x12\x0c\n\x08\x43ONSUMER\x10\x05:S\xea\x41P\n\x1e\x63loudtrace.googleapis.com/Span\x12.projects/{project}/traces/{trace}/spans/{span}\"\x8e\x01\n\x0e\x41ttributeValue\x12H\n\x0cstring_value\x18\x01 \x01(\x0b\x32\x30.google.devtools.cloudtrace.v2.TruncatableStringH\x00\x12\x13\n\tint_value\x18\x02 \x01(\x03H\x00\x12\x14\n\nbool_value\x18\x03 \x01(\x08H\x00\x42\x07\n\x05value\"\x89\x05\n\nStackTrace\x12K\n\x0cstack_frames\x18\x01 \x01(\x0b\x32\x35.google.devtools.cloudtrace.v2.StackTrace.StackFrames\x12\x1b\n\x13stack_trace_hash_id\x18\x02 \x01(\x03\x1a\x9e\x03\n\nStackFrame\x12G\n\rfunction_name\x18\x01 \x01(\x0b\x32\x30.google.devtools.cloudtrace.v2.TruncatableString\x12P\n\x16original_function_name\x18\x02 \x01(\x0b\x32\x30.google.devtools.cloudtrace.v2.TruncatableString\x12\x43\n\tfile_name\x18\x03 \x01(\x0b\x32\x30.google.devtools.cloudtrace.v2.TruncatableString\x12\x13\n\x0bline_number\x18\x04 \x01(\x03\x12\x15\n\rcolumn_number\x18\x05 \x01(\x03\x12:\n\x0bload_module\x18\x06 \x01(\x0b\x32%.google.devtools.cloudtrace.v2.Module\x12H\n\x0esource_version\x18\x07 \x01(\x0b\x32\x30.google.devtools.cloudtrace.v2.TruncatableString\x1ap\n\x0bStackFrames\x12\x43\n\x05\x66rame\x18\x01 \x03(\x0b\x32\x34.google.devtools.cloudtrace.v2.StackTrace.StackFrame\x12\x1c\n\x14\x64ropped_frames_count\x18\x02 \x01(\x05\"\x8e\x01\n\x06Module\x12@\n\x06module\x18\x01 \x01(\x0b\x32\x30.google.devtools.cloudtrace.v2.TruncatableString\x12\x42\n\x08\x62uild_id\x18\x02 \x01(\x0b\x32\x30.google.devtools.cloudtrace.v2.TruncatableString\"@\n\x11TruncatableString\x12\r\n\x05value\x18\x01 \x01(\t\x12\x1c\n\x14truncated_byte_count\x18\x02 \x01(\x05\x42\xad\x01\n!com.google.devtools.cloudtrace.v2B\nTraceProtoP\x01Z/cloud.google.com/go/trace/apiv2/tracepb;tracepb\xaa\x02\x15Google.Cloud.Trace.V2\xca\x02\x15Google\\Cloud\\Trace\\V2\xea\x02\x18Google::Cloud::Trace::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Trace + module V2 + Span = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.Span").msgclass + Span::Attributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.Span.Attributes").msgclass + Span::TimeEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.Span.TimeEvent").msgclass + Span::TimeEvent::Annotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation").msgclass + Span::TimeEvent::MessageEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent").msgclass + Span::TimeEvent::MessageEvent::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent.Type").enummodule + Span::TimeEvents = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.Span.TimeEvents").msgclass + Span::Link = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.Span.Link").msgclass + Span::Link::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.Span.Link.Type").enummodule + Span::Links = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.Span.Links").msgclass + Span::SpanKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.Span.SpanKind").enummodule + AttributeValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.AttributeValue").msgclass + StackTrace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.StackTrace").msgclass + StackTrace::StackFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.StackTrace.StackFrame").msgclass + StackTrace::StackFrames = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.StackTrace.StackFrames").msgclass + Module = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.Module").msgclass + TruncatableString = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.TruncatableString").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google/devtools/cloudtrace/v2/tracing_pb.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/devtools/cloudtrace/v2/tracing_pb.rb new file mode 100644 index 000000000000..5358c8dce77e --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/lib/google/devtools/cloudtrace/v2/tracing_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/cloudtrace/v2/tracing.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/devtools/cloudtrace/v2/trace_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n+google/devtools/cloudtrace/v2/tracing.proto\x12\x1dgoogle.devtools.cloudtrace.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a)google/devtools/cloudtrace/v2/trace.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x94\x01\n\x16\x42\x61tchWriteSpansRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x37\n\x05spans\x18\x02 \x03(\x0b\x32#.google.devtools.cloudtrace.v2.SpanB\x03\xe0\x41\x02\x32\xba\x03\n\x0cTraceService\x12\xa1\x01\n\x0f\x42\x61tchWriteSpans\x12\x35.google.devtools.cloudtrace.v2.BatchWriteSpansRequest\x1a\x16.google.protobuf.Empty\"?\xda\x41\nname,spans\x82\xd3\xe4\x93\x02,\"\'/v2/{name=projects/*}/traces:batchWrite:\x01*\x12\x89\x01\n\nCreateSpan\x12#.google.devtools.cloudtrace.v2.Span\x1a#.google.devtools.cloudtrace.v2.Span\"1\x82\xd3\xe4\x93\x02+\"&/v2/{name=projects/*/traces/*/spans/*}:\x01*\x1az\xca\x41\x19\x63loudtrace.googleapis.com\xd2\x41[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/trace.appendB\xaf\x01\n!com.google.devtools.cloudtrace.v2B\x0cTracingProtoP\x01Z/cloud.google.com/go/trace/apiv2/tracepb;tracepb\xaa\x02\x15Google.Cloud.Trace.V2\xca\x02\x15Google\\Cloud\\Trace\\V2\xea\x02\x18Google::Cloud::Trace::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Trace + module V2 + BatchWriteSpansRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.BatchWriteSpansRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google/devtools/cloudtrace/v2/tracing_services_pb.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/devtools/cloudtrace/v2/tracing_services_pb.rb new file mode 100644 index 000000000000..a6ad28a02fee --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/lib/google/devtools/cloudtrace/v2/tracing_services_pb.rb @@ -0,0 +1,54 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/devtools/cloudtrace/v2/tracing.proto for package 'Google.Cloud.Trace.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/devtools/cloudtrace/v2/tracing_pb' + +module Google + module Cloud + module Trace + module V2 + module TraceService + # Service for collecting and viewing traces and spans within a trace. + # + # A trace is a collection of spans corresponding to a single + # operation or a set of operations in an application. + # + # A span is an individual timed event which forms a node of the trace tree. + # A single trace can contain spans from multiple services. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.devtools.cloudtrace.v2.TraceService' + + # Batch writes new spans to new or existing traces. You cannot update + # existing spans. + rpc :BatchWriteSpans, ::Google::Cloud::Trace::V2::BatchWriteSpansRequest, ::Google::Protobuf::Empty + # Creates a new span. + rpc :CreateSpan, ::Google::Cloud::Trace::V2::Span, ::Google::Cloud::Trace::V2::Span + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-trace-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-trace-v2/proto_docs/README.md new file mode 100644 index 000000000000..bcb9d2cdc0ae --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Trace 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-trace-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # 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. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + # + # Example: + # + # 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 + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # 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 + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # 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 + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-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-trace-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-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-trace-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-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-trace-v2/proto_docs/google/devtools/cloudtrace/v2/trace.rb b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/devtools/cloudtrace/v2/trace.rb new file mode 100644 index 000000000000..040d6c9b24da --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/devtools/cloudtrace/v2/trace.rb @@ -0,0 +1,427 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Trace + module V2 + # A span represents a single operation within a trace. Spans can be + # nested to form a trace tree. Often, a trace contains a root span + # that describes the end-to-end latency, and one or more subspans for + # its sub-operations. + # + # A trace can also contain multiple root spans, or none at all. + # Spans do not need to be contiguous. There might be + # gaps or overlaps between spans in a trace. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the span in the following format: + # + # * `projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]` + # + # `[TRACE_ID]` is a unique identifier for a trace within a project; + # it is a 32-character hexadecimal encoding of a 16-byte array. It should + # not be zero. + # + # `[SPAN_ID]` is a unique identifier for a span within a trace; it + # is a 16-character hexadecimal encoding of an 8-byte array. It should not + # be zero. + # . + # @!attribute [rw] span_id + # @return [::String] + # Required. The `[SPAN_ID]` portion of the span's resource name. + # @!attribute [rw] parent_span_id + # @return [::String] + # The `[SPAN_ID]` of this span's parent span. If this is a root span, + # then this field must be empty. + # @!attribute [rw] display_name + # @return [::Google::Cloud::Trace::V2::TruncatableString] + # Required. A description of the span's operation (up to 128 bytes). + # Cloud Trace displays the description in the + # Cloud console. + # For example, the display name can be a qualified method name or a file name + # and a line number where the operation is called. A best practice is to use + # the same display name within an application and at the same call point. + # This makes it easier to correlate spans in different traces. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Required. The start time of the span. On the client side, this is the time + # kept by the local machine where the span execution starts. On the server + # side, this is the time when the server's application handler starts + # running. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Required. The end time of the span. On the client side, this is the time + # kept by the local machine where the span execution ends. On the server + # side, this is the time when the server application handler stops running. + # @!attribute [rw] attributes + # @return [::Google::Cloud::Trace::V2::Span::Attributes] + # A set of attributes on the span. You can have up to 32 attributes per + # span. + # @!attribute [rw] stack_trace + # @return [::Google::Cloud::Trace::V2::StackTrace] + # Stack trace captured at the start of the span. + # @!attribute [rw] time_events + # @return [::Google::Cloud::Trace::V2::Span::TimeEvents] + # A set of time events. You can have up to 32 annotations and 128 message + # events per span. + # @!attribute [rw] links + # @return [::Google::Cloud::Trace::V2::Span::Links] + # Links associated with the span. You can have up to 128 links per Span. + # @!attribute [rw] status + # @return [::Google::Rpc::Status] + # Optional. The final status for this span. + # @!attribute [rw] same_process_as_parent_span + # @return [::Google::Protobuf::BoolValue] + # Optional. Set this parameter to indicate whether this span is in + # the same process as its parent. If you do not set this parameter, + # Trace is unable to take advantage of this helpful information. + # @!attribute [rw] child_span_count + # @return [::Google::Protobuf::Int32Value] + # Optional. The number of child spans that were generated while this span + # was active. If set, allows implementation to detect missing child spans. + # @!attribute [rw] span_kind + # @return [::Google::Cloud::Trace::V2::Span::SpanKind] + # Optional. Distinguishes between spans generated in a particular context. + # For example, two spans with the same name may be distinguished using + # `CLIENT` (caller) and `SERVER` (callee) to identify an RPC call. + class Span + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A set of attributes as key-value pairs. + # @!attribute [rw] attribute_map + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Trace::V2::AttributeValue}] + # A set of attributes. Each attribute's key can be up to 128 bytes + # long. The value can be a string up to 256 bytes, a signed 64-bit integer, + # or the boolean values `true` or `false`. For example: + # + # "/instance_id": { "string_value": { "value": "my-instance" } } + # "/http/request_bytes": { "int_value": 300 } + # "abc.com/myattribute": { "bool_value": false } + # @!attribute [rw] dropped_attributes_count + # @return [::Integer] + # The number of attributes that were discarded. Attributes can be discarded + # because their keys are too long or because there are too many attributes. + # If this value is 0 then all attributes are valid. + class Attributes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Trace::V2::AttributeValue] + class AttributeMapEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A time-stamped annotation or message event in the Span. + # @!attribute [rw] time + # @return [::Google::Protobuf::Timestamp] + # The timestamp indicating the time the event occurred. + # @!attribute [rw] annotation + # @return [::Google::Cloud::Trace::V2::Span::TimeEvent::Annotation] + # Text annotation with a set of attributes. + # + # Note: The following fields are mutually exclusive: `annotation`, `message_event`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] message_event + # @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent] + # An event describing a message sent/received between Spans. + # + # Note: The following fields are mutually exclusive: `message_event`, `annotation`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class TimeEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Text annotation with a set of attributes. + # @!attribute [rw] description + # @return [::Google::Cloud::Trace::V2::TruncatableString] + # A user-supplied message describing the event. The maximum length for + # the description is 256 bytes. + # @!attribute [rw] attributes + # @return [::Google::Cloud::Trace::V2::Span::Attributes] + # A set of attributes on the annotation. You can have up to 4 attributes + # per Annotation. + class Annotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An event describing a message sent/received between Spans. + # @!attribute [rw] type + # @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent::Type] + # Type of MessageEvent. Indicates whether the message was sent or + # received. + # @!attribute [rw] id + # @return [::Integer] + # An identifier for the MessageEvent's message that can be used to match + # `SENT` and `RECEIVED` MessageEvents. + # @!attribute [rw] uncompressed_size_bytes + # @return [::Integer] + # The number of uncompressed bytes sent or received. + # @!attribute [rw] compressed_size_bytes + # @return [::Integer] + # The number of compressed bytes sent or received. If missing, the + # compressed size is assumed to be the same size as the uncompressed + # size. + class MessageEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Indicates whether the message was sent or received. + module Type + # Unknown event type. + TYPE_UNSPECIFIED = 0 + + # Indicates a sent message. + SENT = 1 + + # Indicates a received message. + RECEIVED = 2 + end + end + end + + # A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation + # on the span, consisting of either user-supplied key:value pairs, or + # details of a message sent/received between Spans. + # @!attribute [rw] time_event + # @return [::Array<::Google::Cloud::Trace::V2::Span::TimeEvent>] + # A collection of `TimeEvent`s. + # @!attribute [rw] dropped_annotations_count + # @return [::Integer] + # The number of dropped annotations in all the included time events. + # If the value is 0, then no annotations were dropped. + # @!attribute [rw] dropped_message_events_count + # @return [::Integer] + # The number of dropped message events in all the included time events. + # If the value is 0, then no message events were dropped. + class TimeEvents + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A pointer from the current span to another span in the same trace or in a + # different trace. For example, this can be used in batching operations, + # where a single batch handler processes multiple requests from different + # traces or when the handler receives a request from a different project. + # @!attribute [rw] trace_id + # @return [::String] + # The `[TRACE_ID]` for a trace within a project. + # @!attribute [rw] span_id + # @return [::String] + # The `[SPAN_ID]` for a span within a trace. + # @!attribute [rw] type + # @return [::Google::Cloud::Trace::V2::Span::Link::Type] + # The relationship of the current span relative to the linked span. + # @!attribute [rw] attributes + # @return [::Google::Cloud::Trace::V2::Span::Attributes] + # A set of attributes on the link. Up to 32 attributes can be + # specified per link. + class Link + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The relationship of the current span relative to the linked span: child, + # parent, or unspecified. + module Type + # The relationship of the two spans is unknown. + TYPE_UNSPECIFIED = 0 + + # The linked span is a child of the current span. + CHILD_LINKED_SPAN = 1 + + # The linked span is a parent of the current span. + PARENT_LINKED_SPAN = 2 + end + end + + # A collection of links, which are references from this span to a span + # in the same or different trace. + # @!attribute [rw] link + # @return [::Array<::Google::Cloud::Trace::V2::Span::Link>] + # A collection of links. + # @!attribute [rw] dropped_links_count + # @return [::Integer] + # The number of dropped links after the maximum size was enforced. If + # this value is 0, then no links were dropped. + class Links + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Type of span. Can be used to specify additional relationships between spans + # in addition to a parent/child relationship. + module SpanKind + # Unspecified. Do NOT use as default. + # Implementations MAY assume SpanKind.INTERNAL to be default. + SPAN_KIND_UNSPECIFIED = 0 + + # Indicates that the span is used internally. Default value. + INTERNAL = 1 + + # Indicates that the span covers server-side handling of an RPC or other + # remote network request. + SERVER = 2 + + # Indicates that the span covers the client-side wrapper around an RPC or + # other remote request. + CLIENT = 3 + + # Indicates that the span describes producer sending a message to a broker. + # Unlike client and server, there is no direct critical path latency + # relationship between producer and consumer spans (e.g. publishing a + # message to a pubsub service). + PRODUCER = 4 + + # Indicates that the span describes consumer receiving a message from a + # broker. Unlike client and server, there is no direct critical path + # latency relationship between producer and consumer spans (e.g. receiving + # a message from a pubsub service subscription). + CONSUMER = 5 + end + end + + # The allowed types for `[VALUE]` in a `[KEY]:[VALUE]` attribute. + # @!attribute [rw] string_value + # @return [::Google::Cloud::Trace::V2::TruncatableString] + # A string up to 256 bytes long. + # + # Note: The following fields are mutually exclusive: `string_value`, `int_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] int_value + # @return [::Integer] + # A 64-bit signed integer. + # + # Note: The following fields are mutually exclusive: `int_value`, `string_value`, `bool_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] + # A Boolean value represented by `true` or `false`. + # + # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `int_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class AttributeValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A call stack appearing in a trace. + # @!attribute [rw] stack_frames + # @return [::Google::Cloud::Trace::V2::StackTrace::StackFrames] + # Stack frames in this stack trace. A maximum of 128 frames are allowed. + # @!attribute [rw] stack_trace_hash_id + # @return [::Integer] + # The hash ID is used to conserve network bandwidth for duplicate + # stack traces within a single trace. + # + # Often multiple spans will have identical stack traces. + # The first occurrence of a stack trace should contain both the + # `stackFrame` content and a value in `stackTraceHashId`. + # + # Subsequent spans within the same request can refer + # to that stack trace by only setting `stackTraceHashId`. + class StackTrace + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents a single stack frame in a stack trace. + # @!attribute [rw] function_name + # @return [::Google::Cloud::Trace::V2::TruncatableString] + # The fully-qualified name that uniquely identifies the function or + # method that is active in this frame (up to 1024 bytes). + # @!attribute [rw] original_function_name + # @return [::Google::Cloud::Trace::V2::TruncatableString] + # An un-mangled function name, if `function_name` is mangled. + # To get information about name mangling, run + # [this search](https://www.google.com/search?q=cxx+name+mangling). + # The name can be fully-qualified (up to 1024 bytes). + # @!attribute [rw] file_name + # @return [::Google::Cloud::Trace::V2::TruncatableString] + # The name of the source file where the function call appears (up to 256 + # bytes). + # @!attribute [rw] line_number + # @return [::Integer] + # The line number in `file_name` where the function call appears. + # @!attribute [rw] column_number + # @return [::Integer] + # The column number where the function call appears, if available. + # This is important in JavaScript because of its anonymous functions. + # @!attribute [rw] load_module + # @return [::Google::Cloud::Trace::V2::Module] + # The binary module from where the code was loaded. + # @!attribute [rw] source_version + # @return [::Google::Cloud::Trace::V2::TruncatableString] + # The version of the deployed source code (up to 128 bytes). + class StackFrame + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A collection of stack frames, which can be truncated. + # @!attribute [rw] frame + # @return [::Array<::Google::Cloud::Trace::V2::StackTrace::StackFrame>] + # Stack frames in this call stack. + # @!attribute [rw] dropped_frames_count + # @return [::Integer] + # The number of stack frames that were dropped because there + # were too many stack frames. + # If this value is 0, then no stack frames were dropped. + class StackFrames + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Binary module. + # @!attribute [rw] module + # @return [::Google::Cloud::Trace::V2::TruncatableString] + # For example: main binary, kernel modules, and dynamic libraries + # such as libc.so, sharedlib.so (up to 256 bytes). + # @!attribute [rw] build_id + # @return [::Google::Cloud::Trace::V2::TruncatableString] + # A unique identifier for the module, usually a hash of its + # contents (up to 128 bytes). + class Module + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a string that might be shortened to a specified length. + # @!attribute [rw] value + # @return [::String] + # The shortened string. For example, if the original string is 500 + # bytes long and the limit of the string is 128 bytes, then + # `value` contains the first 128 bytes of the 500-byte string. + # + # Truncation always happens on a UTF8 character boundary. If there + # are multi-byte characters in the string, then the length of the + # shortened string might be less than the size limit. + # @!attribute [rw] truncated_byte_count + # @return [::Integer] + # The number of bytes removed from the original string. If this + # value is 0, then the string was not shortened. + class TruncatableString + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/devtools/cloudtrace/v2/tracing.rb b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/devtools/cloudtrace/v2/tracing.rb new file mode 100644 index 000000000000..cd7bfb705d2f --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/devtools/cloudtrace/v2/tracing.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Trace + module V2 + # The request message for the `BatchWriteSpans` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the project where the spans belong. The format is + # `projects/[PROJECT_ID]`. + # @!attribute [rw] spans + # @return [::Array<::Google::Cloud::Trace::V2::Span>] + # Required. A list of new spans. The span names must not match existing + # spans, otherwise the results are undefined. + class BatchWriteSpansRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-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-trace-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-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-trace-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-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-trace-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-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-trace-v2/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..9a7c0269fa42 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/protobuf/wrappers.rb @@ -0,0 +1,148 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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`. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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-trace-v2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-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-trace-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-trace-v2/snippets/Gemfile new file mode 100644 index 000000000000..d4b193b35cd6 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-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-trace-v2", path: "../" +else + gem "google-cloud-trace-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-trace-v2/snippets/snippet_metadata_google.devtools.cloudtrace.v2.json b/owl-bot-staging/google-cloud-trace-v2/snippets/snippet_metadata_google.devtools.cloudtrace.v2.json new file mode 100644 index 000000000000..3f9f5b451203 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/snippets/snippet_metadata_google.devtools.cloudtrace.v2.json @@ -0,0 +1,95 @@ +{ + "client_library": { + "name": "google-cloud-trace-v2", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.devtools.cloudtrace.v2", + "version": "v2" + } + ] + }, + "snippets": [ + { + "region_tag": "cloudtrace_v2_generated_TraceService_BatchWriteSpans_sync", + "title": "Snippet for the batch_write_spans call in the TraceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Trace::V2::TraceService::Client#batch_write_spans.", + "file": "trace_service/batch_write_spans.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_write_spans", + "full_name": "::Google::Cloud::Trace::V2::TraceService::Client#batch_write_spans", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Trace::V2::BatchWriteSpansRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "TraceService::Client", + "full_name": "::Google::Cloud::Trace::V2::TraceService::Client" + }, + "method": { + "short_name": "BatchWriteSpans", + "full_name": "google.devtools.cloudtrace.v2.TraceService.BatchWriteSpans", + "service": { + "short_name": "TraceService", + "full_name": "google.devtools.cloudtrace.v2.TraceService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudtrace_v2_generated_TraceService_CreateSpan_sync", + "title": "Snippet for the create_span call in the TraceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Trace::V2::TraceService::Client#create_span.", + "file": "trace_service/create_span.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_span", + "full_name": "::Google::Cloud::Trace::V2::TraceService::Client#create_span", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Trace::V2::Span", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Trace::V2::Span", + "client": { + "short_name": "TraceService::Client", + "full_name": "::Google::Cloud::Trace::V2::TraceService::Client" + }, + "method": { + "short_name": "CreateSpan", + "full_name": "google.devtools.cloudtrace.v2.TraceService.CreateSpan", + "service": { + "short_name": "TraceService", + "full_name": "google.devtools.cloudtrace.v2.TraceService" + } + } + }, + "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-trace-v2/snippets/trace_service/batch_write_spans.rb b/owl-bot-staging/google-cloud-trace-v2/snippets/trace_service/batch_write_spans.rb new file mode 100644 index 000000000000..e643549fe9fa --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/snippets/trace_service/batch_write_spans.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 cloudtrace_v2_generated_TraceService_BatchWriteSpans_sync] +require "google/cloud/trace/v2" + +## +# Snippet for the batch_write_spans call in the TraceService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Trace::V2::TraceService::Client#batch_write_spans. +# +def batch_write_spans + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Trace::V2::TraceService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Trace::V2::BatchWriteSpansRequest.new + + # Call the batch_write_spans method. + result = client.batch_write_spans request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END cloudtrace_v2_generated_TraceService_BatchWriteSpans_sync] diff --git a/owl-bot-staging/google-cloud-trace-v2/snippets/trace_service/create_span.rb b/owl-bot-staging/google-cloud-trace-v2/snippets/trace_service/create_span.rb new file mode 100644 index 000000000000..b5360303f20b --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/snippets/trace_service/create_span.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 cloudtrace_v2_generated_TraceService_CreateSpan_sync] +require "google/cloud/trace/v2" + +## +# Snippet for the create_span call in the TraceService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Trace::V2::TraceService::Client#create_span. +# +def create_span + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Trace::V2::TraceService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Trace::V2::Span.new + + # Call the create_span method. + result = client.create_span request + + # The returned object is of type Google::Cloud::Trace::V2::Span. + p result +end +# [END cloudtrace_v2_generated_TraceService_CreateSpan_sync] diff --git a/owl-bot-staging/google-cloud-trace-v2/test/google/cloud/trace/v2/trace_service_paths_test.rb b/owl-bot-staging/google-cloud-trace-v2/test/google/cloud/trace/v2/trace_service_paths_test.rb new file mode 100644 index 000000000000..603da3b3b484 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/test/google/cloud/trace/v2/trace_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/trace/v2/trace_service" + +class ::Google::Cloud::Trace::V2::TraceService::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_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::Trace::V2::TraceService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_span_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Trace::V2::TraceService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.span_path project: "value0", trace: "value1", span: "value2" + assert_equal "projects/value0/traces/value1/spans/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-trace-v2/test/google/cloud/trace/v2/trace_service_rest_test.rb b/owl-bot-staging/google-cloud-trace-v2/test/google/cloud/trace/v2/trace_service_rest_test.rb new file mode 100644 index 000000000000..8660e0c553e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/test/google/cloud/trace/v2/trace_service_rest_test.rb @@ -0,0 +1,221 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/devtools/cloudtrace/v2/tracing_pb" +require "google/cloud/trace/v2/trace_service/rest" + + +class ::Google::Cloud::Trace::V2::TraceService::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_batch_write_spans + # 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" + spans = [{}] + + batch_write_spans_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Trace::V2::TraceService::Rest::ServiceStub.stub :transcode_batch_write_spans_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_write_spans_client_stub do + # Create client + client = ::Google::Cloud::Trace::V2::TraceService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.batch_write_spans({ name: name, spans: spans }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.batch_write_spans name: name, spans: spans do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.batch_write_spans ::Google::Cloud::Trace::V2::BatchWriteSpansRequest.new(name: name, spans: spans) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.batch_write_spans({ name: name, spans: spans }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.batch_write_spans(::Google::Cloud::Trace::V2::BatchWriteSpansRequest.new(name: name, spans: spans), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_write_spans_client_stub.call_count + end + end + end + + def test_create_span + # Create test objects. + client_result = ::Google::Cloud::Trace::V2::Span.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + span_id = "hello world" + parent_span_id = "hello world" + display_name = {} + start_time = {} + end_time = {} + attributes = {} + stack_trace = {} + time_events = {} + links = {} + status = {} + same_process_as_parent_span = {} + child_span_count = {} + span_kind = :SPAN_KIND_UNSPECIFIED + + create_span_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Trace::V2::TraceService::Rest::ServiceStub.stub :transcode_create_span_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_span_client_stub do + # Create client + client = ::Google::Cloud::Trace::V2::TraceService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_span({ name: name, span_id: span_id, parent_span_id: parent_span_id, display_name: display_name, start_time: start_time, end_time: end_time, attributes: attributes, stack_trace: stack_trace, time_events: time_events, links: links, status: status, same_process_as_parent_span: same_process_as_parent_span, child_span_count: child_span_count, span_kind: span_kind }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_span name: name, span_id: span_id, parent_span_id: parent_span_id, display_name: display_name, start_time: start_time, end_time: end_time, attributes: attributes, stack_trace: stack_trace, time_events: time_events, links: links, status: status, same_process_as_parent_span: same_process_as_parent_span, child_span_count: child_span_count, span_kind: span_kind do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_span ::Google::Cloud::Trace::V2::Span.new(name: name, span_id: span_id, parent_span_id: parent_span_id, display_name: display_name, start_time: start_time, end_time: end_time, attributes: attributes, stack_trace: stack_trace, time_events: time_events, links: links, status: status, same_process_as_parent_span: same_process_as_parent_span, child_span_count: child_span_count, span_kind: span_kind) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_span({ name: name, span_id: span_id, parent_span_id: parent_span_id, display_name: display_name, start_time: start_time, end_time: end_time, attributes: attributes, stack_trace: stack_trace, time_events: time_events, links: links, status: status, same_process_as_parent_span: same_process_as_parent_span, child_span_count: child_span_count, span_kind: span_kind }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_span(::Google::Cloud::Trace::V2::Span.new(name: name, span_id: span_id, parent_span_id: parent_span_id, display_name: display_name, start_time: start_time, end_time: end_time, attributes: attributes, stack_trace: stack_trace, time_events: time_events, links: links, status: status, same_process_as_parent_span: same_process_as_parent_span, child_span_count: child_span_count, span_kind: span_kind), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_span_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::Trace::V2::TraceService::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::Trace::V2::TraceService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-trace-v2/test/google/cloud/trace/v2/trace_service_test.rb b/owl-bot-staging/google-cloud-trace-v2/test/google/cloud/trace/v2/trace_service_test.rb new file mode 100644 index 000000000000..3e5178e2ec6e --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/test/google/cloud/trace/v2/trace_service_test.rb @@ -0,0 +1,248 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/devtools/cloudtrace/v2/tracing_pb" +require "google/cloud/trace/v2/trace_service" + +class ::Google::Cloud::Trace::V2::TraceService::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_batch_write_spans + # 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" + spans = [{}] + + batch_write_spans_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_write_spans, name + assert_kind_of ::Google::Cloud::Trace::V2::BatchWriteSpansRequest, request + assert_equal "hello world", request["name"] + assert_kind_of ::Google::Cloud::Trace::V2::Span, request["spans"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_write_spans_client_stub do + # Create client + client = ::Google::Cloud::Trace::V2::TraceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_write_spans({ name: name, spans: spans }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.batch_write_spans name: name, spans: spans do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.batch_write_spans ::Google::Cloud::Trace::V2::BatchWriteSpansRequest.new(name: name, spans: spans) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.batch_write_spans({ name: name, spans: spans }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.batch_write_spans(::Google::Cloud::Trace::V2::BatchWriteSpansRequest.new(name: name, spans: spans), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_write_spans_client_stub.call_rpc_count + end + end + + def test_create_span + # Create GRPC objects. + grpc_response = ::Google::Cloud::Trace::V2::Span.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + span_id = "hello world" + parent_span_id = "hello world" + display_name = {} + start_time = {} + end_time = {} + attributes = {} + stack_trace = {} + time_events = {} + links = {} + status = {} + same_process_as_parent_span = {} + child_span_count = {} + span_kind = :SPAN_KIND_UNSPECIFIED + + create_span_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_span, name + assert_kind_of ::Google::Cloud::Trace::V2::Span, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["span_id"] + assert_equal "hello world", request["parent_span_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Trace::V2::TruncatableString), request["display_name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["start_time"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["end_time"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Trace::V2::Span::Attributes), request["attributes"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Trace::V2::StackTrace), request["stack_trace"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Trace::V2::Span::TimeEvents), request["time_events"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Trace::V2::Span::Links), request["links"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Rpc::Status), request["status"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::BoolValue), request["same_process_as_parent_span"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Int32Value), request["child_span_count"] + assert_equal :SPAN_KIND_UNSPECIFIED, request["span_kind"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_span_client_stub do + # Create client + client = ::Google::Cloud::Trace::V2::TraceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_span({ name: name, span_id: span_id, parent_span_id: parent_span_id, display_name: display_name, start_time: start_time, end_time: end_time, attributes: attributes, stack_trace: stack_trace, time_events: time_events, links: links, status: status, same_process_as_parent_span: same_process_as_parent_span, child_span_count: child_span_count, span_kind: span_kind }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_span name: name, span_id: span_id, parent_span_id: parent_span_id, display_name: display_name, start_time: start_time, end_time: end_time, attributes: attributes, stack_trace: stack_trace, time_events: time_events, links: links, status: status, same_process_as_parent_span: same_process_as_parent_span, child_span_count: child_span_count, span_kind: span_kind do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_span ::Google::Cloud::Trace::V2::Span.new(name: name, span_id: span_id, parent_span_id: parent_span_id, display_name: display_name, start_time: start_time, end_time: end_time, attributes: attributes, stack_trace: stack_trace, time_events: time_events, links: links, status: status, same_process_as_parent_span: same_process_as_parent_span, child_span_count: child_span_count, span_kind: span_kind) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_span({ name: name, span_id: span_id, parent_span_id: parent_span_id, display_name: display_name, start_time: start_time, end_time: end_time, attributes: attributes, stack_trace: stack_trace, time_events: time_events, links: links, status: status, same_process_as_parent_span: same_process_as_parent_span, child_span_count: child_span_count, span_kind: span_kind }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_span(::Google::Cloud::Trace::V2::Span.new(name: name, span_id: span_id, parent_span_id: parent_span_id, display_name: display_name, start_time: start_time, end_time: end_time, attributes: attributes, stack_trace: stack_trace, time_events: time_events, links: links, status: status, same_process_as_parent_span: same_process_as_parent_span, child_span_count: child_span_count, span_kind: span_kind), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_span_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::Trace::V2::TraceService::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::Trace::V2::TraceService::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::Trace::V2::TraceService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Trace::V2::TraceService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-trace-v2/test/helper.rb b/owl-bot-staging/google-cloud-trace-v2/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-trace-v2/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-translate-v3/.gitignore b/owl-bot-staging/google-cloud-translate-v3/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/.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-translate-v3/.repo-metadata.json b/owl-bot-staging/google-cloud-translate-v3/.repo-metadata.json new file mode 100644 index 000000000000..550038f3aaea --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "translate.googleapis.com", + "api_shortname": "translate", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-translate-v3/latest", + "distribution_name": "google-cloud-translate-v3", + "is_cloud": true, + "language": "ruby", + "name": "translate", + "name_pretty": "Cloud Translation V3 API", + "product_documentation": "https://cloud.google.com/translate", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Cloud Translation can dynamically translate text between thousands of language pairs. Translation lets websites and programs programmatically integrate with the translation service. Note that google-cloud-translate-v3 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-translate instead. See the readme for more details.", + "ruby-cloud-env-prefix": "TRANSLATE", + "ruby-cloud-product-url": "https://cloud.google.com/translate", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-translate-v3/.rubocop.yml b/owl-bot-staging/google-cloud-translate-v3/.rubocop.yml new file mode 100644 index 000000000000..68b485677107 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-translate-v3.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-translate-v3.rb" diff --git a/owl-bot-staging/google-cloud-translate-v3/.toys.rb b/owl-bot-staging/google-cloud-translate-v3/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/.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-translate-v3/.yardopts b/owl-bot-staging/google-cloud-translate-v3/.yardopts new file mode 100644 index 000000000000..6a5acb03bbde --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Translation V3 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-translate-v3/AUTHENTICATION.md b/owl-bot-staging/google-cloud-translate-v3/AUTHENTICATION.md new file mode 100644 index 000000000000..f67deb161865 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-translate-v3 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-translate-v3 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/translate/v3" + +client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/translate/v3" + +::Google::Cloud::Translate::V3::TranslationService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Translate::V3::TranslationService::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-translate-v3 +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/translate/v3" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Translate::V3::TranslationService::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-translate-v3/CHANGELOG.md b/owl-bot-staging/google-cloud-translate-v3/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-translate-v3/Gemfile b/owl-bot-staging/google-cloud-translate-v3/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-translate-v3/LICENSE.md b/owl-bot-staging/google-cloud-translate-v3/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/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-translate-v3/README.md b/owl-bot-staging/google-cloud-translate-v3/README.md new file mode 100644 index 000000000000..99718bb0a50c --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Translation V3 API + +Integrates text translation into your website or application. + +Cloud Translation can dynamically translate text between thousands of language pairs. Translation lets websites and programs programmatically integrate with the translation service. + +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 Translation V3 API. Most users should consider using +the main client gem, +[google-cloud-translate](https://rubygems.org/gems/google-cloud-translate). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-translate-v3 +``` + +## 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/translate.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/translate/v3" + +client = ::Google::Cloud::Translate::V3::TranslationService::Client.new +request = ::Google::Cloud::Translate::V3::TranslateTextRequest.new # (request fields as keyword arguments...) +response = client.translate_text request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-translate-v3/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/translate) +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/translate/v3" +require "logger" + +client = ::Google::Cloud::Translate::V3::TranslationService::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-translate`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-translate-v3`. +_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-translate`. +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-translate-v3`. + +### 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-translate-v3/Rakefile b/owl-bot-staging/google-cloud-translate-v3/Rakefile new file mode 100644 index 000000000000..06aca81cc0ab --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/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-translate-v3 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["TRANSLATE_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["TRANSLATE_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["TRANSLATE_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 TRANSLATE_TEST_PROJECT=test123 TRANSLATE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/translate/v3/translation_service/credentials" + ::Google::Cloud::Translate::V3::TranslationService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["TRANSLATE_PROJECT"] = project + ENV["TRANSLATE_TEST_PROJECT"] = project + ENV["TRANSLATE_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-translate-v3 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-translate-v3 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-translate-v3 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-translate-v3 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-translate-v3" + header "google-cloud-translate-v3 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-translate-v3 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-translate-v3 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-translate-v3 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-translate-v3 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-translate-v3/gapic_metadata.json b/owl-bot-staging/google-cloud-translate-v3/gapic_metadata.json new file mode 100644 index 000000000000..e12339b2e4a4 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/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.translation.v3", + "libraryPackage": "::Google::Cloud::Translate::V3", + "services": { + "TranslationService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Translate::V3::TranslationService::Client", + "rpcs": { + "TranslateText": { + "methods": [ + "translate_text" + ] + }, + "RomanizeText": { + "methods": [ + "romanize_text" + ] + }, + "DetectLanguage": { + "methods": [ + "detect_language" + ] + }, + "GetSupportedLanguages": { + "methods": [ + "get_supported_languages" + ] + }, + "TranslateDocument": { + "methods": [ + "translate_document" + ] + }, + "BatchTranslateText": { + "methods": [ + "batch_translate_text" + ] + }, + "BatchTranslateDocument": { + "methods": [ + "batch_translate_document" + ] + }, + "CreateGlossary": { + "methods": [ + "create_glossary" + ] + }, + "UpdateGlossary": { + "methods": [ + "update_glossary" + ] + }, + "ListGlossaries": { + "methods": [ + "list_glossaries" + ] + }, + "GetGlossary": { + "methods": [ + "get_glossary" + ] + }, + "DeleteGlossary": { + "methods": [ + "delete_glossary" + ] + }, + "GetGlossaryEntry": { + "methods": [ + "get_glossary_entry" + ] + }, + "ListGlossaryEntries": { + "methods": [ + "list_glossary_entries" + ] + }, + "CreateGlossaryEntry": { + "methods": [ + "create_glossary_entry" + ] + }, + "UpdateGlossaryEntry": { + "methods": [ + "update_glossary_entry" + ] + }, + "DeleteGlossaryEntry": { + "methods": [ + "delete_glossary_entry" + ] + }, + "CreateDataset": { + "methods": [ + "create_dataset" + ] + }, + "GetDataset": { + "methods": [ + "get_dataset" + ] + }, + "ListDatasets": { + "methods": [ + "list_datasets" + ] + }, + "DeleteDataset": { + "methods": [ + "delete_dataset" + ] + }, + "CreateAdaptiveMtDataset": { + "methods": [ + "create_adaptive_mt_dataset" + ] + }, + "DeleteAdaptiveMtDataset": { + "methods": [ + "delete_adaptive_mt_dataset" + ] + }, + "GetAdaptiveMtDataset": { + "methods": [ + "get_adaptive_mt_dataset" + ] + }, + "ListAdaptiveMtDatasets": { + "methods": [ + "list_adaptive_mt_datasets" + ] + }, + "AdaptiveMtTranslate": { + "methods": [ + "adaptive_mt_translate" + ] + }, + "GetAdaptiveMtFile": { + "methods": [ + "get_adaptive_mt_file" + ] + }, + "DeleteAdaptiveMtFile": { + "methods": [ + "delete_adaptive_mt_file" + ] + }, + "ImportAdaptiveMtFile": { + "methods": [ + "import_adaptive_mt_file" + ] + }, + "ListAdaptiveMtFiles": { + "methods": [ + "list_adaptive_mt_files" + ] + }, + "ListAdaptiveMtSentences": { + "methods": [ + "list_adaptive_mt_sentences" + ] + }, + "ImportData": { + "methods": [ + "import_data" + ] + }, + "ExportData": { + "methods": [ + "export_data" + ] + }, + "ListExamples": { + "methods": [ + "list_examples" + ] + }, + "CreateModel": { + "methods": [ + "create_model" + ] + }, + "ListModels": { + "methods": [ + "list_models" + ] + }, + "GetModel": { + "methods": [ + "get_model" + ] + }, + "DeleteModel": { + "methods": [ + "delete_model" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-translate-v3/google-cloud-translate-v3.gemspec b/owl-bot-staging/google-cloud-translate-v3/google-cloud-translate-v3.gemspec new file mode 100644 index 000000000000..b3eb7135a809 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/google-cloud-translate-v3.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/translate/v3/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-translate-v3" + gem.version = Google::Cloud::Translate::V3::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Cloud Translation can dynamically translate text between thousands of language pairs. Translation lets websites and programs programmatically integrate with the translation service. Note that google-cloud-translate-v3 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-translate instead. See the readme for more details." + gem.summary = "Integrates text translation into your website or application." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "google-iam-v1", "~> 1.3" +end diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google-cloud-translate-v3.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google-cloud-translate-v3.rb new file mode 100644 index 000000000000..4feb19bf3cb3 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/lib/google-cloud-translate-v3.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/translate/v3" diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3.rb new file mode 100644 index 000000000000..9da4decef7f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3.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/translate/v3/translation_service" +require "google/cloud/translate/v3/version" + +module Google + module Cloud + module Translate + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/translate/v3" + # client = ::Google::Cloud::Translate::V3::TranslationService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/translate/v3" + # client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + module V3 + end + end + end +end + +helper_path = ::File.join __dir__, "v3", "_helpers.rb" +require "google/cloud/translate/v3/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/adaptive_mt_pb.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/adaptive_mt_pb.rb new file mode 100644 index 000000000000..0566c827303a --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/adaptive_mt_pb.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/translate/v3/adaptive_mt.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/translate/v3/common_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n+google/cloud/translate/v3/adaptive_mt.proto\x12\x1bgoogle.cloud.translation.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/translate/v3/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa1\x03\n\x11\x41\x64\x61ptiveMtDataset\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*translate.googleapis.com/AdaptiveMtDataset\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x1c\n\x14source_language_code\x18\x03 \x01(\t\x12\x1c\n\x14target_language_code\x18\x04 \x01(\t\x12\x15\n\rexample_count\x18\x05 \x01(\x05\x12\x34\n\x0b\x63reate_time\x18\t \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:u\xea\x41r\n*translate.googleapis.com/AdaptiveMtDataset\x12\x44projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}\"\xad\x01\n\x1e\x43reateAdaptiveMtDatasetRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12P\n\x13\x61\x64\x61ptive_mt_dataset\x18\x02 \x01(\x0b\x32..google.cloud.translation.v3.AdaptiveMtDatasetB\x03\xe0\x41\x02\"b\n\x1e\x44\x65leteAdaptiveMtDatasetRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*translate.googleapis.com/AdaptiveMtDataset\"_\n\x1bGetAdaptiveMtDatasetRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*translate.googleapis.com/AdaptiveMtDataset\"\xa0\x01\n\x1dListAdaptiveMtDatasetsRequest\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\"\x91\x01\n\x1eListAdaptiveMtDatasetsResponse\x12Q\n\x14\x61\x64\x61ptive_mt_datasets\x18\x01 \x03(\x0b\x32..google.cloud.translation.v3.AdaptiveMtDatasetB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x8b\x08\n\x1a\x41\x64\x61ptiveMtTranslateRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x43\n\x07\x64\x61taset\x18\x02 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*translate.googleapis.com/AdaptiveMtDataset\x12\x14\n\x07\x63ontent\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12w\n\x19reference_sentence_config\x18\x06 \x01(\x0b\x32O.google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfigH\x00\x88\x01\x01\x12i\n\x0fglossary_config\x18\x07 \x01(\x0b\x32\x46.google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfigB\x03\xe0\x41\x01H\x01\x88\x01\x01\x1aI\n\x15ReferenceSentencePair\x12\x17\n\x0fsource_sentence\x18\x01 \x01(\t\x12\x17\n\x0ftarget_sentence\x18\x02 \x01(\t\x1a\x8c\x01\n\x19ReferenceSentencePairList\x12o\n\x18reference_sentence_pairs\x18\x01 \x03(\x0b\x32M.google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePair\x1a\xcf\x01\n\x17ReferenceSentenceConfig\x12x\n\x1dreference_sentence_pair_lists\x18\x01 \x03(\x0b\x32Q.google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePairList\x12\x1c\n\x14source_language_code\x18\x02 \x01(\t\x12\x1c\n\x14target_language_code\x18\x03 \x01(\t\x1a\x94\x01\n\x0eGlossaryConfig\x12;\n\x08glossary\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary\x12\x18\n\x0bignore_case\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12+\n\x1e\x63ontextual_translation_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x42\x1c\n\x1a_reference_sentence_configB\x12\n\x10_glossary_config\"5\n\x15\x41\x64\x61ptiveMtTranslation\x12\x1c\n\x0ftranslated_text\x18\x01 \x01(\tB\x03\xe0\x41\x03\"\xdb\x01\n\x1b\x41\x64\x61ptiveMtTranslateResponse\x12M\n\x0ctranslations\x18\x01 \x03(\x0b\x32\x32.google.cloud.translation.v3.AdaptiveMtTranslationB\x03\xe0\x41\x03\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12Q\n\x15glossary_translations\x18\x04 \x03(\x0b\x32\x32.google.cloud.translation.v3.AdaptiveMtTranslation\"\x94\x03\n\x0e\x41\x64\x61ptiveMtFile\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'translate.googleapis.com/AdaptiveMtFile\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x65ntry_count\x18\x03 \x01(\x05\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:\xab\x01\xea\x41\xa7\x01\n\'translate.googleapis.com/AdaptiveMtFile\x12[projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}*\x0f\x61\x64\x61ptiveMtFiles2\x0e\x61\x64\x61ptiveMtFile\"Y\n\x18GetAdaptiveMtFileRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'translate.googleapis.com/AdaptiveMtFile\"\\\n\x1b\x44\x65leteAdaptiveMtFileRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'translate.googleapis.com/AdaptiveMtFile\"\xff\x01\n\x1bImportAdaptiveMtFileRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*translate.googleapis.com/AdaptiveMtDataset\x12I\n\x11\x66ile_input_source\x18\x02 \x01(\x0b\x32,.google.cloud.translation.v3.FileInputSourceH\x00\x12G\n\x10gcs_input_source\x18\x03 \x01(\x0b\x32+.google.cloud.translation.v3.GcsInputSourceH\x00\x42\x08\n\x06source\"j\n\x1cImportAdaptiveMtFileResponse\x12J\n\x10\x61\x64\x61ptive_mt_file\x18\x01 \x01(\x0b\x32+.google.cloud.translation.v3.AdaptiveMtFileB\x03\xe0\x41\x03\"\x91\x01\n\x1aListAdaptiveMtFilesRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*translate.googleapis.com/AdaptiveMtDataset\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x88\x01\n\x1bListAdaptiveMtFilesResponse\x12K\n\x11\x61\x64\x61ptive_mt_files\x18\x01 \x03(\x0b\x32+.google.cloud.translation.v3.AdaptiveMtFileB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xd8\x03\n\x12\x41\x64\x61ptiveMtSentence\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+translate.googleapis.com/AdaptiveMtSentence\x12\x1c\n\x0fsource_sentence\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0ftarget_sentence\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\xd6\x01\xea\x41\xd2\x01\n+translate.googleapis.com/AdaptiveMtSentence\x12zprojects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}/adaptiveMtSentences/{sentence}*\x13\x61\x64\x61ptiveMtSentences2\x12\x61\x64\x61ptiveMtSentence\"\x88\x01\n\x1eListAdaptiveMtSentencesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'translate.googleapis.com/AdaptiveMtFile\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x94\x01\n\x1fListAdaptiveMtSentencesResponse\x12S\n\x15\x61\x64\x61ptive_mt_sentences\x18\x01 \x03(\x0b\x32/.google.cloud.translation.v3.AdaptiveMtSentenceB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\xc6\x01\n\x1d\x63om.google.cloud.translate.v3B\x0f\x41\x64\x61ptiveMtProtoP\x01Z;cloud.google.com/go/translate/apiv3/translatepb;translatepb\xaa\x02\x19Google.Cloud.Translate.V3\xca\x02\x19Google\\Cloud\\Translate\\V3\xea\x02\x1cGoogle::Cloud::Translate::V3b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Translate + module V3 + AdaptiveMtDataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.AdaptiveMtDataset").msgclass + CreateAdaptiveMtDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.CreateAdaptiveMtDatasetRequest").msgclass + DeleteAdaptiveMtDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteAdaptiveMtDatasetRequest").msgclass + GetAdaptiveMtDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GetAdaptiveMtDatasetRequest").msgclass + ListAdaptiveMtDatasetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListAdaptiveMtDatasetsRequest").msgclass + ListAdaptiveMtDatasetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListAdaptiveMtDatasetsResponse").msgclass + AdaptiveMtTranslateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.AdaptiveMtTranslateRequest").msgclass + AdaptiveMtTranslateRequest::ReferenceSentencePair = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePair").msgclass + AdaptiveMtTranslateRequest::ReferenceSentencePairList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePairList").msgclass + AdaptiveMtTranslateRequest::ReferenceSentenceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig").msgclass + AdaptiveMtTranslateRequest::GlossaryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig").msgclass + AdaptiveMtTranslation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.AdaptiveMtTranslation").msgclass + AdaptiveMtTranslateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.AdaptiveMtTranslateResponse").msgclass + AdaptiveMtFile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.AdaptiveMtFile").msgclass + GetAdaptiveMtFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GetAdaptiveMtFileRequest").msgclass + DeleteAdaptiveMtFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteAdaptiveMtFileRequest").msgclass + ImportAdaptiveMtFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ImportAdaptiveMtFileRequest").msgclass + ImportAdaptiveMtFileResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ImportAdaptiveMtFileResponse").msgclass + ListAdaptiveMtFilesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListAdaptiveMtFilesRequest").msgclass + ListAdaptiveMtFilesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListAdaptiveMtFilesResponse").msgclass + AdaptiveMtSentence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.AdaptiveMtSentence").msgclass + ListAdaptiveMtSentencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListAdaptiveMtSentencesRequest").msgclass + ListAdaptiveMtSentencesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListAdaptiveMtSentencesResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/automl_translation_pb.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/automl_translation_pb.rb new file mode 100644 index 000000000000..a9711e27fbe7 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/automl_translation_pb.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/translate/v3/automl_translation.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/translate/v3/common_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n2google/cloud/translate/v3/automl_translation.proto\x12\x1bgoogle.cloud.translation.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/translate/v3/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"u\n\x11ImportDataRequest\x12\x14\n\x07\x64\x61taset\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12J\n\x0cinput_config\x18\x02 \x01(\x0b\x32/.google.cloud.translation.v3.DatasetInputConfigB\x03\xe0\x41\x02\"\xd2\x01\n\x12\x44\x61tasetInputConfig\x12N\n\x0binput_files\x18\x01 \x03(\x0b\x32\x39.google.cloud.translation.v3.DatasetInputConfig.InputFile\x1al\n\tInputFile\x12\x12\n\x05usage\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\ngcs_source\x18\x03 \x01(\x0b\x32+.google.cloud.translation.v3.GcsInputSourceH\x00\x42\x08\n\x06source\"\xd5\x01\n\x12ImportDataMetadata\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.translation.v3.OperationState\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"w\n\x11\x45xportDataRequest\x12\x14\n\x07\x64\x61taset\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12L\n\routput_config\x18\x02 \x01(\x0b\x32\x30.google.cloud.translation.v3.DatasetOutputConfigB\x03\xe0\x41\x02\"r\n\x13\x44\x61tasetOutputConfig\x12L\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32\x31.google.cloud.translation.v3.GcsOutputDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\xd5\x01\n\x12\x45xportDataMetadata\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.translation.v3.OperationState\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"N\n\x14\x44\x65leteDatasetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n translate.googleapis.com/Dataset\"\xd8\x01\n\x15\x44\x65leteDatasetMetadata\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.translation.v3.OperationState\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"K\n\x11GetDatasetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n translate.googleapis.com/Dataset\"\x81\x01\n\x13ListDatasetsRequest\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\"g\n\x14ListDatasetsResponse\x12\x36\n\x08\x64\x61tasets\x18\x01 \x03(\x0b\x32$.google.cloud.translation.v3.Dataset\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8d\x01\n\x14\x43reateDatasetRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12:\n\x07\x64\x61taset\x18\x02 \x01(\x0b\x32$.google.cloud.translation.v3.DatasetB\x03\xe0\x41\x02\"\xd8\x01\n\x15\x43reateDatasetMetadata\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.translation.v3.OperationState\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"\x95\x01\n\x13ListExamplesRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n translate.googleapis.com/Dataset\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"g\n\x14ListExamplesResponse\x12\x36\n\x08\x65xamples\x18\x01 \x03(\x0b\x32$.google.cloud.translation.v3.Example\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xd0\x01\n\x07\x45xample\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0bsource_text\x18\x02 \x01(\t\x12\x13\n\x0btarget_text\x18\x03 \x01(\t\x12\x12\n\x05usage\x18\x04 \x01(\tB\x03\xe0\x41\x03:t\xea\x41q\n translate.googleapis.com/Example\x12Mprojects/{project}/locations/{location}/datasets/{dataset}/examples/{example}\"\xe8\x01\n\x1e\x42\x61tchTransferResourcesResponse\x12g\n\tresponses\x18\x01 \x03(\x0b\x32T.google.cloud.translation.v3.BatchTransferResourcesResponse.TransferResourceResponse\x1a]\n\x18TransferResourceResponse\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x0e\n\x06target\x18\x02 \x01(\t\x12!\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\"\xbc\x03\n\x07\x44\x61taset\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x1c\n\x14source_language_code\x18\x03 \x01(\t\x12\x1c\n\x14target_language_code\x18\x04 \x01(\t\x12\x1a\n\rexample_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x12 \n\x13train_example_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x03\x12#\n\x16validate_example_count\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1f\n\x12test_example_count\x18\x08 \x01(\x05\x42\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\t \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:a\xea\x41^\n translate.googleapis.com/Dataset\x12:projects/{project}/locations/{location}/datasets/{dataset}\"\x87\x01\n\x12\x43reateModelRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x36\n\x05model\x18\x02 \x01(\x0b\x32\".google.cloud.translation.v3.ModelB\x03\xe0\x41\x02\"\xd6\x01\n\x13\x43reateModelMetadata\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.translation.v3.OperationState\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"\x94\x01\n\x11ListModelsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"a\n\x12ListModelsResponse\x12\x32\n\x06models\x18\x01 \x03(\x0b\x32\".google.cloud.translation.v3.Model\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"G\n\x0fGetModelRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1etranslate.googleapis.com/Model\"J\n\x12\x44\x65leteModelRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1etranslate.googleapis.com/Model\"\xd6\x01\n\x13\x44\x65leteModelMetadata\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.translation.v3.OperationState\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"\xb3\x03\n\x05Model\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0f\n\x07\x64\x61taset\x18\x03 \x01(\t\x12!\n\x14source_language_code\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12!\n\x14target_language_code\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12 \n\x13train_example_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x03\x12#\n\x16validate_example_count\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1f\n\x12test_example_count\x18\x0c \x01(\x05\x42\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x08 \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:[\xea\x41X\n\x1etranslate.googleapis.com/Model\x12\x36projects/{project}/locations/{location}/models/{model}B\xcd\x01\n\x1d\x63om.google.cloud.translate.v3B\x16\x41utoMLTranslationProtoP\x01Z;cloud.google.com/go/translate/apiv3/translatepb;translatepb\xaa\x02\x19Google.Cloud.Translate.V3\xca\x02\x19Google\\Cloud\\Translate\\V3\xea\x02\x1cGoogle::Cloud::Translate::V3b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Translate + module V3 + ImportDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ImportDataRequest").msgclass + DatasetInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DatasetInputConfig").msgclass + DatasetInputConfig::InputFile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DatasetInputConfig.InputFile").msgclass + ImportDataMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ImportDataMetadata").msgclass + ExportDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ExportDataRequest").msgclass + DatasetOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DatasetOutputConfig").msgclass + ExportDataMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ExportDataMetadata").msgclass + DeleteDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteDatasetRequest").msgclass + DeleteDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteDatasetMetadata").msgclass + GetDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GetDatasetRequest").msgclass + ListDatasetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListDatasetsRequest").msgclass + ListDatasetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListDatasetsResponse").msgclass + CreateDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.CreateDatasetRequest").msgclass + CreateDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.CreateDatasetMetadata").msgclass + ListExamplesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListExamplesRequest").msgclass + ListExamplesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListExamplesResponse").msgclass + Example = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.Example").msgclass + BatchTransferResourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTransferResourcesResponse").msgclass + BatchTransferResourcesResponse::TransferResourceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTransferResourcesResponse.TransferResourceResponse").msgclass + Dataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.Dataset").msgclass + CreateModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.CreateModelRequest").msgclass + CreateModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.CreateModelMetadata").msgclass + ListModelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListModelsRequest").msgclass + ListModelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListModelsResponse").msgclass + GetModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GetModelRequest").msgclass + DeleteModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteModelRequest").msgclass + DeleteModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteModelMetadata").msgclass + Model = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.Model").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/bindings_override.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/bindings_override.rb new file mode 100644 index 000000000000..780f191863aa --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/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 Translate + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/translate/v3/rest" + # client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + module V3 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Translate"] + 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: "/v3/{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: "/v3/{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-translate-v3/lib/google/cloud/translate/v3/common_pb.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/common_pb.rb new file mode 100644 index 000000000000..a0a6b10db393 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/common_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/translate/v3/common.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n&google/cloud/translate/v3/common.proto\x12\x1bgoogle.cloud.translation.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"(\n\x0eGcsInputSource\x12\x16\n\tinput_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\"Z\n\x0f\x46ileInputSource\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07\x63ontent\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\"6\n\x14GcsOutputDestination\x12\x1e\n\x11output_uri_prefix\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xf8\x04\n\rGlossaryEntry\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12R\n\nterms_pair\x18\x02 \x01(\x0b\x32<.google.cloud.translation.v3.GlossaryEntry.GlossaryTermsPairH\x00\x12P\n\tterms_set\x18\x03 \x01(\x0b\x32;.google.cloud.translation.v3.GlossaryEntry.GlossaryTermsSetH\x00\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x1a\x93\x01\n\x11GlossaryTermsPair\x12>\n\x0bsource_term\x18\x01 \x01(\x0b\x32).google.cloud.translation.v3.GlossaryTerm\x12>\n\x0btarget_term\x18\x02 \x01(\x0b\x32).google.cloud.translation.v3.GlossaryTerm\x1aL\n\x10GlossaryTermsSet\x12\x38\n\x05terms\x18\x01 \x03(\x0b\x32).google.cloud.translation.v3.GlossaryTerm:\xac\x01\xea\x41\xa8\x01\n&translate.googleapis.com/GlossaryEntry\x12^projects/{project}/locations/{location}/glossaries/{glossary}/glossaryEntries/{glossary_entry}*\x0fglossaryEntries2\rglossaryEntryB\x06\n\x04\x64\x61ta\"3\n\x0cGlossaryTerm\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x0c\n\x04text\x18\x02 \x01(\t*\xc8\x01\n\x0eOperationState\x12\x1f\n\x1bOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x1b\n\x17OPERATION_STATE_RUNNING\x10\x01\x12\x1d\n\x19OPERATION_STATE_SUCCEEDED\x10\x02\x12\x1a\n\x16OPERATION_STATE_FAILED\x10\x03\x12\x1e\n\x1aOPERATION_STATE_CANCELLING\x10\x04\x12\x1d\n\x19OPERATION_STATE_CANCELLED\x10\x05\x42\xc2\x01\n\x1d\x63om.google.cloud.translate.v3B\x0b\x43ommonProtoP\x01Z;cloud.google.com/go/translate/apiv3/translatepb;translatepb\xaa\x02\x19Google.Cloud.Translate.V3\xca\x02\x19Google\\Cloud\\Translate\\V3\xea\x02\x1cGoogle::Cloud::Translate::V3b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Translate + module V3 + GcsInputSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GcsInputSource").msgclass + FileInputSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.FileInputSource").msgclass + GcsOutputDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GcsOutputDestination").msgclass + GlossaryEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GlossaryEntry").msgclass + GlossaryEntry::GlossaryTermsPair = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GlossaryEntry.GlossaryTermsPair").msgclass + GlossaryEntry::GlossaryTermsSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GlossaryEntry.GlossaryTermsSet").msgclass + GlossaryTerm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GlossaryTerm").msgclass + OperationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.OperationState").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/rest.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/rest.rb new file mode 100644 index 000000000000..a65a2908a2bd --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/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/translate/v3/translation_service/rest" +require "google/cloud/translate/v3/bindings_override" +require "google/cloud/translate/v3/version" + +module Google + module Cloud + module Translate + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/translate/v3/rest" + # client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + module V3 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service.rb new file mode 100644 index 000000000000..95ca52623d45 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_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/translate/v3/version" + +require "google/cloud/translate/v3/translation_service/credentials" +require "google/cloud/translate/v3/translation_service/paths" +require "google/cloud/translate/v3/translation_service/operations" +require "google/cloud/translate/v3/translation_service/client" +require "google/cloud/translate/v3/translation_service/rest" + +module Google + module Cloud + module Translate + module V3 + ## + # Provides natural language translation operations. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/translate/v3/translation_service" + # client = ::Google::Cloud::Translate::V3::TranslationService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/translate/v3/translation_service/rest" + # client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + module TranslationService + end + end + end + end +end + +helper_path = ::File.join __dir__, "translation_service", "helpers.rb" +require "google/cloud/translate/v3/translation_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/client.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/client.rb new file mode 100644 index 000000000000..98ad81401303 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/client.rb @@ -0,0 +1,4614 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/translate/v3/translation_service_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module Translate + module V3 + module TranslationService + ## + # Client for the TranslationService service. + # + # Provides natural language translation operations. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "translate.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :translation_service_stub + + ## + # Configure the TranslationService Client class. + # + # See {::Google::Cloud::Translate::V3::TranslationService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TranslationService clients + # ::Google::Cloud::Translate::V3::TranslationService::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", "Translate", "V3"] + 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.translate_text.timeout = 600.0 + + default_config.rpcs.detect_language.timeout = 600.0 + + default_config.rpcs.get_supported_languages.timeout = 600.0 + default_config.rpcs.get_supported_languages.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.translate_document.timeout = 600.0 + + default_config.rpcs.batch_translate_text.timeout = 600.0 + + default_config.rpcs.batch_translate_document.timeout = 600.0 + + default_config.rpcs.create_glossary.timeout = 600.0 + + default_config.rpcs.list_glossaries.timeout = 600.0 + default_config.rpcs.list_glossaries.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_glossary.timeout = 600.0 + default_config.rpcs.get_glossary.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_glossary.timeout = 600.0 + default_config.rpcs.delete_glossary.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TranslationService 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::Translate::V3::TranslationService::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 + @translation_service_stub.universe_domain + end + + ## + # Create a new TranslationService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TranslationService 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/translate/v3/translation_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 + + @translation_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Translate::V3::TranslationService::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 + ) + + @translation_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 = @translation_service_stub.endpoint + config.universe_domain = @translation_service_stub.universe_domain + config.logger = @translation_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 = @translation_service_stub.endpoint + config.universe_domain = @translation_service_stub.universe_domain + config.logger = @translation_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Translate::V3::TranslationService::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 + @translation_service_stub.logger + end + + # Service calls + + ## + # Translates input text and returns translated text. + # + # @overload translate_text(request, options = nil) + # Pass arguments to `translate_text` via a request object, either of type + # {::Google::Cloud::Translate::V3::TranslateTextRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::TranslateTextRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload translate_text(contents: nil, mime_type: nil, source_language_code: nil, target_language_code: nil, parent: nil, model: nil, glossary_config: nil, transliteration_config: nil, labels: nil) + # Pass arguments to `translate_text` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param contents [::Array<::String>] + # Required. The content of the input in string format. + # We recommend the total content be less than 30,000 codepoints. The max + # length of this field is 1024. Use BatchTranslateText for larger text. + # @param mime_type [::String] + # Optional. The format of the source text, for example, "text/html", + # "text/plain". If left blank, the MIME type defaults to "text/html". + # @param source_language_code [::String] + # Optional. The ISO-639 language code of the input text if + # known, for example, "en-US" or "sr-Latn". Supported language codes are + # listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). If the source + # language isn't specified, the API attempts to identify the source language + # automatically and returns the source language within the response. + # @param target_language_code [::String] + # Required. The ISO-639 language code to use for translation of the input + # text, set to one of the language codes listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). + # @param parent [::String] + # Required. Project or location to make a call. Must refer to a caller's + # project. + # + # Format: `projects/{project-number-or-id}` or + # `projects/{project-number-or-id}/locations/{location-id}`. + # + # For global calls, use `projects/{project-number-or-id}/locations/global` or + # `projects/{project-number-or-id}`. + # + # Non-global location is required for requests using AutoML models or + # custom glossaries. + # + # Models and glossaries must be within the same region (have same + # location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + # @param model [::String] + # Optional. The `model` type requested for this translation. + # + # The format depends on model type: + # + # - AutoML Translation models: + # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + # + # - General (built-in) models: + # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + # + # - Translation LLM models: + # `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, + # + # For global (non-regionalized) requests, use `location-id` `global`. + # For example, + # `projects/{project-number-or-id}/locations/global/models/general/nmt`. + # + # If not provided, the default Google model (NMT) will be used + # @param glossary_config [::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig, ::Hash] + # Optional. Glossary to be applied. The glossary must be + # within the same region (have the same location-id) as the model, otherwise + # an INVALID_ARGUMENT (400) error is returned. + # @param transliteration_config [::Google::Cloud::Translate::V3::TransliterationConfig, ::Hash] + # Optional. Transliteration to be applied. + # @param labels [::Hash{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. + # + # See https://cloud.google.com/translate/docs/advanced/labels for more + # information. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Translate::V3::TranslateTextResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Translate::V3::TranslateTextResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::TranslateTextRequest.new + # + # # Call the translate_text method. + # result = client.translate_text request + # + # # The returned object is of type Google::Cloud::Translate::V3::TranslateTextResponse. + # p result + # + def translate_text request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::TranslateTextRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.translate_text.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.translate_text.timeout, + metadata: metadata, + retry_policy: @config.rpcs.translate_text.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :translate_text, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Romanize input text written in non-Latin scripts to Latin text. + # + # @overload romanize_text(request, options = nil) + # Pass arguments to `romanize_text` via a request object, either of type + # {::Google::Cloud::Translate::V3::RomanizeTextRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::RomanizeTextRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload romanize_text(parent: nil, contents: nil, source_language_code: nil) + # Pass arguments to `romanize_text` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project or location to make a call. Must refer to a caller's + # project. + # + # Format: `projects/{project-number-or-id}/locations/{location-id}` or + # `projects/{project-number-or-id}`. + # + # For global calls, use `projects/{project-number-or-id}/locations/global` or + # `projects/{project-number-or-id}`. + # @param contents [::Array<::String>] + # Required. The content of the input in string format. + # @param source_language_code [::String] + # Optional. The ISO-639 language code of the input text if + # known, for example, "hi" or "zh". Supported language codes are + # listed in [Language + # Support](https://cloud.google.com/translate/docs/languages#roman). If the + # source language isn't specified, the API attempts to identify the source + # language automatically and returns the source language for each content in + # the response. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Translate::V3::RomanizeTextResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Translate::V3::RomanizeTextResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::RomanizeTextRequest.new + # + # # Call the romanize_text method. + # result = client.romanize_text request + # + # # The returned object is of type Google::Cloud::Translate::V3::RomanizeTextResponse. + # p result + # + def romanize_text request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::RomanizeTextRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.romanize_text.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.romanize_text.timeout, + metadata: metadata, + retry_policy: @config.rpcs.romanize_text.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :romanize_text, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Detects the language of text within a request. + # + # @overload detect_language(request, options = nil) + # Pass arguments to `detect_language` via a request object, either of type + # {::Google::Cloud::Translate::V3::DetectLanguageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::DetectLanguageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload detect_language(parent: nil, model: nil, content: nil, mime_type: nil, labels: nil) + # Pass arguments to `detect_language` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project or location to make a call. Must refer to a caller's + # project. + # + # Format: `projects/{project-number-or-id}/locations/{location-id}` or + # `projects/{project-number-or-id}`. + # + # For global calls, use `projects/{project-number-or-id}/locations/global` or + # `projects/{project-number-or-id}`. + # + # Only models within the same region (has same location-id) can be used. + # Otherwise an INVALID_ARGUMENT (400) error is returned. + # @param model [::String] + # Optional. The language detection model to be used. + # + # Format: + # `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` + # + # Only one language detection model is currently supported: + # `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. + # + # If not specified, the default model is used. + # @param content [::String] + # The content of the input stored as a string. + # @param mime_type [::String] + # Optional. The format of the source text, for example, "text/html", + # "text/plain". If left blank, the MIME type defaults to "text/html". + # @param labels [::Hash{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. + # + # See https://cloud.google.com/translate/docs/advanced/labels for more + # information. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Translate::V3::DetectLanguageResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Translate::V3::DetectLanguageResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::DetectLanguageRequest.new + # + # # Call the detect_language method. + # result = client.detect_language request + # + # # The returned object is of type Google::Cloud::Translate::V3::DetectLanguageResponse. + # p result + # + def detect_language request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::DetectLanguageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.detect_language.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.detect_language.timeout, + metadata: metadata, + retry_policy: @config.rpcs.detect_language.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :detect_language, request, 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 supported languages for translation. + # + # @overload get_supported_languages(request, options = nil) + # Pass arguments to `get_supported_languages` via a request object, either of type + # {::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_supported_languages(parent: nil, display_language_code: nil, model: nil) + # Pass arguments to `get_supported_languages` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project or location to make a call. Must refer to a caller's + # project. + # + # Format: `projects/{project-number-or-id}` or + # `projects/{project-number-or-id}/locations/{location-id}`. + # + # For global calls, use `projects/{project-number-or-id}/locations/global` or + # `projects/{project-number-or-id}`. + # + # Non-global location is required for AutoML models. + # + # Only models within the same region (have same location-id) can be used, + # otherwise an INVALID_ARGUMENT (400) error is returned. + # @param display_language_code [::String] + # Optional. The language to use to return localized, human readable names + # of supported languages. If missing, then display names are not returned + # in a response. + # @param model [::String] + # Optional. Get supported languages of this model. + # + # The format depends on model type: + # + # - AutoML Translation models: + # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + # + # - General (built-in) models: + # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + # + # + # Returns languages supported by the specified model. + # If missing, we get supported languages of Google general NMT model. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Translate::V3::SupportedLanguages] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Translate::V3::SupportedLanguages] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::GetSupportedLanguagesRequest.new + # + # # Call the get_supported_languages method. + # result = client.get_supported_languages request + # + # # The returned object is of type Google::Cloud::Translate::V3::SupportedLanguages. + # p result + # + def get_supported_languages request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_supported_languages.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_supported_languages.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_supported_languages.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :get_supported_languages, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Translates documents in synchronous mode. + # + # @overload translate_document(request, options = nil) + # Pass arguments to `translate_document` via a request object, either of type + # {::Google::Cloud::Translate::V3::TranslateDocumentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::TranslateDocumentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload translate_document(parent: nil, source_language_code: nil, target_language_code: nil, document_input_config: nil, document_output_config: nil, model: nil, glossary_config: nil, labels: nil, customized_attribution: nil, is_translate_native_pdf_only: nil, enable_shadow_removal_native_pdf: nil, enable_rotation_correction: nil) + # Pass arguments to `translate_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. Location to make a regional call. + # + # Format: `projects/{project-number-or-id}/locations/{location-id}`. + # + # For global calls, use `projects/{project-number-or-id}/locations/global` or + # `projects/{project-number-or-id}`. + # + # Non-global location is required for requests using AutoML models or custom + # glossaries. + # + # Models and glossaries must be within the same region (have the same + # location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + # @param source_language_code [::String] + # Optional. The ISO-639 language code of the input document if known, for + # example, "en-US" or "sr-Latn". Supported language codes are listed in + # [Language Support](https://cloud.google.com/translate/docs/languages). If + # the source language isn't specified, the API attempts to identify the + # source language automatically and returns the source language within the + # response. Source language must be specified if the request contains a + # glossary or a custom model. + # @param target_language_code [::String] + # Required. The ISO-639 language code to use for translation of the input + # document, set to one of the language codes listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). + # @param document_input_config [::Google::Cloud::Translate::V3::DocumentInputConfig, ::Hash] + # Required. Input configurations. + # @param document_output_config [::Google::Cloud::Translate::V3::DocumentOutputConfig, ::Hash] + # Optional. Output configurations. + # Defines if the output file should be stored within Cloud Storage as well + # as the desired output format. If not provided the translated file will + # only be returned through a byte-stream and its output mime type will be + # the same as the input file's mime type. + # @param model [::String] + # Optional. The `model` type requested for this translation. + # + # The format depends on model type: + # + # - AutoML Translation models: + # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + # + # - General (built-in) models: + # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + # + # + # If not provided, the default Google model (NMT) will be used for + # translation. + # @param glossary_config [::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig, ::Hash] + # Optional. Glossary to be applied. The glossary must be within the same + # region (have the same location-id) as the model, otherwise an + # INVALID_ARGUMENT (400) error is returned. + # @param labels [::Hash{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. + # + # Label keys and values can be no longer than 63 characters (Unicode + # codepoints), can only contain lowercase letters, numeric characters, + # underscores and dashes. International characters are allowed. Label values + # are optional. Label keys must start with a letter. + # + # See https://cloud.google.com/translate/docs/advanced/labels for more + # information. + # @param customized_attribution [::String] + # Optional. This flag is to support user customized attribution. + # If not provided, the default is `Machine Translated by Google`. + # Customized attribution should follow rules in + # https://cloud.google.com/translate/attribution#attribution_and_logos + # @param is_translate_native_pdf_only [::Boolean] + # Optional. is_translate_native_pdf_only field for external customers. + # If true, the page limit of online native pdf translation is 300 and only + # native pdf pages will be translated. + # @param enable_shadow_removal_native_pdf [::Boolean] + # Optional. If true, use the text removal server to remove the shadow text on + # background image for native pdf translation. + # Shadow removal feature can only be enabled when + # is_translate_native_pdf_only: false && pdf_native_only: false + # @param enable_rotation_correction [::Boolean] + # Optional. If true, enable auto rotation correction in DVS. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Translate::V3::TranslateDocumentResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Translate::V3::TranslateDocumentResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::TranslateDocumentRequest.new + # + # # Call the translate_document method. + # result = client.translate_document request + # + # # The returned object is of type Google::Cloud::Translate::V3::TranslateDocumentResponse. + # p result + # + def translate_document request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::TranslateDocumentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.translate_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::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.translate_document.timeout, + metadata: metadata, + retry_policy: @config.rpcs.translate_document.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :translate_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 + + ## + # Translates a large volume of text in asynchronous batch mode. + # This function provides real-time output as the inputs are being processed. + # If caller cancels a request, the partial results (for an input file, it's + # all or nothing) may still be available on the specified output location. + # + # This call returns immediately and you can + # use google.longrunning.Operation.name to poll the status of the call. + # + # @overload batch_translate_text(request, options = nil) + # Pass arguments to `batch_translate_text` via a request object, either of type + # {::Google::Cloud::Translate::V3::BatchTranslateTextRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::BatchTranslateTextRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_translate_text(parent: nil, source_language_code: nil, target_language_codes: nil, models: nil, input_configs: nil, output_config: nil, glossaries: nil, labels: nil) + # Pass arguments to `batch_translate_text` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Location to make a call. Must refer to a caller's project. + # + # Format: `projects/{project-number-or-id}/locations/{location-id}`. + # + # The `global` location is not supported for batch translation. + # + # Only AutoML Translation models or glossaries within the same region (have + # the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) + # error is returned. + # @param source_language_code [::String] + # Required. Source language code. Supported language codes are listed in + # [Language + # Support](https://cloud.google.com/translate/docs/languages). + # @param target_language_codes [::Array<::String>] + # Required. Specify up to 10 language codes here. Supported language codes + # are listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). + # @param models [::Hash{::String => ::String}] + # Optional. The models to use for translation. Map's key is target language + # code. Map's value is model name. Value can be a built-in general model, + # or an AutoML Translation model. + # + # The value format depends on model type: + # + # - AutoML Translation models: + # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + # + # - General (built-in) models: + # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + # + # + # If the map is empty or a specific model is + # not requested for a language pair, then default google model (nmt) is used. + # @param input_configs [::Array<::Google::Cloud::Translate::V3::InputConfig, ::Hash>] + # Required. Input configurations. + # The total number of files matched should be <= 100. + # The total content size should be <= 100M Unicode codepoints. + # The files must use UTF-8 encoding. + # @param output_config [::Google::Cloud::Translate::V3::OutputConfig, ::Hash] + # Required. Output configuration. + # If 2 input configs match to the same file (that is, same input path), + # we don't generate output for duplicate inputs. + # @param glossaries [::Hash{::String => ::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig, ::Hash}] + # Optional. Glossaries to be applied for translation. + # It's keyed by target language code. + # @param labels [::Hash{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. + # + # See https://cloud.google.com/translate/docs/advanced/labels for more + # information. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::BatchTranslateTextRequest.new + # + # # Call the batch_translate_text method. + # result = client.batch_translate_text request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def batch_translate_text request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::BatchTranslateTextRequest + + # Converts hash and nil to 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_translate_text.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_translate_text.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_translate_text.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :batch_translate_text, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Translates a large volume of document in asynchronous batch mode. + # This function provides real-time output as the inputs are being processed. + # If caller cancels a request, the partial results (for an input file, it's + # all or nothing) may still be available on the specified output location. + # + # This call returns immediately and you can use + # google.longrunning.Operation.name to poll the status of the call. + # + # @overload batch_translate_document(request, options = nil) + # Pass arguments to `batch_translate_document` via a request object, either of type + # {::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_translate_document(parent: nil, source_language_code: nil, target_language_codes: nil, input_configs: nil, output_config: nil, models: nil, glossaries: nil, format_conversions: nil, customized_attribution: nil, enable_shadow_removal_native_pdf: nil, enable_rotation_correction: nil) + # Pass arguments to `batch_translate_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. Location to make a regional call. + # + # Format: `projects/{project-number-or-id}/locations/{location-id}`. + # + # The `global` location is not supported for batch translation. + # + # Only AutoML Translation models or glossaries within the same region (have + # the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) + # error is returned. + # @param source_language_code [::String] + # Required. The ISO-639 language code of the input document if known, for + # example, "en-US" or "sr-Latn". Supported language codes are listed in + # [Language Support](https://cloud.google.com/translate/docs/languages). + # @param target_language_codes [::Array<::String>] + # Required. The ISO-639 language code to use for translation of the input + # document. Specify up to 10 language codes here. Supported language codes + # are listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). + # @param input_configs [::Array<::Google::Cloud::Translate::V3::BatchDocumentInputConfig, ::Hash>] + # Required. Input configurations. + # The total number of files matched should be <= 100. + # The total content size to translate should be <= 100M Unicode codepoints. + # The files must use UTF-8 encoding. + # @param output_config [::Google::Cloud::Translate::V3::BatchDocumentOutputConfig, ::Hash] + # Required. Output configuration. + # If 2 input configs match to the same file (that is, same input path), + # we don't generate output for duplicate inputs. + # @param models [::Hash{::String => ::String}] + # Optional. The models to use for translation. Map's key is target language + # code. Map's value is the model name. Value can be a built-in general model, + # or an AutoML Translation model. + # + # The value format depends on model type: + # + # - AutoML Translation models: + # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + # + # - General (built-in) models: + # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + # + # + # If the map is empty or a specific model is + # not requested for a language pair, then default google model (nmt) is used. + # @param glossaries [::Hash{::String => ::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig, ::Hash}] + # Optional. Glossaries to be applied. It's keyed by target language code. + # @param format_conversions [::Hash{::String => ::String}] + # Optional. The file format conversion map that is applied to all input + # files. The map key is the original mime_type. The map value is the target + # mime_type of translated documents. + # + # Supported file format conversion includes: + # - `application/pdf` to + # `application/vnd.openxmlformats-officedocument.wordprocessingml.document` + # + # If nothing specified, output files will be in the same format as the + # original file. + # @param customized_attribution [::String] + # Optional. This flag is to support user customized attribution. + # If not provided, the default is `Machine Translated by Google`. + # Customized attribution should follow rules in + # https://cloud.google.com/translate/attribution#attribution_and_logos + # @param enable_shadow_removal_native_pdf [::Boolean] + # Optional. If true, use the text removal server to remove the shadow text on + # background image for native pdf translation. + # Shadow removal feature can only be enabled when + # is_translate_native_pdf_only: false && pdf_native_only: false + # @param enable_rotation_correction [::Boolean] + # Optional. If true, enable auto rotation correction in DVS. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::BatchTranslateDocumentRequest.new + # + # # Call the batch_translate_document method. + # result = client.batch_translate_document request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def batch_translate_document request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest + + # Converts hash and nil to 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_translate_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::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_translate_document.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_translate_document.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :batch_translate_document, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 glossary and returns the long-running operation. Returns + # NOT_FOUND, if the project doesn't exist. + # + # @overload create_glossary(request, options = nil) + # Pass arguments to `create_glossary` via a request object, either of type + # {::Google::Cloud::Translate::V3::CreateGlossaryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::CreateGlossaryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_glossary(parent: nil, glossary: nil) + # Pass arguments to `create_glossary` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project name. + # @param glossary [::Google::Cloud::Translate::V3::Glossary, ::Hash] + # Required. The glossary 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/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::CreateGlossaryRequest.new + # + # # Call the create_glossary method. + # result = client.create_glossary request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_glossary request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::CreateGlossaryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_glossary.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_glossary.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_glossary.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :create_glossary, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a glossary. A LRO is used since the update can be async if the + # glossary's entry file is updated. + # + # @overload update_glossary(request, options = nil) + # Pass arguments to `update_glossary` via a request object, either of type + # {::Google::Cloud::Translate::V3::UpdateGlossaryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::UpdateGlossaryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_glossary(glossary: nil, update_mask: nil) + # Pass arguments to `update_glossary` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param glossary [::Google::Cloud::Translate::V3::Glossary, ::Hash] + # Required. The glossary entry to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. Currently only `display_name` and + # 'input_config' + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::UpdateGlossaryRequest.new + # + # # Call the update_glossary method. + # result = client.update_glossary request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_glossary request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::UpdateGlossaryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_glossary.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.glossary&.name + header_params["glossary.name"] = request.glossary.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_glossary.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_glossary.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :update_glossary, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't + # exist. + # + # @overload list_glossaries(request, options = nil) + # Pass arguments to `list_glossaries` via a request object, either of type + # {::Google::Cloud::Translate::V3::ListGlossariesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::ListGlossariesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_glossaries(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_glossaries` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the project from which to list all of the glossaries. + # @param page_size [::Integer] + # Optional. Requested page size. The server may return fewer glossaries than + # requested. If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # Typically, this is the value of [ListGlossariesResponse.next_page_token] + # returned from the previous call to `ListGlossaries` method. + # The first page is returned if `page_token`is empty or missing. + # @param filter [::String] + # Optional. Filter specifying constraints of a list operation. + # Specify the constraint by the format of "key=value", where key must be + # "src" or "tgt", and the value must be a valid language code. + # For multiple restrictions, concatenate them by "AND" (uppercase only), + # such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used + # here, which means using 'en-US' and 'en' can lead to different results, + # which depends on the language code you used when you create the glossary. + # For the unidirectional glossaries, the "src" and "tgt" add restrictions + # on the source and target language code separately. + # For the equivalent term set glossaries, the "src" and/or "tgt" add + # restrictions on the term set. + # For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional + # glossaries which exactly match the source language code as "en-US" and the + # target language code "zh-CN", but all equivalent term set glossaries which + # contain "en-US" and "zh-CN" in their language set will be picked. + # If missing, no filtering is performed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::Glossary>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::Glossary>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::ListGlossariesRequest.new + # + # # Call the list_glossaries method. + # result = client.list_glossaries request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Translate::V3::Glossary. + # p item + # end + # + def list_glossaries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ListGlossariesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_glossaries.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_glossaries.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_glossaries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :list_glossaries, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @translation_service_stub, :list_glossaries, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a glossary. Returns NOT_FOUND, if the glossary doesn't + # exist. + # + # @overload get_glossary(request, options = nil) + # Pass arguments to `get_glossary` via a request object, either of type + # {::Google::Cloud::Translate::V3::GetGlossaryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::GetGlossaryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_glossary(name: nil) + # Pass arguments to `get_glossary` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the glossary to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Translate::V3::Glossary] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Translate::V3::Glossary] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::GetGlossaryRequest.new + # + # # Call the get_glossary method. + # result = client.get_glossary request + # + # # The returned object is of type Google::Cloud::Translate::V3::Glossary. + # p result + # + def get_glossary request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::GetGlossaryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_glossary.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_glossary.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_glossary.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :get_glossary, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a glossary, or cancels glossary construction + # if the glossary isn't created yet. + # Returns NOT_FOUND, if the glossary doesn't exist. + # + # @overload delete_glossary(request, options = nil) + # Pass arguments to `delete_glossary` via a request object, either of type + # {::Google::Cloud::Translate::V3::DeleteGlossaryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::DeleteGlossaryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_glossary(name: nil) + # Pass arguments to `delete_glossary` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the glossary to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::DeleteGlossaryRequest.new + # + # # Call the delete_glossary method. + # result = client.delete_glossary request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_glossary request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::DeleteGlossaryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_glossary.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_glossary.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_glossary.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :delete_glossary, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a single glossary entry by the given id. + # + # @overload get_glossary_entry(request, options = nil) + # Pass arguments to `get_glossary_entry` via a request object, either of type + # {::Google::Cloud::Translate::V3::GetGlossaryEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::GetGlossaryEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_glossary_entry(name: nil) + # Pass arguments to `get_glossary_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the glossary entry to get + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Translate::V3::GlossaryEntry] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Translate::V3::GlossaryEntry] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::GetGlossaryEntryRequest.new + # + # # Call the get_glossary_entry method. + # result = client.get_glossary_entry request + # + # # The returned object is of type Google::Cloud::Translate::V3::GlossaryEntry. + # p result + # + def get_glossary_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::GetGlossaryEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_glossary_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::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_glossary_entry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_glossary_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :get_glossary_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 + + ## + # List the entries for the glossary. + # + # @overload list_glossary_entries(request, options = nil) + # Pass arguments to `list_glossary_entries` via a request object, either of type + # {::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_glossary_entries(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_glossary_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 parent glossary resource name for listing the glossary's + # entries. + # @param page_size [::Integer] + # Optional. Requested page size. The server may return fewer glossary entries + # than requested. If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # Typically, this is the value of + # [ListGlossaryEntriesResponse.next_page_token] returned from the previous + # call. The first page is returned if `page_token`is empty or missing. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::GlossaryEntry>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::GlossaryEntry>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::ListGlossaryEntriesRequest.new + # + # # Call the list_glossary_entries method. + # result = client.list_glossary_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::Translate::V3::GlossaryEntry. + # p item + # end + # + def list_glossary_entries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_glossary_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::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_glossary_entries.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_glossary_entries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :list_glossary_entries, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @translation_service_stub, :list_glossary_entries, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a glossary entry. + # + # @overload create_glossary_entry(request, options = nil) + # Pass arguments to `create_glossary_entry` via a request object, either of type + # {::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_glossary_entry(parent: nil, glossary_entry: nil) + # Pass arguments to `create_glossary_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the glossary to create the entry under. + # @param glossary_entry [::Google::Cloud::Translate::V3::GlossaryEntry, ::Hash] + # Required. The glossary entry to create + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Translate::V3::GlossaryEntry] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Translate::V3::GlossaryEntry] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::CreateGlossaryEntryRequest.new + # + # # Call the create_glossary_entry method. + # result = client.create_glossary_entry request + # + # # The returned object is of type Google::Cloud::Translate::V3::GlossaryEntry. + # p result + # + def create_glossary_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_glossary_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::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_glossary_entry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_glossary_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :create_glossary_entry, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a glossary entry. + # + # @overload update_glossary_entry(request, options = nil) + # Pass arguments to `update_glossary_entry` via a request object, either of type + # {::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_glossary_entry(glossary_entry: nil) + # Pass arguments to `update_glossary_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 glossary_entry [::Google::Cloud::Translate::V3::GlossaryEntry, ::Hash] + # Required. The glossary entry to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Translate::V3::GlossaryEntry] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Translate::V3::GlossaryEntry] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest.new + # + # # Call the update_glossary_entry method. + # result = client.update_glossary_entry request + # + # # The returned object is of type Google::Cloud::Translate::V3::GlossaryEntry. + # p result + # + def update_glossary_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_glossary_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::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.glossary_entry&.name + header_params["glossary_entry.name"] = request.glossary_entry.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_glossary_entry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_glossary_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :update_glossary_entry, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single entry from the glossary + # + # @overload delete_glossary_entry(request, options = nil) + # Pass arguments to `delete_glossary_entry` via a request object, either of type + # {::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_glossary_entry(name: nil) + # Pass arguments to `delete_glossary_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the glossary entry to delete + # + # @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/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest.new + # + # # Call the delete_glossary_entry method. + # result = client.delete_glossary_entry request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_glossary_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_glossary_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::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_glossary_entry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_glossary_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :delete_glossary_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 + + ## + # Creates a Dataset. + # + # @overload create_dataset(request, options = nil) + # Pass arguments to `create_dataset` via a request object, either of type + # {::Google::Cloud::Translate::V3::CreateDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::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: 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 project name. + # @param dataset [::Google::Cloud::Translate::V3::Dataset, ::Hash] + # Required. The Dataset 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/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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 + + @translation_service_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 + + ## + # Gets a Dataset. + # + # @overload get_dataset(request, options = nil) + # Pass arguments to `get_dataset` via a request object, either of type + # {::Google::Cloud::Translate::V3::GetDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::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 to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Translate::V3::Dataset] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Translate::V3::Dataset] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::GetDatasetRequest.new + # + # # Call the get_dataset method. + # result = client.get_dataset request + # + # # The returned object is of type Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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 + + @translation_service_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 + + ## + # Lists datasets. + # + # @overload list_datasets(request, options = nil) + # Pass arguments to `list_datasets` via a request object, either of type + # {::Google::Cloud::Translate::V3::ListDatasetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::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) + # 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. Name of the parent project. In form of + # `projects/{project-number-or-id}/locations/{location-id}` + # @param page_size [::Integer] + # Optional. Requested page size. The server can return fewer results than + # requested. + # @param page_token [::String] + # Optional. A token identifying a page of results for the server to return. + # Typically obtained from next_page_token field in the response of a + # ListDatasets call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::Dataset>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::Dataset>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_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 + + @translation_service_stub.call_rpc :list_datasets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @translation_service_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 + + ## + # Deletes a dataset and all of its contents. + # + # @overload delete_dataset(request, options = nil) + # Pass arguments to `delete_dataset` via a request object, either of type + # {::Google::Cloud::Translate::V3::DeleteDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::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) + # 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 name of the dataset 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/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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 + + @translation_service_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 + + ## + # Creates an Adaptive MT dataset. + # + # @overload create_adaptive_mt_dataset(request, options = nil) + # Pass arguments to `create_adaptive_mt_dataset` via a request object, either of type + # {::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_adaptive_mt_dataset(parent: nil, adaptive_mt_dataset: nil) + # Pass arguments to `create_adaptive_mt_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. Name of the parent project. In form of + # `projects/{project-number-or-id}/locations/{location-id}` + # @param adaptive_mt_dataset [::Google::Cloud::Translate::V3::AdaptiveMtDataset, ::Hash] + # Required. The AdaptiveMtDataset to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Translate::V3::AdaptiveMtDataset] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Translate::V3::AdaptiveMtDataset] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest.new + # + # # Call the create_adaptive_mt_dataset method. + # result = client.create_adaptive_mt_dataset request + # + # # The returned object is of type Google::Cloud::Translate::V3::AdaptiveMtDataset. + # p result + # + def create_adaptive_mt_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest + + # Converts hash and nil to 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_adaptive_mt_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::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_adaptive_mt_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_adaptive_mt_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :create_adaptive_mt_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 + + ## + # Deletes an Adaptive MT dataset, including all its entries and associated + # metadata. + # + # @overload delete_adaptive_mt_dataset(request, options = nil) + # Pass arguments to `delete_adaptive_mt_dataset` via a request object, either of type + # {::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_adaptive_mt_dataset(name: nil) + # Pass arguments to `delete_adaptive_mt_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. Name of the dataset. In the form of + # `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-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/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest.new + # + # # Call the delete_adaptive_mt_dataset method. + # result = client.delete_adaptive_mt_dataset request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_adaptive_mt_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest + + # Converts hash and nil to 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_adaptive_mt_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::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_adaptive_mt_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_adaptive_mt_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :delete_adaptive_mt_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 + + ## + # Gets the Adaptive MT dataset. + # + # @overload get_adaptive_mt_dataset(request, options = nil) + # Pass arguments to `get_adaptive_mt_dataset` via a request object, either of type + # {::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_adaptive_mt_dataset(name: nil) + # Pass arguments to `get_adaptive_mt_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. Name of the dataset. In the form of + # `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Translate::V3::AdaptiveMtDataset] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Translate::V3::AdaptiveMtDataset] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest.new + # + # # Call the get_adaptive_mt_dataset method. + # result = client.get_adaptive_mt_dataset request + # + # # The returned object is of type Google::Cloud::Translate::V3::AdaptiveMtDataset. + # p result + # + def get_adaptive_mt_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_adaptive_mt_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::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_adaptive_mt_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_adaptive_mt_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :get_adaptive_mt_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 + + ## + # Lists all Adaptive MT datasets for which the caller has read permission. + # + # @overload list_adaptive_mt_datasets(request, options = nil) + # Pass arguments to `list_adaptive_mt_datasets` via a request object, either of type + # {::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_adaptive_mt_datasets(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_adaptive_mt_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 resource name of the project from which to list the Adaptive + # MT datasets. `projects/{project-number-or-id}/locations/{location-id}` + # @param page_size [::Integer] + # Optional. Requested page size. The server may return fewer results than + # requested. If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # Typically, this is the value of + # ListAdaptiveMtDatasetsResponse.next_page_token returned from the + # previous call to `ListAdaptiveMtDatasets` method. The first page is + # returned if `page_token`is empty or missing. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. + # Filter is not supported yet. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::AdaptiveMtDataset>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::AdaptiveMtDataset>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest.new + # + # # Call the list_adaptive_mt_datasets method. + # result = client.list_adaptive_mt_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::Translate::V3::AdaptiveMtDataset. + # p item + # end + # + def list_adaptive_mt_datasets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_adaptive_mt_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::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_adaptive_mt_datasets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_adaptive_mt_datasets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :list_adaptive_mt_datasets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @translation_service_stub, :list_adaptive_mt_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 + + ## + # Translate text using Adaptive MT. + # + # @overload adaptive_mt_translate(request, options = nil) + # Pass arguments to `adaptive_mt_translate` via a request object, either of type + # {::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload adaptive_mt_translate(parent: nil, dataset: nil, content: nil, reference_sentence_config: nil, glossary_config: nil) + # Pass arguments to `adaptive_mt_translate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Location to make a regional call. + # + # Format: `projects/{project-number-or-id}/locations/{location-id}`. + # @param dataset [::String] + # Required. The resource name for the dataset to use for adaptive MT. + # `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}` + # @param content [::Array<::String>] + # Required. The content of the input in string format. + # @param reference_sentence_config [::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::ReferenceSentenceConfig, ::Hash] + # Configuration for caller provided reference sentences. + # @param glossary_config [::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::GlossaryConfig, ::Hash] + # Optional. Glossary to be applied. The glossary must be + # within the same region (have the same location-id) as the model, otherwise + # an INVALID_ARGUMENT (400) error is returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest.new + # + # # Call the adaptive_mt_translate method. + # result = client.adaptive_mt_translate request + # + # # The returned object is of type Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse. + # p result + # + def adaptive_mt_translate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.adaptive_mt_translate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.adaptive_mt_translate.timeout, + metadata: metadata, + retry_policy: @config.rpcs.adaptive_mt_translate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :adaptive_mt_translate, request, 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 and AdaptiveMtFile + # + # @overload get_adaptive_mt_file(request, options = nil) + # Pass arguments to `get_adaptive_mt_file` via a request object, either of type + # {::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_adaptive_mt_file(name: nil) + # Pass arguments to `get_adaptive_mt_file` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the file, in form of + # `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Translate::V3::AdaptiveMtFile] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Translate::V3::AdaptiveMtFile] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest.new + # + # # Call the get_adaptive_mt_file method. + # result = client.get_adaptive_mt_file request + # + # # The returned object is of type Google::Cloud::Translate::V3::AdaptiveMtFile. + # p result + # + def get_adaptive_mt_file request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_adaptive_mt_file.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_adaptive_mt_file.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_adaptive_mt_file.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :get_adaptive_mt_file, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an AdaptiveMtFile along with its sentences. + # + # @overload delete_adaptive_mt_file(request, options = nil) + # Pass arguments to `delete_adaptive_mt_file` via a request object, either of type + # {::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_adaptive_mt_file(name: nil) + # Pass arguments to `delete_adaptive_mt_file` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the file to delete, in form of + # `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + # + # @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/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest.new + # + # # Call the delete_adaptive_mt_file method. + # result = client.delete_adaptive_mt_file request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_adaptive_mt_file request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest + + # Converts hash and nil to 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_adaptive_mt_file.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_adaptive_mt_file.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_adaptive_mt_file.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :delete_adaptive_mt_file, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports an AdaptiveMtFile and adds all of its sentences into the + # AdaptiveMtDataset. + # + # @overload import_adaptive_mt_file(request, options = nil) + # Pass arguments to `import_adaptive_mt_file` via a request object, either of type + # {::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_adaptive_mt_file(parent: nil, file_input_source: nil, gcs_input_source: nil) + # Pass arguments to `import_adaptive_mt_file` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the file, in form of + # `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}` + # @param file_input_source [::Google::Cloud::Translate::V3::FileInputSource, ::Hash] + # Inline file source. + # + # Note: The following parameters are mutually exclusive: `file_input_source`, `gcs_input_source`. 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 gcs_input_source [::Google::Cloud::Translate::V3::GcsInputSource, ::Hash] + # Google Cloud Storage file source. + # + # Note: The following parameters are mutually exclusive: `gcs_input_source`, `file_input_source`. 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::Translate::V3::ImportAdaptiveMtFileResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest.new + # + # # Call the import_adaptive_mt_file method. + # result = client.import_adaptive_mt_file request + # + # # The returned object is of type Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse. + # p result + # + def import_adaptive_mt_file request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest + + # Converts hash and nil to 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_adaptive_mt_file.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_adaptive_mt_file.timeout, + metadata: metadata, + retry_policy: @config.rpcs.import_adaptive_mt_file.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :import_adaptive_mt_file, request, 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 AdaptiveMtFiles associated to an AdaptiveMtDataset. + # + # @overload list_adaptive_mt_files(request, options = nil) + # Pass arguments to `list_adaptive_mt_files` via a request object, either of type + # {::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_adaptive_mt_files(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_adaptive_mt_files` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project from which to list the Adaptive + # MT files. + # `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` + # @param page_size [::Integer] + # Optional. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # Typically, this is the value of + # ListAdaptiveMtFilesResponse.next_page_token returned from the + # previous call to `ListAdaptiveMtFiles` method. The first page is + # returned if `page_token`is empty or missing. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::AdaptiveMtFile>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::AdaptiveMtFile>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest.new + # + # # Call the list_adaptive_mt_files method. + # result = client.list_adaptive_mt_files request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Translate::V3::AdaptiveMtFile. + # p item + # end + # + def list_adaptive_mt_files request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_adaptive_mt_files.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_adaptive_mt_files.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_adaptive_mt_files.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :list_adaptive_mt_files, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @translation_service_stub, :list_adaptive_mt_files, 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 + + ## + # Lists all AdaptiveMtSentences under a given file/dataset. + # + # @overload list_adaptive_mt_sentences(request, options = nil) + # Pass arguments to `list_adaptive_mt_sentences` via a request object, either of type + # {::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_adaptive_mt_sentences(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_adaptive_mt_sentences` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project from which to list the Adaptive + # MT files. The following format lists all sentences under a file. + # `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + # The following format lists all sentences within a dataset. + # `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` + # @param page_size [::Integer] + # @param page_token [::String] + # A token identifying a page of results the server should return. + # Typically, this is the value of + # ListAdaptiveMtSentencesRequest.next_page_token returned from the + # previous call to `ListTranslationMemories` method. The first page is + # returned if `page_token` is empty or missing. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::AdaptiveMtSentence>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::AdaptiveMtSentence>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest.new + # + # # Call the list_adaptive_mt_sentences method. + # result = client.list_adaptive_mt_sentences request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Translate::V3::AdaptiveMtSentence. + # p item + # end + # + def list_adaptive_mt_sentences request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_adaptive_mt_sentences.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_adaptive_mt_sentences.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_adaptive_mt_sentences.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :list_adaptive_mt_sentences, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @translation_service_stub, :list_adaptive_mt_sentences, 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 + + ## + # Import sentence pairs into translation Dataset. + # + # @overload import_data(request, options = nil) + # Pass arguments to `import_data` via a request object, either of type + # {::Google::Cloud::Translate::V3::ImportDataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::ImportDataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data(dataset: nil, input_config: nil) + # Pass arguments to `import_data` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param dataset [::String] + # Required. Name of the dataset. In form of + # `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` + # @param input_config [::Google::Cloud::Translate::V3::DatasetInputConfig, ::Hash] + # Required. The config for the input content. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::ImportDataRequest.new + # + # # Call the import_data method. + # result = client.import_data request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_data request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ImportDataRequest + + # Converts hash and nil to 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_data.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION + metadata[:"x-goog-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 + header_params["dataset"] = request.dataset + end + + request_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_data.timeout, + metadata: metadata, + retry_policy: @config.rpcs.import_data.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :import_data, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 dataset's data to the provided output location. + # + # @overload export_data(request, options = nil) + # Pass arguments to `export_data` via a request object, either of type + # {::Google::Cloud::Translate::V3::ExportDataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::ExportDataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data(dataset: nil, output_config: nil) + # Pass arguments to `export_data` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param dataset [::String] + # Required. Name of the dataset. In form of + # `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` + # @param output_config [::Google::Cloud::Translate::V3::DatasetOutputConfig, ::Hash] + # Required. The config for the output content. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::ExportDataRequest.new + # + # # Call the export_data method. + # result = client.export_data request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_data request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ExportDataRequest + + # Converts hash and nil to 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_data.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION + metadata[:"x-goog-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 + header_params["dataset"] = request.dataset + end + + request_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_data.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_data.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :export_data, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 sentence pairs in the dataset. + # + # @overload list_examples(request, options = nil) + # Pass arguments to `list_examples` via a request object, either of type + # {::Google::Cloud::Translate::V3::ListExamplesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::ListExamplesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_examples(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_examples` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the parent dataset. In form of + # `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` + # @param filter [::String] + # Optional. An expression for filtering the examples that will be returned. + # Example filter: + # * `usage=TRAIN` + # @param page_size [::Integer] + # Optional. Requested page size. The server can return fewer results than + # requested. + # @param page_token [::String] + # Optional. A token identifying a page of results for the server to return. + # Typically obtained from next_page_token field in the response of a + # ListExamples call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::Example>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::Example>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::ListExamplesRequest.new + # + # # Call the list_examples method. + # result = client.list_examples request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Translate::V3::Example. + # p item + # end + # + def list_examples request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ListExamplesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_examples.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_examples.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_examples.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.call_rpc :list_examples, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @translation_service_stub, :list_examples, 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 Model. + # + # @overload create_model(request, options = nil) + # Pass arguments to `create_model` via a request object, either of type + # {::Google::Cloud::Translate::V3::CreateModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::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: 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 project name, in form of + # `projects/{project}/locations/{location}` + # @param model [::Google::Cloud::Translate::V3::Model, ::Hash] + # Required. The Model 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/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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 + + @translation_service_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 + + ## + # Lists models. + # + # @overload list_models(request, options = nil) + # Pass arguments to `list_models` via a request object, either of type + # {::Google::Cloud::Translate::V3::ListModelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::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, filter: nil, page_size: nil, page_token: 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. Name of the parent project. In form of + # `projects/{project-number-or-id}/locations/{location-id}` + # @param filter [::String] + # Optional. An expression for filtering the models that will be returned. + # Supported filter: + # `dataset_id=${dataset_id}` + # @param page_size [::Integer] + # Optional. Requested page size. The server can return fewer results than + # requested. + # @param page_token [::String] + # Optional. A token identifying a page of results for the server to return. + # Typically obtained from next_page_token field in the response of a + # ListModels call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::Model>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::Model>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_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 + + @translation_service_stub.call_rpc :list_models, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @translation_service_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::Translate::V3::GetModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::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 to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Translate::V3::Model] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Translate::V3::Model] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::GetModelRequest.new + # + # # Call the get_model method. + # result = client.get_model request + # + # # The returned object is of type Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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 + + @translation_service_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 + + ## + # Deletes a model. + # + # @overload delete_model(request, options = nil) + # Pass arguments to `delete_model` via a request object, either of type + # {::Google::Cloud::Translate::V3::DeleteModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::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) + # 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 name of the model 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/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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 + + @translation_service_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 + + ## + # Configuration class for the TranslationService API. + # + # This class represents the configuration for TranslationService, + # 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::Translate::V3::TranslationService::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 + # # translate_text to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Translate::V3::TranslationService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.translate_text.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.translate_text.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::Translate::V3::TranslationService::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 = "translate.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 TranslationService 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 `translate_text` + # @return [::Gapic::Config::Method] + # + attr_reader :translate_text + ## + # RPC-specific configuration for `romanize_text` + # @return [::Gapic::Config::Method] + # + attr_reader :romanize_text + ## + # RPC-specific configuration for `detect_language` + # @return [::Gapic::Config::Method] + # + attr_reader :detect_language + ## + # RPC-specific configuration for `get_supported_languages` + # @return [::Gapic::Config::Method] + # + attr_reader :get_supported_languages + ## + # RPC-specific configuration for `translate_document` + # @return [::Gapic::Config::Method] + # + attr_reader :translate_document + ## + # RPC-specific configuration for `batch_translate_text` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_translate_text + ## + # RPC-specific configuration for `batch_translate_document` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_translate_document + ## + # RPC-specific configuration for `create_glossary` + # @return [::Gapic::Config::Method] + # + attr_reader :create_glossary + ## + # RPC-specific configuration for `update_glossary` + # @return [::Gapic::Config::Method] + # + attr_reader :update_glossary + ## + # RPC-specific configuration for `list_glossaries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_glossaries + ## + # RPC-specific configuration for `get_glossary` + # @return [::Gapic::Config::Method] + # + attr_reader :get_glossary + ## + # RPC-specific configuration for `delete_glossary` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_glossary + ## + # RPC-specific configuration for `get_glossary_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :get_glossary_entry + ## + # RPC-specific configuration for `list_glossary_entries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_glossary_entries + ## + # RPC-specific configuration for `create_glossary_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :create_glossary_entry + ## + # RPC-specific configuration for `update_glossary_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :update_glossary_entry + ## + # RPC-specific configuration for `delete_glossary_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_glossary_entry + ## + # RPC-specific configuration for `create_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_dataset + ## + # RPC-specific configuration for `get_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dataset + ## + # RPC-specific configuration for `list_datasets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_datasets + ## + # RPC-specific configuration for `delete_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_dataset + ## + # RPC-specific configuration for `create_adaptive_mt_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_adaptive_mt_dataset + ## + # RPC-specific configuration for `delete_adaptive_mt_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_adaptive_mt_dataset + ## + # RPC-specific configuration for `get_adaptive_mt_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_adaptive_mt_dataset + ## + # RPC-specific configuration for `list_adaptive_mt_datasets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_adaptive_mt_datasets + ## + # RPC-specific configuration for `adaptive_mt_translate` + # @return [::Gapic::Config::Method] + # + attr_reader :adaptive_mt_translate + ## + # RPC-specific configuration for `get_adaptive_mt_file` + # @return [::Gapic::Config::Method] + # + attr_reader :get_adaptive_mt_file + ## + # RPC-specific configuration for `delete_adaptive_mt_file` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_adaptive_mt_file + ## + # RPC-specific configuration for `import_adaptive_mt_file` + # @return [::Gapic::Config::Method] + # + attr_reader :import_adaptive_mt_file + ## + # RPC-specific configuration for `list_adaptive_mt_files` + # @return [::Gapic::Config::Method] + # + attr_reader :list_adaptive_mt_files + ## + # RPC-specific configuration for `list_adaptive_mt_sentences` + # @return [::Gapic::Config::Method] + # + attr_reader :list_adaptive_mt_sentences + ## + # RPC-specific configuration for `import_data` + # @return [::Gapic::Config::Method] + # + attr_reader :import_data + ## + # RPC-specific configuration for `export_data` + # @return [::Gapic::Config::Method] + # + attr_reader :export_data + ## + # RPC-specific configuration for `list_examples` + # @return [::Gapic::Config::Method] + # + attr_reader :list_examples + ## + # RPC-specific configuration for `create_model` + # @return [::Gapic::Config::Method] + # + attr_reader :create_model + ## + # 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 `delete_model` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_model + + # @private + def initialize parent_rpcs = nil + translate_text_config = parent_rpcs.translate_text if parent_rpcs.respond_to? :translate_text + @translate_text = ::Gapic::Config::Method.new translate_text_config + romanize_text_config = parent_rpcs.romanize_text if parent_rpcs.respond_to? :romanize_text + @romanize_text = ::Gapic::Config::Method.new romanize_text_config + detect_language_config = parent_rpcs.detect_language if parent_rpcs.respond_to? :detect_language + @detect_language = ::Gapic::Config::Method.new detect_language_config + get_supported_languages_config = parent_rpcs.get_supported_languages if parent_rpcs.respond_to? :get_supported_languages + @get_supported_languages = ::Gapic::Config::Method.new get_supported_languages_config + translate_document_config = parent_rpcs.translate_document if parent_rpcs.respond_to? :translate_document + @translate_document = ::Gapic::Config::Method.new translate_document_config + batch_translate_text_config = parent_rpcs.batch_translate_text if parent_rpcs.respond_to? :batch_translate_text + @batch_translate_text = ::Gapic::Config::Method.new batch_translate_text_config + batch_translate_document_config = parent_rpcs.batch_translate_document if parent_rpcs.respond_to? :batch_translate_document + @batch_translate_document = ::Gapic::Config::Method.new batch_translate_document_config + create_glossary_config = parent_rpcs.create_glossary if parent_rpcs.respond_to? :create_glossary + @create_glossary = ::Gapic::Config::Method.new create_glossary_config + update_glossary_config = parent_rpcs.update_glossary if parent_rpcs.respond_to? :update_glossary + @update_glossary = ::Gapic::Config::Method.new update_glossary_config + list_glossaries_config = parent_rpcs.list_glossaries if parent_rpcs.respond_to? :list_glossaries + @list_glossaries = ::Gapic::Config::Method.new list_glossaries_config + get_glossary_config = parent_rpcs.get_glossary if parent_rpcs.respond_to? :get_glossary + @get_glossary = ::Gapic::Config::Method.new get_glossary_config + delete_glossary_config = parent_rpcs.delete_glossary if parent_rpcs.respond_to? :delete_glossary + @delete_glossary = ::Gapic::Config::Method.new delete_glossary_config + get_glossary_entry_config = parent_rpcs.get_glossary_entry if parent_rpcs.respond_to? :get_glossary_entry + @get_glossary_entry = ::Gapic::Config::Method.new get_glossary_entry_config + list_glossary_entries_config = parent_rpcs.list_glossary_entries if parent_rpcs.respond_to? :list_glossary_entries + @list_glossary_entries = ::Gapic::Config::Method.new list_glossary_entries_config + create_glossary_entry_config = parent_rpcs.create_glossary_entry if parent_rpcs.respond_to? :create_glossary_entry + @create_glossary_entry = ::Gapic::Config::Method.new create_glossary_entry_config + update_glossary_entry_config = parent_rpcs.update_glossary_entry if parent_rpcs.respond_to? :update_glossary_entry + @update_glossary_entry = ::Gapic::Config::Method.new update_glossary_entry_config + delete_glossary_entry_config = parent_rpcs.delete_glossary_entry if parent_rpcs.respond_to? :delete_glossary_entry + @delete_glossary_entry = ::Gapic::Config::Method.new delete_glossary_entry_config + create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset + @create_dataset = ::Gapic::Config::Method.new create_dataset_config + get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset + @get_dataset = ::Gapic::Config::Method.new get_dataset_config + list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets + @list_datasets = ::Gapic::Config::Method.new list_datasets_config + delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset + @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config + create_adaptive_mt_dataset_config = parent_rpcs.create_adaptive_mt_dataset if parent_rpcs.respond_to? :create_adaptive_mt_dataset + @create_adaptive_mt_dataset = ::Gapic::Config::Method.new create_adaptive_mt_dataset_config + delete_adaptive_mt_dataset_config = parent_rpcs.delete_adaptive_mt_dataset if parent_rpcs.respond_to? :delete_adaptive_mt_dataset + @delete_adaptive_mt_dataset = ::Gapic::Config::Method.new delete_adaptive_mt_dataset_config + get_adaptive_mt_dataset_config = parent_rpcs.get_adaptive_mt_dataset if parent_rpcs.respond_to? :get_adaptive_mt_dataset + @get_adaptive_mt_dataset = ::Gapic::Config::Method.new get_adaptive_mt_dataset_config + list_adaptive_mt_datasets_config = parent_rpcs.list_adaptive_mt_datasets if parent_rpcs.respond_to? :list_adaptive_mt_datasets + @list_adaptive_mt_datasets = ::Gapic::Config::Method.new list_adaptive_mt_datasets_config + adaptive_mt_translate_config = parent_rpcs.adaptive_mt_translate if parent_rpcs.respond_to? :adaptive_mt_translate + @adaptive_mt_translate = ::Gapic::Config::Method.new adaptive_mt_translate_config + get_adaptive_mt_file_config = parent_rpcs.get_adaptive_mt_file if parent_rpcs.respond_to? :get_adaptive_mt_file + @get_adaptive_mt_file = ::Gapic::Config::Method.new get_adaptive_mt_file_config + delete_adaptive_mt_file_config = parent_rpcs.delete_adaptive_mt_file if parent_rpcs.respond_to? :delete_adaptive_mt_file + @delete_adaptive_mt_file = ::Gapic::Config::Method.new delete_adaptive_mt_file_config + import_adaptive_mt_file_config = parent_rpcs.import_adaptive_mt_file if parent_rpcs.respond_to? :import_adaptive_mt_file + @import_adaptive_mt_file = ::Gapic::Config::Method.new import_adaptive_mt_file_config + list_adaptive_mt_files_config = parent_rpcs.list_adaptive_mt_files if parent_rpcs.respond_to? :list_adaptive_mt_files + @list_adaptive_mt_files = ::Gapic::Config::Method.new list_adaptive_mt_files_config + list_adaptive_mt_sentences_config = parent_rpcs.list_adaptive_mt_sentences if parent_rpcs.respond_to? :list_adaptive_mt_sentences + @list_adaptive_mt_sentences = ::Gapic::Config::Method.new list_adaptive_mt_sentences_config + import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data + @import_data = ::Gapic::Config::Method.new import_data_config + export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data + @export_data = ::Gapic::Config::Method.new export_data_config + list_examples_config = parent_rpcs.list_examples if parent_rpcs.respond_to? :list_examples + @list_examples = ::Gapic::Config::Method.new list_examples_config + create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model + @create_model = ::Gapic::Config::Method.new create_model_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 + delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model + @delete_model = ::Gapic::Config::Method.new delete_model_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/credentials.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/credentials.rb new file mode 100644 index 000000000000..8cca11bc3a91 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/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 Translate + module V3 + module TranslationService + # Credentials for the TranslationService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" + ] + self.env_vars = [ + "TRANSLATE_CREDENTIALS", + "TRANSLATE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "TRANSLATE_CREDENTIALS_JSON", + "TRANSLATE_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-translate-v3/lib/google/cloud/translate/v3/translation_service/operations.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/operations.rb new file mode 100644 index 000000000000..6bd74364f287 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/operations.rb @@ -0,0 +1,849 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 Translate + module V3 + module TranslationService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "translate.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the TranslationService 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 TranslationService 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::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Translate::V3::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + 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 = "translate.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-translate-v3/lib/google/cloud/translate/v3/translation_service/paths.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/paths.rb new file mode 100644 index 000000000000..1f51c2c96070 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/paths.rb @@ -0,0 +1,168 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Translate + module V3 + module TranslationService + # Path helper methods for the TranslationService API. + module Paths + ## + # Create a fully-qualified AdaptiveMtDataset resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` + # + # @param project [String] + # @param location [String] + # @param dataset [String] + # + # @return [::String] + def adaptive_mt_dataset_path project:, location:, dataset: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/adaptiveMtDatasets/#{dataset}" + end + + ## + # Create a fully-qualified AdaptiveMtFile resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + # + # @param project [String] + # @param location [String] + # @param dataset [String] + # @param file [String] + # + # @return [::String] + def adaptive_mt_file_path project:, location:, dataset:, file: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" + + "projects/#{project}/locations/#{location}/adaptiveMtDatasets/#{dataset}/adaptiveMtFiles/#{file}" + end + + ## + # Create a fully-qualified Dataset resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/datasets/{dataset}` + # + # @param project [String] + # @param location [String] + # @param dataset [String] + # + # @return [::String] + def dataset_path project:, location:, dataset: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/datasets/#{dataset}" + end + + ## + # Create a fully-qualified Glossary resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/glossaries/{glossary}` + # + # @param project [String] + # @param location [String] + # @param glossary [String] + # + # @return [::String] + def glossary_path project:, location:, glossary: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/glossaries/#{glossary}" + end + + ## + # Create a fully-qualified GlossaryEntry resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/glossaries/{glossary}/glossaryEntries/{glossary_entry}` + # + # @param project [String] + # @param location [String] + # @param glossary [String] + # @param glossary_entry [String] + # + # @return [::String] + def glossary_entry_path project:, location:, glossary:, glossary_entry: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "glossary cannot contain /" if glossary.to_s.include? "/" + + "projects/#{project}/locations/#{location}/glossaries/#{glossary}/glossaryEntries/#{glossary_entry}" + 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}/locations/{location}/models/{model}` + # + # @param project [String] + # @param location [String] + # @param model [String] + # + # @return [::String] + def model_path project:, location:, model: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/models/#{model}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest.rb new file mode 100644 index 000000000000..7aa1906ff964 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_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/translate/v3/version" +require "google/cloud/translate/v3/bindings_override" + +require "google/cloud/translate/v3/translation_service/credentials" +require "google/cloud/translate/v3/translation_service/paths" +require "google/cloud/translate/v3/translation_service/rest/operations" +require "google/cloud/translate/v3/translation_service/rest/client" + +module Google + module Cloud + module Translate + module V3 + ## + # Provides natural language translation operations. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/translate/v3/translation_service/rest" + # client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + module TranslationService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/translate/v3/translation_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/client.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/client.rb new file mode 100644 index 000000000000..bd67b608db1b --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/client.rb @@ -0,0 +1,4313 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/translate/v3/translation_service_pb" +require "google/cloud/translate/v3/translation_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Translate + module V3 + module TranslationService + module Rest + ## + # REST client for the TranslationService service. + # + # Provides natural language translation operations. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "translate.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :translation_service_stub + + ## + # Configure the TranslationService Client class. + # + # See {::Google::Cloud::Translate::V3::TranslationService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TranslationService clients + # ::Google::Cloud::Translate::V3::TranslationService::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", "Translate", "V3"] + 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.translate_text.timeout = 600.0 + + default_config.rpcs.detect_language.timeout = 600.0 + + default_config.rpcs.get_supported_languages.timeout = 600.0 + default_config.rpcs.get_supported_languages.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.translate_document.timeout = 600.0 + + default_config.rpcs.batch_translate_text.timeout = 600.0 + + default_config.rpcs.batch_translate_document.timeout = 600.0 + + default_config.rpcs.create_glossary.timeout = 600.0 + + default_config.rpcs.list_glossaries.timeout = 600.0 + default_config.rpcs.list_glossaries.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_glossary.timeout = 600.0 + default_config.rpcs.get_glossary.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_glossary.timeout = 600.0 + default_config.rpcs.delete_glossary.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TranslationService 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::Translate::V3::TranslationService::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 + @translation_service_stub.universe_domain + end + + ## + # Create a new TranslationService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TranslationService 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::Translate::V3::TranslationService::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 + + @translation_service_stub = ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @translation_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 = @translation_service_stub.endpoint + config.universe_domain = @translation_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @translation_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 = @translation_service_stub.endpoint + config.universe_domain = @translation_service_stub.universe_domain + config.logger = @translation_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Translate::V3::TranslationService::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 + @translation_service_stub.logger + end + + # Service calls + + ## + # Translates input text and returns translated text. + # + # @overload translate_text(request, options = nil) + # Pass arguments to `translate_text` via a request object, either of type + # {::Google::Cloud::Translate::V3::TranslateTextRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::TranslateTextRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload translate_text(contents: nil, mime_type: nil, source_language_code: nil, target_language_code: nil, parent: nil, model: nil, glossary_config: nil, transliteration_config: nil, labels: nil) + # Pass arguments to `translate_text` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param contents [::Array<::String>] + # Required. The content of the input in string format. + # We recommend the total content be less than 30,000 codepoints. The max + # length of this field is 1024. Use BatchTranslateText for larger text. + # @param mime_type [::String] + # Optional. The format of the source text, for example, "text/html", + # "text/plain". If left blank, the MIME type defaults to "text/html". + # @param source_language_code [::String] + # Optional. The ISO-639 language code of the input text if + # known, for example, "en-US" or "sr-Latn". Supported language codes are + # listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). If the source + # language isn't specified, the API attempts to identify the source language + # automatically and returns the source language within the response. + # @param target_language_code [::String] + # Required. The ISO-639 language code to use for translation of the input + # text, set to one of the language codes listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). + # @param parent [::String] + # Required. Project or location to make a call. Must refer to a caller's + # project. + # + # Format: `projects/{project-number-or-id}` or + # `projects/{project-number-or-id}/locations/{location-id}`. + # + # For global calls, use `projects/{project-number-or-id}/locations/global` or + # `projects/{project-number-or-id}`. + # + # Non-global location is required for requests using AutoML models or + # custom glossaries. + # + # Models and glossaries must be within the same region (have same + # location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + # @param model [::String] + # Optional. The `model` type requested for this translation. + # + # The format depends on model type: + # + # - AutoML Translation models: + # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + # + # - General (built-in) models: + # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + # + # - Translation LLM models: + # `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, + # + # For global (non-regionalized) requests, use `location-id` `global`. + # For example, + # `projects/{project-number-or-id}/locations/global/models/general/nmt`. + # + # If not provided, the default Google model (NMT) will be used + # @param glossary_config [::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig, ::Hash] + # Optional. Glossary to be applied. The glossary must be + # within the same region (have the same location-id) as the model, otherwise + # an INVALID_ARGUMENT (400) error is returned. + # @param transliteration_config [::Google::Cloud::Translate::V3::TransliterationConfig, ::Hash] + # Optional. Transliteration to be applied. + # @param labels [::Hash{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. + # + # See https://cloud.google.com/translate/docs/advanced/labels for more + # information. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::TranslateTextResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::TranslateTextResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::TranslateTextRequest.new + # + # # Call the translate_text method. + # result = client.translate_text request + # + # # The returned object is of type Google::Cloud::Translate::V3::TranslateTextResponse. + # p result + # + def translate_text request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::TranslateTextRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.translate_text.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.translate_text.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.translate_text.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.translate_text request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Romanize input text written in non-Latin scripts to Latin text. + # + # @overload romanize_text(request, options = nil) + # Pass arguments to `romanize_text` via a request object, either of type + # {::Google::Cloud::Translate::V3::RomanizeTextRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::RomanizeTextRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload romanize_text(parent: nil, contents: nil, source_language_code: nil) + # Pass arguments to `romanize_text` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project or location to make a call. Must refer to a caller's + # project. + # + # Format: `projects/{project-number-or-id}/locations/{location-id}` or + # `projects/{project-number-or-id}`. + # + # For global calls, use `projects/{project-number-or-id}/locations/global` or + # `projects/{project-number-or-id}`. + # @param contents [::Array<::String>] + # Required. The content of the input in string format. + # @param source_language_code [::String] + # Optional. The ISO-639 language code of the input text if + # known, for example, "hi" or "zh". Supported language codes are + # listed in [Language + # Support](https://cloud.google.com/translate/docs/languages#roman). If the + # source language isn't specified, the API attempts to identify the source + # language automatically and returns the source language for each content in + # the response. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::RomanizeTextResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::RomanizeTextResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::RomanizeTextRequest.new + # + # # Call the romanize_text method. + # result = client.romanize_text request + # + # # The returned object is of type Google::Cloud::Translate::V3::RomanizeTextResponse. + # p result + # + def romanize_text request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::RomanizeTextRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.romanize_text.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.romanize_text.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.romanize_text.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.romanize_text request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Detects the language of text within a request. + # + # @overload detect_language(request, options = nil) + # Pass arguments to `detect_language` via a request object, either of type + # {::Google::Cloud::Translate::V3::DetectLanguageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::DetectLanguageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload detect_language(parent: nil, model: nil, content: nil, mime_type: nil, labels: nil) + # Pass arguments to `detect_language` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project or location to make a call. Must refer to a caller's + # project. + # + # Format: `projects/{project-number-or-id}/locations/{location-id}` or + # `projects/{project-number-or-id}`. + # + # For global calls, use `projects/{project-number-or-id}/locations/global` or + # `projects/{project-number-or-id}`. + # + # Only models within the same region (has same location-id) can be used. + # Otherwise an INVALID_ARGUMENT (400) error is returned. + # @param model [::String] + # Optional. The language detection model to be used. + # + # Format: + # `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` + # + # Only one language detection model is currently supported: + # `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. + # + # If not specified, the default model is used. + # @param content [::String] + # The content of the input stored as a string. + # @param mime_type [::String] + # Optional. The format of the source text, for example, "text/html", + # "text/plain". If left blank, the MIME type defaults to "text/html". + # @param labels [::Hash{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. + # + # See https://cloud.google.com/translate/docs/advanced/labels for more + # information. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::DetectLanguageResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::DetectLanguageResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::DetectLanguageRequest.new + # + # # Call the detect_language method. + # result = client.detect_language request + # + # # The returned object is of type Google::Cloud::Translate::V3::DetectLanguageResponse. + # p result + # + def detect_language request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::DetectLanguageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.detect_language.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.detect_language.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.detect_language.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.detect_language request, 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 supported languages for translation. + # + # @overload get_supported_languages(request, options = nil) + # Pass arguments to `get_supported_languages` via a request object, either of type + # {::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_supported_languages(parent: nil, display_language_code: nil, model: nil) + # Pass arguments to `get_supported_languages` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project or location to make a call. Must refer to a caller's + # project. + # + # Format: `projects/{project-number-or-id}` or + # `projects/{project-number-or-id}/locations/{location-id}`. + # + # For global calls, use `projects/{project-number-or-id}/locations/global` or + # `projects/{project-number-or-id}`. + # + # Non-global location is required for AutoML models. + # + # Only models within the same region (have same location-id) can be used, + # otherwise an INVALID_ARGUMENT (400) error is returned. + # @param display_language_code [::String] + # Optional. The language to use to return localized, human readable names + # of supported languages. If missing, then display names are not returned + # in a response. + # @param model [::String] + # Optional. Get supported languages of this model. + # + # The format depends on model type: + # + # - AutoML Translation models: + # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + # + # - General (built-in) models: + # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + # + # + # Returns languages supported by the specified model. + # If missing, we get supported languages of Google general NMT model. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::SupportedLanguages] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::SupportedLanguages] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::GetSupportedLanguagesRequest.new + # + # # Call the get_supported_languages method. + # result = client.get_supported_languages request + # + # # The returned object is of type Google::Cloud::Translate::V3::SupportedLanguages. + # p result + # + def get_supported_languages request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_supported_languages.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_supported_languages.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_supported_languages.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.get_supported_languages request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Translates documents in synchronous mode. + # + # @overload translate_document(request, options = nil) + # Pass arguments to `translate_document` via a request object, either of type + # {::Google::Cloud::Translate::V3::TranslateDocumentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::TranslateDocumentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload translate_document(parent: nil, source_language_code: nil, target_language_code: nil, document_input_config: nil, document_output_config: nil, model: nil, glossary_config: nil, labels: nil, customized_attribution: nil, is_translate_native_pdf_only: nil, enable_shadow_removal_native_pdf: nil, enable_rotation_correction: nil) + # Pass arguments to `translate_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. Location to make a regional call. + # + # Format: `projects/{project-number-or-id}/locations/{location-id}`. + # + # For global calls, use `projects/{project-number-or-id}/locations/global` or + # `projects/{project-number-or-id}`. + # + # Non-global location is required for requests using AutoML models or custom + # glossaries. + # + # Models and glossaries must be within the same region (have the same + # location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + # @param source_language_code [::String] + # Optional. The ISO-639 language code of the input document if known, for + # example, "en-US" or "sr-Latn". Supported language codes are listed in + # [Language Support](https://cloud.google.com/translate/docs/languages). If + # the source language isn't specified, the API attempts to identify the + # source language automatically and returns the source language within the + # response. Source language must be specified if the request contains a + # glossary or a custom model. + # @param target_language_code [::String] + # Required. The ISO-639 language code to use for translation of the input + # document, set to one of the language codes listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). + # @param document_input_config [::Google::Cloud::Translate::V3::DocumentInputConfig, ::Hash] + # Required. Input configurations. + # @param document_output_config [::Google::Cloud::Translate::V3::DocumentOutputConfig, ::Hash] + # Optional. Output configurations. + # Defines if the output file should be stored within Cloud Storage as well + # as the desired output format. If not provided the translated file will + # only be returned through a byte-stream and its output mime type will be + # the same as the input file's mime type. + # @param model [::String] + # Optional. The `model` type requested for this translation. + # + # The format depends on model type: + # + # - AutoML Translation models: + # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + # + # - General (built-in) models: + # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + # + # + # If not provided, the default Google model (NMT) will be used for + # translation. + # @param glossary_config [::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig, ::Hash] + # Optional. Glossary to be applied. The glossary must be within the same + # region (have the same location-id) as the model, otherwise an + # INVALID_ARGUMENT (400) error is returned. + # @param labels [::Hash{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. + # + # Label keys and values can be no longer than 63 characters (Unicode + # codepoints), can only contain lowercase letters, numeric characters, + # underscores and dashes. International characters are allowed. Label values + # are optional. Label keys must start with a letter. + # + # See https://cloud.google.com/translate/docs/advanced/labels for more + # information. + # @param customized_attribution [::String] + # Optional. This flag is to support user customized attribution. + # If not provided, the default is `Machine Translated by Google`. + # Customized attribution should follow rules in + # https://cloud.google.com/translate/attribution#attribution_and_logos + # @param is_translate_native_pdf_only [::Boolean] + # Optional. is_translate_native_pdf_only field for external customers. + # If true, the page limit of online native pdf translation is 300 and only + # native pdf pages will be translated. + # @param enable_shadow_removal_native_pdf [::Boolean] + # Optional. If true, use the text removal server to remove the shadow text on + # background image for native pdf translation. + # Shadow removal feature can only be enabled when + # is_translate_native_pdf_only: false && pdf_native_only: false + # @param enable_rotation_correction [::Boolean] + # Optional. If true, enable auto rotation correction in DVS. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::TranslateDocumentResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::TranslateDocumentResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::TranslateDocumentRequest.new + # + # # Call the translate_document method. + # result = client.translate_document request + # + # # The returned object is of type Google::Cloud::Translate::V3::TranslateDocumentResponse. + # p result + # + def translate_document request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::TranslateDocumentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.translate_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::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.translate_document.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.translate_document.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.translate_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 + + ## + # Translates a large volume of text in asynchronous batch mode. + # This function provides real-time output as the inputs are being processed. + # If caller cancels a request, the partial results (for an input file, it's + # all or nothing) may still be available on the specified output location. + # + # This call returns immediately and you can + # use google.longrunning.Operation.name to poll the status of the call. + # + # @overload batch_translate_text(request, options = nil) + # Pass arguments to `batch_translate_text` via a request object, either of type + # {::Google::Cloud::Translate::V3::BatchTranslateTextRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::BatchTranslateTextRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_translate_text(parent: nil, source_language_code: nil, target_language_codes: nil, models: nil, input_configs: nil, output_config: nil, glossaries: nil, labels: nil) + # Pass arguments to `batch_translate_text` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Location to make a call. Must refer to a caller's project. + # + # Format: `projects/{project-number-or-id}/locations/{location-id}`. + # + # The `global` location is not supported for batch translation. + # + # Only AutoML Translation models or glossaries within the same region (have + # the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) + # error is returned. + # @param source_language_code [::String] + # Required. Source language code. Supported language codes are listed in + # [Language + # Support](https://cloud.google.com/translate/docs/languages). + # @param target_language_codes [::Array<::String>] + # Required. Specify up to 10 language codes here. Supported language codes + # are listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). + # @param models [::Hash{::String => ::String}] + # Optional. The models to use for translation. Map's key is target language + # code. Map's value is model name. Value can be a built-in general model, + # or an AutoML Translation model. + # + # The value format depends on model type: + # + # - AutoML Translation models: + # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + # + # - General (built-in) models: + # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + # + # + # If the map is empty or a specific model is + # not requested for a language pair, then default google model (nmt) is used. + # @param input_configs [::Array<::Google::Cloud::Translate::V3::InputConfig, ::Hash>] + # Required. Input configurations. + # The total number of files matched should be <= 100. + # The total content size should be <= 100M Unicode codepoints. + # The files must use UTF-8 encoding. + # @param output_config [::Google::Cloud::Translate::V3::OutputConfig, ::Hash] + # Required. Output configuration. + # If 2 input configs match to the same file (that is, same input path), + # we don't generate output for duplicate inputs. + # @param glossaries [::Hash{::String => ::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig, ::Hash}] + # Optional. Glossaries to be applied for translation. + # It's keyed by target language code. + # @param labels [::Hash{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. + # + # See https://cloud.google.com/translate/docs/advanced/labels for more + # information. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::BatchTranslateTextRequest.new + # + # # Call the batch_translate_text method. + # result = client.batch_translate_text request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def batch_translate_text request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::BatchTranslateTextRequest + + # Converts hash and nil to an 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_translate_text.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_translate_text.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_translate_text.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.batch_translate_text request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Translates a large volume of document in asynchronous batch mode. + # This function provides real-time output as the inputs are being processed. + # If caller cancels a request, the partial results (for an input file, it's + # all or nothing) may still be available on the specified output location. + # + # This call returns immediately and you can use + # google.longrunning.Operation.name to poll the status of the call. + # + # @overload batch_translate_document(request, options = nil) + # Pass arguments to `batch_translate_document` via a request object, either of type + # {::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_translate_document(parent: nil, source_language_code: nil, target_language_codes: nil, input_configs: nil, output_config: nil, models: nil, glossaries: nil, format_conversions: nil, customized_attribution: nil, enable_shadow_removal_native_pdf: nil, enable_rotation_correction: nil) + # Pass arguments to `batch_translate_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. Location to make a regional call. + # + # Format: `projects/{project-number-or-id}/locations/{location-id}`. + # + # The `global` location is not supported for batch translation. + # + # Only AutoML Translation models or glossaries within the same region (have + # the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) + # error is returned. + # @param source_language_code [::String] + # Required. The ISO-639 language code of the input document if known, for + # example, "en-US" or "sr-Latn". Supported language codes are listed in + # [Language Support](https://cloud.google.com/translate/docs/languages). + # @param target_language_codes [::Array<::String>] + # Required. The ISO-639 language code to use for translation of the input + # document. Specify up to 10 language codes here. Supported language codes + # are listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). + # @param input_configs [::Array<::Google::Cloud::Translate::V3::BatchDocumentInputConfig, ::Hash>] + # Required. Input configurations. + # The total number of files matched should be <= 100. + # The total content size to translate should be <= 100M Unicode codepoints. + # The files must use UTF-8 encoding. + # @param output_config [::Google::Cloud::Translate::V3::BatchDocumentOutputConfig, ::Hash] + # Required. Output configuration. + # If 2 input configs match to the same file (that is, same input path), + # we don't generate output for duplicate inputs. + # @param models [::Hash{::String => ::String}] + # Optional. The models to use for translation. Map's key is target language + # code. Map's value is the model name. Value can be a built-in general model, + # or an AutoML Translation model. + # + # The value format depends on model type: + # + # - AutoML Translation models: + # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + # + # - General (built-in) models: + # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + # + # + # If the map is empty or a specific model is + # not requested for a language pair, then default google model (nmt) is used. + # @param glossaries [::Hash{::String => ::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig, ::Hash}] + # Optional. Glossaries to be applied. It's keyed by target language code. + # @param format_conversions [::Hash{::String => ::String}] + # Optional. The file format conversion map that is applied to all input + # files. The map key is the original mime_type. The map value is the target + # mime_type of translated documents. + # + # Supported file format conversion includes: + # - `application/pdf` to + # `application/vnd.openxmlformats-officedocument.wordprocessingml.document` + # + # If nothing specified, output files will be in the same format as the + # original file. + # @param customized_attribution [::String] + # Optional. This flag is to support user customized attribution. + # If not provided, the default is `Machine Translated by Google`. + # Customized attribution should follow rules in + # https://cloud.google.com/translate/attribution#attribution_and_logos + # @param enable_shadow_removal_native_pdf [::Boolean] + # Optional. If true, use the text removal server to remove the shadow text on + # background image for native pdf translation. + # Shadow removal feature can only be enabled when + # is_translate_native_pdf_only: false && pdf_native_only: false + # @param enable_rotation_correction [::Boolean] + # Optional. If true, enable auto rotation correction in DVS. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::BatchTranslateDocumentRequest.new + # + # # Call the batch_translate_document method. + # result = client.batch_translate_document request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def batch_translate_document request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest + + # Converts hash and nil to an 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_translate_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::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_translate_document.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_translate_document.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.batch_translate_document request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 glossary and returns the long-running operation. Returns + # NOT_FOUND, if the project doesn't exist. + # + # @overload create_glossary(request, options = nil) + # Pass arguments to `create_glossary` via a request object, either of type + # {::Google::Cloud::Translate::V3::CreateGlossaryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::CreateGlossaryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_glossary(parent: nil, glossary: nil) + # Pass arguments to `create_glossary` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project name. + # @param glossary [::Google::Cloud::Translate::V3::Glossary, ::Hash] + # Required. The glossary 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/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::CreateGlossaryRequest.new + # + # # Call the create_glossary method. + # result = client.create_glossary request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_glossary request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::CreateGlossaryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_glossary.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_glossary.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_glossary.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.create_glossary request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a glossary. A LRO is used since the update can be async if the + # glossary's entry file is updated. + # + # @overload update_glossary(request, options = nil) + # Pass arguments to `update_glossary` via a request object, either of type + # {::Google::Cloud::Translate::V3::UpdateGlossaryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::UpdateGlossaryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_glossary(glossary: nil, update_mask: nil) + # Pass arguments to `update_glossary` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param glossary [::Google::Cloud::Translate::V3::Glossary, ::Hash] + # Required. The glossary entry to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. Currently only `display_name` and + # 'input_config' + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::UpdateGlossaryRequest.new + # + # # Call the update_glossary method. + # result = client.update_glossary request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_glossary request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::UpdateGlossaryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_glossary.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_glossary.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_glossary.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.update_glossary request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't + # exist. + # + # @overload list_glossaries(request, options = nil) + # Pass arguments to `list_glossaries` via a request object, either of type + # {::Google::Cloud::Translate::V3::ListGlossariesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::ListGlossariesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_glossaries(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_glossaries` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the project from which to list all of the glossaries. + # @param page_size [::Integer] + # Optional. Requested page size. The server may return fewer glossaries than + # requested. If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # Typically, this is the value of [ListGlossariesResponse.next_page_token] + # returned from the previous call to `ListGlossaries` method. + # The first page is returned if `page_token`is empty or missing. + # @param filter [::String] + # Optional. Filter specifying constraints of a list operation. + # Specify the constraint by the format of "key=value", where key must be + # "src" or "tgt", and the value must be a valid language code. + # For multiple restrictions, concatenate them by "AND" (uppercase only), + # such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used + # here, which means using 'en-US' and 'en' can lead to different results, + # which depends on the language code you used when you create the glossary. + # For the unidirectional glossaries, the "src" and "tgt" add restrictions + # on the source and target language code separately. + # For the equivalent term set glossaries, the "src" and/or "tgt" add + # restrictions on the term set. + # For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional + # glossaries which exactly match the source language code as "en-US" and the + # target language code "zh-CN", but all equivalent term set glossaries which + # contain "en-US" and "zh-CN" in their language set will be picked. + # If missing, no filtering is performed. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::Glossary>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::Glossary>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::ListGlossariesRequest.new + # + # # Call the list_glossaries method. + # result = client.list_glossaries request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Translate::V3::Glossary. + # p item + # end + # + def list_glossaries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ListGlossariesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_glossaries.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_glossaries.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_glossaries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.list_glossaries request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @translation_service_stub, :list_glossaries, "glossaries", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a glossary. Returns NOT_FOUND, if the glossary doesn't + # exist. + # + # @overload get_glossary(request, options = nil) + # Pass arguments to `get_glossary` via a request object, either of type + # {::Google::Cloud::Translate::V3::GetGlossaryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::GetGlossaryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_glossary(name: nil) + # Pass arguments to `get_glossary` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the glossary to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::Glossary] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::Glossary] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::GetGlossaryRequest.new + # + # # Call the get_glossary method. + # result = client.get_glossary request + # + # # The returned object is of type Google::Cloud::Translate::V3::Glossary. + # p result + # + def get_glossary request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::GetGlossaryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_glossary.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_glossary.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_glossary.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.get_glossary request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a glossary, or cancels glossary construction + # if the glossary isn't created yet. + # Returns NOT_FOUND, if the glossary doesn't exist. + # + # @overload delete_glossary(request, options = nil) + # Pass arguments to `delete_glossary` via a request object, either of type + # {::Google::Cloud::Translate::V3::DeleteGlossaryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::DeleteGlossaryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_glossary(name: nil) + # Pass arguments to `delete_glossary` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the glossary to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::DeleteGlossaryRequest.new + # + # # Call the delete_glossary method. + # result = client.delete_glossary request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_glossary request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::DeleteGlossaryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_glossary.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_glossary.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_glossary.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.delete_glossary request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a single glossary entry by the given id. + # + # @overload get_glossary_entry(request, options = nil) + # Pass arguments to `get_glossary_entry` via a request object, either of type + # {::Google::Cloud::Translate::V3::GetGlossaryEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::GetGlossaryEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_glossary_entry(name: nil) + # Pass arguments to `get_glossary_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the glossary entry to get + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::GlossaryEntry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::GlossaryEntry] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::GetGlossaryEntryRequest.new + # + # # Call the get_glossary_entry method. + # result = client.get_glossary_entry request + # + # # The returned object is of type Google::Cloud::Translate::V3::GlossaryEntry. + # p result + # + def get_glossary_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::GetGlossaryEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_glossary_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::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_glossary_entry.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_glossary_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.get_glossary_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 + + ## + # List the entries for the glossary. + # + # @overload list_glossary_entries(request, options = nil) + # Pass arguments to `list_glossary_entries` via a request object, either of type + # {::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_glossary_entries(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_glossary_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 parent glossary resource name for listing the glossary's + # entries. + # @param page_size [::Integer] + # Optional. Requested page size. The server may return fewer glossary entries + # than requested. If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # Typically, this is the value of + # [ListGlossaryEntriesResponse.next_page_token] returned from the previous + # call. The first page is returned if `page_token`is empty or missing. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::GlossaryEntry>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::GlossaryEntry>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::ListGlossaryEntriesRequest.new + # + # # Call the list_glossary_entries method. + # result = client.list_glossary_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::Translate::V3::GlossaryEntry. + # p item + # end + # + def list_glossary_entries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_glossary_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::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_glossary_entries.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_glossary_entries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.list_glossary_entries request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @translation_service_stub, :list_glossary_entries, "glossary_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 + + ## + # Creates a glossary entry. + # + # @overload create_glossary_entry(request, options = nil) + # Pass arguments to `create_glossary_entry` via a request object, either of type + # {::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_glossary_entry(parent: nil, glossary_entry: nil) + # Pass arguments to `create_glossary_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the glossary to create the entry under. + # @param glossary_entry [::Google::Cloud::Translate::V3::GlossaryEntry, ::Hash] + # Required. The glossary entry to create + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::GlossaryEntry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::GlossaryEntry] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::CreateGlossaryEntryRequest.new + # + # # Call the create_glossary_entry method. + # result = client.create_glossary_entry request + # + # # The returned object is of type Google::Cloud::Translate::V3::GlossaryEntry. + # p result + # + def create_glossary_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_glossary_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::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_glossary_entry.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_glossary_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.create_glossary_entry request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a glossary entry. + # + # @overload update_glossary_entry(request, options = nil) + # Pass arguments to `update_glossary_entry` via a request object, either of type + # {::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_glossary_entry(glossary_entry: nil) + # Pass arguments to `update_glossary_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 glossary_entry [::Google::Cloud::Translate::V3::GlossaryEntry, ::Hash] + # Required. The glossary entry to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::GlossaryEntry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::GlossaryEntry] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest.new + # + # # Call the update_glossary_entry method. + # result = client.update_glossary_entry request + # + # # The returned object is of type Google::Cloud::Translate::V3::GlossaryEntry. + # p result + # + def update_glossary_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_glossary_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::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_glossary_entry.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_glossary_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.update_glossary_entry request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single entry from the glossary + # + # @overload delete_glossary_entry(request, options = nil) + # Pass arguments to `delete_glossary_entry` via a request object, either of type + # {::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_glossary_entry(name: nil) + # Pass arguments to `delete_glossary_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the glossary entry to delete + # @yield [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/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest.new + # + # # Call the delete_glossary_entry method. + # result = client.delete_glossary_entry request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_glossary_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_glossary_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::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_glossary_entry.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_glossary_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.delete_glossary_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 + + ## + # Creates a Dataset. + # + # @overload create_dataset(request, options = nil) + # Pass arguments to `create_dataset` via a request object, either of type + # {::Google::Cloud::Translate::V3::CreateDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::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: 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 project name. + # @param dataset [::Google::Cloud::Translate::V3::Dataset, ::Hash] + # Required. The Dataset 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/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @translation_service_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 + + ## + # Gets a Dataset. + # + # @overload get_dataset(request, options = nil) + # Pass arguments to `get_dataset` via a request object, either of type + # {::Google::Cloud::Translate::V3::GetDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::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 to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::Dataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::Dataset] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::GetDatasetRequest.new + # + # # Call the get_dataset method. + # result = client.get_dataset request + # + # # The returned object is of type Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @translation_service_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 + + ## + # Lists datasets. + # + # @overload list_datasets(request, options = nil) + # Pass arguments to `list_datasets` via a request object, either of type + # {::Google::Cloud::Translate::V3::ListDatasetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::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) + # 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. Name of the parent project. In form of + # `projects/{project-number-or-id}/locations/{location-id}` + # @param page_size [::Integer] + # Optional. Requested page size. The server can return fewer results than + # requested. + # @param page_token [::String] + # Optional. A token identifying a page of results for the server to return. + # Typically obtained from next_page_token field in the response of a + # ListDatasets call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::Dataset>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::Dataset>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @translation_service_stub.list_datasets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @translation_service_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 + + ## + # Deletes a dataset and all of its contents. + # + # @overload delete_dataset(request, options = nil) + # Pass arguments to `delete_dataset` via a request object, either of type + # {::Google::Cloud::Translate::V3::DeleteDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::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) + # 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 name of the dataset 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/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @translation_service_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 + + ## + # Creates an Adaptive MT dataset. + # + # @overload create_adaptive_mt_dataset(request, options = nil) + # Pass arguments to `create_adaptive_mt_dataset` via a request object, either of type + # {::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_adaptive_mt_dataset(parent: nil, adaptive_mt_dataset: nil) + # Pass arguments to `create_adaptive_mt_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. Name of the parent project. In form of + # `projects/{project-number-or-id}/locations/{location-id}` + # @param adaptive_mt_dataset [::Google::Cloud::Translate::V3::AdaptiveMtDataset, ::Hash] + # Required. The AdaptiveMtDataset to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::AdaptiveMtDataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::AdaptiveMtDataset] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest.new + # + # # Call the create_adaptive_mt_dataset method. + # result = client.create_adaptive_mt_dataset request + # + # # The returned object is of type Google::Cloud::Translate::V3::AdaptiveMtDataset. + # p result + # + def create_adaptive_mt_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest + + # Converts hash and nil to an 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_adaptive_mt_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::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_adaptive_mt_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_adaptive_mt_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.create_adaptive_mt_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 + + ## + # Deletes an Adaptive MT dataset, including all its entries and associated + # metadata. + # + # @overload delete_adaptive_mt_dataset(request, options = nil) + # Pass arguments to `delete_adaptive_mt_dataset` via a request object, either of type + # {::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_adaptive_mt_dataset(name: nil) + # Pass arguments to `delete_adaptive_mt_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. Name of the dataset. In the form of + # `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-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/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest.new + # + # # Call the delete_adaptive_mt_dataset method. + # result = client.delete_adaptive_mt_dataset request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_adaptive_mt_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest + + # Converts hash and nil to an 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_adaptive_mt_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::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_adaptive_mt_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_adaptive_mt_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.delete_adaptive_mt_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 + + ## + # Gets the Adaptive MT dataset. + # + # @overload get_adaptive_mt_dataset(request, options = nil) + # Pass arguments to `get_adaptive_mt_dataset` via a request object, either of type + # {::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_adaptive_mt_dataset(name: nil) + # Pass arguments to `get_adaptive_mt_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. Name of the dataset. In the form of + # `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::AdaptiveMtDataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::AdaptiveMtDataset] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest.new + # + # # Call the get_adaptive_mt_dataset method. + # result = client.get_adaptive_mt_dataset request + # + # # The returned object is of type Google::Cloud::Translate::V3::AdaptiveMtDataset. + # p result + # + def get_adaptive_mt_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_adaptive_mt_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::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_adaptive_mt_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_adaptive_mt_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.get_adaptive_mt_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 + + ## + # Lists all Adaptive MT datasets for which the caller has read permission. + # + # @overload list_adaptive_mt_datasets(request, options = nil) + # Pass arguments to `list_adaptive_mt_datasets` via a request object, either of type + # {::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_adaptive_mt_datasets(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_adaptive_mt_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 resource name of the project from which to list the Adaptive + # MT datasets. `projects/{project-number-or-id}/locations/{location-id}` + # @param page_size [::Integer] + # Optional. Requested page size. The server may return fewer results than + # requested. If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # Typically, this is the value of + # ListAdaptiveMtDatasetsResponse.next_page_token returned from the + # previous call to `ListAdaptiveMtDatasets` method. The first page is + # returned if `page_token`is empty or missing. + # @param filter [::String] + # Optional. An expression for filtering the results of the request. + # Filter is not supported yet. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::AdaptiveMtDataset>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::AdaptiveMtDataset>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest.new + # + # # Call the list_adaptive_mt_datasets method. + # result = client.list_adaptive_mt_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::Translate::V3::AdaptiveMtDataset. + # p item + # end + # + def list_adaptive_mt_datasets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_adaptive_mt_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::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_adaptive_mt_datasets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_adaptive_mt_datasets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.list_adaptive_mt_datasets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @translation_service_stub, :list_adaptive_mt_datasets, "adaptive_mt_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 + + ## + # Translate text using Adaptive MT. + # + # @overload adaptive_mt_translate(request, options = nil) + # Pass arguments to `adaptive_mt_translate` via a request object, either of type + # {::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload adaptive_mt_translate(parent: nil, dataset: nil, content: nil, reference_sentence_config: nil, glossary_config: nil) + # Pass arguments to `adaptive_mt_translate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Location to make a regional call. + # + # Format: `projects/{project-number-or-id}/locations/{location-id}`. + # @param dataset [::String] + # Required. The resource name for the dataset to use for adaptive MT. + # `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}` + # @param content [::Array<::String>] + # Required. The content of the input in string format. + # @param reference_sentence_config [::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::ReferenceSentenceConfig, ::Hash] + # Configuration for caller provided reference sentences. + # @param glossary_config [::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::GlossaryConfig, ::Hash] + # Optional. Glossary to be applied. The glossary must be + # within the same region (have the same location-id) as the model, otherwise + # an INVALID_ARGUMENT (400) error is returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest.new + # + # # Call the adaptive_mt_translate method. + # result = client.adaptive_mt_translate request + # + # # The returned object is of type Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse. + # p result + # + def adaptive_mt_translate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.adaptive_mt_translate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.adaptive_mt_translate.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.adaptive_mt_translate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.adaptive_mt_translate request, 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 and AdaptiveMtFile + # + # @overload get_adaptive_mt_file(request, options = nil) + # Pass arguments to `get_adaptive_mt_file` via a request object, either of type + # {::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_adaptive_mt_file(name: nil) + # Pass arguments to `get_adaptive_mt_file` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the file, in form of + # `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::AdaptiveMtFile] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::AdaptiveMtFile] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest.new + # + # # Call the get_adaptive_mt_file method. + # result = client.get_adaptive_mt_file request + # + # # The returned object is of type Google::Cloud::Translate::V3::AdaptiveMtFile. + # p result + # + def get_adaptive_mt_file request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_adaptive_mt_file.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_adaptive_mt_file.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_adaptive_mt_file.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.get_adaptive_mt_file request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an AdaptiveMtFile along with its sentences. + # + # @overload delete_adaptive_mt_file(request, options = nil) + # Pass arguments to `delete_adaptive_mt_file` via a request object, either of type + # {::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_adaptive_mt_file(name: nil) + # Pass arguments to `delete_adaptive_mt_file` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the file to delete, in form of + # `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + # @yield [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/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest.new + # + # # Call the delete_adaptive_mt_file method. + # result = client.delete_adaptive_mt_file request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_adaptive_mt_file request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest + + # Converts hash and nil to an 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_adaptive_mt_file.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_adaptive_mt_file.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_adaptive_mt_file.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.delete_adaptive_mt_file request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports an AdaptiveMtFile and adds all of its sentences into the + # AdaptiveMtDataset. + # + # @overload import_adaptive_mt_file(request, options = nil) + # Pass arguments to `import_adaptive_mt_file` via a request object, either of type + # {::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_adaptive_mt_file(parent: nil, file_input_source: nil, gcs_input_source: nil) + # Pass arguments to `import_adaptive_mt_file` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the file, in form of + # `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}` + # @param file_input_source [::Google::Cloud::Translate::V3::FileInputSource, ::Hash] + # Inline file source. + # + # Note: The following parameters are mutually exclusive: `file_input_source`, `gcs_input_source`. 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 gcs_input_source [::Google::Cloud::Translate::V3::GcsInputSource, ::Hash] + # Google Cloud Storage file source. + # + # Note: The following parameters are mutually exclusive: `gcs_input_source`, `file_input_source`. 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::Translate::V3::ImportAdaptiveMtFileResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest.new + # + # # Call the import_adaptive_mt_file method. + # result = client.import_adaptive_mt_file request + # + # # The returned object is of type Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse. + # p result + # + def import_adaptive_mt_file request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest + + # Converts hash and nil to an 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_adaptive_mt_file.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_adaptive_mt_file.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.import_adaptive_mt_file.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.import_adaptive_mt_file request, 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 AdaptiveMtFiles associated to an AdaptiveMtDataset. + # + # @overload list_adaptive_mt_files(request, options = nil) + # Pass arguments to `list_adaptive_mt_files` via a request object, either of type + # {::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_adaptive_mt_files(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_adaptive_mt_files` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project from which to list the Adaptive + # MT files. + # `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` + # @param page_size [::Integer] + # Optional. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # Typically, this is the value of + # ListAdaptiveMtFilesResponse.next_page_token returned from the + # previous call to `ListAdaptiveMtFiles` method. The first page is + # returned if `page_token`is empty or missing. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::AdaptiveMtFile>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::AdaptiveMtFile>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest.new + # + # # Call the list_adaptive_mt_files method. + # result = client.list_adaptive_mt_files request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Translate::V3::AdaptiveMtFile. + # p item + # end + # + def list_adaptive_mt_files request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_adaptive_mt_files.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_adaptive_mt_files.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_adaptive_mt_files.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.list_adaptive_mt_files request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @translation_service_stub, :list_adaptive_mt_files, "adaptive_mt_files", 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 AdaptiveMtSentences under a given file/dataset. + # + # @overload list_adaptive_mt_sentences(request, options = nil) + # Pass arguments to `list_adaptive_mt_sentences` via a request object, either of type + # {::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_adaptive_mt_sentences(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_adaptive_mt_sentences` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project from which to list the Adaptive + # MT files. The following format lists all sentences under a file. + # `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + # The following format lists all sentences within a dataset. + # `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` + # @param page_size [::Integer] + # @param page_token [::String] + # A token identifying a page of results the server should return. + # Typically, this is the value of + # ListAdaptiveMtSentencesRequest.next_page_token returned from the + # previous call to `ListTranslationMemories` method. The first page is + # returned if `page_token` is empty or missing. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::AdaptiveMtSentence>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::AdaptiveMtSentence>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest.new + # + # # Call the list_adaptive_mt_sentences method. + # result = client.list_adaptive_mt_sentences request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Translate::V3::AdaptiveMtSentence. + # p item + # end + # + def list_adaptive_mt_sentences request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_adaptive_mt_sentences.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_adaptive_mt_sentences.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_adaptive_mt_sentences.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.list_adaptive_mt_sentences request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @translation_service_stub, :list_adaptive_mt_sentences, "adaptive_mt_sentences", 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 + + ## + # Import sentence pairs into translation Dataset. + # + # @overload import_data(request, options = nil) + # Pass arguments to `import_data` via a request object, either of type + # {::Google::Cloud::Translate::V3::ImportDataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::ImportDataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data(dataset: nil, input_config: nil) + # Pass arguments to `import_data` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param dataset [::String] + # Required. Name of the dataset. In form of + # `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` + # @param input_config [::Google::Cloud::Translate::V3::DatasetInputConfig, ::Hash] + # Required. The config for the input content. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::ImportDataRequest.new + # + # # Call the import_data method. + # result = client.import_data request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_data request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ImportDataRequest + + # Converts hash and nil to an 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_data.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_data.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.import_data.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.import_data request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 dataset's data to the provided output location. + # + # @overload export_data(request, options = nil) + # Pass arguments to `export_data` via a request object, either of type + # {::Google::Cloud::Translate::V3::ExportDataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::ExportDataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data(dataset: nil, output_config: nil) + # Pass arguments to `export_data` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param dataset [::String] + # Required. Name of the dataset. In form of + # `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` + # @param output_config [::Google::Cloud::Translate::V3::DatasetOutputConfig, ::Hash] + # Required. The config for the output content. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::ExportDataRequest.new + # + # # Call the export_data method. + # result = client.export_data request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_data request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ExportDataRequest + + # Converts hash and nil to an 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_data.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_data.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_data.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.export_data request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 sentence pairs in the dataset. + # + # @overload list_examples(request, options = nil) + # Pass arguments to `list_examples` via a request object, either of type + # {::Google::Cloud::Translate::V3::ListExamplesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::ListExamplesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_examples(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_examples` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the parent dataset. In form of + # `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` + # @param filter [::String] + # Optional. An expression for filtering the examples that will be returned. + # Example filter: + # * `usage=TRAIN` + # @param page_size [::Integer] + # Optional. Requested page size. The server can return fewer results than + # requested. + # @param page_token [::String] + # Optional. A token identifying a page of results for the server to return. + # Typically obtained from next_page_token field in the response of a + # ListExamples call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::Example>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::Example>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::ListExamplesRequest.new + # + # # Call the list_examples method. + # result = client.list_examples request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Translate::V3::Example. + # p item + # end + # + def list_examples request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ListExamplesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_examples.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_examples.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_examples.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @translation_service_stub.list_examples request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @translation_service_stub, :list_examples, "examples", 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 Model. + # + # @overload create_model(request, options = nil) + # Pass arguments to `create_model` via a request object, either of type + # {::Google::Cloud::Translate::V3::CreateModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::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: 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 project name, in form of + # `projects/{project}/locations/{location}` + # @param model [::Google::Cloud::Translate::V3::Model, ::Hash] + # Required. The Model 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/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @translation_service_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 + + ## + # Lists models. + # + # @overload list_models(request, options = nil) + # Pass arguments to `list_models` via a request object, either of type + # {::Google::Cloud::Translate::V3::ListModelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::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, filter: nil, page_size: nil, page_token: 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. Name of the parent project. In form of + # `projects/{project-number-or-id}/locations/{location-id}` + # @param filter [::String] + # Optional. An expression for filtering the models that will be returned. + # Supported filter: + # `dataset_id=${dataset_id}` + # @param page_size [::Integer] + # Optional. Requested page size. The server can return fewer results than + # requested. + # @param page_token [::String] + # Optional. A token identifying a page of results for the server to return. + # Typically obtained from next_page_token field in the response of a + # ListModels call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::Model>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::Model>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @translation_service_stub.list_models request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @translation_service_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::Translate::V3::GetModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::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 to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::Model] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::Model] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::GetModelRequest.new + # + # # Call the get_model method. + # result = client.get_model request + # + # # The returned object is of type Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @translation_service_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 + + ## + # Deletes a model. + # + # @overload delete_model(request, options = nil) + # Pass arguments to `delete_model` via a request object, either of type + # {::Google::Cloud::Translate::V3::DeleteModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Translate::V3::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) + # 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 name of the model 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/translate/v3" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @translation_service_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 + + ## + # Configuration class for the TranslationService REST API. + # + # This class represents the configuration for TranslationService 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::Translate::V3::TranslationService::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 + # # translate_text to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.translate_text.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.translate_text.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 = "translate.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 TranslationService 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 `translate_text` + # @return [::Gapic::Config::Method] + # + attr_reader :translate_text + ## + # RPC-specific configuration for `romanize_text` + # @return [::Gapic::Config::Method] + # + attr_reader :romanize_text + ## + # RPC-specific configuration for `detect_language` + # @return [::Gapic::Config::Method] + # + attr_reader :detect_language + ## + # RPC-specific configuration for `get_supported_languages` + # @return [::Gapic::Config::Method] + # + attr_reader :get_supported_languages + ## + # RPC-specific configuration for `translate_document` + # @return [::Gapic::Config::Method] + # + attr_reader :translate_document + ## + # RPC-specific configuration for `batch_translate_text` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_translate_text + ## + # RPC-specific configuration for `batch_translate_document` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_translate_document + ## + # RPC-specific configuration for `create_glossary` + # @return [::Gapic::Config::Method] + # + attr_reader :create_glossary + ## + # RPC-specific configuration for `update_glossary` + # @return [::Gapic::Config::Method] + # + attr_reader :update_glossary + ## + # RPC-specific configuration for `list_glossaries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_glossaries + ## + # RPC-specific configuration for `get_glossary` + # @return [::Gapic::Config::Method] + # + attr_reader :get_glossary + ## + # RPC-specific configuration for `delete_glossary` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_glossary + ## + # RPC-specific configuration for `get_glossary_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :get_glossary_entry + ## + # RPC-specific configuration for `list_glossary_entries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_glossary_entries + ## + # RPC-specific configuration for `create_glossary_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :create_glossary_entry + ## + # RPC-specific configuration for `update_glossary_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :update_glossary_entry + ## + # RPC-specific configuration for `delete_glossary_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_glossary_entry + ## + # RPC-specific configuration for `create_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_dataset + ## + # RPC-specific configuration for `get_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dataset + ## + # RPC-specific configuration for `list_datasets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_datasets + ## + # RPC-specific configuration for `delete_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_dataset + ## + # RPC-specific configuration for `create_adaptive_mt_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_adaptive_mt_dataset + ## + # RPC-specific configuration for `delete_adaptive_mt_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_adaptive_mt_dataset + ## + # RPC-specific configuration for `get_adaptive_mt_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_adaptive_mt_dataset + ## + # RPC-specific configuration for `list_adaptive_mt_datasets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_adaptive_mt_datasets + ## + # RPC-specific configuration for `adaptive_mt_translate` + # @return [::Gapic::Config::Method] + # + attr_reader :adaptive_mt_translate + ## + # RPC-specific configuration for `get_adaptive_mt_file` + # @return [::Gapic::Config::Method] + # + attr_reader :get_adaptive_mt_file + ## + # RPC-specific configuration for `delete_adaptive_mt_file` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_adaptive_mt_file + ## + # RPC-specific configuration for `import_adaptive_mt_file` + # @return [::Gapic::Config::Method] + # + attr_reader :import_adaptive_mt_file + ## + # RPC-specific configuration for `list_adaptive_mt_files` + # @return [::Gapic::Config::Method] + # + attr_reader :list_adaptive_mt_files + ## + # RPC-specific configuration for `list_adaptive_mt_sentences` + # @return [::Gapic::Config::Method] + # + attr_reader :list_adaptive_mt_sentences + ## + # RPC-specific configuration for `import_data` + # @return [::Gapic::Config::Method] + # + attr_reader :import_data + ## + # RPC-specific configuration for `export_data` + # @return [::Gapic::Config::Method] + # + attr_reader :export_data + ## + # RPC-specific configuration for `list_examples` + # @return [::Gapic::Config::Method] + # + attr_reader :list_examples + ## + # RPC-specific configuration for `create_model` + # @return [::Gapic::Config::Method] + # + attr_reader :create_model + ## + # 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 `delete_model` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_model + + # @private + def initialize parent_rpcs = nil + translate_text_config = parent_rpcs.translate_text if parent_rpcs.respond_to? :translate_text + @translate_text = ::Gapic::Config::Method.new translate_text_config + romanize_text_config = parent_rpcs.romanize_text if parent_rpcs.respond_to? :romanize_text + @romanize_text = ::Gapic::Config::Method.new romanize_text_config + detect_language_config = parent_rpcs.detect_language if parent_rpcs.respond_to? :detect_language + @detect_language = ::Gapic::Config::Method.new detect_language_config + get_supported_languages_config = parent_rpcs.get_supported_languages if parent_rpcs.respond_to? :get_supported_languages + @get_supported_languages = ::Gapic::Config::Method.new get_supported_languages_config + translate_document_config = parent_rpcs.translate_document if parent_rpcs.respond_to? :translate_document + @translate_document = ::Gapic::Config::Method.new translate_document_config + batch_translate_text_config = parent_rpcs.batch_translate_text if parent_rpcs.respond_to? :batch_translate_text + @batch_translate_text = ::Gapic::Config::Method.new batch_translate_text_config + batch_translate_document_config = parent_rpcs.batch_translate_document if parent_rpcs.respond_to? :batch_translate_document + @batch_translate_document = ::Gapic::Config::Method.new batch_translate_document_config + create_glossary_config = parent_rpcs.create_glossary if parent_rpcs.respond_to? :create_glossary + @create_glossary = ::Gapic::Config::Method.new create_glossary_config + update_glossary_config = parent_rpcs.update_glossary if parent_rpcs.respond_to? :update_glossary + @update_glossary = ::Gapic::Config::Method.new update_glossary_config + list_glossaries_config = parent_rpcs.list_glossaries if parent_rpcs.respond_to? :list_glossaries + @list_glossaries = ::Gapic::Config::Method.new list_glossaries_config + get_glossary_config = parent_rpcs.get_glossary if parent_rpcs.respond_to? :get_glossary + @get_glossary = ::Gapic::Config::Method.new get_glossary_config + delete_glossary_config = parent_rpcs.delete_glossary if parent_rpcs.respond_to? :delete_glossary + @delete_glossary = ::Gapic::Config::Method.new delete_glossary_config + get_glossary_entry_config = parent_rpcs.get_glossary_entry if parent_rpcs.respond_to? :get_glossary_entry + @get_glossary_entry = ::Gapic::Config::Method.new get_glossary_entry_config + list_glossary_entries_config = parent_rpcs.list_glossary_entries if parent_rpcs.respond_to? :list_glossary_entries + @list_glossary_entries = ::Gapic::Config::Method.new list_glossary_entries_config + create_glossary_entry_config = parent_rpcs.create_glossary_entry if parent_rpcs.respond_to? :create_glossary_entry + @create_glossary_entry = ::Gapic::Config::Method.new create_glossary_entry_config + update_glossary_entry_config = parent_rpcs.update_glossary_entry if parent_rpcs.respond_to? :update_glossary_entry + @update_glossary_entry = ::Gapic::Config::Method.new update_glossary_entry_config + delete_glossary_entry_config = parent_rpcs.delete_glossary_entry if parent_rpcs.respond_to? :delete_glossary_entry + @delete_glossary_entry = ::Gapic::Config::Method.new delete_glossary_entry_config + create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset + @create_dataset = ::Gapic::Config::Method.new create_dataset_config + get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset + @get_dataset = ::Gapic::Config::Method.new get_dataset_config + list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets + @list_datasets = ::Gapic::Config::Method.new list_datasets_config + delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset + @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config + create_adaptive_mt_dataset_config = parent_rpcs.create_adaptive_mt_dataset if parent_rpcs.respond_to? :create_adaptive_mt_dataset + @create_adaptive_mt_dataset = ::Gapic::Config::Method.new create_adaptive_mt_dataset_config + delete_adaptive_mt_dataset_config = parent_rpcs.delete_adaptive_mt_dataset if parent_rpcs.respond_to? :delete_adaptive_mt_dataset + @delete_adaptive_mt_dataset = ::Gapic::Config::Method.new delete_adaptive_mt_dataset_config + get_adaptive_mt_dataset_config = parent_rpcs.get_adaptive_mt_dataset if parent_rpcs.respond_to? :get_adaptive_mt_dataset + @get_adaptive_mt_dataset = ::Gapic::Config::Method.new get_adaptive_mt_dataset_config + list_adaptive_mt_datasets_config = parent_rpcs.list_adaptive_mt_datasets if parent_rpcs.respond_to? :list_adaptive_mt_datasets + @list_adaptive_mt_datasets = ::Gapic::Config::Method.new list_adaptive_mt_datasets_config + adaptive_mt_translate_config = parent_rpcs.adaptive_mt_translate if parent_rpcs.respond_to? :adaptive_mt_translate + @adaptive_mt_translate = ::Gapic::Config::Method.new adaptive_mt_translate_config + get_adaptive_mt_file_config = parent_rpcs.get_adaptive_mt_file if parent_rpcs.respond_to? :get_adaptive_mt_file + @get_adaptive_mt_file = ::Gapic::Config::Method.new get_adaptive_mt_file_config + delete_adaptive_mt_file_config = parent_rpcs.delete_adaptive_mt_file if parent_rpcs.respond_to? :delete_adaptive_mt_file + @delete_adaptive_mt_file = ::Gapic::Config::Method.new delete_adaptive_mt_file_config + import_adaptive_mt_file_config = parent_rpcs.import_adaptive_mt_file if parent_rpcs.respond_to? :import_adaptive_mt_file + @import_adaptive_mt_file = ::Gapic::Config::Method.new import_adaptive_mt_file_config + list_adaptive_mt_files_config = parent_rpcs.list_adaptive_mt_files if parent_rpcs.respond_to? :list_adaptive_mt_files + @list_adaptive_mt_files = ::Gapic::Config::Method.new list_adaptive_mt_files_config + list_adaptive_mt_sentences_config = parent_rpcs.list_adaptive_mt_sentences if parent_rpcs.respond_to? :list_adaptive_mt_sentences + @list_adaptive_mt_sentences = ::Gapic::Config::Method.new list_adaptive_mt_sentences_config + import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data + @import_data = ::Gapic::Config::Method.new import_data_config + export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data + @export_data = ::Gapic::Config::Method.new export_data_config + list_examples_config = parent_rpcs.list_examples if parent_rpcs.respond_to? :list_examples + @list_examples = ::Gapic::Config::Method.new list_examples_config + create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model + @create_model = ::Gapic::Config::Method.new create_model_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 + delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model + @delete_model = ::Gapic::Config::Method.new delete_model_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/operations.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/operations.rb new file mode 100644 index 000000000000..fe150ccbe903 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/operations.rb @@ -0,0 +1,1093 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 Translate + module V3 + module TranslationService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "translate.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the TranslationService 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 TranslationService 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::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + ## + # 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 [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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::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 + call_metadata = @config.rpcs.wait_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::Translate::V3::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: call_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.wait_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 + + ## + # 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 = "translate.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 + ## + # 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 + + ## + # @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 + + ## + # Baseline implementation for the wait_operation REST call + # + # @param request_pb [::Google::Longrunning::WaitOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def wait_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_wait_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: "wait_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 + + ## + # @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: "/v3/{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: "/v3/{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: "/v3/{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: "/v3/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the wait_operation REST call + # + # @param request_pb [::Google::Longrunning::WaitOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_wait_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v3/{name}:wait", + 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-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/service_stub.rb new file mode 100644 index 000000000000..2bee326ee72a --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/service_stub.rb @@ -0,0 +1,2454 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/translate/v3/translation_service_pb" + +module Google + module Cloud + module Translate + module V3 + module TranslationService + module Rest + ## + # REST service stub for the TranslationService 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 translate_text REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::TranslateTextRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::TranslateTextResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::TranslateTextResponse] + # A result object deserialized from the server's reply + def translate_text request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_translate_text_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "translate_text", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Translate::V3::TranslateTextResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the romanize_text REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::RomanizeTextRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::RomanizeTextResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::RomanizeTextResponse] + # A result object deserialized from the server's reply + def romanize_text request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_romanize_text_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "romanize_text", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Translate::V3::RomanizeTextResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the detect_language REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::DetectLanguageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::DetectLanguageResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::DetectLanguageResponse] + # A result object deserialized from the server's reply + def detect_language request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_detect_language_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "detect_language", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Translate::V3::DetectLanguageResponse.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_supported_languages REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::SupportedLanguages] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::SupportedLanguages] + # A result object deserialized from the server's reply + def get_supported_languages request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_supported_languages_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_supported_languages", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Translate::V3::SupportedLanguages.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the translate_document REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::TranslateDocumentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::TranslateDocumentResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::TranslateDocumentResponse] + # A result object deserialized from the server's reply + def translate_document request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_translate_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: "translate_document", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Translate::V3::TranslateDocumentResponse.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_translate_text REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::BatchTranslateTextRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def batch_translate_text request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_translate_text_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_translate_text", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_translate_document REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def batch_translate_document request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_translate_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: "batch_translate_document", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_glossary REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::CreateGlossaryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_glossary request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_glossary_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_glossary", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_glossary REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::UpdateGlossaryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_glossary request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_glossary_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_glossary", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_glossaries REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::ListGlossariesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::ListGlossariesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::ListGlossariesResponse] + # A result object deserialized from the server's reply + def list_glossaries request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_glossaries_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_glossaries", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Translate::V3::ListGlossariesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_glossary REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::GetGlossaryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::Glossary] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::Glossary] + # A result object deserialized from the server's reply + def get_glossary request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_glossary_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_glossary", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Translate::V3::Glossary.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_glossary REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::DeleteGlossaryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_glossary request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_glossary_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_glossary", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_glossary_entry REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::GetGlossaryEntryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::GlossaryEntry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::GlossaryEntry] + # A result object deserialized from the server's reply + def get_glossary_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_glossary_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_glossary_entry", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Translate::V3::GlossaryEntry.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_glossary_entries REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::ListGlossaryEntriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::ListGlossaryEntriesResponse] + # A result object deserialized from the server's reply + def list_glossary_entries request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_glossary_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_glossary_entries", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Translate::V3::ListGlossaryEntriesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_glossary_entry REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::GlossaryEntry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::GlossaryEntry] + # A result object deserialized from the server's reply + def create_glossary_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_glossary_entry_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_glossary_entry", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Translate::V3::GlossaryEntry.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_glossary_entry REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::GlossaryEntry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::GlossaryEntry] + # A result object deserialized from the server's reply + def update_glossary_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_glossary_entry_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_glossary_entry", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Translate::V3::GlossaryEntry.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_glossary_entry REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_glossary_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_glossary_entry_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_glossary_entry", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_dataset REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::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 get_dataset REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::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::Translate::V3::Dataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::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::Translate::V3::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 list_datasets REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::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::Translate::V3::ListDatasetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::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::Translate::V3::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 delete_dataset REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::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 create_adaptive_mt_dataset REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::AdaptiveMtDataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::AdaptiveMtDataset] + # A result object deserialized from the server's reply + def create_adaptive_mt_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_adaptive_mt_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_adaptive_mt_dataset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Translate::V3::AdaptiveMtDataset.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_adaptive_mt_dataset REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_adaptive_mt_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_adaptive_mt_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_adaptive_mt_dataset", + 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_adaptive_mt_dataset REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::AdaptiveMtDataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::AdaptiveMtDataset] + # A result object deserialized from the server's reply + def get_adaptive_mt_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_adaptive_mt_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_adaptive_mt_dataset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Translate::V3::AdaptiveMtDataset.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_adaptive_mt_datasets REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsResponse] + # A result object deserialized from the server's reply + def list_adaptive_mt_datasets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_adaptive_mt_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_adaptive_mt_datasets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the adaptive_mt_translate REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse] + # A result object deserialized from the server's reply + def adaptive_mt_translate request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_adaptive_mt_translate_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "adaptive_mt_translate", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse.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_adaptive_mt_file REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::AdaptiveMtFile] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::AdaptiveMtFile] + # A result object deserialized from the server's reply + def get_adaptive_mt_file request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_adaptive_mt_file_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_adaptive_mt_file", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Translate::V3::AdaptiveMtFile.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_adaptive_mt_file REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_adaptive_mt_file request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_adaptive_mt_file_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_adaptive_mt_file", + 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 import_adaptive_mt_file REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse] + # A result object deserialized from the server's reply + def import_adaptive_mt_file request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_import_adaptive_mt_file_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_adaptive_mt_file", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse.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_adaptive_mt_files REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::ListAdaptiveMtFilesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::ListAdaptiveMtFilesResponse] + # A result object deserialized from the server's reply + def list_adaptive_mt_files request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_adaptive_mt_files_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_adaptive_mt_files", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Translate::V3::ListAdaptiveMtFilesResponse.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_adaptive_mt_sentences REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesResponse] + # A result object deserialized from the server's reply + def list_adaptive_mt_sentences request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_adaptive_mt_sentences_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_adaptive_mt_sentences", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesResponse.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_data REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::ImportDataRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_data request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_import_data_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_data", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_data REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::ExportDataRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_data request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_data_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_data", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_examples REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::ListExamplesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Translate::V3::ListExamplesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::ListExamplesResponse] + # A result object deserialized from the server's reply + def list_examples request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_examples_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_examples", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Translate::V3::ListExamplesResponse.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::Translate::V3::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 list_models REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::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::Translate::V3::ListModelsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::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::Translate::V3::Model] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Translate::V3::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::Translate::V3::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 delete_model REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::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 + + ## + # @private + # + # GRPC transcoding helper method for the translate_text REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::TranslateTextRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_translate_text_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v3/{parent}:translateText", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v3/{parent}:translateText", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the romanize_text REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::RomanizeTextRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_romanize_text_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v3/{parent}:romanizeText", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v3/{parent}:romanizeText", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the detect_language REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::DetectLanguageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_detect_language_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v3/{parent}:detectLanguage", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v3/{parent}:detectLanguage", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_supported_languages REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_supported_languages_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/supportedLanguages", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/supportedLanguages", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the translate_document REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::TranslateDocumentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_translate_document_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v3/{parent}:translateDocument", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_translate_text REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::BatchTranslateTextRequest] + # 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_translate_text_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v3/{parent}:batchTranslateText", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_translate_document REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest] + # 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_translate_document_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v3/{parent}:batchTranslateDocument", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_glossary REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::CreateGlossaryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_glossary_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v3/{parent}/glossaries", + body: "glossary", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_glossary REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::UpdateGlossaryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_glossary_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v3/{glossary.name}", + body: "glossary", + matches: [ + ["glossary.name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_glossaries REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::ListGlossariesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_glossaries_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/glossaries", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_glossary REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::GetGlossaryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_glossary_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_glossary REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::DeleteGlossaryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_glossary_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_glossary_entry REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::GetGlossaryEntryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_glossary_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/glossaryEntries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_glossary_entries REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_glossary_entries_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/glossaryEntries", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_glossary_entry REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_glossary_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v3/{parent}/glossaryEntries", + body: "glossary_entry", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_glossary_entry REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_glossary_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v3/{glossary_entry.name}", + body: "glossary_entry", + matches: [ + ["glossary_entry.name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/glossaryEntries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_glossary_entry REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_glossary_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/glossaryEntries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_dataset REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::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: "/v3/{parent}/datasets", + body: "dataset", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_dataset REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::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: "/v3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_datasets REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::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: "/v3/{parent}/datasets", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_dataset REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::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: "/v3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_adaptive_mt_dataset REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest] + # 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_adaptive_mt_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v3/{parent}/adaptiveMtDatasets", + body: "adaptive_mt_dataset", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_adaptive_mt_dataset REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest] + # 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_adaptive_mt_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_adaptive_mt_dataset REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_adaptive_mt_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_adaptive_mt_datasets REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_adaptive_mt_datasets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/adaptiveMtDatasets", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the adaptive_mt_translate REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_adaptive_mt_translate_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v3/{parent}:adaptiveMtTranslate", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_adaptive_mt_file REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_adaptive_mt_file_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/adaptiveMtFiles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_adaptive_mt_file REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest] + # 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_adaptive_mt_file_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/adaptiveMtFiles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the import_adaptive_mt_file REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest] + # 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_adaptive_mt_file_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v3/{parent}:importAdaptiveMtFile", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_adaptive_mt_files REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_adaptive_mt_files_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/adaptiveMtFiles", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_adaptive_mt_sentences REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_adaptive_mt_sentences_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/adaptiveMtSentences", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/adaptiveMtFiles/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/adaptiveMtSentences", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the import_data REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::ImportDataRequest] + # 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_data_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v3/{dataset}:importData", + body: "*", + matches: [ + ["dataset", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_data REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::ExportDataRequest] + # 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_data_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v3/{dataset}:exportData", + body: "*", + matches: [ + ["dataset", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_examples REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::ListExamplesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_examples_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v3/{parent}/examples", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_model REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::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: "/v3/{parent}/models", + body: "model", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_models REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::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: "/v3/{parent}/models", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_model REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::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: "/v3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_model REST call + # + # @param request_pb [::Google::Cloud::Translate::V3::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: "/v3/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service_pb.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service_pb.rb new file mode 100644 index 000000000000..23109d6811b2 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service_pb.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/translate/v3/translation_service.proto + +require 'google/protobuf' + +require 'google/cloud/translate/v3/adaptive_mt_pb' +require 'google/cloud/translate/v3/automl_translation_pb' +require 'google/cloud/translate/v3/common_pb' +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/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n3google/cloud/translate/v3/translation_service.proto\x12\x1bgoogle.cloud.translation.v3\x1a+google/cloud/translate/v3/adaptive_mt.proto\x1a\x32google/cloud/translate/v3/automl_translation.proto\x1a&google/cloud/translate/v3/common.proto\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\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"7\n\x15TransliterationConfig\x12\x1e\n\x16\x65nable_transliteration\x18\x01 \x01(\x08\"\x8e\x04\n\x14TranslateTextRequest\x12\x15\n\x08\x63ontents\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14source_language_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14target_language_code\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x06parent\x18\x08 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x12\n\x05model\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12V\n\x0fglossary_config\x18\x07 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfigB\x03\xe0\x41\x01\x12W\n\x16transliteration_config\x18\r \x01(\x0b\x32\x32.google.cloud.translation.v3.TransliterationConfigB\x03\xe0\x41\x01\x12R\n\x06labels\x18\n \x03(\x0b\x32=.google.cloud.translation.v3.TranslateTextRequest.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\"\xa0\x01\n\x15TranslateTextResponse\x12>\n\x0ctranslations\x18\x01 \x03(\x0b\x32(.google.cloud.translation.v3.Translation\x12G\n\x15glossary_translations\x18\x03 \x03(\x0b\x32(.google.cloud.translation.v3.Translation\"\xa8\x01\n\x0bTranslation\x12\x17\n\x0ftranslated_text\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t\x12\x1e\n\x16\x64\x65tected_language_code\x18\x04 \x01(\t\x12Q\n\x0fglossary_config\x18\x03 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfig\"\x8a\x01\n\x13RomanizeTextRequest\x12\x39\n\x06parent\x18\x04 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x15\n\x08\x63ontents\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12!\n\x14source_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\"F\n\x0cRomanization\x12\x16\n\x0eromanized_text\x18\x01 \x01(\t\x12\x1e\n\x16\x64\x65tected_language_code\x18\x02 \x01(\t\"X\n\x14RomanizeTextResponse\x12@\n\rromanizations\x18\x01 \x03(\x0b\x32).google.cloud.translation.v3.Romanization\"\x9f\x02\n\x15\x44\x65tectLanguageRequest\x12\x39\n\x06parent\x18\x05 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x12\n\x05model\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x07\x63ontent\x18\x01 \x01(\tH\x00\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12S\n\x06labels\x18\x06 \x03(\x0b\x32>.google.cloud.translation.v3.DetectLanguageRequest.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\x42\x08\n\x06source\"=\n\x10\x44\x65tectedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"Z\n\x16\x44\x65tectLanguageResponse\x12@\n\tlanguages\x18\x01 \x03(\x0b\x32-.google.cloud.translation.v3.DetectedLanguage\"\x91\x01\n\x1cGetSupportedLanguagesRequest\x12\x39\n\x06parent\x18\x03 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\"\n\x15\x64isplay_language_code\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05model\x18\x02 \x01(\tB\x03\xe0\x41\x01\"W\n\x12SupportedLanguages\x12\x41\n\tlanguages\x18\x01 \x03(\x0b\x32..google.cloud.translation.v3.SupportedLanguage\"p\n\x11SupportedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x16\n\x0esupport_source\x18\x03 \x01(\x08\x12\x16\n\x0esupport_target\x18\x04 \x01(\x08\"#\n\tGcsSource\x12\x16\n\tinput_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\"m\n\x0bInputConfig\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12<\n\ngcs_source\x18\x02 \x01(\x0b\x32&.google.cloud.translation.v3.GcsSourceH\x00\x42\x08\n\x06source\"0\n\x0eGcsDestination\x12\x1e\n\x11output_uri_prefix\x18\x01 \x01(\tB\x03\xe0\x41\x02\"e\n\x0cOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.translation.v3.GcsDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\x83\x01\n\x13\x44ocumentInputConfig\x12\x11\n\x07\x63ontent\x18\x01 \x01(\x0cH\x00\x12<\n\ngcs_source\x18\x02 \x01(\x0b\x32&.google.cloud.translation.v3.GcsSourceH\x00\x12\x11\n\tmime_type\x18\x04 \x01(\tB\x08\n\x06source\"\x8a\x01\n\x14\x44ocumentOutputConfig\x12K\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.translation.v3.GcsDestinationB\x03\xe0\x41\x01H\x00\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\r\n\x0b\x64\x65stination\"\xbe\x05\n\x18TranslateDocumentRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x14source_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14target_language_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12T\n\x15\x64ocument_input_config\x18\x04 \x01(\x0b\x32\x30.google.cloud.translation.v3.DocumentInputConfigB\x03\xe0\x41\x02\x12V\n\x16\x64ocument_output_config\x18\x05 \x01(\x0b\x32\x31.google.cloud.translation.v3.DocumentOutputConfigB\x03\xe0\x41\x01\x12\x12\n\x05model\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12V\n\x0fglossary_config\x18\x07 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfigB\x03\xe0\x41\x01\x12V\n\x06labels\x18\x08 \x03(\x0b\x32\x41.google.cloud.translation.v3.TranslateDocumentRequest.LabelsEntryB\x03\xe0\x41\x01\x12#\n\x16\x63ustomized_attribution\x18\n \x01(\tB\x03\xe0\x41\x01\x12)\n\x1cis_translate_native_pdf_only\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01\x12-\n enable_shadow_removal_native_pdf\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x12\'\n\x1a\x65nable_rotation_correction\x18\r \x01(\x08\x42\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\x13\x44ocumentTranslation\x12\x1b\n\x13\x62yte_stream_outputs\x18\x01 \x03(\x0c\x12\x11\n\tmime_type\x18\x02 \x01(\t\x12\x1e\n\x16\x64\x65tected_language_code\x18\x03 \x01(\t\"\xa6\x02\n\x19TranslateDocumentResponse\x12N\n\x14\x64ocument_translation\x18\x01 \x01(\x0b\x32\x30.google.cloud.translation.v3.DocumentTranslation\x12W\n\x1dglossary_document_translation\x18\x02 \x01(\x0b\x32\x30.google.cloud.translation.v3.DocumentTranslation\x12\r\n\x05model\x18\x03 \x01(\t\x12Q\n\x0fglossary_config\x18\x04 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfig\"\x88\x06\n\x19\x42\x61tchTranslateTextRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12!\n\x14source_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x15target_language_codes\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12W\n\x06models\x18\x04 \x03(\x0b\x32\x42.google.cloud.translation.v3.BatchTranslateTextRequest.ModelsEntryB\x03\xe0\x41\x01\x12\x44\n\rinput_configs\x18\x05 \x03(\x0b\x32(.google.cloud.translation.v3.InputConfigB\x03\xe0\x41\x02\x12\x45\n\routput_config\x18\x06 \x01(\x0b\x32).google.cloud.translation.v3.OutputConfigB\x03\xe0\x41\x02\x12_\n\nglossaries\x18\x07 \x03(\x0b\x32\x46.google.cloud.translation.v3.BatchTranslateTextRequest.GlossariesEntryB\x03\xe0\x41\x01\x12W\n\x06labels\x18\t \x03(\x0b\x32\x42.google.cloud.translation.v3.BatchTranslateTextRequest.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bModelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ak\n\x0fGlossariesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x05value\x18\x02 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfig:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xce\x02\n\x16\x42\x61tchTranslateMetadata\x12H\n\x05state\x18\x01 \x01(\x0e\x32\x39.google.cloud.translation.v3.BatchTranslateMetadata.State\x12\x1d\n\x15translated_characters\x18\x02 \x01(\x03\x12\x19\n\x11\x66\x61iled_characters\x18\x03 \x01(\x03\x12\x18\n\x10total_characters\x18\x04 \x01(\x03\x12/\n\x0bsubmit_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05\"\xcb\x01\n\x16\x42\x61tchTranslateResponse\x12\x18\n\x10total_characters\x18\x01 \x01(\x03\x12\x1d\n\x15translated_characters\x18\x02 \x01(\x03\x12\x19\n\x11\x66\x61iled_characters\x18\x03 \x01(\x03\x12/\n\x0bsubmit_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"]\n\x13GlossaryInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.translation.v3.GcsSourceH\x00\x42\x08\n\x06source\"\x9a\x05\n\x08Glossary\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12O\n\rlanguage_pair\x18\x03 \x01(\x0b\x32\x36.google.cloud.translation.v3.Glossary.LanguageCodePairH\x00\x12T\n\x12language_codes_set\x18\x04 \x01(\x0b\x32\x36.google.cloud.translation.v3.Glossary.LanguageCodesSetH\x00\x12\x46\n\x0cinput_config\x18\x05 \x01(\x0b\x32\x30.google.cloud.translation.v3.GlossaryInputConfig\x12\x18\n\x0b\x65ntry_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x03\x12\x34\n\x0bsubmit_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\t \x01(\tB\x03\xe0\x41\x01\x1aN\n\x10LanguageCodePair\x12\x1c\n\x14source_language_code\x18\x01 \x01(\t\x12\x1c\n\x14target_language_code\x18\x02 \x01(\t\x1a*\n\x10LanguageCodesSet\x12\x16\n\x0elanguage_codes\x18\x01 \x03(\t:e\xea\x41\x62\n!translate.googleapis.com/Glossary\x12=projects/{project}/locations/{location}/glossaries/{glossary}B\x0b\n\tlanguages\"\x90\x01\n\x15\x43reateGlossaryRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12<\n\x08glossary\x18\x02 \x01(\x0b\x32%.google.cloud.translation.v3.GlossaryB\x03\xe0\x41\x02\"\x86\x01\n\x15UpdateGlossaryRequest\x12<\n\x08glossary\x18\x01 \x01(\x0b\x32%.google.cloud.translation.v3.GlossaryB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"M\n\x12GetGlossaryRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary\"P\n\x15\x44\x65leteGlossaryRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary\"\x98\x01\n\x15ListGlossariesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"l\n\x16ListGlossariesResponse\x12\x39\n\nglossaries\x18\x01 \x03(\x0b\x32%.google.cloud.translation.v3.Glossary\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"W\n\x17GetGlossaryEntryRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&translate.googleapis.com/GlossaryEntry\"Z\n\x1a\x44\x65leteGlossaryEntryRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&translate.googleapis.com/GlossaryEntry\"\x88\x01\n\x1aListGlossaryEntriesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x86\x01\n\x1bListGlossaryEntriesResponse\x12I\n\x10glossary_entries\x18\x01 \x03(\x0b\x32*.google.cloud.translation.v3.GlossaryEntryB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xa0\x01\n\x1a\x43reateGlossaryEntryRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary\x12G\n\x0eglossary_entry\x18\x02 \x01(\x0b\x32*.google.cloud.translation.v3.GlossaryEntryB\x03\xe0\x41\x02\"e\n\x1aUpdateGlossaryEntryRequest\x12G\n\x0eglossary_entry\x18\x01 \x01(\x0b\x32*.google.cloud.translation.v3.GlossaryEntryB\x03\xe0\x41\x02\"\x88\x02\n\x16\x43reateGlossaryMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x39.google.cloud.translation.v3.CreateGlossaryMetadata.State\x12/\n\x0bsubmit_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05\"\xb3\x02\n\x16UpdateGlossaryMetadata\x12\x37\n\x08glossary\x18\x01 \x01(\x0b\x32%.google.cloud.translation.v3.Glossary\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x39.google.cloud.translation.v3.UpdateGlossaryMetadata.State\x12/\n\x0bsubmit_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05\"\x88\x02\n\x16\x44\x65leteGlossaryMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x39.google.cloud.translation.v3.DeleteGlossaryMetadata.State\x12/\n\x0bsubmit_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05\"\x85\x01\n\x16\x44\x65leteGlossaryResponse\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x0bsubmit_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xd1\x07\n\x1d\x42\x61tchTranslateDocumentRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12!\n\x14source_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x15target_language_codes\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12Q\n\rinput_configs\x18\x04 \x03(\x0b\x32\x35.google.cloud.translation.v3.BatchDocumentInputConfigB\x03\xe0\x41\x02\x12R\n\routput_config\x18\x05 \x01(\x0b\x32\x36.google.cloud.translation.v3.BatchDocumentOutputConfigB\x03\xe0\x41\x02\x12[\n\x06models\x18\x06 \x03(\x0b\x32\x46.google.cloud.translation.v3.BatchTranslateDocumentRequest.ModelsEntryB\x03\xe0\x41\x01\x12\x63\n\nglossaries\x18\x07 \x03(\x0b\x32J.google.cloud.translation.v3.BatchTranslateDocumentRequest.GlossariesEntryB\x03\xe0\x41\x01\x12r\n\x12\x66ormat_conversions\x18\x08 \x03(\x0b\x32Q.google.cloud.translation.v3.BatchTranslateDocumentRequest.FormatConversionsEntryB\x03\xe0\x41\x01\x12#\n\x16\x63ustomized_attribution\x18\n \x01(\tB\x03\xe0\x41\x01\x12-\n enable_shadow_removal_native_pdf\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01\x12\'\n\x1a\x65nable_rotation_correction\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bModelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ak\n\x0fGlossariesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x05value\x18\x02 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfig:\x02\x38\x01\x1a\x38\n\x16\x46ormatConversionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"b\n\x18\x42\x61tchDocumentInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.translation.v3.GcsSourceH\x00\x42\x08\n\x06source\"r\n\x19\x42\x61tchDocumentOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.translation.v3.GcsDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\xd9\x02\n\x1e\x42\x61tchTranslateDocumentResponse\x12\x13\n\x0btotal_pages\x18\x01 \x01(\x03\x12\x18\n\x10translated_pages\x18\x02 \x01(\x03\x12\x14\n\x0c\x66\x61iled_pages\x18\x03 \x01(\x03\x12\x1c\n\x14total_billable_pages\x18\x04 \x01(\x03\x12\x18\n\x10total_characters\x18\x05 \x01(\x03\x12\x1d\n\x15translated_characters\x18\x06 \x01(\x03\x12\x19\n\x11\x66\x61iled_characters\x18\x07 \x01(\x03\x12!\n\x19total_billable_characters\x18\x08 \x01(\x03\x12/\n\x0bsubmit_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xe4\x03\n\x1e\x42\x61tchTranslateDocumentMetadata\x12P\n\x05state\x18\x01 \x01(\x0e\x32\x41.google.cloud.translation.v3.BatchTranslateDocumentMetadata.State\x12\x13\n\x0btotal_pages\x18\x02 \x01(\x03\x12\x18\n\x10translated_pages\x18\x03 \x01(\x03\x12\x14\n\x0c\x66\x61iled_pages\x18\x04 \x01(\x03\x12\x1c\n\x14total_billable_pages\x18\x05 \x01(\x03\x12\x18\n\x10total_characters\x18\x06 \x01(\x03\x12\x1d\n\x15translated_characters\x18\x07 \x01(\x03\x12\x19\n\x11\x66\x61iled_characters\x18\x08 \x01(\x03\x12!\n\x19total_billable_characters\x18\t \x01(\x03\x12/\n\x0bsubmit_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05\"\xa1\x01\n\x1bTranslateTextGlossaryConfig\x12;\n\x08glossary\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary\x12\x18\n\x0bignore_case\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12+\n\x1e\x63ontextual_translation_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x32\xbd\x43\n\x12TranslationService\x12\xd4\x02\n\rTranslateText\x12\x31.google.cloud.translation.v3.TranslateTextRequest\x1a\x32.google.cloud.translation.v3.TranslateTextResponse\"\xdb\x01\xda\x41$parent,target_language_code,contents\xda\x41Iparent,model,mime_type,source_language_code,target_language_code,contents\x82\xd3\xe4\x93\x02\x62\"1/v3/{parent=projects/*/locations/*}:translateText:\x01*Z*\"%/v3/{parent=projects/*}:translateText:\x01*\x12\xed\x01\n\x0cRomanizeText\x12\x30.google.cloud.translation.v3.RomanizeTextRequest\x1a\x31.google.cloud.translation.v3.RomanizeTextResponse\"x\xda\x41\x0fparent,contents\x82\xd3\xe4\x93\x02`\"0/v3/{parent=projects/*/locations/*}:romanizeText:\x01*Z)\"$/v3/{parent=projects/*}:romanizeText:\x01*\x12\x87\x02\n\x0e\x44\x65tectLanguage\x12\x32.google.cloud.translation.v3.DetectLanguageRequest\x1a\x33.google.cloud.translation.v3.DetectLanguageResponse\"\x8b\x01\xda\x41\x1eparent,model,mime_type,content\x82\xd3\xe4\x93\x02\x64\"2/v3/{parent=projects/*/locations/*}:detectLanguage:\x01*Z+\"&/v3/{parent=projects/*}:detectLanguage:\x01*\x12\x97\x02\n\x15GetSupportedLanguages\x12\x39.google.cloud.translation.v3.GetSupportedLanguagesRequest\x1a/.google.cloud.translation.v3.SupportedLanguages\"\x91\x01\xda\x41\"parent,model,display_language_code\x82\xd3\xe4\x93\x02\x66\x12\x36/v3/{parent=projects/*/locations/*}/supportedLanguagesZ,\x12*/v3/{parent=projects/*}/supportedLanguages\x12\xc4\x01\n\x11TranslateDocument\x12\x35.google.cloud.translation.v3.TranslateDocumentRequest\x1a\x36.google.cloud.translation.v3.TranslateDocumentResponse\"@\x82\xd3\xe4\x93\x02:\"5/v3/{parent=projects/*/locations/*}:translateDocument:\x01*\x12\xe1\x01\n\x12\x42\x61tchTranslateText\x12\x36.google.cloud.translation.v3.BatchTranslateTextRequest\x1a\x1d.google.longrunning.Operation\"t\xca\x41\x30\n\x16\x42\x61tchTranslateResponse\x12\x16\x42\x61tchTranslateMetadata\x82\xd3\xe4\x93\x02;\"6/v3/{parent=projects/*/locations/*}:batchTranslateText:\x01*\x12\xce\x02\n\x16\x42\x61tchTranslateDocument\x12:.google.cloud.translation.v3.BatchTranslateDocumentRequest\x1a\x1d.google.longrunning.Operation\"\xd8\x01\xca\x41@\n\x1e\x42\x61tchTranslateDocumentResponse\x12\x1e\x42\x61tchTranslateDocumentMetadata\xda\x41Mparent,source_language_code,target_language_codes,input_configs,output_config\x82\xd3\xe4\x93\x02?\":/v3/{parent=projects/*/locations/*}:batchTranslateDocument:\x01*\x12\xdc\x01\n\x0e\x43reateGlossary\x12\x32.google.cloud.translation.v3.CreateGlossaryRequest\x1a\x1d.google.longrunning.Operation\"w\xca\x41\"\n\x08Glossary\x12\x16\x43reateGlossaryMetadata\xda\x41\x0fparent,glossary\x82\xd3\xe4\x93\x02:\"./v3/{parent=projects/*/locations/*}/glossaries:\x08glossary\x12\xeb\x01\n\x0eUpdateGlossary\x12\x32.google.cloud.translation.v3.UpdateGlossaryRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\xca\x41\"\n\x08Glossary\x12\x16UpdateGlossaryMetadata\xda\x41\x14glossary,update_mask\x82\xd3\xe4\x93\x02\x43\x32\x37/v3/{glossary.name=projects/*/locations/*/glossaries/*}:\x08glossary\x12\xba\x01\n\x0eListGlossaries\x12\x32.google.cloud.translation.v3.ListGlossariesRequest\x1a\x33.google.cloud.translation.v3.ListGlossariesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v3/{parent=projects/*/locations/*}/glossaries\x12\xa4\x01\n\x0bGetGlossary\x12/.google.cloud.translation.v3.GetGlossaryRequest\x1a%.google.cloud.translation.v3.Glossary\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v3/{name=projects/*/locations/*/glossaries/*}\x12\xd5\x01\n\x0e\x44\x65leteGlossary\x12\x32.google.cloud.translation.v3.DeleteGlossaryRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41\x30\n\x16\x44\x65leteGlossaryResponse\x12\x16\x44\x65leteGlossaryMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v3/{name=projects/*/locations/*/glossaries/*}\x12\xc5\x01\n\x10GetGlossaryEntry\x12\x34.google.cloud.translation.v3.GetGlossaryEntryRequest\x1a*.google.cloud.translation.v3.GlossaryEntry\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v3/{name=projects/*/locations/*/glossaries/*/glossaryEntries/*}\x12\xdb\x01\n\x13ListGlossaryEntries\x12\x37.google.cloud.translation.v3.ListGlossaryEntriesRequest\x1a\x38.google.cloud.translation.v3.ListGlossaryEntriesResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v3/{parent=projects/*/locations/*/glossaries/*}/glossaryEntries\x12\xec\x01\n\x13\x43reateGlossaryEntry\x12\x37.google.cloud.translation.v3.CreateGlossaryEntryRequest\x1a*.google.cloud.translation.v3.GlossaryEntry\"p\xda\x41\x15parent,glossary_entry\x82\xd3\xe4\x93\x02R\"@/v3/{parent=projects/*/locations/*/glossaries/*}/glossaryEntries:\x0eglossary_entry\x12\xf4\x01\n\x13UpdateGlossaryEntry\x12\x37.google.cloud.translation.v3.UpdateGlossaryEntryRequest\x1a*.google.cloud.translation.v3.GlossaryEntry\"x\xda\x41\x0eglossary_entry\x82\xd3\xe4\x93\x02\x61\x32O/v3/{glossary_entry.name=projects/*/locations/*/glossaries/*/glossaryEntries/*}:\x0eglossary_entry\x12\xb7\x01\n\x13\x44\x65leteGlossaryEntry\x12\x37.google.cloud.translation.v3.DeleteGlossaryEntryRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42*@/v3/{name=projects/*/locations/*/glossaries/*/glossaryEntries/*}\x12\xd4\x01\n\rCreateDataset\x12\x31.google.cloud.translation.v3.CreateDatasetRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41 \n\x07\x44\x61taset\x12\x15\x43reateDatasetMetadata\xda\x41\x0eparent,dataset\x82\xd3\xe4\x93\x02\x37\",/v3/{parent=projects/*/locations/*}/datasets:\x07\x64\x61taset\x12\x9f\x01\n\nGetDataset\x12..google.cloud.translation.v3.GetDatasetRequest\x1a$.google.cloud.translation.v3.Dataset\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v3/{name=projects/*/locations/*/datasets/*}\x12\xb2\x01\n\x0cListDatasets\x12\x30.google.cloud.translation.v3.ListDatasetsRequest\x1a\x31.google.cloud.translation.v3.ListDatasetsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v3/{parent=projects/*/locations/*}/datasets\x12\xcf\x01\n\rDeleteDataset\x12\x31.google.cloud.translation.v3.DeleteDatasetRequest\x1a\x1d.google.longrunning.Operation\"l\xca\x41.\n\x15google.protobuf.Empty\x12\x15\x44\x65leteDatasetMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v3/{name=projects/*/locations/*/datasets/*}\x12\xf8\x01\n\x17\x43reateAdaptiveMtDataset\x12;.google.cloud.translation.v3.CreateAdaptiveMtDatasetRequest\x1a..google.cloud.translation.v3.AdaptiveMtDataset\"p\xda\x41\x1aparent,adaptive_mt_dataset\x82\xd3\xe4\x93\x02M\"6/v3/{parent=projects/*/locations/*}/adaptiveMtDatasets:\x13\x61\x64\x61ptive_mt_dataset\x12\xb5\x01\n\x17\x44\x65leteAdaptiveMtDataset\x12;.google.cloud.translation.v3.DeleteAdaptiveMtDatasetRequest\x1a\x16.google.protobuf.Empty\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38*6/v3/{name=projects/*/locations/*/adaptiveMtDatasets/*}\x12\xc7\x01\n\x14GetAdaptiveMtDataset\x12\x38.google.cloud.translation.v3.GetAdaptiveMtDatasetRequest\x1a..google.cloud.translation.v3.AdaptiveMtDataset\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v3/{name=projects/*/locations/*/adaptiveMtDatasets/*}\x12\xda\x01\n\x16ListAdaptiveMtDatasets\x12:.google.cloud.translation.v3.ListAdaptiveMtDatasetsRequest\x1a;.google.cloud.translation.v3.ListAdaptiveMtDatasetsResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v3/{parent=projects/*/locations/*}/adaptiveMtDatasets\x12\xdd\x01\n\x13\x41\x64\x61ptiveMtTranslate\x12\x37.google.cloud.translation.v3.AdaptiveMtTranslateRequest\x1a\x38.google.cloud.translation.v3.AdaptiveMtTranslateResponse\"S\xda\x41\x0eparent,content\x82\xd3\xe4\x93\x02<\"7/v3/{parent=projects/*/locations/*}:adaptiveMtTranslate:\x01*\x12\xd0\x01\n\x11GetAdaptiveMtFile\x12\x35.google.cloud.translation.v3.GetAdaptiveMtFileRequest\x1a+.google.cloud.translation.v3.AdaptiveMtFile\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J\x12H/v3/{name=projects/*/locations/*/adaptiveMtDatasets/*/adaptiveMtFiles/*}\x12\xc1\x01\n\x14\x44\x65leteAdaptiveMtFile\x12\x38.google.cloud.translation.v3.DeleteAdaptiveMtFileRequest\x1a\x16.google.protobuf.Empty\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J*H/v3/{name=projects/*/locations/*/adaptiveMtDatasets/*/adaptiveMtFiles/*}\x12\xee\x01\n\x14ImportAdaptiveMtFile\x12\x38.google.cloud.translation.v3.ImportAdaptiveMtFileRequest\x1a\x39.google.cloud.translation.v3.ImportAdaptiveMtFileResponse\"a\xda\x41\x06parent\x82\xd3\xe4\x93\x02R\"M/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*}:importAdaptiveMtFile:\x01*\x12\xe3\x01\n\x13ListAdaptiveMtFiles\x12\x37.google.cloud.translation.v3.ListAdaptiveMtFilesRequest\x1a\x38.google.cloud.translation.v3.ListAdaptiveMtFilesResponse\"Y\xda\x41\x06parent\x82\xd3\xe4\x93\x02J\x12H/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*}/adaptiveMtFiles\x12\xd7\x02\n\x17ListAdaptiveMtSentences\x12;.google.cloud.translation.v3.ListAdaptiveMtSentencesRequest\x1a<.google.cloud.translation.v3.ListAdaptiveMtSentencesResponse\"\xc0\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xb0\x01\x12^/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*/adaptiveMtFiles/*}/adaptiveMtSentencesZN\x12L/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*}/adaptiveMtSentences\x12\xe8\x01\n\nImportData\x12..google.cloud.translation.v3.ImportDataRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41+\n\x15google.protobuf.Empty\x12\x12ImportDataMetadata\xda\x41\x14\x64\x61taset,input_config\x82\xd3\xe4\x93\x02?\":/v3/{dataset=projects/*/locations/*/datasets/*}:importData:\x01*\x12\xe9\x01\n\nExportData\x12..google.cloud.translation.v3.ExportDataRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\xca\x41+\n\x15google.protobuf.Empty\x12\x12\x45xportDataMetadata\xda\x41\x15\x64\x61taset,output_config\x82\xd3\xe4\x93\x02?\":/v3/{dataset=projects/*/locations/*/datasets/*}:exportData:\x01*\x12\xbd\x01\n\x0cListExamples\x12\x30.google.cloud.translation.v3.ListExamplesRequest\x1a\x31.google.cloud.translation.v3.ListExamplesResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v3/{parent=projects/*/locations/*/datasets/*}/examples\x12\xc6\x01\n\x0b\x43reateModel\x12/.google.cloud.translation.v3.CreateModelRequest\x1a\x1d.google.longrunning.Operation\"g\xca\x41\x1c\n\x05Model\x12\x13\x43reateModelMetadata\xda\x41\x0cparent,model\x82\xd3\xe4\x93\x02\x33\"*/v3/{parent=projects/*/locations/*}/models:\x05model\x12\xaa\x01\n\nListModels\x12..google.cloud.translation.v3.ListModelsRequest\x1a/.google.cloud.translation.v3.ListModelsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v3/{parent=projects/*/locations/*}/models\x12\x97\x01\n\x08GetModel\x12,.google.cloud.translation.v3.GetModelRequest\x1a\".google.cloud.translation.v3.Model\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v3/{name=projects/*/locations/*/models/*}\x12\xc7\x01\n\x0b\x44\x65leteModel\x12/.google.cloud.translation.v3.DeleteModelRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41,\n\x15google.protobuf.Empty\x12\x13\x44\x65leteModelMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v3/{name=projects/*/locations/*/models/*}\x1a~\xca\x41\x18translate.googleapis.com\xd2\x41`https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-translationB\xd6\x01\n\x1d\x63om.google.cloud.translate.v3B\x17TranslationServiceProtoP\x01Z;cloud.google.com/go/translate/apiv3/translatepb;translatepb\xa2\x02\x05\x43TRL3\xaa\x02\x19Google.Cloud.Translate.V3\xca\x02\x19Google\\Cloud\\Translate\\V3\xea\x02\x1cGoogle::Cloud::Translate::V3P\x00P\x01P\x02\x62\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Translate + module V3 + TransliterationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.TransliterationConfig").msgclass + TranslateTextRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.TranslateTextRequest").msgclass + TranslateTextResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.TranslateTextResponse").msgclass + Translation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.Translation").msgclass + RomanizeTextRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.RomanizeTextRequest").msgclass + Romanization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.Romanization").msgclass + RomanizeTextResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.RomanizeTextResponse").msgclass + DetectLanguageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DetectLanguageRequest").msgclass + DetectedLanguage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DetectedLanguage").msgclass + DetectLanguageResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DetectLanguageResponse").msgclass + GetSupportedLanguagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GetSupportedLanguagesRequest").msgclass + SupportedLanguages = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.SupportedLanguages").msgclass + SupportedLanguage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.SupportedLanguage").msgclass + GcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GcsSource").msgclass + InputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.InputConfig").msgclass + GcsDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GcsDestination").msgclass + OutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.OutputConfig").msgclass + DocumentInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DocumentInputConfig").msgclass + DocumentOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DocumentOutputConfig").msgclass + TranslateDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.TranslateDocumentRequest").msgclass + DocumentTranslation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DocumentTranslation").msgclass + TranslateDocumentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.TranslateDocumentResponse").msgclass + BatchTranslateTextRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTranslateTextRequest").msgclass + BatchTranslateMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTranslateMetadata").msgclass + BatchTranslateMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTranslateMetadata.State").enummodule + BatchTranslateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTranslateResponse").msgclass + GlossaryInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GlossaryInputConfig").msgclass + Glossary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.Glossary").msgclass + Glossary::LanguageCodePair = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.Glossary.LanguageCodePair").msgclass + Glossary::LanguageCodesSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.Glossary.LanguageCodesSet").msgclass + CreateGlossaryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.CreateGlossaryRequest").msgclass + UpdateGlossaryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.UpdateGlossaryRequest").msgclass + GetGlossaryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GetGlossaryRequest").msgclass + DeleteGlossaryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteGlossaryRequest").msgclass + ListGlossariesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListGlossariesRequest").msgclass + ListGlossariesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListGlossariesResponse").msgclass + GetGlossaryEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GetGlossaryEntryRequest").msgclass + DeleteGlossaryEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteGlossaryEntryRequest").msgclass + ListGlossaryEntriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListGlossaryEntriesRequest").msgclass + ListGlossaryEntriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListGlossaryEntriesResponse").msgclass + CreateGlossaryEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.CreateGlossaryEntryRequest").msgclass + UpdateGlossaryEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.UpdateGlossaryEntryRequest").msgclass + CreateGlossaryMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.CreateGlossaryMetadata").msgclass + CreateGlossaryMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.CreateGlossaryMetadata.State").enummodule + UpdateGlossaryMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.UpdateGlossaryMetadata").msgclass + UpdateGlossaryMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.UpdateGlossaryMetadata.State").enummodule + DeleteGlossaryMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteGlossaryMetadata").msgclass + DeleteGlossaryMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteGlossaryMetadata.State").enummodule + DeleteGlossaryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteGlossaryResponse").msgclass + BatchTranslateDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTranslateDocumentRequest").msgclass + BatchDocumentInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchDocumentInputConfig").msgclass + BatchDocumentOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchDocumentOutputConfig").msgclass + BatchTranslateDocumentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTranslateDocumentResponse").msgclass + BatchTranslateDocumentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTranslateDocumentMetadata").msgclass + BatchTranslateDocumentMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTranslateDocumentMetadata.State").enummodule + TranslateTextGlossaryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.TranslateTextGlossaryConfig").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service_services_pb.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service_services_pb.rb new file mode 100644 index 000000000000..d7dd9d8ae961 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service_services_pb.rb @@ -0,0 +1,141 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/translate/v3/translation_service.proto for package 'Google.Cloud.Translate.V3' +# 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/translate/v3/translation_service_pb' + +module Google + module Cloud + module Translate + module V3 + module TranslationService + # Proto file for the Cloud Translation API (v3 GA). + # + # Provides natural language translation operations. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.translation.v3.TranslationService' + + # Translates input text and returns translated text. + rpc :TranslateText, ::Google::Cloud::Translate::V3::TranslateTextRequest, ::Google::Cloud::Translate::V3::TranslateTextResponse + # Romanize input text written in non-Latin scripts to Latin text. + rpc :RomanizeText, ::Google::Cloud::Translate::V3::RomanizeTextRequest, ::Google::Cloud::Translate::V3::RomanizeTextResponse + # Detects the language of text within a request. + rpc :DetectLanguage, ::Google::Cloud::Translate::V3::DetectLanguageRequest, ::Google::Cloud::Translate::V3::DetectLanguageResponse + # Returns a list of supported languages for translation. + rpc :GetSupportedLanguages, ::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest, ::Google::Cloud::Translate::V3::SupportedLanguages + # Translates documents in synchronous mode. + rpc :TranslateDocument, ::Google::Cloud::Translate::V3::TranslateDocumentRequest, ::Google::Cloud::Translate::V3::TranslateDocumentResponse + # Translates a large volume of text in asynchronous batch mode. + # This function provides real-time output as the inputs are being processed. + # If caller cancels a request, the partial results (for an input file, it's + # all or nothing) may still be available on the specified output location. + # + # This call returns immediately and you can + # use google.longrunning.Operation.name to poll the status of the call. + rpc :BatchTranslateText, ::Google::Cloud::Translate::V3::BatchTranslateTextRequest, ::Google::Longrunning::Operation + # Translates a large volume of document in asynchronous batch mode. + # This function provides real-time output as the inputs are being processed. + # If caller cancels a request, the partial results (for an input file, it's + # all or nothing) may still be available on the specified output location. + # + # This call returns immediately and you can use + # google.longrunning.Operation.name to poll the status of the call. + rpc :BatchTranslateDocument, ::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest, ::Google::Longrunning::Operation + # Creates a glossary and returns the long-running operation. Returns + # NOT_FOUND, if the project doesn't exist. + rpc :CreateGlossary, ::Google::Cloud::Translate::V3::CreateGlossaryRequest, ::Google::Longrunning::Operation + # Updates a glossary. A LRO is used since the update can be async if the + # glossary's entry file is updated. + rpc :UpdateGlossary, ::Google::Cloud::Translate::V3::UpdateGlossaryRequest, ::Google::Longrunning::Operation + # Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't + # exist. + rpc :ListGlossaries, ::Google::Cloud::Translate::V3::ListGlossariesRequest, ::Google::Cloud::Translate::V3::ListGlossariesResponse + # Gets a glossary. Returns NOT_FOUND, if the glossary doesn't + # exist. + rpc :GetGlossary, ::Google::Cloud::Translate::V3::GetGlossaryRequest, ::Google::Cloud::Translate::V3::Glossary + # Deletes a glossary, or cancels glossary construction + # if the glossary isn't created yet. + # Returns NOT_FOUND, if the glossary doesn't exist. + rpc :DeleteGlossary, ::Google::Cloud::Translate::V3::DeleteGlossaryRequest, ::Google::Longrunning::Operation + # Gets a single glossary entry by the given id. + rpc :GetGlossaryEntry, ::Google::Cloud::Translate::V3::GetGlossaryEntryRequest, ::Google::Cloud::Translate::V3::GlossaryEntry + # List the entries for the glossary. + rpc :ListGlossaryEntries, ::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest, ::Google::Cloud::Translate::V3::ListGlossaryEntriesResponse + # Creates a glossary entry. + rpc :CreateGlossaryEntry, ::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest, ::Google::Cloud::Translate::V3::GlossaryEntry + # Updates a glossary entry. + rpc :UpdateGlossaryEntry, ::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest, ::Google::Cloud::Translate::V3::GlossaryEntry + # Deletes a single entry from the glossary + rpc :DeleteGlossaryEntry, ::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest, ::Google::Protobuf::Empty + # Creates a Dataset. + rpc :CreateDataset, ::Google::Cloud::Translate::V3::CreateDatasetRequest, ::Google::Longrunning::Operation + # Gets a Dataset. + rpc :GetDataset, ::Google::Cloud::Translate::V3::GetDatasetRequest, ::Google::Cloud::Translate::V3::Dataset + # Lists datasets. + rpc :ListDatasets, ::Google::Cloud::Translate::V3::ListDatasetsRequest, ::Google::Cloud::Translate::V3::ListDatasetsResponse + # Deletes a dataset and all of its contents. + rpc :DeleteDataset, ::Google::Cloud::Translate::V3::DeleteDatasetRequest, ::Google::Longrunning::Operation + # Creates an Adaptive MT dataset. + rpc :CreateAdaptiveMtDataset, ::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest, ::Google::Cloud::Translate::V3::AdaptiveMtDataset + # Deletes an Adaptive MT dataset, including all its entries and associated + # metadata. + rpc :DeleteAdaptiveMtDataset, ::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest, ::Google::Protobuf::Empty + # Gets the Adaptive MT dataset. + rpc :GetAdaptiveMtDataset, ::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest, ::Google::Cloud::Translate::V3::AdaptiveMtDataset + # Lists all Adaptive MT datasets for which the caller has read permission. + rpc :ListAdaptiveMtDatasets, ::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest, ::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsResponse + # Translate text using Adaptive MT. + rpc :AdaptiveMtTranslate, ::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest, ::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse + # Gets and AdaptiveMtFile + rpc :GetAdaptiveMtFile, ::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest, ::Google::Cloud::Translate::V3::AdaptiveMtFile + # Deletes an AdaptiveMtFile along with its sentences. + rpc :DeleteAdaptiveMtFile, ::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest, ::Google::Protobuf::Empty + # Imports an AdaptiveMtFile and adds all of its sentences into the + # AdaptiveMtDataset. + rpc :ImportAdaptiveMtFile, ::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest, ::Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse + # Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset. + rpc :ListAdaptiveMtFiles, ::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest, ::Google::Cloud::Translate::V3::ListAdaptiveMtFilesResponse + # Lists all AdaptiveMtSentences under a given file/dataset. + rpc :ListAdaptiveMtSentences, ::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest, ::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesResponse + # Import sentence pairs into translation Dataset. + rpc :ImportData, ::Google::Cloud::Translate::V3::ImportDataRequest, ::Google::Longrunning::Operation + # Exports dataset's data to the provided output location. + rpc :ExportData, ::Google::Cloud::Translate::V3::ExportDataRequest, ::Google::Longrunning::Operation + # Lists sentence pairs in the dataset. + rpc :ListExamples, ::Google::Cloud::Translate::V3::ListExamplesRequest, ::Google::Cloud::Translate::V3::ListExamplesResponse + # Creates a Model. + rpc :CreateModel, ::Google::Cloud::Translate::V3::CreateModelRequest, ::Google::Longrunning::Operation + # Lists models. + rpc :ListModels, ::Google::Cloud::Translate::V3::ListModelsRequest, ::Google::Cloud::Translate::V3::ListModelsResponse + # Gets a model. + rpc :GetModel, ::Google::Cloud::Translate::V3::GetModelRequest, ::Google::Cloud::Translate::V3::Model + # Deletes a model. + rpc :DeleteModel, ::Google::Cloud::Translate::V3::DeleteModelRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/version.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/version.rb new file mode 100644 index 000000000000..dacb619abd34 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/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 Translate + module V3 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-translate-v3/proto_docs/README.md b/owl-bot-staging/google-cloud-translate-v3/proto_docs/README.md new file mode 100644 index 000000000000..4a5eb6a2d169 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Translation V3 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-translate-v3/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # 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. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + # + # Example: + # + # 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 + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # 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 + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # 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 + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/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-translate-v3/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/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-translate-v3/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/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-translate-v3/proto_docs/google/cloud/translate/v3/adaptive_mt.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/adaptive_mt.rb new file mode 100644 index 000000000000..9c20fdd4d804 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/adaptive_mt.rb @@ -0,0 +1,405 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Translate + module V3 + # An Adaptive MT Dataset. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the dataset, in form of + # `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_id}` + # @!attribute [rw] display_name + # @return [::String] + # The name of the dataset to show in the interface. The name can be + # up to 32 characters long and can consist only of ASCII Latin letters A-Z + # and a-z, underscores (_), and ASCII digits 0-9. + # @!attribute [rw] source_language_code + # @return [::String] + # The BCP-47 language code of the source language. + # @!attribute [rw] target_language_code + # @return [::String] + # The BCP-47 language code of the target language. + # @!attribute [rw] example_count + # @return [::Integer] + # The number of examples in the dataset. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when this dataset was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when this dataset was last updated. + class AdaptiveMtDataset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + #  Request message for creating an AdaptiveMtDataset. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the parent project. In form of + # `projects/{project-number-or-id}/locations/{location-id}` + # @!attribute [rw] adaptive_mt_dataset + # @return [::Google::Cloud::Translate::V3::AdaptiveMtDataset] + # Required. The AdaptiveMtDataset to be created. + class CreateAdaptiveMtDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting an AdaptiveMtDataset. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the dataset. In the form of + # `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` + class DeleteAdaptiveMtDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting an Adaptive MT dataset. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the dataset. In the form of + # `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` + class GetAdaptiveMtDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing all Adaptive MT datasets that the requestor has + # access to. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the project from which to list the Adaptive + # MT datasets. `projects/{project-number-or-id}/locations/{location-id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. The server may return fewer results than + # requested. If unspecified, the server picks an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # Typically, this is the value of + # ListAdaptiveMtDatasetsResponse.next_page_token returned from the + # previous call to `ListAdaptiveMtDatasets` method. The first page is + # returned if `page_token`is empty or missing. + # @!attribute [rw] filter + # @return [::String] + # Optional. An expression for filtering the results of the request. + # Filter is not supported yet. + class ListAdaptiveMtDatasetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A list of AdaptiveMtDatasets. + # @!attribute [r] adaptive_mt_datasets + # @return [::Array<::Google::Cloud::Translate::V3::AdaptiveMtDataset>] + # Output only. A list of Adaptive MT datasets. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token to retrieve a page of results. Pass this value in the + # [ListAdaptiveMtDatasetsRequest.page_token] field in the subsequent call to + # `ListAdaptiveMtDatasets` method to retrieve the next page of results. + class ListAdaptiveMtDatasetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for sending an AdaptiveMt translation query. + # @!attribute [rw] parent + # @return [::String] + # Required. Location to make a regional call. + # + # Format: `projects/{project-number-or-id}/locations/{location-id}`. + # @!attribute [rw] dataset + # @return [::String] + # Required. The resource name for the dataset to use for adaptive MT. + # `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}` + # @!attribute [rw] content + # @return [::Array<::String>] + # Required. The content of the input in string format. + # @!attribute [rw] reference_sentence_config + # @return [::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::ReferenceSentenceConfig] + # Configuration for caller provided reference sentences. + # @!attribute [rw] glossary_config + # @return [::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::GlossaryConfig] + # Optional. Glossary to be applied. The glossary must be + # within the same region (have the same location-id) as the model, otherwise + # an INVALID_ARGUMENT (400) error is returned. + class AdaptiveMtTranslateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A pair of sentences used as reference in source and target languages. + # @!attribute [rw] source_sentence + # @return [::String] + # Source sentence in the sentence pair. + # @!attribute [rw] target_sentence + # @return [::String] + # Target sentence in the sentence pair. + class ReferenceSentencePair + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A list of reference sentence pairs. + # @!attribute [rw] reference_sentence_pairs + # @return [::Array<::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::ReferenceSentencePair>] + # Reference sentence pairs. + class ReferenceSentencePairList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message of caller-provided reference configuration. + # @!attribute [rw] reference_sentence_pair_lists + # @return [::Array<::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::ReferenceSentencePairList>] + # Reference sentences pair lists. Each list will be used as the references + # to translate the sentence under "content" field at the corresponding + # index. Length of the list is required to be equal to the length of + # "content" field. + # @!attribute [rw] source_language_code + # @return [::String] + # Source language code. + # @!attribute [rw] target_language_code + # @return [::String] + # Target language code. + class ReferenceSentenceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configures which glossary is used for a specific target language and + # defines + # options for applying that glossary. + # @!attribute [rw] glossary + # @return [::String] + # Required. The `glossary` to be applied for this translation. + # + # The format depends on the glossary: + # + # - User-provided custom glossary: + # `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}` + # @!attribute [rw] ignore_case + # @return [::Boolean] + # Optional. Indicates match is case insensitive. The default value is + # `false` if missing. + # @!attribute [rw] contextual_translation_enabled + # @return [::Boolean] + # Optional. If set to true, the glossary will be used for contextual + # translation. + class GlossaryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # An AdaptiveMt translation. + # @!attribute [r] translated_text + # @return [::String] + # Output only. The translated text. + class AdaptiveMtTranslation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An AdaptiveMtTranslate response. + # @!attribute [r] translations + # @return [::Array<::Google::Cloud::Translate::V3::AdaptiveMtTranslation>] + # Output only. The translation. + # @!attribute [r] language_code + # @return [::String] + # Output only. The translation's language code. + # @!attribute [rw] glossary_translations + # @return [::Array<::Google::Cloud::Translate::V3::AdaptiveMtTranslation>] + # Text translation response if a glossary is provided in the request. This + # could be the same as 'translation' above if no terms apply. + class AdaptiveMtTranslateResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An AdaptiveMtFile. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the file, in form of + # `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + # @!attribute [rw] display_name + # @return [::String] + # The file's display name. + # @!attribute [rw] entry_count + # @return [::Integer] + # The number of entries that the file contains. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when this file was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when this file was last updated. + class AdaptiveMtFile + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for getting an AdaptiveMtFile. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the file, in form of + # `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + class GetAdaptiveMtFileRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for deleting an AdaptiveMt file. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the file to delete, in form of + # `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + class DeleteAdaptiveMtFileRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for importing an AdaptiveMt file along with its sentences. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the file, in form of + # `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}` + # @!attribute [rw] file_input_source + # @return [::Google::Cloud::Translate::V3::FileInputSource] + # Inline file source. + # + # Note: The following fields are mutually exclusive: `file_input_source`, `gcs_input_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gcs_input_source + # @return [::Google::Cloud::Translate::V3::GcsInputSource] + # Google Cloud Storage file source. + # + # Note: The following fields are mutually exclusive: `gcs_input_source`, `file_input_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ImportAdaptiveMtFileRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for importing an AdaptiveMtFile + # @!attribute [r] adaptive_mt_file + # @return [::Google::Cloud::Translate::V3::AdaptiveMtFile] + # Output only. The Adaptive MT file that was imported. + class ImportAdaptiveMtFileResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list all AdaptiveMt files under a given dataset. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the project from which to list the Adaptive + # MT files. + # `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # Typically, this is the value of + # ListAdaptiveMtFilesResponse.next_page_token returned from the + # previous call to `ListAdaptiveMtFiles` method. The first page is + # returned if `page_token`is empty or missing. + class ListAdaptiveMtFilesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for listing all AdaptiveMt files under a given dataset. + # @!attribute [r] adaptive_mt_files + # @return [::Array<::Google::Cloud::Translate::V3::AdaptiveMtFile>] + # Output only. The Adaptive MT files. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token to retrieve a page of results. Pass this value in the + # ListAdaptiveMtFilesRequest.page_token field in the subsequent call to + # `ListAdaptiveMtFiles` method to retrieve the next page of results. + class ListAdaptiveMtFilesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An AdaptiveMt sentence entry. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the file, in form of + # `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}/adaptiveMtSentences/{sentence}` + # @!attribute [rw] source_sentence + # @return [::String] + # Required. The source sentence. + # @!attribute [rw] target_sentence + # @return [::String] + # Required. The target sentence. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when this sentence was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when this sentence was last updated. + class AdaptiveMtSentence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for listing Adaptive MT sentences from a Dataset/File. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the project from which to list the Adaptive + # MT files. The following format lists all sentences under a file. + # `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + # The following format lists all sentences within a dataset. + # `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` + # @!attribute [rw] page_size + # @return [::Integer] + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results the server should return. + # Typically, this is the value of + # ListAdaptiveMtSentencesRequest.next_page_token returned from the + # previous call to `ListTranslationMemories` method. The first page is + # returned if `page_token` is empty or missing. + class ListAdaptiveMtSentencesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List AdaptiveMt sentences response. + # @!attribute [r] adaptive_mt_sentences + # @return [::Array<::Google::Cloud::Translate::V3::AdaptiveMtSentence>] + # Output only. The list of AdaptiveMtSentences. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. + class ListAdaptiveMtSentencesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/automl_translation.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/automl_translation.rb new file mode 100644 index 000000000000..0c1912d9abd3 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/automl_translation.rb @@ -0,0 +1,487 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Translate + module V3 + # Request message for ImportData. + # @!attribute [rw] dataset + # @return [::String] + # Required. Name of the dataset. In form of + # `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` + # @!attribute [rw] input_config + # @return [::Google::Cloud::Translate::V3::DatasetInputConfig] + # Required. The config for the input content. + class ImportDataRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input configuration for datasets. + # @!attribute [rw] input_files + # @return [::Array<::Google::Cloud::Translate::V3::DatasetInputConfig::InputFile>] + # Files containing the sentence pairs to be imported to the dataset. + class DatasetInputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An input file. + # @!attribute [rw] usage + # @return [::String] + # Optional. Usage of the file contents. Options are TRAIN|VALIDATION|TEST, + # or UNASSIGNED (by default) for auto split. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::Translate::V3::GcsInputSource] + # Google Cloud Storage file source. + class InputFile + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Metadata of import data operation. + # @!attribute [rw] state + # @return [::Google::Cloud::Translate::V3::OperationState] + # The current state of the operation. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The creation time of the operation. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The last update time of the operation. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # Only populated when operation doesn't succeed. + class ImportDataMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ExportData. + # @!attribute [rw] dataset + # @return [::String] + # Required. Name of the dataset. In form of + # `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` + # @!attribute [rw] output_config + # @return [::Google::Cloud::Translate::V3::DatasetOutputConfig] + # Required. The config for the output content. + class ExportDataRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Output configuration for datasets. + # @!attribute [rw] gcs_destination + # @return [::Google::Cloud::Translate::V3::GcsOutputDestination] + # Google Cloud Storage destination to write the output. + class DatasetOutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata of export data operation. + # @!attribute [rw] state + # @return [::Google::Cloud::Translate::V3::OperationState] + # The current state of the operation. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The creation time of the operation. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The last update time of the operation. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # Only populated when operation doesn't succeed. + class ExportDataMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteDataset. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the dataset to delete. + class DeleteDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata of delete dataset operation. + # @!attribute [rw] state + # @return [::Google::Cloud::Translate::V3::OperationState] + # The current state of the operation. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The creation time of the operation. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The last update time of the operation. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # Only populated when operation doesn't succeed. + class DeleteDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetDataset. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the dataset to retrieve. + class GetDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListDatasets. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the parent project. In form of + # `projects/{project-number-or-id}/locations/{location-id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. The server can return fewer results than + # requested. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results for the server to return. + # Typically obtained from next_page_token field in the response of a + # ListDatasets call. + class ListDatasetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListDatasets. + # @!attribute [rw] datasets + # @return [::Array<::Google::Cloud::Translate::V3::Dataset>] + # The datasets read. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. + # Pass this token to the page_token field in the ListDatasetsRequest to + # obtain the corresponding page. + class ListDatasetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateDataset. + # @!attribute [rw] parent + # @return [::String] + # Required. The project name. + # @!attribute [rw] dataset + # @return [::Google::Cloud::Translate::V3::Dataset] + # Required. The Dataset to create. + class CreateDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata of create dataset operation. + # @!attribute [rw] state + # @return [::Google::Cloud::Translate::V3::OperationState] + # The current state of the operation. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The creation time of the operation. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The last update time of the operation. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # Only populated when operation doesn't succeed. + class CreateDatasetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListExamples. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the parent dataset. In form of + # `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` + # @!attribute [rw] filter + # @return [::String] + # Optional. An expression for filtering the examples that will be returned. + # Example filter: + # * `usage=TRAIN` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. The server can return fewer results than + # requested. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results for the server to return. + # Typically obtained from next_page_token field in the response of a + # ListExamples call. + class ListExamplesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListExamples. + # @!attribute [rw] examples + # @return [::Array<::Google::Cloud::Translate::V3::Example>] + # The sentence pairs. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. + # Pass this token to the page_token field in the ListExamplesRequest to + # obtain the corresponding page. + class ListExamplesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A sentence pair. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the example, in form of + # `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}` + # @!attribute [rw] source_text + # @return [::String] + # Sentence in source language. + # @!attribute [rw] target_text + # @return [::String] + # Sentence in target language. + # @!attribute [r] usage + # @return [::String] + # Output only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST. + class Example + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for BatchTransferResources. + # @!attribute [rw] responses + # @return [::Array<::Google::Cloud::Translate::V3::BatchTransferResourcesResponse::TransferResourceResponse>] + # Responses of the transfer for individual resources. + class BatchTransferResourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Transfer response for a single resource. + # @!attribute [rw] source + # @return [::String] + # Full name of the resource to transfer as specified in the request. + # @!attribute [rw] target + # @return [::String] + # Full name of the new resource successfully transferred from the source + # hosted by Translation API. Target will be empty if the transfer failed. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result in case of failure. + class TransferResourceResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A dataset that hosts the examples (sentence pairs) used for translation + # models. + # @!attribute [rw] name + # @return [::String] + # The resource name of the dataset, in form of + # `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}` + # @!attribute [rw] display_name + # @return [::String] + # The name of the dataset to show in the interface. The name can be + # up to 32 characters long and can consist only of ASCII Latin letters A-Z + # and a-z, underscores (_), and ASCII digits 0-9. + # @!attribute [rw] source_language_code + # @return [::String] + # The BCP-47 language code of the source language. + # @!attribute [rw] target_language_code + # @return [::String] + # The BCP-47 language code of the target language. + # @!attribute [r] example_count + # @return [::Integer] + # Output only. The number of examples in the dataset. + # @!attribute [r] train_example_count + # @return [::Integer] + # Output only. Number of training examples (sentence pairs). + # @!attribute [r] validate_example_count + # @return [::Integer] + # Output only. Number of validation examples (sentence pairs). + # @!attribute [r] test_example_count + # @return [::Integer] + # Output only. Number of test examples (sentence pairs). + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when this dataset was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when this dataset was last updated. + class Dataset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateModel. + # @!attribute [rw] parent + # @return [::String] + # Required. The project name, in form of + # `projects/{project}/locations/{location}` + # @!attribute [rw] model + # @return [::Google::Cloud::Translate::V3::Model] + # Required. The Model to create. + class CreateModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata of create model operation. + # @!attribute [rw] state + # @return [::Google::Cloud::Translate::V3::OperationState] + # The current state of the operation. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The creation time of the operation. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The last update time of the operation. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # Only populated when operation doesn't succeed. + class CreateModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListModels. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the parent project. In form of + # `projects/{project-number-or-id}/locations/{location-id}` + # @!attribute [rw] filter + # @return [::String] + # Optional. An expression for filtering the models that will be returned. + # Supported filter: + # `dataset_id=${dataset_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. The server can return fewer results than + # requested. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results for the server to return. + # Typically obtained from next_page_token field in the response of a + # ListModels call. + class ListModelsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListModels. + # @!attribute [rw] models + # @return [::Array<::Google::Cloud::Translate::V3::Model>] + # The models read. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. + # Pass this token to the page_token field in the ListModelsRequest to + # obtain the corresponding page. + class ListModelsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetModel. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the model to retrieve. + class GetModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteModel. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the model to delete. + class DeleteModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata of delete model operation. + # @!attribute [rw] state + # @return [::Google::Cloud::Translate::V3::OperationState] + # The current state of the operation. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The creation time of the operation. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The last update time of the operation. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # Only populated when operation doesn't succeed. + class DeleteModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A trained translation model. + # @!attribute [rw] name + # @return [::String] + # The resource name of the model, in form of + # `projects/{project-number-or-id}/locations/{location_id}/models/{model_id}` + # @!attribute [rw] display_name + # @return [::String] + # The name of the model to show in the interface. The name can be + # up to 32 characters long and can consist only of ASCII Latin letters A-Z + # and a-z, underscores (_), and ASCII digits 0-9. + # @!attribute [rw] dataset + # @return [::String] + # The dataset from which the model is trained, in form of + # `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}` + # @!attribute [r] source_language_code + # @return [::String] + # Output only. The BCP-47 language code of the source language. + # @!attribute [r] target_language_code + # @return [::String] + # Output only. The BCP-47 language code of the target language. + # @!attribute [r] train_example_count + # @return [::Integer] + # Output only. Number of examples (sentence pairs) used to train the model. + # @!attribute [r] validate_example_count + # @return [::Integer] + # Output only. Number of examples (sentence pairs) used to validate the + # model. + # @!attribute [r] test_example_count + # @return [::Integer] + # Output only. Number of examples (sentence pairs) used to test the model. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the model resource was created, which is also + # when the training started. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when this model was last updated. + class Model + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/common.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/common.rb new file mode 100644 index 000000000000..2309b07edac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/common.rb @@ -0,0 +1,143 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Translate + module V3 + # The Google Cloud Storage location for the input content. + # @!attribute [rw] input_uri + # @return [::String] + # Required. Source data URI. For example, `gs://my_bucket/my_object`. + class GcsInputSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An inlined file. + # @!attribute [rw] mime_type + # @return [::String] + # Required. The file's mime type. + # @!attribute [rw] content + # @return [::String] + # Required. The file's byte contents. + # @!attribute [rw] display_name + # @return [::String] + # Required. The file's display name. + class FileInputSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The Google Cloud Storage location for the output content. + # @!attribute [rw] output_uri_prefix + # @return [::String] + # Required. Google Cloud Storage URI to output directory. For example, + # `gs://bucket/directory`. The requesting user must have write permission to + # the bucket. The directory will be created if it doesn't exist. + class GcsOutputDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a single entry in a glossary. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the entry. + # Format: + # `projects/*/locations/*/glossaries/*/glossaryEntries/*` + # @!attribute [rw] terms_pair + # @return [::Google::Cloud::Translate::V3::GlossaryEntry::GlossaryTermsPair] + # Used for an unidirectional glossary. + # + # Note: The following fields are mutually exclusive: `terms_pair`, `terms_set`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] terms_set + # @return [::Google::Cloud::Translate::V3::GlossaryEntry::GlossaryTermsSet] + # Used for an equivalent term sets glossary. + # + # Note: The following fields are mutually exclusive: `terms_set`, `terms_pair`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] description + # @return [::String] + # Describes the glossary entry. + class GlossaryEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents a single entry for an unidirectional glossary. + # @!attribute [rw] source_term + # @return [::Google::Cloud::Translate::V3::GlossaryTerm] + # The source term is the term that will get match in the text, + # @!attribute [rw] target_term + # @return [::Google::Cloud::Translate::V3::GlossaryTerm] + # The term that will replace the match source term. + class GlossaryTermsPair + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a single entry for an equivalent term set glossary. This is used + # for equivalent term sets where each term can be replaced by the other terms + # in the set. + # @!attribute [rw] terms + # @return [::Array<::Google::Cloud::Translate::V3::GlossaryTerm>] + # Each term in the set represents a term that can be replaced by the other + # terms. + class GlossaryTermsSet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Represents a single glossary term + # @!attribute [rw] language_code + # @return [::String] + # The language for this glossary term. + # @!attribute [rw] text + # @return [::String] + # The text for the glossary term. + class GlossaryTerm + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Possible states of long running operations. + module OperationState + # Invalid. + OPERATION_STATE_UNSPECIFIED = 0 + + # Request is being processed. + OPERATION_STATE_RUNNING = 1 + + # The operation was successful. + OPERATION_STATE_SUCCEEDED = 2 + + # Failed to process operation. + OPERATION_STATE_FAILED = 3 + + # Request is in the process of being canceled after caller invoked + # longrunning.Operations.CancelOperation on the request id. + OPERATION_STATE_CANCELLING = 4 + + # The operation request was successfully canceled. + OPERATION_STATE_CANCELLED = 5 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/translation_service.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/translation_service.rb new file mode 100644 index 000000000000..314073d5ff59 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/translation_service.rb @@ -0,0 +1,1657 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Translate + module V3 + # Configures transliteration feature on top of translation. + # @!attribute [rw] enable_transliteration + # @return [::Boolean] + # If true, source text in romanized form can be translated to the target + # language. + class TransliterationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for synchronous translation. + # @!attribute [rw] contents + # @return [::Array<::String>] + # Required. The content of the input in string format. + # We recommend the total content be less than 30,000 codepoints. The max + # length of this field is 1024. Use BatchTranslateText for larger text. + # @!attribute [rw] mime_type + # @return [::String] + # Optional. The format of the source text, for example, "text/html", + # "text/plain". If left blank, the MIME type defaults to "text/html". + # @!attribute [rw] source_language_code + # @return [::String] + # Optional. The ISO-639 language code of the input text if + # known, for example, "en-US" or "sr-Latn". Supported language codes are + # listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). If the source + # language isn't specified, the API attempts to identify the source language + # automatically and returns the source language within the response. + # @!attribute [rw] target_language_code + # @return [::String] + # Required. The ISO-639 language code to use for translation of the input + # text, set to one of the language codes listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). + # @!attribute [rw] parent + # @return [::String] + # Required. Project or location to make a call. Must refer to a caller's + # project. + # + # Format: `projects/{project-number-or-id}` or + # `projects/{project-number-or-id}/locations/{location-id}`. + # + # For global calls, use `projects/{project-number-or-id}/locations/global` or + # `projects/{project-number-or-id}`. + # + # Non-global location is required for requests using AutoML models or + # custom glossaries. + # + # Models and glossaries must be within the same region (have same + # location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + # @!attribute [rw] model + # @return [::String] + # Optional. The `model` type requested for this translation. + # + # The format depends on model type: + # + # - AutoML Translation models: + # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + # + # - General (built-in) models: + # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + # + # - Translation LLM models: + # `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, + # + # For global (non-regionalized) requests, use `location-id` `global`. + # For example, + # `projects/{project-number-or-id}/locations/global/models/general/nmt`. + # + # If not provided, the default Google model (NMT) will be used + # @!attribute [rw] glossary_config + # @return [::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig] + # Optional. Glossary to be applied. The glossary must be + # within the same region (have the same location-id) as the model, otherwise + # an INVALID_ARGUMENT (400) error is returned. + # @!attribute [rw] transliteration_config + # @return [::Google::Cloud::Translate::V3::TransliterationConfig] + # Optional. Transliteration to be applied. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. + # + # See https://cloud.google.com/translate/docs/advanced/labels for more + # information. + class TranslateTextRequest + 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 + + # @!attribute [rw] translations + # @return [::Array<::Google::Cloud::Translate::V3::Translation>] + # Text translation responses with no glossary applied. + # This field has the same length as + # {::Google::Cloud::Translate::V3::TranslateTextRequest#contents `contents`}. + # @!attribute [rw] glossary_translations + # @return [::Array<::Google::Cloud::Translate::V3::Translation>] + # Text translation responses if a glossary is provided in the request. + # This can be the same as + # {::Google::Cloud::Translate::V3::TranslateTextResponse#translations `translations`} + # if no terms apply. This field has the same length as + # {::Google::Cloud::Translate::V3::TranslateTextRequest#contents `contents`}. + class TranslateTextResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A single translation response. + # @!attribute [rw] translated_text + # @return [::String] + # Text translated into the target language. + # If an error occurs during translation, this field might be excluded from + # the response. + # @!attribute [rw] model + # @return [::String] + # Only present when `model` is present in the request. + # `model` here is normalized to have project number. + # + # For example: + # If the `model` requested in TranslationTextRequest is + # `projects/{project-id}/locations/{location-id}/models/general/nmt` then + # `model` here would be normalized to + # `projects/{project-number}/locations/{location-id}/models/general/nmt`. + # @!attribute [rw] detected_language_code + # @return [::String] + # The ISO-639 language code of source text in the initial request, detected + # automatically, if no source language was passed within the initial + # request. If the source language was passed, auto-detection of the language + # does not occur and this field is empty. + # @!attribute [rw] glossary_config + # @return [::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig] + # The `glossary_config` used for this translation. + class Translation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for synchronous romanization. + # @!attribute [rw] parent + # @return [::String] + # Required. Project or location to make a call. Must refer to a caller's + # project. + # + # Format: `projects/{project-number-or-id}/locations/{location-id}` or + # `projects/{project-number-or-id}`. + # + # For global calls, use `projects/{project-number-or-id}/locations/global` or + # `projects/{project-number-or-id}`. + # @!attribute [rw] contents + # @return [::Array<::String>] + # Required. The content of the input in string format. + # @!attribute [rw] source_language_code + # @return [::String] + # Optional. The ISO-639 language code of the input text if + # known, for example, "hi" or "zh". Supported language codes are + # listed in [Language + # Support](https://cloud.google.com/translate/docs/languages#roman). If the + # source language isn't specified, the API attempts to identify the source + # language automatically and returns the source language for each content in + # the response. + class RomanizeTextRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A single romanization response. + # @!attribute [rw] romanized_text + # @return [::String] + # Romanized text. + # If an error occurs during romanization, this field might be excluded from + # the response. + # @!attribute [rw] detected_language_code + # @return [::String] + # The ISO-639 language code of source text in the initial request, detected + # automatically, if no source language was passed within the initial + # request. If the source language was passed, auto-detection of the language + # does not occur and this field is empty. + class Romanization + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for synchronous romanization. + # @!attribute [rw] romanizations + # @return [::Array<::Google::Cloud::Translate::V3::Romanization>] + # Text romanization responses. + # This field has the same length as + # {::Google::Cloud::Translate::V3::RomanizeTextRequest#contents `contents`}. + class RomanizeTextResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for language detection. + # @!attribute [rw] parent + # @return [::String] + # Required. Project or location to make a call. Must refer to a caller's + # project. + # + # Format: `projects/{project-number-or-id}/locations/{location-id}` or + # `projects/{project-number-or-id}`. + # + # For global calls, use `projects/{project-number-or-id}/locations/global` or + # `projects/{project-number-or-id}`. + # + # Only models within the same region (has same location-id) can be used. + # Otherwise an INVALID_ARGUMENT (400) error is returned. + # @!attribute [rw] model + # @return [::String] + # Optional. The language detection model to be used. + # + # Format: + # `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` + # + # Only one language detection model is currently supported: + # `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. + # + # If not specified, the default model is used. + # @!attribute [rw] content + # @return [::String] + # The content of the input stored as a string. + # @!attribute [rw] mime_type + # @return [::String] + # Optional. The format of the source text, for example, "text/html", + # "text/plain". If left blank, the MIME type defaults to "text/html". + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. + # + # See https://cloud.google.com/translate/docs/advanced/labels for more + # information. + class DetectLanguageRequest + 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 message for language detection. + # @!attribute [rw] language_code + # @return [::String] + # The ISO-639 language code of the source content in the request, detected + # automatically. + # @!attribute [rw] confidence + # @return [::Float] + # The confidence of the detection result for this language. + class DetectedLanguage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for language detection. + # @!attribute [rw] languages + # @return [::Array<::Google::Cloud::Translate::V3::DetectedLanguage>] + # The most probable language detected by the Translation API. For each + # request, the Translation API will always return only one result. + class DetectLanguageResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for discovering supported languages. + # @!attribute [rw] parent + # @return [::String] + # Required. Project or location to make a call. Must refer to a caller's + # project. + # + # Format: `projects/{project-number-or-id}` or + # `projects/{project-number-or-id}/locations/{location-id}`. + # + # For global calls, use `projects/{project-number-or-id}/locations/global` or + # `projects/{project-number-or-id}`. + # + # Non-global location is required for AutoML models. + # + # Only models within the same region (have same location-id) can be used, + # otherwise an INVALID_ARGUMENT (400) error is returned. + # @!attribute [rw] display_language_code + # @return [::String] + # Optional. The language to use to return localized, human readable names + # of supported languages. If missing, then display names are not returned + # in a response. + # @!attribute [rw] model + # @return [::String] + # Optional. Get supported languages of this model. + # + # The format depends on model type: + # + # - AutoML Translation models: + # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + # + # - General (built-in) models: + # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + # + # + # Returns languages supported by the specified model. + # If missing, we get supported languages of Google general NMT model. + class GetSupportedLanguagesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for discovering supported languages. + # @!attribute [rw] languages + # @return [::Array<::Google::Cloud::Translate::V3::SupportedLanguage>] + # A list of supported language responses. This list contains an entry + # for each language the Translation API supports. + class SupportedLanguages + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A single supported language response corresponds to information related + # to one supported language. + # @!attribute [rw] language_code + # @return [::String] + # Supported language code, generally consisting of its ISO 639-1 + # identifier, for example, 'en', 'ja'. In certain cases, ISO-639 codes + # including language and region identifiers are returned (for example, + # 'zh-TW' and 'zh-CN'). + # @!attribute [rw] display_name + # @return [::String] + # Human-readable name of the language localized in the display language + # specified in the request. + # @!attribute [rw] support_source + # @return [::Boolean] + # Can be used as a source language. + # @!attribute [rw] support_target + # @return [::Boolean] + # Can be used as a target language. + class SupportedLanguage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The Google Cloud Storage location for the input content. + # @!attribute [rw] input_uri + # @return [::String] + # Required. Source data URI. For example, `gs://my_bucket/my_object`. + class GcsSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input configuration for BatchTranslateText request. + # @!attribute [rw] mime_type + # @return [::String] + # Optional. Can be "text/plain" or "text/html". + # For `.tsv`, "text/html" is used if mime_type is missing. + # For `.html`, this field must be "text/html" or empty. + # For `.txt`, this field must be "text/plain" or empty. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::Translate::V3::GcsSource] + # Required. Google Cloud Storage location for the source input. + # This can be a single file (for example, + # `gs://translation-test/input.tsv`) or a wildcard (for example, + # `gs://translation-test/*`). If a file extension is `.tsv`, it can + # contain either one or two columns. The first column (optional) is the id + # of the text request. If the first column is missing, we use the row + # number (0-based) from the input file as the ID in the output file. The + # second column is the actual text to be + # translated. We recommend each row be <= 10K Unicode codepoints, + # otherwise an error might be returned. + # Note that the input tsv must be RFC 4180 compliant. + # + # You could use https://github.com/Clever/csvlint to check potential + # formatting errors in your tsv file. + # csvlint --delimiter='\t' your_input_file.tsv + # + # The other supported file extensions are `.txt` or `.html`, which is + # treated as a single large chunk of text. + class InputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The Google Cloud Storage location for the output content. + # @!attribute [rw] output_uri_prefix + # @return [::String] + # Required. The bucket used in 'output_uri_prefix' must exist and there must + # be no files under 'output_uri_prefix'. 'output_uri_prefix' must end with + # "/" and start with "gs://". One 'output_uri_prefix' can only be used by one + # batch translation job at a time. Otherwise an INVALID_ARGUMENT (400) error + # is returned. + class GcsDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Output configuration for BatchTranslateText request. + # @!attribute [rw] gcs_destination + # @return [::Google::Cloud::Translate::V3::GcsDestination] + # Google Cloud Storage destination for output content. + # For every single input file (for example, gs://a/b/c.[extension]), we + # generate at most 2 * n output files. (n is the # of target_language_codes + # in the BatchTranslateTextRequest). + # + # Output files (tsv) generated are compliant with RFC 4180 except that + # record delimiters are '\n' instead of '\r\n'. We don't provide any way to + # change record delimiters. + # + # While the input files are being processed, we write/update an index file + # 'index.csv' under 'output_uri_prefix' (for example, + # gs://translation-test/index.csv) The index file is generated/updated as + # new files are being translated. The format is: + # + # input_file,target_language_code,translations_file,errors_file, + # glossary_translations_file,glossary_errors_file + # + # input_file is one file we matched using gcs_source.input_uri. + # target_language_code is provided in the request. + # translations_file contains the translations. (details provided below) + # errors_file contains the errors during processing of the file. (details + # below). Both translations_file and errors_file could be empty + # strings if we have no content to output. + # glossary_translations_file and glossary_errors_file are always empty + # strings if the input_file is tsv. They could also be empty if we have no + # content to output. + # + # Once a row is present in index.csv, the input/output matching never + # changes. Callers should also expect all the content in input_file are + # processed and ready to be consumed (that is, no partial output file is + # written). + # + # Since index.csv will be keeping updated during the process, please make + # sure there is no custom retention policy applied on the output bucket + # that may avoid file updating. + # (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) + # + # The format of translations_file (for target language code 'trg') is: + # `gs://translation_test/a_b_c_'trg'_translations.[extension]` + # + # If the input file extension is tsv, the output has the following + # columns: + # Column 1: ID of the request provided in the input, if it's not + # provided in the input, then the input row number is used (0-based). + # Column 2: source sentence. + # Column 3: translation without applying a glossary. Empty string if there + # is an error. + # Column 4 (only present if a glossary is provided in the request): + # translation after applying the glossary. Empty string if there is an + # error applying the glossary. Could be same string as column 3 if there is + # no glossary applied. + # + # If input file extension is a txt or html, the translation is directly + # written to the output file. If glossary is requested, a separate + # glossary_translations_file has format of + # `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]` + # + # The format of errors file (for target language code 'trg') is: + # `gs://translation_test/a_b_c_'trg'_errors.[extension]` + # + # If the input file extension is tsv, errors_file contains the following: + # Column 1: ID of the request provided in the input, if it's not + # provided in the input, then the input row number is used (0-based). + # Column 2: source sentence. + # Column 3: Error detail for the translation. Could be empty. + # Column 4 (only present if a glossary is provided in the request): + # Error when applying the glossary. + # + # If the input file extension is txt or html, glossary_error_file will be + # generated that contains error details. glossary_error_file has format of + # `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]` + class OutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A document translation request input config. + # @!attribute [rw] content + # @return [::String] + # Document's content represented as a stream of bytes. + # + # Note: The following fields are mutually exclusive: `content`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::Translate::V3::GcsSource] + # Google Cloud Storage location. This must be a single file. + # For example: gs://example_bucket/example_file.pdf + # + # Note: The following fields are mutually exclusive: `gcs_source`, `content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] mime_type + # @return [::String] + # Specifies the input document's mime_type. + # + # If not specified it will be determined using the file extension for + # gcs_source provided files. For a file provided through bytes content the + # mime_type must be provided. + # Currently supported mime types are: + # - application/pdf + # - application/vnd.openxmlformats-officedocument.wordprocessingml.document + # - application/vnd.openxmlformats-officedocument.presentationml.presentation + # - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + class DocumentInputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A document translation request output config. + # @!attribute [rw] gcs_destination + # @return [::Google::Cloud::Translate::V3::GcsDestination] + # Optional. Google Cloud Storage destination for the translation output, + # e.g., `gs://my_bucket/my_directory/`. + # + # The destination directory provided does not have to be empty, but the + # bucket must exist. If a file with the same name as the output file + # already exists in the destination an error will be returned. + # + # For a DocumentInputConfig.contents provided document, the output file + # will have the name "output_[trg]_translations.[ext]", where + # - [trg] corresponds to the translated file's language code, + # - [ext] corresponds to the translated file's extension according to its + # mime type. + # + # + # For a DocumentInputConfig.gcs_uri provided document, the output file will + # have a name according to its URI. For example: an input file with URI: + # `gs://a/b/c.[extension]` stored in a gcs_destination bucket with name + # "my_bucket" will have an output URI: + # `gs://my_bucket/a_b_c_[trg]_translations.[ext]`, where + # - [trg] corresponds to the translated file's language code, + # - [ext] corresponds to the translated file's extension according to its + # mime type. + # + # + # If the document was directly provided through the request, then the + # output document will have the format: + # `gs://my_bucket/translated_document_[trg]_translations.[ext]`, where + # - [trg] corresponds to the translated file's language code, + # - [ext] corresponds to the translated file's extension according to its + # mime type. + # + # If a glossary was provided, then the output URI for the glossary + # translation will be equal to the default output URI but have + # `glossary_translations` instead of `translations`. For the previous + # example, its glossary URI would be: + # `gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]`. + # + # Thus the max number of output files will be 2 (Translated document, + # Glossary translated document). + # + # Callers should expect no partial outputs. If there is any error during + # document translation, no output will be stored in the Cloud Storage + # bucket. + # @!attribute [rw] mime_type + # @return [::String] + # Optional. Specifies the translated document's mime_type. + # If not specified, the translated file's mime type will be the same as the + # input file's mime type. + # Currently only support the output mime type to be the same as input mime + # type. + # - application/pdf + # - application/vnd.openxmlformats-officedocument.wordprocessingml.document + # - application/vnd.openxmlformats-officedocument.presentationml.presentation + # - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + class DocumentOutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A document translation request. + # @!attribute [rw] parent + # @return [::String] + # Required. Location to make a regional call. + # + # Format: `projects/{project-number-or-id}/locations/{location-id}`. + # + # For global calls, use `projects/{project-number-or-id}/locations/global` or + # `projects/{project-number-or-id}`. + # + # Non-global location is required for requests using AutoML models or custom + # glossaries. + # + # Models and glossaries must be within the same region (have the same + # location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + # @!attribute [rw] source_language_code + # @return [::String] + # Optional. The ISO-639 language code of the input document if known, for + # example, "en-US" or "sr-Latn". Supported language codes are listed in + # [Language Support](https://cloud.google.com/translate/docs/languages). If + # the source language isn't specified, the API attempts to identify the + # source language automatically and returns the source language within the + # response. Source language must be specified if the request contains a + # glossary or a custom model. + # @!attribute [rw] target_language_code + # @return [::String] + # Required. The ISO-639 language code to use for translation of the input + # document, set to one of the language codes listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). + # @!attribute [rw] document_input_config + # @return [::Google::Cloud::Translate::V3::DocumentInputConfig] + # Required. Input configurations. + # @!attribute [rw] document_output_config + # @return [::Google::Cloud::Translate::V3::DocumentOutputConfig] + # Optional. Output configurations. + # Defines if the output file should be stored within Cloud Storage as well + # as the desired output format. If not provided the translated file will + # only be returned through a byte-stream and its output mime type will be + # the same as the input file's mime type. + # @!attribute [rw] model + # @return [::String] + # Optional. The `model` type requested for this translation. + # + # The format depends on model type: + # + # - AutoML Translation models: + # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + # + # - General (built-in) models: + # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + # + # + # If not provided, the default Google model (NMT) will be used for + # translation. + # @!attribute [rw] glossary_config + # @return [::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig] + # Optional. Glossary to be applied. The glossary must be within the same + # region (have the same location-id) as the model, otherwise an + # INVALID_ARGUMENT (400) error is returned. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. + # + # Label keys and values can be no longer than 63 characters (Unicode + # codepoints), can only contain lowercase letters, numeric characters, + # underscores and dashes. International characters are allowed. Label values + # are optional. Label keys must start with a letter. + # + # See https://cloud.google.com/translate/docs/advanced/labels for more + # information. + # @!attribute [rw] customized_attribution + # @return [::String] + # Optional. This flag is to support user customized attribution. + # If not provided, the default is `Machine Translated by Google`. + # Customized attribution should follow rules in + # https://cloud.google.com/translate/attribution#attribution_and_logos + # @!attribute [rw] is_translate_native_pdf_only + # @return [::Boolean] + # Optional. is_translate_native_pdf_only field for external customers. + # If true, the page limit of online native pdf translation is 300 and only + # native pdf pages will be translated. + # @!attribute [rw] enable_shadow_removal_native_pdf + # @return [::Boolean] + # Optional. If true, use the text removal server to remove the shadow text on + # background image for native pdf translation. + # Shadow removal feature can only be enabled when + # is_translate_native_pdf_only: false && pdf_native_only: false + # @!attribute [rw] enable_rotation_correction + # @return [::Boolean] + # Optional. If true, enable auto rotation correction in DVS. + class TranslateDocumentRequest + 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 translated document message. + # @!attribute [rw] byte_stream_outputs + # @return [::Array<::String>] + # The array of translated documents. It is expected to be size 1 for now. We + # may produce multiple translated documents in the future for other type of + # file formats. + # @!attribute [rw] mime_type + # @return [::String] + # The translated document's mime type. + # @!attribute [rw] detected_language_code + # @return [::String] + # The detected language for the input document. + # If the user did not provide the source language for the input document, + # this field will have the language code automatically detected. If the + # source language was passed, auto-detection of the language does not occur + # and this field is empty. + class DocumentTranslation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A translated document response message. + # @!attribute [rw] document_translation + # @return [::Google::Cloud::Translate::V3::DocumentTranslation] + # Translated document. + # @!attribute [rw] glossary_document_translation + # @return [::Google::Cloud::Translate::V3::DocumentTranslation] + # The document's translation output if a glossary is provided in the request. + # This can be the same as [TranslateDocumentResponse.document_translation] + # if no glossary terms apply. + # @!attribute [rw] model + # @return [::String] + # Only present when 'model' is present in the request. + # 'model' is normalized to have a project number. + # + # For example: + # If the 'model' field in TranslateDocumentRequest is: + # `projects/{project-id}/locations/{location-id}/models/general/nmt` then + # `model` here would be normalized to + # `projects/{project-number}/locations/{location-id}/models/general/nmt`. + # @!attribute [rw] glossary_config + # @return [::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig] + # The `glossary_config` used for this translation. + class TranslateDocumentResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The batch translation request. + # @!attribute [rw] parent + # @return [::String] + # Required. Location to make a call. Must refer to a caller's project. + # + # Format: `projects/{project-number-or-id}/locations/{location-id}`. + # + # The `global` location is not supported for batch translation. + # + # Only AutoML Translation models or glossaries within the same region (have + # the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) + # error is returned. + # @!attribute [rw] source_language_code + # @return [::String] + # Required. Source language code. Supported language codes are listed in + # [Language + # Support](https://cloud.google.com/translate/docs/languages). + # @!attribute [rw] target_language_codes + # @return [::Array<::String>] + # Required. Specify up to 10 language codes here. Supported language codes + # are listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). + # @!attribute [rw] models + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The models to use for translation. Map's key is target language + # code. Map's value is model name. Value can be a built-in general model, + # or an AutoML Translation model. + # + # The value format depends on model type: + # + # - AutoML Translation models: + # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + # + # - General (built-in) models: + # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + # + # + # If the map is empty or a specific model is + # not requested for a language pair, then default google model (nmt) is used. + # @!attribute [rw] input_configs + # @return [::Array<::Google::Cloud::Translate::V3::InputConfig>] + # Required. Input configurations. + # The total number of files matched should be <= 100. + # The total content size should be <= 100M Unicode codepoints. + # The files must use UTF-8 encoding. + # @!attribute [rw] output_config + # @return [::Google::Cloud::Translate::V3::OutputConfig] + # Required. Output configuration. + # If 2 input configs match to the same file (that is, same input path), + # we don't generate output for duplicate inputs. + # @!attribute [rw] glossaries + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig}] + # Optional. Glossaries to be applied for translation. + # It's keyed by target language code. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. + # + # See https://cloud.google.com/translate/docs/advanced/labels for more + # information. + class BatchTranslateTextRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ModelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig] + class GlossariesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # State metadata for the batch translation operation. + # @!attribute [rw] state + # @return [::Google::Cloud::Translate::V3::BatchTranslateMetadata::State] + # The state of the operation. + # @!attribute [rw] translated_characters + # @return [::Integer] + # Number of successfully translated characters so far (Unicode codepoints). + # @!attribute [rw] failed_characters + # @return [::Integer] + # Number of characters that have failed to process so far (Unicode + # codepoints). + # @!attribute [rw] total_characters + # @return [::Integer] + # Total number of characters (Unicode codepoints). + # This is the total number of codepoints from input files times the number of + # target languages and appears here shortly after the call is submitted. + # @!attribute [rw] submit_time + # @return [::Google::Protobuf::Timestamp] + # Time when the operation was submitted. + class BatchTranslateMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # State of the job. + module State + # Invalid. + STATE_UNSPECIFIED = 0 + + # Request is being processed. + RUNNING = 1 + + # The batch is processed, and at least one item was successfully + # processed. + SUCCEEDED = 2 + + # The batch is done and no item was successfully processed. + FAILED = 3 + + # Request is in the process of being canceled after caller invoked + # longrunning.Operations.CancelOperation on the request id. + CANCELLING = 4 + + # The batch is done after the user has called the + # longrunning.Operations.CancelOperation. Any records processed before the + # cancel command are output as specified in the request. + CANCELLED = 5 + end + end + + # Stored in the + # {::Google::Longrunning::Operation#response google.longrunning.Operation.response} + # field returned by BatchTranslateText if at least one sentence is translated + # successfully. + # @!attribute [rw] total_characters + # @return [::Integer] + # Total number of characters (Unicode codepoints). + # @!attribute [rw] translated_characters + # @return [::Integer] + # Number of successfully translated characters (Unicode codepoints). + # @!attribute [rw] failed_characters + # @return [::Integer] + # Number of characters that have failed to process (Unicode codepoints). + # @!attribute [rw] submit_time + # @return [::Google::Protobuf::Timestamp] + # Time when the operation was submitted. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time when the operation is finished and + # {::Google::Longrunning::Operation#done google.longrunning.Operation.done} is + # set to true. + class BatchTranslateResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input configuration for glossaries. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::Translate::V3::GcsSource] + # Required. Google Cloud Storage location of glossary data. + # File format is determined based on the filename extension. API returns + # [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file + # formats. Wildcards are not allowed. This must be a single file in one of + # the following formats: + # + # For unidirectional glossaries: + # + # - TSV/CSV (`.tsv`/`.csv`): Two column file, tab- or comma-separated. + # The first column is source text. The second column is target text. + # No headers in this file. The first row contains data and not column + # names. + # + # - TMX (`.tmx`): TMX file with parallel data defining source/target term + # pairs. + # + # For equivalent term sets glossaries: + # + # - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms + # in multiple languages. See documentation for more information - + # [glossaries](https://cloud.google.com/translate/docs/advanced/glossary). + class GlossaryInputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a glossary built from user-provided data. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the glossary. Glossary names have the form + # `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. + # @!attribute [rw] language_pair + # @return [::Google::Cloud::Translate::V3::Glossary::LanguageCodePair] + # Used with unidirectional glossaries. + # + # Note: The following fields are mutually exclusive: `language_pair`, `language_codes_set`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] language_codes_set + # @return [::Google::Cloud::Translate::V3::Glossary::LanguageCodesSet] + # Used with equivalent term set glossaries. + # + # Note: The following fields are mutually exclusive: `language_codes_set`, `language_pair`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] input_config + # @return [::Google::Cloud::Translate::V3::GlossaryInputConfig] + # Required. Provides examples to build the glossary from. + # Total glossary must not exceed 10M Unicode codepoints. + # @!attribute [r] entry_count + # @return [::Integer] + # Output only. The number of entries defined in the glossary. + # @!attribute [r] submit_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When CreateGlossary was called. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the glossary creation was finished. + # @!attribute [rw] display_name + # @return [::String] + # Optional. The display name of the glossary. + class Glossary + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Used with unidirectional glossaries. + # @!attribute [rw] source_language_code + # @return [::String] + # Required. The ISO-639 language code of the input text, for example, + # "en-US". Expected to be an exact match for GlossaryTerm.language_code. + # @!attribute [rw] target_language_code + # @return [::String] + # Required. The ISO-639 language code for translation output, for example, + # "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. + class LanguageCodePair + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Used with equivalent term set glossaries. + # @!attribute [rw] language_codes + # @return [::Array<::String>] + # The ISO-639 language code(s) for terms defined in the glossary. + # All entries are unique. The list contains at least two entries. + # Expected to be an exact match for GlossaryTerm.language_code. + class LanguageCodesSet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request message for CreateGlossary. + # @!attribute [rw] parent + # @return [::String] + # Required. The project name. + # @!attribute [rw] glossary + # @return [::Google::Cloud::Translate::V3::Glossary] + # Required. The glossary to create. + class CreateGlossaryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the update glossary flow + # @!attribute [rw] glossary + # @return [::Google::Cloud::Translate::V3::Glossary] + # Required. The glossary entry to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. Currently only `display_name` and + # 'input_config' + class UpdateGlossaryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetGlossary. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the glossary to retrieve. + class GetGlossaryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteGlossary. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the glossary to delete. + class DeleteGlossaryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListGlossaries. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the project from which to list all of the glossaries. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. The server may return fewer glossaries than + # requested. If unspecified, the server picks an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # Typically, this is the value of [ListGlossariesResponse.next_page_token] + # returned from the previous call to `ListGlossaries` method. + # The first page is returned if `page_token`is empty or missing. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter specifying constraints of a list operation. + # Specify the constraint by the format of "key=value", where key must be + # "src" or "tgt", and the value must be a valid language code. + # For multiple restrictions, concatenate them by "AND" (uppercase only), + # such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used + # here, which means using 'en-US' and 'en' can lead to different results, + # which depends on the language code you used when you create the glossary. + # For the unidirectional glossaries, the "src" and "tgt" add restrictions + # on the source and target language code separately. + # For the equivalent term set glossaries, the "src" and/or "tgt" add + # restrictions on the term set. + # For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional + # glossaries which exactly match the source language code as "en-US" and the + # target language code "zh-CN", but all equivalent term set glossaries which + # contain "en-US" and "zh-CN" in their language set will be picked. + # If missing, no filtering is performed. + class ListGlossariesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListGlossaries. + # @!attribute [rw] glossaries + # @return [::Array<::Google::Cloud::Translate::V3::Glossary>] + # The list of glossaries for a project. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve a page of results. Pass this value in the + # [ListGlossariesRequest.page_token] field in the subsequent call to + # `ListGlossaries` method to retrieve the next page of results. + class ListGlossariesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the Get Glossary Entry Api + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the glossary entry to get + class GetGlossaryEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for Delete Glossary Entry + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the glossary entry to delete + class DeleteGlossaryEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListGlossaryEntries + # @!attribute [rw] parent + # @return [::String] + # Required. The parent glossary resource name for listing the glossary's + # entries. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. The server may return fewer glossary entries + # than requested. If unspecified, the server picks an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # Typically, this is the value of + # [ListGlossaryEntriesResponse.next_page_token] returned from the previous + # call. The first page is returned if `page_token`is empty or missing. + class ListGlossaryEntriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListGlossaryEntries + # @!attribute [rw] glossary_entries + # @return [::Array<::Google::Cloud::Translate::V3::GlossaryEntry>] + # Optional. The Glossary Entries + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token to retrieve a page of results. Pass this value in the + # [ListGLossaryEntriesRequest.page_token] field in the subsequent calls. + class ListGlossaryEntriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateGlossaryEntry + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the glossary to create the entry under. + # @!attribute [rw] glossary_entry + # @return [::Google::Cloud::Translate::V3::GlossaryEntry] + # Required. The glossary entry to create + class CreateGlossaryEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateGlossaryEntry + # @!attribute [rw] glossary_entry + # @return [::Google::Cloud::Translate::V3::GlossaryEntry] + # Required. The glossary entry to update. + class UpdateGlossaryEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Stored in the + # {::Google::Longrunning::Operation#metadata google.longrunning.Operation.metadata} + # field returned by CreateGlossary. + # @!attribute [rw] name + # @return [::String] + # The name of the glossary that is being created. + # @!attribute [rw] state + # @return [::Google::Cloud::Translate::V3::CreateGlossaryMetadata::State] + # The current state of the glossary creation operation. + # @!attribute [rw] submit_time + # @return [::Google::Protobuf::Timestamp] + # The time when the operation was submitted to the server. + class CreateGlossaryMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enumerates the possible states that the creation request can be in. + module State + # Invalid. + STATE_UNSPECIFIED = 0 + + # Request is being processed. + RUNNING = 1 + + # The glossary was successfully created. + SUCCEEDED = 2 + + # Failed to create the glossary. + FAILED = 3 + + # Request is in the process of being canceled after caller invoked + # longrunning.Operations.CancelOperation on the request id. + CANCELLING = 4 + + # The glossary creation request was successfully canceled. + CANCELLED = 5 + end + end + + # Stored in the + # {::Google::Longrunning::Operation#metadata google.longrunning.Operation.metadata} + # field returned by UpdateGlossary. + # @!attribute [rw] glossary + # @return [::Google::Cloud::Translate::V3::Glossary] + # The updated glossary object. + # @!attribute [rw] state + # @return [::Google::Cloud::Translate::V3::UpdateGlossaryMetadata::State] + # The current state of the glossary update operation. If the glossary input + # file was not updated this will be completed immediately + # @!attribute [rw] submit_time + # @return [::Google::Protobuf::Timestamp] + # The time when the operation was submitted to the server. + class UpdateGlossaryMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enumerates the possible states that the update request can be in. + module State + # Invalid. + STATE_UNSPECIFIED = 0 + + # Request is being processed. + RUNNING = 1 + + # The glossary was successfully updated. + SUCCEEDED = 2 + + # Failed to update the glossary. + FAILED = 3 + + # Request is in the process of being canceled after caller invoked + # longrunning.Operations.CancelOperation on the request id. + CANCELLING = 4 + + # The glossary update request was successfully canceled. + CANCELLED = 5 + end + end + + # Stored in the + # {::Google::Longrunning::Operation#metadata google.longrunning.Operation.metadata} + # field returned by DeleteGlossary. + # @!attribute [rw] name + # @return [::String] + # The name of the glossary that is being deleted. + # @!attribute [rw] state + # @return [::Google::Cloud::Translate::V3::DeleteGlossaryMetadata::State] + # The current state of the glossary deletion operation. + # @!attribute [rw] submit_time + # @return [::Google::Protobuf::Timestamp] + # The time when the operation was submitted to the server. + class DeleteGlossaryMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enumerates the possible states that the creation request can be in. + module State + # Invalid. + STATE_UNSPECIFIED = 0 + + # Request is being processed. + RUNNING = 1 + + # The glossary was successfully deleted. + SUCCEEDED = 2 + + # Failed to delete the glossary. + FAILED = 3 + + # Request is in the process of being canceled after caller invoked + # longrunning.Operations.CancelOperation on the request id. + CANCELLING = 4 + + # The glossary deletion request was successfully canceled. + CANCELLED = 5 + end + end + + # Stored in the + # {::Google::Longrunning::Operation#response google.longrunning.Operation.response} + # field returned by DeleteGlossary. + # @!attribute [rw] name + # @return [::String] + # The name of the deleted glossary. + # @!attribute [rw] submit_time + # @return [::Google::Protobuf::Timestamp] + # The time when the operation was submitted to the server. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time when the glossary deletion is finished and + # {::Google::Longrunning::Operation#done google.longrunning.Operation.done} is + # set to true. + class DeleteGlossaryResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The BatchTranslateDocument request. + # @!attribute [rw] parent + # @return [::String] + # Required. Location to make a regional call. + # + # Format: `projects/{project-number-or-id}/locations/{location-id}`. + # + # The `global` location is not supported for batch translation. + # + # Only AutoML Translation models or glossaries within the same region (have + # the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) + # error is returned. + # @!attribute [rw] source_language_code + # @return [::String] + # Required. The ISO-639 language code of the input document if known, for + # example, "en-US" or "sr-Latn". Supported language codes are listed in + # [Language Support](https://cloud.google.com/translate/docs/languages). + # @!attribute [rw] target_language_codes + # @return [::Array<::String>] + # Required. The ISO-639 language code to use for translation of the input + # document. Specify up to 10 language codes here. Supported language codes + # are listed in [Language + # Support](https://cloud.google.com/translate/docs/languages). + # @!attribute [rw] input_configs + # @return [::Array<::Google::Cloud::Translate::V3::BatchDocumentInputConfig>] + # Required. Input configurations. + # The total number of files matched should be <= 100. + # The total content size to translate should be <= 100M Unicode codepoints. + # The files must use UTF-8 encoding. + # @!attribute [rw] output_config + # @return [::Google::Cloud::Translate::V3::BatchDocumentOutputConfig] + # Required. Output configuration. + # If 2 input configs match to the same file (that is, same input path), + # we don't generate output for duplicate inputs. + # @!attribute [rw] models + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The models to use for translation. Map's key is target language + # code. Map's value is the model name. Value can be a built-in general model, + # or an AutoML Translation model. + # + # The value format depends on model type: + # + # - AutoML Translation models: + # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + # + # - General (built-in) models: + # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + # + # + # If the map is empty or a specific model is + # not requested for a language pair, then default google model (nmt) is used. + # @!attribute [rw] glossaries + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig}] + # Optional. Glossaries to be applied. It's keyed by target language code. + # @!attribute [rw] format_conversions + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The file format conversion map that is applied to all input + # files. The map key is the original mime_type. The map value is the target + # mime_type of translated documents. + # + # Supported file format conversion includes: + # - `application/pdf` to + # `application/vnd.openxmlformats-officedocument.wordprocessingml.document` + # + # If nothing specified, output files will be in the same format as the + # original file. + # @!attribute [rw] customized_attribution + # @return [::String] + # Optional. This flag is to support user customized attribution. + # If not provided, the default is `Machine Translated by Google`. + # Customized attribution should follow rules in + # https://cloud.google.com/translate/attribution#attribution_and_logos + # @!attribute [rw] enable_shadow_removal_native_pdf + # @return [::Boolean] + # Optional. If true, use the text removal server to remove the shadow text on + # background image for native pdf translation. + # Shadow removal feature can only be enabled when + # is_translate_native_pdf_only: false && pdf_native_only: false + # @!attribute [rw] enable_rotation_correction + # @return [::Boolean] + # Optional. If true, enable auto rotation correction in DVS. + class BatchTranslateDocumentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ModelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig] + class GlossariesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class FormatConversionsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Input configuration for BatchTranslateDocument request. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::Translate::V3::GcsSource] + # Google Cloud Storage location for the source input. + # This can be a single file (for example, + # `gs://translation-test/input.docx`) or a wildcard (for example, + # `gs://translation-test/*`). + # + # File mime type is determined based on extension. Supported mime type + # includes: + # - `pdf`, application/pdf + # - `docx`, + # application/vnd.openxmlformats-officedocument.wordprocessingml.document + # - `pptx`, + # application/vnd.openxmlformats-officedocument.presentationml.presentation + # - `xlsx`, + # application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + # + # The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB. + # The max file size to support for `.pdf` is 1GB and the max page limit is + # 1000 pages. + # The max file size to support for all input documents is 1GB. + class BatchDocumentInputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Output configuration for BatchTranslateDocument request. + # @!attribute [rw] gcs_destination + # @return [::Google::Cloud::Translate::V3::GcsDestination] + # Google Cloud Storage destination for output content. + # For every single input document (for example, gs://a/b/c.[extension]), we + # generate at most 2 * n output files. (n is the # of target_language_codes + # in the BatchTranslateDocumentRequest). + # + # While the input documents are being processed, we write/update an index + # file `index.csv` under `gcs_destination.output_uri_prefix` (for example, + # gs://translation_output/index.csv) The index file is generated/updated as + # new files are being translated. The format is: + # + # input_document,target_language_code,translation_output,error_output, + # glossary_translation_output,glossary_error_output + # + # `input_document` is one file we matched using gcs_source.input_uri. + # `target_language_code` is provided in the request. + # `translation_output` contains the translations. (details provided below) + # `error_output` contains the error message during processing of the file. + # Both translations_file and errors_file could be empty strings if we have + # no content to output. + # `glossary_translation_output` and `glossary_error_output` are the + # translated output/error when we apply glossaries. They could also be + # empty if we have no content to output. + # + # Once a row is present in index.csv, the input/output matching never + # changes. Callers should also expect all the content in input_file are + # processed and ready to be consumed (that is, no partial output file is + # written). + # + # Since index.csv will be keeping updated during the process, please make + # sure there is no custom retention policy applied on the output bucket + # that may avoid file updating. + # (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) + # + # The naming format of translation output files follows (for target + # language code [trg]): `translation_output`: + # `gs://translation_output/a_b_c_[trg]_translation.[extension]` + # `glossary_translation_output`: + # `gs://translation_test/a_b_c_[trg]_glossary_translation.[extension]`. The + # output document will maintain the same file format as the input document. + # + # The naming format of error output files follows (for target language code + # [trg]): `error_output`: `gs://translation_test/a_b_c_[trg]_errors.txt` + # `glossary_error_output`: + # `gs://translation_test/a_b_c_[trg]_glossary_translation.txt`. The error + # output is a txt file containing error details. + class BatchDocumentOutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Stored in the + # {::Google::Longrunning::Operation#response google.longrunning.Operation.response} + # field returned by BatchTranslateDocument if at least one document is + # translated successfully. + # @!attribute [rw] total_pages + # @return [::Integer] + # Total number of pages to translate in all documents. Documents without + # clear page definition (such as XLSX) are not counted. + # @!attribute [rw] translated_pages + # @return [::Integer] + # Number of successfully translated pages in all documents. Documents without + # clear page definition (such as XLSX) are not counted. + # @!attribute [rw] failed_pages + # @return [::Integer] + # Number of pages that failed to process in all documents. Documents without + # clear page definition (such as XLSX) are not counted. + # @!attribute [rw] total_billable_pages + # @return [::Integer] + # Number of billable pages in documents with clear page definition (such as + # PDF, DOCX, PPTX) + # @!attribute [rw] total_characters + # @return [::Integer] + # Total number of characters (Unicode codepoints) in all documents. + # @!attribute [rw] translated_characters + # @return [::Integer] + # Number of successfully translated characters (Unicode codepoints) in all + # documents. + # @!attribute [rw] failed_characters + # @return [::Integer] + # Number of characters that have failed to process (Unicode codepoints) in + # all documents. + # @!attribute [rw] total_billable_characters + # @return [::Integer] + # Number of billable characters (Unicode codepoints) in documents without + # clear page definition, such as XLSX. + # @!attribute [rw] submit_time + # @return [::Google::Protobuf::Timestamp] + # Time when the operation was submitted. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time when the operation is finished and + # {::Google::Longrunning::Operation#done google.longrunning.Operation.done} is + # set to true. + class BatchTranslateDocumentResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # State metadata for the batch translation operation. + # @!attribute [rw] state + # @return [::Google::Cloud::Translate::V3::BatchTranslateDocumentMetadata::State] + # The state of the operation. + # @!attribute [rw] total_pages + # @return [::Integer] + # Total number of pages to translate in all documents so far. Documents + # without clear page definition (such as XLSX) are not counted. + # @!attribute [rw] translated_pages + # @return [::Integer] + # Number of successfully translated pages in all documents so far. Documents + # without clear page definition (such as XLSX) are not counted. + # @!attribute [rw] failed_pages + # @return [::Integer] + # Number of pages that failed to process in all documents so far. Documents + # without clear page definition (such as XLSX) are not counted. + # @!attribute [rw] total_billable_pages + # @return [::Integer] + # Number of billable pages in documents with clear page definition (such as + # PDF, DOCX, PPTX) so far. + # @!attribute [rw] total_characters + # @return [::Integer] + # Total number of characters (Unicode codepoints) in all documents so far. + # @!attribute [rw] translated_characters + # @return [::Integer] + # Number of successfully translated characters (Unicode codepoints) in all + # documents so far. + # @!attribute [rw] failed_characters + # @return [::Integer] + # Number of characters that have failed to process (Unicode codepoints) in + # all documents so far. + # @!attribute [rw] total_billable_characters + # @return [::Integer] + # Number of billable characters (Unicode codepoints) in documents without + # clear page definition (such as XLSX) so far. + # @!attribute [rw] submit_time + # @return [::Google::Protobuf::Timestamp] + # Time when the operation was submitted. + class BatchTranslateDocumentMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # State of the job. + module State + # Invalid. + STATE_UNSPECIFIED = 0 + + # Request is being processed. + RUNNING = 1 + + # The batch is processed, and at least one item was successfully processed. + SUCCEEDED = 2 + + # The batch is done and no item was successfully processed. + FAILED = 3 + + # Request is in the process of being canceled after caller invoked + # longrunning.Operations.CancelOperation on the request id. + CANCELLING = 4 + + # The batch is done after the user has called the + # longrunning.Operations.CancelOperation. Any records processed before the + # cancel command are output as specified in the request. + CANCELLED = 5 + end + end + + # Configures which glossary is used for a specific target language and defines + # options for applying that glossary. + # @!attribute [rw] glossary + # @return [::String] + # Required. The `glossary` to be applied for this translation. + # + # The format depends on the glossary: + # + # - User-provided custom glossary: + # `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}` + # @!attribute [rw] ignore_case + # @return [::Boolean] + # Optional. Indicates match is case insensitive. The default value is `false` + # if missing. + # @!attribute [rw] contextual_translation_enabled + # @return [::Boolean] + # Optional. If set to true, the glossary will be used for contextual + # translation. + class TranslateTextGlossaryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/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-translate-v3/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/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-translate-v3/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/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-translate-v3/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/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-translate-v3/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/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-translate-v3/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/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-translate-v3/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/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-translate-v3/snippets/Gemfile b/owl-bot-staging/google-cloud-translate-v3/snippets/Gemfile new file mode 100644 index 000000000000..bdff294d3cff --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/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-translate-v3", path: "../" +else + gem "google-cloud-translate-v3" +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-translate-v3/snippets/snippet_metadata_google.cloud.translation.v3.json b/owl-bot-staging/google-cloud-translate-v3/snippets/snippet_metadata_google.cloud.translation.v3.json new file mode 100644 index 000000000000..c234e2a00fb6 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/snippet_metadata_google.cloud.translation.v3.json @@ -0,0 +1,1535 @@ +{ + "client_library": { + "name": "google-cloud-translate-v3", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.translation.v3", + "version": "v3" + } + ] + }, + "snippets": [ + { + "region_tag": "translate_v3_generated_TranslationService_TranslateText_sync", + "title": "Snippet for the translate_text call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#translate_text.", + "file": "translation_service/translate_text.rb", + "language": "RUBY", + "client_method": { + "short_name": "translate_text", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#translate_text", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::TranslateTextRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Translate::V3::TranslateTextResponse", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "TranslateText", + "full_name": "google.cloud.translation.v3.TranslationService.TranslateText", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_RomanizeText_sync", + "title": "Snippet for the romanize_text call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#romanize_text.", + "file": "translation_service/romanize_text.rb", + "language": "RUBY", + "client_method": { + "short_name": "romanize_text", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#romanize_text", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::RomanizeTextRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Translate::V3::RomanizeTextResponse", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "RomanizeText", + "full_name": "google.cloud.translation.v3.TranslationService.RomanizeText", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_DetectLanguage_sync", + "title": "Snippet for the detect_language call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#detect_language.", + "file": "translation_service/detect_language.rb", + "language": "RUBY", + "client_method": { + "short_name": "detect_language", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#detect_language", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::DetectLanguageRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Translate::V3::DetectLanguageResponse", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "DetectLanguage", + "full_name": "google.cloud.translation.v3.TranslationService.DetectLanguage", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_GetSupportedLanguages_sync", + "title": "Snippet for the get_supported_languages call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#get_supported_languages.", + "file": "translation_service/get_supported_languages.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_supported_languages", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#get_supported_languages", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Translate::V3::SupportedLanguages", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "GetSupportedLanguages", + "full_name": "google.cloud.translation.v3.TranslationService.GetSupportedLanguages", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_TranslateDocument_sync", + "title": "Snippet for the translate_document call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#translate_document.", + "file": "translation_service/translate_document.rb", + "language": "RUBY", + "client_method": { + "short_name": "translate_document", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#translate_document", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::TranslateDocumentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Translate::V3::TranslateDocumentResponse", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "TranslateDocument", + "full_name": "google.cloud.translation.v3.TranslationService.TranslateDocument", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_BatchTranslateText_sync", + "title": "Snippet for the batch_translate_text call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#batch_translate_text.", + "file": "translation_service/batch_translate_text.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_translate_text", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#batch_translate_text", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::BatchTranslateTextRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "BatchTranslateText", + "full_name": "google.cloud.translation.v3.TranslationService.BatchTranslateText", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_BatchTranslateDocument_sync", + "title": "Snippet for the batch_translate_document call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#batch_translate_document.", + "file": "translation_service/batch_translate_document.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_translate_document", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#batch_translate_document", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "BatchTranslateDocument", + "full_name": "google.cloud.translation.v3.TranslationService.BatchTranslateDocument", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_CreateGlossary_sync", + "title": "Snippet for the create_glossary call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#create_glossary.", + "file": "translation_service/create_glossary.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_glossary", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#create_glossary", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::CreateGlossaryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "CreateGlossary", + "full_name": "google.cloud.translation.v3.TranslationService.CreateGlossary", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_UpdateGlossary_sync", + "title": "Snippet for the update_glossary call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#update_glossary.", + "file": "translation_service/update_glossary.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_glossary", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#update_glossary", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::UpdateGlossaryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "UpdateGlossary", + "full_name": "google.cloud.translation.v3.TranslationService.UpdateGlossary", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_ListGlossaries_sync", + "title": "Snippet for the list_glossaries call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#list_glossaries.", + "file": "translation_service/list_glossaries.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_glossaries", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#list_glossaries", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::ListGlossariesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Translate::V3::ListGlossariesResponse", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "ListGlossaries", + "full_name": "google.cloud.translation.v3.TranslationService.ListGlossaries", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_GetGlossary_sync", + "title": "Snippet for the get_glossary call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#get_glossary.", + "file": "translation_service/get_glossary.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_glossary", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#get_glossary", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::GetGlossaryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Translate::V3::Glossary", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "GetGlossary", + "full_name": "google.cloud.translation.v3.TranslationService.GetGlossary", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_DeleteGlossary_sync", + "title": "Snippet for the delete_glossary call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#delete_glossary.", + "file": "translation_service/delete_glossary.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_glossary", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#delete_glossary", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::DeleteGlossaryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "DeleteGlossary", + "full_name": "google.cloud.translation.v3.TranslationService.DeleteGlossary", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_GetGlossaryEntry_sync", + "title": "Snippet for the get_glossary_entry call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#get_glossary_entry.", + "file": "translation_service/get_glossary_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_glossary_entry", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#get_glossary_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::GetGlossaryEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Translate::V3::GlossaryEntry", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "GetGlossaryEntry", + "full_name": "google.cloud.translation.v3.TranslationService.GetGlossaryEntry", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_ListGlossaryEntries_sync", + "title": "Snippet for the list_glossary_entries call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#list_glossary_entries.", + "file": "translation_service/list_glossary_entries.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_glossary_entries", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#list_glossary_entries", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Translate::V3::ListGlossaryEntriesResponse", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "ListGlossaryEntries", + "full_name": "google.cloud.translation.v3.TranslationService.ListGlossaryEntries", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_CreateGlossaryEntry_sync", + "title": "Snippet for the create_glossary_entry call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#create_glossary_entry.", + "file": "translation_service/create_glossary_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_glossary_entry", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#create_glossary_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Translate::V3::GlossaryEntry", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "CreateGlossaryEntry", + "full_name": "google.cloud.translation.v3.TranslationService.CreateGlossaryEntry", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_UpdateGlossaryEntry_sync", + "title": "Snippet for the update_glossary_entry call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#update_glossary_entry.", + "file": "translation_service/update_glossary_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_glossary_entry", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#update_glossary_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Translate::V3::GlossaryEntry", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "UpdateGlossaryEntry", + "full_name": "google.cloud.translation.v3.TranslationService.UpdateGlossaryEntry", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_DeleteGlossaryEntry_sync", + "title": "Snippet for the delete_glossary_entry call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#delete_glossary_entry.", + "file": "translation_service/delete_glossary_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_glossary_entry", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#delete_glossary_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "DeleteGlossaryEntry", + "full_name": "google.cloud.translation.v3.TranslationService.DeleteGlossaryEntry", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_CreateDataset_sync", + "title": "Snippet for the create_dataset call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#create_dataset.", + "file": "translation_service/create_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_dataset", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#create_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::CreateDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "CreateDataset", + "full_name": "google.cloud.translation.v3.TranslationService.CreateDataset", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_GetDataset_sync", + "title": "Snippet for the get_dataset call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#get_dataset.", + "file": "translation_service/get_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_dataset", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#get_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::GetDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Translate::V3::Dataset", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "GetDataset", + "full_name": "google.cloud.translation.v3.TranslationService.GetDataset", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_ListDatasets_sync", + "title": "Snippet for the list_datasets call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#list_datasets.", + "file": "translation_service/list_datasets.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_datasets", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#list_datasets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::ListDatasetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Translate::V3::ListDatasetsResponse", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "ListDatasets", + "full_name": "google.cloud.translation.v3.TranslationService.ListDatasets", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_DeleteDataset_sync", + "title": "Snippet for the delete_dataset call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#delete_dataset.", + "file": "translation_service/delete_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_dataset", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#delete_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::DeleteDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "DeleteDataset", + "full_name": "google.cloud.translation.v3.TranslationService.DeleteDataset", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_CreateAdaptiveMtDataset_sync", + "title": "Snippet for the create_adaptive_mt_dataset call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#create_adaptive_mt_dataset.", + "file": "translation_service/create_adaptive_mt_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_adaptive_mt_dataset", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#create_adaptive_mt_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Translate::V3::AdaptiveMtDataset", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "CreateAdaptiveMtDataset", + "full_name": "google.cloud.translation.v3.TranslationService.CreateAdaptiveMtDataset", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_DeleteAdaptiveMtDataset_sync", + "title": "Snippet for the delete_adaptive_mt_dataset call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#delete_adaptive_mt_dataset.", + "file": "translation_service/delete_adaptive_mt_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_adaptive_mt_dataset", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#delete_adaptive_mt_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "DeleteAdaptiveMtDataset", + "full_name": "google.cloud.translation.v3.TranslationService.DeleteAdaptiveMtDataset", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_GetAdaptiveMtDataset_sync", + "title": "Snippet for the get_adaptive_mt_dataset call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#get_adaptive_mt_dataset.", + "file": "translation_service/get_adaptive_mt_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_adaptive_mt_dataset", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#get_adaptive_mt_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Translate::V3::AdaptiveMtDataset", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "GetAdaptiveMtDataset", + "full_name": "google.cloud.translation.v3.TranslationService.GetAdaptiveMtDataset", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_ListAdaptiveMtDatasets_sync", + "title": "Snippet for the list_adaptive_mt_datasets call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#list_adaptive_mt_datasets.", + "file": "translation_service/list_adaptive_mt_datasets.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_adaptive_mt_datasets", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#list_adaptive_mt_datasets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsResponse", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "ListAdaptiveMtDatasets", + "full_name": "google.cloud.translation.v3.TranslationService.ListAdaptiveMtDatasets", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_AdaptiveMtTranslate_sync", + "title": "Snippet for the adaptive_mt_translate call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#adaptive_mt_translate.", + "file": "translation_service/adaptive_mt_translate.rb", + "language": "RUBY", + "client_method": { + "short_name": "adaptive_mt_translate", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#adaptive_mt_translate", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "AdaptiveMtTranslate", + "full_name": "google.cloud.translation.v3.TranslationService.AdaptiveMtTranslate", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_GetAdaptiveMtFile_sync", + "title": "Snippet for the get_adaptive_mt_file call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#get_adaptive_mt_file.", + "file": "translation_service/get_adaptive_mt_file.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_adaptive_mt_file", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#get_adaptive_mt_file", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Translate::V3::AdaptiveMtFile", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "GetAdaptiveMtFile", + "full_name": "google.cloud.translation.v3.TranslationService.GetAdaptiveMtFile", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_DeleteAdaptiveMtFile_sync", + "title": "Snippet for the delete_adaptive_mt_file call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#delete_adaptive_mt_file.", + "file": "translation_service/delete_adaptive_mt_file.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_adaptive_mt_file", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#delete_adaptive_mt_file", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "DeleteAdaptiveMtFile", + "full_name": "google.cloud.translation.v3.TranslationService.DeleteAdaptiveMtFile", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_ImportAdaptiveMtFile_sync", + "title": "Snippet for the import_adaptive_mt_file call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#import_adaptive_mt_file.", + "file": "translation_service/import_adaptive_mt_file.rb", + "language": "RUBY", + "client_method": { + "short_name": "import_adaptive_mt_file", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#import_adaptive_mt_file", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "ImportAdaptiveMtFile", + "full_name": "google.cloud.translation.v3.TranslationService.ImportAdaptiveMtFile", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_ListAdaptiveMtFiles_sync", + "title": "Snippet for the list_adaptive_mt_files call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#list_adaptive_mt_files.", + "file": "translation_service/list_adaptive_mt_files.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_adaptive_mt_files", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#list_adaptive_mt_files", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Translate::V3::ListAdaptiveMtFilesResponse", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "ListAdaptiveMtFiles", + "full_name": "google.cloud.translation.v3.TranslationService.ListAdaptiveMtFiles", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_ListAdaptiveMtSentences_sync", + "title": "Snippet for the list_adaptive_mt_sentences call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#list_adaptive_mt_sentences.", + "file": "translation_service/list_adaptive_mt_sentences.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_adaptive_mt_sentences", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#list_adaptive_mt_sentences", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesResponse", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "ListAdaptiveMtSentences", + "full_name": "google.cloud.translation.v3.TranslationService.ListAdaptiveMtSentences", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_ImportData_sync", + "title": "Snippet for the import_data call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#import_data.", + "file": "translation_service/import_data.rb", + "language": "RUBY", + "client_method": { + "short_name": "import_data", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#import_data", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::ImportDataRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "ImportData", + "full_name": "google.cloud.translation.v3.TranslationService.ImportData", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_ExportData_sync", + "title": "Snippet for the export_data call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#export_data.", + "file": "translation_service/export_data.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_data", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#export_data", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::ExportDataRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "ExportData", + "full_name": "google.cloud.translation.v3.TranslationService.ExportData", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_ListExamples_sync", + "title": "Snippet for the list_examples call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#list_examples.", + "file": "translation_service/list_examples.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_examples", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#list_examples", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::ListExamplesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Translate::V3::ListExamplesResponse", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "ListExamples", + "full_name": "google.cloud.translation.v3.TranslationService.ListExamples", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_CreateModel_sync", + "title": "Snippet for the create_model call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#create_model.", + "file": "translation_service/create_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_model", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#create_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::CreateModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "CreateModel", + "full_name": "google.cloud.translation.v3.TranslationService.CreateModel", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_ListModels_sync", + "title": "Snippet for the list_models call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#list_models.", + "file": "translation_service/list_models.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_models", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#list_models", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::ListModelsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Translate::V3::ListModelsResponse", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "ListModels", + "full_name": "google.cloud.translation.v3.TranslationService.ListModels", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_GetModel_sync", + "title": "Snippet for the get_model call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#get_model.", + "file": "translation_service/get_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_model", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#get_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::GetModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Translate::V3::Model", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "GetModel", + "full_name": "google.cloud.translation.v3.TranslationService.GetModel", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "translate_v3_generated_TranslationService_DeleteModel_sync", + "title": "Snippet for the delete_model call in the TranslationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#delete_model.", + "file": "translation_service/delete_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_model", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#delete_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Translate::V3::DeleteModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "TranslationService::Client", + "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" + }, + "method": { + "short_name": "DeleteModel", + "full_name": "google.cloud.translation.v3.TranslationService.DeleteModel", + "service": { + "short_name": "TranslationService", + "full_name": "google.cloud.translation.v3.TranslationService" + } + } + }, + "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-translate-v3/snippets/translation_service/adaptive_mt_translate.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/adaptive_mt_translate.rb new file mode 100644 index 000000000000..aa4ad9228411 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/adaptive_mt_translate.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 translate_v3_generated_TranslationService_AdaptiveMtTranslate_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the adaptive_mt_translate call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#adaptive_mt_translate. +# +def adaptive_mt_translate + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest.new + + # Call the adaptive_mt_translate method. + result = client.adaptive_mt_translate request + + # The returned object is of type Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse. + p result +end +# [END translate_v3_generated_TranslationService_AdaptiveMtTranslate_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/batch_translate_document.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/batch_translate_document.rb new file mode 100644 index 000000000000..25d0fe3a2789 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/batch_translate_document.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 translate_v3_generated_TranslationService_BatchTranslateDocument_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the batch_translate_document call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#batch_translate_document. +# +def batch_translate_document + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::BatchTranslateDocumentRequest.new + + # Call the batch_translate_document method. + result = client.batch_translate_document request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END translate_v3_generated_TranslationService_BatchTranslateDocument_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/batch_translate_text.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/batch_translate_text.rb new file mode 100644 index 000000000000..1ed61588014c --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/batch_translate_text.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 translate_v3_generated_TranslationService_BatchTranslateText_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the batch_translate_text call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#batch_translate_text. +# +def batch_translate_text + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::BatchTranslateTextRequest.new + + # Call the batch_translate_text method. + result = client.batch_translate_text request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END translate_v3_generated_TranslationService_BatchTranslateText_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_adaptive_mt_dataset.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_adaptive_mt_dataset.rb new file mode 100644 index 000000000000..a7e3243384ec --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_adaptive_mt_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 translate_v3_generated_TranslationService_CreateAdaptiveMtDataset_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the create_adaptive_mt_dataset call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#create_adaptive_mt_dataset. +# +def create_adaptive_mt_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest.new + + # Call the create_adaptive_mt_dataset method. + result = client.create_adaptive_mt_dataset request + + # The returned object is of type Google::Cloud::Translate::V3::AdaptiveMtDataset. + p result +end +# [END translate_v3_generated_TranslationService_CreateAdaptiveMtDataset_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_dataset.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_dataset.rb new file mode 100644 index 000000000000..0ae3a139cb62 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/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 translate_v3_generated_TranslationService_CreateDataset_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the create_dataset call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#create_dataset. +# +def create_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::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 translate_v3_generated_TranslationService_CreateDataset_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_glossary.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_glossary.rb new file mode 100644 index 000000000000..3ecab7c93861 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_glossary.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START translate_v3_generated_TranslationService_CreateGlossary_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the create_glossary call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#create_glossary. +# +def create_glossary + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::CreateGlossaryRequest.new + + # Call the create_glossary method. + result = client.create_glossary request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END translate_v3_generated_TranslationService_CreateGlossary_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_glossary_entry.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_glossary_entry.rb new file mode 100644 index 000000000000..9f644113a2e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_glossary_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 translate_v3_generated_TranslationService_CreateGlossaryEntry_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the create_glossary_entry call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#create_glossary_entry. +# +def create_glossary_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::CreateGlossaryEntryRequest.new + + # Call the create_glossary_entry method. + result = client.create_glossary_entry request + + # The returned object is of type Google::Cloud::Translate::V3::GlossaryEntry. + p result +end +# [END translate_v3_generated_TranslationService_CreateGlossaryEntry_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_model.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_model.rb new file mode 100644 index 000000000000..f13607493059 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/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 translate_v3_generated_TranslationService_CreateModel_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the create_model call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#create_model. +# +def create_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::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 translate_v3_generated_TranslationService_CreateModel_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_adaptive_mt_dataset.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_adaptive_mt_dataset.rb new file mode 100644 index 000000000000..f9f940bb5044 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_adaptive_mt_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 translate_v3_generated_TranslationService_DeleteAdaptiveMtDataset_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the delete_adaptive_mt_dataset call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#delete_adaptive_mt_dataset. +# +def delete_adaptive_mt_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest.new + + # Call the delete_adaptive_mt_dataset method. + result = client.delete_adaptive_mt_dataset request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END translate_v3_generated_TranslationService_DeleteAdaptiveMtDataset_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_adaptive_mt_file.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_adaptive_mt_file.rb new file mode 100644 index 000000000000..469a91f67799 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_adaptive_mt_file.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 translate_v3_generated_TranslationService_DeleteAdaptiveMtFile_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the delete_adaptive_mt_file call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#delete_adaptive_mt_file. +# +def delete_adaptive_mt_file + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest.new + + # Call the delete_adaptive_mt_file method. + result = client.delete_adaptive_mt_file request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END translate_v3_generated_TranslationService_DeleteAdaptiveMtFile_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_dataset.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_dataset.rb new file mode 100644 index 000000000000..36188a743141 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/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 translate_v3_generated_TranslationService_DeleteDataset_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the delete_dataset call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#delete_dataset. +# +def delete_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::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 translate_v3_generated_TranslationService_DeleteDataset_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_glossary.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_glossary.rb new file mode 100644 index 000000000000..0d5258e5b7f2 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_glossary.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START translate_v3_generated_TranslationService_DeleteGlossary_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the delete_glossary call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#delete_glossary. +# +def delete_glossary + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::DeleteGlossaryRequest.new + + # Call the delete_glossary method. + result = client.delete_glossary request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END translate_v3_generated_TranslationService_DeleteGlossary_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_glossary_entry.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_glossary_entry.rb new file mode 100644 index 000000000000..f9a3a195e7df --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_glossary_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 translate_v3_generated_TranslationService_DeleteGlossaryEntry_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the delete_glossary_entry call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#delete_glossary_entry. +# +def delete_glossary_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest.new + + # Call the delete_glossary_entry method. + result = client.delete_glossary_entry request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END translate_v3_generated_TranslationService_DeleteGlossaryEntry_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_model.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_model.rb new file mode 100644 index 000000000000..f97403f97994 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/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 translate_v3_generated_TranslationService_DeleteModel_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the delete_model call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#delete_model. +# +def delete_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::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 translate_v3_generated_TranslationService_DeleteModel_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/detect_language.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/detect_language.rb new file mode 100644 index 000000000000..55ecd2e01e60 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/detect_language.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 translate_v3_generated_TranslationService_DetectLanguage_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the detect_language call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#detect_language. +# +def detect_language + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::DetectLanguageRequest.new + + # Call the detect_language method. + result = client.detect_language request + + # The returned object is of type Google::Cloud::Translate::V3::DetectLanguageResponse. + p result +end +# [END translate_v3_generated_TranslationService_DetectLanguage_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/export_data.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/export_data.rb new file mode 100644 index 000000000000..67e09245adad --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/export_data.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 translate_v3_generated_TranslationService_ExportData_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the export_data call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#export_data. +# +def export_data + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::ExportDataRequest.new + + # Call the export_data method. + result = client.export_data request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END translate_v3_generated_TranslationService_ExportData_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_adaptive_mt_dataset.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_adaptive_mt_dataset.rb new file mode 100644 index 000000000000..ba4e677c2358 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_adaptive_mt_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 translate_v3_generated_TranslationService_GetAdaptiveMtDataset_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the get_adaptive_mt_dataset call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#get_adaptive_mt_dataset. +# +def get_adaptive_mt_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest.new + + # Call the get_adaptive_mt_dataset method. + result = client.get_adaptive_mt_dataset request + + # The returned object is of type Google::Cloud::Translate::V3::AdaptiveMtDataset. + p result +end +# [END translate_v3_generated_TranslationService_GetAdaptiveMtDataset_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_adaptive_mt_file.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_adaptive_mt_file.rb new file mode 100644 index 000000000000..0e7ebc6cc6ec --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_adaptive_mt_file.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 translate_v3_generated_TranslationService_GetAdaptiveMtFile_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the get_adaptive_mt_file call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#get_adaptive_mt_file. +# +def get_adaptive_mt_file + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest.new + + # Call the get_adaptive_mt_file method. + result = client.get_adaptive_mt_file request + + # The returned object is of type Google::Cloud::Translate::V3::AdaptiveMtFile. + p result +end +# [END translate_v3_generated_TranslationService_GetAdaptiveMtFile_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_dataset.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_dataset.rb new file mode 100644 index 000000000000..3c560b5a9f1f --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/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 translate_v3_generated_TranslationService_GetDataset_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the get_dataset call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#get_dataset. +# +def get_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::GetDatasetRequest.new + + # Call the get_dataset method. + result = client.get_dataset request + + # The returned object is of type Google::Cloud::Translate::V3::Dataset. + p result +end +# [END translate_v3_generated_TranslationService_GetDataset_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_glossary.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_glossary.rb new file mode 100644 index 000000000000..b4d2ade127f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_glossary.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START translate_v3_generated_TranslationService_GetGlossary_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the get_glossary call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#get_glossary. +# +def get_glossary + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::GetGlossaryRequest.new + + # Call the get_glossary method. + result = client.get_glossary request + + # The returned object is of type Google::Cloud::Translate::V3::Glossary. + p result +end +# [END translate_v3_generated_TranslationService_GetGlossary_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_glossary_entry.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_glossary_entry.rb new file mode 100644 index 000000000000..422026b30132 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_glossary_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 translate_v3_generated_TranslationService_GetGlossaryEntry_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the get_glossary_entry call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#get_glossary_entry. +# +def get_glossary_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::GetGlossaryEntryRequest.new + + # Call the get_glossary_entry method. + result = client.get_glossary_entry request + + # The returned object is of type Google::Cloud::Translate::V3::GlossaryEntry. + p result +end +# [END translate_v3_generated_TranslationService_GetGlossaryEntry_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_model.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_model.rb new file mode 100644 index 000000000000..c7ddbabd9b88 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/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 translate_v3_generated_TranslationService_GetModel_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the get_model call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#get_model. +# +def get_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::GetModelRequest.new + + # Call the get_model method. + result = client.get_model request + + # The returned object is of type Google::Cloud::Translate::V3::Model. + p result +end +# [END translate_v3_generated_TranslationService_GetModel_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_supported_languages.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_supported_languages.rb new file mode 100644 index 000000000000..3ee79de1a1de --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_supported_languages.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 translate_v3_generated_TranslationService_GetSupportedLanguages_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the get_supported_languages call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#get_supported_languages. +# +def get_supported_languages + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::GetSupportedLanguagesRequest.new + + # Call the get_supported_languages method. + result = client.get_supported_languages request + + # The returned object is of type Google::Cloud::Translate::V3::SupportedLanguages. + p result +end +# [END translate_v3_generated_TranslationService_GetSupportedLanguages_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/import_adaptive_mt_file.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/import_adaptive_mt_file.rb new file mode 100644 index 000000000000..e44c710d2853 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/import_adaptive_mt_file.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 translate_v3_generated_TranslationService_ImportAdaptiveMtFile_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the import_adaptive_mt_file call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#import_adaptive_mt_file. +# +def import_adaptive_mt_file + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest.new + + # Call the import_adaptive_mt_file method. + result = client.import_adaptive_mt_file request + + # The returned object is of type Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse. + p result +end +# [END translate_v3_generated_TranslationService_ImportAdaptiveMtFile_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/import_data.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/import_data.rb new file mode 100644 index 000000000000..5b13e7a3f486 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/import_data.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 translate_v3_generated_TranslationService_ImportData_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the import_data call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#import_data. +# +def import_data + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::ImportDataRequest.new + + # Call the import_data method. + result = client.import_data request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END translate_v3_generated_TranslationService_ImportData_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_adaptive_mt_datasets.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_adaptive_mt_datasets.rb new file mode 100644 index 000000000000..177ce32c2628 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_adaptive_mt_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 translate_v3_generated_TranslationService_ListAdaptiveMtDatasets_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the list_adaptive_mt_datasets call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#list_adaptive_mt_datasets. +# +def list_adaptive_mt_datasets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest.new + + # Call the list_adaptive_mt_datasets method. + result = client.list_adaptive_mt_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::Translate::V3::AdaptiveMtDataset. + p item + end +end +# [END translate_v3_generated_TranslationService_ListAdaptiveMtDatasets_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_adaptive_mt_files.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_adaptive_mt_files.rb new file mode 100644 index 000000000000..29e1435d5606 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_adaptive_mt_files.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 translate_v3_generated_TranslationService_ListAdaptiveMtFiles_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the list_adaptive_mt_files call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#list_adaptive_mt_files. +# +def list_adaptive_mt_files + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest.new + + # Call the list_adaptive_mt_files method. + result = client.list_adaptive_mt_files request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Translate::V3::AdaptiveMtFile. + p item + end +end +# [END translate_v3_generated_TranslationService_ListAdaptiveMtFiles_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_adaptive_mt_sentences.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_adaptive_mt_sentences.rb new file mode 100644 index 000000000000..eac68d950a17 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_adaptive_mt_sentences.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 translate_v3_generated_TranslationService_ListAdaptiveMtSentences_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the list_adaptive_mt_sentences call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#list_adaptive_mt_sentences. +# +def list_adaptive_mt_sentences + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest.new + + # Call the list_adaptive_mt_sentences method. + result = client.list_adaptive_mt_sentences request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Translate::V3::AdaptiveMtSentence. + p item + end +end +# [END translate_v3_generated_TranslationService_ListAdaptiveMtSentences_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_datasets.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_datasets.rb new file mode 100644 index 000000000000..5e51cd9506fe --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/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 translate_v3_generated_TranslationService_ListDatasets_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the list_datasets call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#list_datasets. +# +def list_datasets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::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::Translate::V3::Dataset. + p item + end +end +# [END translate_v3_generated_TranslationService_ListDatasets_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_examples.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_examples.rb new file mode 100644 index 000000000000..43332205b3b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_examples.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 translate_v3_generated_TranslationService_ListExamples_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the list_examples call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#list_examples. +# +def list_examples + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::ListExamplesRequest.new + + # Call the list_examples method. + result = client.list_examples request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Translate::V3::Example. + p item + end +end +# [END translate_v3_generated_TranslationService_ListExamples_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_glossaries.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_glossaries.rb new file mode 100644 index 000000000000..74b3307718fb --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_glossaries.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START translate_v3_generated_TranslationService_ListGlossaries_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the list_glossaries call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#list_glossaries. +# +def list_glossaries + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::ListGlossariesRequest.new + + # Call the list_glossaries method. + result = client.list_glossaries request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Translate::V3::Glossary. + p item + end +end +# [END translate_v3_generated_TranslationService_ListGlossaries_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_glossary_entries.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_glossary_entries.rb new file mode 100644 index 000000000000..f79260b875bb --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_glossary_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 translate_v3_generated_TranslationService_ListGlossaryEntries_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the list_glossary_entries call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#list_glossary_entries. +# +def list_glossary_entries + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::ListGlossaryEntriesRequest.new + + # Call the list_glossary_entries method. + result = client.list_glossary_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::Translate::V3::GlossaryEntry. + p item + end +end +# [END translate_v3_generated_TranslationService_ListGlossaryEntries_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_models.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_models.rb new file mode 100644 index 000000000000..50a7a989b9ac --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/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 translate_v3_generated_TranslationService_ListModels_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the list_models call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#list_models. +# +def list_models + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::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::Translate::V3::Model. + p item + end +end +# [END translate_v3_generated_TranslationService_ListModels_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/romanize_text.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/romanize_text.rb new file mode 100644 index 000000000000..83a2d907ca73 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/romanize_text.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 translate_v3_generated_TranslationService_RomanizeText_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the romanize_text call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#romanize_text. +# +def romanize_text + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::RomanizeTextRequest.new + + # Call the romanize_text method. + result = client.romanize_text request + + # The returned object is of type Google::Cloud::Translate::V3::RomanizeTextResponse. + p result +end +# [END translate_v3_generated_TranslationService_RomanizeText_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/translate_document.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/translate_document.rb new file mode 100644 index 000000000000..bb4283c41aa1 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/translate_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 translate_v3_generated_TranslationService_TranslateDocument_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the translate_document call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#translate_document. +# +def translate_document + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::TranslateDocumentRequest.new + + # Call the translate_document method. + result = client.translate_document request + + # The returned object is of type Google::Cloud::Translate::V3::TranslateDocumentResponse. + p result +end +# [END translate_v3_generated_TranslationService_TranslateDocument_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/translate_text.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/translate_text.rb new file mode 100644 index 000000000000..78c5e7b91c60 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/translate_text.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 translate_v3_generated_TranslationService_TranslateText_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the translate_text call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#translate_text. +# +def translate_text + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::TranslateTextRequest.new + + # Call the translate_text method. + result = client.translate_text request + + # The returned object is of type Google::Cloud::Translate::V3::TranslateTextResponse. + p result +end +# [END translate_v3_generated_TranslationService_TranslateText_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/update_glossary.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/update_glossary.rb new file mode 100644 index 000000000000..fd1baaf19c5a --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/update_glossary.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START translate_v3_generated_TranslationService_UpdateGlossary_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the update_glossary call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#update_glossary. +# +def update_glossary + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::UpdateGlossaryRequest.new + + # Call the update_glossary method. + result = client.update_glossary request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END translate_v3_generated_TranslationService_UpdateGlossary_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/update_glossary_entry.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/update_glossary_entry.rb new file mode 100644 index 000000000000..8ba803b74149 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/update_glossary_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 translate_v3_generated_TranslationService_UpdateGlossaryEntry_sync] +require "google/cloud/translate/v3" + +## +# Snippet for the update_glossary_entry call in the TranslationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Translate::V3::TranslationService::Client#update_glossary_entry. +# +def update_glossary_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Translate::V3::TranslationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest.new + + # Call the update_glossary_entry method. + result = client.update_glossary_entry request + + # The returned object is of type Google::Cloud::Translate::V3::GlossaryEntry. + p result +end +# [END translate_v3_generated_TranslationService_UpdateGlossaryEntry_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_operations_test.rb b/owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_operations_test.rb new file mode 100644 index 000000000000..6095a4a5cd3c --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_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/translate/v3/translation_service_pb" +require "google/cloud/translate/v3/translation_service_services_pb" +require "google/cloud/translate/v3/translation_service" + +class ::Google::Cloud::Translate::V3::TranslationService::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::Translate::V3::TranslationService::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::Translate::V3::TranslationService::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::Translate::V3::TranslationService::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::Translate::V3::TranslationService::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::Translate::V3::TranslationService::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::Translate::V3::TranslationService::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::Translate::V3::TranslationService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_paths_test.rb b/owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_paths_test.rb new file mode 100644 index 000000000000..9f8a19eacf25 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_paths_test.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/translate/v3/translation_service" + +class ::Google::Cloud::Translate::V3::TranslationService::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_adaptive_mt_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::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.adaptive_mt_dataset_path project: "value0", location: "value1", dataset: "value2" + assert_equal "projects/value0/locations/value1/adaptiveMtDatasets/value2", path + end + end + + def test_adaptive_mt_file_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.adaptive_mt_file_path project: "value0", location: "value1", dataset: "value2", file: "value3" + assert_equal "projects/value0/locations/value1/adaptiveMtDatasets/value2/adaptiveMtFiles/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::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dataset_path project: "value0", location: "value1", dataset: "value2" + assert_equal "projects/value0/locations/value1/datasets/value2", path + end + end + + def test_glossary_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.glossary_path project: "value0", location: "value1", glossary: "value2" + assert_equal "projects/value0/locations/value1/glossaries/value2", path + end + end + + def test_glossary_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::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.glossary_entry_path project: "value0", location: "value1", glossary: "value2", glossary_entry: "value3" + assert_equal "projects/value0/locations/value1/glossaries/value2/glossaryEntries/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::Translate::V3::TranslationService::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::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.model_path project: "value0", location: "value1", model: "value2" + assert_equal "projects/value0/locations/value1/models/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_rest_test.rb b/owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_rest_test.rb new file mode 100644 index 000000000000..151151e4accd --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_rest_test.rb @@ -0,0 +1,2228 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/translate/v3/translation_service_pb" +require "google/cloud/translate/v3/translation_service/rest" + + +class ::Google::Cloud::Translate::V3::TranslationService::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_translate_text + # Create test objects. + client_result = ::Google::Cloud::Translate::V3::TranslateTextResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + contents = ["hello world"] + mime_type = "hello world" + source_language_code = "hello world" + target_language_code = "hello world" + parent = "hello world" + model = "hello world" + glossary_config = {} + transliteration_config = {} + labels = {} + + translate_text_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_translate_text_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, translate_text_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.translate_text({ contents: contents, mime_type: mime_type, source_language_code: source_language_code, target_language_code: target_language_code, parent: parent, model: model, glossary_config: glossary_config, transliteration_config: transliteration_config, labels: labels }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.translate_text contents: contents, mime_type: mime_type, source_language_code: source_language_code, target_language_code: target_language_code, parent: parent, model: model, glossary_config: glossary_config, transliteration_config: transliteration_config, labels: labels do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.translate_text ::Google::Cloud::Translate::V3::TranslateTextRequest.new(contents: contents, mime_type: mime_type, source_language_code: source_language_code, target_language_code: target_language_code, parent: parent, model: model, glossary_config: glossary_config, transliteration_config: transliteration_config, labels: labels) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.translate_text({ contents: contents, mime_type: mime_type, source_language_code: source_language_code, target_language_code: target_language_code, parent: parent, model: model, glossary_config: glossary_config, transliteration_config: transliteration_config, labels: labels }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.translate_text(::Google::Cloud::Translate::V3::TranslateTextRequest.new(contents: contents, mime_type: mime_type, source_language_code: source_language_code, target_language_code: target_language_code, parent: parent, model: model, glossary_config: glossary_config, transliteration_config: transliteration_config, labels: labels), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, translate_text_client_stub.call_count + end + end + end + + def test_romanize_text + # Create test objects. + client_result = ::Google::Cloud::Translate::V3::RomanizeTextResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + contents = ["hello world"] + source_language_code = "hello world" + + romanize_text_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_romanize_text_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, romanize_text_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.romanize_text({ parent: parent, contents: contents, source_language_code: source_language_code }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.romanize_text parent: parent, contents: contents, source_language_code: source_language_code do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.romanize_text ::Google::Cloud::Translate::V3::RomanizeTextRequest.new(parent: parent, contents: contents, source_language_code: source_language_code) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.romanize_text({ parent: parent, contents: contents, source_language_code: source_language_code }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.romanize_text(::Google::Cloud::Translate::V3::RomanizeTextRequest.new(parent: parent, contents: contents, source_language_code: source_language_code), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, romanize_text_client_stub.call_count + end + end + end + + def test_detect_language + # Create test objects. + client_result = ::Google::Cloud::Translate::V3::DetectLanguageResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + model = "hello world" + content = "hello world" + mime_type = "hello world" + labels = {} + + detect_language_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_detect_language_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, detect_language_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.detect_language({ parent: parent, model: model, content: content, mime_type: mime_type, labels: labels }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.detect_language parent: parent, model: model, content: content, mime_type: mime_type, labels: labels do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.detect_language ::Google::Cloud::Translate::V3::DetectLanguageRequest.new(parent: parent, model: model, content: content, mime_type: mime_type, labels: labels) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.detect_language({ parent: parent, model: model, content: content, mime_type: mime_type, labels: labels }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.detect_language(::Google::Cloud::Translate::V3::DetectLanguageRequest.new(parent: parent, model: model, content: content, mime_type: mime_type, labels: labels), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, detect_language_client_stub.call_count + end + end + end + + def test_get_supported_languages + # Create test objects. + client_result = ::Google::Cloud::Translate::V3::SupportedLanguages.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + display_language_code = "hello world" + model = "hello world" + + get_supported_languages_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_get_supported_languages_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_supported_languages_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_supported_languages({ parent: parent, display_language_code: display_language_code, model: model }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_supported_languages parent: parent, display_language_code: display_language_code, model: model do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_supported_languages ::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest.new(parent: parent, display_language_code: display_language_code, model: model) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_supported_languages({ parent: parent, display_language_code: display_language_code, model: model }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_supported_languages(::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest.new(parent: parent, display_language_code: display_language_code, model: model), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_supported_languages_client_stub.call_count + end + end + end + + def test_translate_document + # Create test objects. + client_result = ::Google::Cloud::Translate::V3::TranslateDocumentResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + source_language_code = "hello world" + target_language_code = "hello world" + document_input_config = {} + document_output_config = {} + model = "hello world" + glossary_config = {} + labels = {} + customized_attribution = "hello world" + is_translate_native_pdf_only = true + enable_shadow_removal_native_pdf = true + enable_rotation_correction = true + + translate_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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_translate_document_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, translate_document_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.translate_document({ parent: parent, source_language_code: source_language_code, target_language_code: target_language_code, document_input_config: document_input_config, document_output_config: document_output_config, model: model, glossary_config: glossary_config, labels: labels, customized_attribution: customized_attribution, is_translate_native_pdf_only: is_translate_native_pdf_only, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.translate_document parent: parent, source_language_code: source_language_code, target_language_code: target_language_code, document_input_config: document_input_config, document_output_config: document_output_config, model: model, glossary_config: glossary_config, labels: labels, customized_attribution: customized_attribution, is_translate_native_pdf_only: is_translate_native_pdf_only, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.translate_document ::Google::Cloud::Translate::V3::TranslateDocumentRequest.new(parent: parent, source_language_code: source_language_code, target_language_code: target_language_code, document_input_config: document_input_config, document_output_config: document_output_config, model: model, glossary_config: glossary_config, labels: labels, customized_attribution: customized_attribution, is_translate_native_pdf_only: is_translate_native_pdf_only, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.translate_document({ parent: parent, source_language_code: source_language_code, target_language_code: target_language_code, document_input_config: document_input_config, document_output_config: document_output_config, model: model, glossary_config: glossary_config, labels: labels, customized_attribution: customized_attribution, is_translate_native_pdf_only: is_translate_native_pdf_only, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.translate_document(::Google::Cloud::Translate::V3::TranslateDocumentRequest.new(parent: parent, source_language_code: source_language_code, target_language_code: target_language_code, document_input_config: document_input_config, document_output_config: document_output_config, model: model, glossary_config: glossary_config, labels: labels, customized_attribution: customized_attribution, is_translate_native_pdf_only: is_translate_native_pdf_only, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, translate_document_client_stub.call_count + end + end + end + + def test_batch_translate_text + # Create test objects. + 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" + source_language_code = "hello world" + target_language_codes = ["hello world"] + models = {} + input_configs = [{}] + output_config = {} + glossaries = {} + labels = {} + + batch_translate_text_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_batch_translate_text_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_translate_text_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.batch_translate_text({ parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, models: models, input_configs: input_configs, output_config: output_config, glossaries: glossaries, labels: labels }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.batch_translate_text parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, models: models, input_configs: input_configs, output_config: output_config, glossaries: glossaries, labels: labels do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.batch_translate_text ::Google::Cloud::Translate::V3::BatchTranslateTextRequest.new(parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, models: models, input_configs: input_configs, output_config: output_config, glossaries: glossaries, labels: labels) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.batch_translate_text({ parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, models: models, input_configs: input_configs, output_config: output_config, glossaries: glossaries, labels: labels }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.batch_translate_text(::Google::Cloud::Translate::V3::BatchTranslateTextRequest.new(parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, models: models, input_configs: input_configs, output_config: output_config, glossaries: glossaries, labels: labels), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_translate_text_client_stub.call_count + end + end + end + + def test_batch_translate_document + # Create test objects. + 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" + source_language_code = "hello world" + target_language_codes = ["hello world"] + input_configs = [{}] + output_config = {} + models = {} + glossaries = {} + format_conversions = {} + customized_attribution = "hello world" + enable_shadow_removal_native_pdf = true + enable_rotation_correction = true + + batch_translate_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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_batch_translate_document_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_translate_document_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.batch_translate_document({ parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, input_configs: input_configs, output_config: output_config, models: models, glossaries: glossaries, format_conversions: format_conversions, customized_attribution: customized_attribution, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.batch_translate_document parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, input_configs: input_configs, output_config: output_config, models: models, glossaries: glossaries, format_conversions: format_conversions, customized_attribution: customized_attribution, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.batch_translate_document ::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest.new(parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, input_configs: input_configs, output_config: output_config, models: models, glossaries: glossaries, format_conversions: format_conversions, customized_attribution: customized_attribution, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.batch_translate_document({ parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, input_configs: input_configs, output_config: output_config, models: models, glossaries: glossaries, format_conversions: format_conversions, customized_attribution: customized_attribution, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.batch_translate_document(::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest.new(parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, input_configs: input_configs, output_config: output_config, models: models, glossaries: glossaries, format_conversions: format_conversions, customized_attribution: customized_attribution, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_translate_document_client_stub.call_count + end + end + end + + def test_create_glossary + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + glossary = {} + + create_glossary_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_create_glossary_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_glossary_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_glossary({ parent: parent, glossary: glossary }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_glossary parent: parent, glossary: glossary do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_glossary ::Google::Cloud::Translate::V3::CreateGlossaryRequest.new(parent: parent, glossary: glossary) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_glossary({ parent: parent, glossary: glossary }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_glossary(::Google::Cloud::Translate::V3::CreateGlossaryRequest.new(parent: parent, glossary: glossary), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_glossary_client_stub.call_count + end + end + end + + def test_update_glossary + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + glossary = {} + update_mask = {} + + update_glossary_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_update_glossary_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_glossary_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_glossary({ glossary: glossary, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_glossary glossary: glossary, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_glossary ::Google::Cloud::Translate::V3::UpdateGlossaryRequest.new(glossary: glossary, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_glossary({ glossary: glossary, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_glossary(::Google::Cloud::Translate::V3::UpdateGlossaryRequest.new(glossary: glossary, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_glossary_client_stub.call_count + end + end + end + + def test_list_glossaries + # Create test objects. + client_result = ::Google::Cloud::Translate::V3::ListGlossariesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_glossaries_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_list_glossaries_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_glossaries_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_glossaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_glossaries parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_glossaries ::Google::Cloud::Translate::V3::ListGlossariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_glossaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_glossaries(::Google::Cloud::Translate::V3::ListGlossariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_glossaries_client_stub.call_count + end + end + end + + def test_get_glossary + # Create test objects. + client_result = ::Google::Cloud::Translate::V3::Glossary.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_glossary_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_get_glossary_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_glossary_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_glossary({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_glossary name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_glossary ::Google::Cloud::Translate::V3::GetGlossaryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_glossary({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_glossary(::Google::Cloud::Translate::V3::GetGlossaryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_glossary_client_stub.call_count + end + end + end + + def test_delete_glossary + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_glossary_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_delete_glossary_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_glossary_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_glossary({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_glossary name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_glossary ::Google::Cloud::Translate::V3::DeleteGlossaryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_glossary({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_glossary(::Google::Cloud::Translate::V3::DeleteGlossaryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_glossary_client_stub.call_count + end + end + end + + def test_get_glossary_entry + # Create test objects. + client_result = ::Google::Cloud::Translate::V3::GlossaryEntry.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_glossary_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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_get_glossary_entry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_glossary_entry_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_glossary_entry({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_glossary_entry name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_glossary_entry ::Google::Cloud::Translate::V3::GetGlossaryEntryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_glossary_entry({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_glossary_entry(::Google::Cloud::Translate::V3::GetGlossaryEntryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_glossary_entry_client_stub.call_count + end + end + end + + def test_list_glossary_entries + # Create test objects. + client_result = ::Google::Cloud::Translate::V3::ListGlossaryEntriesResponse.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_glossary_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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_list_glossary_entries_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_glossary_entries_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_glossary_entries({ 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_glossary_entries 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_glossary_entries ::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest.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_glossary_entries({ 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_glossary_entries(::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest.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_glossary_entries_client_stub.call_count + end + end + end + + def test_create_glossary_entry + # Create test objects. + client_result = ::Google::Cloud::Translate::V3::GlossaryEntry.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + glossary_entry = {} + + create_glossary_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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_create_glossary_entry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_glossary_entry_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_glossary_entry({ parent: parent, glossary_entry: glossary_entry }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_glossary_entry parent: parent, glossary_entry: glossary_entry do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_glossary_entry ::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest.new(parent: parent, glossary_entry: glossary_entry) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_glossary_entry({ parent: parent, glossary_entry: glossary_entry }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_glossary_entry(::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest.new(parent: parent, glossary_entry: glossary_entry), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_glossary_entry_client_stub.call_count + end + end + end + + def test_update_glossary_entry + # Create test objects. + client_result = ::Google::Cloud::Translate::V3::GlossaryEntry.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + glossary_entry = {} + + update_glossary_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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_update_glossary_entry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_glossary_entry_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_glossary_entry({ glossary_entry: glossary_entry }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_glossary_entry glossary_entry: glossary_entry do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_glossary_entry ::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest.new(glossary_entry: glossary_entry) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_glossary_entry({ glossary_entry: glossary_entry }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_glossary_entry(::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest.new(glossary_entry: glossary_entry), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_glossary_entry_client_stub.call_count + end + end + end + + def test_delete_glossary_entry + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_glossary_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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_delete_glossary_entry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_glossary_entry_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_glossary_entry({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_glossary_entry name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_glossary_entry ::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_glossary_entry({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_glossary_entry(::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_glossary_entry_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 = {} + + 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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_create_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_dataset_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_dataset({ parent: parent, dataset: dataset }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_dataset parent: parent, dataset: dataset do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_dataset ::Google::Cloud::Translate::V3::CreateDatasetRequest.new(parent: parent, dataset: dataset) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_dataset({ parent: parent, dataset: dataset }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_dataset(::Google::Cloud::Translate::V3::CreateDatasetRequest.new(parent: parent, dataset: dataset), 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_get_dataset + # Create test objects. + client_result = ::Google::Cloud::Translate::V3::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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_get_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_dataset_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::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::Translate::V3::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::Translate::V3::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_list_datasets + # Create test objects. + client_result = ::Google::Cloud::Translate::V3::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" + + 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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_list_datasets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_datasets_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::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 }) 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 do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_datasets ::Google::Cloud::Translate::V3::ListDatasetsRequest.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_datasets({ 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_datasets(::Google::Cloud::Translate::V3::ListDatasetsRequest.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_datasets_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" + + 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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_delete_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_dataset_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_dataset({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_dataset name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_dataset ::Google::Cloud::Translate::V3::DeleteDatasetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_dataset({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_dataset(::Google::Cloud::Translate::V3::DeleteDatasetRequest.new(name: name), 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_create_adaptive_mt_dataset + # Create test objects. + client_result = ::Google::Cloud::Translate::V3::AdaptiveMtDataset.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + adaptive_mt_dataset = {} + + create_adaptive_mt_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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_create_adaptive_mt_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_adaptive_mt_dataset_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_adaptive_mt_dataset({ parent: parent, adaptive_mt_dataset: adaptive_mt_dataset }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_adaptive_mt_dataset parent: parent, adaptive_mt_dataset: adaptive_mt_dataset do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_adaptive_mt_dataset ::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest.new(parent: parent, adaptive_mt_dataset: adaptive_mt_dataset) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_adaptive_mt_dataset({ parent: parent, adaptive_mt_dataset: adaptive_mt_dataset }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_adaptive_mt_dataset(::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest.new(parent: parent, adaptive_mt_dataset: adaptive_mt_dataset), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_adaptive_mt_dataset_client_stub.call_count + end + end + end + + def test_delete_adaptive_mt_dataset + # 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_adaptive_mt_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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_delete_adaptive_mt_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_adaptive_mt_dataset_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_adaptive_mt_dataset({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_adaptive_mt_dataset name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_adaptive_mt_dataset ::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_adaptive_mt_dataset({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_adaptive_mt_dataset(::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_adaptive_mt_dataset_client_stub.call_count + end + end + end + + def test_get_adaptive_mt_dataset + # Create test objects. + client_result = ::Google::Cloud::Translate::V3::AdaptiveMtDataset.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_adaptive_mt_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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_get_adaptive_mt_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_adaptive_mt_dataset_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_adaptive_mt_dataset({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_adaptive_mt_dataset name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_adaptive_mt_dataset ::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_adaptive_mt_dataset({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_adaptive_mt_dataset(::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_adaptive_mt_dataset_client_stub.call_count + end + end + end + + def test_list_adaptive_mt_datasets + # Create test objects. + client_result = ::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_adaptive_mt_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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_list_adaptive_mt_datasets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_adaptive_mt_datasets_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_adaptive_mt_datasets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_adaptive_mt_datasets parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_adaptive_mt_datasets ::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_adaptive_mt_datasets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_adaptive_mt_datasets(::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_adaptive_mt_datasets_client_stub.call_count + end + end + end + + def test_adaptive_mt_translate + # Create test objects. + client_result = ::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + dataset = "hello world" + content = ["hello world"] + reference_sentence_config = {} + glossary_config = {} + + adaptive_mt_translate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_adaptive_mt_translate_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, adaptive_mt_translate_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.adaptive_mt_translate({ parent: parent, dataset: dataset, content: content, reference_sentence_config: reference_sentence_config, glossary_config: glossary_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.adaptive_mt_translate parent: parent, dataset: dataset, content: content, reference_sentence_config: reference_sentence_config, glossary_config: glossary_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.adaptive_mt_translate ::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest.new(parent: parent, dataset: dataset, content: content, reference_sentence_config: reference_sentence_config, glossary_config: glossary_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.adaptive_mt_translate({ parent: parent, dataset: dataset, content: content, reference_sentence_config: reference_sentence_config, glossary_config: glossary_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.adaptive_mt_translate(::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest.new(parent: parent, dataset: dataset, content: content, reference_sentence_config: reference_sentence_config, glossary_config: glossary_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, adaptive_mt_translate_client_stub.call_count + end + end + end + + def test_get_adaptive_mt_file + # Create test objects. + client_result = ::Google::Cloud::Translate::V3::AdaptiveMtFile.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_adaptive_mt_file_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_get_adaptive_mt_file_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_adaptive_mt_file_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_adaptive_mt_file({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_adaptive_mt_file name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_adaptive_mt_file ::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_adaptive_mt_file({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_adaptive_mt_file(::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_adaptive_mt_file_client_stub.call_count + end + end + end + + def test_delete_adaptive_mt_file + # 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_adaptive_mt_file_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_delete_adaptive_mt_file_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_adaptive_mt_file_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_adaptive_mt_file({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_adaptive_mt_file name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_adaptive_mt_file ::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_adaptive_mt_file({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_adaptive_mt_file(::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_adaptive_mt_file_client_stub.call_count + end + end + end + + def test_import_adaptive_mt_file + # Create test objects. + client_result = ::Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + file_input_source = {} + + import_adaptive_mt_file_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_import_adaptive_mt_file_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, import_adaptive_mt_file_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.import_adaptive_mt_file({ parent: parent, file_input_source: file_input_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.import_adaptive_mt_file parent: parent, file_input_source: file_input_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.import_adaptive_mt_file ::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest.new(parent: parent, file_input_source: file_input_source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.import_adaptive_mt_file({ parent: parent, file_input_source: file_input_source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.import_adaptive_mt_file(::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest.new(parent: parent, file_input_source: file_input_source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, import_adaptive_mt_file_client_stub.call_count + end + end + end + + def test_list_adaptive_mt_files + # Create test objects. + client_result = ::Google::Cloud::Translate::V3::ListAdaptiveMtFilesResponse.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_adaptive_mt_files_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_list_adaptive_mt_files_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_adaptive_mt_files_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_adaptive_mt_files({ 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_adaptive_mt_files 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_adaptive_mt_files ::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest.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_adaptive_mt_files({ 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_adaptive_mt_files(::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest.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_adaptive_mt_files_client_stub.call_count + end + end + end + + def test_list_adaptive_mt_sentences + # Create test objects. + client_result = ::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesResponse.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_adaptive_mt_sentences_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_list_adaptive_mt_sentences_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_adaptive_mt_sentences_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_adaptive_mt_sentences({ 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_adaptive_mt_sentences 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_adaptive_mt_sentences ::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest.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_adaptive_mt_sentences({ 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_adaptive_mt_sentences(::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest.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_adaptive_mt_sentences_client_stub.call_count + end + end + end + + def test_import_data + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + dataset = "hello world" + input_config = {} + + import_data_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_import_data_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, import_data_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.import_data({ dataset: dataset, input_config: input_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.import_data dataset: dataset, input_config: input_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.import_data ::Google::Cloud::Translate::V3::ImportDataRequest.new(dataset: dataset, input_config: input_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.import_data({ dataset: dataset, input_config: input_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.import_data(::Google::Cloud::Translate::V3::ImportDataRequest.new(dataset: dataset, input_config: input_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, import_data_client_stub.call_count + end + end + end + + def test_export_data + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + dataset = "hello world" + output_config = {} + + export_data_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_export_data_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_data_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_data({ dataset: dataset, output_config: output_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_data dataset: dataset, output_config: output_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_data ::Google::Cloud::Translate::V3::ExportDataRequest.new(dataset: dataset, output_config: output_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_data({ dataset: dataset, output_config: output_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_data(::Google::Cloud::Translate::V3::ExportDataRequest.new(dataset: dataset, output_config: output_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_data_client_stub.call_count + end + end + end + + def test_list_examples + # Create test objects. + client_result = ::Google::Cloud::Translate::V3::ListExamplesResponse.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_examples_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_list_examples_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_examples_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_examples({ 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_examples 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_examples ::Google::Cloud::Translate::V3::ListExamplesRequest.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_examples({ 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_examples(::Google::Cloud::Translate::V3::ListExamplesRequest.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_examples_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 = {} + + 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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_create_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_model_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_model({ parent: parent, model: model }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_model parent: parent, model: model do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_model ::Google::Cloud::Translate::V3::CreateModelRequest.new(parent: parent, model: model) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_model({ parent: parent, model: model }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_model(::Google::Cloud::Translate::V3::CreateModelRequest.new(parent: parent, model: model), 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_list_models + # Create test objects. + client_result = ::Google::Cloud::Translate::V3::ListModelsResponse.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_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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_list_models_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_models_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_models({ 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_models 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_models ::Google::Cloud::Translate::V3::ListModelsRequest.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_models({ 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_models(::Google::Cloud::Translate::V3::ListModelsRequest.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_models_client_stub.call_count + end + end + end + + def test_get_model + # Create test objects. + client_result = ::Google::Cloud::Translate::V3::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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_get_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_model_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::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::Translate::V3::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::Translate::V3::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_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" + + 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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_delete_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_model_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_model({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_model name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_model ::Google::Cloud::Translate::V3::DeleteModelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_model({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_model(::Google::Cloud::Translate::V3::DeleteModelRequest.new(name: name), 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_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::Translate::V3::TranslationService::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::Translate::V3::TranslationService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_test.rb b/owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_test.rb new file mode 100644 index 000000000000..26223607f22b --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_test.rb @@ -0,0 +1,2575 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/translate/v3/translation_service_pb" +require "google/cloud/translate/v3/translation_service" + +class ::Google::Cloud::Translate::V3::TranslationService::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_translate_text + # Create GRPC objects. + grpc_response = ::Google::Cloud::Translate::V3::TranslateTextResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + contents = ["hello world"] + mime_type = "hello world" + source_language_code = "hello world" + target_language_code = "hello world" + parent = "hello world" + model = "hello world" + glossary_config = {} + transliteration_config = {} + labels = {} + + translate_text_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :translate_text, name + assert_kind_of ::Google::Cloud::Translate::V3::TranslateTextRequest, request + assert_equal ["hello world"], request["contents"] + assert_equal "hello world", request["mime_type"] + assert_equal "hello world", request["source_language_code"] + assert_equal "hello world", request["target_language_code"] + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["model"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig), request["glossary_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::TransliterationConfig), request["transliteration_config"] + assert_equal({}, request["labels"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, translate_text_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.translate_text({ contents: contents, mime_type: mime_type, source_language_code: source_language_code, target_language_code: target_language_code, parent: parent, model: model, glossary_config: glossary_config, transliteration_config: transliteration_config, labels: labels }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.translate_text contents: contents, mime_type: mime_type, source_language_code: source_language_code, target_language_code: target_language_code, parent: parent, model: model, glossary_config: glossary_config, transliteration_config: transliteration_config, labels: labels do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.translate_text ::Google::Cloud::Translate::V3::TranslateTextRequest.new(contents: contents, mime_type: mime_type, source_language_code: source_language_code, target_language_code: target_language_code, parent: parent, model: model, glossary_config: glossary_config, transliteration_config: transliteration_config, labels: labels) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.translate_text({ contents: contents, mime_type: mime_type, source_language_code: source_language_code, target_language_code: target_language_code, parent: parent, model: model, glossary_config: glossary_config, transliteration_config: transliteration_config, labels: labels }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.translate_text(::Google::Cloud::Translate::V3::TranslateTextRequest.new(contents: contents, mime_type: mime_type, source_language_code: source_language_code, target_language_code: target_language_code, parent: parent, model: model, glossary_config: glossary_config, transliteration_config: transliteration_config, labels: labels), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, translate_text_client_stub.call_rpc_count + end + end + + def test_romanize_text + # Create GRPC objects. + grpc_response = ::Google::Cloud::Translate::V3::RomanizeTextResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + contents = ["hello world"] + source_language_code = "hello world" + + romanize_text_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :romanize_text, name + assert_kind_of ::Google::Cloud::Translate::V3::RomanizeTextRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["contents"] + assert_equal "hello world", request["source_language_code"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, romanize_text_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.romanize_text({ parent: parent, contents: contents, source_language_code: source_language_code }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.romanize_text parent: parent, contents: contents, source_language_code: source_language_code do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.romanize_text ::Google::Cloud::Translate::V3::RomanizeTextRequest.new(parent: parent, contents: contents, source_language_code: source_language_code) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.romanize_text({ parent: parent, contents: contents, source_language_code: source_language_code }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.romanize_text(::Google::Cloud::Translate::V3::RomanizeTextRequest.new(parent: parent, contents: contents, source_language_code: source_language_code), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, romanize_text_client_stub.call_rpc_count + end + end + + def test_detect_language + # Create GRPC objects. + grpc_response = ::Google::Cloud::Translate::V3::DetectLanguageResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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 = "hello world" + content = "hello world" + mime_type = "hello world" + labels = {} + + detect_language_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :detect_language, name + assert_kind_of ::Google::Cloud::Translate::V3::DetectLanguageRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["model"] + assert_equal "hello world", request["content"] + assert_equal :content, request.source + assert_equal "hello world", request["mime_type"] + assert_equal({}, request["labels"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, detect_language_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.detect_language({ parent: parent, model: model, content: content, mime_type: mime_type, labels: labels }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.detect_language parent: parent, model: model, content: content, mime_type: mime_type, labels: labels do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.detect_language ::Google::Cloud::Translate::V3::DetectLanguageRequest.new(parent: parent, model: model, content: content, mime_type: mime_type, labels: labels) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.detect_language({ parent: parent, model: model, content: content, mime_type: mime_type, labels: labels }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.detect_language(::Google::Cloud::Translate::V3::DetectLanguageRequest.new(parent: parent, model: model, content: content, mime_type: mime_type, labels: labels), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, detect_language_client_stub.call_rpc_count + end + end + + def test_get_supported_languages + # Create GRPC objects. + grpc_response = ::Google::Cloud::Translate::V3::SupportedLanguages.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + display_language_code = "hello world" + model = "hello world" + + get_supported_languages_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_supported_languages, name + assert_kind_of ::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["display_language_code"] + assert_equal "hello world", request["model"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_supported_languages_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_supported_languages({ parent: parent, display_language_code: display_language_code, model: model }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_supported_languages parent: parent, display_language_code: display_language_code, model: model do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_supported_languages ::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest.new(parent: parent, display_language_code: display_language_code, model: model) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_supported_languages({ parent: parent, display_language_code: display_language_code, model: model }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_supported_languages(::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest.new(parent: parent, display_language_code: display_language_code, model: model), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_supported_languages_client_stub.call_rpc_count + end + end + + def test_translate_document + # Create GRPC objects. + grpc_response = ::Google::Cloud::Translate::V3::TranslateDocumentResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + source_language_code = "hello world" + target_language_code = "hello world" + document_input_config = {} + document_output_config = {} + model = "hello world" + glossary_config = {} + labels = {} + customized_attribution = "hello world" + is_translate_native_pdf_only = true + enable_shadow_removal_native_pdf = true + enable_rotation_correction = true + + translate_document_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :translate_document, name + assert_kind_of ::Google::Cloud::Translate::V3::TranslateDocumentRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["source_language_code"] + assert_equal "hello world", request["target_language_code"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::DocumentInputConfig), request["document_input_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::DocumentOutputConfig), request["document_output_config"] + assert_equal "hello world", request["model"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig), request["glossary_config"] + assert_equal({}, request["labels"].to_h) + assert_equal "hello world", request["customized_attribution"] + assert_equal true, request["is_translate_native_pdf_only"] + assert_equal true, request["enable_shadow_removal_native_pdf"] + assert_equal true, request["enable_rotation_correction"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, translate_document_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.translate_document({ parent: parent, source_language_code: source_language_code, target_language_code: target_language_code, document_input_config: document_input_config, document_output_config: document_output_config, model: model, glossary_config: glossary_config, labels: labels, customized_attribution: customized_attribution, is_translate_native_pdf_only: is_translate_native_pdf_only, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.translate_document parent: parent, source_language_code: source_language_code, target_language_code: target_language_code, document_input_config: document_input_config, document_output_config: document_output_config, model: model, glossary_config: glossary_config, labels: labels, customized_attribution: customized_attribution, is_translate_native_pdf_only: is_translate_native_pdf_only, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.translate_document ::Google::Cloud::Translate::V3::TranslateDocumentRequest.new(parent: parent, source_language_code: source_language_code, target_language_code: target_language_code, document_input_config: document_input_config, document_output_config: document_output_config, model: model, glossary_config: glossary_config, labels: labels, customized_attribution: customized_attribution, is_translate_native_pdf_only: is_translate_native_pdf_only, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.translate_document({ parent: parent, source_language_code: source_language_code, target_language_code: target_language_code, document_input_config: document_input_config, document_output_config: document_output_config, model: model, glossary_config: glossary_config, labels: labels, customized_attribution: customized_attribution, is_translate_native_pdf_only: is_translate_native_pdf_only, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.translate_document(::Google::Cloud::Translate::V3::TranslateDocumentRequest.new(parent: parent, source_language_code: source_language_code, target_language_code: target_language_code, document_input_config: document_input_config, document_output_config: document_output_config, model: model, glossary_config: glossary_config, labels: labels, customized_attribution: customized_attribution, is_translate_native_pdf_only: is_translate_native_pdf_only, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, translate_document_client_stub.call_rpc_count + end + end + + def test_batch_translate_text + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + source_language_code = "hello world" + target_language_codes = ["hello world"] + models = {} + input_configs = [{}] + output_config = {} + glossaries = {} + labels = {} + + batch_translate_text_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_translate_text, name + assert_kind_of ::Google::Cloud::Translate::V3::BatchTranslateTextRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["source_language_code"] + assert_equal ["hello world"], request["target_language_codes"] + assert_equal({}, request["models"].to_h) + assert_kind_of ::Google::Cloud::Translate::V3::InputConfig, request["input_configs"].first + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::OutputConfig), request["output_config"] + assert_equal({}, request["glossaries"].to_h) + assert_equal({}, request["labels"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_translate_text_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_translate_text({ parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, models: models, input_configs: input_configs, output_config: output_config, glossaries: glossaries, labels: labels }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.batch_translate_text parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, models: models, input_configs: input_configs, output_config: output_config, glossaries: glossaries, labels: labels do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.batch_translate_text ::Google::Cloud::Translate::V3::BatchTranslateTextRequest.new(parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, models: models, input_configs: input_configs, output_config: output_config, glossaries: glossaries, labels: labels) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.batch_translate_text({ parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, models: models, input_configs: input_configs, output_config: output_config, glossaries: glossaries, labels: labels }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.batch_translate_text(::Google::Cloud::Translate::V3::BatchTranslateTextRequest.new(parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, models: models, input_configs: input_configs, output_config: output_config, glossaries: glossaries, labels: labels), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_translate_text_client_stub.call_rpc_count + end + end + + def test_batch_translate_document + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + source_language_code = "hello world" + target_language_codes = ["hello world"] + input_configs = [{}] + output_config = {} + models = {} + glossaries = {} + format_conversions = {} + customized_attribution = "hello world" + enable_shadow_removal_native_pdf = true + enable_rotation_correction = true + + batch_translate_document_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_translate_document, name + assert_kind_of ::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["source_language_code"] + assert_equal ["hello world"], request["target_language_codes"] + assert_kind_of ::Google::Cloud::Translate::V3::BatchDocumentInputConfig, request["input_configs"].first + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::BatchDocumentOutputConfig), request["output_config"] + assert_equal({}, request["models"].to_h) + assert_equal({}, request["glossaries"].to_h) + assert_equal({}, request["format_conversions"].to_h) + assert_equal "hello world", request["customized_attribution"] + assert_equal true, request["enable_shadow_removal_native_pdf"] + assert_equal true, request["enable_rotation_correction"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_translate_document_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_translate_document({ parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, input_configs: input_configs, output_config: output_config, models: models, glossaries: glossaries, format_conversions: format_conversions, customized_attribution: customized_attribution, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.batch_translate_document parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, input_configs: input_configs, output_config: output_config, models: models, glossaries: glossaries, format_conversions: format_conversions, customized_attribution: customized_attribution, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.batch_translate_document ::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest.new(parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, input_configs: input_configs, output_config: output_config, models: models, glossaries: glossaries, format_conversions: format_conversions, customized_attribution: customized_attribution, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.batch_translate_document({ parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, input_configs: input_configs, output_config: output_config, models: models, glossaries: glossaries, format_conversions: format_conversions, customized_attribution: customized_attribution, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.batch_translate_document(::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest.new(parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, input_configs: input_configs, output_config: output_config, models: models, glossaries: glossaries, format_conversions: format_conversions, customized_attribution: customized_attribution, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_translate_document_client_stub.call_rpc_count + end + end + + def test_create_glossary + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + glossary = {} + + create_glossary_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_glossary, name + assert_kind_of ::Google::Cloud::Translate::V3::CreateGlossaryRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::Glossary), request["glossary"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_glossary_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_glossary({ parent: parent, glossary: glossary }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_glossary parent: parent, glossary: glossary do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_glossary ::Google::Cloud::Translate::V3::CreateGlossaryRequest.new(parent: parent, glossary: glossary) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_glossary({ parent: parent, glossary: glossary }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_glossary(::Google::Cloud::Translate::V3::CreateGlossaryRequest.new(parent: parent, glossary: glossary), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_glossary_client_stub.call_rpc_count + end + end + + def test_update_glossary + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + glossary = {} + update_mask = {} + + update_glossary_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_glossary, name + assert_kind_of ::Google::Cloud::Translate::V3::UpdateGlossaryRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::Glossary), request["glossary"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_glossary_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_glossary({ glossary: glossary, 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_glossary glossary: glossary, 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_glossary ::Google::Cloud::Translate::V3::UpdateGlossaryRequest.new(glossary: glossary, 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_glossary({ glossary: glossary, 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_glossary(::Google::Cloud::Translate::V3::UpdateGlossaryRequest.new(glossary: glossary, 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_glossary_client_stub.call_rpc_count + end + end + + def test_list_glossaries + # Create GRPC objects. + grpc_response = ::Google::Cloud::Translate::V3::ListGlossariesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_glossaries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_glossaries, name + assert_kind_of ::Google::Cloud::Translate::V3::ListGlossariesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_glossaries_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_glossaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_glossaries parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_glossaries ::Google::Cloud::Translate::V3::ListGlossariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_glossaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_glossaries(::Google::Cloud::Translate::V3::ListGlossariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_glossaries_client_stub.call_rpc_count + end + end + + def test_get_glossary + # Create GRPC objects. + grpc_response = ::Google::Cloud::Translate::V3::Glossary.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_glossary_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_glossary, name + assert_kind_of ::Google::Cloud::Translate::V3::GetGlossaryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_glossary_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_glossary({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_glossary name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_glossary ::Google::Cloud::Translate::V3::GetGlossaryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_glossary({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_glossary(::Google::Cloud::Translate::V3::GetGlossaryRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_glossary_client_stub.call_rpc_count + end + end + + def test_delete_glossary + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_glossary_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_glossary, name + assert_kind_of ::Google::Cloud::Translate::V3::DeleteGlossaryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_glossary_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_glossary({ name: 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_glossary name: 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_glossary ::Google::Cloud::Translate::V3::DeleteGlossaryRequest.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_glossary({ 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_glossary(::Google::Cloud::Translate::V3::DeleteGlossaryRequest.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_glossary_client_stub.call_rpc_count + end + end + + def test_get_glossary_entry + # Create GRPC objects. + grpc_response = ::Google::Cloud::Translate::V3::GlossaryEntry.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_glossary_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_glossary_entry, name + assert_kind_of ::Google::Cloud::Translate::V3::GetGlossaryEntryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_glossary_entry_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_glossary_entry({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_glossary_entry name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_glossary_entry ::Google::Cloud::Translate::V3::GetGlossaryEntryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_glossary_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_glossary_entry(::Google::Cloud::Translate::V3::GetGlossaryEntryRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_glossary_entry_client_stub.call_rpc_count + end + end + + def test_list_glossary_entries + # Create GRPC objects. + grpc_response = ::Google::Cloud::Translate::V3::ListGlossaryEntriesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_glossary_entries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_glossary_entries, name + assert_kind_of ::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest, 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_glossary_entries_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_glossary_entries({ 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_glossary_entries 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_glossary_entries ::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest.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_glossary_entries({ 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_glossary_entries(::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest.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_glossary_entries_client_stub.call_rpc_count + end + end + + def test_create_glossary_entry + # Create GRPC objects. + grpc_response = ::Google::Cloud::Translate::V3::GlossaryEntry.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + glossary_entry = {} + + create_glossary_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_glossary_entry, name + assert_kind_of ::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::GlossaryEntry), request["glossary_entry"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_glossary_entry_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_glossary_entry({ parent: parent, glossary_entry: glossary_entry }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_glossary_entry parent: parent, glossary_entry: glossary_entry do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_glossary_entry ::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest.new(parent: parent, glossary_entry: glossary_entry) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_glossary_entry({ parent: parent, glossary_entry: glossary_entry }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_glossary_entry(::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest.new(parent: parent, glossary_entry: glossary_entry), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_glossary_entry_client_stub.call_rpc_count + end + end + + def test_update_glossary_entry + # Create GRPC objects. + grpc_response = ::Google::Cloud::Translate::V3::GlossaryEntry.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + glossary_entry = {} + + update_glossary_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_glossary_entry, name + assert_kind_of ::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::GlossaryEntry), request["glossary_entry"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_glossary_entry_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_glossary_entry({ glossary_entry: glossary_entry }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_glossary_entry glossary_entry: glossary_entry do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_glossary_entry ::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest.new(glossary_entry: glossary_entry) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_glossary_entry({ glossary_entry: glossary_entry }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_glossary_entry(::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest.new(glossary_entry: glossary_entry), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_glossary_entry_client_stub.call_rpc_count + end + end + + def test_delete_glossary_entry + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_glossary_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_glossary_entry, name + assert_kind_of ::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_glossary_entry_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_glossary_entry({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_glossary_entry name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_glossary_entry ::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_glossary_entry({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_glossary_entry(::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_glossary_entry_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 = {} + + create_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_dataset, name + assert_kind_of ::Google::Cloud::Translate::V3::CreateDatasetRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::Dataset), request["dataset"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_dataset_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_dataset({ parent: parent, dataset: dataset }) do |response, 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: dataset do |response, 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::Translate::V3::CreateDatasetRequest.new(parent: parent, dataset: dataset) do |response, operation| + assert_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: dataset }, grpc_options) do |response, operation| + assert_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::Translate::V3::CreateDatasetRequest.new(parent: parent, dataset: dataset), grpc_options) do |response, operation| + assert_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_get_dataset + # Create GRPC objects. + grpc_response = ::Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::TranslationService::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::Translate::V3::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::Translate::V3::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_list_datasets + # Create GRPC objects. + grpc_response = ::Google::Cloud::Translate::V3::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" + + list_datasets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_datasets, name + assert_kind_of ::Google::Cloud::Translate::V3::ListDatasetsRequest, 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_datasets_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::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 }) do |response, 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 do |response, 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::Translate::V3::ListDatasetsRequest.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_datasets({ 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_datasets(::Google::Cloud::Translate::V3::ListDatasetsRequest.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_datasets_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" + + delete_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_dataset, name + assert_kind_of ::Google::Cloud::Translate::V3::DeleteDatasetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_dataset_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_dataset({ name: 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_dataset name: 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_dataset ::Google::Cloud::Translate::V3::DeleteDatasetRequest.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_dataset({ 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_dataset(::Google::Cloud::Translate::V3::DeleteDatasetRequest.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_dataset_client_stub.call_rpc_count + end + end + + def test_create_adaptive_mt_dataset + # Create GRPC objects. + grpc_response = ::Google::Cloud::Translate::V3::AdaptiveMtDataset.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + adaptive_mt_dataset = {} + + create_adaptive_mt_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_adaptive_mt_dataset, name + assert_kind_of ::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::AdaptiveMtDataset), request["adaptive_mt_dataset"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_adaptive_mt_dataset_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_adaptive_mt_dataset({ parent: parent, adaptive_mt_dataset: adaptive_mt_dataset }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_adaptive_mt_dataset parent: parent, adaptive_mt_dataset: adaptive_mt_dataset do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_adaptive_mt_dataset ::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest.new(parent: parent, adaptive_mt_dataset: adaptive_mt_dataset) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_adaptive_mt_dataset({ parent: parent, adaptive_mt_dataset: adaptive_mt_dataset }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_adaptive_mt_dataset(::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest.new(parent: parent, adaptive_mt_dataset: adaptive_mt_dataset), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_adaptive_mt_dataset_client_stub.call_rpc_count + end + end + + def test_delete_adaptive_mt_dataset + # 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_adaptive_mt_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_adaptive_mt_dataset, name + assert_kind_of ::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_adaptive_mt_dataset_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_adaptive_mt_dataset({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_adaptive_mt_dataset name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_adaptive_mt_dataset ::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_adaptive_mt_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.delete_adaptive_mt_dataset(::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest.new(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_adaptive_mt_dataset_client_stub.call_rpc_count + end + end + + def test_get_adaptive_mt_dataset + # Create GRPC objects. + grpc_response = ::Google::Cloud::Translate::V3::AdaptiveMtDataset.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_adaptive_mt_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_adaptive_mt_dataset, name + assert_kind_of ::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_adaptive_mt_dataset_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_adaptive_mt_dataset({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_adaptive_mt_dataset name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_adaptive_mt_dataset ::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_adaptive_mt_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_adaptive_mt_dataset(::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest.new(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_adaptive_mt_dataset_client_stub.call_rpc_count + end + end + + def test_list_adaptive_mt_datasets + # Create GRPC objects. + grpc_response = ::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_adaptive_mt_datasets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_adaptive_mt_datasets, name + assert_kind_of ::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_adaptive_mt_datasets_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_adaptive_mt_datasets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_adaptive_mt_datasets parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_adaptive_mt_datasets ::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_adaptive_mt_datasets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_adaptive_mt_datasets(::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_adaptive_mt_datasets_client_stub.call_rpc_count + end + end + + def test_adaptive_mt_translate + # Create GRPC objects. + grpc_response = ::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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 = "hello world" + content = ["hello world"] + reference_sentence_config = {} + glossary_config = {} + + adaptive_mt_translate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :adaptive_mt_translate, name + assert_kind_of ::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["dataset"] + assert_equal ["hello world"], request["content"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::ReferenceSentenceConfig), request["reference_sentence_config"] + assert request.has_reference_sentence_config? + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::GlossaryConfig), request["glossary_config"] + assert request.has_glossary_config? + refute_nil options + end + + Gapic::ServiceStub.stub :new, adaptive_mt_translate_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.adaptive_mt_translate({ parent: parent, dataset: dataset, content: content, reference_sentence_config: reference_sentence_config, glossary_config: glossary_config }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.adaptive_mt_translate parent: parent, dataset: dataset, content: content, reference_sentence_config: reference_sentence_config, glossary_config: glossary_config do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.adaptive_mt_translate ::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest.new(parent: parent, dataset: dataset, content: content, reference_sentence_config: reference_sentence_config, glossary_config: glossary_config) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.adaptive_mt_translate({ parent: parent, dataset: dataset, content: content, reference_sentence_config: reference_sentence_config, glossary_config: glossary_config }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.adaptive_mt_translate(::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest.new(parent: parent, dataset: dataset, content: content, reference_sentence_config: reference_sentence_config, glossary_config: glossary_config), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, adaptive_mt_translate_client_stub.call_rpc_count + end + end + + def test_get_adaptive_mt_file + # Create GRPC objects. + grpc_response = ::Google::Cloud::Translate::V3::AdaptiveMtFile.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_adaptive_mt_file_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_adaptive_mt_file, name + assert_kind_of ::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_adaptive_mt_file_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_adaptive_mt_file({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_adaptive_mt_file name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_adaptive_mt_file ::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_adaptive_mt_file({ 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_adaptive_mt_file(::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest.new(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_adaptive_mt_file_client_stub.call_rpc_count + end + end + + def test_delete_adaptive_mt_file + # 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_adaptive_mt_file_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_adaptive_mt_file, name + assert_kind_of ::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_adaptive_mt_file_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_adaptive_mt_file({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_adaptive_mt_file name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_adaptive_mt_file ::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_adaptive_mt_file({ 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_adaptive_mt_file(::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest.new(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_adaptive_mt_file_client_stub.call_rpc_count + end + end + + def test_import_adaptive_mt_file + # Create GRPC objects. + grpc_response = ::Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + file_input_source = {} + + import_adaptive_mt_file_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :import_adaptive_mt_file, name + assert_kind_of ::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::FileInputSource), request["file_input_source"] + assert_equal :file_input_source, request.source + refute_nil options + end + + Gapic::ServiceStub.stub :new, import_adaptive_mt_file_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.import_adaptive_mt_file({ parent: parent, file_input_source: file_input_source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.import_adaptive_mt_file parent: parent, file_input_source: file_input_source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.import_adaptive_mt_file ::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest.new(parent: parent, file_input_source: file_input_source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.import_adaptive_mt_file({ parent: parent, file_input_source: file_input_source }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.import_adaptive_mt_file(::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest.new(parent: parent, file_input_source: file_input_source), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, import_adaptive_mt_file_client_stub.call_rpc_count + end + end + + def test_list_adaptive_mt_files + # Create GRPC objects. + grpc_response = ::Google::Cloud::Translate::V3::ListAdaptiveMtFilesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_adaptive_mt_files_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_adaptive_mt_files, name + assert_kind_of ::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest, 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_adaptive_mt_files_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_adaptive_mt_files({ 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_adaptive_mt_files 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_adaptive_mt_files ::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest.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_adaptive_mt_files({ 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_adaptive_mt_files(::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest.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_adaptive_mt_files_client_stub.call_rpc_count + end + end + + def test_list_adaptive_mt_sentences + # Create GRPC objects. + grpc_response = ::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_adaptive_mt_sentences_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_adaptive_mt_sentences, name + assert_kind_of ::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest, 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_adaptive_mt_sentences_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_adaptive_mt_sentences({ 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_adaptive_mt_sentences 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_adaptive_mt_sentences ::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest.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_adaptive_mt_sentences({ 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_adaptive_mt_sentences(::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest.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_adaptive_mt_sentences_client_stub.call_rpc_count + end + end + + def test_import_data + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + dataset = "hello world" + input_config = {} + + import_data_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :import_data, name + assert_kind_of ::Google::Cloud::Translate::V3::ImportDataRequest, request + assert_equal "hello world", request["dataset"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::DatasetInputConfig), request["input_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, import_data_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.import_data({ dataset: dataset, input_config: input_config }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.import_data dataset: dataset, input_config: input_config do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.import_data ::Google::Cloud::Translate::V3::ImportDataRequest.new(dataset: dataset, input_config: input_config) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.import_data({ dataset: dataset, input_config: input_config }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.import_data(::Google::Cloud::Translate::V3::ImportDataRequest.new(dataset: dataset, input_config: input_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, import_data_client_stub.call_rpc_count + end + end + + def test_export_data + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + dataset = "hello world" + output_config = {} + + export_data_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_data, name + assert_kind_of ::Google::Cloud::Translate::V3::ExportDataRequest, request + assert_equal "hello world", request["dataset"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::DatasetOutputConfig), request["output_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_data_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_data({ dataset: dataset, output_config: output_config }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.export_data dataset: dataset, output_config: output_config do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.export_data ::Google::Cloud::Translate::V3::ExportDataRequest.new(dataset: dataset, output_config: output_config) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.export_data({ dataset: dataset, output_config: output_config }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.export_data(::Google::Cloud::Translate::V3::ExportDataRequest.new(dataset: dataset, output_config: output_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_data_client_stub.call_rpc_count + end + end + + def test_list_examples + # Create GRPC objects. + grpc_response = ::Google::Cloud::Translate::V3::ListExamplesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_examples_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_examples, name + assert_kind_of ::Google::Cloud::Translate::V3::ListExamplesRequest, 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_examples_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_examples({ 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_examples 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_examples ::Google::Cloud::Translate::V3::ListExamplesRequest.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_examples({ 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_examples(::Google::Cloud::Translate::V3::ListExamplesRequest.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_examples_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 = {} + + create_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_model, name + assert_kind_of ::Google::Cloud::Translate::V3::CreateModelRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::Model), request["model"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_model_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_model({ parent: parent, model: model }) do |response, 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: model do |response, 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::Translate::V3::CreateModelRequest.new(parent: parent, model: model) do |response, operation| + assert_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: model }, grpc_options) do |response, operation| + assert_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::Translate::V3::CreateModelRequest.new(parent: parent, model: model), grpc_options) do |response, operation| + assert_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_list_models + # Create GRPC objects. + grpc_response = ::Google::Cloud::Translate::V3::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" + filter = "hello world" + page_size = 42 + page_token = "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::Translate::V3::ListModelsRequest, 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_models_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_models({ 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_models 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_models ::Google::Cloud::Translate::V3::ListModelsRequest.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_models({ 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_models(::Google::Cloud::Translate::V3::ListModelsRequest.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_models_client_stub.call_rpc_count + end + end + + def test_get_model + # Create GRPC objects. + grpc_response = ::Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::TranslationService::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::Translate::V3::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::Translate::V3::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_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" + + delete_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_model, name + assert_kind_of ::Google::Cloud::Translate::V3::DeleteModelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_model_client_stub do + # Create client + client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_model({ name: 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_model name: 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_model ::Google::Cloud::Translate::V3::DeleteModelRequest.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_model({ 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_model(::Google::Cloud::Translate::V3::DeleteModelRequest.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_model_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::Translate::V3::TranslationService::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::Translate::V3::TranslationService::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::Translate::V3::TranslationService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Translate::V3::TranslationService::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::Translate::V3::TranslationService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Translate::V3::TranslationService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-translate-v3/test/helper.rb b/owl-bot-staging/google-cloud-translate-v3/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-translate-v3/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/.gitignore b/owl-bot-staging/google-cloud-video-live_stream-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-video-live_stream-v1/.repo-metadata.json new file mode 100644 index 000000000000..aeab9c64ff17 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "livestream.googleapis.com", + "api_shortname": "livestream", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest", + "distribution_name": "google-cloud-video-live_stream-v1", + "is_cloud": true, + "language": "ruby", + "name": "livestream", + "name_pretty": "Live Stream V1 API", + "product_documentation": "https://cloud.google.com/livestream/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The Live Stream API transcodes mezzanine live signals into direct-to-consumer streaming formats, including Dynamic Adaptive Streaming over HTTP (DASH/MPEG-DASH), and HTTP Live Streaming (HLS), for multiple device platforms. Note that google-cloud-video-live_stream-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video-live_stream instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/livestream/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/.rubocop.yml b/owl-bot-staging/google-cloud-video-live_stream-v1/.rubocop.yml new file mode 100644 index 000000000000..3d8359eaee07 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-video-live_stream-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-video-live_stream-v1.rb" diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/.toys.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/.yardopts b/owl-bot-staging/google-cloud-video-live_stream-v1/.yardopts new file mode 100644 index 000000000000..ab2ac4451b9f --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Live Stream 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-video-live_stream-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-video-live_stream-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..7132dc94ea28 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-video-live_stream-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-video-live_stream-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/video/live_stream/v1" + +client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/video/live_stream/v1" + +::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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-video-live_stream-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/video/live_stream/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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-video-live_stream-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-video-live_stream-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/Gemfile b/owl-bot-staging/google-cloud-video-live_stream-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/LICENSE.md b/owl-bot-staging/google-cloud-video-live_stream-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/README.md b/owl-bot-staging/google-cloud-video-live_stream-v1/README.md new file mode 100644 index 000000000000..1cce01e33fdb --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Live Stream V1 API + +API Client library for the Live Stream V1 API + +The Live Stream API transcodes mezzanine live signals into direct-to-consumer streaming formats, including Dynamic Adaptive Streaming over HTTP (DASH/MPEG-DASH), and HTTP Live Streaming (HLS), for multiple device platforms. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Live Stream V1 API. Most users should consider using +the main client gem, +[google-cloud-video-live_stream](https://rubygems.org/gems/google-cloud-video-live_stream). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-video-live_stream-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/livestream.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/video/live_stream/v1" + +client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new +request = ::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest.new # (request fields as keyword arguments...) +response = client.create_channel request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/livestream/) +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/video/live_stream/v1" +require "logger" + +client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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-video-live_stream`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-video-live_stream-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-video-live_stream`. +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-video-live_stream-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-video-live_stream-v1/Rakefile b/owl-bot-staging/google-cloud-video-live_stream-v1/Rakefile new file mode 100644 index 000000000000..b9de32a98243 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-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/video/live_stream/v1/livestream_service/credentials" + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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-video-live_stream-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-video-live_stream-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-video-live_stream-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-video-live_stream-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-video-live_stream-v1" + header "google-cloud-video-live_stream-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-video-live_stream-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-video-live_stream-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-video-live_stream-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-video-live_stream-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-video-live_stream-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-video-live_stream-v1/gapic_metadata.json new file mode 100644 index 000000000000..3b108930e5f2 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/gapic_metadata.json @@ -0,0 +1,188 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.video.livestream.v1", + "libraryPackage": "::Google::Cloud::Video::LiveStream::V1", + "services": { + "LivestreamService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client", + "rpcs": { + "CreateChannel": { + "methods": [ + "create_channel" + ] + }, + "ListChannels": { + "methods": [ + "list_channels" + ] + }, + "GetChannel": { + "methods": [ + "get_channel" + ] + }, + "DeleteChannel": { + "methods": [ + "delete_channel" + ] + }, + "UpdateChannel": { + "methods": [ + "update_channel" + ] + }, + "StartChannel": { + "methods": [ + "start_channel" + ] + }, + "StopChannel": { + "methods": [ + "stop_channel" + ] + }, + "StartDistribution": { + "methods": [ + "start_distribution" + ] + }, + "StopDistribution": { + "methods": [ + "stop_distribution" + ] + }, + "CreateInput": { + "methods": [ + "create_input" + ] + }, + "ListInputs": { + "methods": [ + "list_inputs" + ] + }, + "GetInput": { + "methods": [ + "get_input" + ] + }, + "DeleteInput": { + "methods": [ + "delete_input" + ] + }, + "UpdateInput": { + "methods": [ + "update_input" + ] + }, + "PreviewInput": { + "methods": [ + "preview_input" + ] + }, + "CreateEvent": { + "methods": [ + "create_event" + ] + }, + "ListEvents": { + "methods": [ + "list_events" + ] + }, + "GetEvent": { + "methods": [ + "get_event" + ] + }, + "DeleteEvent": { + "methods": [ + "delete_event" + ] + }, + "ListClips": { + "methods": [ + "list_clips" + ] + }, + "GetClip": { + "methods": [ + "get_clip" + ] + }, + "CreateClip": { + "methods": [ + "create_clip" + ] + }, + "DeleteClip": { + "methods": [ + "delete_clip" + ] + }, + "CreateDvrSession": { + "methods": [ + "create_dvr_session" + ] + }, + "ListDvrSessions": { + "methods": [ + "list_dvr_sessions" + ] + }, + "GetDvrSession": { + "methods": [ + "get_dvr_session" + ] + }, + "DeleteDvrSession": { + "methods": [ + "delete_dvr_session" + ] + }, + "UpdateDvrSession": { + "methods": [ + "update_dvr_session" + ] + }, + "CreateAsset": { + "methods": [ + "create_asset" + ] + }, + "DeleteAsset": { + "methods": [ + "delete_asset" + ] + }, + "GetAsset": { + "methods": [ + "get_asset" + ] + }, + "ListAssets": { + "methods": [ + "list_assets" + ] + }, + "GetPool": { + "methods": [ + "get_pool" + ] + }, + "UpdatePool": { + "methods": [ + "update_pool" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/google-cloud-video-live_stream-v1.gemspec b/owl-bot-staging/google-cloud-video-live_stream-v1/google-cloud-video-live_stream-v1.gemspec new file mode 100644 index 000000000000..ecdca90c5349 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/google-cloud-video-live_stream-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/video/live_stream/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-video-live_stream-v1" + gem.version = Google::Cloud::Video::LiveStream::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The Live Stream API transcodes mezzanine live signals into direct-to-consumer streaming formats, including Dynamic Adaptive Streaming over HTTP (DASH/MPEG-DASH), and HTTP Live Streaming (HLS), for multiple device platforms. Note that google-cloud-video-live_stream-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video-live_stream instead. See the readme for more details." + gem.summary = "API Client library for the Live Stream 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.2" + + 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-video-live_stream-v1/lib/google-cloud-video-live_stream-v1.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google-cloud-video-live_stream-v1.rb new file mode 100644 index 000000000000..581cf388ce2b --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google-cloud-video-live_stream-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/video/live_stream/v1" diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1.rb new file mode 100644 index 000000000000..49926cffb929 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/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/video/live_stream/v1/livestream_service" +require "google/cloud/video/live_stream/v1/version" + +module Google + module Cloud + module Video + module LiveStream + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/video/live_stream/v1" + # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/video/live_stream/v1" + # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/video/live_stream/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/bindings_override.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/bindings_override.rb new file mode 100644 index 000000000000..b9059d78ec3f --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/bindings_override.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! + +require "gapic/rest" + +module Google + module Cloud + module Video + module LiveStream + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/video/live_stream/v1/rest" + # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Video", "LiveStream"] + 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 +end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service.rb new file mode 100644 index 000000000000..a24205f13b01 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/video/live_stream/v1/version" + +require "google/cloud/video/live_stream/v1/livestream_service/credentials" +require "google/cloud/video/live_stream/v1/livestream_service/paths" +require "google/cloud/video/live_stream/v1/livestream_service/operations" +require "google/cloud/video/live_stream/v1/livestream_service/client" +require "google/cloud/video/live_stream/v1/livestream_service/rest" + +module Google + module Cloud + module Video + module LiveStream + module V1 + ## + # Using Live Stream API, you can generate live streams in the various + # renditions and streaming formats. The streaming format include HTTP Live + # Streaming (HLS) and Dynamic Adaptive Streaming over HTTP (DASH). You can send + # a source stream in the various ways, including Real-Time Messaging + # Protocol (RTMP) and Secure Reliable Transport (SRT). + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/video/live_stream/v1/livestream_service" + # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/video/live_stream/v1/livestream_service/rest" + # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + module LivestreamService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "livestream_service", "helpers.rb" +require "google/cloud/video/live_stream/v1/livestream_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/client.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/client.rb new file mode 100644 index 000000000000..06812729aaca --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/client.rb @@ -0,0 +1,4350 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/video/livestream/v1/service_pb" +require "google/cloud/location" + +module Google + module Cloud + module Video + module LiveStream + module V1 + module LivestreamService + ## + # Client for the LivestreamService service. + # + # Using Live Stream API, you can generate live streams in the various + # renditions and streaming formats. The streaming format include HTTP Live + # Streaming (HLS) and Dynamic Adaptive Streaming over HTTP (DASH). You can send + # a source stream in the various ways, including Real-Time Messaging + # Protocol (RTMP) and Secure Reliable Transport (SRT). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "livestream.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :livestream_service_stub + + ## + # Configure the LivestreamService Client class. + # + # See {::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LivestreamService clients + # ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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", "Video", "LiveStream", "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_channel.timeout = 60.0 + + default_config.rpcs.list_channels.timeout = 60.0 + default_config.rpcs.list_channels.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_channel.timeout = 60.0 + default_config.rpcs.get_channel.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_channel.timeout = 60.0 + + default_config.rpcs.update_channel.timeout = 60.0 + + default_config.rpcs.start_channel.timeout = 60.0 + + default_config.rpcs.stop_channel.timeout = 60.0 + + default_config.rpcs.start_distribution.timeout = 60.0 + + default_config.rpcs.stop_distribution.timeout = 60.0 + + default_config.rpcs.create_input.timeout = 60.0 + + default_config.rpcs.list_inputs.timeout = 60.0 + default_config.rpcs.list_inputs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_input.timeout = 60.0 + default_config.rpcs.get_input.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_input.timeout = 60.0 + + default_config.rpcs.update_input.timeout = 60.0 + + default_config.rpcs.preview_input.timeout = 60.0 + + default_config.rpcs.create_event.timeout = 60.0 + + default_config.rpcs.list_events.timeout = 60.0 + default_config.rpcs.list_events.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_event.timeout = 60.0 + default_config.rpcs.get_event.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_event.timeout = 60.0 + + default_config.rpcs.list_clips.timeout = 60.0 + default_config.rpcs.list_clips.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_clip.timeout = 60.0 + default_config.rpcs.get_clip.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_clip.timeout = 60.0 + + default_config.rpcs.delete_clip.timeout = 60.0 + + default_config.rpcs.create_dvr_session.timeout = 60.0 + + default_config.rpcs.list_dvr_sessions.timeout = 60.0 + default_config.rpcs.list_dvr_sessions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_dvr_session.timeout = 60.0 + default_config.rpcs.get_dvr_session.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_dvr_session.timeout = 60.0 + + default_config.rpcs.update_dvr_session.timeout = 60.0 + + default_config.rpcs.create_asset.timeout = 60.0 + + default_config.rpcs.delete_asset.timeout = 60.0 + + default_config.rpcs.get_asset.timeout = 60.0 + default_config.rpcs.get_asset.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_assets.timeout = 60.0 + default_config.rpcs.list_assets.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_pool.timeout = 60.0 + default_config.rpcs.get_pool.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_pool.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LivestreamService 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::Video::LiveStream::V1::LivestreamService::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 + @livestream_service_stub.universe_domain + end + + ## + # Create a new LivestreamService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LivestreamService 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/video/livestream/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 + + @livestream_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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 + ) + + @livestream_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 = @livestream_service_stub.endpoint + config.universe_domain = @livestream_service_stub.universe_domain + config.logger = @livestream_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Video::LiveStream::V1::LivestreamService::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 + @livestream_service_stub.logger + end + + # Service calls + + ## + # Creates a channel with the provided unique ID in the specified + # region. + # + # @overload create_channel(request, options = nil) + # Pass arguments to `create_channel` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::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, request_id: 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 location for the resource, in the form of: + # `projects/{project}/locations/{location}`. + # @param channel [::Google::Cloud::Video::LiveStream::V1::Channel, ::Hash] + # Required. The channel resource to be created. + # @param channel_id [::String] + # Required. The ID of the channel resource to be created. + # + # This value must be 1-63 characters, begin and end with a lower-case letter + # or a number, and consist of only lower-case letters, numbers, and hyphens. + # In other words, it must match the following regex: + # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @param request_id [::String] + # A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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 + + @livestream_service_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 + + ## + # Returns a list of all channels in the specified region. + # + # @overload list_channels(request, options = nil) + # Pass arguments to `list_channels` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::ListChannelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::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, filter: 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 location for the resource, in the form of: + # `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # The maximum number of items to return. If unspecified, server + # will pick an appropriate default. Server may return fewer items than + # requested. A caller should only rely on response's + # {::Google::Cloud::Video::LiveStream::V1::ListChannelsResponse#next_page_token next_page_token} + # to determine if there are more items left to be queried. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # @param filter [::String] + # The filter to apply to list results. + # @param order_by [::String] + # Specifies the ordering of results following syntax at + # https://cloud.google.com/apis/design/design_patterns#sorting_order. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Channel>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Channel>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_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 + + @livestream_service_stub.call_rpc :list_channels, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @livestream_service_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 + + ## + # Returns the specified channel. + # + # @overload get_channel(request, options = nil) + # Pass arguments to `get_channel` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::GetChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::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 resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Video::LiveStream::V1::Channel] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::Channel] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::GetChannelRequest.new + # + # # Call the get_channel method. + # result = client.get_channel request + # + # # The returned object is of type Google::Cloud::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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 + + @livestream_service_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 + + ## + # Deletes the specified channel. + # + # @overload delete_channel(request, options = nil) + # Pass arguments to `delete_channel` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::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, request_id: nil, force: 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 resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @param request_id [::String] + # A 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)`. + # @param force [::Boolean] + # If the `force` field is set to the default value of `false`, you must + # delete all of a channel's events before you can delete the channel itself. + # If the field is set to `true`, requests to delete a channel also delete + # associated channel events. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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 + + @livestream_service_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 + + ## + # Updates the specified channel. + # + # @overload update_channel(request, options = nil) + # Pass arguments to `update_channel` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::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(update_mask: nil, channel: nil, request_id: 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Field mask is used to specify the fields to be overwritten in the Channel + # resource by the update. You can only update the following fields: + # + # * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) + # * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) + # * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) + # * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) + # * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) + # * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) + # * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) + # * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) + # * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) + # * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) + # + # 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 mask is not present, then each field from the list above is updated + # if the field appears in the request payload. To unset a field, add the + # field to the update mask and remove it from the request payload. + # @param channel [::Google::Cloud::Video::LiveStream::V1::Channel, ::Hash] + # Required. The channel resource to be updated. + # @param request_id [::String] + # A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::V1::VERSION + metadata[:"x-goog-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 + + @livestream_service_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 + + ## + # Starts the specified channel. Part of the video pipeline will be created + # only when the StartChannel request is received by the server. + # + # @overload start_channel(request, options = nil) + # Pass arguments to `start_channel` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::StartChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::StartChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload start_channel(name: nil, request_id: nil) + # Pass arguments to `start_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 resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @param request_id [::String] + # A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::StartChannelRequest.new + # + # # Call the start_channel method. + # result = client.start_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 start_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::StartChannelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.start_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::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.start_channel.timeout, + metadata: metadata, + retry_policy: @config.rpcs.start_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :start_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 + + ## + # Stops the specified channel. Part of the video pipeline will be released + # when the StopChannel request is received by the server. + # + # @overload stop_channel(request, options = nil) + # Pass arguments to `stop_channel` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::StopChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::StopChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload stop_channel(name: nil, request_id: nil) + # Pass arguments to `stop_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 resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @param request_id [::String] + # A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::StopChannelRequest.new + # + # # Call the stop_channel method. + # result = client.stop_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 stop_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::StopChannelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.stop_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::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.stop_channel.timeout, + metadata: metadata, + retry_policy: @config.rpcs.stop_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :stop_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 + + ## + # Starts distribution which delivers outputs to the destination indicated by + # the Distribution configuration. + # + # @overload start_distribution(request, options = nil) + # Pass arguments to `start_distribution` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload start_distribution(name: nil, distribution_keys: nil, request_id: nil) + # Pass arguments to `start_distribution` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @param distribution_keys [::Array<::String>] + # Optional. A list of keys to identify the distribution configuration in the + # channel resource. If left empty, all the distributions in the channel + # specification will be started. + # @param request_id [::String] + # Optional. A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::StartDistributionRequest.new + # + # # Call the start_distribution method. + # result = client.start_distribution request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def start_distribution request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.start_distribution.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.start_distribution.timeout, + metadata: metadata, + retry_policy: @config.rpcs.start_distribution.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :start_distribution, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Stops the specified distribution. + # + # @overload stop_distribution(request, options = nil) + # Pass arguments to `stop_distribution` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload stop_distribution(name: nil, distribution_keys: nil, request_id: nil) + # Pass arguments to `stop_distribution` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @param distribution_keys [::Array<::String>] + # Optional. A list of key to identify the distribution configuration in the + # channel resource. If left empty, all the distributions in the channel + # specification will be stopped. + # @param request_id [::String] + # Optional. A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::StopDistributionRequest.new + # + # # Call the stop_distribution method. + # result = client.stop_distribution request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def stop_distribution request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.stop_distribution.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.stop_distribution.timeout, + metadata: metadata, + retry_policy: @config.rpcs.stop_distribution.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :stop_distribution, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 an input with the provided unique ID in the specified region. + # + # @overload create_input(request, options = nil) + # Pass arguments to `create_input` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::CreateInputRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::CreateInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_input(parent: nil, input: nil, input_id: nil, request_id: nil) + # Pass arguments to `create_input` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 location for the resource, in the form of: + # `projects/{project}/locations/{location}`. + # @param input [::Google::Cloud::Video::LiveStream::V1::Input, ::Hash] + # Required. The input resource to be created. + # @param input_id [::String] + # Required. The ID of the input resource to be created. + # + # This value must be 1-63 characters, begin and end with a lower-case letter + # or a number, and consist of only lower-case letters, numbers, and hyphens. + # In other words, it must match the following regex: + # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @param request_id [::String] + # A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::CreateInputRequest.new + # + # # Call the create_input method. + # result = client.create_input request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateInputRequest + + # Converts hash and nil to 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_input.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_input.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :create_input, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 list of all inputs in the specified region. + # + # @overload list_inputs(request, options = nil) + # Pass arguments to `list_inputs` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::ListInputsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::ListInputsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_inputs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_inputs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 location for the resource, in the form of: + # `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # The maximum number of items to return. If unspecified, server + # will pick an appropriate default. Server may return fewer items than + # requested. A caller should only rely on response's + # {::Google::Cloud::Video::LiveStream::V1::ListInputsResponse#next_page_token next_page_token} + # to determine if there are more items left to be queried. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # @param filter [::String] + # The filter to apply to list results. + # @param order_by [::String] + # Specifies the ordering of results following syntax at [Sorting + # Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Input>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Input>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::ListInputsRequest.new + # + # # Call the list_inputs method. + # result = client.list_inputs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Input. + # p item + # end + # + def list_inputs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListInputsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_inputs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_inputs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_inputs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :list_inputs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @livestream_service_stub, :list_inputs, 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 the specified input. + # + # @overload get_input(request, options = nil) + # Pass arguments to `get_input` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::GetInputRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::GetInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_input(name: nil) + # Pass arguments to `get_input` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 input resource, in the form of: + # `projects/{project}/locations/{location}/inputs/{inputId}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Video::LiveStream::V1::Input] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::Input] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::GetInputRequest.new + # + # # Call the get_input method. + # result = client.get_input request + # + # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Input. + # p result + # + def get_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetInputRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_input.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_input.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :get_input, request, 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 the specified input. + # + # @overload delete_input(request, options = nil) + # Pass arguments to `delete_input` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_input(name: nil, request_id: nil) + # Pass arguments to `delete_input` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 input resource, in the form of: + # `projects/{project}/locations/{location}/inputs/{inputId}`. + # @param request_id [::String] + # A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::DeleteInputRequest.new + # + # # Call the delete_input method. + # result = client.delete_input request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest + + # Converts hash and nil to 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_input.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_input.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :delete_input, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 specified input. + # + # @overload update_input(request, options = nil) + # Pass arguments to `update_input` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_input(update_mask: nil, input: nil, request_id: nil) + # Pass arguments to `update_input` via keyword arguments. Note that at + # least one keyword argument is 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] + # Field mask is used to specify the fields to be overwritten in the Input + # resource by the update. You can only update the following fields: + # + # * [`tier`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#Tier) + # * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) + # * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) + # + # 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 mask is not present, then each field from the list above is updated + # if the field appears in the request payload. To unset a field, add the + # field to the update mask and remove it from the request payload. + # @param input [::Google::Cloud::Video::LiveStream::V1::Input, ::Hash] + # Required. The input resource to be updated. + # @param request_id [::String] + # A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::UpdateInputRequest.new + # + # # Call the update_input method. + # result = client.update_input request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest + + # Converts hash and nil to 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_input.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.input&.name + header_params["input.name"] = request.input.name + end + + request_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_input.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :update_input, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Preview the streaming content of the specified input. + # + # @overload preview_input(request, options = nil) + # Pass arguments to `preview_input` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload preview_input(name: nil) + # Pass arguments to `preview_input` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 input resource, in the form of: + # `projects/{project}/locations/{location}/inputs/{inputId}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Video::LiveStream::V1::PreviewInputResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::PreviewInputResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::PreviewInputRequest.new + # + # # Call the preview_input method. + # result = client.preview_input request + # + # # The returned object is of type Google::Cloud::Video::LiveStream::V1::PreviewInputResponse. + # p result + # + def preview_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.preview_input.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.preview_input.timeout, + metadata: metadata, + retry_policy: @config.rpcs.preview_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :preview_input, request, 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 event with the provided unique ID in the specified channel. + # + # @overload create_event(request, options = nil) + # Pass arguments to `create_event` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::CreateEventRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::CreateEventRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_event(parent: nil, event: nil, event_id: nil, request_id: nil) + # Pass arguments to `create_event` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 channel for the resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @param event [::Google::Cloud::Video::LiveStream::V1::Event, ::Hash] + # Required. The event resource to be created. + # @param event_id [::String] + # Required. The ID of the event resource to be created. + # + # This value must be 1-63 characters, begin and end with a lower-case letter + # or a number, and consist of only lower-case letters, numbers, and hyphens. + # In other words, it must match the following regex: + # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @param request_id [::String] + # A 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 [::Google::Cloud::Video::LiveStream::V1::Event] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::Event] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::CreateEventRequest.new + # + # # Call the create_event method. + # result = client.create_event request + # + # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Event. + # p result + # + def create_event request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateEventRequest + + # Converts hash and nil to 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_event.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_event.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_event.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :create_event, request, 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 all events in the specified channel. + # + # @overload list_events(request, options = nil) + # Pass arguments to `list_events` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::ListEventsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::ListEventsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_events(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_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 parent [::String] + # Required. The parent channel for the resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @param page_size [::Integer] + # The maximum number of items to return. If unspecified, server + # will pick an appropriate default. Server may return fewer items than + # requested. A caller should only rely on response's + # {::Google::Cloud::Video::LiveStream::V1::ListEventsResponse#next_page_token next_page_token} + # to determine if there are more items left to be queried. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # @param filter [::String] + # The filter to apply to list results. + # @param order_by [::String] + # Specifies the ordering of results following syntax at + # https://cloud.google.com/apis/design/design_patterns#sorting_order. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Event>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Event>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::ListEventsRequest.new + # + # # Call the list_events method. + # result = client.list_events request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Event. + # p item + # end + # + def list_events request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListEventsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_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::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_events.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_events.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :list_events, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @livestream_service_stub, :list_events, 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 the specified event. + # + # @overload get_event(request, options = nil) + # Pass arguments to `get_event` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::GetEventRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::GetEventRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_event(name: nil) + # Pass arguments to `get_event` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 event resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Video::LiveStream::V1::Event] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::Event] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::GetEventRequest.new + # + # # Call the get_event method. + # result = client.get_event request + # + # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Event. + # p result + # + def get_event request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetEventRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_event.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_event.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_event.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :get_event, request, 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 the specified event. + # + # @overload delete_event(request, options = nil) + # Pass arguments to `delete_event` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_event(name: nil, request_id: nil) + # Pass arguments to `delete_event` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 event resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + # @param request_id [::String] + # A 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 [::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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::DeleteEventRequest.new + # + # # Call the delete_event method. + # result = client.delete_event request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_event request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest + + # Converts hash and nil to 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_event.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_event.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_event.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :delete_event, request, 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 all clips in the specified channel. + # + # @overload list_clips(request, options = nil) + # Pass arguments to `list_clips` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::ListClipsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::ListClipsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_clips(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_clips` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListClipsRequest + # @param page_size [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. + # @param filter [::String] + # Filtering results + # @param order_by [::String] + # Hint for how to order the results + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Clip>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Clip>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::ListClipsRequest.new + # + # # Call the list_clips method. + # result = client.list_clips request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Clip. + # p item + # end + # + def list_clips request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListClipsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_clips.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_clips.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_clips.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :list_clips, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @livestream_service_stub, :list_clips, 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 the specified clip. + # + # @overload get_clip(request, options = nil) + # Pass arguments to `get_clip` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::GetClipRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::GetClipRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_clip(name: nil) + # Pass arguments to `get_clip` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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, in the following form: + # `projects/{project}/locations/{location}/channels/{channel}/clips/{clip}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Video::LiveStream::V1::Clip] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::Clip] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::GetClipRequest.new + # + # # Call the get_clip method. + # result = client.get_clip request + # + # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Clip. + # p result + # + def get_clip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetClipRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_clip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_clip.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_clip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :get_clip, request, 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 clip with the provided clip ID in the specified channel. + # + # @overload create_clip(request, options = nil) + # Pass arguments to `create_clip` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::CreateClipRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::CreateClipRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_clip(parent: nil, clip_id: nil, clip: nil, request_id: nil) + # Pass arguments to `create_clip` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 following form: + # `projects/{project}/locations/{location}/channels/{channel}`. + # @param clip_id [::String] + # Required. The ID of the clip resource to be created. + # + # This value must be 1-63 characters, begin and end with a lower-case letter + # or a number, and consist of only lower-case letters, numbers, and hyphens. + # In other words, it must match the following regex: + # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @param clip [::Google::Cloud::Video::LiveStream::V1::Clip, ::Hash] + # Required. The resource being 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::CreateClipRequest.new + # + # # Call the create_clip method. + # result = client.create_clip request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_clip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateClipRequest + + # Converts hash and nil to 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_clip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_clip.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_clip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :create_clip, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 the specified clip job resource. This method only deletes the clip + # job and does not delete the VOD clip stored in Cloud Storage. + # + # @overload delete_clip(request, options = nil) + # Pass arguments to `delete_clip` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_clip(name: nil, request_id: nil) + # Pass arguments to `delete_clip` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 clip resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`. + # @param request_id [::String] + # Optional. A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::DeleteClipRequest.new + # + # # Call the delete_clip method. + # result = client.delete_clip request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_clip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest + + # Converts hash and nil to 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_clip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_clip.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_clip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :delete_clip, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 DVR session with the provided unique ID in the specified channel. + # + # @overload create_dvr_session(request, options = nil) + # Pass arguments to `create_dvr_session` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_dvr_session(parent: nil, dvr_session_id: nil, dvr_session: nil, request_id: nil) + # Pass arguments to `create_dvr_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 following form: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @param dvr_session_id [::String] + # Required. The ID of the DVR session resource to be created. + # + # This value must be 1-63 characters, begin and end with a lower-case letter + # or a number, and consist of only lower-case letters, numbers, and hyphens. + # In other words, it must match the following regex: + # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @param dvr_session [::Google::Cloud::Video::LiveStream::V1::DvrSession, ::Hash] + # Required. The resource being 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest.new + # + # # Call the create_dvr_session method. + # result = client.create_dvr_session request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_dvr_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest + + # Converts hash and nil to 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_dvr_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_dvr_session.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_dvr_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :create_dvr_session, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 list of all DVR sessions in the specified channel. + # + # @overload list_dvr_sessions(request, options = nil) + # Pass arguments to `list_dvr_sessions` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_dvr_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_dvr_sessions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListDvrSessionsRequest + # @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 results + # @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::Video::LiveStream::V1::DvrSession>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::DvrSession>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest.new + # + # # Call the list_dvr_sessions method. + # result = client.list_dvr_sessions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::DvrSession. + # p item + # end + # + def list_dvr_sessions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_dvr_sessions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_dvr_sessions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_dvr_sessions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :list_dvr_sessions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @livestream_service_stub, :list_dvr_sessions, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the specified DVR session. + # + # @overload get_dvr_session(request, options = nil) + # Pass arguments to `get_dvr_session` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_dvr_session(name: nil) + # Pass arguments to `get_dvr_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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, in the following form: + # `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Video::LiveStream::V1::DvrSession] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::DvrSession] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest.new + # + # # Call the get_dvr_session method. + # result = client.get_dvr_session request + # + # # The returned object is of type Google::Cloud::Video::LiveStream::V1::DvrSession. + # p result + # + def get_dvr_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_dvr_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_dvr_session.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_dvr_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :get_dvr_session, request, 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 the specified DVR session. + # + # @overload delete_dvr_session(request, options = nil) + # Pass arguments to `delete_dvr_session` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_dvr_session(name: nil, request_id: nil) + # Pass arguments to `delete_dvr_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 event resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`. + # @param request_id [::String] + # Optional. A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest.new + # + # # Call the delete_dvr_session method. + # result = client.delete_dvr_session request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_dvr_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest + + # Converts hash and nil to 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_dvr_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_dvr_session.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_dvr_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :delete_dvr_session, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 specified DVR session. + # + # @overload update_dvr_session(request, options = nil) + # Pass arguments to `update_dvr_session` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_dvr_session(update_mask: nil, dvr_session: nil, request_id: nil) + # Pass arguments to `update_dvr_session` via keyword arguments. Note that at + # least one keyword argument is 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. Field mask is used to specify the fields to be overwritten in the + # DvrSession resource by the update. You can only update the following + # fields: + # + # * `dvrWindows` + # + # 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. + # @param dvr_session [::Google::Cloud::Video::LiveStream::V1::DvrSession, ::Hash] + # Required. The DVR session resource to be updated. + # @param request_id [::String] + # Optional. A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest.new + # + # # Call the update_dvr_session method. + # result = client.update_dvr_session request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_dvr_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest + + # Converts hash and nil to 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_dvr_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.dvr_session&.name + header_params["dvr_session.name"] = request.dvr_session.name + end + + request_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_dvr_session.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_dvr_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :update_dvr_session, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 Asset with the provided unique ID in the specified + # region. + # + # @overload create_asset(request, options = nil) + # Pass arguments to `create_asset` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_asset(parent: nil, asset: nil, asset_id: nil, request_id: nil) + # Pass arguments to `create_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent location for the resource, in the form of: + # `projects/{project}/locations/{location}`. + # @param asset [::Google::Cloud::Video::LiveStream::V1::Asset, ::Hash] + # Required. The asset resource to be created. + # @param asset_id [::String] + # Required. The ID of the asset resource to be created. + # + # This value must be 1-63 characters, begin and end with a lower-case letter + # or a number, and consist of only lower-case letters, numbers, and hyphens. + # In other words, it must match the following regex: + # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @param request_id [::String] + # A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::CreateAssetRequest.new + # + # # Call the create_asset method. + # result = client.create_asset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_asset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_asset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :create_asset, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified asset if it is not used. + # + # @overload delete_asset(request, options = nil) + # Pass arguments to `delete_asset` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_asset(name: nil, request_id: nil) + # Pass arguments to `delete_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the asset resource, in the form of: + # `projects/{project}/locations/{location}/assets/{assetId}`. + # @param request_id [::String] + # A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest.new + # + # # Call the delete_asset method. + # result = client.delete_asset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_asset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_asset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :delete_asset, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the specified asset. + # + # @overload get_asset(request, options = nil) + # Pass arguments to `get_asset` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::GetAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::GetAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_asset(name: nil) + # Pass arguments to `get_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource, in the following form: + # `projects/{project}/locations/{location}/assets/{asset}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Video::LiveStream::V1::Asset] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::Asset] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::GetAssetRequest.new + # + # # Call the get_asset method. + # result = client.get_asset request + # + # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Asset. + # p result + # + def get_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_asset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_asset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :get_asset, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of all assets in the specified region. + # + # @overload list_assets(request, options = nil) + # Pass arguments to `list_assets` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent location for the resource, in the form of: + # `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. + # @param filter [::String] + # Filtering results + # @param order_by [::String] + # Hint for how to order the results + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Asset>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Asset>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::ListAssetsRequest.new + # + # # Call the list_assets method. + # result = client.list_assets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Asset. + # p item + # end + # + def list_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_assets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :list_assets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @livestream_service_stub, :list_assets, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the specified pool. + # + # @overload get_pool(request, options = nil) + # Pass arguments to `get_pool` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::GetPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::GetPoolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_pool(name: nil) + # Pass arguments to `get_pool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 pool resource, in the form of: + # `projects/{project}/locations/{location}/pools/{poolId}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Video::LiveStream::V1::Pool] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::Pool] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::GetPoolRequest.new + # + # # Call the get_pool method. + # result = client.get_pool request + # + # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Pool. + # p result + # + def get_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetPoolRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_pool.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_pool.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :get_pool, request, 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 the specified pool. + # + # @overload update_pool(request, options = nil) + # Pass arguments to `update_pool` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_pool(update_mask: nil, pool: nil, request_id: nil) + # Pass arguments to `update_pool` via keyword arguments. Note that at + # least one keyword argument is 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] + # Field mask is used to specify the fields to be overwritten in the Pool + # resource by the update. You can only update the following fields: + # + # * `networkConfig` + # + # 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. + # @param pool [::Google::Cloud::Video::LiveStream::V1::Pool, ::Hash] + # Required. The pool resource to be updated. + # @param request_id [::String] + # A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest.new + # + # # Call the update_pool method. + # result = client.update_pool request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest + + # Converts hash and nil to 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_pool.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.pool&.name + header_params["pool.name"] = request.pool.name + end + + request_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_pool.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.call_rpc :update_pool, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 LivestreamService API. + # + # This class represents the configuration for LivestreamService, + # 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::Video::LiveStream::V1::LivestreamService::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_channel to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_channel.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_channel.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::Video::LiveStream::V1::LivestreamService::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 = "livestream.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 LivestreamService 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_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :create_channel + ## + # RPC-specific configuration for `list_channels` + # @return [::Gapic::Config::Method] + # + attr_reader :list_channels + ## + # RPC-specific configuration for `get_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :get_channel + ## + # RPC-specific configuration for `delete_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_channel + ## + # RPC-specific configuration for `update_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :update_channel + ## + # RPC-specific configuration for `start_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :start_channel + ## + # RPC-specific configuration for `stop_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :stop_channel + ## + # RPC-specific configuration for `start_distribution` + # @return [::Gapic::Config::Method] + # + attr_reader :start_distribution + ## + # RPC-specific configuration for `stop_distribution` + # @return [::Gapic::Config::Method] + # + attr_reader :stop_distribution + ## + # RPC-specific configuration for `create_input` + # @return [::Gapic::Config::Method] + # + attr_reader :create_input + ## + # RPC-specific configuration for `list_inputs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_inputs + ## + # RPC-specific configuration for `get_input` + # @return [::Gapic::Config::Method] + # + attr_reader :get_input + ## + # RPC-specific configuration for `delete_input` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_input + ## + # RPC-specific configuration for `update_input` + # @return [::Gapic::Config::Method] + # + attr_reader :update_input + ## + # RPC-specific configuration for `preview_input` + # @return [::Gapic::Config::Method] + # + attr_reader :preview_input + ## + # RPC-specific configuration for `create_event` + # @return [::Gapic::Config::Method] + # + attr_reader :create_event + ## + # RPC-specific configuration for `list_events` + # @return [::Gapic::Config::Method] + # + attr_reader :list_events + ## + # RPC-specific configuration for `get_event` + # @return [::Gapic::Config::Method] + # + attr_reader :get_event + ## + # RPC-specific configuration for `delete_event` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_event + ## + # RPC-specific configuration for `list_clips` + # @return [::Gapic::Config::Method] + # + attr_reader :list_clips + ## + # RPC-specific configuration for `get_clip` + # @return [::Gapic::Config::Method] + # + attr_reader :get_clip + ## + # RPC-specific configuration for `create_clip` + # @return [::Gapic::Config::Method] + # + attr_reader :create_clip + ## + # RPC-specific configuration for `delete_clip` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_clip + ## + # RPC-specific configuration for `create_dvr_session` + # @return [::Gapic::Config::Method] + # + attr_reader :create_dvr_session + ## + # RPC-specific configuration for `list_dvr_sessions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_dvr_sessions + ## + # RPC-specific configuration for `get_dvr_session` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dvr_session + ## + # RPC-specific configuration for `delete_dvr_session` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_dvr_session + ## + # RPC-specific configuration for `update_dvr_session` + # @return [::Gapic::Config::Method] + # + attr_reader :update_dvr_session + ## + # RPC-specific configuration for `create_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_asset + ## + # RPC-specific configuration for `delete_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_asset + ## + # RPC-specific configuration for `get_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_asset + ## + # RPC-specific configuration for `list_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_assets + ## + # RPC-specific configuration for `get_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :get_pool + ## + # RPC-specific configuration for `update_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :update_pool + + # @private + def initialize parent_rpcs = nil + create_channel_config = parent_rpcs.create_channel if parent_rpcs.respond_to? :create_channel + @create_channel = ::Gapic::Config::Method.new create_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 + get_channel_config = parent_rpcs.get_channel if parent_rpcs.respond_to? :get_channel + @get_channel = ::Gapic::Config::Method.new get_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 + update_channel_config = parent_rpcs.update_channel if parent_rpcs.respond_to? :update_channel + @update_channel = ::Gapic::Config::Method.new update_channel_config + start_channel_config = parent_rpcs.start_channel if parent_rpcs.respond_to? :start_channel + @start_channel = ::Gapic::Config::Method.new start_channel_config + stop_channel_config = parent_rpcs.stop_channel if parent_rpcs.respond_to? :stop_channel + @stop_channel = ::Gapic::Config::Method.new stop_channel_config + start_distribution_config = parent_rpcs.start_distribution if parent_rpcs.respond_to? :start_distribution + @start_distribution = ::Gapic::Config::Method.new start_distribution_config + stop_distribution_config = parent_rpcs.stop_distribution if parent_rpcs.respond_to? :stop_distribution + @stop_distribution = ::Gapic::Config::Method.new stop_distribution_config + create_input_config = parent_rpcs.create_input if parent_rpcs.respond_to? :create_input + @create_input = ::Gapic::Config::Method.new create_input_config + list_inputs_config = parent_rpcs.list_inputs if parent_rpcs.respond_to? :list_inputs + @list_inputs = ::Gapic::Config::Method.new list_inputs_config + get_input_config = parent_rpcs.get_input if parent_rpcs.respond_to? :get_input + @get_input = ::Gapic::Config::Method.new get_input_config + delete_input_config = parent_rpcs.delete_input if parent_rpcs.respond_to? :delete_input + @delete_input = ::Gapic::Config::Method.new delete_input_config + update_input_config = parent_rpcs.update_input if parent_rpcs.respond_to? :update_input + @update_input = ::Gapic::Config::Method.new update_input_config + preview_input_config = parent_rpcs.preview_input if parent_rpcs.respond_to? :preview_input + @preview_input = ::Gapic::Config::Method.new preview_input_config + create_event_config = parent_rpcs.create_event if parent_rpcs.respond_to? :create_event + @create_event = ::Gapic::Config::Method.new create_event_config + list_events_config = parent_rpcs.list_events if parent_rpcs.respond_to? :list_events + @list_events = ::Gapic::Config::Method.new list_events_config + get_event_config = parent_rpcs.get_event if parent_rpcs.respond_to? :get_event + @get_event = ::Gapic::Config::Method.new get_event_config + delete_event_config = parent_rpcs.delete_event if parent_rpcs.respond_to? :delete_event + @delete_event = ::Gapic::Config::Method.new delete_event_config + list_clips_config = parent_rpcs.list_clips if parent_rpcs.respond_to? :list_clips + @list_clips = ::Gapic::Config::Method.new list_clips_config + get_clip_config = parent_rpcs.get_clip if parent_rpcs.respond_to? :get_clip + @get_clip = ::Gapic::Config::Method.new get_clip_config + create_clip_config = parent_rpcs.create_clip if parent_rpcs.respond_to? :create_clip + @create_clip = ::Gapic::Config::Method.new create_clip_config + delete_clip_config = parent_rpcs.delete_clip if parent_rpcs.respond_to? :delete_clip + @delete_clip = ::Gapic::Config::Method.new delete_clip_config + create_dvr_session_config = parent_rpcs.create_dvr_session if parent_rpcs.respond_to? :create_dvr_session + @create_dvr_session = ::Gapic::Config::Method.new create_dvr_session_config + list_dvr_sessions_config = parent_rpcs.list_dvr_sessions if parent_rpcs.respond_to? :list_dvr_sessions + @list_dvr_sessions = ::Gapic::Config::Method.new list_dvr_sessions_config + get_dvr_session_config = parent_rpcs.get_dvr_session if parent_rpcs.respond_to? :get_dvr_session + @get_dvr_session = ::Gapic::Config::Method.new get_dvr_session_config + delete_dvr_session_config = parent_rpcs.delete_dvr_session if parent_rpcs.respond_to? :delete_dvr_session + @delete_dvr_session = ::Gapic::Config::Method.new delete_dvr_session_config + update_dvr_session_config = parent_rpcs.update_dvr_session if parent_rpcs.respond_to? :update_dvr_session + @update_dvr_session = ::Gapic::Config::Method.new update_dvr_session_config + create_asset_config = parent_rpcs.create_asset if parent_rpcs.respond_to? :create_asset + @create_asset = ::Gapic::Config::Method.new create_asset_config + delete_asset_config = parent_rpcs.delete_asset if parent_rpcs.respond_to? :delete_asset + @delete_asset = ::Gapic::Config::Method.new delete_asset_config + get_asset_config = parent_rpcs.get_asset if parent_rpcs.respond_to? :get_asset + @get_asset = ::Gapic::Config::Method.new get_asset_config + list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets + @list_assets = ::Gapic::Config::Method.new list_assets_config + get_pool_config = parent_rpcs.get_pool if parent_rpcs.respond_to? :get_pool + @get_pool = ::Gapic::Config::Method.new get_pool_config + update_pool_config = parent_rpcs.update_pool if parent_rpcs.respond_to? :update_pool + @update_pool = ::Gapic::Config::Method.new update_pool_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/credentials.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/credentials.rb new file mode 100644 index 000000000000..ebdda67ff801 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Video + module LiveStream + module V1 + module LivestreamService + # Credentials for the LivestreamService 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 +end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/operations.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/operations.rb new file mode 100644 index 000000000000..dc29b6a405f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/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 Video + module LiveStream + module V1 + module LivestreamService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "livestream.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the LivestreamService 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 LivestreamService 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::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Video::LiveStream::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Video::LiveStream::V1::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 = "livestream.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-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/paths.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/paths.rb new file mode 100644 index 000000000000..f3bbcf7af848 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/paths.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 Video + module LiveStream + module V1 + module LivestreamService + # Path helper methods for the LivestreamService API. + module Paths + ## + # Create a fully-qualified Asset resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/assets/{asset}` + # + # @param project [String] + # @param location [String] + # @param asset [String] + # + # @return [::String] + def asset_path project:, location:, asset: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/assets/#{asset}" + 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 Clip resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/channels/{channel}/clips/{clip}` + # + # @param project [String] + # @param location [String] + # @param channel [String] + # @param clip [String] + # + # @return [::String] + def clip_path project:, location:, channel:, clip: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "channel cannot contain /" if channel.to_s.include? "/" + + "projects/#{project}/locations/#{location}/channels/#{channel}/clips/#{clip}" + end + + ## + # Create a fully-qualified DvrSession resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/channels/{channel}/dvrSessions/{dvr_session}` + # + # @param project [String] + # @param location [String] + # @param channel [String] + # @param dvr_session [String] + # + # @return [::String] + def dvr_session_path project:, location:, channel:, dvr_session: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "channel cannot contain /" if channel.to_s.include? "/" + + "projects/#{project}/locations/#{location}/channels/#{channel}/dvrSessions/#{dvr_session}" + end + + ## + # Create a fully-qualified Event resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/channels/{channel}/events/{event}` + # + # @param project [String] + # @param location [String] + # @param channel [String] + # @param event [String] + # + # @return [::String] + def event_path project:, location:, channel:, event: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "channel cannot contain /" if channel.to_s.include? "/" + + "projects/#{project}/locations/#{location}/channels/#{channel}/events/#{event}" + end + + ## + # Create a fully-qualified Input resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/inputs/{input}` + # + # @param project [String] + # @param location [String] + # @param input [String] + # + # @return [::String] + def input_path project:, location:, input: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/inputs/#{input}" + 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 Network resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/global/networks/{network}` + # + # @param project [String] + # @param network [String] + # + # @return [::String] + def network_path project:, network: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/global/networks/#{network}" + end + + ## + # Create a fully-qualified Pool resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/pools/{pool}` + # + # @param project [String] + # @param location [String] + # @param pool [String] + # + # @return [::String] + def pool_path project:, location:, 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}/pools/#{pool}" + end + + ## + # Create a fully-qualified SecretVersion resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/secrets/{secret}/versions/{version}` + # + # @param project [String] + # @param secret [String] + # @param version [String] + # + # @return [::String] + def secret_version_path project:, secret:, version: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" + + "projects/#{project}/secrets/#{secret}/versions/#{version}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest.rb new file mode 100644 index 000000000000..54fae79a7d2a --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/video/live_stream/v1/version" +require "google/cloud/video/live_stream/v1/bindings_override" + +require "google/cloud/video/live_stream/v1/livestream_service/credentials" +require "google/cloud/video/live_stream/v1/livestream_service/paths" +require "google/cloud/video/live_stream/v1/livestream_service/rest/operations" +require "google/cloud/video/live_stream/v1/livestream_service/rest/client" + +module Google + module Cloud + module Video + module LiveStream + module V1 + ## + # Using Live Stream API, you can generate live streams in the various + # renditions and streaming formats. The streaming format include HTTP Live + # Streaming (HLS) and Dynamic Adaptive Streaming over HTTP (DASH). You can send + # a source stream in the various ways, including Real-Time Messaging + # Protocol (RTMP) and Secure Reliable Transport (SRT). + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/video/live_stream/v1/livestream_service/rest" + # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + module LivestreamService + # 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/video/live_stream/v1/livestream_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest/client.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest/client.rb new file mode 100644 index 000000000000..6704ac62a245 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest/client.rb @@ -0,0 +1,4077 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/video/livestream/v1/service_pb" +require "google/cloud/video/live_stream/v1/livestream_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module Video + module LiveStream + module V1 + module LivestreamService + module Rest + ## + # REST client for the LivestreamService service. + # + # Using Live Stream API, you can generate live streams in the various + # renditions and streaming formats. The streaming format include HTTP Live + # Streaming (HLS) and Dynamic Adaptive Streaming over HTTP (DASH). You can send + # a source stream in the various ways, including Real-Time Messaging + # Protocol (RTMP) and Secure Reliable Transport (SRT). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "livestream.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :livestream_service_stub + + ## + # Configure the LivestreamService Client class. + # + # See {::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LivestreamService clients + # ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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", "Video", "LiveStream", "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_channel.timeout = 60.0 + + default_config.rpcs.list_channels.timeout = 60.0 + default_config.rpcs.list_channels.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_channel.timeout = 60.0 + default_config.rpcs.get_channel.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_channel.timeout = 60.0 + + default_config.rpcs.update_channel.timeout = 60.0 + + default_config.rpcs.start_channel.timeout = 60.0 + + default_config.rpcs.stop_channel.timeout = 60.0 + + default_config.rpcs.start_distribution.timeout = 60.0 + + default_config.rpcs.stop_distribution.timeout = 60.0 + + default_config.rpcs.create_input.timeout = 60.0 + + default_config.rpcs.list_inputs.timeout = 60.0 + default_config.rpcs.list_inputs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_input.timeout = 60.0 + default_config.rpcs.get_input.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_input.timeout = 60.0 + + default_config.rpcs.update_input.timeout = 60.0 + + default_config.rpcs.preview_input.timeout = 60.0 + + default_config.rpcs.create_event.timeout = 60.0 + + default_config.rpcs.list_events.timeout = 60.0 + default_config.rpcs.list_events.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_event.timeout = 60.0 + default_config.rpcs.get_event.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_event.timeout = 60.0 + + default_config.rpcs.list_clips.timeout = 60.0 + default_config.rpcs.list_clips.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_clip.timeout = 60.0 + default_config.rpcs.get_clip.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_clip.timeout = 60.0 + + default_config.rpcs.delete_clip.timeout = 60.0 + + default_config.rpcs.create_dvr_session.timeout = 60.0 + + default_config.rpcs.list_dvr_sessions.timeout = 60.0 + default_config.rpcs.list_dvr_sessions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_dvr_session.timeout = 60.0 + default_config.rpcs.get_dvr_session.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_dvr_session.timeout = 60.0 + + default_config.rpcs.update_dvr_session.timeout = 60.0 + + default_config.rpcs.create_asset.timeout = 60.0 + + default_config.rpcs.delete_asset.timeout = 60.0 + + default_config.rpcs.get_asset.timeout = 60.0 + default_config.rpcs.get_asset.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_assets.timeout = 60.0 + default_config.rpcs.list_assets.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_pool.timeout = 60.0 + default_config.rpcs.get_pool.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_pool.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LivestreamService 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::Video::LiveStream::V1::LivestreamService::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 + @livestream_service_stub.universe_domain + end + + ## + # Create a new LivestreamService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LivestreamService 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::Video::LiveStream::V1::LivestreamService::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 + + @livestream_service_stub = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @livestream_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 = @livestream_service_stub.endpoint + config.universe_domain = @livestream_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @livestream_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Video::LiveStream::V1::LivestreamService::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 + @livestream_service_stub.logger + end + + # Service calls + + ## + # Creates a channel with the provided unique ID in the specified + # region. + # + # @overload create_channel(request, options = nil) + # Pass arguments to `create_channel` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::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, request_id: 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 location for the resource, in the form of: + # `projects/{project}/locations/{location}`. + # @param channel [::Google::Cloud::Video::LiveStream::V1::Channel, ::Hash] + # Required. The channel resource to be created. + # @param channel_id [::String] + # Required. The ID of the channel resource to be created. + # + # This value must be 1-63 characters, begin and end with a lower-case letter + # or a number, and consist of only lower-case letters, numbers, and hyphens. + # In other words, it must match the following regex: + # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @param request_id [::String] + # A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @livestream_service_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 + + ## + # Returns a list of all channels in the specified region. + # + # @overload list_channels(request, options = nil) + # Pass arguments to `list_channels` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::ListChannelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::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, filter: 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 location for the resource, in the form of: + # `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # The maximum number of items to return. If unspecified, server + # will pick an appropriate default. Server may return fewer items than + # requested. A caller should only rely on response's + # {::Google::Cloud::Video::LiveStream::V1::ListChannelsResponse#next_page_token next_page_token} + # to determine if there are more items left to be queried. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # @param filter [::String] + # The filter to apply to list results. + # @param order_by [::String] + # Specifies the ordering of results following syntax at + # https://cloud.google.com/apis/design/design_patterns#sorting_order. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Channel>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Channel>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @livestream_service_stub.list_channels request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @livestream_service_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 + + ## + # Returns the specified channel. + # + # @overload get_channel(request, options = nil) + # Pass arguments to `get_channel` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::GetChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::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 resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Channel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::Channel] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::GetChannelRequest.new + # + # # Call the get_channel method. + # result = client.get_channel request + # + # # The returned object is of type Google::Cloud::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @livestream_service_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 + + ## + # Deletes the specified channel. + # + # @overload delete_channel(request, options = nil) + # Pass arguments to `delete_channel` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::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, request_id: nil, force: 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 resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @param request_id [::String] + # A 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)`. + # @param force [::Boolean] + # If the `force` field is set to the default value of `false`, you must + # delete all of a channel's events before you can delete the channel itself. + # If the field is set to `true`, requests to delete a channel also delete + # associated channel events. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @livestream_service_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 + + ## + # Updates the specified channel. + # + # @overload update_channel(request, options = nil) + # Pass arguments to `update_channel` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::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(update_mask: nil, channel: nil, request_id: 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Field mask is used to specify the fields to be overwritten in the Channel + # resource by the update. You can only update the following fields: + # + # * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) + # * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) + # * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) + # * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) + # * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) + # * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) + # * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) + # * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) + # * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) + # * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) + # + # 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 mask is not present, then each field from the list above is updated + # if the field appears in the request payload. To unset a field, add the + # field to the update mask and remove it from the request payload. + # @param channel [::Google::Cloud::Video::LiveStream::V1::Channel, ::Hash] + # Required. The channel resource to be updated. + # @param request_id [::String] + # A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @livestream_service_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 + + ## + # Starts the specified channel. Part of the video pipeline will be created + # only when the StartChannel request is received by the server. + # + # @overload start_channel(request, options = nil) + # Pass arguments to `start_channel` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::StartChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::StartChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload start_channel(name: nil, request_id: nil) + # Pass arguments to `start_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 resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @param request_id [::String] + # A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::StartChannelRequest.new + # + # # Call the start_channel method. + # result = client.start_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 start_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::StartChannelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.start_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::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.start_channel.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.start_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.start_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 + + ## + # Stops the specified channel. Part of the video pipeline will be released + # when the StopChannel request is received by the server. + # + # @overload stop_channel(request, options = nil) + # Pass arguments to `stop_channel` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::StopChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::StopChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload stop_channel(name: nil, request_id: nil) + # Pass arguments to `stop_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 resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @param request_id [::String] + # A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::StopChannelRequest.new + # + # # Call the stop_channel method. + # result = client.stop_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 stop_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::StopChannelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.stop_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::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.stop_channel.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.stop_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.stop_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 + + ## + # Starts distribution which delivers outputs to the destination indicated by + # the Distribution configuration. + # + # @overload start_distribution(request, options = nil) + # Pass arguments to `start_distribution` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload start_distribution(name: nil, distribution_keys: nil, request_id: nil) + # Pass arguments to `start_distribution` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @param distribution_keys [::Array<::String>] + # Optional. A list of keys to identify the distribution configuration in the + # channel resource. If left empty, all the distributions in the channel + # specification will be started. + # @param request_id [::String] + # Optional. A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::StartDistributionRequest.new + # + # # Call the start_distribution method. + # result = client.start_distribution request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def start_distribution request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.start_distribution.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.start_distribution.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.start_distribution.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.start_distribution request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Stops the specified distribution. + # + # @overload stop_distribution(request, options = nil) + # Pass arguments to `stop_distribution` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload stop_distribution(name: nil, distribution_keys: nil, request_id: nil) + # Pass arguments to `stop_distribution` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @param distribution_keys [::Array<::String>] + # Optional. A list of key to identify the distribution configuration in the + # channel resource. If left empty, all the distributions in the channel + # specification will be stopped. + # @param request_id [::String] + # Optional. A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::StopDistributionRequest.new + # + # # Call the stop_distribution method. + # result = client.stop_distribution request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def stop_distribution request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.stop_distribution.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.stop_distribution.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.stop_distribution.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.stop_distribution request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an input with the provided unique ID in the specified region. + # + # @overload create_input(request, options = nil) + # Pass arguments to `create_input` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::CreateInputRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::CreateInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_input(parent: nil, input: nil, input_id: nil, request_id: nil) + # Pass arguments to `create_input` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 location for the resource, in the form of: + # `projects/{project}/locations/{location}`. + # @param input [::Google::Cloud::Video::LiveStream::V1::Input, ::Hash] + # Required. The input resource to be created. + # @param input_id [::String] + # Required. The ID of the input resource to be created. + # + # This value must be 1-63 characters, begin and end with a lower-case letter + # or a number, and consist of only lower-case letters, numbers, and hyphens. + # In other words, it must match the following regex: + # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @param request_id [::String] + # A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::CreateInputRequest.new + # + # # Call the create_input method. + # result = client.create_input request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateInputRequest + + # Converts hash and nil to an 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_input.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_input.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.create_input request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 list of all inputs in the specified region. + # + # @overload list_inputs(request, options = nil) + # Pass arguments to `list_inputs` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::ListInputsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::ListInputsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_inputs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_inputs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 location for the resource, in the form of: + # `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # The maximum number of items to return. If unspecified, server + # will pick an appropriate default. Server may return fewer items than + # requested. A caller should only rely on response's + # {::Google::Cloud::Video::LiveStream::V1::ListInputsResponse#next_page_token next_page_token} + # to determine if there are more items left to be queried. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # @param filter [::String] + # The filter to apply to list results. + # @param order_by [::String] + # Specifies the ordering of results following syntax at [Sorting + # Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Input>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Input>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::ListInputsRequest.new + # + # # Call the list_inputs method. + # result = client.list_inputs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Input. + # p item + # end + # + def list_inputs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListInputsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_inputs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_inputs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_inputs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.list_inputs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @livestream_service_stub, :list_inputs, "inputs", 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 the specified input. + # + # @overload get_input(request, options = nil) + # Pass arguments to `get_input` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::GetInputRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::GetInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_input(name: nil) + # Pass arguments to `get_input` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 input resource, in the form of: + # `projects/{project}/locations/{location}/inputs/{inputId}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Input] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::Input] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::GetInputRequest.new + # + # # Call the get_input method. + # result = client.get_input request + # + # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Input. + # p result + # + def get_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetInputRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_input.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_input.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.get_input request, 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 the specified input. + # + # @overload delete_input(request, options = nil) + # Pass arguments to `delete_input` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_input(name: nil, request_id: nil) + # Pass arguments to `delete_input` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 input resource, in the form of: + # `projects/{project}/locations/{location}/inputs/{inputId}`. + # @param request_id [::String] + # A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::DeleteInputRequest.new + # + # # Call the delete_input method. + # result = client.delete_input request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest + + # Converts hash and nil to an 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_input.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_input.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.delete_input request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 specified input. + # + # @overload update_input(request, options = nil) + # Pass arguments to `update_input` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_input(update_mask: nil, input: nil, request_id: nil) + # Pass arguments to `update_input` via keyword arguments. Note that at + # least one keyword argument is 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] + # Field mask is used to specify the fields to be overwritten in the Input + # resource by the update. You can only update the following fields: + # + # * [`tier`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#Tier) + # * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) + # * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) + # + # 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 mask is not present, then each field from the list above is updated + # if the field appears in the request payload. To unset a field, add the + # field to the update mask and remove it from the request payload. + # @param input [::Google::Cloud::Video::LiveStream::V1::Input, ::Hash] + # Required. The input resource to be updated. + # @param request_id [::String] + # A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::UpdateInputRequest.new + # + # # Call the update_input method. + # result = client.update_input request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest + + # Converts hash and nil to an 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_input.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_input.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.update_input request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Preview the streaming content of the specified input. + # + # @overload preview_input(request, options = nil) + # Pass arguments to `preview_input` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload preview_input(name: nil) + # Pass arguments to `preview_input` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 input resource, in the form of: + # `projects/{project}/locations/{location}/inputs/{inputId}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::PreviewInputResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::PreviewInputResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::PreviewInputRequest.new + # + # # Call the preview_input method. + # result = client.preview_input request + # + # # The returned object is of type Google::Cloud::Video::LiveStream::V1::PreviewInputResponse. + # p result + # + def preview_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.preview_input.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.preview_input.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.preview_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.preview_input request, 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 event with the provided unique ID in the specified channel. + # + # @overload create_event(request, options = nil) + # Pass arguments to `create_event` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::CreateEventRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::CreateEventRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_event(parent: nil, event: nil, event_id: nil, request_id: nil) + # Pass arguments to `create_event` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 channel for the resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @param event [::Google::Cloud::Video::LiveStream::V1::Event, ::Hash] + # Required. The event resource to be created. + # @param event_id [::String] + # Required. The ID of the event resource to be created. + # + # This value must be 1-63 characters, begin and end with a lower-case letter + # or a number, and consist of only lower-case letters, numbers, and hyphens. + # In other words, it must match the following regex: + # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @param request_id [::String] + # A 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 [::Google::Cloud::Video::LiveStream::V1::Event] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::Event] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::CreateEventRequest.new + # + # # Call the create_event method. + # result = client.create_event request + # + # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Event. + # p result + # + def create_event request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateEventRequest + + # Converts hash and nil to an 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_event.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_event.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_event.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.create_event request, 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 all events in the specified channel. + # + # @overload list_events(request, options = nil) + # Pass arguments to `list_events` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::ListEventsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::ListEventsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_events(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_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 parent [::String] + # Required. The parent channel for the resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @param page_size [::Integer] + # The maximum number of items to return. If unspecified, server + # will pick an appropriate default. Server may return fewer items than + # requested. A caller should only rely on response's + # {::Google::Cloud::Video::LiveStream::V1::ListEventsResponse#next_page_token next_page_token} + # to determine if there are more items left to be queried. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # @param filter [::String] + # The filter to apply to list results. + # @param order_by [::String] + # Specifies the ordering of results following syntax at + # https://cloud.google.com/apis/design/design_patterns#sorting_order. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Event>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Event>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::ListEventsRequest.new + # + # # Call the list_events method. + # result = client.list_events request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Event. + # p item + # end + # + def list_events request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListEventsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_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::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_events.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_events.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.list_events request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @livestream_service_stub, :list_events, "events", 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 the specified event. + # + # @overload get_event(request, options = nil) + # Pass arguments to `get_event` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::GetEventRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::GetEventRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_event(name: nil) + # Pass arguments to `get_event` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 event resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Event] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::Event] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::GetEventRequest.new + # + # # Call the get_event method. + # result = client.get_event request + # + # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Event. + # p result + # + def get_event request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetEventRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_event.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_event.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_event.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.get_event request, 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 the specified event. + # + # @overload delete_event(request, options = nil) + # Pass arguments to `delete_event` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_event(name: nil, request_id: nil) + # Pass arguments to `delete_event` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 event resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + # @param request_id [::String] + # A 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 [::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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::DeleteEventRequest.new + # + # # Call the delete_event method. + # result = client.delete_event request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_event request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest + + # Converts hash and nil to an 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_event.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_event.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_event.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.delete_event request, 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 all clips in the specified channel. + # + # @overload list_clips(request, options = nil) + # Pass arguments to `list_clips` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::ListClipsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::ListClipsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_clips(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_clips` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListClipsRequest + # @param page_size [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. + # @param filter [::String] + # Filtering results + # @param order_by [::String] + # 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::Video::LiveStream::V1::Clip>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Clip>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::ListClipsRequest.new + # + # # Call the list_clips method. + # result = client.list_clips request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Clip. + # p item + # end + # + def list_clips request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListClipsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_clips.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_clips.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_clips.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.list_clips request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @livestream_service_stub, :list_clips, "clips", 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 the specified clip. + # + # @overload get_clip(request, options = nil) + # Pass arguments to `get_clip` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::GetClipRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::GetClipRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_clip(name: nil) + # Pass arguments to `get_clip` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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, in the following form: + # `projects/{project}/locations/{location}/channels/{channel}/clips/{clip}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Clip] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::Clip] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::GetClipRequest.new + # + # # Call the get_clip method. + # result = client.get_clip request + # + # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Clip. + # p result + # + def get_clip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetClipRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_clip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_clip.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_clip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.get_clip request, 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 clip with the provided clip ID in the specified channel. + # + # @overload create_clip(request, options = nil) + # Pass arguments to `create_clip` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::CreateClipRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::CreateClipRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_clip(parent: nil, clip_id: nil, clip: nil, request_id: nil) + # Pass arguments to `create_clip` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 following form: + # `projects/{project}/locations/{location}/channels/{channel}`. + # @param clip_id [::String] + # Required. The ID of the clip resource to be created. + # + # This value must be 1-63 characters, begin and end with a lower-case letter + # or a number, and consist of only lower-case letters, numbers, and hyphens. + # In other words, it must match the following regex: + # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @param clip [::Google::Cloud::Video::LiveStream::V1::Clip, ::Hash] + # Required. The resource being 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::CreateClipRequest.new + # + # # Call the create_clip method. + # result = client.create_clip request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_clip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateClipRequest + + # Converts hash and nil to an 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_clip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_clip.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_clip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.create_clip request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 the specified clip job resource. This method only deletes the clip + # job and does not delete the VOD clip stored in Cloud Storage. + # + # @overload delete_clip(request, options = nil) + # Pass arguments to `delete_clip` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_clip(name: nil, request_id: nil) + # Pass arguments to `delete_clip` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 clip resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`. + # @param request_id [::String] + # Optional. A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::DeleteClipRequest.new + # + # # Call the delete_clip method. + # result = client.delete_clip request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_clip request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest + + # Converts hash and nil to an 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_clip.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_clip.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_clip.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.delete_clip request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 DVR session with the provided unique ID in the specified channel. + # + # @overload create_dvr_session(request, options = nil) + # Pass arguments to `create_dvr_session` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_dvr_session(parent: nil, dvr_session_id: nil, dvr_session: nil, request_id: nil) + # Pass arguments to `create_dvr_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 following form: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @param dvr_session_id [::String] + # Required. The ID of the DVR session resource to be created. + # + # This value must be 1-63 characters, begin and end with a lower-case letter + # or a number, and consist of only lower-case letters, numbers, and hyphens. + # In other words, it must match the following regex: + # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @param dvr_session [::Google::Cloud::Video::LiveStream::V1::DvrSession, ::Hash] + # Required. The resource being 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest.new + # + # # Call the create_dvr_session method. + # result = client.create_dvr_session request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_dvr_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest + + # Converts hash and nil to an 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_dvr_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_dvr_session.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_dvr_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.create_dvr_session request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 list of all DVR sessions in the specified channel. + # + # @overload list_dvr_sessions(request, options = nil) + # Pass arguments to `list_dvr_sessions` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_dvr_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_dvr_sessions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListDvrSessionsRequest + # @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 results + # @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::Video::LiveStream::V1::DvrSession>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::DvrSession>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest.new + # + # # Call the list_dvr_sessions method. + # result = client.list_dvr_sessions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::DvrSession. + # p item + # end + # + def list_dvr_sessions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_dvr_sessions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_dvr_sessions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_dvr_sessions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.list_dvr_sessions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @livestream_service_stub, :list_dvr_sessions, "dvr_sessions", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the specified DVR session. + # + # @overload get_dvr_session(request, options = nil) + # Pass arguments to `get_dvr_session` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_dvr_session(name: nil) + # Pass arguments to `get_dvr_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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, in the following form: + # `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::DvrSession] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::DvrSession] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest.new + # + # # Call the get_dvr_session method. + # result = client.get_dvr_session request + # + # # The returned object is of type Google::Cloud::Video::LiveStream::V1::DvrSession. + # p result + # + def get_dvr_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_dvr_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_dvr_session.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_dvr_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.get_dvr_session request, 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 the specified DVR session. + # + # @overload delete_dvr_session(request, options = nil) + # Pass arguments to `delete_dvr_session` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_dvr_session(name: nil, request_id: nil) + # Pass arguments to `delete_dvr_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 event resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`. + # @param request_id [::String] + # Optional. A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest.new + # + # # Call the delete_dvr_session method. + # result = client.delete_dvr_session request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_dvr_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest + + # Converts hash and nil to an 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_dvr_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_dvr_session.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_dvr_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.delete_dvr_session request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 specified DVR session. + # + # @overload update_dvr_session(request, options = nil) + # Pass arguments to `update_dvr_session` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_dvr_session(update_mask: nil, dvr_session: nil, request_id: nil) + # Pass arguments to `update_dvr_session` via keyword arguments. Note that at + # least one keyword argument is 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. Field mask is used to specify the fields to be overwritten in the + # DvrSession resource by the update. You can only update the following + # fields: + # + # * `dvrWindows` + # + # 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. + # @param dvr_session [::Google::Cloud::Video::LiveStream::V1::DvrSession, ::Hash] + # Required. The DVR session resource to be updated. + # @param request_id [::String] + # Optional. A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest.new + # + # # Call the update_dvr_session method. + # result = client.update_dvr_session request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_dvr_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest + + # Converts hash and nil to an 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_dvr_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_dvr_session.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_dvr_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.update_dvr_session request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 Asset with the provided unique ID in the specified + # region. + # + # @overload create_asset(request, options = nil) + # Pass arguments to `create_asset` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_asset(parent: nil, asset: nil, asset_id: nil, request_id: nil) + # Pass arguments to `create_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent location for the resource, in the form of: + # `projects/{project}/locations/{location}`. + # @param asset [::Google::Cloud::Video::LiveStream::V1::Asset, ::Hash] + # Required. The asset resource to be created. + # @param asset_id [::String] + # Required. The ID of the asset resource to be created. + # + # This value must be 1-63 characters, begin and end with a lower-case letter + # or a number, and consist of only lower-case letters, numbers, and hyphens. + # In other words, it must match the following regex: + # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @param request_id [::String] + # A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::CreateAssetRequest.new + # + # # Call the create_asset method. + # result = client.create_asset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_asset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_asset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.create_asset request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified asset if it is not used. + # + # @overload delete_asset(request, options = nil) + # Pass arguments to `delete_asset` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_asset(name: nil, request_id: nil) + # Pass arguments to `delete_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the asset resource, in the form of: + # `projects/{project}/locations/{location}/assets/{assetId}`. + # @param request_id [::String] + # A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest.new + # + # # Call the delete_asset method. + # result = client.delete_asset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_asset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_asset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.delete_asset request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the specified asset. + # + # @overload get_asset(request, options = nil) + # Pass arguments to `get_asset` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::GetAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::GetAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_asset(name: nil) + # Pass arguments to `get_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource, in the following form: + # `projects/{project}/locations/{location}/assets/{asset}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Asset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::Asset] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::GetAssetRequest.new + # + # # Call the get_asset method. + # result = client.get_asset request + # + # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Asset. + # p result + # + def get_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_asset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_asset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.get_asset request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of all assets in the specified region. + # + # @overload list_assets(request, options = nil) + # Pass arguments to `list_assets` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent location for the resource, in the form of: + # `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. + # @param filter [::String] + # Filtering results + # @param order_by [::String] + # 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::Video::LiveStream::V1::Asset>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Asset>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::ListAssetsRequest.new + # + # # Call the list_assets method. + # result = client.list_assets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Asset. + # p item + # end + # + def list_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_assets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.list_assets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @livestream_service_stub, :list_assets, "assets", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the specified pool. + # + # @overload get_pool(request, options = nil) + # Pass arguments to `get_pool` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::GetPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::GetPoolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_pool(name: nil) + # Pass arguments to `get_pool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 pool resource, in the form of: + # `projects/{project}/locations/{location}/pools/{poolId}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Pool] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::Pool] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::GetPoolRequest.new + # + # # Call the get_pool method. + # result = client.get_pool request + # + # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Pool. + # p result + # + def get_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetPoolRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_pool.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_pool.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.get_pool request, 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 the specified pool. + # + # @overload update_pool(request, options = nil) + # Pass arguments to `update_pool` via a request object, either of type + # {::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_pool(update_mask: nil, pool: nil, request_id: nil) + # Pass arguments to `update_pool` via keyword arguments. Note that at + # least one keyword argument is 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] + # Field mask is used to specify the fields to be overwritten in the Pool + # resource by the update. You can only update the following fields: + # + # * `networkConfig` + # + # 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. + # @param pool [::Google::Cloud::Video::LiveStream::V1::Pool, ::Hash] + # Required. The pool resource to be updated. + # @param request_id [::String] + # A 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/video/live_stream/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest.new + # + # # Call the update_pool method. + # result = client.update_pool request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest + + # Converts hash and nil to an 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_pool.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_pool.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @livestream_service_stub.update_pool request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 LivestreamService REST API. + # + # This class represents the configuration for LivestreamService 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::Video::LiveStream::V1::LivestreamService::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_channel to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_channel.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_channel.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 = "livestream.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 LivestreamService 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_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :create_channel + ## + # RPC-specific configuration for `list_channels` + # @return [::Gapic::Config::Method] + # + attr_reader :list_channels + ## + # RPC-specific configuration for `get_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :get_channel + ## + # RPC-specific configuration for `delete_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_channel + ## + # RPC-specific configuration for `update_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :update_channel + ## + # RPC-specific configuration for `start_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :start_channel + ## + # RPC-specific configuration for `stop_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :stop_channel + ## + # RPC-specific configuration for `start_distribution` + # @return [::Gapic::Config::Method] + # + attr_reader :start_distribution + ## + # RPC-specific configuration for `stop_distribution` + # @return [::Gapic::Config::Method] + # + attr_reader :stop_distribution + ## + # RPC-specific configuration for `create_input` + # @return [::Gapic::Config::Method] + # + attr_reader :create_input + ## + # RPC-specific configuration for `list_inputs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_inputs + ## + # RPC-specific configuration for `get_input` + # @return [::Gapic::Config::Method] + # + attr_reader :get_input + ## + # RPC-specific configuration for `delete_input` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_input + ## + # RPC-specific configuration for `update_input` + # @return [::Gapic::Config::Method] + # + attr_reader :update_input + ## + # RPC-specific configuration for `preview_input` + # @return [::Gapic::Config::Method] + # + attr_reader :preview_input + ## + # RPC-specific configuration for `create_event` + # @return [::Gapic::Config::Method] + # + attr_reader :create_event + ## + # RPC-specific configuration for `list_events` + # @return [::Gapic::Config::Method] + # + attr_reader :list_events + ## + # RPC-specific configuration for `get_event` + # @return [::Gapic::Config::Method] + # + attr_reader :get_event + ## + # RPC-specific configuration for `delete_event` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_event + ## + # RPC-specific configuration for `list_clips` + # @return [::Gapic::Config::Method] + # + attr_reader :list_clips + ## + # RPC-specific configuration for `get_clip` + # @return [::Gapic::Config::Method] + # + attr_reader :get_clip + ## + # RPC-specific configuration for `create_clip` + # @return [::Gapic::Config::Method] + # + attr_reader :create_clip + ## + # RPC-specific configuration for `delete_clip` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_clip + ## + # RPC-specific configuration for `create_dvr_session` + # @return [::Gapic::Config::Method] + # + attr_reader :create_dvr_session + ## + # RPC-specific configuration for `list_dvr_sessions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_dvr_sessions + ## + # RPC-specific configuration for `get_dvr_session` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dvr_session + ## + # RPC-specific configuration for `delete_dvr_session` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_dvr_session + ## + # RPC-specific configuration for `update_dvr_session` + # @return [::Gapic::Config::Method] + # + attr_reader :update_dvr_session + ## + # RPC-specific configuration for `create_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_asset + ## + # RPC-specific configuration for `delete_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_asset + ## + # RPC-specific configuration for `get_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_asset + ## + # RPC-specific configuration for `list_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_assets + ## + # RPC-specific configuration for `get_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :get_pool + ## + # RPC-specific configuration for `update_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :update_pool + + # @private + def initialize parent_rpcs = nil + create_channel_config = parent_rpcs.create_channel if parent_rpcs.respond_to? :create_channel + @create_channel = ::Gapic::Config::Method.new create_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 + get_channel_config = parent_rpcs.get_channel if parent_rpcs.respond_to? :get_channel + @get_channel = ::Gapic::Config::Method.new get_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 + update_channel_config = parent_rpcs.update_channel if parent_rpcs.respond_to? :update_channel + @update_channel = ::Gapic::Config::Method.new update_channel_config + start_channel_config = parent_rpcs.start_channel if parent_rpcs.respond_to? :start_channel + @start_channel = ::Gapic::Config::Method.new start_channel_config + stop_channel_config = parent_rpcs.stop_channel if parent_rpcs.respond_to? :stop_channel + @stop_channel = ::Gapic::Config::Method.new stop_channel_config + start_distribution_config = parent_rpcs.start_distribution if parent_rpcs.respond_to? :start_distribution + @start_distribution = ::Gapic::Config::Method.new start_distribution_config + stop_distribution_config = parent_rpcs.stop_distribution if parent_rpcs.respond_to? :stop_distribution + @stop_distribution = ::Gapic::Config::Method.new stop_distribution_config + create_input_config = parent_rpcs.create_input if parent_rpcs.respond_to? :create_input + @create_input = ::Gapic::Config::Method.new create_input_config + list_inputs_config = parent_rpcs.list_inputs if parent_rpcs.respond_to? :list_inputs + @list_inputs = ::Gapic::Config::Method.new list_inputs_config + get_input_config = parent_rpcs.get_input if parent_rpcs.respond_to? :get_input + @get_input = ::Gapic::Config::Method.new get_input_config + delete_input_config = parent_rpcs.delete_input if parent_rpcs.respond_to? :delete_input + @delete_input = ::Gapic::Config::Method.new delete_input_config + update_input_config = parent_rpcs.update_input if parent_rpcs.respond_to? :update_input + @update_input = ::Gapic::Config::Method.new update_input_config + preview_input_config = parent_rpcs.preview_input if parent_rpcs.respond_to? :preview_input + @preview_input = ::Gapic::Config::Method.new preview_input_config + create_event_config = parent_rpcs.create_event if parent_rpcs.respond_to? :create_event + @create_event = ::Gapic::Config::Method.new create_event_config + list_events_config = parent_rpcs.list_events if parent_rpcs.respond_to? :list_events + @list_events = ::Gapic::Config::Method.new list_events_config + get_event_config = parent_rpcs.get_event if parent_rpcs.respond_to? :get_event + @get_event = ::Gapic::Config::Method.new get_event_config + delete_event_config = parent_rpcs.delete_event if parent_rpcs.respond_to? :delete_event + @delete_event = ::Gapic::Config::Method.new delete_event_config + list_clips_config = parent_rpcs.list_clips if parent_rpcs.respond_to? :list_clips + @list_clips = ::Gapic::Config::Method.new list_clips_config + get_clip_config = parent_rpcs.get_clip if parent_rpcs.respond_to? :get_clip + @get_clip = ::Gapic::Config::Method.new get_clip_config + create_clip_config = parent_rpcs.create_clip if parent_rpcs.respond_to? :create_clip + @create_clip = ::Gapic::Config::Method.new create_clip_config + delete_clip_config = parent_rpcs.delete_clip if parent_rpcs.respond_to? :delete_clip + @delete_clip = ::Gapic::Config::Method.new delete_clip_config + create_dvr_session_config = parent_rpcs.create_dvr_session if parent_rpcs.respond_to? :create_dvr_session + @create_dvr_session = ::Gapic::Config::Method.new create_dvr_session_config + list_dvr_sessions_config = parent_rpcs.list_dvr_sessions if parent_rpcs.respond_to? :list_dvr_sessions + @list_dvr_sessions = ::Gapic::Config::Method.new list_dvr_sessions_config + get_dvr_session_config = parent_rpcs.get_dvr_session if parent_rpcs.respond_to? :get_dvr_session + @get_dvr_session = ::Gapic::Config::Method.new get_dvr_session_config + delete_dvr_session_config = parent_rpcs.delete_dvr_session if parent_rpcs.respond_to? :delete_dvr_session + @delete_dvr_session = ::Gapic::Config::Method.new delete_dvr_session_config + update_dvr_session_config = parent_rpcs.update_dvr_session if parent_rpcs.respond_to? :update_dvr_session + @update_dvr_session = ::Gapic::Config::Method.new update_dvr_session_config + create_asset_config = parent_rpcs.create_asset if parent_rpcs.respond_to? :create_asset + @create_asset = ::Gapic::Config::Method.new create_asset_config + delete_asset_config = parent_rpcs.delete_asset if parent_rpcs.respond_to? :delete_asset + @delete_asset = ::Gapic::Config::Method.new delete_asset_config + get_asset_config = parent_rpcs.get_asset if parent_rpcs.respond_to? :get_asset + @get_asset = ::Gapic::Config::Method.new get_asset_config + list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets + @list_assets = ::Gapic::Config::Method.new list_assets_config + get_pool_config = parent_rpcs.get_pool if parent_rpcs.respond_to? :get_pool + @get_pool = ::Gapic::Config::Method.new get_pool_config + update_pool_config = parent_rpcs.update_pool if parent_rpcs.respond_to? :update_pool + @update_pool = ::Gapic::Config::Method.new update_pool_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-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest/operations.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest/operations.rb new file mode 100644 index 000000000000..8db54d1cdab6 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/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 Video + module LiveStream + module V1 + module LivestreamService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "livestream.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the LivestreamService 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 LivestreamService 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::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Video::LiveStream::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "livestream.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 +end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest/service_stub.rb new file mode 100644 index 000000000000..544178ad6b12 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest/service_stub.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 "google/cloud/video/livestream/v1/service_pb" + +module Google + module Cloud + module Video + module LiveStream + module V1 + module LivestreamService + module Rest + ## + # REST service stub for the LivestreamService 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_channel REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::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 list_channels REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::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::Video::LiveStream::V1::ListChannelsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::LiveStream::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::Video::LiveStream::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 get_channel REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::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::Video::LiveStream::V1::Channel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::LiveStream::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::Video::LiveStream::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 delete_channel REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::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 update_channel REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::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 start_channel REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::StartChannelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def start_channel request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_start_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: "start_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 stop_channel REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::StopChannelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def stop_channel request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_stop_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: "stop_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 start_distribution REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def start_distribution request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_start_distribution_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "start_distribution", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the stop_distribution REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def stop_distribution request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_stop_distribution_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "stop_distribution", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_input REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateInputRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_input request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_input_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_input", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_inputs REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListInputsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::ListInputsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::ListInputsResponse] + # A result object deserialized from the server's reply + def list_inputs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_inputs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_inputs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Video::LiveStream::V1::ListInputsResponse.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_input REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetInputRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Input] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::Input] + # A result object deserialized from the server's reply + def get_input request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_input_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_input", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Video::LiveStream::V1::Input.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_input REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_input request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_input_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_input", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_input REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_input request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_input_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_input", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the preview_input REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::PreviewInputResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::PreviewInputResponse] + # A result object deserialized from the server's reply + def preview_input request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_preview_input_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "preview_input", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Video::LiveStream::V1::PreviewInputResponse.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_event REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateEventRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Event] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::Event] + # A result object deserialized from the server's reply + def create_event request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_event_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_event", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Video::LiveStream::V1::Event.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_events REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListEventsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::ListEventsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::ListEventsResponse] + # A result object deserialized from the server's reply + def list_events request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_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: "list_events", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Video::LiveStream::V1::ListEventsResponse.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_event REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetEventRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Event] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::Event] + # A result object deserialized from the server's reply + def get_event request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_event_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_event", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Video::LiveStream::V1::Event.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_event REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_event request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_event_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_event", + 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 list_clips REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListClipsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::ListClipsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::ListClipsResponse] + # A result object deserialized from the server's reply + def list_clips request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_clips_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_clips", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Video::LiveStream::V1::ListClipsResponse.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_clip REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetClipRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Clip] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::Clip] + # A result object deserialized from the server's reply + def get_clip request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_clip_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_clip", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Video::LiveStream::V1::Clip.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_clip REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateClipRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_clip request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_clip_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_clip", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_clip REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_clip request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_clip_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_clip", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_dvr_session REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_dvr_session request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_dvr_session_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_dvr_session", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_dvr_sessions REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsResponse] + # A result object deserialized from the server's reply + def list_dvr_sessions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_dvr_sessions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_dvr_sessions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsResponse.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_dvr_session REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::DvrSession] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::DvrSession] + # A result object deserialized from the server's reply + def get_dvr_session request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_dvr_session_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_dvr_session", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Video::LiveStream::V1::DvrSession.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_dvr_session REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_dvr_session request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_dvr_session_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_dvr_session", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_dvr_session REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_dvr_session request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_dvr_session_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_dvr_session", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_asset REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_asset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_asset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_asset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_asset REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_asset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_asset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_asset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_asset REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetAssetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Asset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::Asset] + # A result object deserialized from the server's reply + def get_asset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_asset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_asset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Video::LiveStream::V1::Asset.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_assets REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::ListAssetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::ListAssetsResponse] + # A result object deserialized from the server's reply + def list_assets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_assets_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_assets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Video::LiveStream::V1::ListAssetsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_pool REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetPoolRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Pool] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::LiveStream::V1::Pool] + # A result object deserialized from the server's reply + def get_pool request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_pool_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_pool", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Video::LiveStream::V1::Pool.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_pool REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_pool request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_pool_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_pool", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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_channel REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::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 list_channels REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::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 get_channel REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::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 delete_channel REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::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 update_channel REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::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 start_channel REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::StartChannelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_start_channel_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:start", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the stop_channel REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::StopChannelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_stop_channel_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:stop", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the start_distribution REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_start_distribution_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:startdistribution", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the stop_distribution REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_stop_distribution_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:stopdistribution", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_input REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateInputRequest] + # 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_input_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/inputs", + body: "input", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_inputs REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListInputsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_inputs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/inputs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_input REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetInputRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_input_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/inputs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_input REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest] + # 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_input_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/inputs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_input REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest] + # 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_input_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{input.name}", + body: "input", + matches: [ + ["input.name", %r{^projects/[^/]+/locations/[^/]+/inputs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the preview_input REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_preview_input_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:preview", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/inputs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_event REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateEventRequest] + # 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_event_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/events", + body: "event", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_events REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListEventsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_events_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/events", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_event REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetEventRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_event_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/events/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_event REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest] + # 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_event_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/events/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_clips REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListClipsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_clips_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/clips", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_clip REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetClipRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_clip_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/clips/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_clip REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateClipRequest] + # 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_clip_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/clips", + body: "clip", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_clip REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest] + # 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_clip_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/clips/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_dvr_session REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest] + # 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_dvr_session_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dvrSessions", + body: "dvr_session", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_dvr_sessions REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_dvr_sessions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dvrSessions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_dvr_session REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_dvr_session_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/dvrSessions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_dvr_session REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest] + # 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_dvr_session_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/dvrSessions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_dvr_session REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest] + # 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_dvr_session_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{dvr_session.name}", + body: "dvr_session", + matches: [ + ["dvr_session.name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/dvrSessions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_asset REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_asset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/assets", + body: "asset", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_asset REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_asset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/assets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_asset REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetAssetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_asset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/assets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_assets REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_assets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/assets", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_pool REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetPoolRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_pool_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/pools/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_pool REST call + # + # @param request_pb [::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest] + # 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_pool_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{pool.name}", + body: "pool", + matches: [ + ["pool.name", %r{^projects/[^/]+/locations/[^/]+/pools/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/rest.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/rest.rb new file mode 100644 index 000000000000..ed1016097c8a --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/rest.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/video/live_stream/v1/livestream_service/rest" +require "google/cloud/video/live_stream/v1/bindings_override" +require "google/cloud/video/live_stream/v1/version" + +module Google + module Cloud + module Video + module LiveStream + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/video/live_stream/v1/rest" + # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/version.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/version.rb new file mode 100644 index 000000000000..cdd336eff66a --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/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 Video + module LiveStream + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/outputs_pb.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/outputs_pb.rb new file mode 100644 index 000000000000..4a7af12f248a --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/outputs_pb.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/video/livestream/v1/outputs.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/rpc/status_pb' +require 'google/type/datetime_pb' + + +descriptor_data = "\n.google/cloud/video/livestream/v1/outputs.proto\x12 google.cloud.video.livestream.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x17google/rpc/status.proto\x1a\x1agoogle/type/datetime.proto\"\x87\x02\n\x10\x45lementaryStream\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x45\n\x0cvideo_stream\x18\x01 \x01(\x0b\x32-.google.cloud.video.livestream.v1.VideoStreamH\x00\x12\x45\n\x0c\x61udio_stream\x18\x02 \x01(\x0b\x32-.google.cloud.video.livestream.v1.AudioStreamH\x00\x12\x43\n\x0btext_stream\x18\x03 \x01(\x0b\x32,.google.cloud.video.livestream.v1.TextStreamH\x00\x42\x13\n\x11\x65lementary_stream\"\xab\x01\n\tMuxStream\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x11\n\tcontainer\x18\x03 \x01(\t\x12\x1a\n\x12\x65lementary_streams\x18\x04 \x03(\t\x12K\n\x10segment_settings\x18\x05 \x01(\x0b\x32\x31.google.cloud.video.livestream.v1.SegmentSettings\x12\x15\n\rencryption_id\x18\x06 \x01(\t\"\xce\x02\n\x08Manifest\x12\x11\n\tfile_name\x18\x01 \x01(\t\x12J\n\x04type\x18\x02 \x01(\x0e\x32\x37.google.cloud.video.livestream.v1.Manifest.ManifestTypeB\x03\xe0\x41\x02\x12\x18\n\x0bmux_streams\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12\x19\n\x11max_segment_count\x18\x04 \x01(\x05\x12\x38\n\x15segment_keep_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12 \n\x18use_timecode_as_timeline\x18\x06 \x01(\x08\x12\x10\n\x03key\x18\x07 \x01(\tB\x03\xe0\x41\x01\"@\n\x0cManifestType\x12\x1d\n\x19MANIFEST_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03HLS\x10\x01\x12\x08\n\x04\x44\x41SH\x10\x02\"_\n\x12\x44istributionStream\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tcontainer\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12\x65lementary_streams\x18\x03 \x03(\tB\x03\xe0\x41\x02\"\xc7\x03\n\x0c\x44istribution\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13\x64istribution_stream\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12H\n\x05state\x18\x03 \x01(\x0e\x32\x34.google.cloud.video.livestream.v1.Distribution.StateB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12K\n\x08srt_push\x18\x05 \x01(\x0b\x32\x37.google.cloud.video.livestream.v1.SrtPushOutputEndpointH\x00\x12M\n\trtmp_push\x18\x06 \x01(\x0b\x32\x38.google.cloud.video.livestream.v1.RtmpPushOutputEndpointH\x00\"i\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05\x45RROR\x10\x05\x12\r\n\tNOT_READY\x10\x06\x12\t\n\x05READY\x10\x07\x12\x12\n\x0e\x41WAITING_INPUT\x10\x08\x12\x10\n\x0c\x44ISTRIBUTING\x10\tB\n\n\x08\x65ndpoint\"\x94\x01\n\x15SrtPushOutputEndpoint\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12T\n\x19passphrase_secret_version\x18\x02 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersionH\x00\x42\x13\n\x11passphrase_source\"C\n\x16RtmpPushOutputEndpoint\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nstream_key\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xe3\x01\n\x0bSpriteSheet\x12\x0e\n\x06\x66ormat\x18\x01 \x01(\t\x12\x18\n\x0b\x66ile_prefix\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13sprite_width_pixels\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\x12!\n\x14sprite_height_pixels\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x14\n\x0c\x63olumn_count\x18\x05 \x01(\x05\x12\x11\n\trow_count\x18\x06 \x01(\x05\x12+\n\x08interval\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0f\n\x07quality\x18\x08 \x01(\x05\"\xc5\x03\n\x13PreprocessingConfig\x12J\n\x05\x61udio\x18\x01 \x01(\x0b\x32;.google.cloud.video.livestream.v1.PreprocessingConfig.Audio\x12H\n\x04\x63rop\x18\x02 \x01(\x0b\x32:.google.cloud.video.livestream.v1.PreprocessingConfig.Crop\x12\x46\n\x03pad\x18\x03 \x01(\x0b\x32\x39.google.cloud.video.livestream.v1.PreprocessingConfig.Pad\x1a\x15\n\x05\x41udio\x12\x0c\n\x04lufs\x18\x01 \x01(\x01\x1a\\\n\x04\x43rop\x12\x12\n\ntop_pixels\x18\x01 \x01(\x05\x12\x15\n\rbottom_pixels\x18\x02 \x01(\x05\x12\x13\n\x0bleft_pixels\x18\x03 \x01(\x05\x12\x14\n\x0cright_pixels\x18\x04 \x01(\x05\x1a[\n\x03Pad\x12\x12\n\ntop_pixels\x18\x01 \x01(\x05\x12\x15\n\rbottom_pixels\x18\x02 \x01(\x05\x12\x13\n\x0bleft_pixels\x18\x03 \x01(\x05\x12\x14\n\x0cright_pixels\x18\x04 \x01(\x05\"\xbe\x07\n\x0bVideoStream\x12O\n\x04h264\x18\x14 \x01(\x0b\x32?.google.cloud.video.livestream.v1.VideoStream.H264CodecSettingsH\x00\x12O\n\x04h265\x18\x15 \x01(\x0b\x32?.google.cloud.video.livestream.v1.VideoStream.H265CodecSettingsH\x00\x1a\x8c\x03\n\x11H264CodecSettings\x12\x14\n\x0cwidth_pixels\x18\x01 \x01(\x05\x12\x15\n\rheight_pixels\x18\x02 \x01(\x05\x12\x17\n\nframe_rate\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\x12\x18\n\x0b\x62itrate_bps\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x16\n\x0e\x61llow_open_gop\x18\x06 \x01(\x08\x12\x19\n\x0fgop_frame_count\x18\x07 \x01(\x05H\x00\x12\x31\n\x0cgop_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x15\n\rvbv_size_bits\x18\t \x01(\x05\x12\x19\n\x11vbv_fullness_bits\x18\n \x01(\x05\x12\x15\n\rentropy_coder\x18\x0b \x01(\t\x12\x11\n\tb_pyramid\x18\x0c \x01(\x08\x12\x15\n\rb_frame_count\x18\r \x01(\x05\x12\x13\n\x0b\x61q_strength\x18\x0e \x01(\x01\x12\x0f\n\x07profile\x18\x0f \x01(\t\x12\x0c\n\x04tune\x18\x10 \x01(\tB\n\n\x08gop_mode\x1a\xeb\x02\n\x11H265CodecSettings\x12\x19\n\x0cwidth_pixels\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1a\n\rheight_pixels\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\nframe_rate\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\x12\x18\n\x0b\x62itrate_bps\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1e\n\x0fgop_frame_count\x18\x07 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x12\x36\n\x0cgop_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01H\x00\x12\x1a\n\rvbv_size_bits\x18\t \x01(\x05\x42\x03\xe0\x41\x01\x12\x1e\n\x11vbv_fullness_bits\x18\n \x01(\x05\x42\x03\xe0\x41\x01\x12\x16\n\tb_pyramid\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rb_frame_count\x18\x0c \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0b\x61q_strength\x18\r \x01(\x01\x42\x03\xe0\x41\x01\x42\n\n\x08gop_modeB\x10\n\x0e\x63odec_settings\"\xec\x02\n\x0b\x41udioStream\x12\x10\n\x08transmux\x18\x08 \x01(\x08\x12\r\n\x05\x63odec\x18\x01 \x01(\t\x12\x18\n\x0b\x62itrate_bps\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12\x15\n\rchannel_count\x18\x03 \x01(\x05\x12\x16\n\x0e\x63hannel_layout\x18\x04 \x03(\t\x12K\n\x07mapping\x18\x05 \x03(\x0b\x32:.google.cloud.video.livestream.v1.AudioStream.AudioMapping\x12\x19\n\x11sample_rate_hertz\x18\x06 \x01(\x05\x1a\x8a\x01\n\x0c\x41udioMapping\x12\x16\n\tinput_key\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0binput_track\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1a\n\rinput_channel\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1b\n\x0eoutput_channel\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x0f\n\x07gain_db\x18\x05 \x01(\x01\"\xcb\x02\n\nTextStream\x12\x12\n\x05\x63odec\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12output_cea_channel\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12N\n\x07mapping\x18\x03 \x03(\x0b\x32\x38.google.cloud.video.livestream.v1.TextStream.TextMappingB\x03\xe0\x41\x01\x1a\x80\x01\n\x0bTextMapping\x12\x16\n\tinput_key\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0binput_track\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1e\n\x11input_cea_channel\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12\x66rom_language_code\x18\x06 \x01(\tB\x03\xe0\x41\x01\"F\n\x0fSegmentSettings\x12\x33\n\x10segment_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xac\x02\n\x0eTimecodeConfig\x12O\n\x06source\x18\x01 \x01(\x0e\x32?.google.cloud.video.livestream.v1.TimecodeConfig.TimecodeSource\x12/\n\nutc_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12*\n\ttime_zone\x18\x03 \x01(\x0b\x32\x15.google.type.TimeZoneH\x00\"]\n\x0eTimecodeSource\x12\x1f\n\x1bTIMECODE_SOURCE_UNSPECIFIED\x10\x00\x12\x13\n\x0fMEDIA_TIMESTAMP\x10\x01\x12\x15\n\x11\x45MBEDDED_TIMECODE\x10\x02\x42\r\n\x0btime_offsetB\xe9\x01\n$com.google.cloud.video.livestream.v1B\x0cOutputsProtoP\x01ZDcloud.google.com/go/video/livestream/apiv1/livestreampb;livestreampb\xaa\x02 Google.Cloud.Video.LiveStream.V1\xca\x02 Google\\Cloud\\Video\\LiveStream\\V1\xea\x02$Google::Cloud::Video::LiveStream::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Video + module LiveStream + module V1 + ElementaryStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ElementaryStream").msgclass + MuxStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.MuxStream").msgclass + Manifest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Manifest").msgclass + Manifest::ManifestType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Manifest.ManifestType").enummodule + DistributionStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.DistributionStream").msgclass + Distribution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Distribution").msgclass + Distribution::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Distribution.State").enummodule + SrtPushOutputEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.SrtPushOutputEndpoint").msgclass + RtmpPushOutputEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.RtmpPushOutputEndpoint").msgclass + SpriteSheet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.SpriteSheet").msgclass + PreprocessingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.PreprocessingConfig").msgclass + PreprocessingConfig::Audio = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.PreprocessingConfig.Audio").msgclass + PreprocessingConfig::Crop = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.PreprocessingConfig.Crop").msgclass + PreprocessingConfig::Pad = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.PreprocessingConfig.Pad").msgclass + VideoStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.VideoStream").msgclass + VideoStream::H264CodecSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.VideoStream.H264CodecSettings").msgclass + VideoStream::H265CodecSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.VideoStream.H265CodecSettings").msgclass + AudioStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.AudioStream").msgclass + AudioStream::AudioMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.AudioStream.AudioMapping").msgclass + TextStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.TextStream").msgclass + TextStream::TextMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.TextStream.TextMapping").msgclass + SegmentSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.SegmentSettings").msgclass + TimecodeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.TimecodeConfig").msgclass + TimecodeConfig::TimecodeSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.TimecodeConfig.TimecodeSource").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/resources_pb.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/resources_pb.rb new file mode 100644 index 000000000000..dae144e5d270 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/resources_pb.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/video/livestream/v1/resources.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/video/livestream/v1/outputs_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n0google/cloud/video/livestream/v1/resources.proto\x12 google.cloud.video.livestream.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/video/livestream/v1/outputs.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x98\x07\n\x05Input\x12\x0c\n\x04name\x18\x01 \x01(\t\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\x33.google.cloud.video.livestream.v1.Input.LabelsEntry\x12:\n\x04type\x18\x05 \x01(\x0e\x32,.google.cloud.video.livestream.v1.Input.Type\x12:\n\x04tier\x18\x0e \x01(\x0e\x32,.google.cloud.video.livestream.v1.Input.Tier\x12\x10\n\x03uri\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12S\n\x14preprocessing_config\x18\t \x01(\x0b\x32\x35.google.cloud.video.livestream.v1.PreprocessingConfig\x12L\n\x0esecurity_rules\x18\x0c \x01(\x0b\x32\x34.google.cloud.video.livestream.v1.Input.SecurityRule\x12Y\n\x15input_stream_property\x18\x0f \x01(\x0b\x32\x35.google.cloud.video.livestream.v1.InputStreamPropertyB\x03\xe0\x41\x03\x1a!\n\x0cSecurityRule\x12\x11\n\tip_ranges\x18\x01 \x03(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"9\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tRTMP_PUSH\x10\x01\x12\x0c\n\x08SRT_PUSH\x10\x02\"]\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\x06\n\x02SD\x10\x01\x12\x06\n\x02HD\x10\x02\x12\x07\n\x03UHD\x10\x03\x12\x0b\n\x07SD_H265\x10\x04\x12\x0b\n\x07HD_H265\x10\x05\x12\x0c\n\x08UHD_H265\x10\x06:\\\xea\x41Y\n\x1flivestream.googleapis.com/Input\x12\x36projects/{project}/locations/{location}/inputs/{input}\"\xb4\x0e\n\x07\x43hannel\x12\x0c\n\x04name\x18\x01 \x01(\t\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\x45\n\x06labels\x18\x04 \x03(\x0b\x32\x35.google.cloud.video.livestream.v1.Channel.LabelsEntry\x12L\n\x11input_attachments\x18\x10 \x03(\x0b\x32\x31.google.cloud.video.livestream.v1.InputAttachment\x12\x19\n\x0c\x61\x63tive_input\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x06output\x18\t \x01(\x0b\x32\x30.google.cloud.video.livestream.v1.Channel.OutputB\x03\xe0\x41\x02\x12N\n\x12\x65lementary_streams\x18\n \x03(\x0b\x32\x32.google.cloud.video.livestream.v1.ElementaryStream\x12@\n\x0bmux_streams\x18\x0b \x03(\x0b\x32+.google.cloud.video.livestream.v1.MuxStream\x12=\n\tmanifests\x18\x0c \x03(\x0b\x32*.google.cloud.video.livestream.v1.Manifest\x12W\n\x14\x64istribution_streams\x18\x1c \x03(\x0b\x32\x34.google.cloud.video.livestream.v1.DistributionStreamB\x03\xe0\x41\x01\x12J\n\rdistributions\x18\x1d \x03(\x0b\x32..google.cloud.video.livestream.v1.DistributionB\x03\xe0\x41\x01\x12\x44\n\rsprite_sheets\x18\r \x03(\x0b\x32-.google.cloud.video.livestream.v1.SpriteSheet\x12V\n\x0fstreaming_state\x18\x0e \x01(\x0e\x32\x38.google.cloud.video.livestream.v1.Channel.StreamingStateB\x03\xe0\x41\x03\x12\x30\n\x0fstreaming_error\x18\x12 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12?\n\nlog_config\x18\x13 \x01(\x0b\x32+.google.cloud.video.livestream.v1.LogConfig\x12I\n\x0ftimecode_config\x18\x15 \x01(\x0b\x32\x30.google.cloud.video.livestream.v1.TimecodeConfig\x12\x46\n\x0b\x65ncryptions\x18\x18 \x03(\x0b\x32,.google.cloud.video.livestream.v1.EncryptionB\x03\xe0\x41\x01\x12\x43\n\x0cinput_config\x18\x19 \x01(\x0b\x32-.google.cloud.video.livestream.v1.InputConfig\x12P\n\x10retention_config\x18\x1a \x01(\x0b\x32\x31.google.cloud.video.livestream.v1.RetentionConfigB\x03\xe0\x41\x01\x12M\n\x0fstatic_overlays\x18\x1b \x03(\x0b\x32/.google.cloud.video.livestream.v1.StaticOverlayB\x03\xe0\x41\x01\x12\x61\n\x19\x61uto_transcription_config\x18\x1e \x01(\x0b\x32\x39.google.cloud.video.livestream.v1.AutoTranscriptionConfigB\x03\xe0\x41\x01\x1a\x15\n\x06Output\x12\x0b\n\x03uri\x18\x01 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xaa\x01\n\x0eStreamingState\x12\x1f\n\x1bSTREAMING_STATE_UNSPECIFIED\x10\x00\x12\r\n\tSTREAMING\x10\x01\x12\x12\n\x0e\x41WAITING_INPUT\x10\x02\x12\x13\n\x0fSTREAMING_ERROR\x10\x04\x12\x16\n\x12STREAMING_NO_INPUT\x10\x05\x12\x0b\n\x07STOPPED\x10\x06\x12\x0c\n\x08STARTING\x10\x07\x12\x0c\n\x08STOPPING\x10\x08:b\xea\x41_\n!livestream.googleapis.com/Channel\x12:projects/{project}/locations/{location}/channels/{channel}\"6\n\x14NormalizedCoordinate\x12\x0e\n\x01x\x18\x01 \x01(\x01\x42\x03\xe0\x41\x01\x12\x0e\n\x01y\x18\x02 \x01(\x01\x42\x03\xe0\x41\x01\"6\n\x14NormalizedResolution\x12\x0e\n\x01w\x18\x01 \x01(\x01\x42\x03\xe0\x41\x01\x12\x0e\n\x01h\x18\x02 \x01(\x01\x42\x03\xe0\x41\x01\"\xfd\x01\n\rStaticOverlay\x12\x36\n\x05\x61sset\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1flivestream.googleapis.com/Asset\x12O\n\nresolution\x18\x02 \x01(\x0b\x32\x36.google.cloud.video.livestream.v1.NormalizedResolutionB\x03\xe0\x41\x01\x12M\n\x08position\x18\x03 \x01(\x0b\x32\x36.google.cloud.video.livestream.v1.NormalizedCoordinateB\x03\xe0\x41\x01\x12\x14\n\x07opacity\x18\x04 \x01(\x01\x42\x03\xe0\x41\x01\"\xc6\x01\n\x0bInputConfig\x12X\n\x11input_switch_mode\x18\x01 \x01(\x0e\x32=.google.cloud.video.livestream.v1.InputConfig.InputSwitchMode\"]\n\x0fInputSwitchMode\x12!\n\x1dINPUT_SWITCH_MODE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x46\x41ILOVER_PREFER_PRIMARY\x10\x01\x12\n\n\x06MANUAL\x10\x03\"\xc0\x01\n\tLogConfig\x12M\n\x0clog_severity\x18\x01 \x01(\x0e\x32\x37.google.cloud.video.livestream.v1.LogConfig.LogSeverity\"d\n\x0bLogSeverity\x12\x1c\n\x18LOG_SEVERITY_UNSPECIFIED\x10\x00\x12\x07\n\x03OFF\x10\x01\x12\t\n\x05\x44\x45\x42UG\x10\x64\x12\t\n\x04INFO\x10\xc8\x01\x12\x0c\n\x07WARNING\x10\x90\x03\x12\n\n\x05\x45RROR\x10\xf4\x03\"O\n\x0fRetentionConfig\x12<\n\x19retention_window_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xea\x01\n\x13InputStreamProperty\x12\x37\n\x13last_establish_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12L\n\rvideo_streams\x18\x02 \x03(\x0b\x32\x35.google.cloud.video.livestream.v1.VideoStreamProperty\x12L\n\raudio_streams\x18\x03 \x03(\x0b\x32\x35.google.cloud.video.livestream.v1.AudioStreamProperty\"i\n\x13VideoStreamProperty\x12\r\n\x05index\x18\x01 \x01(\x05\x12\x43\n\x0cvideo_format\x18\x02 \x01(\x0b\x32-.google.cloud.video.livestream.v1.VideoFormat\"]\n\x0bVideoFormat\x12\r\n\x05\x63odec\x18\x01 \x01(\t\x12\x14\n\x0cwidth_pixels\x18\x02 \x01(\x05\x12\x15\n\rheight_pixels\x18\x03 \x01(\x05\x12\x12\n\nframe_rate\x18\x04 \x01(\x01\"i\n\x13\x41udioStreamProperty\x12\r\n\x05index\x18\x01 \x01(\x05\x12\x43\n\x0c\x61udio_format\x18\x02 \x01(\x0b\x32-.google.cloud.video.livestream.v1.AudioFormat\"K\n\x0b\x41udioFormat\x12\r\n\x05\x63odec\x18\x01 \x01(\t\x12\x15\n\rchannel_count\x18\x02 \x01(\x05\x12\x16\n\x0e\x63hannel_layout\x18\x03 \x03(\t\"\xdd\x01\n\x0fInputAttachment\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x33\n\x05input\x18\x02 \x01(\tB$\xfa\x41!\n\x1flivestream.googleapis.com/Input\x12_\n\x12\x61utomatic_failover\x18\x03 \x01(\x0b\x32\x43.google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover\x1a\'\n\x11\x41utomaticFailover\x12\x12\n\ninput_keys\x18\x01 \x03(\t\"\x99\x03\n\x17\x41utoTranscriptionConfig\x12\x64\n\x0e\x64isplay_timing\x18\x01 \x01(\x0e\x32G.google.cloud.video.livestream.v1.AutoTranscriptionConfig.DisplayTimingB\x03\xe0\x41\x01\x12\x64\n\x0equality_preset\x18\x02 \x01(\x0e\x32G.google.cloud.video.livestream.v1.AutoTranscriptionConfig.QualityPresetB\x03\xe0\x41\x01\"D\n\rDisplayTiming\x12\x1e\n\x1a\x44ISPLAY_TIMING_UNSPECIFIED\x10\x00\x12\t\n\x05\x41SYNC\x10\x01\x12\x08\n\x04SYNC\x10\x02\"l\n\rQualityPreset\x12\x1e\n\x1aQUALITY_PRESET_UNSPECIFIED\x10\x00\x12\x0f\n\x0bLOW_LATENCY\x10\x01\x12\x14\n\x10\x42\x41LANCED_QUALITY\x10\x02\x12\x14\n\x10IMPROVED_QUALITY\x10\x03\"\xc6\x0c\n\x05\x45vent\x12\x0c\n\x04name\x18\x01 \x01(\t\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\x33.google.cloud.video.livestream.v1.Event.LabelsEntry\x12O\n\x0cinput_switch\x18\x05 \x01(\x0b\x32\x37.google.cloud.video.livestream.v1.Event.InputSwitchTaskH\x00\x12G\n\x08\x61\x64_break\x18\x06 \x01(\x0b\x32\x33.google.cloud.video.livestream.v1.Event.AdBreakTaskH\x00\x12X\n\x11return_to_program\x18\r \x01(\x0b\x32;.google.cloud.video.livestream.v1.Event.ReturnToProgramTaskH\x00\x12\x42\n\x05slate\x18\x0e \x01(\x0b\x32\x31.google.cloud.video.livestream.v1.Event.SlateTaskH\x00\x12@\n\x04mute\x18\x0f \x01(\x0b\x32\x30.google.cloud.video.livestream.v1.Event.MuteTaskH\x00\x12\x44\n\x06unmute\x18\x10 \x01(\x0b\x32\x32.google.cloud.video.livestream.v1.Event.UnmuteTaskH\x00\x12[\n\x12update_encryptions\x18\x11 \x01(\x0b\x32=.google.cloud.video.livestream.v1.Event.UpdateEncryptionsTaskH\x00\x12\x13\n\x0b\x65xecute_now\x18\t \x01(\x08\x12\x32\n\x0e\x65xecution_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x41\n\x05state\x18\x0b \x01(\x0e\x32-.google.cloud.video.livestream.v1.Event.StateB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\x0c \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x1a$\n\x0fInputSwitchTask\x12\x11\n\tinput_key\x18\x01 \x01(\t\x1a:\n\x0b\x41\x64\x42reakTask\x12+\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x1am\n\tSlateTask\x12+\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x33\n\x05\x61sset\x18\x02 \x01(\tB$\xfa\x41!\n\x1flivestream.googleapis.com/Asset\x1a\x15\n\x13ReturnToProgramTask\x1a\x37\n\x08MuteTask\x12+\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x0c\n\nUnmuteTask\x1a\x65\n\x15UpdateEncryptionsTask\x12L\n\x0b\x65ncryptions\x18\x01 \x03(\x0b\x32\x32.google.cloud.video.livestream.v1.EncryptionUpdateB\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\"o\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSCHEDULED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0b\n\x07PENDING\x10\x05\x12\x0b\n\x07STOPPED\x10\x06:o\xea\x41l\n\x1flivestream.googleapis.com/Event\x12Iprojects/{project}/locations/{location}/channels/{channel}/events/{event}B\x06\n\x04task\"\x96\t\n\x04\x43lip\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_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\x06labels\x18\x05 \x03(\x0b\x32\x32.google.cloud.video.livestream.v1.Clip.LabelsEntry\x12@\n\x05state\x18\x06 \x01(\x0e\x32,.google.cloud.video.livestream.v1.Clip.StateB\x03\xe0\x41\x03\x12\x12\n\noutput_uri\x18\x07 \x01(\t\x12&\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12<\n\x06slices\x18\n \x03(\x0b\x32,.google.cloud.video.livestream.v1.Clip.Slice\x12P\n\x0e\x63lip_manifests\x18\x0c \x03(\x0b\x32\x33.google.cloud.video.livestream.v1.Clip.ClipManifestB\x03\xe0\x41\x02\x12K\n\x0boutput_type\x18\r \x01(\x0e\x32\x31.google.cloud.video.livestream.v1.Clip.OutputTypeB\x03\xe0\x41\x01\x1an\n\tTimeSlice\x12/\n\x0bmarkin_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cmarkout_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aW\n\x05Slice\x12\x46\n\ntime_slice\x18\x01 \x01(\x0b\x32\x30.google.cloud.video.livestream.v1.Clip.TimeSliceH\x00\x42\x06\n\x04kind\x1a\x42\n\x0c\x43lipManifest\x12\x19\n\x0cmanifest_key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\noutput_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"T\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\"@\n\nOutputType\x12\x1b\n\x17OUTPUT_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08MANIFEST\x10\x01\x12\x07\n\x03MP4\x10\x02:l\xea\x41i\n\x1elivestream.googleapis.com/Clip\x12Gprojects/{project}/locations/{location}/channels/{channel}/clips/{clip}\"v\n\x0cTimeInterval\x12\x33\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"\x8c\x08\n\nDvrSession\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\x12M\n\x06labels\x18\x04 \x03(\x0b\x32\x38.google.cloud.video.livestream.v1.DvrSession.LabelsEntryB\x03\xe0\x41\x01\x12\x46\n\x05state\x18\x05 \x01(\x0e\x32\x32.google.cloud.video.livestream.v1.DvrSession.StateB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\x06 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12T\n\rdvr_manifests\x18\x07 \x03(\x0b\x32\x38.google.cloud.video.livestream.v1.DvrSession.DvrManifestB\x03\xe0\x41\x02\x12P\n\x0b\x64vr_windows\x18\x08 \x03(\x0b\x32\x36.google.cloud.video.livestream.v1.DvrSession.DvrWindowB\x03\xe0\x41\x02\x1a\x41\n\x0b\x44vrManifest\x12\x19\n\x0cmanifest_key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\noutput_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a\\\n\tDvrWindow\x12G\n\rtime_interval\x18\x01 \x01(\x0b\x32..google.cloud.video.livestream.v1.TimeIntervalH\x00\x42\x06\n\x04kind\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xab\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08UPDATING\x10\x02\x12\r\n\tSCHEDULED\x10\x03\x12\x08\n\x04LIVE\x10\x04\x12\x0c\n\x08\x46INISHED\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\x0c\n\x08\x44\x45LETING\x10\x07\x12\x13\n\x0fPOST_PROCESSING\x10\x08\x12\x0c\n\x08\x43OOLDOWN\x10\t\x12\x0c\n\x08STOPPING\x10\n:\x99\x01\xea\x41\x95\x01\n$livestream.googleapis.com/DvrSession\x12Tprojects/{project}/locations/{location}/channels/{channel}/dvrSessions/{dvr_session}*\x0b\x64vrSessions2\ndvrSession\"\xed\x05\n\x05\x41sset\x12\x0c\n\x04name\x18\x01 \x01(\t\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\x33.google.cloud.video.livestream.v1.Asset.LabelsEntry\x12\x43\n\x05video\x18\x05 \x01(\x0b\x32\x32.google.cloud.video.livestream.v1.Asset.VideoAssetH\x00\x12\x43\n\x05image\x18\x06 \x01(\x0b\x32\x32.google.cloud.video.livestream.v1.Asset.ImageAssetH\x00\x12\x0e\n\x06\x63rc32c\x18\x07 \x01(\t\x12\x41\n\x05state\x18\x08 \x01(\x0e\x32-.google.cloud.video.livestream.v1.Asset.StateB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x1a\x19\n\nVideoAsset\x12\x0b\n\x03uri\x18\x01 \x01(\t\x1a\x19\n\nImageAsset\x12\x0b\n\x03uri\x18\x01 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\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\x0c\n\x08\x44\x45LETING\x10\x03\x12\t\n\x05\x45RROR\x10\x04:\\\xea\x41Y\n\x1flivestream.googleapis.com/Asset\x12\x36projects/{project}/locations/{location}/assets/{asset}B\n\n\x08resource\"\xb1\x08\n\nEncryption\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x65\n\x19secret_manager_key_source\x18\x07 \x01(\x0b\x32@.google.cloud.video.livestream.v1.Encryption.SecretManagerSourceH\x00\x12Q\n\x0b\x64rm_systems\x18\x03 \x01(\x0b\x32\x37.google.cloud.video.livestream.v1.Encryption.DrmSystemsB\x03\xe0\x41\x02\x12O\n\x06\x61\x65s128\x18\x04 \x01(\x0b\x32=.google.cloud.video.livestream.v1.Encryption.Aes128EncryptionH\x01\x12V\n\nsample_aes\x18\x05 \x01(\x0b\x32@.google.cloud.video.livestream.v1.Encryption.SampleAesEncryptionH\x01\x12V\n\tmpeg_cenc\x18\x06 \x01(\x0b\x32\x41.google.cloud.video.livestream.v1.Encryption.MpegCommonEncryptionH\x01\x1a\x61\n\x13SecretManagerSource\x12J\n\x0esecret_version\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x1a\n\n\x08Widevine\x1a\n\n\x08\x46\x61irplay\x1a\x0b\n\tPlayready\x1a\n\n\x08\x43learkey\x1a\xc6\x02\n\nDrmSystems\x12L\n\x08widevine\x18\x01 \x01(\x0b\x32\x35.google.cloud.video.livestream.v1.Encryption.WidevineB\x03\xe0\x41\x01\x12L\n\x08\x66\x61irplay\x18\x02 \x01(\x0b\x32\x35.google.cloud.video.livestream.v1.Encryption.FairplayB\x03\xe0\x41\x01\x12N\n\tplayready\x18\x03 \x01(\x0b\x32\x36.google.cloud.video.livestream.v1.Encryption.PlayreadyB\x03\xe0\x41\x01\x12L\n\x08\x63learkey\x18\x04 \x01(\x0b\x32\x35.google.cloud.video.livestream.v1.Encryption.ClearkeyB\x03\xe0\x41\x01\x1a\x12\n\x10\x41\x65s128Encryption\x1a\x15\n\x13SampleAesEncryption\x1a+\n\x14MpegCommonEncryption\x12\x13\n\x06scheme\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x0f\n\rsecret_sourceB\x11\n\x0f\x65ncryption_mode\"\x9b\x01\n\x10\x45ncryptionUpdate\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x65\n\x19secret_manager_key_source\x18\x02 \x01(\x0b\x32@.google.cloud.video.livestream.v1.Encryption.SecretManagerSourceH\x00\x42\x0f\n\rsecret_source\"\xea\x03\n\x04Pool\x12\x0c\n\x04name\x18\x01 \x01(\t\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\x42\n\x06labels\x18\x04 \x03(\x0b\x32\x32.google.cloud.video.livestream.v1.Pool.LabelsEntry\x12L\n\x0enetwork_config\x18\x05 \x01(\x0b\x32\x34.google.cloud.video.livestream.v1.Pool.NetworkConfig\x1aL\n\rNetworkConfig\x12;\n\x0epeered_network\x18\x01 \x01(\tB#\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:Y\xea\x41V\n\x1elivestream.googleapis.com/Pool\x12\x34projects/{project}/locations/{location}/pools/{pool}B\xeb\x01\n$com.google.cloud.video.livestream.v1B\x0eResourcesProtoP\x01ZDcloud.google.com/go/video/livestream/apiv1/livestreampb;livestreampb\xaa\x02 Google.Cloud.Video.LiveStream.V1\xca\x02 Google\\Cloud\\Video\\LiveStream\\V1\xea\x02$Google::Cloud::Video::LiveStream::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Video + module LiveStream + module V1 + Input = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Input").msgclass + Input::SecurityRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Input.SecurityRule").msgclass + Input::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Input.Type").enummodule + Input::Tier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Input.Tier").enummodule + Channel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Channel").msgclass + Channel::Output = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Channel.Output").msgclass + Channel::StreamingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Channel.StreamingState").enummodule + NormalizedCoordinate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.NormalizedCoordinate").msgclass + NormalizedResolution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.NormalizedResolution").msgclass + StaticOverlay = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.StaticOverlay").msgclass + InputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.InputConfig").msgclass + InputConfig::InputSwitchMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.InputConfig.InputSwitchMode").enummodule + LogConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.LogConfig").msgclass + LogConfig::LogSeverity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.LogConfig.LogSeverity").enummodule + RetentionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.RetentionConfig").msgclass + InputStreamProperty = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.InputStreamProperty").msgclass + VideoStreamProperty = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.VideoStreamProperty").msgclass + VideoFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.VideoFormat").msgclass + AudioStreamProperty = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.AudioStreamProperty").msgclass + AudioFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.AudioFormat").msgclass + InputAttachment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.InputAttachment").msgclass + InputAttachment::AutomaticFailover = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover").msgclass + AutoTranscriptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.AutoTranscriptionConfig").msgclass + AutoTranscriptionConfig::DisplayTiming = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.AutoTranscriptionConfig.DisplayTiming").enummodule + AutoTranscriptionConfig::QualityPreset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.AutoTranscriptionConfig.QualityPreset").enummodule + Event = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Event").msgclass + Event::InputSwitchTask = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Event.InputSwitchTask").msgclass + Event::AdBreakTask = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Event.AdBreakTask").msgclass + Event::SlateTask = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Event.SlateTask").msgclass + Event::ReturnToProgramTask = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Event.ReturnToProgramTask").msgclass + Event::MuteTask = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Event.MuteTask").msgclass + Event::UnmuteTask = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Event.UnmuteTask").msgclass + Event::UpdateEncryptionsTask = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Event.UpdateEncryptionsTask").msgclass + Event::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Event.State").enummodule + Clip = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Clip").msgclass + Clip::TimeSlice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Clip.TimeSlice").msgclass + Clip::Slice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Clip.Slice").msgclass + Clip::ClipManifest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Clip.ClipManifest").msgclass + Clip::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Clip.State").enummodule + Clip::OutputType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Clip.OutputType").enummodule + TimeInterval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.TimeInterval").msgclass + DvrSession = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.DvrSession").msgclass + DvrSession::DvrManifest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.DvrSession.DvrManifest").msgclass + DvrSession::DvrWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.DvrSession.DvrWindow").msgclass + DvrSession::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.DvrSession.State").enummodule + Asset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Asset").msgclass + Asset::VideoAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Asset.VideoAsset").msgclass + Asset::ImageAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Asset.ImageAsset").msgclass + Asset::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Asset.State").enummodule + Encryption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Encryption").msgclass + Encryption::SecretManagerSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Encryption.SecretManagerSource").msgclass + Encryption::Widevine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Encryption.Widevine").msgclass + Encryption::Fairplay = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Encryption.Fairplay").msgclass + Encryption::Playready = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Encryption.Playready").msgclass + Encryption::Clearkey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Encryption.Clearkey").msgclass + Encryption::DrmSystems = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Encryption.DrmSystems").msgclass + Encryption::Aes128Encryption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Encryption.Aes128Encryption").msgclass + Encryption::SampleAesEncryption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Encryption.SampleAesEncryption").msgclass + Encryption::MpegCommonEncryption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption").msgclass + EncryptionUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.EncryptionUpdate").msgclass + Pool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Pool").msgclass + Pool::NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Pool.NetworkConfig").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/service_pb.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/service_pb.rb new file mode 100644 index 000000000000..ce89bdaa2ec1 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/service_pb.rb @@ -0,0 +1,76 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/video/livestream/v1/service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/cloud/video/livestream/v1/resources_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/video/livestream/v1/service.proto\x12 google.cloud.video.livestream.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/video/livestream/v1/resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb5\x01\n\x12\x43reateAssetRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1flivestream.googleapis.com/Asset\x12;\n\x05\x61sset\x18\x02 \x01(\x0b\x32\'.google.cloud.video.livestream.v1.AssetB\x03\xe0\x41\x02\x12\x15\n\x08\x61sset_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"_\n\x12\x44\x65leteAssetRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1flivestream.googleapis.com/Asset\x12\x12\n\nrequest_id\x18\x02 \x01(\t\"\x95\x01\n\x11ListAssetsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1flivestream.googleapis.com/Asset\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\x12ListAssetsResponse\x12\x37\n\x06\x61ssets\x18\x01 \x03(\x0b\x32\'.google.cloud.video.livestream.v1.Asset\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"H\n\x0fGetAssetRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1flivestream.googleapis.com/Asset\"\xbf\x01\n\x14\x43reateChannelRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!livestream.googleapis.com/Channel\x12?\n\x07\x63hannel\x18\x02 \x01(\x0b\x32).google.cloud.video.livestream.v1.ChannelB\x03\xe0\x41\x02\x12\x17\n\nchannel_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"\x99\x01\n\x13ListChannelsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!livestream.googleapis.com/Channel\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\"\x81\x01\n\x14ListChannelsResponse\x12;\n\x08\x63hannels\x18\x01 \x03(\x0b\x32).google.cloud.video.livestream.v1.Channel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"L\n\x11GetChannelRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!livestream.googleapis.com/Channel\"r\n\x14\x44\x65leteChannelRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!livestream.googleapis.com/Channel\x12\x12\n\nrequest_id\x18\x02 \x01(\t\x12\r\n\x05\x66orce\x18\x03 \x01(\x08\"\x9c\x01\n\x14UpdateChannelRequest\x12/\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12?\n\x07\x63hannel\x18\x02 \x01(\x0b\x32).google.cloud.video.livestream.v1.ChannelB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x03 \x01(\t\"b\n\x13StartChannelRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!livestream.googleapis.com/Channel\x12\x12\n\nrequest_id\x18\x02 \x01(\t\"a\n\x12StopChannelRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!livestream.googleapis.com/Channel\x12\x12\n\nrequest_id\x18\x02 \x01(\t\"\x94\x01\n\x18StartDistributionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!livestream.googleapis.com/Channel\x12\x1e\n\x11\x64istribution_keys\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x93\x01\n\x17StopDistributionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!livestream.googleapis.com/Channel\x12\x1e\n\x11\x64istribution_keys\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb5\x01\n\x12\x43reateInputRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1flivestream.googleapis.com/Input\x12;\n\x05input\x18\x02 \x01(\x0b\x32\'.google.cloud.video.livestream.v1.InputB\x03\xe0\x41\x02\x12\x15\n\x08input_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"\x95\x01\n\x11ListInputsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1flivestream.googleapis.com/Input\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\x12ListInputsResponse\x12\x37\n\x06inputs\x18\x01 \x03(\x0b\x32\'.google.cloud.video.livestream.v1.Input\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"H\n\x0fGetInputRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1flivestream.googleapis.com/Input\"_\n\x12\x44\x65leteInputRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1flivestream.googleapis.com/Input\x12\x12\n\nrequest_id\x18\x02 \x01(\t\"\x96\x01\n\x12UpdateInputRequest\x12/\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12;\n\x05input\x18\x02 \x01(\x0b\x32\'.google.cloud.video.livestream.v1.InputB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x03 \x01(\t\"\xb5\x01\n\x12\x43reateEventRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1flivestream.googleapis.com/Event\x12;\n\x05\x65vent\x18\x02 \x01(\x0b\x32\'.google.cloud.video.livestream.v1.EventB\x03\xe0\x41\x02\x12\x15\n\x08\x65vent_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"\x95\x01\n\x11ListEventsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1flivestream.googleapis.com/Event\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\x12ListEventsResponse\x12\x37\n\x06\x65vents\x18\x01 \x03(\x0b\x32\'.google.cloud.video.livestream.v1.Event\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"H\n\x0fGetEventRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1flivestream.googleapis.com/Event\"_\n\x12\x44\x65leteEventRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1flivestream.googleapis.com/Event\x12\x12\n\nrequest_id\x18\x02 \x01(\t\"\x1a\n\x18\x43hannelOperationResponse\"\x93\x01\n\x10ListClipsRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1elivestream.googleapis.com/Clip\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\"x\n\x11ListClipsResponse\x12\x35\n\x05\x63lips\x18\x01 \x03(\x0b\x32&.google.cloud.video.livestream.v1.Clip\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"F\n\x0eGetClipRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elivestream.googleapis.com/Clip\"\xb5\x01\n\x11\x43reateClipRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1elivestream.googleapis.com/Clip\x12\x14\n\x07\x63lip_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x04\x63lip\x18\x03 \x01(\x0b\x32&.google.cloud.video.livestream.v1.ClipB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"j\n\x11\x44\x65leteClipRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elivestream.googleapis.com/Clip\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb3\x01\n\x16ListDvrSessionsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$livestream.googleapis.com/DvrSession\x12\x16\n\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\x17ListDvrSessionsResponse\x12\x42\n\x0c\x64vr_sessions\x18\x01 \x03(\x0b\x32,.google.cloud.video.livestream.v1.DvrSession\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"R\n\x14GetDvrSessionRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$livestream.googleapis.com/DvrSession\"\xdd\x01\n\x17\x43reateDvrSessionRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$livestream.googleapis.com/DvrSession\x12\x1b\n\x0e\x64vr_session_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x46\n\x0b\x64vr_session\x18\x03 \x01(\x0b\x32,.google.cloud.video.livestream.v1.DvrSessionB\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\"v\n\x17\x44\x65leteDvrSessionRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$livestream.googleapis.com/DvrSession\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb8\x01\n\x17UpdateDvrSessionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x46\n\x0b\x64vr_session\x18\x02 \x01(\x0b\x32,.google.cloud.video.livestream.v1.DvrSessionB\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\"\xe3\x01\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#\n\x16requested_cancellation\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x06 \x01(\tB\x03\xe0\x41\x03\"F\n\x0eGetPoolRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elivestream.googleapis.com/Pool\"\x93\x01\n\x11UpdatePoolRequest\x12/\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x39\n\x04pool\x18\x02 \x01(\x0b\x32&.google.cloud.video.livestream.v1.PoolB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x03 \x01(\t\"L\n\x13PreviewInputRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1flivestream.googleapis.com/Input\"9\n\x14PreviewInputResponse\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x14\n\x0c\x62\x65\x61rer_token\x18\x02 \x01(\t2\xb8\x37\n\x11LivestreamService\x12\xe0\x01\n\rCreateChannel\x12\x36.google.cloud.video.livestream.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\xbc\x01\n\x0cListChannels\x12\x35.google.cloud.video.livestream.v1.ListChannelsRequest\x1a\x36.google.cloud.video.livestream.v1.ListChannelsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/channels\x12\xa9\x01\n\nGetChannel\x12\x33.google.cloud.video.livestream.v1.GetChannelRequest\x1a).google.cloud.video.livestream.v1.Channel\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/channels/*}\x12\xd0\x01\n\rDeleteChannel\x12\x36.google.cloud.video.livestream.v1.DeleteChannelRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/channels/*}\x12\xe2\x01\n\rUpdateChannel\x12\x36.google.cloud.video.livestream.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\xda\x01\n\x0cStartChannel\x12\x35.google.cloud.video.livestream.v1.StartChannelRequest\x1a\x1d.google.longrunning.Operation\"t\xca\x41-\n\x18\x43hannelOperationResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\"2/v1/{name=projects/*/locations/*/channels/*}:start:\x01*\x12\xd7\x01\n\x0bStopChannel\x12\x34.google.cloud.video.livestream.v1.StopChannelRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41-\n\x18\x43hannelOperationResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/locations/*/channels/*}:stop:\x01*\x12\x83\x02\n\x11StartDistribution\x12:.google.cloud.video.livestream.v1.StartDistributionRequest\x1a\x1d.google.longrunning.Operation\"\x92\x01\xca\x41-\n\x18\x43hannelOperationResponse\x12\x11OperationMetadata\xda\x41\x16name,distribution_keys\x82\xd3\xe4\x93\x02\x43\">/v1/{name=projects/*/locations/*/channels/*}:startdistribution:\x01*\x12\x80\x02\n\x10StopDistribution\x12\x39.google.cloud.video.livestream.v1.StopDistributionRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41-\n\x18\x43hannelOperationResponse\x12\x11OperationMetadata\xda\x41\x16name,distribution_keys\x82\xd3\xe4\x93\x02\x42\"=/v1/{name=projects/*/locations/*/channels/*}:stopdistribution:\x01*\x12\xd2\x01\n\x0b\x43reateInput\x12\x34.google.cloud.video.livestream.v1.CreateInputRequest\x1a\x1d.google.longrunning.Operation\"n\xca\x41\x1a\n\x05Input\x12\x11OperationMetadata\xda\x41\x15parent,input,input_id\x82\xd3\xe4\x93\x02\x33\"*/v1/{parent=projects/*/locations/*}/inputs:\x05input\x12\xb4\x01\n\nListInputs\x12\x33.google.cloud.video.livestream.v1.ListInputsRequest\x1a\x34.google.cloud.video.livestream.v1.ListInputsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/inputs\x12\xa1\x01\n\x08GetInput\x12\x31.google.cloud.video.livestream.v1.GetInputRequest\x1a\'.google.cloud.video.livestream.v1.Input\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/inputs/*}\x12\xca\x01\n\x0b\x44\x65leteInput\x12\x34.google.cloud.video.livestream.v1.DeleteInputRequest\x1a\x1d.google.longrunning.Operation\"f\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/inputs/*}\x12\xd4\x01\n\x0bUpdateInput\x12\x34.google.cloud.video.livestream.v1.UpdateInputRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41\x1a\n\x05Input\x12\x11OperationMetadata\xda\x41\x11input,update_mask\x82\xd3\xe4\x93\x02\x39\x32\x30/v1/{input.name=projects/*/locations/*/inputs/*}:\x05input\x12\xc3\x01\n\x0cPreviewInput\x12\x35.google.cloud.video.livestream.v1.PreviewInputRequest\x1a\x36.google.cloud.video.livestream.v1.PreviewInputResponse\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\"2/v1/{name=projects/*/locations/*/inputs/*}:preview:\x01*\x12\xca\x01\n\x0b\x43reateEvent\x12\x34.google.cloud.video.livestream.v1.CreateEventRequest\x1a\'.google.cloud.video.livestream.v1.Event\"\\\xda\x41\x15parent,event,event_id\x82\xd3\xe4\x93\x02>\"5/v1/{parent=projects/*/locations/*/channels/*}/events:\x05\x65vent\x12\xbf\x01\n\nListEvents\x12\x33.google.cloud.video.livestream.v1.ListEventsRequest\x1a\x34.google.cloud.video.livestream.v1.ListEventsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*/channels/*}/events\x12\xac\x01\n\x08GetEvent\x12\x31.google.cloud.video.livestream.v1.GetEventRequest\x1a\'.google.cloud.video.livestream.v1.Event\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/channels/*/events/*}\x12\xa1\x01\n\x0b\x44\x65leteEvent\x12\x34.google.cloud.video.livestream.v1.DeleteEventRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/channels/*/events/*}\x12\xbb\x01\n\tListClips\x12\x32.google.cloud.video.livestream.v1.ListClipsRequest\x1a\x33.google.cloud.video.livestream.v1.ListClipsResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*/channels/*}/clips\x12\xa8\x01\n\x07GetClip\x12\x30.google.cloud.video.livestream.v1.GetClipRequest\x1a&.google.cloud.video.livestream.v1.Clip\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/channels/*/clips/*}\x12\xd6\x01\n\nCreateClip\x12\x33.google.cloud.video.livestream.v1.CreateClipRequest\x1a\x1d.google.longrunning.Operation\"t\xca\x41\x19\n\x04\x43lip\x12\x11OperationMetadata\xda\x41\x13parent,clip,clip_id\x82\xd3\xe4\x93\x02<\"4/v1/{parent=projects/*/locations/*/channels/*}/clips:\x04\x63lip\x12\xd2\x01\n\nDeleteClip\x12\x33.google.cloud.video.livestream.v1.DeleteClipRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36*4/v1/{name=projects/*/locations/*/channels/*/clips/*}\x12\x84\x02\n\x10\x43reateDvrSession\x12\x39.google.cloud.video.livestream.v1.CreateDvrSessionRequest\x1a\x1d.google.longrunning.Operation\"\x95\x01\xca\x41\x1f\n\nDvrSession\x12\x11OperationMetadata\xda\x41!parent,dvr_session,dvr_session_id\x82\xd3\xe4\x93\x02I\":/v1/{parent=projects/*/locations/*/channels/*}/dvrSessions:\x0b\x64vr_session\x12\xd3\x01\n\x0fListDvrSessions\x12\x38.google.cloud.video.livestream.v1.ListDvrSessionsRequest\x1a\x39.google.cloud.video.livestream.v1.ListDvrSessionsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/channels/*}/dvrSessions\x12\xc0\x01\n\rGetDvrSession\x12\x36.google.cloud.video.livestream.v1.GetDvrSessionRequest\x1a,.google.cloud.video.livestream.v1.DvrSession\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/channels/*/dvrSessions/*}\x12\xe4\x01\n\x10\x44\x65leteDvrSession\x12\x39.google.cloud.video.livestream.v1.DeleteDvrSessionRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/channels/*/dvrSessions/*}\x12\x86\x02\n\x10UpdateDvrSession\x12\x39.google.cloud.video.livestream.v1.UpdateDvrSessionRequest\x1a\x1d.google.longrunning.Operation\"\x97\x01\xca\x41\x1f\n\nDvrSession\x12\x11OperationMetadata\xda\x41\x17\x64vr_session,update_mask\x82\xd3\xe4\x93\x02U2F/v1/{dvr_session.name=projects/*/locations/*/channels/*/dvrSessions/*}:\x0b\x64vr_session\x12\xd2\x01\n\x0b\x43reateAsset\x12\x34.google.cloud.video.livestream.v1.CreateAssetRequest\x1a\x1d.google.longrunning.Operation\"n\xca\x41\x1a\n\x05\x41sset\x12\x11OperationMetadata\xda\x41\x15parent,asset,asset_id\x82\xd3\xe4\x93\x02\x33\"*/v1/{parent=projects/*/locations/*}/assets:\x05\x61sset\x12\xca\x01\n\x0b\x44\x65leteAsset\x12\x34.google.cloud.video.livestream.v1.DeleteAssetRequest\x1a\x1d.google.longrunning.Operation\"f\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/assets/*}\x12\xa1\x01\n\x08GetAsset\x12\x31.google.cloud.video.livestream.v1.GetAssetRequest\x1a\'.google.cloud.video.livestream.v1.Asset\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/assets/*}\x12\xb4\x01\n\nListAssets\x12\x33.google.cloud.video.livestream.v1.ListAssetsRequest\x1a\x34.google.cloud.video.livestream.v1.ListAssetsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/assets\x12\x9d\x01\n\x07GetPool\x12\x30.google.cloud.video.livestream.v1.GetPoolRequest\x1a&.google.cloud.video.livestream.v1.Pool\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+\x12)/v1/{name=projects/*/locations/*/pools/*}\x12\xcd\x01\n\nUpdatePool\x12\x33.google.cloud.video.livestream.v1.UpdatePoolRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41\x19\n\x04Pool\x12\x11OperationMetadata\xda\x41\x10pool,update_mask\x82\xd3\xe4\x93\x02\x36\x32./v1/{pool.name=projects/*/locations/*/pools/*}:\x04pool\x1aM\xca\x41\x19livestream.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa1\x03\n$com.google.cloud.video.livestream.v1B\x0cServiceProtoP\x01ZDcloud.google.com/go/video/livestream/apiv1/livestreampb;livestreampb\xaa\x02 Google.Cloud.Video.LiveStream.V1\xca\x02 Google\\Cloud\\Video\\LiveStream\\V1\xea\x02$Google::Cloud::Video::LiveStream::V1\xea\x41\x64\n*secretmanager.googleapis.com/SecretVersion\x12\x36projects/{project}/secrets/{secret}/versions/{version}\xea\x41N\n\x1e\x63ompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Video + module LiveStream + module V1 + CreateAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.CreateAssetRequest").msgclass + DeleteAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.DeleteAssetRequest").msgclass + ListAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ListAssetsRequest").msgclass + ListAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ListAssetsResponse").msgclass + GetAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.GetAssetRequest").msgclass + CreateChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.CreateChannelRequest").msgclass + ListChannelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ListChannelsRequest").msgclass + ListChannelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ListChannelsResponse").msgclass + GetChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.GetChannelRequest").msgclass + DeleteChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.DeleteChannelRequest").msgclass + UpdateChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.UpdateChannelRequest").msgclass + StartChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.StartChannelRequest").msgclass + StopChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.StopChannelRequest").msgclass + StartDistributionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.StartDistributionRequest").msgclass + StopDistributionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.StopDistributionRequest").msgclass + CreateInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.CreateInputRequest").msgclass + ListInputsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ListInputsRequest").msgclass + ListInputsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ListInputsResponse").msgclass + GetInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.GetInputRequest").msgclass + DeleteInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.DeleteInputRequest").msgclass + UpdateInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.UpdateInputRequest").msgclass + CreateEventRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.CreateEventRequest").msgclass + ListEventsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ListEventsRequest").msgclass + ListEventsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ListEventsResponse").msgclass + GetEventRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.GetEventRequest").msgclass + DeleteEventRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.DeleteEventRequest").msgclass + ChannelOperationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ChannelOperationResponse").msgclass + ListClipsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ListClipsRequest").msgclass + ListClipsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ListClipsResponse").msgclass + GetClipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.GetClipRequest").msgclass + CreateClipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.CreateClipRequest").msgclass + DeleteClipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.DeleteClipRequest").msgclass + ListDvrSessionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ListDvrSessionsRequest").msgclass + ListDvrSessionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ListDvrSessionsResponse").msgclass + GetDvrSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.GetDvrSessionRequest").msgclass + CreateDvrSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.CreateDvrSessionRequest").msgclass + DeleteDvrSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.DeleteDvrSessionRequest").msgclass + UpdateDvrSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.UpdateDvrSessionRequest").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.OperationMetadata").msgclass + GetPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.GetPoolRequest").msgclass + UpdatePoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.UpdatePoolRequest").msgclass + PreviewInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.PreviewInputRequest").msgclass + PreviewInputResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.PreviewInputResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/service_services_pb.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/service_services_pb.rb new file mode 100644 index 000000000000..23027c3880c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/service_services_pb.rb @@ -0,0 +1,123 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/video/livestream/v1/service.proto for package 'Google.Cloud.Video.LiveStream.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/video/livestream/v1/service_pb' + +module Google + module Cloud + module Video + module LiveStream + module V1 + module LivestreamService + # Using Live Stream API, you can generate live streams in the various + # renditions and streaming formats. The streaming format include HTTP Live + # Streaming (HLS) and Dynamic Adaptive Streaming over HTTP (DASH). You can send + # a source stream in the various ways, including Real-Time Messaging + # Protocol (RTMP) and Secure Reliable Transport (SRT). + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.video.livestream.v1.LivestreamService' + + # Creates a channel with the provided unique ID in the specified + # region. + rpc :CreateChannel, ::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest, ::Google::Longrunning::Operation + # Returns a list of all channels in the specified region. + rpc :ListChannels, ::Google::Cloud::Video::LiveStream::V1::ListChannelsRequest, ::Google::Cloud::Video::LiveStream::V1::ListChannelsResponse + # Returns the specified channel. + rpc :GetChannel, ::Google::Cloud::Video::LiveStream::V1::GetChannelRequest, ::Google::Cloud::Video::LiveStream::V1::Channel + # Deletes the specified channel. + rpc :DeleteChannel, ::Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest, ::Google::Longrunning::Operation + # Updates the specified channel. + rpc :UpdateChannel, ::Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest, ::Google::Longrunning::Operation + # Starts the specified channel. Part of the video pipeline will be created + # only when the StartChannel request is received by the server. + rpc :StartChannel, ::Google::Cloud::Video::LiveStream::V1::StartChannelRequest, ::Google::Longrunning::Operation + # Stops the specified channel. Part of the video pipeline will be released + # when the StopChannel request is received by the server. + rpc :StopChannel, ::Google::Cloud::Video::LiveStream::V1::StopChannelRequest, ::Google::Longrunning::Operation + # Starts distribution which delivers outputs to the destination indicated by + # the Distribution configuration. + rpc :StartDistribution, ::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest, ::Google::Longrunning::Operation + # Stops the specified distribution. + rpc :StopDistribution, ::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest, ::Google::Longrunning::Operation + # Creates an input with the provided unique ID in the specified region. + rpc :CreateInput, ::Google::Cloud::Video::LiveStream::V1::CreateInputRequest, ::Google::Longrunning::Operation + # Returns a list of all inputs in the specified region. + rpc :ListInputs, ::Google::Cloud::Video::LiveStream::V1::ListInputsRequest, ::Google::Cloud::Video::LiveStream::V1::ListInputsResponse + # Returns the specified input. + rpc :GetInput, ::Google::Cloud::Video::LiveStream::V1::GetInputRequest, ::Google::Cloud::Video::LiveStream::V1::Input + # Deletes the specified input. + rpc :DeleteInput, ::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest, ::Google::Longrunning::Operation + # Updates the specified input. + rpc :UpdateInput, ::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest, ::Google::Longrunning::Operation + # Preview the streaming content of the specified input. + rpc :PreviewInput, ::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest, ::Google::Cloud::Video::LiveStream::V1::PreviewInputResponse + # Creates an event with the provided unique ID in the specified channel. + rpc :CreateEvent, ::Google::Cloud::Video::LiveStream::V1::CreateEventRequest, ::Google::Cloud::Video::LiveStream::V1::Event + # Returns a list of all events in the specified channel. + rpc :ListEvents, ::Google::Cloud::Video::LiveStream::V1::ListEventsRequest, ::Google::Cloud::Video::LiveStream::V1::ListEventsResponse + # Returns the specified event. + rpc :GetEvent, ::Google::Cloud::Video::LiveStream::V1::GetEventRequest, ::Google::Cloud::Video::LiveStream::V1::Event + # Deletes the specified event. + rpc :DeleteEvent, ::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest, ::Google::Protobuf::Empty + # Returns a list of all clips in the specified channel. + rpc :ListClips, ::Google::Cloud::Video::LiveStream::V1::ListClipsRequest, ::Google::Cloud::Video::LiveStream::V1::ListClipsResponse + # Returns the specified clip. + rpc :GetClip, ::Google::Cloud::Video::LiveStream::V1::GetClipRequest, ::Google::Cloud::Video::LiveStream::V1::Clip + # Creates a clip with the provided clip ID in the specified channel. + rpc :CreateClip, ::Google::Cloud::Video::LiveStream::V1::CreateClipRequest, ::Google::Longrunning::Operation + # Deletes the specified clip job resource. This method only deletes the clip + # job and does not delete the VOD clip stored in Cloud Storage. + rpc :DeleteClip, ::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest, ::Google::Longrunning::Operation + # Creates a DVR session with the provided unique ID in the specified channel. + rpc :CreateDvrSession, ::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest, ::Google::Longrunning::Operation + # Returns a list of all DVR sessions in the specified channel. + rpc :ListDvrSessions, ::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest, ::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsResponse + # Returns the specified DVR session. + rpc :GetDvrSession, ::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest, ::Google::Cloud::Video::LiveStream::V1::DvrSession + # Deletes the specified DVR session. + rpc :DeleteDvrSession, ::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest, ::Google::Longrunning::Operation + # Updates the specified DVR session. + rpc :UpdateDvrSession, ::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest, ::Google::Longrunning::Operation + # Creates a Asset with the provided unique ID in the specified + # region. + rpc :CreateAsset, ::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest, ::Google::Longrunning::Operation + # Deletes the specified asset if it is not used. + rpc :DeleteAsset, ::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest, ::Google::Longrunning::Operation + # Returns the specified asset. + rpc :GetAsset, ::Google::Cloud::Video::LiveStream::V1::GetAssetRequest, ::Google::Cloud::Video::LiveStream::V1::Asset + # Returns a list of all assets in the specified region. + rpc :ListAssets, ::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest, ::Google::Cloud::Video::LiveStream::V1::ListAssetsResponse + # Returns the specified pool. + rpc :GetPool, ::Google::Cloud::Video::LiveStream::V1::GetPoolRequest, ::Google::Cloud::Video::LiveStream::V1::Pool + # Updates the specified pool. + rpc :UpdatePool, ::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/README.md new file mode 100644 index 000000000000..10dc79685a07 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Live Stream 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-video-live_stream-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # 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. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + # + # Example: + # + # 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 + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # 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 + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # 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 + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/proto_docs/google/cloud/video/livestream/v1/outputs.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/cloud/video/livestream/v1/outputs.rb new file mode 100644 index 000000000000..2da5118a4897 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/cloud/video/livestream/v1/outputs.rb @@ -0,0 +1,788 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Video + module LiveStream + module V1 + # Encoding of an input element such as an audio, video, or text track. + # Elementary streams must be packaged before mapping and sharing between + # different output formats. + # @!attribute [rw] key + # @return [::String] + # A unique key for this elementary stream. The key must be 1-63 + # characters in length. The key must begin and end with a letter (regardless + # of case) or a number, but can contain dashes or underscores in between. + # @!attribute [rw] video_stream + # @return [::Google::Cloud::Video::LiveStream::V1::VideoStream] + # Encoding of a video stream. + # + # Note: The following fields are mutually exclusive: `video_stream`, `audio_stream`, `text_stream`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] audio_stream + # @return [::Google::Cloud::Video::LiveStream::V1::AudioStream] + # Encoding of an audio stream. + # + # Note: The following fields are mutually exclusive: `audio_stream`, `video_stream`, `text_stream`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_stream + # @return [::Google::Cloud::Video::LiveStream::V1::TextStream] + # Encoding of a text stream. For example, closed captions or subtitles. + # + # Note: The following fields are mutually exclusive: `text_stream`, `video_stream`, `audio_stream`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ElementaryStream + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Multiplexing settings for output stream. + # @!attribute [rw] key + # @return [::String] + # A unique key for this multiplexed stream. The key must be 1-63 + # characters in length. The key must begin and end with a letter (regardless + # of case) or a number, but can contain dashes or underscores in between. + # @!attribute [rw] container + # @return [::String] + # The container format. The default is `fmp4`. + # + # Supported container formats: + # + # - `fmp4` - the corresponding file extension is `.m4s` + # - `ts` - the corresponding file extension is `.ts` + # @!attribute [rw] elementary_streams + # @return [::Array<::String>] + # List of `ElementaryStream` + # {::Google::Cloud::Video::LiveStream::V1::ElementaryStream#key key}s multiplexed + # in this stream. + # + # - For `fmp4` container, must contain either one video or one audio stream. + # - For `ts` container, must contain exactly one audio stream and up to one + # video stream. + # @!attribute [rw] segment_settings + # @return [::Google::Cloud::Video::LiveStream::V1::SegmentSettings] + # Segment settings for `fmp4` and `ts`. + # @!attribute [rw] encryption_id + # @return [::String] + # Identifier of the encryption configuration to use. If omitted, output + # will be unencrypted. + class MuxStream + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Manifest configuration. + # @!attribute [rw] file_name + # @return [::String] + # The name of the generated file. The default is `manifest` with the + # extension suffix corresponding to the `Manifest` + # {::Google::Cloud::Video::LiveStream::V1::Manifest#type type}. If multiple + # manifests are added to the channel, each must have a unique file name. + # @!attribute [rw] type + # @return [::Google::Cloud::Video::LiveStream::V1::Manifest::ManifestType] + # Required. Type of the manifest, can be `HLS` or `DASH`. + # @!attribute [rw] mux_streams + # @return [::Array<::String>] + # Required. List of `MuxStream` + # {::Google::Cloud::Video::LiveStream::V1::MuxStream#key key}s that should appear + # in this manifest. + # + # - For HLS, either `fmp4` or `ts` mux streams can be specified but not + # mixed. + # - For DASH, only `fmp4` mux streams can be specified. + # @!attribute [rw] max_segment_count + # @return [::Integer] + # Maximum number of segments that this manifest holds. Once the manifest + # reaches this maximum number of segments, whenever a new segment is added to + # the manifest, the oldest segment will be removed from the manifest. + # The minimum value is 3 and the default value is 5. + # @!attribute [rw] segment_keep_duration + # @return [::Google::Protobuf::Duration] + # How long to keep a segment on the output Google Cloud Storage bucket after + # it is removed from the manifest. This field should be large enough to cover + # the manifest propagation delay. Otherwise, a player could receive 404 + # errors while accessing segments which are listed in the manifest that the + # player has, but were already deleted from the output Google Cloud Storage + # bucket. Default value is `60s`. + # + # If both segment_keep_duration and + # {::Google::Cloud::Video::LiveStream::V1::RetentionConfig#retention_window_duration RetentionConfig.retention_window_duration} + # are set, + # {::Google::Cloud::Video::LiveStream::V1::RetentionConfig#retention_window_duration RetentionConfig.retention_window_duration} + # is used and segment_keep_duration is ignored. + # @!attribute [rw] use_timecode_as_timeline + # @return [::Boolean] + # Whether to use the timecode, as specified in timecode config, when setting: + # + # - `availabilityStartTime` attribute in DASH manifests. + # - `#EXT-X-PROGRAM-DATE-TIME` tag in HLS manifests. + # + # If false, ignore the input timecode and use the time from system clock + # when the manifest is first generated. This is the default behavior. + # @!attribute [rw] key + # @return [::String] + # Optional. A unique key for this manifest. + class Manifest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The manifest type can be either `HLS` or `DASH`. + module ManifestType + # The manifest type is not specified. + MANIFEST_TYPE_UNSPECIFIED = 0 + + # Create an `HLS` manifest. The corresponding file extension is `.m3u8`. + HLS = 1 + + # Create a `DASH` manifest. The corresponding file extension is `.mpd`. + DASH = 2 + end + end + + # Multiplexing settings for output streams used in + # {::Google::Cloud::Video::LiveStream::V1::Distribution Distribution}. + # @!attribute [rw] key + # @return [::String] + # Required. A unique key for this distribution stream. The key must be 1-63 + # characters in length. The key must begin and end with a letter (regardless + # of case) or a number, but can contain dashes or underscores in between. + # @!attribute [rw] container + # @return [::String] + # Required. The container format. + # + # Supported container formats: + # + # - `ts`, must contain exactly one audio stream and up to one video stream. + # - `flv`, must contain at most one audio stream and at most one video + # stream. + # @!attribute [rw] elementary_streams + # @return [::Array<::String>] + # Required. List of `ElementaryStream` + # {::Google::Cloud::Video::LiveStream::V1::ElementaryStream#key key}s multiplexed + # in this stream. Must contain at least one audio stream and up to one video + # stream. + class DistributionStream + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Distribution configuration. + # @!attribute [rw] key + # @return [::String] + # Required. A unique key for this distribution. The key must be 1-63 + # characters in length. The key must begin and end with a letter (regardless + # of case) or a number, but can contain dashes or underscores in between. + # @!attribute [rw] distribution_stream + # @return [::String] + # Required. `DistributionStream` + # {::Google::Cloud::Video::LiveStream::V1::DistributionStream#key key}s that should + # appear in this distribution output. + # + # - For SRT protocol, only `ts` distribution streams can be specified. + # - For RTMP protocol, only `flv` distribution streams can be specified. + # @!attribute [r] state + # @return [::Google::Cloud::Video::LiveStream::V1::Distribution::State] + # Output only. State of the distribution. + # @!attribute [r] error + # @return [::Google::Rpc::Status] + # Output only. Only present when the `state` is `ERROR`. The reason for the + # error state of the distribution. + # @!attribute [rw] srt_push + # @return [::Google::Cloud::Video::LiveStream::V1::SrtPushOutputEndpoint] + # Output endpoint using SRT_PUSH. + # + # Note: The following fields are mutually exclusive: `srt_push`, `rtmp_push`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] rtmp_push + # @return [::Google::Cloud::Video::LiveStream::V1::RtmpPushOutputEndpoint] + # Output endpoint using RTMP_PUSH. + # + # Note: The following fields are mutually exclusive: `rtmp_push`, `srt_push`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Distribution + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # State of this distribution. + module State + # State is not specified. + STATE_UNSPECIFIED = 0 + + # Distribution has trouble to produce or deliver the output. + ERROR = 5 + + # Distribution is not ready to be started. + NOT_READY = 6 + + # Distribution is ready to be started. + READY = 7 + + # Distribution is already started and is waiting for input. + AWAITING_INPUT = 8 + + # Distribution is already started and is generating output. + DISTRIBUTING = 9 + end + end + + # Configurations for an output endpoint using SRT_PUSH as the streaming + # protocol. + # @!attribute [rw] uri + # @return [::String] + # Required. The full URI of the remote SRT server. + # @!attribute [rw] passphrase_secret_version + # @return [::String] + # The name of the Secret Version containing the SRT encryption passphrase, + # which is stored in Google Secret Manager. It should be in the format of + # `projects/{project}/secrets/{secret_id}/versions/{version_number}`. + class SrtPushOutputEndpoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configurations for an output endpoint using RTMP_PUSH as the streaming + # protocol. + # @!attribute [rw] uri + # @return [::String] + # Required. The full URI of the remote RTMP server. For example: + # `rtmp://192.168.123.321/live/my-stream` or `rtmp://somedomain.com/someapp`. + # @!attribute [rw] stream_key + # @return [::String] + # Required. Stream key for RTMP protocol. + class RtmpPushOutputEndpoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Sprite sheet configuration. + # @!attribute [rw] format + # @return [::String] + # Format type. The default is `jpeg`. + # + # Supported formats: + # + # - `jpeg` + # @!attribute [rw] file_prefix + # @return [::String] + # Required. File name prefix for the generated sprite sheets. If multiple + # sprite sheets are added to the channel, each must have a unique file + # prefix. + # Each sprite sheet has an incremental 10-digit zero-padded suffix starting + # from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. + # @!attribute [rw] sprite_width_pixels + # @return [::Integer] + # Required. The width of the sprite in pixels. Must be an even integer. + # @!attribute [rw] sprite_height_pixels + # @return [::Integer] + # Required. The height of the sprite in pixels. Must be an even integer. + # @!attribute [rw] column_count + # @return [::Integer] + # The maximum number of sprites per row in a sprite sheet. Valid range is + # [1, 10] and the default value is 1. + # @!attribute [rw] row_count + # @return [::Integer] + # The maximum number of rows per sprite sheet. When the sprite sheet is full, + # a new sprite sheet is created. Valid range is [1, 10] and the default value + # is 1. + # @!attribute [rw] interval + # @return [::Google::Protobuf::Duration] + # Create sprites at regular intervals. Valid range is [1 second, 1 hour] and + # the default value is `10s`. + # @!attribute [rw] quality + # @return [::Integer] + # The quality of the generated sprite sheet. Enter a value between 1 + # and 100, where 1 is the lowest quality and 100 is the highest quality. + # The default is 100. A high quality value corresponds to a low image data + # compression ratio. + class SpriteSheet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Preprocessing configurations. + # @!attribute [rw] audio + # @return [::Google::Cloud::Video::LiveStream::V1::PreprocessingConfig::Audio] + # Audio preprocessing configuration. + # @!attribute [rw] crop + # @return [::Google::Cloud::Video::LiveStream::V1::PreprocessingConfig::Crop] + # Specify the video cropping configuration. + # @!attribute [rw] pad + # @return [::Google::Cloud::Video::LiveStream::V1::PreprocessingConfig::Pad] + # Specify the video pad filter configuration. + class PreprocessingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Audio preprocessing configuration. + # @!attribute [rw] lufs + # @return [::Float] + # Specify audio loudness normalization in loudness units relative to full + # scale (LUFS). Enter a value between -24 and 0 according to the following: + # + # - -24 is the Advanced Television Systems Committee (ATSC A/85) + # - -23 is the EU R128 broadcast standard + # - -19 is the prior standard for online mono audio + # - -18 is the ReplayGain standard + # - -16 is the prior standard for stereo audio + # - -14 is the new online audio standard recommended by Spotify, as well as + # Amazon Echo + # - 0 disables normalization. The default is 0. + class Audio + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video cropping configuration for the input video. The cropped input video + # is scaled to match the output resolution. + # @!attribute [rw] top_pixels + # @return [::Integer] + # The number of pixels to crop from the top. The default is 0. + # @!attribute [rw] bottom_pixels + # @return [::Integer] + # The number of pixels to crop from the bottom. The default is 0. + # @!attribute [rw] left_pixels + # @return [::Integer] + # The number of pixels to crop from the left. The default is 0. + # @!attribute [rw] right_pixels + # @return [::Integer] + # The number of pixels to crop from the right. The default is 0. + class Crop + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Pad filter configuration for the input video. The padded input video + # is scaled after padding with black to match the output resolution. + # @!attribute [rw] top_pixels + # @return [::Integer] + # The number of pixels to add to the top. The default is 0. + # @!attribute [rw] bottom_pixels + # @return [::Integer] + # The number of pixels to add to the bottom. The default is 0. + # @!attribute [rw] left_pixels + # @return [::Integer] + # The number of pixels to add to the left. The default is 0. + # @!attribute [rw] right_pixels + # @return [::Integer] + # The number of pixels to add to the right. The default is 0. + class Pad + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Video stream resource. + # @!attribute [rw] h264 + # @return [::Google::Cloud::Video::LiveStream::V1::VideoStream::H264CodecSettings] + # H264 codec settings. + # + # Note: The following fields are mutually exclusive: `h264`, `h265`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] h265 + # @return [::Google::Cloud::Video::LiveStream::V1::VideoStream::H265CodecSettings] + # H265 codec settings. + # + # Note: The following fields are mutually exclusive: `h265`, `h264`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class VideoStream + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # H264 codec settings. + # @!attribute [rw] width_pixels + # @return [::Integer] + # Required. The width of the video in pixels. Must be an even integer. + # Valid range is [320, 4096]. + # @!attribute [rw] height_pixels + # @return [::Integer] + # Required. The height of the video in pixels. Must be an even integer. + # Valid range is [180, 2160]. + # @!attribute [rw] frame_rate + # @return [::Float] + # Required. The target video frame rate in frames per second (FPS). Must be + # less than or equal to 60. Will default to the input frame rate if larger + # than the input frame rate. The API will generate an output FPS that is + # divisible by the input FPS, and smaller or equal to the target FPS. See + # [Calculating frame + # rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + # more information. + # @!attribute [rw] bitrate_bps + # @return [::Integer] + # Required. The video bitrate in bits per second. Minimum value is 10,000. + # + # - For SD resolution (< 720p), must be <= 3,000,000 (3 Mbps). + # - For HD resolution (<= 1080p), must be <= 15,000,000 (15 Mbps). + # - For UHD resolution (<= 2160p), must be <= 25,000,000 (25 Mbps). + # @!attribute [rw] allow_open_gop + # @return [::Boolean] + # Specifies whether an open Group of Pictures (GOP) structure should be + # allowed or not. The default is `false`. + # @!attribute [rw] gop_frame_count + # @return [::Integer] + # Select the GOP size based on the specified frame count. + # If GOP frame count is set instead of GOP duration, GOP duration will be + # calculated by `gopFrameCount`/`frameRate`. The calculated GOP duration + # must satisfy the limitations on `gopDuration` as well. + # Valid range is [60, 600]. + # + # Note: The following fields are mutually exclusive: `gop_frame_count`, `gop_duration`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gop_duration + # @return [::Google::Protobuf::Duration] + # Select the GOP size based on the specified duration. The default is + # `2s`. Note that `gopDuration` must be less than or equal to + # {::Google::Cloud::Video::LiveStream::V1::SegmentSettings#segment_duration segment_duration}, + # and + # {::Google::Cloud::Video::LiveStream::V1::SegmentSettings#segment_duration segment_duration} + # must be divisible by `gopDuration`. Valid range is [2s, 20s]. + # + # All video streams in the same channel must have the same GOP size. + # + # Note: The following fields are mutually exclusive: `gop_duration`, `gop_frame_count`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] vbv_size_bits + # @return [::Integer] + # Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + # greater than zero. The default is equal to + # {::Google::Cloud::Video::LiveStream::V1::VideoStream::H264CodecSettings#bitrate_bps bitrate_bps}. + # @!attribute [rw] vbv_fullness_bits + # @return [::Integer] + # Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + # Must be greater than zero. The default is equal to 90% of + # {::Google::Cloud::Video::LiveStream::V1::VideoStream::H264CodecSettings#vbv_size_bits vbv_size_bits}. + # @!attribute [rw] entropy_coder + # @return [::String] + # The entropy coder to use. The default is `cabac`. + # + # Supported entropy coders: + # + # - `cavlc` + # - `cabac` + # @!attribute [rw] b_pyramid + # @return [::Boolean] + # Allow B-pyramid for reference frame selection. This may not be supported + # on all decoders. The default is `false`. + # @!attribute [rw] b_frame_count + # @return [::Integer] + # The number of consecutive B-frames. Must be greater than or equal to + # zero. Must be less than + # {::Google::Cloud::Video::LiveStream::V1::VideoStream::H264CodecSettings#gop_frame_count gop_frame_count} + # if set. The default is 0. + # @!attribute [rw] aq_strength + # @return [::Float] + # Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + # and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + # higher value equals a lower bitrate but smoother image. The default is 0. + # @!attribute [rw] profile + # @return [::String] + # Enforces the specified codec profile. The following profiles are + # supported: + # + # * `baseline` + # * `main` (default) + # * `high` + # + # The available options are [FFmpeg-compatible Profile + # Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Profile). + # Note that certain values for this field may cause the + # transcoder to override other fields you set in the + # {::Google::Cloud::Video::LiveStream::V1::VideoStream::H264CodecSettings H264CodecSettings} + # message. + # @!attribute [rw] tune + # @return [::String] + # Enforces the specified codec tune. The available options are + # [FFmpeg-compatible Encode + # Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune) + # Note that certain values for this field may cause the transcoder to + # override other fields you set in the + # {::Google::Cloud::Video::LiveStream::V1::VideoStream::H264CodecSettings H264CodecSettings} + # message. + class H264CodecSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # H265 codec settings. + # @!attribute [rw] width_pixels + # @return [::Integer] + # Optional. The width of the video in pixels. Must be an even integer. + # When not specified, the width is adjusted to match the specified height + # and input aspect ratio. If both are omitted, the input width is used. + # Valid range is [320, 4096]. + # @!attribute [rw] height_pixels + # @return [::Integer] + # Optional. The height of the video in pixels. Must be an even integer. + # When not specified, the height is adjusted to match the specified width + # and input aspect ratio. If both are omitted, the input height is used. + # Valid range is [180, 2160]. + # @!attribute [rw] frame_rate + # @return [::Float] + # Required. The target video frame rate in frames per second (FPS). Must be + # less than or equal to 120. Will default to the input frame rate if larger + # than the input frame rate. The API will generate an output FPS that is + # divisible by the input FPS, and smaller or equal to the target FPS. See + # [Calculating frame + # rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + # more information. + # @!attribute [rw] bitrate_bps + # @return [::Integer] + # Required. The video bitrate in bits per second. Minimum value is 10,000. + # + # - For SD resolution (< 720p), must be <= 3,000,000 (3 Mbps). + # - For HD resolution (<= 1080p), must be <= 15,000,000 (15 Mbps). + # - For UHD resolution (<= 2160p), must be <= 25,000,000 (25 Mbps). + # @!attribute [rw] gop_frame_count + # @return [::Integer] + # Optional. Select the GOP size based on the specified frame count. + # If GOP frame count is set instead of GOP duration, GOP duration will be + # calculated by `gopFrameCount`/`frameRate`. The calculated GOP duration + # must satisfy the limitations on `gopDuration` as well. + # Valid range is [60, 600]. + # + # Note: The following fields are mutually exclusive: `gop_frame_count`, `gop_duration`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gop_duration + # @return [::Google::Protobuf::Duration] + # Optional. Select the GOP size based on the specified duration. The + # default is `2s`. Note that `gopDuration` must be less than or equal to + # {::Google::Cloud::Video::LiveStream::V1::SegmentSettings#segment_duration segment_duration}, + # and + # {::Google::Cloud::Video::LiveStream::V1::SegmentSettings#segment_duration segment_duration} + # must be divisible by `gopDuration`. Valid range is [2s, 20s]. + # + # All video streams in the same channel must have the same GOP size. + # + # Note: The following fields are mutually exclusive: `gop_duration`, `gop_frame_count`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] vbv_size_bits + # @return [::Integer] + # Optional. Size of the Video Buffering Verifier (VBV) buffer in bits. Must + # be greater than zero. The default is equal to + # {::Google::Cloud::Video::LiveStream::V1::VideoStream::H265CodecSettings#bitrate_bps bitrate_bps}. + # @!attribute [rw] vbv_fullness_bits + # @return [::Integer] + # Optional. Initial fullness of the Video Buffering Verifier (VBV) buffer + # in bits. Must be greater than zero. The default is equal to 90% of + # {::Google::Cloud::Video::LiveStream::V1::VideoStream::H265CodecSettings#vbv_size_bits vbv_size_bits}. + # @!attribute [rw] b_pyramid + # @return [::Boolean] + # Optional. Allow B-pyramid for reference frame selection. This may not be + # supported on all decoders. The default is `false`. + # @!attribute [rw] b_frame_count + # @return [::Integer] + # Optional. The number of consecutive B-frames. Must be greater than or + # equal to zero. Must be less than + # {::Google::Cloud::Video::LiveStream::V1::VideoStream::H265CodecSettings#gop_frame_count gop_frame_count} + # if set. The default is 0. + # @!attribute [rw] aq_strength + # @return [::Float] + # Optional. Specify the intensity of the adaptive quantizer (AQ). Must be + # between 0 and 1, where 0 disables the quantizer and 1 maximizes the + # quantizer. A higher value equals a lower bitrate but smoother image. The + # default is 0. + class H265CodecSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Audio stream resource. + # @!attribute [rw] transmux + # @return [::Boolean] + # Specifies whether pass through (transmuxing) is enabled or not. + # If set to `true`, the rest of the settings, other than `mapping`, will be + # ignored. The default is `false`. + # @!attribute [rw] codec + # @return [::String] + # The codec for this audio stream. The default is `aac`. + # + # Supported audio codecs: + # + # - `aac` + # @!attribute [rw] bitrate_bps + # @return [::Integer] + # Required. Audio bitrate in bits per second. Must be between 1 and + # 10,000,000. + # @!attribute [rw] channel_count + # @return [::Integer] + # Number of audio channels. Must be between 1 and 6. The default is 2. + # @!attribute [rw] channel_layout + # @return [::Array<::String>] + # A list of channel names specifying layout of the audio channels. + # This only affects the metadata embedded in the container headers, if + # supported by the specified format. The default is `[fl, fr]`. + # + # Supported channel names: + # + # - `fl` - Front left channel + # - `fr` - Front right channel + # - `sl` - Side left channel + # - `sr` - Side right channel + # - `fc` - Front center channel + # - `lfe` - Low frequency + # @!attribute [rw] mapping + # @return [::Array<::Google::Cloud::Video::LiveStream::V1::AudioStream::AudioMapping>] + # The mapping for the input streams and audio channels. + # @!attribute [rw] sample_rate_hertz + # @return [::Integer] + # The audio sample rate in Hertz. The default is 48000 Hertz. + class AudioStream + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The mapping for the input streams and audio channels. + # @!attribute [rw] input_key + # @return [::String] + # Required. The `Channel` + # {::Google::Cloud::Video::LiveStream::V1::InputAttachment#key InputAttachment.key} + # that identifies the input that this audio mapping applies to. If an + # active input doesn't have an audio mapping, the primary audio track in + # the input stream will be selected. + # @!attribute [rw] input_track + # @return [::Integer] + # Required. The zero-based index of the track in the input stream. + # All {::Google::Cloud::Video::LiveStream::V1::AudioStream#mapping mapping}s in + # the same {::Google::Cloud::Video::LiveStream::V1::AudioStream AudioStream} must + # have the same input track. + # @!attribute [rw] input_channel + # @return [::Integer] + # Required. The zero-based index of the channel in the input stream. + # @!attribute [rw] output_channel + # @return [::Integer] + # Required. The zero-based index of the channel in the output audio stream. + # Must be consistent with the + # {::Google::Cloud::Video::LiveStream::V1::AudioStream::AudioMapping#input_channel input_channel}. + # @!attribute [rw] gain_db + # @return [::Float] + # Audio volume control in dB. Negative values decrease volume, + # positive values increase. The default is 0. + class AudioMapping + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Encoding of a text stream. For example, closed captions or subtitles. + # @!attribute [rw] codec + # @return [::String] + # Required. The codec for this text stream. + # + # Supported text codecs: + # + # - `cea608` + # - `cea708` + # - `webvtt` + # @!attribute [rw] language_code + # @return [::String] + # Optional. The BCP-47 language code, such as `en-US` or `sr-Latn`. For more + # information, see + # https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + # @!attribute [rw] display_name + # @return [::String] + # Optional. The name for this particular text stream that will be added to + # the HLS/DASH manifest. + # @!attribute [rw] output_cea_channel + # @return [::String] + # Optional. The channel of the closed caption in the output stream. + # This field should only be set when textstream is used for partner + # distribution. + # Must be one of `CC1`, `CC2`, `CC3`, and `CC4`, if the + # {::Google::Cloud::Video::LiveStream::V1::TextStream#codec codec} is `cea608`; + # Must be one between `SERVICE1` and `SERVICE63`, if the + # {::Google::Cloud::Video::LiveStream::V1::TextStream#codec codec} is `cea708`. + # @!attribute [rw] mapping + # @return [::Array<::Google::Cloud::Video::LiveStream::V1::TextStream::TextMapping>] + # Optional. The mapping for the input streams and text tracks. + class TextStream + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The mapping for the input streams and text tracks. + # @!attribute [rw] input_key + # @return [::String] + # Optional. The `Channel` + # {::Google::Cloud::Video::LiveStream::V1::InputAttachment#key InputAttachment.key} + # that identifies the input that this text mapping applies to. + # @!attribute [rw] input_track + # @return [::Integer] + # Optional. The zero-based index of the track in the input stream. + # @!attribute [rw] input_cea_channel + # @return [::String] + # Optional. The channel of the closed caption in the input stream. + # If this field is set, the output + # {::Google::Cloud::Video::LiveStream::V1::TextStream#codec codec} must be + # `webvtt`. Must be one of `CC1`, `CC2`, `CC3`, and `CC4`, if the codec of + # the input closed caption is `cea608`; Must be one between `SERVICE1` and + # `SERVICE64`, if the codec of the input closed caption is `cea708`. + # @!attribute [rw] from_language_code + # @return [::String] + # Optional. The BCP-47 source language code, such as `en-US` or `sr-Latn`. + # If differ from the textStream's language code, enable translation. For + # more information on BCP-47 language codes, see + # https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + class TextMapping + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Segment settings for `fmp4` and `ts`. + # @!attribute [rw] segment_duration + # @return [::Google::Protobuf::Duration] + # Duration of the segments in seconds. The default is `6s`. Note that + # `segmentDuration` must be greater than or equal to + # {::Google::Cloud::Video::LiveStream::V1::VideoStream::H264CodecSettings#gop_duration gop_duration}, + # and `segmentDuration` must be divisible by + # {::Google::Cloud::Video::LiveStream::V1::VideoStream::H264CodecSettings#gop_duration gop_duration}. + # Valid range is [2s, 20s]. + # + # All {::Google::Cloud::Video::LiveStream::V1::Manifest#mux_streams mux_streams} in + # the same manifest must have the same segment duration. + class SegmentSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Timecode configuration. + # @!attribute [rw] source + # @return [::Google::Cloud::Video::LiveStream::V1::TimecodeConfig::TimecodeSource] + # The source of the timecode that will later be used in outputs/manifests. + # It determines the initial timecode/timestamp (first frame) of output + # streams. + # @!attribute [rw] utc_offset + # @return [::Google::Protobuf::Duration] + # UTC offset. Must be whole seconds, between -18 hours and +18 hours. + # + # 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 e.g. "America/Los_Angeles". + # + # 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 TimecodeConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The source of timecode. + module TimecodeSource + # The timecode source is not specified. + TIMECODE_SOURCE_UNSPECIFIED = 0 + + # Use input media timestamp. + MEDIA_TIMESTAMP = 1 + + # Use input embedded timecode e.g. picture timing SEI message. + EMBEDDED_TIMECODE = 2 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/cloud/video/livestream/v1/resources.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/cloud/video/livestream/v1/resources.rb new file mode 100644 index 000000000000..5d4f8a305dd4 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/cloud/video/livestream/v1/resources.rb @@ -0,0 +1,1294 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Video + module LiveStream + module V1 + # Input resource represents the endpoint from which the channel ingests + # the input stream. + # @!attribute [rw] name + # @return [::String] + # The resource name of the input, in the form of: + # `projects/{project}/locations/{location}/inputs/{inputId}`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The update time. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # User-defined key/value metadata. + # @!attribute [rw] type + # @return [::Google::Cloud::Video::LiveStream::V1::Input::Type] + # Source type. + # @!attribute [rw] tier + # @return [::Google::Cloud::Video::LiveStream::V1::Input::Tier] + # Tier defines the maximum input specification that is accepted by the + # video pipeline. The billing is charged based on the tier specified here. + # See [Pricing](https://cloud.google.com/livestream/pricing) for more detail. + # The default is `HD`. + # @!attribute [r] uri + # @return [::String] + # Output only. URI to push the input stream to. + # Its format depends on the input + # {::Google::Cloud::Video::LiveStream::V1::Input#type type}, for example: + # + # * `RTMP_PUSH`: `rtmp://1.2.3.4/live/{STREAM-ID}` + # * `SRT_PUSH`: `srt://1.2.3.4:4201?streamid={STREAM-ID}` + # @!attribute [rw] preprocessing_config + # @return [::Google::Cloud::Video::LiveStream::V1::PreprocessingConfig] + # Preprocessing configurations. + # @!attribute [rw] security_rules + # @return [::Google::Cloud::Video::LiveStream::V1::Input::SecurityRule] + # Security rule for access control. + # @!attribute [r] input_stream_property + # @return [::Google::Cloud::Video::LiveStream::V1::InputStreamProperty] + # Output only. The information for the input stream. This field will be + # present only when this input receives the input stream. + class Input + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Security rules for access control. Each field represents one security rule. + # Only when the source of the input stream satisfies all the fields, this + # input stream can be accepted. + # @!attribute [rw] ip_ranges + # @return [::Array<::String>] + # At least one ip range must match unless none specified. The IP range is + # defined by CIDR block: for example, `192.0.1.0/24` for a range and + # `192.0.1.0/32` for a single IP address. + class SecurityRule + 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 type of the input. + module Type + # Input type is not specified. + TYPE_UNSPECIFIED = 0 + + # Input will take an rtmp input stream. + RTMP_PUSH = 1 + + # Input will take an srt (Secure Reliable Transport) input stream. + SRT_PUSH = 2 + end + + # Tier of the input specification. + module Tier + # Tier is not specified. + TIER_UNSPECIFIED = 0 + + # Resolution < 1280x720. Bitrate <= 6 Mbps. FPS <= 60. + SD = 1 + + # Resolution <= 1920x1080. Bitrate <= 25 Mbps. FPS <= 60. + HD = 2 + + # Resolution <= 4096x2160. Bitrate <= 50 Mbps. FPS <= 60. + UHD = 3 + + # Resolution <= 1280x720. Bitrate <= 6 Mbps. FPS <= 60. H265 codec. + SD_H265 = 4 + + # Resolution <= 1920x1080. Bitrate <= 25 Mbps. FPS <= 60. H265 codec. + HD_H265 = 5 + + # Resolution <= 4096x2160. Bitrate <= 50 Mbps. FPS <= 60. H265 codec. + UHD_H265 = 6 + end + end + + # Channel resource represents the processor that does a user-defined + # "streaming" operation, which includes getting an input stream through an + # input, transcoding it to multiple renditions, and publishing output live + # streams in certain formats (for example, HLS or DASH) to the specified + # location. + # @!attribute [rw] name + # @return [::String] + # The resource name of the channel, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The update time. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # User-defined key/value metadata. + # @!attribute [rw] input_attachments + # @return [::Array<::Google::Cloud::Video::LiveStream::V1::InputAttachment>] + # A list of input attachments that this channel uses. + # One channel can have multiple inputs as the input sources. Only one + # input can be selected as the input source at one time. + # @!attribute [r] active_input + # @return [::String] + # Output only. The + # {::Google::Cloud::Video::LiveStream::V1::InputAttachment#key InputAttachment.key} + # that serves as the current input source. The first input in the + # {::Google::Cloud::Video::LiveStream::V1::Channel#input_attachments input_attachments} + # is the initial input source. + # @!attribute [rw] output + # @return [::Google::Cloud::Video::LiveStream::V1::Channel::Output] + # Required. Information about the output (that is, the Cloud Storage bucket + # to store the generated live stream). + # @!attribute [rw] elementary_streams + # @return [::Array<::Google::Cloud::Video::LiveStream::V1::ElementaryStream>] + # List of elementary streams. + # @!attribute [rw] mux_streams + # @return [::Array<::Google::Cloud::Video::LiveStream::V1::MuxStream>] + # List of multiplexing settings for output streams. + # @!attribute [rw] manifests + # @return [::Array<::Google::Cloud::Video::LiveStream::V1::Manifest>] + # List of output manifests. + # @!attribute [rw] distribution_streams + # @return [::Array<::Google::Cloud::Video::LiveStream::V1::DistributionStream>] + # Optional. List of multiplexing settings of streams for distributions. + # @!attribute [rw] distributions + # @return [::Array<::Google::Cloud::Video::LiveStream::V1::Distribution>] + # Optional. List of distributions. + # @!attribute [rw] sprite_sheets + # @return [::Array<::Google::Cloud::Video::LiveStream::V1::SpriteSheet>] + # List of output sprite sheets. + # @!attribute [r] streaming_state + # @return [::Google::Cloud::Video::LiveStream::V1::Channel::StreamingState] + # Output only. State of the streaming operation. + # @!attribute [r] streaming_error + # @return [::Google::Rpc::Status] + # Output only. A description of the reason for the streaming error. This + # property is always present when + # {::Google::Cloud::Video::LiveStream::V1::Channel#streaming_state streaming_state} + # is + # {::Google::Cloud::Video::LiveStream::V1::Channel::StreamingState::STREAMING_ERROR STREAMING_ERROR}. + # @!attribute [rw] log_config + # @return [::Google::Cloud::Video::LiveStream::V1::LogConfig] + # Configuration of platform logs for this channel. + # @!attribute [rw] timecode_config + # @return [::Google::Cloud::Video::LiveStream::V1::TimecodeConfig] + # Configuration of timecode for this channel. + # @!attribute [rw] encryptions + # @return [::Array<::Google::Cloud::Video::LiveStream::V1::Encryption>] + # Optional. Encryption configurations for this channel. Each configuration + # has an ID which is referred to by each MuxStream to indicate which + # configuration is used for that output. + # @!attribute [rw] input_config + # @return [::Google::Cloud::Video::LiveStream::V1::InputConfig] + # The configuration for input sources defined in + # {::Google::Cloud::Video::LiveStream::V1::Channel#input_attachments input_attachments}. + # @!attribute [rw] retention_config + # @return [::Google::Cloud::Video::LiveStream::V1::RetentionConfig] + # Optional. Configuration for retention of output files for this channel. + # @!attribute [rw] static_overlays + # @return [::Array<::Google::Cloud::Video::LiveStream::V1::StaticOverlay>] + # Optional. List of static overlay images. Those images display over the + # output content for the whole duration of the live stream. + # @!attribute [rw] auto_transcription_config + # @return [::Google::Cloud::Video::LiveStream::V1::AutoTranscriptionConfig] + # Optional. Advanced configurations for auto-generated text streams. + class Channel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Location of output file(s) in a Google Cloud Storage bucket. + # @!attribute [rw] uri + # @return [::String] + # URI for the output file(s). For example, `gs://my-bucket/outputs/`. + class Output + 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 of streaming operation that the channel is running. + module StreamingState + # Streaming state is not specified. + STREAMING_STATE_UNSPECIFIED = 0 + + # Channel is getting the input stream, generating the live streams to the + # specified output location. + STREAMING = 1 + + # Channel is waiting for the input stream through the input. + AWAITING_INPUT = 2 + + # Channel is running, but has trouble publishing the live streams onto the + # specified output location (for example, the specified Cloud Storage + # bucket is not writable). + STREAMING_ERROR = 4 + + # Channel is generating live streams with no input stream. Live streams are + # filled out with black screen, while input stream is missing. + # Not supported yet. + STREAMING_NO_INPUT = 5 + + # Channel is stopped, finishing live streams. + STOPPED = 6 + + # Channel is starting. + STARTING = 7 + + # Channel is stopping. + STOPPING = 8 + end + end + + # 2D normalized coordinates. + # @!attribute [rw] x + # @return [::Float] + # Optional. Normalized x coordinate. Valid range is [0.0, 1.0]. Default is 0. + # @!attribute [rw] y + # @return [::Float] + # Optional. Normalized y coordinate. Valid range is [0.0, 1.0]. Default is 0. + class NormalizedCoordinate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Normalized resolution. + # @!attribute [rw] w + # @return [::Float] + # Optional. Normalized width. Valid range is [0.0, 1.0]. Default is 0. + # @!attribute [rw] h + # @return [::Float] + # Optional. Normalized height. Valid range is [0.0, 1.0]. Default is 0. + class NormalizedResolution + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for the static overlay. + # @!attribute [rw] asset + # @return [::String] + # Required. Asset to use for the overlaid image. + # The asset must be represented in the form of: + # `projects/{project}/locations/{location}/assets/{assetId}`. + # The asset's resource type must be image. + # @!attribute [rw] resolution + # @return [::Google::Cloud::Video::LiveStream::V1::NormalizedResolution] + # Optional. Normalized image resolution, based on output video resolution. + # Valid values are [0.0, 1.0]. To respect the original image aspect ratio, + # set either `w` or `h` to 0. To use the original image resolution, set both + # `w` and `h` to 0. The default is \\{0, 0}. + # @!attribute [rw] position + # @return [::Google::Cloud::Video::LiveStream::V1::NormalizedCoordinate] + # Optional. Position of the image in terms of normalized coordinates of the + # upper-left corner of the image, based on output video resolution. For + # example, use the x and y coordinates \\{0, 0} to position the top-left corner + # of the overlay animation in the top-left corner of the output video. + # @!attribute [rw] opacity + # @return [::Float] + # Optional. Target image opacity. Valid values are from `1.0` (solid, + # default) to `0.0` (transparent), exclusive. Set this to a value greater + # than `0.0`. + class StaticOverlay + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for the input sources of a channel. + # @!attribute [rw] input_switch_mode + # @return [::Google::Cloud::Video::LiveStream::V1::InputConfig::InputSwitchMode] + # Input switch mode. Default mode is `FAILOVER_PREFER_PRIMARY`. + class InputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Input switch mode. + module InputSwitchMode + # The input switch mode is not specified. + INPUT_SWITCH_MODE_UNSPECIFIED = 0 + + # Automatic failover is enabled. The primary input stream is always + # preferred over its backup input streams configured using the + # {::Google::Cloud::Video::LiveStream::V1::InputAttachment::AutomaticFailover AutomaticFailover} + # field. + FAILOVER_PREFER_PRIMARY = 1 + + # Automatic failover is disabled. You must use the + # {::Google::Cloud::Video::LiveStream::V1::Event#input_switch inputSwitch} event + # to switch the active input source for the channel to stream from. When + # this mode is chosen, the + # {::Google::Cloud::Video::LiveStream::V1::InputAttachment::AutomaticFailover AutomaticFailover} + # field is ignored. + MANUAL = 3 + end + end + + # Configuration of platform logs. + # See [Using and managing platform + # logs](https://cloud.google.com/logging/docs/api/platform-logs#managing-logs) + # for more information about how to view platform logs through Cloud Logging. + # @!attribute [rw] log_severity + # @return [::Google::Cloud::Video::LiveStream::V1::LogConfig::LogSeverity] + # The severity level of platform logging for this resource. + class LogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The severity level of platform logging for this channel. Logs with a + # severity level higher than or equal to the chosen severity level will be + # logged and can be viewed through Cloud Logging. + # The severity level of a log is ranked as followed from low to high: DEBUG < + # INFO < NOTICE < WARNING < ERROR < CRITICAL < ALERT < EMERGENCY. + # See + # [LogSeverity](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#logseverity) + # for more information. + module LogSeverity + # Log severity is not specified. This is the same as log severity is OFF. + LOG_SEVERITY_UNSPECIFIED = 0 + + # Log is turned off. + OFF = 1 + + # Log with severity higher than or equal to DEBUG are logged. + DEBUG = 100 + + # Logs with severity higher than or equal to INFO are logged. + INFO = 200 + + # Logs with severity higher than or equal to WARNING are logged. + WARNING = 400 + + # Logs with severity higher than or equal to ERROR are logged. + ERROR = 500 + end + end + + # Configuration for retention of output files. + # @!attribute [rw] retention_window_duration + # @return [::Google::Protobuf::Duration] + # The minimum duration for which the output files from the channel will + # remain in the output bucket. After this duration, output files are + # deleted asynchronously. + # + # When the channel is deleted, all output files are deleted from the output + # bucket asynchronously. + # + # If omitted or set to zero, output files will remain in the output bucket + # based on + # {::Google::Cloud::Video::LiveStream::V1::Manifest#segment_keep_duration Manifest.segment_keep_duration}, + # which defaults to 60s. + # + # If both retention_window_duration and + # {::Google::Cloud::Video::LiveStream::V1::Manifest#segment_keep_duration Manifest.segment_keep_duration} + # are set, retention_window_duration is used and + # {::Google::Cloud::Video::LiveStream::V1::Manifest#segment_keep_duration Manifest.segment_keep_duration} + # is ignored. + class RetentionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Properties of the input stream. + # @!attribute [rw] last_establish_time + # @return [::Google::Protobuf::Timestamp] + # The time that the current input stream is accepted and the connection is + # established. + # @!attribute [rw] video_streams + # @return [::Array<::Google::Cloud::Video::LiveStream::V1::VideoStreamProperty>] + # Properties of the video streams. + # @!attribute [rw] audio_streams + # @return [::Array<::Google::Cloud::Video::LiveStream::V1::AudioStreamProperty>] + # Properties of the audio streams. + class InputStreamProperty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Properties of the video stream. + # @!attribute [rw] index + # @return [::Integer] + # Index of this video stream. + # @!attribute [rw] video_format + # @return [::Google::Cloud::Video::LiveStream::V1::VideoFormat] + # Properties of the video format. + class VideoStreamProperty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Properties of the video format. + # @!attribute [rw] codec + # @return [::String] + # Video codec used in this video stream. + # @!attribute [rw] width_pixels + # @return [::Integer] + # The width of the video stream in pixels. + # @!attribute [rw] height_pixels + # @return [::Integer] + # The height of the video stream in pixels. + # @!attribute [rw] frame_rate + # @return [::Float] + # The frame rate of the input video stream. + class VideoFormat + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Properties of the audio stream. + # @!attribute [rw] index + # @return [::Integer] + # Index of this audio stream. + # @!attribute [rw] audio_format + # @return [::Google::Cloud::Video::LiveStream::V1::AudioFormat] + # Properties of the audio format. + class AudioStreamProperty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Properties of the audio format. + # @!attribute [rw] codec + # @return [::String] + # Audio codec used in this audio stream. + # @!attribute [rw] channel_count + # @return [::Integer] + # The number of audio channels. + # @!attribute [rw] channel_layout + # @return [::Array<::String>] + # A list of channel names specifying the layout of the audio channels. + class AudioFormat + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A group of information for attaching an input resource to this channel. + # @!attribute [rw] key + # @return [::String] + # A unique key for this input attachment. The key must be 1-63 + # characters in length. The key must begin and end with a letter (regardless + # of case) or a number, but can contain dashes or underscores in between. + # @!attribute [rw] input + # @return [::String] + # The resource name of an existing input, in the form of: + # `projects/{project}/locations/{location}/inputs/{inputId}`. + # @!attribute [rw] automatic_failover + # @return [::Google::Cloud::Video::LiveStream::V1::InputAttachment::AutomaticFailover] + # Automatic failover configurations. + class InputAttachment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configurations to follow when automatic failover happens. + # @!attribute [rw] input_keys + # @return [::Array<::String>] + # The + # {::Google::Cloud::Video::LiveStream::V1::InputAttachment#key InputAttachment.key}s + # of inputs to failover to when this input is disconnected. Currently, only + # up to one backup input is supported. + class AutomaticFailover + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Advanced configurations for auto-generated text streams. + # @!attribute [rw] display_timing + # @return [::Google::Cloud::Video::LiveStream::V1::AutoTranscriptionConfig::DisplayTiming] + # Optional. Whether auto-generated text streams are displayed synchronously + # or asynchronously with the original audio. + # @!attribute [rw] quality_preset + # @return [::Google::Cloud::Video::LiveStream::V1::AutoTranscriptionConfig::QualityPreset] + # Optional. Tunes the latency and quality of auto-generated captions. + class AutoTranscriptionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Whether auto-generated text streams are displayed synchronously or + # asynchronously with the original audio. + module DisplayTiming + # Display timing is not specified. Caption display will be asynchronous by + # default. + DISPLAY_TIMING_UNSPECIFIED = 0 + + # Caption will be displayed asynchronous with audio. + ASYNC = 1 + + # Caption will be displayed synchronous with audio. This option increases + # overall media output latency, and reduces viewing latency between audio + # and auto-generated captions. + SYNC = 2 + end + + # Presets to tune the latency and quality of auto-generated captions. + module QualityPreset + # Quality Preset is not specified. By default, BALANCED_QUALITY will be + # used. + QUALITY_PRESET_UNSPECIFIED = 0 + + # Reduce the latency of auto-generated captions. This may reduce the + # quality of the captions. + LOW_LATENCY = 1 + + # Default behavior when QualityPreset is not specified. + BALANCED_QUALITY = 2 + + # Increases the quality of the auto-generated captions at the cost of + # higher latency. + IMPROVED_QUALITY = 3 + end + end + + # Event is a sub-resource of a channel, which can be scheduled by the user to + # execute operations on a channel resource without having to stop the channel. + # @!attribute [rw] name + # @return [::String] + # The resource name of the event, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The update time. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # User-defined key/value metadata. + # @!attribute [rw] input_switch + # @return [::Google::Cloud::Video::LiveStream::V1::Event::InputSwitchTask] + # Switches to another input stream. + # + # Note: The following fields are mutually exclusive: `input_switch`, `ad_break`, `return_to_program`, `slate`, `mute`, `unmute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] ad_break + # @return [::Google::Cloud::Video::LiveStream::V1::Event::AdBreakTask] + # Inserts a new ad opportunity. + # + # Note: The following fields are mutually exclusive: `ad_break`, `input_switch`, `return_to_program`, `slate`, `mute`, `unmute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] return_to_program + # @return [::Google::Cloud::Video::LiveStream::V1::Event::ReturnToProgramTask] + # Stops any running ad break. + # + # Note: The following fields are mutually exclusive: `return_to_program`, `input_switch`, `ad_break`, `slate`, `mute`, `unmute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] slate + # @return [::Google::Cloud::Video::LiveStream::V1::Event::SlateTask] + # Inserts a slate. + # + # Note: The following fields are mutually exclusive: `slate`, `input_switch`, `ad_break`, `return_to_program`, `mute`, `unmute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] mute + # @return [::Google::Cloud::Video::LiveStream::V1::Event::MuteTask] + # Mutes the stream. + # + # Note: The following fields are mutually exclusive: `mute`, `input_switch`, `ad_break`, `return_to_program`, `slate`, `unmute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] unmute + # @return [::Google::Cloud::Video::LiveStream::V1::Event::UnmuteTask] + # Unmutes the stream. + # + # Note: The following fields are mutually exclusive: `unmute`, `input_switch`, `ad_break`, `return_to_program`, `slate`, `mute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] update_encryptions + # @return [::Google::Cloud::Video::LiveStream::V1::Event::UpdateEncryptionsTask] + # Updates encryption settings. + # + # Note: The following fields are mutually exclusive: `update_encryptions`, `input_switch`, `ad_break`, `return_to_program`, `slate`, `mute`, `unmute`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] execute_now + # @return [::Boolean] + # When this field is set to true, the event will be executed at the earliest + # time that the server can schedule the event and + # {::Google::Cloud::Video::LiveStream::V1::Event#execution_time execution_time} + # will be populated with the time that the server actually schedules the + # event. + # @!attribute [rw] execution_time + # @return [::Google::Protobuf::Timestamp] + # The time to execute the event. If you set + # {::Google::Cloud::Video::LiveStream::V1::Event#execute_now execute_now} to + # `true`, then do not set this field in the `CreateEvent` request. In + # this case, the server schedules the event and populates this field. If you + # set {::Google::Cloud::Video::LiveStream::V1::Event#execute_now execute_now} to + # `false`, then you must set this field to at least 10 seconds in the future + # or else the event can't be created. + # @!attribute [r] state + # @return [::Google::Cloud::Video::LiveStream::V1::Event::State] + # Output only. The state of the event. + # @!attribute [r] error + # @return [::Google::Rpc::Status] + # Output only. An error object that describes the reason for the failure. + # This property is always present when `state` is `FAILED`. + class Event + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Switches to another input stream. Automatic failover is then disabled. + # @!attribute [rw] input_key + # @return [::String] + # The + # {::Google::Cloud::Video::LiveStream::V1::InputAttachment#key InputAttachment.key} + # of the input to switch to. + class InputSwitchTask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Inserts a new ad opportunity. + # @!attribute [rw] duration + # @return [::Google::Protobuf::Duration] + # Duration of an ad opportunity. Must be greater than 0. + class AdBreakTask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Inserts a slate. + # @!attribute [rw] duration + # @return [::Google::Protobuf::Duration] + # Optional. Duration of the slate. Must be greater than 0 if specified. + # Omit this field for a long running slate. + # @!attribute [rw] asset + # @return [::String] + # Slate asset to use for the duration. If its duration is less than the + # duration of the SlateTask, then the slate loops. The slate must be + # represented in the form of: + # `projects/{project}/locations/{location}/assets/{assetId}`. + class SlateTask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Stops any events which are currently running. This only applies to events + # with a duration. + class ReturnToProgramTask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Mutes the stream. + # @!attribute [rw] duration + # @return [::Google::Protobuf::Duration] + # Duration for which the stream should be muted. If omitted, the stream + # will be muted until an UnmuteTask event is sent. + class MuteTask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Unmutes the stream. The task fails if the stream is not currently muted. + class UnmuteTask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update encryption settings. + # @!attribute [rw] encryptions + # @return [::Array<::Google::Cloud::Video::LiveStream::V1::EncryptionUpdate>] + # Required. A list of + # {::Google::Cloud::Video::LiveStream::V1::EncryptionUpdate EncryptionUpdate}s + # that updates the existing encryption settings. + class UpdateEncryptionsTask + 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 of the event + module State + # Event state is not specified. + STATE_UNSPECIFIED = 0 + + # Event is scheduled but not executed yet. + SCHEDULED = 1 + + # Event is being executed. + RUNNING = 2 + + # Event has been successfully executed. + SUCCEEDED = 3 + + # Event fails to be executed. + FAILED = 4 + + # Event has been created but not scheduled yet. + PENDING = 5 + + # Event was stopped before running for its full duration. + STOPPED = 6 + end + end + + # Clip is a sub-resource under channel. Each clip represents a clipping + # operation that generates a VOD playlist from its channel given a set of + # timestamp ranges. + # @!attribute [rw] name + # @return [::String] + # The resource name of the clip, in the following format: + # `projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`. + # `{clipId}` is a user-specified resource id that conforms to the following + # criteria: + # + # 1. 1 character minimum, 63 characters maximum + # 2. Only contains letters, digits, underscores, and hyphens + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation timestamp of the clip resource. + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the clip request starts to be processed. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The update timestamp of the clip resource. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # The labels associated with this resource. Each label is a key-value pair. + # @!attribute [r] state + # @return [::Google::Cloud::Video::LiveStream::V1::Clip::State] + # Output only. The state of the clip. + # @!attribute [rw] output_uri + # @return [::String] + # Specify the `output_uri` to determine where to place the clip segments and + # clip manifest files in Cloud Storage. The manifests specified in + # `clip_manifests` fields will be placed under this URI. The exact URI of the + # generated manifests will be provided in `clip_manifests.output_uri` for + # each manifest. + # Example: + # "output_uri": "gs://my-bucket/clip-outputs" + # "clip_manifests.output_uri": "gs://my-bucket/clip-outputs/main.m3u8" + # @!attribute [r] error + # @return [::Google::Rpc::Status] + # Output only. An error object that describes the reason for the failure. + # This property only presents when `state` is `FAILED`. + # @!attribute [rw] slices + # @return [::Array<::Google::Cloud::Video::LiveStream::V1::Clip::Slice>] + # The specified ranges of segments to generate a clip. + # @!attribute [rw] clip_manifests + # @return [::Array<::Google::Cloud::Video::LiveStream::V1::Clip::ClipManifest>] + # Required. A list of clip manifests. Currently only one clip manifest is + # allowed. + # @!attribute [rw] output_type + # @return [::Google::Cloud::Video::LiveStream::V1::Clip::OutputType] + # Optional. OutputType of the clip. If not specified, the default value is + # MANIFEST. + class Clip + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # TimeSlice represents a tuple of Unix epoch timestamps that specifies a time + # range. + # @!attribute [rw] markin_time + # @return [::Google::Protobuf::Timestamp] + # The mark-in Unix epoch time in the original live stream manifest. + # @!attribute [rw] markout_time + # @return [::Google::Protobuf::Timestamp] + # The mark-out Unix epoch time in the original live stream manifest. + class TimeSlice + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Slice represents a slice of the requested clip. + # @!attribute [rw] time_slice + # @return [::Google::Cloud::Video::LiveStream::V1::Clip::TimeSlice] + # A slice in form of a tuple of Unix epoch time. + class Slice + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ClipManifest identifies a source manifest for the generated clip manifest. + # @!attribute [rw] manifest_key + # @return [::String] + # Required. A unique key that identifies a manifest config in the parent + # channel. This key is the same as `channel.manifests.key` for the selected + # manifest. + # @!attribute [r] output_uri + # @return [::String] + # Output only. The output URI of the generated clip manifest. This field + # will be populated when the CreateClip request is accepted. Current output + # format is provided below but may change in the future. Please read this + # field to get the uri to the generated clip manifest. Format: + # \\{clip.output_uri}/\\{channel.manifest.fileName} Example: + # gs://my-bucket/clip-outputs/main.m3u8 + class ClipManifest + 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 of clipping operation. + module State + # State is not specified. + STATE_UNSPECIFIED = 0 + + # The operation is pending to be picked up by the server. + PENDING = 1 + + # The server admitted this create clip request, and + # outputs are under processing. + CREATING = 2 + + # Outputs are available in the specified Cloud Storage bucket. For + # additional information, see the `outputs` field. + SUCCEEDED = 3 + + # The operation has failed. For additional information, see the `error` + # field. + FAILED = 4 + end + + # OutputType represents the output type of the clip. + module OutputType + # OutputType is not specified. + OUTPUT_TYPE_UNSPECIFIED = 0 + + # OutputType is a VOD manifest. This is the default value. + MANIFEST = 1 + + # OutputType is an MP4 file. + MP4 = 2 + end + end + + # TimeInterval represents a time interval. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The start time of the interval. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The end time of the interval. + class TimeInterval + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DvrSession is a sub-resource under channel. Each DvrSession represents a DVR + # recording of the live stream for a specific time range. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the DVR session, in the following format: + # `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`. + # `{dvrSessionId}` is a user-specified resource id that conforms to the + # following criteria: + # + # 1. 1 character minimum, 63 characters maximum + # 2. Only contains letters, digits, underscores, and hyphens + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The update time. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined key/value metadata. + # @!attribute [r] state + # @return [::Google::Cloud::Video::LiveStream::V1::DvrSession::State] + # Output only. The state of the clip. + # @!attribute [r] error + # @return [::Google::Rpc::Status] + # Output only. An error object that describes the reason for the failure. + # This property only presents when `state` is `FAILED`. + # @!attribute [rw] dvr_manifests + # @return [::Array<::Google::Cloud::Video::LiveStream::V1::DvrSession::DvrManifest>] + # Required. A list of DVR manifests. Currently only one DVR manifest is + # allowed. + # @!attribute [rw] dvr_windows + # @return [::Array<::Google::Cloud::Video::LiveStream::V1::DvrSession::DvrWindow>] + # Required. The specified ranges of segments to generate a DVR recording. + class DvrSession + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # DvrManifest identifies a source manifest and specifies a file name for the + # generated DVR manifest. + # @!attribute [rw] manifest_key + # @return [::String] + # Required. A unique key that identifies a manifest config in the parent + # channel. This key is the same as `channel.manifests.key` for the selected + # manifest. + # @!attribute [r] output_uri + # @return [::String] + # Output only. The output URI of the DVR manifest. The DVR output will be + # placed in a directory named `dvr/dvrSessionId/` under the parent + # channel's output uri. Format: + # \\{channel.output.uri}/dvr/\\{dvrSessionId}/\\{channel.manifests.fileName} + # Example: gs://my-bucket/outputs/dvr/my-dvr-session/main.m3u8 + class DvrManifest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DvrWindow represents a DVR window. + # @!attribute [rw] time_interval + # @return [::Google::Cloud::Video::LiveStream::V1::TimeInterval] + # A time interval in the form of a tuple of Unix epoch time. + class DvrWindow + 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 of the DVR session. + module State + # State is not specified. + STATE_UNSPECIFIED = 0 + + # The operation is pending to be picked up by the server. + PENDING = 1 + + # The session is being updated. + UPDATING = 2 + + # The session is scheduled and waiting for the start time. + SCHEDULED = 3 + + # The session is currently in progress and the outputs are available in the + # specified Cloud Storage bucket. For additional information, see the + # `dvr_manifests.output_uri` field. + LIVE = 4 + + # Outputs are available in the specified Cloud Storage bucket. For + # additional information, see the `dvr_manifests.output_uri` field. + FINISHED = 5 + + # The operation has failed. For additional information, see the `error` + # field. + FAILED = 6 + + # The session is being deleted. + DELETING = 7 + + # The session is being post processed. + POST_PROCESSING = 8 + + # The session is in cooldown. The cooldown period lasts for 60 seconds. + # When the DVR session is updated by the user to have a new end time that + # is likely already in the past, the DVR manifest will end as soon as + # possible and the DVR session will move to this state. This is done to + # prevent the players to receive a manifest update that removes a segment + # that has already been played. After the cooldown period ends, a new + # manifest is generated that honors the new end time. + COOLDOWN = 9 + + # The session is being stopped. The session will move to STOPPING state, if + # the parent channel is updated. + STOPPING = 10 + end + end + + # An asset represents a video or an image. + # @!attribute [rw] name + # @return [::String] + # The resource name of the asset, in the form of: + # `projects/{project}/locations/{location}/assets/{assetId}`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The update time. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # User-defined key/value metadata. + # @!attribute [rw] video + # @return [::Google::Cloud::Video::LiveStream::V1::Asset::VideoAsset] + # VideoAsset represents a video. + # + # Note: The following fields are mutually exclusive: `video`, `image`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image + # @return [::Google::Cloud::Video::LiveStream::V1::Asset::ImageAsset] + # ImageAsset represents an image. + # + # Note: The following fields are mutually exclusive: `image`, `video`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] crc32c + # @return [::String] + # Based64-encoded CRC32c checksum of the asset file. For more information, + # see the crc32c checksum of the [Cloud Storage Objects + # resource](https://cloud.google.com/storage/docs/json_api/v1/objects). + # If crc32c is omitted or left empty when the asset is created, this field is + # filled by the crc32c checksum of the Cloud Storage object indicated by + # {::Google::Cloud::Video::LiveStream::V1::Asset::VideoAsset#uri VideoAsset.uri} or + # {::Google::Cloud::Video::LiveStream::V1::Asset::ImageAsset#uri ImageAsset.uri}. If + # crc32c is set, the asset can't be created if the crc32c value does not + # match with the crc32c checksum of the Cloud Storage object indicated by + # {::Google::Cloud::Video::LiveStream::V1::Asset::VideoAsset#uri VideoAsset.uri} or + # {::Google::Cloud::Video::LiveStream::V1::Asset::ImageAsset#uri ImageAsset.uri}. + # @!attribute [r] state + # @return [::Google::Cloud::Video::LiveStream::V1::Asset::State] + # Output only. The state of the asset resource. + # @!attribute [r] error + # @return [::Google::Rpc::Status] + # Output only. Only present when `state` is `ERROR`. The reason for the error + # state of the asset. + class Asset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # VideoAsset represents a video. The supported formats are MP4, MPEG-TS, and + # FLV. The supported video codec is H264. The supported audio codecs are + # AAC, AC3, MP2, and MP3. + # @!attribute [rw] uri + # @return [::String] + # Cloud Storage URI of the video. The format is `gs://my-bucket/my-object`. + class VideoAsset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Image represents an image. The supported formats are JPEG, PNG. + # @!attribute [rw] uri + # @return [::String] + # Cloud Storage URI of the image. The format is `gs://my-bucket/my-object`. + class ImageAsset + 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 of the asset resource. + module State + # State is not specified. + STATE_UNSPECIFIED = 0 + + # The asset is being created. + CREATING = 1 + + # The asset is ready for use. + ACTIVE = 2 + + # The asset is being deleted. + DELETING = 3 + + # The asset has an error. + ERROR = 4 + end + end + + # Encryption settings. + # @!attribute [rw] id + # @return [::String] + # Required. Identifier for this set of encryption options. The ID must be + # 1-63 characters in length. The ID must begin and end with a letter + # (regardless of case) or a number, but can contain dashes or underscores in + # between. + # @!attribute [rw] secret_manager_key_source + # @return [::Google::Cloud::Video::LiveStream::V1::Encryption::SecretManagerSource] + # For keys stored in Google Secret Manager. + # @!attribute [rw] drm_systems + # @return [::Google::Cloud::Video::LiveStream::V1::Encryption::DrmSystems] + # Required. Configuration for DRM systems. + # @!attribute [rw] aes128 + # @return [::Google::Cloud::Video::LiveStream::V1::Encryption::Aes128Encryption] + # Configuration for HLS AES-128 encryption. + # + # Note: The following fields are mutually exclusive: `aes128`, `sample_aes`, `mpeg_cenc`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] sample_aes + # @return [::Google::Cloud::Video::LiveStream::V1::Encryption::SampleAesEncryption] + # Configuration for HLS SAMPLE-AES encryption. + # + # Note: The following fields are mutually exclusive: `sample_aes`, `aes128`, `mpeg_cenc`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] mpeg_cenc + # @return [::Google::Cloud::Video::LiveStream::V1::Encryption::MpegCommonEncryption] + # Configuration for MPEG-Dash Common Encryption (MPEG-CENC). + # + # Note: The following fields are mutually exclusive: `mpeg_cenc`, `aes128`, `sample_aes`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Encryption + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for secrets stored in Google Secret Manager. + # @!attribute [rw] secret_version + # @return [::String] + # Required. The name of the Secret Version containing the encryption key. + # `projects/{project}/secrets/{secret_id}/versions/{version_number}` + class SecretManagerSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Widevine configuration. + class Widevine + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fairplay configuration. + class Fairplay + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Playready configuration. + class Playready + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Clearkey configuration. + class Clearkey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines configuration for DRM systems in use. If a field is omitted, + # that DRM system will be considered to be disabled. + # @!attribute [rw] widevine + # @return [::Google::Cloud::Video::LiveStream::V1::Encryption::Widevine] + # Optional. Widevine configuration. + # @!attribute [rw] fairplay + # @return [::Google::Cloud::Video::LiveStream::V1::Encryption::Fairplay] + # Optional. Fairplay configuration. + # @!attribute [rw] playready + # @return [::Google::Cloud::Video::LiveStream::V1::Encryption::Playready] + # Optional. Playready configuration. + # @!attribute [rw] clearkey + # @return [::Google::Cloud::Video::LiveStream::V1::Encryption::Clearkey] + # Optional. Clearkey configuration. + class DrmSystems + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for HLS AES-128 encryption. + class Aes128Encryption + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for HLS SAMPLE-AES encryption. + class SampleAesEncryption + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for MPEG-Dash Common Encryption (MPEG-CENC). + # @!attribute [rw] scheme + # @return [::String] + # Required. Specify the encryption scheme, supported schemes: + # - `cenc` - AES-CTR subsample + # - `cbcs`- AES-CBC subsample pattern + class MpegCommonEncryption + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Encryption setting when updating encryption. + # @!attribute [rw] id + # @return [::String] + # Required. Identifier for the encryption option to be updated. + # @!attribute [rw] secret_manager_key_source + # @return [::Google::Cloud::Video::LiveStream::V1::Encryption::SecretManagerSource] + # For keys stored in Google Secret Manager. + class EncryptionUpdate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Pool resource defines the configuration of Live Stream pools for a specific + # location. Currently we support only one pool resource per project per + # location. After the creation of the first input, a default pool is created + # automatically at "projects/\\{project}/locations/\\{location}/pools/default". + # @!attribute [rw] name + # @return [::String] + # The resource name of the pool, in the form of: + # `projects/{project}/locations/{location}/pools/{poolId}`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The update time. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # User-defined key/value metadata. + # @!attribute [rw] network_config + # @return [::Google::Cloud::Video::LiveStream::V1::Pool::NetworkConfig] + # Network configuration for the pool. + class Pool + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines the network configuration for the pool. + # @!attribute [rw] peered_network + # @return [::String] + # peered_network is the network resource URL of the network that is peered + # to the service provider network. Must be of the format + # projects/NETWORK_PROJECT_NUMBER/global/networks/NETWORK_NAME, where + # NETWORK_PROJECT_NUMBER is the project number of the Cloud project that + # holds your VPC network and NETWORK_NAME is the name of your VPC network. + # If peered_network is omitted or empty, the pool will use endpoints that + # are publicly available. + class NetworkConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/cloud/video/livestream/v1/service.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/cloud/video/livestream/v1/service.rb new file mode 100644 index 000000000000..47f17459c530 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/cloud/video/livestream/v1/service.rb @@ -0,0 +1,1032 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Video + module LiveStream + module V1 + # Request message for "LivestreamService.CreateAsset". + # @!attribute [rw] parent + # @return [::String] + # Required. The parent location for the resource, in the form of: + # `projects/{project}/locations/{location}`. + # @!attribute [rw] asset + # @return [::Google::Cloud::Video::LiveStream::V1::Asset] + # Required. The asset resource to be created. + # @!attribute [rw] asset_id + # @return [::String] + # Required. The ID of the asset resource to be created. + # + # This value must be 1-63 characters, begin and end with a lower-case letter + # or a number, and consist of only lower-case letters, numbers, and hyphens. + # In other words, it must match the following regex: + # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @!attribute [rw] request_id + # @return [::String] + # A 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 CreateAssetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.DeleteAsset". + # @!attribute [rw] name + # @return [::String] + # Required. The name of the asset resource, in the form of: + # `projects/{project}/locations/{location}/assets/{assetId}`. + # @!attribute [rw] request_id + # @return [::String] + # A 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 DeleteAssetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.ListAssets". + # @!attribute [rw] parent + # @return [::String] + # Required. The parent location for the resource, in the form of: + # `projects/{project}/locations/{location}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Filtering results + # @!attribute [rw] order_by + # @return [::String] + # Hint for how to order the results + class ListAssetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for "LivestreamService.ListAssets". + # @!attribute [rw] assets + # @return [::Array<::Google::Cloud::Video::LiveStream::V1::Asset>] + # The list of Assets + # @!attribute [rw] next_page_token + # @return [::String] + # The next_page_token value returned from a previous List request, if any. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListAssetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.GetAsset". + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource, in the following form: + # `projects/{project}/locations/{location}/assets/{asset}`. + class GetAssetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.CreateChannel". + # @!attribute [rw] parent + # @return [::String] + # Required. The parent location for the resource, in the form of: + # `projects/{project}/locations/{location}`. + # @!attribute [rw] channel + # @return [::Google::Cloud::Video::LiveStream::V1::Channel] + # Required. The channel resource to be created. + # @!attribute [rw] channel_id + # @return [::String] + # Required. The ID of the channel resource to be created. + # + # This value must be 1-63 characters, begin and end with a lower-case letter + # or a number, and consist of only lower-case letters, numbers, and hyphens. + # In other words, it must match the following regex: + # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @!attribute [rw] request_id + # @return [::String] + # A 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 CreateChannelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.ListChannels". + # @!attribute [rw] parent + # @return [::String] + # Required. The parent location for the resource, in the form of: + # `projects/{project}/locations/{location}`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return. If unspecified, server + # will pick an appropriate default. Server may return fewer items than + # requested. A caller should only rely on response's + # {::Google::Cloud::Video::LiveStream::V1::ListChannelsResponse#next_page_token next_page_token} + # to determine if there are more items left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous List request, if any. + # @!attribute [rw] filter + # @return [::String] + # The filter to apply to list results. + # @!attribute [rw] order_by + # @return [::String] + # Specifies the ordering of results following syntax at + # https://cloud.google.com/apis/design/design_patterns#sorting_order. + class ListChannelsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for "LivestreamService.ListChannels". + # @!attribute [rw] channels + # @return [::Array<::Google::Cloud::Video::LiveStream::V1::Channel>] + # A list of channels. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListChannelsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.GetChannel". + # @!attribute [rw] name + # @return [::String] + # Required. The name of the channel resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}`. + class GetChannelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.DeleteChannel". + # @!attribute [rw] name + # @return [::String] + # Required. The name of the channel resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @!attribute [rw] request_id + # @return [::String] + # A 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)`. + # @!attribute [rw] force + # @return [::Boolean] + # If the `force` field is set to the default value of `false`, you must + # delete all of a channel's events before you can delete the channel itself. + # If the field is set to `true`, requests to delete a channel also delete + # associated channel events. + class DeleteChannelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.UpdateChannel". + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Field mask is used to specify the fields to be overwritten in the Channel + # resource by the update. You can only update the following fields: + # + # * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) + # * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) + # * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) + # * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) + # * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) + # * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) + # * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) + # * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) + # * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) + # * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) + # + # 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 mask is not present, then each field from the list above is updated + # if the field appears in the request payload. To unset a field, add the + # field to the update mask and remove it from the request payload. + # @!attribute [rw] channel + # @return [::Google::Cloud::Video::LiveStream::V1::Channel] + # Required. The channel resource to be updated. + # @!attribute [rw] request_id + # @return [::String] + # A 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 UpdateChannelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.StartChannel". + # @!attribute [rw] name + # @return [::String] + # Required. The name of the channel resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @!attribute [rw] request_id + # @return [::String] + # A 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 StartChannelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.StopChannel". + # @!attribute [rw] name + # @return [::String] + # Required. The name of the channel resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @!attribute [rw] request_id + # @return [::String] + # A 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 StopChannelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.StartDistribution". + # @!attribute [rw] name + # @return [::String] + # Required. The name of the channel resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @!attribute [rw] distribution_keys + # @return [::Array<::String>] + # Optional. A list of keys to identify the distribution configuration in the + # channel resource. If left empty, all the distributions in the channel + # specification will be started. + # @!attribute [rw] request_id + # @return [::String] + # Optional. A 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 StartDistributionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.StopDistribution". + # @!attribute [rw] name + # @return [::String] + # Required. The name of the channel resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @!attribute [rw] distribution_keys + # @return [::Array<::String>] + # Optional. A list of key to identify the distribution configuration in the + # channel resource. If left empty, all the distributions in the channel + # specification will be stopped. + # @!attribute [rw] request_id + # @return [::String] + # Optional. A 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 StopDistributionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.CreateInput". + # @!attribute [rw] parent + # @return [::String] + # Required. The parent location for the resource, in the form of: + # `projects/{project}/locations/{location}`. + # @!attribute [rw] input + # @return [::Google::Cloud::Video::LiveStream::V1::Input] + # Required. The input resource to be created. + # @!attribute [rw] input_id + # @return [::String] + # Required. The ID of the input resource to be created. + # + # This value must be 1-63 characters, begin and end with a lower-case letter + # or a number, and consist of only lower-case letters, numbers, and hyphens. + # In other words, it must match the following regex: + # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @!attribute [rw] request_id + # @return [::String] + # A 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 CreateInputRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.ListInputs". + # @!attribute [rw] parent + # @return [::String] + # Required. The parent location for the resource, in the form of: + # `projects/{project}/locations/{location}`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return. If unspecified, server + # will pick an appropriate default. Server may return fewer items than + # requested. A caller should only rely on response's + # {::Google::Cloud::Video::LiveStream::V1::ListInputsResponse#next_page_token next_page_token} + # to determine if there are more items left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous List request, if any. + # @!attribute [rw] filter + # @return [::String] + # The filter to apply to list results. + # @!attribute [rw] order_by + # @return [::String] + # Specifies the ordering of results following syntax at [Sorting + # Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + class ListInputsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for "LivestreamService.ListInputs". + # @!attribute [rw] inputs + # @return [::Array<::Google::Cloud::Video::LiveStream::V1::Input>] + # A list of inputs. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListInputsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.GetInput". + # @!attribute [rw] name + # @return [::String] + # Required. The name of the input resource, in the form of: + # `projects/{project}/locations/{location}/inputs/{inputId}`. + class GetInputRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.DeleteInput". + # @!attribute [rw] name + # @return [::String] + # Required. The name of the input resource, in the form of: + # `projects/{project}/locations/{location}/inputs/{inputId}`. + # @!attribute [rw] request_id + # @return [::String] + # A 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 DeleteInputRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.UpdateInput". + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Field mask is used to specify the fields to be overwritten in the Input + # resource by the update. You can only update the following fields: + # + # * [`tier`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#Tier) + # * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) + # * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) + # + # 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 mask is not present, then each field from the list above is updated + # if the field appears in the request payload. To unset a field, add the + # field to the update mask and remove it from the request payload. + # @!attribute [rw] input + # @return [::Google::Cloud::Video::LiveStream::V1::Input] + # Required. The input resource to be updated. + # @!attribute [rw] request_id + # @return [::String] + # A 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 UpdateInputRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.CreateEvent". + # @!attribute [rw] parent + # @return [::String] + # Required. The parent channel for the resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @!attribute [rw] event + # @return [::Google::Cloud::Video::LiveStream::V1::Event] + # Required. The event resource to be created. + # @!attribute [rw] event_id + # @return [::String] + # Required. The ID of the event resource to be created. + # + # This value must be 1-63 characters, begin and end with a lower-case letter + # or a number, and consist of only lower-case letters, numbers, and hyphens. + # In other words, it must match the following regex: + # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @!attribute [rw] request_id + # @return [::String] + # A 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 CreateEventRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.ListEvents". + # @!attribute [rw] parent + # @return [::String] + # Required. The parent channel for the resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return. If unspecified, server + # will pick an appropriate default. Server may return fewer items than + # requested. A caller should only rely on response's + # {::Google::Cloud::Video::LiveStream::V1::ListEventsResponse#next_page_token next_page_token} + # to determine if there are more items left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous List request, if any. + # @!attribute [rw] filter + # @return [::String] + # The filter to apply to list results. + # @!attribute [rw] order_by + # @return [::String] + # Specifies the ordering of results following syntax at + # https://cloud.google.com/apis/design/design_patterns#sorting_order. + class ListEventsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for "LivestreamService.ListEvents". + # @!attribute [rw] events + # @return [::Array<::Google::Cloud::Video::LiveStream::V1::Event>] + # A list of events. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListEventsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.GetEvent". + # @!attribute [rw] name + # @return [::String] + # Required. The name of the event resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + class GetEventRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.DeleteEvent". + # @!attribute [rw] name + # @return [::String] + # Required. The name of the event resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + # @!attribute [rw] request_id + # @return [::String] + # A 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 DeleteEventRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for Start/Stop Channel long-running operations. + class ChannelOperationResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.ListClips". + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListClipsRequest + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Filtering results + # @!attribute [rw] order_by + # @return [::String] + # Hint for how to order the results + class ListClipsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for "LivestreamService.ListClips". + # @!attribute [rw] clips + # @return [::Array<::Google::Cloud::Video::LiveStream::V1::Clip>] + # The list of Clip + # @!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 ListClipsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.GetClip". + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource, in the following form: + # `projects/{project}/locations/{location}/channels/{channel}/clips/{clip}`. + class GetClipRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.CreateClip". + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name, in the following form: + # `projects/{project}/locations/{location}/channels/{channel}`. + # @!attribute [rw] clip_id + # @return [::String] + # Required. The ID of the clip resource to be created. + # + # This value must be 1-63 characters, begin and end with a lower-case letter + # or a number, and consist of only lower-case letters, numbers, and hyphens. + # In other words, it must match the following regex: + # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @!attribute [rw] clip + # @return [::Google::Cloud::Video::LiveStream::V1::Clip] + # Required. The resource being 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 CreateClipRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.DeleteClip". + # @!attribute [rw] name + # @return [::String] + # Required. The name of the clip resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`. + # @!attribute [rw] request_id + # @return [::String] + # Optional. A 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 DeleteClipRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.ListDvrSessions". + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListDvrSessionsRequest + # @!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 results + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results + class ListDvrSessionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for "LivestreamService.ListDvrSessions". + # @!attribute [rw] dvr_sessions + # @return [::Array<::Google::Cloud::Video::LiveStream::V1::DvrSession>] + # The list of DVR sessions + # @!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 ListDvrSessionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.GetDvrSession". + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource, in the following form: + # `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`. + class GetDvrSessionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.CreateDvrSession". + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name, in the following form: + # `projects/{project}/locations/{location}/channels/{channelId}`. + # @!attribute [rw] dvr_session_id + # @return [::String] + # Required. The ID of the DVR session resource to be created. + # + # This value must be 1-63 characters, begin and end with a lower-case letter + # or a number, and consist of only lower-case letters, numbers, and hyphens. + # In other words, it must match the following regex: + # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @!attribute [rw] dvr_session + # @return [::Google::Cloud::Video::LiveStream::V1::DvrSession] + # Required. The resource being 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 CreateDvrSessionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.DeleteDvrSession". + # @!attribute [rw] name + # @return [::String] + # Required. The name of the event resource, in the form of: + # `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`. + # @!attribute [rw] request_id + # @return [::String] + # Optional. A 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 DeleteDvrSessionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.UpdateDvrSession". + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Field mask is used to specify the fields to be overwritten in the + # DvrSession resource by the update. You can only update the following + # fields: + # + # * `dvrWindows` + # + # 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. + # @!attribute [rw] dvr_session + # @return [::Google::Cloud::Video::LiveStream::V1::DvrSession] + # Required. The DVR session resource to be updated. + # @!attribute [rw] request_id + # @return [::String] + # Optional. A 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 UpdateDvrSessionRequest + 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] 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 "LivestreamService.GetPool". + # @!attribute [rw] name + # @return [::String] + # Required. The name of the pool resource, in the form of: + # `projects/{project}/locations/{location}/pools/{poolId}`. + class GetPoolRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.UpdatePool". + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Field mask is used to specify the fields to be overwritten in the Pool + # resource by the update. You can only update the following fields: + # + # * `networkConfig` + # + # 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. + # @!attribute [rw] pool + # @return [::Google::Cloud::Video::LiveStream::V1::Pool] + # Required. The pool resource to be updated. + # @!attribute [rw] request_id + # @return [::String] + # A 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 UpdatePoolRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for "LivestreamService.PreviewInput" + # @!attribute [rw] name + # @return [::String] + # Required. The name of the input resource, in the form of: + # `projects/{project}/locations/{location}/inputs/{inputId}`. + class PreviewInputRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for "LivestreamService.PreviewInput" + # @!attribute [rw] uri + # @return [::String] + # URI to display the preview content. + # @!attribute [rw] bearer_token + # @return [::String] + # A bearer token used to authenticate connections that display the preview + # content. The token expires after one hour. For HTTP connections, this token + # should be included as a bearer token inside the Authorization header. + class PreviewInputResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/proto_docs/google/type/datetime.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/type/datetime.rb new file mode 100644 index 000000000000..d15ba7af54e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/Gemfile new file mode 100644 index 000000000000..ce646e3d1d3b --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1", path: "../" +else + gem "google-cloud-video-live_stream-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-video-live_stream-v1/snippets/livestream_service/create_asset.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_asset.rb new file mode 100644 index 000000000000..1cd597923642 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_asset.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START livestream_v1_generated_LivestreamService_CreateAsset_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the create_asset call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_asset. +# +def create_asset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::CreateAssetRequest.new + + # Call the create_asset method. + result = client.create_asset request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END livestream_v1_generated_LivestreamService_CreateAsset_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_channel.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_channel.rb new file mode 100644 index 000000000000..dac75f9c51b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/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 livestream_v1_generated_LivestreamService_CreateChannel_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the create_channel call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_channel. +# +def create_channel + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::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 livestream_v1_generated_LivestreamService_CreateChannel_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_clip.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_clip.rb new file mode 100644 index 000000000000..263b1fbd6a78 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_clip.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 livestream_v1_generated_LivestreamService_CreateClip_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the create_clip call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_clip. +# +def create_clip + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::CreateClipRequest.new + + # Call the create_clip method. + result = client.create_clip request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END livestream_v1_generated_LivestreamService_CreateClip_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_dvr_session.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_dvr_session.rb new file mode 100644 index 000000000000..be10cb5c574b --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_dvr_session.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 livestream_v1_generated_LivestreamService_CreateDvrSession_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the create_dvr_session call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_dvr_session. +# +def create_dvr_session + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest.new + + # Call the create_dvr_session method. + result = client.create_dvr_session request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END livestream_v1_generated_LivestreamService_CreateDvrSession_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_event.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_event.rb new file mode 100644 index 000000000000..6ef860baaa1f --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_event.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 livestream_v1_generated_LivestreamService_CreateEvent_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the create_event call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_event. +# +def create_event + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::CreateEventRequest.new + + # Call the create_event method. + result = client.create_event request + + # The returned object is of type Google::Cloud::Video::LiveStream::V1::Event. + p result +end +# [END livestream_v1_generated_LivestreamService_CreateEvent_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_input.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_input.rb new file mode 100644 index 000000000000..2e25d9fe3e52 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_input.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 livestream_v1_generated_LivestreamService_CreateInput_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the create_input call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_input. +# +def create_input + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::CreateInputRequest.new + + # Call the create_input method. + result = client.create_input request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END livestream_v1_generated_LivestreamService_CreateInput_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_asset.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_asset.rb new file mode 100644 index 000000000000..c85eed4d8460 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_asset.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START livestream_v1_generated_LivestreamService_DeleteAsset_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the delete_asset call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_asset. +# +def delete_asset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest.new + + # Call the delete_asset method. + result = client.delete_asset request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END livestream_v1_generated_LivestreamService_DeleteAsset_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_channel.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_channel.rb new file mode 100644 index 000000000000..d78c007e161b --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/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 livestream_v1_generated_LivestreamService_DeleteChannel_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the delete_channel call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_channel. +# +def delete_channel + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::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 livestream_v1_generated_LivestreamService_DeleteChannel_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_clip.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_clip.rb new file mode 100644 index 000000000000..be654078b442 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_clip.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 livestream_v1_generated_LivestreamService_DeleteClip_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the delete_clip call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_clip. +# +def delete_clip + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::DeleteClipRequest.new + + # Call the delete_clip method. + result = client.delete_clip request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END livestream_v1_generated_LivestreamService_DeleteClip_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_dvr_session.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_dvr_session.rb new file mode 100644 index 000000000000..733d7fa61a1c --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_dvr_session.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 livestream_v1_generated_LivestreamService_DeleteDvrSession_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the delete_dvr_session call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_dvr_session. +# +def delete_dvr_session + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest.new + + # Call the delete_dvr_session method. + result = client.delete_dvr_session request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END livestream_v1_generated_LivestreamService_DeleteDvrSession_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_event.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_event.rb new file mode 100644 index 000000000000..bf4b8ad1c01d --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_event.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 livestream_v1_generated_LivestreamService_DeleteEvent_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the delete_event call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_event. +# +def delete_event + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::DeleteEventRequest.new + + # Call the delete_event method. + result = client.delete_event request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END livestream_v1_generated_LivestreamService_DeleteEvent_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_input.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_input.rb new file mode 100644 index 000000000000..7f32c9a49824 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_input.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 livestream_v1_generated_LivestreamService_DeleteInput_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the delete_input call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_input. +# +def delete_input + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::DeleteInputRequest.new + + # Call the delete_input method. + result = client.delete_input request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END livestream_v1_generated_LivestreamService_DeleteInput_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_asset.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_asset.rb new file mode 100644 index 000000000000..4f9f71971649 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_asset.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START livestream_v1_generated_LivestreamService_GetAsset_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the get_asset call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_asset. +# +def get_asset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::GetAssetRequest.new + + # Call the get_asset method. + result = client.get_asset request + + # The returned object is of type Google::Cloud::Video::LiveStream::V1::Asset. + p result +end +# [END livestream_v1_generated_LivestreamService_GetAsset_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_channel.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_channel.rb new file mode 100644 index 000000000000..98a538f10b25 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/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 livestream_v1_generated_LivestreamService_GetChannel_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the get_channel call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_channel. +# +def get_channel + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::GetChannelRequest.new + + # Call the get_channel method. + result = client.get_channel request + + # The returned object is of type Google::Cloud::Video::LiveStream::V1::Channel. + p result +end +# [END livestream_v1_generated_LivestreamService_GetChannel_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_clip.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_clip.rb new file mode 100644 index 000000000000..62488fe46f26 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_clip.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 livestream_v1_generated_LivestreamService_GetClip_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the get_clip call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_clip. +# +def get_clip + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::GetClipRequest.new + + # Call the get_clip method. + result = client.get_clip request + + # The returned object is of type Google::Cloud::Video::LiveStream::V1::Clip. + p result +end +# [END livestream_v1_generated_LivestreamService_GetClip_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_dvr_session.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_dvr_session.rb new file mode 100644 index 000000000000..6a651d07ac87 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_dvr_session.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 livestream_v1_generated_LivestreamService_GetDvrSession_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the get_dvr_session call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_dvr_session. +# +def get_dvr_session + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest.new + + # Call the get_dvr_session method. + result = client.get_dvr_session request + + # The returned object is of type Google::Cloud::Video::LiveStream::V1::DvrSession. + p result +end +# [END livestream_v1_generated_LivestreamService_GetDvrSession_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_event.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_event.rb new file mode 100644 index 000000000000..e0376dfa6af5 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_event.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 livestream_v1_generated_LivestreamService_GetEvent_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the get_event call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_event. +# +def get_event + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::GetEventRequest.new + + # Call the get_event method. + result = client.get_event request + + # The returned object is of type Google::Cloud::Video::LiveStream::V1::Event. + p result +end +# [END livestream_v1_generated_LivestreamService_GetEvent_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_input.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_input.rb new file mode 100644 index 000000000000..2b5a8ccf03f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_input.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 livestream_v1_generated_LivestreamService_GetInput_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the get_input call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_input. +# +def get_input + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::GetInputRequest.new + + # Call the get_input method. + result = client.get_input request + + # The returned object is of type Google::Cloud::Video::LiveStream::V1::Input. + p result +end +# [END livestream_v1_generated_LivestreamService_GetInput_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_pool.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_pool.rb new file mode 100644 index 000000000000..8ea9da19a6cf --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_pool.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 livestream_v1_generated_LivestreamService_GetPool_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the get_pool call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_pool. +# +def get_pool + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::GetPoolRequest.new + + # Call the get_pool method. + result = client.get_pool request + + # The returned object is of type Google::Cloud::Video::LiveStream::V1::Pool. + p result +end +# [END livestream_v1_generated_LivestreamService_GetPool_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_assets.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_assets.rb new file mode 100644 index 000000000000..3756f6096bdb --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_assets.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START livestream_v1_generated_LivestreamService_ListAssets_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the list_assets call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_assets. +# +def list_assets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::ListAssetsRequest.new + + # Call the list_assets method. + result = client.list_assets request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Asset. + p item + end +end +# [END livestream_v1_generated_LivestreamService_ListAssets_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_channels.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_channels.rb new file mode 100644 index 000000000000..d91e8936af0b --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/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 livestream_v1_generated_LivestreamService_ListChannels_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the list_channels call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_channels. +# +def list_channels + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::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::Video::LiveStream::V1::Channel. + p item + end +end +# [END livestream_v1_generated_LivestreamService_ListChannels_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_clips.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_clips.rb new file mode 100644 index 000000000000..c38a77a4210e --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_clips.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 livestream_v1_generated_LivestreamService_ListClips_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the list_clips call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_clips. +# +def list_clips + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::ListClipsRequest.new + + # Call the list_clips method. + result = client.list_clips request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Clip. + p item + end +end +# [END livestream_v1_generated_LivestreamService_ListClips_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_dvr_sessions.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_dvr_sessions.rb new file mode 100644 index 000000000000..f3882aac3b1f --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_dvr_sessions.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 livestream_v1_generated_LivestreamService_ListDvrSessions_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the list_dvr_sessions call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_dvr_sessions. +# +def list_dvr_sessions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest.new + + # Call the list_dvr_sessions method. + result = client.list_dvr_sessions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Video::LiveStream::V1::DvrSession. + p item + end +end +# [END livestream_v1_generated_LivestreamService_ListDvrSessions_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_events.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_events.rb new file mode 100644 index 000000000000..ad81a5f24b7f --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_events.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 livestream_v1_generated_LivestreamService_ListEvents_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the list_events call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_events. +# +def list_events + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::ListEventsRequest.new + + # Call the list_events method. + result = client.list_events request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Event. + p item + end +end +# [END livestream_v1_generated_LivestreamService_ListEvents_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_inputs.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_inputs.rb new file mode 100644 index 000000000000..3806909b0944 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_inputs.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 livestream_v1_generated_LivestreamService_ListInputs_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the list_inputs call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_inputs. +# +def list_inputs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::ListInputsRequest.new + + # Call the list_inputs method. + result = client.list_inputs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Input. + p item + end +end +# [END livestream_v1_generated_LivestreamService_ListInputs_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/preview_input.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/preview_input.rb new file mode 100644 index 000000000000..d550a09e0211 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/preview_input.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 livestream_v1_generated_LivestreamService_PreviewInput_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the preview_input call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#preview_input. +# +def preview_input + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::PreviewInputRequest.new + + # Call the preview_input method. + result = client.preview_input request + + # The returned object is of type Google::Cloud::Video::LiveStream::V1::PreviewInputResponse. + p result +end +# [END livestream_v1_generated_LivestreamService_PreviewInput_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/start_channel.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/start_channel.rb new file mode 100644 index 000000000000..df968f3cb54a --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/start_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 livestream_v1_generated_LivestreamService_StartChannel_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the start_channel call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#start_channel. +# +def start_channel + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::StartChannelRequest.new + + # Call the start_channel method. + result = client.start_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 livestream_v1_generated_LivestreamService_StartChannel_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/start_distribution.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/start_distribution.rb new file mode 100644 index 000000000000..844445f7f9b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/start_distribution.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 livestream_v1_generated_LivestreamService_StartDistribution_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the start_distribution call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#start_distribution. +# +def start_distribution + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::StartDistributionRequest.new + + # Call the start_distribution method. + result = client.start_distribution request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END livestream_v1_generated_LivestreamService_StartDistribution_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/stop_channel.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/stop_channel.rb new file mode 100644 index 000000000000..8c3b49c350c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/stop_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 livestream_v1_generated_LivestreamService_StopChannel_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the stop_channel call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#stop_channel. +# +def stop_channel + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::StopChannelRequest.new + + # Call the stop_channel method. + result = client.stop_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 livestream_v1_generated_LivestreamService_StopChannel_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/stop_distribution.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/stop_distribution.rb new file mode 100644 index 000000000000..e6250762bc48 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/stop_distribution.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 livestream_v1_generated_LivestreamService_StopDistribution_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the stop_distribution call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#stop_distribution. +# +def stop_distribution + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::StopDistributionRequest.new + + # Call the stop_distribution method. + result = client.stop_distribution request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END livestream_v1_generated_LivestreamService_StopDistribution_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_channel.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_channel.rb new file mode 100644 index 000000000000..69b1b71701ab --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/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 livestream_v1_generated_LivestreamService_UpdateChannel_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the update_channel call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#update_channel. +# +def update_channel + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::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 livestream_v1_generated_LivestreamService_UpdateChannel_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_dvr_session.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_dvr_session.rb new file mode 100644 index 000000000000..71198791fe7c --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_dvr_session.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 livestream_v1_generated_LivestreamService_UpdateDvrSession_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the update_dvr_session call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#update_dvr_session. +# +def update_dvr_session + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest.new + + # Call the update_dvr_session method. + result = client.update_dvr_session request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END livestream_v1_generated_LivestreamService_UpdateDvrSession_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_input.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_input.rb new file mode 100644 index 000000000000..ecbc94e34893 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_input.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 livestream_v1_generated_LivestreamService_UpdateInput_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the update_input call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#update_input. +# +def update_input + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::UpdateInputRequest.new + + # Call the update_input method. + result = client.update_input request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END livestream_v1_generated_LivestreamService_UpdateInput_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_pool.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_pool.rb new file mode 100644 index 000000000000..07fb543dd597 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_pool.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 livestream_v1_generated_LivestreamService_UpdatePool_sync] +require "google/cloud/video/live_stream/v1" + +## +# Snippet for the update_pool call in the LivestreamService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#update_pool. +# +def update_pool + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest.new + + # Call the update_pool method. + result = client.update_pool request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END livestream_v1_generated_LivestreamService_UpdatePool_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/snippet_metadata_google.cloud.video.livestream.v1.json b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/snippet_metadata_google.cloud.video.livestream.v1.json new file mode 100644 index 000000000000..7a2c0afa9929 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/snippet_metadata_google.cloud.video.livestream.v1.json @@ -0,0 +1,1375 @@ +{ + "client_library": { + "name": "google-cloud-video-live_stream-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.video.livestream.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "livestream_v1_generated_LivestreamService_CreateChannel_sync", + "title": "Snippet for the create_channel call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_channel.", + "file": "livestream_service/create_channel.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_channel", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_channel", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "CreateChannel", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.CreateChannel", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_ListChannels_sync", + "title": "Snippet for the list_channels call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_channels.", + "file": "livestream_service/list_channels.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_channels", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_channels", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::ListChannelsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::LiveStream::V1::ListChannelsResponse", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "ListChannels", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.ListChannels", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_GetChannel_sync", + "title": "Snippet for the get_channel call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_channel.", + "file": "livestream_service/get_channel.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_channel", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_channel", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::GetChannelRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::LiveStream::V1::Channel", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "GetChannel", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.GetChannel", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_DeleteChannel_sync", + "title": "Snippet for the delete_channel call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_channel.", + "file": "livestream_service/delete_channel.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_channel", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_channel", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "DeleteChannel", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.DeleteChannel", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_UpdateChannel_sync", + "title": "Snippet for the update_channel call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#update_channel.", + "file": "livestream_service/update_channel.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_channel", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#update_channel", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "UpdateChannel", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.UpdateChannel", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_StartChannel_sync", + "title": "Snippet for the start_channel call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#start_channel.", + "file": "livestream_service/start_channel.rb", + "language": "RUBY", + "client_method": { + "short_name": "start_channel", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#start_channel", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::StartChannelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "StartChannel", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.StartChannel", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_StopChannel_sync", + "title": "Snippet for the stop_channel call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#stop_channel.", + "file": "livestream_service/stop_channel.rb", + "language": "RUBY", + "client_method": { + "short_name": "stop_channel", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#stop_channel", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::StopChannelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "StopChannel", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.StopChannel", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_StartDistribution_sync", + "title": "Snippet for the start_distribution call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#start_distribution.", + "file": "livestream_service/start_distribution.rb", + "language": "RUBY", + "client_method": { + "short_name": "start_distribution", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#start_distribution", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "StartDistribution", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.StartDistribution", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_StopDistribution_sync", + "title": "Snippet for the stop_distribution call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#stop_distribution.", + "file": "livestream_service/stop_distribution.rb", + "language": "RUBY", + "client_method": { + "short_name": "stop_distribution", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#stop_distribution", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "StopDistribution", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.StopDistribution", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_CreateInput_sync", + "title": "Snippet for the create_input call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_input.", + "file": "livestream_service/create_input.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_input", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_input", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::CreateInputRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "CreateInput", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.CreateInput", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_ListInputs_sync", + "title": "Snippet for the list_inputs call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_inputs.", + "file": "livestream_service/list_inputs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_inputs", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_inputs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::ListInputsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::LiveStream::V1::ListInputsResponse", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "ListInputs", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.ListInputs", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_GetInput_sync", + "title": "Snippet for the get_input call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_input.", + "file": "livestream_service/get_input.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_input", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_input", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::GetInputRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::LiveStream::V1::Input", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "GetInput", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.GetInput", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_DeleteInput_sync", + "title": "Snippet for the delete_input call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_input.", + "file": "livestream_service/delete_input.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_input", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_input", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "DeleteInput", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.DeleteInput", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_UpdateInput_sync", + "title": "Snippet for the update_input call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#update_input.", + "file": "livestream_service/update_input.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_input", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#update_input", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "UpdateInput", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.UpdateInput", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_PreviewInput_sync", + "title": "Snippet for the preview_input call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#preview_input.", + "file": "livestream_service/preview_input.rb", + "language": "RUBY", + "client_method": { + "short_name": "preview_input", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#preview_input", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::LiveStream::V1::PreviewInputResponse", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "PreviewInput", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.PreviewInput", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_CreateEvent_sync", + "title": "Snippet for the create_event call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_event.", + "file": "livestream_service/create_event.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_event", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_event", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::CreateEventRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::LiveStream::V1::Event", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "CreateEvent", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.CreateEvent", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_ListEvents_sync", + "title": "Snippet for the list_events call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_events.", + "file": "livestream_service/list_events.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_events", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_events", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::ListEventsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::LiveStream::V1::ListEventsResponse", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "ListEvents", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.ListEvents", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_GetEvent_sync", + "title": "Snippet for the get_event call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_event.", + "file": "livestream_service/get_event.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_event", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_event", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::GetEventRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::LiveStream::V1::Event", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "GetEvent", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.GetEvent", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_DeleteEvent_sync", + "title": "Snippet for the delete_event call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_event.", + "file": "livestream_service/delete_event.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_event", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_event", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "DeleteEvent", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.DeleteEvent", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_ListClips_sync", + "title": "Snippet for the list_clips call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_clips.", + "file": "livestream_service/list_clips.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_clips", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_clips", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::ListClipsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::LiveStream::V1::ListClipsResponse", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "ListClips", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.ListClips", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_GetClip_sync", + "title": "Snippet for the get_clip call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_clip.", + "file": "livestream_service/get_clip.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_clip", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_clip", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::GetClipRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::LiveStream::V1::Clip", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "GetClip", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.GetClip", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_CreateClip_sync", + "title": "Snippet for the create_clip call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_clip.", + "file": "livestream_service/create_clip.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_clip", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_clip", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::CreateClipRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "CreateClip", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.CreateClip", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_DeleteClip_sync", + "title": "Snippet for the delete_clip call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_clip.", + "file": "livestream_service/delete_clip.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_clip", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_clip", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "DeleteClip", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.DeleteClip", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_CreateDvrSession_sync", + "title": "Snippet for the create_dvr_session call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_dvr_session.", + "file": "livestream_service/create_dvr_session.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_dvr_session", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_dvr_session", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "CreateDvrSession", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.CreateDvrSession", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_ListDvrSessions_sync", + "title": "Snippet for the list_dvr_sessions call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_dvr_sessions.", + "file": "livestream_service/list_dvr_sessions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_dvr_sessions", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_dvr_sessions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsResponse", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "ListDvrSessions", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.ListDvrSessions", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_GetDvrSession_sync", + "title": "Snippet for the get_dvr_session call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_dvr_session.", + "file": "livestream_service/get_dvr_session.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_dvr_session", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_dvr_session", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::LiveStream::V1::DvrSession", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "GetDvrSession", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.GetDvrSession", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_DeleteDvrSession_sync", + "title": "Snippet for the delete_dvr_session call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_dvr_session.", + "file": "livestream_service/delete_dvr_session.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_dvr_session", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_dvr_session", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "DeleteDvrSession", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.DeleteDvrSession", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_UpdateDvrSession_sync", + "title": "Snippet for the update_dvr_session call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#update_dvr_session.", + "file": "livestream_service/update_dvr_session.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_dvr_session", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#update_dvr_session", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "UpdateDvrSession", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.UpdateDvrSession", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_CreateAsset_sync", + "title": "Snippet for the create_asset call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_asset.", + "file": "livestream_service/create_asset.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_asset", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_asset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "CreateAsset", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.CreateAsset", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_DeleteAsset_sync", + "title": "Snippet for the delete_asset call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_asset.", + "file": "livestream_service/delete_asset.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_asset", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_asset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "DeleteAsset", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.DeleteAsset", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_GetAsset_sync", + "title": "Snippet for the get_asset call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_asset.", + "file": "livestream_service/get_asset.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_asset", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_asset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::GetAssetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::LiveStream::V1::Asset", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "GetAsset", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.GetAsset", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_ListAssets_sync", + "title": "Snippet for the list_assets call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_assets.", + "file": "livestream_service/list_assets.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_assets", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_assets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::LiveStream::V1::ListAssetsResponse", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "ListAssets", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.ListAssets", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_GetPool_sync", + "title": "Snippet for the get_pool call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_pool.", + "file": "livestream_service/get_pool.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_pool", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_pool", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::GetPoolRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::LiveStream::V1::Pool", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "GetPool", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.GetPool", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "livestream_v1_generated_LivestreamService_UpdatePool_sync", + "title": "Snippet for the update_pool call in the LivestreamService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#update_pool.", + "file": "livestream_service/update_pool.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_pool", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#update_pool", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "LivestreamService::Client", + "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" + }, + "method": { + "short_name": "UpdatePool", + "full_name": "google.cloud.video.livestream.v1.LivestreamService.UpdatePool", + "service": { + "short_name": "LivestreamService", + "full_name": "google.cloud.video.livestream.v1.LivestreamService" + } + } + }, + "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-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_operations_test.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_operations_test.rb new file mode 100644 index 000000000000..6d395ffb507e --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_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/video/livestream/v1/service_pb" +require "google/cloud/video/livestream/v1/service_services_pb" +require "google/cloud/video/live_stream/v1/livestream_service" + +class ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::V1::LivestreamService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_paths_test.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_paths_test.rb new file mode 100644 index 000000000000..ae4c7b52909c --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_paths_test.rb @@ -0,0 +1,163 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/video/live_stream/v1/livestream_service" + +class ::Google::Cloud::Video::LiveStream::V1::LivestreamService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_asset_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.asset_path project: "value0", location: "value1", asset: "value2" + assert_equal "projects/value0/locations/value1/assets/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::Video::LiveStream::V1::LivestreamService::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_clip_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.clip_path project: "value0", location: "value1", channel: "value2", clip: "value3" + assert_equal "projects/value0/locations/value1/channels/value2/clips/value3", path + end + end + + def test_dvr_session_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dvr_session_path project: "value0", location: "value1", channel: "value2", dvr_session: "value3" + assert_equal "projects/value0/locations/value1/channels/value2/dvrSessions/value3", path + end + end + + def test_event_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.event_path project: "value0", location: "value1", channel: "value2", event: "value3" + assert_equal "projects/value0/locations/value1/channels/value2/events/value3", path + end + end + + def test_input_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.input_path project: "value0", location: "value1", input: "value2" + assert_equal "projects/value0/locations/value1/inputs/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::Video::LiveStream::V1::LivestreamService::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_network_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.network_path project: "value0", network: "value1" + assert_equal "projects/value0/global/networks/value1", path + end + end + + def test_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::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.pool_path project: "value0", location: "value1", pool: "value2" + assert_equal "projects/value0/locations/value1/pools/value2", path + end + end + + def test_secret_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::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.secret_version_path project: "value0", secret: "value1", version: "value2" + assert_equal "projects/value0/secrets/value1/versions/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_rest_test.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_rest_test.rb new file mode 100644 index 000000000000..c116c36189e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_rest_test.rb @@ -0,0 +1,1998 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/video/livestream/v1/service_pb" +require "google/cloud/video/live_stream/v1/livestream_service/rest" + + +class ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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_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" + request_id = "hello world" + + 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::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_create_channel_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_channel_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_channel({ parent: parent, channel: channel, channel_id: channel_id, request_id: request_id }) 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, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_channel ::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest.new(parent: parent, channel: channel, channel_id: channel_id, request_id: request_id) 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, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_channel(::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest.new(parent: parent, channel: channel, channel_id: channel_id, request_id: request_id), 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_list_channels + # Create test objects. + client_result = ::Google::Cloud::Video::LiveStream::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" + filter = "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::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_list_channels_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_channels_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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, filter: filter, 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, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_channels ::Google::Cloud::Video::LiveStream::V1::ListChannelsRequest.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_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_channels(::Google::Cloud::Video::LiveStream::V1::ListChannelsRequest.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_channels_client_stub.call_count + end + end + end + + def test_get_channel + # Create test objects. + client_result = ::Google::Cloud::Video::LiveStream::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::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_get_channel_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_channel_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::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::Video::LiveStream::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_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" + request_id = "hello world" + force = 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::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_delete_channel_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_channel_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_channel({ name: name, request_id: request_id, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_channel name: name, request_id: request_id, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_channel ::Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest.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_channel({ 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_channel(::Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest.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_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. + update_mask = {} + channel = {} + request_id = "hello world" + + 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::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_update_channel_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_channel_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_channel({ update_mask: update_mask, channel: channel, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_channel update_mask: update_mask, channel: channel, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_channel ::Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest.new(update_mask: update_mask, channel: channel, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_channel({ update_mask: update_mask, channel: channel, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_channel(::Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest.new(update_mask: update_mask, channel: channel, request_id: request_id), 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_start_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" + request_id = "hello world" + + start_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::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_start_channel_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, start_channel_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.start_channel({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.start_channel name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.start_channel ::Google::Cloud::Video::LiveStream::V1::StartChannelRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.start_channel({ 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.start_channel(::Google::Cloud::Video::LiveStream::V1::StartChannelRequest.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, start_channel_client_stub.call_count + end + end + end + + def test_stop_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" + request_id = "hello world" + + stop_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::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_stop_channel_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, stop_channel_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.stop_channel({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.stop_channel name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.stop_channel ::Google::Cloud::Video::LiveStream::V1::StopChannelRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.stop_channel({ 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.stop_channel(::Google::Cloud::Video::LiveStream::V1::StopChannelRequest.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, stop_channel_client_stub.call_count + end + end + end + + def test_start_distribution + # Create test objects. + 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" + distribution_keys = ["hello world"] + request_id = "hello world" + + start_distribution_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_start_distribution_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, start_distribution_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.start_distribution({ name: name, distribution_keys: distribution_keys, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.start_distribution name: name, distribution_keys: distribution_keys, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.start_distribution ::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest.new(name: name, distribution_keys: distribution_keys, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.start_distribution({ name: name, distribution_keys: distribution_keys, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.start_distribution(::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest.new(name: name, distribution_keys: distribution_keys, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, start_distribution_client_stub.call_count + end + end + end + + def test_stop_distribution + # Create test objects. + 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" + distribution_keys = ["hello world"] + request_id = "hello world" + + stop_distribution_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_stop_distribution_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, stop_distribution_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.stop_distribution({ name: name, distribution_keys: distribution_keys, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.stop_distribution name: name, distribution_keys: distribution_keys, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.stop_distribution ::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest.new(name: name, distribution_keys: distribution_keys, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.stop_distribution({ name: name, distribution_keys: distribution_keys, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.stop_distribution(::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest.new(name: name, distribution_keys: distribution_keys, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, stop_distribution_client_stub.call_count + end + end + end + + def test_create_input + # Create test objects. + 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" + input = {} + input_id = "hello world" + request_id = "hello world" + + create_input_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_create_input_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_input_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_input({ parent: parent, input: input, input_id: input_id, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_input parent: parent, input: input, input_id: input_id, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_input ::Google::Cloud::Video::LiveStream::V1::CreateInputRequest.new(parent: parent, input: input, input_id: input_id, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_input({ parent: parent, input: input, input_id: input_id, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_input(::Google::Cloud::Video::LiveStream::V1::CreateInputRequest.new(parent: parent, input: input, input_id: input_id, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_input_client_stub.call_count + end + end + end + + def test_list_inputs + # Create test objects. + client_result = ::Google::Cloud::Video::LiveStream::V1::ListInputsResponse.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_inputs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_list_inputs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_inputs_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_inputs({ parent: parent, page_size: 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_inputs parent: parent, page_size: 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_inputs ::Google::Cloud::Video::LiveStream::V1::ListInputsRequest.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_inputs({ parent: parent, page_size: page_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_inputs(::Google::Cloud::Video::LiveStream::V1::ListInputsRequest.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_inputs_client_stub.call_count + end + end + end + + def test_get_input + # Create test objects. + client_result = ::Google::Cloud::Video::LiveStream::V1::Input.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_input_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_get_input_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_input_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_input({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_input name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_input ::Google::Cloud::Video::LiveStream::V1::GetInputRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_input({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_input(::Google::Cloud::Video::LiveStream::V1::GetInputRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_input_client_stub.call_count + end + end + end + + def test_delete_input + # Create test objects. + 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_input_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_delete_input_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_input_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_input({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_input name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_input ::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest.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_input({ 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_input(::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest.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_input_client_stub.call_count + end + end + end + + def test_update_input + # Create test objects. + 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 = {} + input = {} + request_id = "hello world" + + update_input_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_update_input_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_input_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_input({ update_mask: update_mask, input: input, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_input update_mask: update_mask, input: input, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_input ::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest.new(update_mask: update_mask, input: input, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_input({ update_mask: update_mask, input: input, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_input(::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest.new(update_mask: update_mask, input: input, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_input_client_stub.call_count + end + end + end + + def test_preview_input + # Create test objects. + client_result = ::Google::Cloud::Video::LiveStream::V1::PreviewInputResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + preview_input_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_preview_input_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, preview_input_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.preview_input({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.preview_input name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.preview_input ::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.preview_input({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.preview_input(::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, preview_input_client_stub.call_count + end + end + end + + def test_create_event + # Create test objects. + client_result = ::Google::Cloud::Video::LiveStream::V1::Event.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + event = {} + event_id = "hello world" + request_id = "hello world" + + create_event_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_create_event_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_event_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_event({ parent: parent, event: event, event_id: event_id, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_event parent: parent, event: event, event_id: event_id, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_event ::Google::Cloud::Video::LiveStream::V1::CreateEventRequest.new(parent: parent, event: event, event_id: event_id, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_event({ parent: parent, event: event, event_id: event_id, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_event(::Google::Cloud::Video::LiveStream::V1::CreateEventRequest.new(parent: parent, event: event, event_id: event_id, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_event_client_stub.call_count + end + end + end + + def test_list_events + # Create test objects. + client_result = ::Google::Cloud::Video::LiveStream::V1::ListEventsResponse.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_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::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_list_events_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_events_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_events({ parent: parent, page_size: 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_events parent: parent, page_size: 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_events ::Google::Cloud::Video::LiveStream::V1::ListEventsRequest.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_events({ parent: parent, page_size: page_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_events(::Google::Cloud::Video::LiveStream::V1::ListEventsRequest.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_events_client_stub.call_count + end + end + end + + def test_get_event + # Create test objects. + client_result = ::Google::Cloud::Video::LiveStream::V1::Event.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_event_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_get_event_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_event_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_event({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_event name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_event ::Google::Cloud::Video::LiveStream::V1::GetEventRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_event({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_event(::Google::Cloud::Video::LiveStream::V1::GetEventRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_event_client_stub.call_count + end + end + end + + def test_delete_event + # 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" + request_id = "hello world" + + delete_event_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_delete_event_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_event_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_event({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_event name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_event ::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest.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_event({ 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_event(::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest.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_event_client_stub.call_count + end + end + end + + def test_list_clips + # Create test objects. + client_result = ::Google::Cloud::Video::LiveStream::V1::ListClipsResponse.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_clips_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_list_clips_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_clips_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_clips({ parent: parent, page_size: 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_clips parent: parent, page_size: 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_clips ::Google::Cloud::Video::LiveStream::V1::ListClipsRequest.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_clips({ parent: parent, page_size: page_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_clips(::Google::Cloud::Video::LiveStream::V1::ListClipsRequest.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_clips_client_stub.call_count + end + end + end + + def test_get_clip + # Create test objects. + client_result = ::Google::Cloud::Video::LiveStream::V1::Clip.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_clip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_get_clip_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_clip_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_clip({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_clip name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_clip ::Google::Cloud::Video::LiveStream::V1::GetClipRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_clip({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_clip(::Google::Cloud::Video::LiveStream::V1::GetClipRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_clip_client_stub.call_count + end + end + end + + def test_create_clip + # Create test objects. + 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" + clip_id = "hello world" + clip = {} + request_id = "hello world" + + create_clip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_create_clip_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_clip_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_clip({ parent: parent, clip_id: clip_id, clip: clip, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_clip parent: parent, clip_id: clip_id, clip: clip, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_clip ::Google::Cloud::Video::LiveStream::V1::CreateClipRequest.new(parent: parent, clip_id: clip_id, clip: clip, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_clip({ parent: parent, clip_id: clip_id, clip: clip, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_clip(::Google::Cloud::Video::LiveStream::V1::CreateClipRequest.new(parent: parent, clip_id: clip_id, clip: clip, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_clip_client_stub.call_count + end + end + end + + def test_delete_clip + # Create test objects. + 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_clip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_delete_clip_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_clip_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_clip({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_clip name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_clip ::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest.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_clip({ 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_clip(::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest.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_clip_client_stub.call_count + end + end + end + + def test_create_dvr_session + # Create test objects. + 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" + dvr_session_id = "hello world" + dvr_session = {} + request_id = "hello world" + + create_dvr_session_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_create_dvr_session_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_dvr_session_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_dvr_session({ parent: parent, dvr_session_id: dvr_session_id, dvr_session: dvr_session, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_dvr_session parent: parent, dvr_session_id: dvr_session_id, dvr_session: dvr_session, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_dvr_session ::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest.new(parent: parent, dvr_session_id: dvr_session_id, dvr_session: dvr_session, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_dvr_session({ parent: parent, dvr_session_id: dvr_session_id, dvr_session: dvr_session, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_dvr_session(::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest.new(parent: parent, dvr_session_id: dvr_session_id, dvr_session: dvr_session, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_dvr_session_client_stub.call_count + end + end + end + + def test_list_dvr_sessions + # Create test objects. + client_result = ::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsResponse.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_dvr_sessions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_list_dvr_sessions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_dvr_sessions_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_dvr_sessions({ parent: parent, page_size: 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_dvr_sessions parent: parent, page_size: 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_dvr_sessions ::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest.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_dvr_sessions({ parent: parent, page_size: page_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_dvr_sessions(::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest.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_dvr_sessions_client_stub.call_count + end + end + end + + def test_get_dvr_session + # Create test objects. + client_result = ::Google::Cloud::Video::LiveStream::V1::DvrSession.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_dvr_session_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_get_dvr_session_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_dvr_session_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_dvr_session({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_dvr_session name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_dvr_session ::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_dvr_session({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_dvr_session(::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_dvr_session_client_stub.call_count + end + end + end + + def test_delete_dvr_session + # Create test objects. + 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_dvr_session_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_delete_dvr_session_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_dvr_session_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_dvr_session({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_dvr_session name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_dvr_session ::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest.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_dvr_session({ 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_dvr_session(::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest.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_dvr_session_client_stub.call_count + end + end + end + + def test_update_dvr_session + # Create test objects. + 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 = {} + dvr_session = {} + request_id = "hello world" + + update_dvr_session_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_update_dvr_session_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_dvr_session_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_dvr_session({ update_mask: update_mask, dvr_session: dvr_session, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_dvr_session update_mask: update_mask, dvr_session: dvr_session, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_dvr_session ::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest.new(update_mask: update_mask, dvr_session: dvr_session, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_dvr_session({ update_mask: update_mask, dvr_session: dvr_session, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_dvr_session(::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest.new(update_mask: update_mask, dvr_session: dvr_session, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_dvr_session_client_stub.call_count + end + end + end + + def test_create_asset + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + asset = {} + asset_id = "hello world" + request_id = "hello world" + + create_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_create_asset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_asset_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_asset({ parent: parent, asset: asset, asset_id: asset_id, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_asset parent: parent, asset: asset, asset_id: asset_id, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_asset ::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest.new(parent: parent, asset: asset, asset_id: asset_id, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_asset({ parent: parent, asset: asset, asset_id: asset_id, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_asset(::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest.new(parent: parent, asset: asset, asset_id: asset_id, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_asset_client_stub.call_count + end + end + end + + def test_delete_asset + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_delete_asset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_asset_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_asset({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_asset name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_asset ::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest.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_asset({ 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_asset(::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest.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_asset_client_stub.call_count + end + end + end + + def test_get_asset + # Create test objects. + client_result = ::Google::Cloud::Video::LiveStream::V1::Asset.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_get_asset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_asset_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_asset({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_asset name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_asset ::Google::Cloud::Video::LiveStream::V1::GetAssetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_asset({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_asset(::Google::Cloud::Video::LiveStream::V1::GetAssetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_asset_client_stub.call_count + end + end + end + + def test_list_assets + # Create test objects. + client_result = ::Google::Cloud::Video::LiveStream::V1::ListAssetsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_list_assets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_assets_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_assets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_assets ::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_assets(::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_assets_client_stub.call_count + end + end + end + + def test_get_pool + # Create test objects. + client_result = ::Google::Cloud::Video::LiveStream::V1::Pool.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_pool_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_get_pool_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_pool_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_pool({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_pool name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_pool ::Google::Cloud::Video::LiveStream::V1::GetPoolRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_pool({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_pool(::Google::Cloud::Video::LiveStream::V1::GetPoolRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_pool_client_stub.call_count + end + end + end + + def test_update_pool + # Create test objects. + 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 = {} + pool = {} + request_id = "hello world" + + update_pool_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_update_pool_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_pool_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_pool({ update_mask: update_mask, pool: pool, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_pool update_mask: update_mask, pool: pool, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_pool ::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest.new(update_mask: update_mask, pool: pool, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_pool({ update_mask: update_mask, pool: pool, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_pool(::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest.new(update_mask: update_mask, pool: pool, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_pool_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::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::V1::LivestreamService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_test.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_test.rb new file mode 100644 index 000000000000..bf117eb14fe0 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_test.rb @@ -0,0 +1,2336 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/video/livestream/v1/service_pb" +require "google/cloud/video/live_stream/v1/livestream_service" + +class ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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_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" + request_id = "hello world" + + create_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_channel, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::LiveStream::V1::Channel), request["channel"] + assert_equal "hello world", request["channel_id"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_channel_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_channel({ parent: parent, channel: channel, channel_id: channel_id, 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_channel parent: parent, channel: channel, channel_id: channel_id, 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_channel ::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest.new(parent: parent, channel: channel, channel_id: channel_id, 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_channel({ parent: parent, channel: channel, channel_id: channel_id, 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_channel(::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest.new(parent: parent, channel: channel, channel_id: channel_id, 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_channel_client_stub.call_rpc_count + end + end + + def test_list_channels + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::LiveStream::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" + filter = "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::Video::LiveStream::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["filter"] + 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::Video::LiveStream::V1::LivestreamService::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, filter: filter, order_by: 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, filter: filter, order_by: 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::Video::LiveStream::V1::ListChannelsRequest.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_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_channels(::Google::Cloud::Video::LiveStream::V1::ListChannelsRequest.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_channels_client_stub.call_rpc_count + end + end + + def test_get_channel + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::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::Video::LiveStream::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_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" + request_id = "hello world" + force = 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::Video::LiveStream::V1::DeleteChannelRequest, 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_channel_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_channel({ 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_channel 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_channel ::Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest.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_channel({ 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_channel(::Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest.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_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. + update_mask = {} + channel = {} + request_id = "hello world" + + update_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_channel, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::LiveStream::V1::Channel), request["channel"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_channel_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_channel({ update_mask: update_mask, channel: channel, 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_channel update_mask: update_mask, channel: channel, 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_channel ::Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest.new(update_mask: update_mask, channel: channel, 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_channel({ update_mask: update_mask, channel: channel, 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_channel(::Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest.new(update_mask: update_mask, channel: channel, 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_channel_client_stub.call_rpc_count + end + end + + def test_start_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" + request_id = "hello world" + + start_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :start_channel, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::StartChannelRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, start_channel_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.start_channel({ 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.start_channel 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.start_channel ::Google::Cloud::Video::LiveStream::V1::StartChannelRequest.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.start_channel({ 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.start_channel(::Google::Cloud::Video::LiveStream::V1::StartChannelRequest.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, start_channel_client_stub.call_rpc_count + end + end + + def test_stop_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" + request_id = "hello world" + + stop_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :stop_channel, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::StopChannelRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, stop_channel_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.stop_channel({ 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.stop_channel 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.stop_channel ::Google::Cloud::Video::LiveStream::V1::StopChannelRequest.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.stop_channel({ 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.stop_channel(::Google::Cloud::Video::LiveStream::V1::StopChannelRequest.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, stop_channel_client_stub.call_rpc_count + end + end + + def test_start_distribution + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + distribution_keys = ["hello world"] + request_id = "hello world" + + start_distribution_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :start_distribution, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest, request + assert_equal "hello world", request["name"] + assert_equal ["hello world"], request["distribution_keys"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, start_distribution_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.start_distribution({ name: name, distribution_keys: distribution_keys, 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.start_distribution name: name, distribution_keys: distribution_keys, 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.start_distribution ::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest.new(name: name, distribution_keys: distribution_keys, 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.start_distribution({ name: name, distribution_keys: distribution_keys, 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.start_distribution(::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest.new(name: name, distribution_keys: distribution_keys, 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, start_distribution_client_stub.call_rpc_count + end + end + + def test_stop_distribution + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + distribution_keys = ["hello world"] + request_id = "hello world" + + stop_distribution_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :stop_distribution, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest, request + assert_equal "hello world", request["name"] + assert_equal ["hello world"], request["distribution_keys"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, stop_distribution_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.stop_distribution({ name: name, distribution_keys: distribution_keys, 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.stop_distribution name: name, distribution_keys: distribution_keys, 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.stop_distribution ::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest.new(name: name, distribution_keys: distribution_keys, 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.stop_distribution({ name: name, distribution_keys: distribution_keys, 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.stop_distribution(::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest.new(name: name, distribution_keys: distribution_keys, 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, stop_distribution_client_stub.call_rpc_count + end + end + + def test_create_input + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + input = {} + input_id = "hello world" + request_id = "hello world" + + create_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_input, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::CreateInputRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::LiveStream::V1::Input), request["input"] + assert_equal "hello world", request["input_id"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_input_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_input({ parent: parent, input: input, input_id: input_id, 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_input parent: parent, input: input, input_id: input_id, 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_input ::Google::Cloud::Video::LiveStream::V1::CreateInputRequest.new(parent: parent, input: input, input_id: input_id, 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_input({ parent: parent, input: input, input_id: input_id, 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_input(::Google::Cloud::Video::LiveStream::V1::CreateInputRequest.new(parent: parent, input: input, input_id: input_id, 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_input_client_stub.call_rpc_count + end + end + + def test_list_inputs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::LiveStream::V1::ListInputsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_inputs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_inputs, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::ListInputsRequest, 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_inputs_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_inputs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_inputs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_inputs ::Google::Cloud::Video::LiveStream::V1::ListInputsRequest.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_inputs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_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_inputs(::Google::Cloud::Video::LiveStream::V1::ListInputsRequest.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_inputs_client_stub.call_rpc_count + end + end + + def test_get_input + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::LiveStream::V1::Input.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_input, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::GetInputRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_input_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_input({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_input name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_input ::Google::Cloud::Video::LiveStream::V1::GetInputRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_input({ 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_input(::Google::Cloud::Video::LiveStream::V1::GetInputRequest.new(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_input_client_stub.call_rpc_count + end + end + + def test_delete_input + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_input, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_input_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_input({ 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_input 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_input ::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest.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_input({ 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_input(::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest.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_input_client_stub.call_rpc_count + end + end + + def test_update_input + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.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 = {} + input = {} + request_id = "hello world" + + update_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_input, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::LiveStream::V1::Input), request["input"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_input_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_input({ update_mask: update_mask, input: input, 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_input update_mask: update_mask, input: input, 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_input ::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest.new(update_mask: update_mask, input: input, 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_input({ update_mask: update_mask, input: input, 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_input(::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest.new(update_mask: update_mask, input: input, 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_input_client_stub.call_rpc_count + end + end + + def test_preview_input + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::LiveStream::V1::PreviewInputResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + preview_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :preview_input, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, preview_input_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.preview_input({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.preview_input name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.preview_input ::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.preview_input({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.preview_input(::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, preview_input_client_stub.call_rpc_count + end + end + + def test_create_event + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::LiveStream::V1::Event.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + event = {} + event_id = "hello world" + request_id = "hello world" + + create_event_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_event, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::CreateEventRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::LiveStream::V1::Event), request["event"] + assert_equal "hello world", request["event_id"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_event_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_event({ parent: parent, event: event, event_id: event_id, request_id: request_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_event parent: parent, event: event, event_id: event_id, request_id: request_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_event ::Google::Cloud::Video::LiveStream::V1::CreateEventRequest.new(parent: parent, event: event, event_id: event_id, request_id: request_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_event({ parent: parent, event: event, event_id: event_id, request_id: request_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_event(::Google::Cloud::Video::LiveStream::V1::CreateEventRequest.new(parent: parent, event: event, event_id: event_id, request_id: request_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_event_client_stub.call_rpc_count + end + end + + def test_list_events + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::LiveStream::V1::ListEventsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_events_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_events, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::ListEventsRequest, 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_events_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_events parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_events ::Google::Cloud::Video::LiveStream::V1::ListEventsRequest.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_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_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_events(::Google::Cloud::Video::LiveStream::V1::ListEventsRequest.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_events_client_stub.call_rpc_count + end + end + + def test_get_event + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::LiveStream::V1::Event.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_event_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_event, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::GetEventRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_event_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_event({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_event name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_event ::Google::Cloud::Video::LiveStream::V1::GetEventRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_event({ 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_event(::Google::Cloud::Video::LiveStream::V1::GetEventRequest.new(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_event_client_stub.call_rpc_count + end + end + + def test_delete_event + # 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" + request_id = "hello world" + + delete_event_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_event, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_event_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_event({ name: name, request_id: request_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_event name: name, request_id: request_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_event ::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest.new(name: name, request_id: request_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_event({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_event(::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_event_client_stub.call_rpc_count + end + end + + def test_list_clips + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::LiveStream::V1::ListClipsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_clips_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_clips, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::ListClipsRequest, 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_clips_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_clips({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_clips parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_clips ::Google::Cloud::Video::LiveStream::V1::ListClipsRequest.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_clips({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_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_clips(::Google::Cloud::Video::LiveStream::V1::ListClipsRequest.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_clips_client_stub.call_rpc_count + end + end + + def test_get_clip + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::LiveStream::V1::Clip.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_clip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_clip, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::GetClipRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_clip_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_clip({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_clip name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_clip ::Google::Cloud::Video::LiveStream::V1::GetClipRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_clip({ 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_clip(::Google::Cloud::Video::LiveStream::V1::GetClipRequest.new(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_clip_client_stub.call_rpc_count + end + end + + def test_create_clip + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + clip_id = "hello world" + clip = {} + request_id = "hello world" + + create_clip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_clip, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::CreateClipRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["clip_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::LiveStream::V1::Clip), request["clip"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_clip_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_clip({ parent: parent, clip_id: clip_id, clip: clip, 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_clip parent: parent, clip_id: clip_id, clip: clip, 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_clip ::Google::Cloud::Video::LiveStream::V1::CreateClipRequest.new(parent: parent, clip_id: clip_id, clip: clip, 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_clip({ parent: parent, clip_id: clip_id, clip: clip, 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_clip(::Google::Cloud::Video::LiveStream::V1::CreateClipRequest.new(parent: parent, clip_id: clip_id, clip: clip, 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_clip_client_stub.call_rpc_count + end + end + + def test_delete_clip + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_clip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_clip, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_clip_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_clip({ 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_clip 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_clip ::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest.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_clip({ 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_clip(::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest.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_clip_client_stub.call_rpc_count + end + end + + def test_create_dvr_session + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + dvr_session_id = "hello world" + dvr_session = {} + request_id = "hello world" + + create_dvr_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_dvr_session, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["dvr_session_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::LiveStream::V1::DvrSession), request["dvr_session"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_dvr_session_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_dvr_session({ parent: parent, dvr_session_id: dvr_session_id, dvr_session: dvr_session, 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_dvr_session parent: parent, dvr_session_id: dvr_session_id, dvr_session: dvr_session, 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_dvr_session ::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest.new(parent: parent, dvr_session_id: dvr_session_id, dvr_session: dvr_session, 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_dvr_session({ parent: parent, dvr_session_id: dvr_session_id, dvr_session: dvr_session, 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_dvr_session(::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest.new(parent: parent, dvr_session_id: dvr_session_id, dvr_session: dvr_session, 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_dvr_session_client_stub.call_rpc_count + end + end + + def test_list_dvr_sessions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_dvr_sessions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_dvr_sessions, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest, 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_dvr_sessions_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_dvr_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_dvr_sessions parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_dvr_sessions ::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest.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_dvr_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_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_dvr_sessions(::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest.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_dvr_sessions_client_stub.call_rpc_count + end + end + + def test_get_dvr_session + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::LiveStream::V1::DvrSession.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_dvr_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_dvr_session, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_dvr_session_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_dvr_session({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_dvr_session name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_dvr_session ::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_dvr_session({ 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_dvr_session(::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest.new(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_dvr_session_client_stub.call_rpc_count + end + end + + def test_delete_dvr_session + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_dvr_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_dvr_session, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_dvr_session_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_dvr_session({ 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_dvr_session 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_dvr_session ::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest.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_dvr_session({ 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_dvr_session(::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest.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_dvr_session_client_stub.call_rpc_count + end + end + + def test_update_dvr_session + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.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 = {} + dvr_session = {} + request_id = "hello world" + + update_dvr_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_dvr_session, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::LiveStream::V1::DvrSession), request["dvr_session"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_dvr_session_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_dvr_session({ update_mask: update_mask, dvr_session: dvr_session, 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_dvr_session update_mask: update_mask, dvr_session: dvr_session, 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_dvr_session ::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest.new(update_mask: update_mask, dvr_session: dvr_session, 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_dvr_session({ update_mask: update_mask, dvr_session: dvr_session, 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_dvr_session(::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest.new(update_mask: update_mask, dvr_session: dvr_session, 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_dvr_session_client_stub.call_rpc_count + end + end + + def test_create_asset + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + asset = {} + asset_id = "hello world" + request_id = "hello world" + + create_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_asset, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::LiveStream::V1::Asset), request["asset"] + assert_equal "hello world", request["asset_id"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_asset_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_asset({ parent: parent, asset: asset, asset_id: asset_id, 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_asset parent: parent, asset: asset, asset_id: asset_id, 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_asset ::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest.new(parent: parent, asset: asset, asset_id: asset_id, 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_asset({ parent: parent, asset: asset, asset_id: asset_id, 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_asset(::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest.new(parent: parent, asset: asset, asset_id: asset_id, 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_asset_client_stub.call_rpc_count + end + end + + def test_delete_asset + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_asset, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_asset_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_asset({ 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_asset 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_asset ::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest.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_asset({ 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_asset(::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest.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_asset_client_stub.call_rpc_count + end + end + + def test_get_asset + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::LiveStream::V1::Asset.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_asset, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::GetAssetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_asset_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_asset({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_asset name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_asset ::Google::Cloud::Video::LiveStream::V1::GetAssetRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_asset({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_asset(::Google::Cloud::Video::LiveStream::V1::GetAssetRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_asset_client_stub.call_rpc_count + end + end + + def test_list_assets + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::LiveStream::V1::ListAssetsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_assets, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_assets_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_assets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_assets ::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_assets(::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_assets_client_stub.call_rpc_count + end + end + + def test_get_pool + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::LiveStream::V1::Pool.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_pool, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::GetPoolRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_pool_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_pool({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_pool name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_pool ::Google::Cloud::Video::LiveStream::V1::GetPoolRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_pool({ 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_pool(::Google::Cloud::Video::LiveStream::V1::GetPoolRequest.new(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_pool_client_stub.call_rpc_count + end + end + + def test_update_pool + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.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 = {} + pool = {} + request_id = "hello world" + + update_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_pool, name + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::LiveStream::V1::Pool), request["pool"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_pool_client_stub do + # Create client + client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_pool({ update_mask: update_mask, pool: pool, 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_pool update_mask: update_mask, pool: pool, 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_pool ::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest.new(update_mask: update_mask, pool: pool, 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_pool({ update_mask: update_mask, pool: pool, 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_pool(::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest.new(update_mask: update_mask, pool: pool, 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_pool_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::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::V1::LivestreamService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/test/helper.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-live_stream-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/.gitignore b/owl-bot-staging/google-cloud-video-stitcher-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-video-stitcher-v1/.repo-metadata.json new file mode 100644 index 000000000000..5c95871d9709 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "videostitcher.googleapis.com", + "api_shortname": "videostitcher", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-video-stitcher-v1/latest", + "distribution_name": "google-cloud-video-stitcher-v1", + "is_cloud": true, + "language": "ruby", + "name": "videostitcher", + "name_pretty": "Video Stitcher V1 API", + "product_documentation": "https://cloud.google.com/video-stitcher/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The Video Stitcher API allows you to manipulate video content to dynamically insert ads prior to delivery to client devices. Using the Video Stitcher API, you can monetize your video-on-demand (VOD) and livestreaming videos by inserting ads as described by metadata stored on ad servers. Note that google-cloud-video-stitcher-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video-stitcher instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/video-stitcher/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/.rubocop.yml b/owl-bot-staging/google-cloud-video-stitcher-v1/.rubocop.yml new file mode 100644 index 000000000000..6750e6a72b64 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-video-stitcher-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-video-stitcher-v1.rb" diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/.toys.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/.yardopts b/owl-bot-staging/google-cloud-video-stitcher-v1/.yardopts new file mode 100644 index 000000000000..a71ced3203b4 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Video Stitcher 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-video-stitcher-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-video-stitcher-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..85cec40eba69 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-video-stitcher-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-video-stitcher-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/video/stitcher/v1" + +client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/video/stitcher/v1" + +::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::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-video-stitcher-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/video/stitcher/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::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-video-stitcher-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-video-stitcher-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/Gemfile b/owl-bot-staging/google-cloud-video-stitcher-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/LICENSE.md b/owl-bot-staging/google-cloud-video-stitcher-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/README.md b/owl-bot-staging/google-cloud-video-stitcher-v1/README.md new file mode 100644 index 000000000000..06f29ac75e2b --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Video Stitcher V1 API + +API Client library for the Video Stitcher V1 API + +The Video Stitcher API allows you to manipulate video content to dynamically insert ads prior to delivery to client devices. Using the Video Stitcher API, you can monetize your video-on-demand (VOD) and livestreaming videos by inserting ads as described by metadata stored on ad servers. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Video Stitcher V1 API. Most users should consider using +the main client gem, +[google-cloud-video-stitcher](https://rubygems.org/gems/google-cloud-video-stitcher). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-video-stitcher-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/videostitcher.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/video/stitcher/v1" + +client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new +request = ::Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest.new # (request fields as keyword arguments...) +response = client.create_cdn_key request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-video-stitcher-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/video-stitcher/) +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/video/stitcher/v1" +require "logger" + +client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::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-video-stitcher`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-video-stitcher-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-video-stitcher`. +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-video-stitcher-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-video-stitcher-v1/Rakefile b/owl-bot-staging/google-cloud-video-stitcher-v1/Rakefile new file mode 100644 index 000000000000..9dc332412105 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-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/video/stitcher/v1/video_stitcher_service/credentials" + ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::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-video-stitcher-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-video-stitcher-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-video-stitcher-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-video-stitcher-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-video-stitcher-v1" + header "google-cloud-video-stitcher-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-video-stitcher-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-video-stitcher-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-video-stitcher-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-video-stitcher-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-video-stitcher-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-video-stitcher-v1/gapic_metadata.json new file mode 100644 index 000000000000..fc4ef14efe88 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/gapic_metadata.json @@ -0,0 +1,168 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.video.stitcher.v1", + "libraryPackage": "::Google::Cloud::Video::Stitcher::V1", + "services": { + "VideoStitcherService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client", + "rpcs": { + "CreateCdnKey": { + "methods": [ + "create_cdn_key" + ] + }, + "ListCdnKeys": { + "methods": [ + "list_cdn_keys" + ] + }, + "GetCdnKey": { + "methods": [ + "get_cdn_key" + ] + }, + "DeleteCdnKey": { + "methods": [ + "delete_cdn_key" + ] + }, + "UpdateCdnKey": { + "methods": [ + "update_cdn_key" + ] + }, + "CreateVodSession": { + "methods": [ + "create_vod_session" + ] + }, + "GetVodSession": { + "methods": [ + "get_vod_session" + ] + }, + "ListVodStitchDetails": { + "methods": [ + "list_vod_stitch_details" + ] + }, + "GetVodStitchDetail": { + "methods": [ + "get_vod_stitch_detail" + ] + }, + "ListVodAdTagDetails": { + "methods": [ + "list_vod_ad_tag_details" + ] + }, + "GetVodAdTagDetail": { + "methods": [ + "get_vod_ad_tag_detail" + ] + }, + "ListLiveAdTagDetails": { + "methods": [ + "list_live_ad_tag_details" + ] + }, + "GetLiveAdTagDetail": { + "methods": [ + "get_live_ad_tag_detail" + ] + }, + "CreateSlate": { + "methods": [ + "create_slate" + ] + }, + "ListSlates": { + "methods": [ + "list_slates" + ] + }, + "GetSlate": { + "methods": [ + "get_slate" + ] + }, + "UpdateSlate": { + "methods": [ + "update_slate" + ] + }, + "DeleteSlate": { + "methods": [ + "delete_slate" + ] + }, + "CreateLiveSession": { + "methods": [ + "create_live_session" + ] + }, + "GetLiveSession": { + "methods": [ + "get_live_session" + ] + }, + "CreateLiveConfig": { + "methods": [ + "create_live_config" + ] + }, + "ListLiveConfigs": { + "methods": [ + "list_live_configs" + ] + }, + "GetLiveConfig": { + "methods": [ + "get_live_config" + ] + }, + "DeleteLiveConfig": { + "methods": [ + "delete_live_config" + ] + }, + "UpdateLiveConfig": { + "methods": [ + "update_live_config" + ] + }, + "CreateVodConfig": { + "methods": [ + "create_vod_config" + ] + }, + "ListVodConfigs": { + "methods": [ + "list_vod_configs" + ] + }, + "GetVodConfig": { + "methods": [ + "get_vod_config" + ] + }, + "DeleteVodConfig": { + "methods": [ + "delete_vod_config" + ] + }, + "UpdateVodConfig": { + "methods": [ + "update_vod_config" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/google-cloud-video-stitcher-v1.gemspec b/owl-bot-staging/google-cloud-video-stitcher-v1/google-cloud-video-stitcher-v1.gemspec new file mode 100644 index 000000000000..17089d5a2781 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/google-cloud-video-stitcher-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/video/stitcher/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-video-stitcher-v1" + gem.version = Google::Cloud::Video::Stitcher::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The Video Stitcher API allows you to manipulate video content to dynamically insert ads prior to delivery to client devices. Using the Video Stitcher API, you can monetize your video-on-demand (VOD) and livestreaming videos by inserting ads as described by metadata stored on ad servers. Note that google-cloud-video-stitcher-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video-stitcher instead. See the readme for more details." + gem.summary = "API Client library for the Video Stitcher 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.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google-cloud-video-stitcher-v1.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google-cloud-video-stitcher-v1.rb new file mode 100644 index 000000000000..3ec70b3fd9d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google-cloud-video-stitcher-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/video/stitcher/v1" diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1.rb new file mode 100644 index 000000000000..a222bc758760 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/video/stitcher/v1/video_stitcher_service" +require "google/cloud/video/stitcher/v1/version" + +module Google + module Cloud + module Video + module Stitcher + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/video/stitcher/v1" + # client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/video/stitcher/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/ad_tag_details_pb.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/ad_tag_details_pb.rb new file mode 100644 index 000000000000..df61dc7bfc94 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/ad_tag_details_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/video/stitcher/v1/ad_tag_details.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/struct_pb' + + +descriptor_data = "\n3google/cloud/video/stitcher/v1/ad_tag_details.proto\x12\x1egoogle.cloud.video.stitcher.v1\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xff\x01\n\x0fLiveAdTagDetail\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x0b\x61\x64_requests\x18\x02 \x03(\x0b\x32).google.cloud.video.stitcher.v1.AdRequest:\x9d\x01\xea\x41\x99\x01\n,videostitcher.googleapis.com/LiveAdTagDetail\x12iprojects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}\"\xf9\x01\n\x0eVodAdTagDetail\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x0b\x61\x64_requests\x18\x02 \x03(\x0b\x32).google.cloud.video.stitcher.v1.AdRequest:\x98\x01\xea\x41\x94\x01\n+videostitcher.googleapis.com/VodAdTagDetail\x12\x65projects/{project}/locations/{location}/vodSessions/{vod_session}/vodAdTagDetails/{vod_ad_tag_detail}\"\xb0\x01\n\tAdRequest\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12I\n\x10request_metadata\x18\x02 \x01(\x0b\x32/.google.cloud.video.stitcher.v1.RequestMetadata\x12K\n\x11response_metadata\x18\x03 \x01(\x0b\x32\x30.google.cloud.video.stitcher.v1.ResponseMetadata\";\n\x0fRequestMetadata\x12(\n\x07headers\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xaf\x01\n\x10ResponseMetadata\x12\r\n\x05\x65rror\x18\x01 \x01(\t\x12(\n\x07headers\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x13\n\x0bstatus_code\x18\x03 \x01(\t\x12\x12\n\nsize_bytes\x18\x04 \x01(\x05\x12+\n\x08\x64uration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0c\n\x04\x62ody\x18\x06 \x01(\tBy\n\"com.google.cloud.video.stitcher.v1B\x11\x41\x64TagDetailsProtoP\x01Z>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Video + module Stitcher + module V1 + LiveAdTagDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.LiveAdTagDetail").msgclass + VodAdTagDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.VodAdTagDetail").msgclass + AdRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.AdRequest").msgclass + RequestMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.RequestMetadata").msgclass + ResponseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ResponseMetadata").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/cdn_keys_pb.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/cdn_keys_pb.rb new file mode 100644 index 000000000000..dc1c4e7c12cb --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/cdn_keys_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/video/stitcher/v1/cdn_keys.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n-google/cloud/video/stitcher/v1/cdn_keys.proto\x12\x1egoogle.cloud.video.stitcher.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xf5\x02\n\x06\x43\x64nKey\x12\x46\n\x0egoogle_cdn_key\x18\x05 \x01(\x0b\x32,.google.cloud.video.stitcher.v1.GoogleCdnKeyH\x00\x12\x46\n\x0e\x61kamai_cdn_key\x18\x06 \x01(\x0b\x32,.google.cloud.video.stitcher.v1.AkamaiCdnKeyH\x00\x12\x44\n\rmedia_cdn_key\x18\x08 \x01(\x0b\x32+.google.cloud.video.stitcher.v1.MediaCdnKeyH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08hostname\x18\x04 \x01(\t:c\xea\x41`\n#videostitcher.googleapis.com/CdnKey\x12\x39projects/{project}/locations/{location}/cdnKeys/{cdn_key}B\x10\n\x0e\x63\x64n_key_config\":\n\x0cGoogleCdnKey\x12\x18\n\x0bprivate_key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x04\x12\x10\n\x08key_name\x18\x02 \x01(\t\"&\n\x0c\x41kamaiCdnKey\x12\x16\n\ttoken_key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x04\"\xba\x01\n\x0bMediaCdnKey\x12\x18\n\x0bprivate_key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x04\x12\x10\n\x08key_name\x18\x02 \x01(\t\x12R\n\x0ctoken_config\x18\x03 \x01(\x0b\x32\x37.google.cloud.video.stitcher.v1.MediaCdnKey.TokenConfigB\x03\xe0\x41\x01\x1a+\n\x0bTokenConfig\x12\x1c\n\x0fquery_parameter\x18\x01 \x01(\tB\x03\xe0\x41\x01\x42t\n\"com.google.cloud.video.stitcher.v1B\x0c\x43\x64nKeysProtoP\x01Z>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Video + module Stitcher + module V1 + CdnKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.CdnKey").msgclass + GoogleCdnKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.GoogleCdnKey").msgclass + AkamaiCdnKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.AkamaiCdnKey").msgclass + MediaCdnKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.MediaCdnKey").msgclass + MediaCdnKey::TokenConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.MediaCdnKey.TokenConfig").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/companions_pb.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/companions_pb.rb new file mode 100644 index 000000000000..5ee3fc8a67fe --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/companions_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/video/stitcher/v1/companions.proto + +require 'google/protobuf' + +require 'google/cloud/video/stitcher/v1/events_pb' + + +descriptor_data = "\n/google/cloud/video/stitcher/v1/companions.proto\x12\x1egoogle.cloud.video.stitcher.v1\x1a+google/cloud/video/stitcher/v1/events.proto\"\x82\x02\n\x0c\x43ompanionAds\x12\\\n\x13\x64isplay_requirement\x18\x01 \x01(\x0e\x32?.google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement\x12=\n\ncompanions\x18\x02 \x03(\x0b\x32).google.cloud.video.stitcher.v1.Companion\"U\n\x12\x44isplayRequirement\x12#\n\x1f\x44ISPLAY_REQUIREMENT_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41LL\x10\x01\x12\x07\n\x03\x41NY\x10\x02\x12\x08\n\x04NONE\x10\x03\"\xf5\x03\n\tCompanion\x12N\n\x12iframe_ad_resource\x18\n \x01(\x0b\x32\x30.google.cloud.video.stitcher.v1.IframeAdResourceH\x00\x12N\n\x12static_ad_resource\x18\x0b \x01(\x0b\x32\x30.google.cloud.video.stitcher.v1.StaticAdResourceH\x00\x12J\n\x10html_ad_resource\x18\x0c \x01(\x0b\x32..google.cloud.video.stitcher.v1.HtmlAdResourceH\x00\x12\x15\n\rapi_framework\x18\x01 \x01(\t\x12\x11\n\theight_px\x18\x02 \x01(\x05\x12\x10\n\x08width_px\x18\x03 \x01(\x05\x12\x17\n\x0f\x61sset_height_px\x18\x04 \x01(\x05\x12\x1a\n\x12\x65xpanded_height_px\x18\x05 \x01(\x05\x12\x16\n\x0e\x61sset_width_px\x18\x06 \x01(\x05\x12\x19\n\x11\x65xpanded_width_px\x18\x07 \x01(\x05\x12\x12\n\nad_slot_id\x18\x08 \x01(\t\x12\x35\n\x06\x65vents\x18\t \x03(\x0b\x32%.google.cloud.video.stitcher.v1.EventB\r\n\x0b\x61\x64_resource\"%\n\x0eHtmlAdResource\x12\x13\n\x0bhtml_source\x18\x01 \x01(\t\"\x1f\n\x10IframeAdResource\x12\x0b\n\x03uri\x18\x01 \x01(\t\"6\n\x10StaticAdResource\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x15\n\rcreative_type\x18\x02 \x01(\tBw\n\"com.google.cloud.video.stitcher.v1B\x0f\x43ompanionsProtoP\x01Z>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Video + module Stitcher + module V1 + CompanionAds = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.CompanionAds").msgclass + CompanionAds::DisplayRequirement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement").enummodule + Companion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.Companion").msgclass + HtmlAdResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.HtmlAdResource").msgclass + IframeAdResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.IframeAdResource").msgclass + StaticAdResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.StaticAdResource").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/events_pb.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/events_pb.rb new file mode 100644 index 000000000000..b0a9c9265b93 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/events_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/video/stitcher/v1/events.proto + +require 'google/protobuf' + +require 'google/protobuf/duration_pb' + + +descriptor_data = "\n+google/cloud/video/stitcher/v1/events.proto\x12\x1egoogle.cloud.video.stitcher.v1\x1a\x1egoogle/protobuf/duration.proto\"\x8e\x04\n\x05\x45vent\x12=\n\x04type\x18\x01 \x01(\x0e\x32/.google.cloud.video.stitcher.v1.Event.EventType\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\n\n\x02id\x18\x03 \x01(\t\x12)\n\x06offset\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x81\x03\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rCREATIVE_VIEW\x10\x01\x12\t\n\x05START\x10\x02\x12\x0f\n\x0b\x42REAK_START\x10\x03\x12\r\n\tBREAK_END\x10\x04\x12\x0e\n\nIMPRESSION\x10\x05\x12\x12\n\x0e\x46IRST_QUARTILE\x10\x06\x12\x0c\n\x08MIDPOINT\x10\x07\x12\x12\n\x0eTHIRD_QUARTILE\x10\x08\x12\x0c\n\x08\x43OMPLETE\x10\t\x12\x0c\n\x08PROGRESS\x10\n\x12\x08\n\x04MUTE\x10\x0b\x12\n\n\x06UNMUTE\x10\x0c\x12\t\n\x05PAUSE\x10\r\x12\t\n\x05\x43LICK\x10\x0e\x12\x11\n\rCLICK_THROUGH\x10\x0f\x12\n\n\x06REWIND\x10\x10\x12\n\n\x06RESUME\x10\x11\x12\t\n\x05\x45RROR\x10\x12\x12\n\n\x06\x45XPAND\x10\x15\x12\x0c\n\x08\x43OLLAPSE\x10\x16\x12\t\n\x05\x43LOSE\x10\x18\x12\x10\n\x0c\x43LOSE_LINEAR\x10\x19\x12\x08\n\x04SKIP\x10\x1a\x12\x15\n\x11\x41\x43\x43\x45PT_INVITATION\x10\x1b\"v\n\rProgressEvent\x12.\n\x0btime_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x06\x65vents\x18\x02 \x03(\x0b\x32%.google.cloud.video.stitcher.v1.EventBs\n\"com.google.cloud.video.stitcher.v1B\x0b\x45ventsProtoP\x01Z>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Video + module Stitcher + module V1 + Event = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.Event").msgclass + Event::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.Event.EventType").enummodule + ProgressEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ProgressEvent").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/fetch_options_pb.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/fetch_options_pb.rb new file mode 100644 index 000000000000..2bf23c9feba0 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/fetch_options_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/video/stitcher/v1/fetch_options.proto + +require 'google/protobuf' + + +descriptor_data = "\n2google/cloud/video/stitcher/v1/fetch_options.proto\x12\x1egoogle.cloud.video.stitcher.v1\"\x8a\x01\n\x0c\x46\x65tchOptions\x12J\n\x07headers\x18\x01 \x03(\x0b\x32\x39.google.cloud.video.stitcher.v1.FetchOptions.HeadersEntry\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42y\n\"com.google.cloud.video.stitcher.v1B\x11\x46\x65tchOptionsProtoP\x01Z>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Video + module Stitcher + module V1 + FetchOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.FetchOptions").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/live_configs_pb.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/live_configs_pb.rb new file mode 100644 index 000000000000..967531ee3d21 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/live_configs_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/video/stitcher/v1/live_configs.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/video/stitcher/v1/fetch_options_pb' +require 'google/protobuf/duration_pb' + + +descriptor_data = "\n1google/cloud/video/stitcher/v1/live_configs.proto\x12\x1egoogle.cloud.video.stitcher.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/video/stitcher/v1/fetch_options.proto\x1a\x1egoogle/protobuf/duration.proto\"\xda\x06\n\nLiveConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nsource_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nad_tag_uri\x18\x03 \x01(\t\x12\x46\n\x0fgam_live_config\x18\x04 \x01(\x0b\x32-.google.cloud.video.stitcher.v1.GamLiveConfig\x12\x44\n\x05state\x18\x05 \x01(\x0e\x32\x30.google.cloud.video.stitcher.v1.LiveConfig.StateB\x03\xe0\x41\x03\x12\x44\n\x0b\x61\x64_tracking\x18\x06 \x01(\x0e\x32*.google.cloud.video.stitcher.v1.AdTrackingB\x03\xe0\x41\x02\x12>\n\rdefault_slate\x18\x07 \x01(\tB\'\xfa\x41$\n\"videostitcher.googleapis.com/Slate\x12T\n\x10stitching_policy\x18\x08 \x01(\x0e\x32:.google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy\x12G\n\x0fprefetch_config\x18\n \x01(\x0b\x32..google.cloud.video.stitcher.v1.PrefetchConfig\x12J\n\x14source_fetch_options\x18\x10 \x01(\x0b\x32,.google.cloud.video.stitcher.v1.FetchOptions\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\"U\n\x0fStitchingPolicy\x12 \n\x1cSTITCHING_POLICY_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x43UT_CURRENT\x10\x01\x12\x0f\n\x0b\x43OMPLETE_AD\x10\x02:o\xea\x41l\n\'videostitcher.googleapis.com/LiveConfig\x12\x41projects/{project}/locations/{location}/liveConfigs/{live_config}\"f\n\x0ePrefetchConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12>\n\x1binitial_ad_request_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"a\n\rGamLiveConfig\x12\x19\n\x0cnetwork_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tasset_key\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x63ustom_asset_key\x18\x03 \x01(\tB\x03\xe0\x41\x03*A\n\nAdTracking\x12\x1b\n\x17\x41\x44_TRACKING_UNSPECIFIED\x10\x00\x12\n\n\x06\x43LIENT\x10\x01\x12\n\n\x06SERVER\x10\x02\x42x\n\"com.google.cloud.video.stitcher.v1B\x10LiveConfigsProtoP\x01Z>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Video + module Stitcher + module V1 + LiveConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.LiveConfig").msgclass + LiveConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.LiveConfig.State").enummodule + LiveConfig::StitchingPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy").enummodule + PrefetchConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.PrefetchConfig").msgclass + GamLiveConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.GamLiveConfig").msgclass + AdTracking = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.AdTracking").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/sessions_pb.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/sessions_pb.rb new file mode 100644 index 000000000000..6d8a8b838511 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/sessions_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/video/stitcher/v1/sessions.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/video/stitcher/v1/companions_pb' +require 'google/cloud/video/stitcher/v1/events_pb' +require 'google/cloud/video/stitcher/v1/live_configs_pb' +require 'google/protobuf/duration_pb' + + +descriptor_data = "\n-google/cloud/video/stitcher/v1/sessions.proto\x12\x1egoogle.cloud.video.stitcher.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/cloud/video/stitcher/v1/companions.proto\x1a+google/cloud/video/stitcher/v1/events.proto\x1a\x31google/cloud/video/stitcher/v1/live_configs.proto\x1a\x1egoogle/protobuf/duration.proto\"\xa2\x06\n\nVodSession\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12I\n\rinterstitials\x18\x02 \x01(\x0b\x32-.google.cloud.video.stitcher.v1.InterstitialsB\x03\xe0\x41\x03\x12\x15\n\x08play_uri\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\nsource_uri\x18\x05 \x01(\t\x12\x12\n\nad_tag_uri\x18\x06 \x01(\t\x12W\n\x10\x61\x64_tag_macro_map\x18\x07 \x03(\x0b\x32=.google.cloud.video.stitcher.v1.VodSession.AdTagMacroMapEntry\x12I\n\x10manifest_options\x18\t \x01(\x0b\x32/.google.cloud.video.stitcher.v1.ManifestOptions\x12\x15\n\x08\x61sset_id\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x44\n\x0b\x61\x64_tracking\x18\x0b \x01(\x0e\x32*.google.cloud.video.stitcher.v1.AdTrackingB\x03\xe0\x41\x02\x12L\n\x0cgam_settings\x18\r \x01(\x0b\x32\x36.google.cloud.video.stitcher.v1.VodSession.GamSettings\x12?\n\nvod_config\x18\x0e \x01(\tB+\xfa\x41(\n&videostitcher.googleapis.com/VodConfig\x1a@\n\x0bGamSettings\x12\x19\n\x0cnetwork_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tstream_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\x34\n\x12\x41\x64TagMacroMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:o\xea\x41l\n\'videostitcher.googleapis.com/VodSession\x12\x41projects/{project}/locations/{location}/vodSessions/{vod_session}\"\xa1\x01\n\rInterstitials\x12\x44\n\tad_breaks\x18\x01 \x03(\x0b\x32\x31.google.cloud.video.stitcher.v1.VodSessionAdBreak\x12J\n\x0fsession_content\x18\x02 \x01(\x0b\x32\x31.google.cloud.video.stitcher.v1.VodSessionContent\"\xc0\x01\n\x0cVodSessionAd\x12+\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x43\n\rcompanion_ads\x18\x02 \x01(\x0b\x32,.google.cloud.video.stitcher.v1.CompanionAds\x12>\n\x0f\x61\x63tivity_events\x18\x03 \x03(\x0b\x32%.google.cloud.video.stitcher.v1.Event\"@\n\x11VodSessionContent\x12+\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x80\x02\n\x11VodSessionAdBreak\x12\x46\n\x0fprogress_events\x18\x01 \x03(\x0b\x32-.google.cloud.video.stitcher.v1.ProgressEvent\x12\x39\n\x03\x61\x64s\x18\x02 \x03(\x0b\x32,.google.cloud.video.stitcher.v1.VodSessionAd\x12\x32\n\x0f\x65nd_time_offset\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11start_time_offset\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xa9\x06\n\x0bLiveSession\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08play_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12S\n\rad_tag_macros\x18\x06 \x03(\x0b\x32<.google.cloud.video.stitcher.v1.LiveSession.AdTagMacrosEntry\x12I\n\x10manifest_options\x18\n \x01(\x0b\x32/.google.cloud.video.stitcher.v1.ManifestOptions\x12M\n\x0cgam_settings\x18\x0f \x01(\x0b\x32\x37.google.cloud.video.stitcher.v1.LiveSession.GamSettings\x12\x44\n\x0blive_config\x18\x10 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'videostitcher.googleapis.com/LiveConfig\x12?\n\x0b\x61\x64_tracking\x18\x11 \x01(\x0e\x32*.google.cloud.video.stitcher.v1.AdTracking\x1a\xd1\x01\n\x0bGamSettings\x12\x16\n\tstream_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12n\n\x14targeting_parameters\x18\x04 \x03(\x0b\x32P.google.cloud.video.stitcher.v1.LiveSession.GamSettings.TargetingParametersEntry\x1a:\n\x18TargetingParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41\x64TagMacrosEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:r\xea\x41o\n(videostitcher.googleapis.com/LiveSession\x12\x43projects/{project}/locations/{location}/liveSessions/{live_session}\"\xfe\x01\n\x0fManifestOptions\x12K\n\x12include_renditions\x18\x01 \x03(\x0b\x32/.google.cloud.video.stitcher.v1.RenditionFilter\x12R\n\rbitrate_order\x18\x02 \x01(\x0e\x32;.google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy\"J\n\x0bOrderPolicy\x12\x1c\n\x18ORDER_POLICY_UNSPECIFIED\x10\x00\x12\r\n\tASCENDING\x10\x01\x12\x0e\n\nDESCENDING\x10\x02\"6\n\x0fRenditionFilter\x12\x13\n\x0b\x62itrate_bps\x18\x01 \x01(\x05\x12\x0e\n\x06\x63odecs\x18\x02 \x01(\tBu\n\"com.google.cloud.video.stitcher.v1B\rSessionsProtoP\x01Z>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Video + module Stitcher + module V1 + VodSession = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.VodSession").msgclass + VodSession::GamSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.VodSession.GamSettings").msgclass + Interstitials = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.Interstitials").msgclass + VodSessionAd = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.VodSessionAd").msgclass + VodSessionContent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.VodSessionContent").msgclass + VodSessionAdBreak = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.VodSessionAdBreak").msgclass + LiveSession = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.LiveSession").msgclass + LiveSession::GamSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.LiveSession.GamSettings").msgclass + ManifestOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ManifestOptions").msgclass + ManifestOptions::OrderPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy").enummodule + RenditionFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.RenditionFilter").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/slates_pb.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/slates_pb.rb new file mode 100644 index 000000000000..2e7747c94ad6 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/slates_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/video/stitcher/v1/slates.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n+google/cloud/video/stitcher/v1/slates.proto\x12\x1egoogle.cloud.video.stitcher.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x8d\x02\n\x05Slate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x41\n\tgam_slate\x18\x03 \x01(\x0b\x32..google.cloud.video.stitcher.v1.Slate.GamSlate\x1a@\n\x08GamSlate\x12\x19\n\x0cnetwork_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cgam_slate_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03:_\xea\x41\\\n\"videostitcher.googleapis.com/Slate\x12\x36projects/{project}/locations/{location}/slates/{slate}Bs\n\"com.google.cloud.video.stitcher.v1B\x0bSlatesProtoP\x01Z>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Video + module Stitcher + module V1 + Slate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.Slate").msgclass + Slate::GamSlate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.Slate.GamSlate").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/stitch_details_pb.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/stitch_details_pb.rb new file mode 100644 index 000000000000..f5b143c0483a --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/stitch_details_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/video/stitcher/v1/stitch_details.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/struct_pb' + + +descriptor_data = "\n3google/cloud/video/stitcher/v1/stitch_details.proto\x12\x1egoogle.cloud.video.stitcher.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x87\x02\n\x0fVodStitchDetail\x12\x0c\n\x04name\x18\x01 \x01(\t\x12I\n\x11\x61\x64_stitch_details\x18\x03 \x03(\x0b\x32..google.cloud.video.stitcher.v1.AdStitchDetail:\x9a\x01\xea\x41\x96\x01\n,videostitcher.googleapis.com/VodStitchDetail\x12\x66projects/{project}/locations/{location}/vodSessions/{vod_session}/vodStitchDetails/{vod_stitch_detail}\"\xa5\x02\n\x0e\x41\x64StitchDetail\x12\x18\n\x0b\x61\x64_break_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05\x61\x64_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x0e\x61\x64_time_offset\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12\x18\n\x0bskip_reason\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12M\n\x05media\x18\x05 \x03(\x0b\x32\x39.google.cloud.video.stitcher.v1.AdStitchDetail.MediaEntryB\x03\xe0\x41\x01\x1a\x44\n\nMediaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x42z\n\"com.google.cloud.video.stitcher.v1B\x12StitchDetailsProtoP\x01Z>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Video + module Stitcher + module V1 + VodStitchDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.VodStitchDetail").msgclass + AdStitchDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.AdStitchDetail").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/version.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/version.rb new file mode 100644 index 000000000000..eb990bd3df9c --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/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 Video + module Stitcher + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service.rb new file mode 100644 index 000000000000..e17ce9b8d1a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_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/video/stitcher/v1/version" + +require "google/cloud/video/stitcher/v1/video_stitcher_service/credentials" +require "google/cloud/video/stitcher/v1/video_stitcher_service/paths" +require "google/cloud/video/stitcher/v1/video_stitcher_service/operations" +require "google/cloud/video/stitcher/v1/video_stitcher_service/client" + +module Google + module Cloud + module Video + module Stitcher + module V1 + ## + # Video-On-Demand content stitching API allows you to insert ads + # into (VoD) video on demand files. You will be able to render custom + # scrubber bars with highlighted ads, enforce ad policies, allow + # seamless playback and tracking on native players and monetize + # content with any standard VMAP compliant ad server. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/video/stitcher/v1/video_stitcher_service" + # client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + module VideoStitcherService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "video_stitcher_service", "helpers.rb" +require "google/cloud/video/stitcher/v1/video_stitcher_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/client.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/client.rb new file mode 100644 index 000000000000..4df154cf568e --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/client.rb @@ -0,0 +1,3545 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/video/stitcher/v1/video_stitcher_service_pb" + +module Google + module Cloud + module Video + module Stitcher + module V1 + module VideoStitcherService + ## + # Client for the VideoStitcherService service. + # + # Video-On-Demand content stitching API allows you to insert ads + # into (VoD) video on demand files. You will be able to render custom + # scrubber bars with highlighted ads, enforce ad policies, allow + # seamless playback and tracking on native players and monetize + # content with any standard VMAP compliant ad server. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "videostitcher.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :video_stitcher_service_stub + + ## + # Configure the VideoStitcherService Client class. + # + # See {::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all VideoStitcherService clients + # ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::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", "Video", "Stitcher", "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.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_cdn_key.timeout = 60.0 + + default_config.rpcs.list_cdn_keys.timeout = 60.0 + + default_config.rpcs.get_cdn_key.timeout = 60.0 + + default_config.rpcs.delete_cdn_key.timeout = 60.0 + + default_config.rpcs.update_cdn_key.timeout = 60.0 + + default_config.rpcs.create_vod_session.timeout = 60.0 + + default_config.rpcs.get_vod_session.timeout = 60.0 + + default_config.rpcs.list_vod_stitch_details.timeout = 60.0 + + default_config.rpcs.get_vod_stitch_detail.timeout = 60.0 + + default_config.rpcs.list_vod_ad_tag_details.timeout = 60.0 + + default_config.rpcs.get_vod_ad_tag_detail.timeout = 60.0 + + default_config.rpcs.list_live_ad_tag_details.timeout = 60.0 + + default_config.rpcs.get_live_ad_tag_detail.timeout = 60.0 + + default_config.rpcs.create_slate.timeout = 60.0 + + default_config.rpcs.list_slates.timeout = 60.0 + + default_config.rpcs.get_slate.timeout = 60.0 + + default_config.rpcs.update_slate.timeout = 60.0 + + default_config.rpcs.delete_slate.timeout = 60.0 + + default_config.rpcs.create_live_session.timeout = 60.0 + + default_config.rpcs.get_live_session.timeout = 60.0 + + default_config.rpcs.create_live_config.timeout = 60.0 + + default_config.rpcs.list_live_configs.timeout = 60.0 + + default_config.rpcs.get_live_config.timeout = 60.0 + + default_config.rpcs.delete_live_config.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the VideoStitcherService 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::Video::Stitcher::V1::VideoStitcherService::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 + @video_stitcher_service_stub.universe_domain + end + + ## + # Create a new VideoStitcherService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the VideoStitcherService 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/video/stitcher/v1/video_stitcher_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 + + @video_stitcher_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::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 + ) + + @video_stitcher_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 + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @video_stitcher_service_stub.logger + end + + # Service calls + + ## + # Creates a new CDN key. + # + # @overload create_cdn_key(request, options = nil) + # Pass arguments to `create_cdn_key` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_cdn_key(parent: nil, cdn_key: nil, cdn_key_id: nil) + # Pass arguments to `create_cdn_key` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 in which the CDN key should be created, in the form + # of `projects/{project_number}/locations/{location}`. + # @param cdn_key [::Google::Cloud::Video::Stitcher::V1::CdnKey, ::Hash] + # Required. The CDN key resource to create. + # @param cdn_key_id [::String] + # Required. The ID to use for the CDN key, which will become the final + # component of the CDN key's resource name. + # + # This value should conform to RFC-1034, which restricts to + # lower-case letters, numbers, and hyphen, with the first character a + # letter, the last a letter or a number, and a 63 character maximum. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest.new + # + # # Call the create_cdn_key method. + # result = client.create_cdn_key request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_cdn_key request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest + + # Converts hash and nil to 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_cdn_key.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_cdn_key.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_cdn_key.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :create_cdn_key, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 CDN keys in the specified project and location. + # + # @overload list_cdn_keys(request, options = nil) + # Pass arguments to `list_cdn_keys` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::ListCdnKeysRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::ListCdnKeysRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_cdn_keys(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_cdn_keys` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 that contains the list of CDN keys, in the form of + # `projects/{project_number}/locations/{location}`. + # @param page_size [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. + # @param filter [::String] + # Filtering results + # @param order_by [::String] + # Hint for how to order the results + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::CdnKey>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::CdnKey>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::ListCdnKeysRequest.new + # + # # Call the list_cdn_keys method. + # result = client.list_cdn_keys request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Video::Stitcher::V1::CdnKey. + # p item + # end + # + def list_cdn_keys request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::ListCdnKeysRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_cdn_keys.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_cdn_keys.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_cdn_keys.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :list_cdn_keys, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @video_stitcher_service_stub, :list_cdn_keys, 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 the specified CDN key. + # + # @overload get_cdn_key(request, options = nil) + # Pass arguments to `get_cdn_key` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::GetCdnKeyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::GetCdnKeyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_cdn_key(name: nil) + # Pass arguments to `get_cdn_key` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 CDN key to be retrieved, in the form of + # `projects/{project}/locations/{location}/cdnKeys/{id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::CdnKey] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Video::Stitcher::V1::CdnKey] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::GetCdnKeyRequest.new + # + # # Call the get_cdn_key method. + # result = client.get_cdn_key request + # + # # The returned object is of type Google::Cloud::Video::Stitcher::V1::CdnKey. + # p result + # + def get_cdn_key request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetCdnKeyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_cdn_key.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_cdn_key.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_cdn_key.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :get_cdn_key, request, 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 the specified CDN key. + # + # @overload delete_cdn_key(request, options = nil) + # Pass arguments to `delete_cdn_key` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::DeleteCdnKeyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::DeleteCdnKeyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_cdn_key(name: nil) + # Pass arguments to `delete_cdn_key` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 CDN key to be deleted, in the form of + # `projects/{project_number}/locations/{location}/cdnKeys/{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/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::DeleteCdnKeyRequest.new + # + # # Call the delete_cdn_key method. + # result = client.delete_cdn_key request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_cdn_key request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::DeleteCdnKeyRequest + + # Converts hash and nil to 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_cdn_key.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_cdn_key.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_cdn_key.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :delete_cdn_key, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 specified CDN key. Only update fields specified + # in the call method body. + # + # @overload update_cdn_key(request, options = nil) + # Pass arguments to `update_cdn_key` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::UpdateCdnKeyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::UpdateCdnKeyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_cdn_key(cdn_key: nil, update_mask: nil) + # Pass arguments to `update_cdn_key` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param cdn_key [::Google::Cloud::Video::Stitcher::V1::CdnKey, ::Hash] + # Required. The CDN key resource which replaces the resource on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask applies to the resource. + # For the `FieldMask` definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::UpdateCdnKeyRequest.new + # + # # Call the update_cdn_key method. + # result = client.update_cdn_key request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_cdn_key request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::UpdateCdnKeyRequest + + # Converts hash and nil to 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_cdn_key.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.cdn_key&.name + header_params["cdn_key.name"] = request.cdn_key.name + end + + request_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_cdn_key.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_cdn_key.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :update_cdn_key, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 client side playback VOD session and returns the full + # tracking and playback metadata of the session. + # + # @overload create_vod_session(request, options = nil) + # Pass arguments to `create_vod_session` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::CreateVodSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::CreateVodSessionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_vod_session(parent: nil, vod_session: nil) + # Pass arguments to `create_vod_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 VOD session should be + # created, in the form of `projects/{project_number}/locations/{location}`. + # @param vod_session [::Google::Cloud::Video::Stitcher::V1::VodSession, ::Hash] + # Required. Parameters for creating a session. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::VodSession] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Video::Stitcher::V1::VodSession] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::CreateVodSessionRequest.new + # + # # Call the create_vod_session method. + # result = client.create_vod_session request + # + # # The returned object is of type Google::Cloud::Video::Stitcher::V1::VodSession. + # p result + # + def create_vod_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::CreateVodSessionRequest + + # Converts hash and nil to 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_vod_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_vod_session.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_vod_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :create_vod_session, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the full tracking, playback metadata, and relevant ad-ops + # logs for the specified VOD session. + # + # @overload get_vod_session(request, options = nil) + # Pass arguments to `get_vod_session` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::GetVodSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::GetVodSessionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_vod_session(name: nil) + # Pass arguments to `get_vod_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 VOD session to be retrieved, in the form of + # `projects/{project_number}/locations/{location}/vodSessions/{id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::VodSession] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Video::Stitcher::V1::VodSession] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::GetVodSessionRequest.new + # + # # Call the get_vod_session method. + # result = client.get_vod_session request + # + # # The returned object is of type Google::Cloud::Video::Stitcher::V1::VodSession. + # p result + # + def get_vod_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetVodSessionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_vod_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_vod_session.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_vod_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :get_vod_session, request, 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 detailed stitching information of the specified VOD + # session. + # + # @overload list_vod_stitch_details(request, options = nil) + # Pass arguments to `list_vod_stitch_details` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_vod_stitch_details(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_vod_stitch_details` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The VOD session where the stitch details belong to, in the form + # of `projects/{project}/locations/{location}/vodSessions/{id}`. + # @param page_size [::Integer] + # The maximum number of items to return. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::VodStitchDetail>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::VodStitchDetail>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsRequest.new + # + # # Call the list_vod_stitch_details method. + # result = client.list_vod_stitch_details request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Video::Stitcher::V1::VodStitchDetail. + # p item + # end + # + def list_vod_stitch_details request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_vod_stitch_details.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_vod_stitch_details.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_vod_stitch_details.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :list_vod_stitch_details, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @video_stitcher_service_stub, :list_vod_stitch_details, 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 the specified stitching information for the specified VOD session. + # + # @overload get_vod_stitch_detail(request, options = nil) + # Pass arguments to `get_vod_stitch_detail` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::GetVodStitchDetailRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::GetVodStitchDetailRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_vod_stitch_detail(name: nil) + # Pass arguments to `get_vod_stitch_detail` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 stitch detail in the specified VOD session, in + # the form of + # `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::VodStitchDetail] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Video::Stitcher::V1::VodStitchDetail] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::GetVodStitchDetailRequest.new + # + # # Call the get_vod_stitch_detail method. + # result = client.get_vod_stitch_detail request + # + # # The returned object is of type Google::Cloud::Video::Stitcher::V1::VodStitchDetail. + # p result + # + def get_vod_stitch_detail request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetVodStitchDetailRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_vod_stitch_detail.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_vod_stitch_detail.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_vod_stitch_detail.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :get_vod_stitch_detail, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Return the list of ad tag details for the specified VOD session. + # + # @overload list_vod_ad_tag_details(request, options = nil) + # Pass arguments to `list_vod_ad_tag_details` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_vod_ad_tag_details(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_vod_ad_tag_details` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The VOD session which the ad tag details belong to, in the form + # of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. + # @param page_size [::Integer] + # The maximum number of items to return. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsRequest.new + # + # # Call the list_vod_ad_tag_details method. + # result = client.list_vod_ad_tag_details request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail. + # p item + # end + # + def list_vod_ad_tag_details request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_vod_ad_tag_details.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_vod_ad_tag_details.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_vod_ad_tag_details.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :list_vod_ad_tag_details, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @video_stitcher_service_stub, :list_vod_ad_tag_details, 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 the specified ad tag detail for the specified VOD session. + # + # @overload get_vod_ad_tag_detail(request, options = nil) + # Pass arguments to `get_vod_ad_tag_detail` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::GetVodAdTagDetailRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::GetVodAdTagDetailRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_vod_ad_tag_detail(name: nil) + # Pass arguments to `get_vod_ad_tag_detail` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 ad tag detail for the specified VOD session, in + # the form of + # `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::GetVodAdTagDetailRequest.new + # + # # Call the get_vod_ad_tag_detail method. + # result = client.get_vod_ad_tag_detail request + # + # # The returned object is of type Google::Cloud::Video::Stitcher::V1::VodAdTagDetail. + # p result + # + def get_vod_ad_tag_detail request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetVodAdTagDetailRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_vod_ad_tag_detail.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_vod_ad_tag_detail.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_vod_ad_tag_detail.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :get_vod_ad_tag_detail, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Return the list of ad tag details for the specified live session. + # + # @overload list_live_ad_tag_details(request, options = nil) + # Pass arguments to `list_live_ad_tag_details` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_live_ad_tag_details(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_live_ad_tag_details` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource parent in the form of + # `projects/{project}/locations/{location}/liveSessions/{live_session}`. + # @param page_size [::Integer] + # The maximum number of items to return. + # @param page_token [::String] + # The pagination token returned from a previous List request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsRequest.new + # + # # Call the list_live_ad_tag_details method. + # result = client.list_live_ad_tag_details request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail. + # p item + # end + # + def list_live_ad_tag_details request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_live_ad_tag_details.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_live_ad_tag_details.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_live_ad_tag_details.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :list_live_ad_tag_details, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @video_stitcher_service_stub, :list_live_ad_tag_details, 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 the specified ad tag detail for the specified live session. + # + # @overload get_live_ad_tag_detail(request, options = nil) + # Pass arguments to `get_live_ad_tag_detail` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::GetLiveAdTagDetailRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::GetLiveAdTagDetailRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_live_ad_tag_detail(name: nil) + # Pass arguments to `get_live_ad_tag_detail` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name in the form of + # `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::GetLiveAdTagDetailRequest.new + # + # # Call the get_live_ad_tag_detail method. + # result = client.get_live_ad_tag_detail request + # + # # The returned object is of type Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail. + # p result + # + def get_live_ad_tag_detail request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetLiveAdTagDetailRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_live_ad_tag_detail.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_live_ad_tag_detail.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_live_ad_tag_detail.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :get_live_ad_tag_detail, request, 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 slate. + # + # @overload create_slate(request, options = nil) + # Pass arguments to `create_slate` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::CreateSlateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::CreateSlateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_slate(parent: nil, slate_id: nil, slate: nil, request_id: nil) + # Pass arguments to `create_slate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 in which the slate should be created, in the form of + # `projects/{project_number}/locations/{location}`. + # @param slate_id [::String] + # Required. The unique identifier for the slate. + # This value should conform to RFC-1034, which restricts to + # lower-case letters, numbers, and hyphen, with the first character a + # letter, the last a letter or a number, and a 63 character maximum. + # @param slate [::Google::Cloud::Video::Stitcher::V1::Slate, ::Hash] + # Required. The slate to create. + # @param request_id [::String] + # A 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/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::CreateSlateRequest.new + # + # # Call the create_slate method. + # result = client.create_slate request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_slate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::CreateSlateRequest + + # Converts hash and nil to 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_slate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_slate.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_slate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :create_slate, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 slates in the specified project and location. + # + # @overload list_slates(request, options = nil) + # Pass arguments to `list_slates` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::ListSlatesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::ListSlatesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_slates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_slates` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 list slates, in the form of + # `projects/{project_number}/locations/{location}`. + # @param page_size [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. + # @param filter [::String] + # Filtering results + # @param order_by [::String] + # Hint for how to order the results + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::Slate>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::Slate>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::ListSlatesRequest.new + # + # # Call the list_slates method. + # result = client.list_slates request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Video::Stitcher::V1::Slate. + # p item + # end + # + def list_slates request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::ListSlatesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_slates.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_slates.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_slates.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :list_slates, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @video_stitcher_service_stub, :list_slates, 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 the specified slate. + # + # @overload get_slate(request, options = nil) + # Pass arguments to `get_slate` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::GetSlateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::GetSlateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_slate(name: nil) + # Pass arguments to `get_slate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 slate to be retrieved, of the slate, in the form + # of `projects/{project_number}/locations/{location}/slates/{id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::Slate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Video::Stitcher::V1::Slate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::GetSlateRequest.new + # + # # Call the get_slate method. + # result = client.get_slate request + # + # # The returned object is of type Google::Cloud::Video::Stitcher::V1::Slate. + # p result + # + def get_slate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetSlateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_slate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_slate.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_slate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :get_slate, request, 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 the specified slate. + # + # @overload update_slate(request, options = nil) + # Pass arguments to `update_slate` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::UpdateSlateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::UpdateSlateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_slate(slate: nil, update_mask: nil) + # Pass arguments to `update_slate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param slate [::Google::Cloud::Video::Stitcher::V1::Slate, ::Hash] + # Required. The resource with updated fields. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask which specifies fields which should 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/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::UpdateSlateRequest.new + # + # # Call the update_slate method. + # result = client.update_slate request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_slate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::UpdateSlateRequest + + # Converts hash and nil to 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_slate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.slate&.name + header_params["slate.name"] = request.slate.name + end + + request_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_slate.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_slate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :update_slate, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 the specified slate. + # + # @overload delete_slate(request, options = nil) + # Pass arguments to `delete_slate` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::DeleteSlateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::DeleteSlateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_slate(name: nil) + # Pass arguments to `delete_slate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 slate to be deleted, in the form of + # `projects/{project_number}/locations/{location}/slates/{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/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::DeleteSlateRequest.new + # + # # Call the delete_slate method. + # result = client.delete_slate request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_slate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::DeleteSlateRequest + + # Converts hash and nil to 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_slate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_slate.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_slate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :delete_slate, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 live session. + # + # @overload create_live_session(request, options = nil) + # Pass arguments to `create_live_session` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::CreateLiveSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::CreateLiveSessionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_live_session(parent: nil, live_session: nil) + # Pass arguments to `create_live_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 live session should be + # created, in the form of `projects/{project_number}/locations/{location}`. + # @param live_session [::Google::Cloud::Video::Stitcher::V1::LiveSession, ::Hash] + # Required. Parameters for creating a live session. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::LiveSession] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Video::Stitcher::V1::LiveSession] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::CreateLiveSessionRequest.new + # + # # Call the create_live_session method. + # result = client.create_live_session request + # + # # The returned object is of type Google::Cloud::Video::Stitcher::V1::LiveSession. + # p result + # + def create_live_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::CreateLiveSessionRequest + + # Converts hash and nil to 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_live_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_live_session.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_live_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :create_live_session, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the details for the specified live session. + # + # @overload get_live_session(request, options = nil) + # Pass arguments to `get_live_session` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::GetLiveSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::GetLiveSessionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_live_session(name: nil) + # Pass arguments to `get_live_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 live session, in the form of + # `projects/{project_number}/locations/{location}/liveSessions/{id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::LiveSession] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Video::Stitcher::V1::LiveSession] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::GetLiveSessionRequest.new + # + # # Call the get_live_session method. + # result = client.get_live_session request + # + # # The returned object is of type Google::Cloud::Video::Stitcher::V1::LiveSession. + # p result + # + def get_live_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetLiveSessionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_live_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_live_session.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_live_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :get_live_session, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Registers the live config with the provided unique ID in + # the specified region. + # + # @overload create_live_config(request, options = nil) + # Pass arguments to `create_live_config` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::CreateLiveConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::CreateLiveConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_live_config(parent: nil, live_config_id: nil, live_config: nil, request_id: nil) + # Pass arguments to `create_live_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 project in which the live config should be created, in + # the form of `projects/{project_number}/locations/{location}`. + # @param live_config_id [::String] + # Required. The unique identifier ID to use for the live config. + # @param live_config [::Google::Cloud::Video::Stitcher::V1::LiveConfig, ::Hash] + # Required. The live config resource to create. + # @param request_id [::String] + # A 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/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::CreateLiveConfigRequest.new + # + # # Call the create_live_config method. + # result = client.create_live_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_live_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::CreateLiveConfigRequest + + # Converts hash and nil to 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_live_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::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_live_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_live_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :create_live_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 + + ## + # Lists all live configs managed by the Video Stitcher that + # belong to the specified project and region. + # + # @overload list_live_configs(request, options = nil) + # Pass arguments to `list_live_configs` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::ListLiveConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::ListLiveConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_live_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_live_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 project that contains the list of live configs, in the + # form of `projects/{project_number}/locations/{location}`. + # @param page_size [::Integer] + # The maximum number of items to return. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # @param filter [::String] + # Optional. The filter to apply to list results (see + # [Filtering](https://google.aip.dev/160)). + # @param order_by [::String] + # Optional. Specifies the ordering of results following + # [Cloud API + # syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::LiveConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::LiveConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::ListLiveConfigsRequest.new + # + # # Call the list_live_configs method. + # result = client.list_live_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::Video::Stitcher::V1::LiveConfig. + # p item + # end + # + def list_live_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::ListLiveConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_live_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::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_live_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_live_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :list_live_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @video_stitcher_service_stub, :list_live_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 + + ## + # Returns the specified live config managed by the Video + # Stitcher service. + # + # @overload get_live_config(request, options = nil) + # Pass arguments to `get_live_config` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::GetLiveConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::GetLiveConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_live_config(name: nil) + # Pass arguments to `get_live_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 live config to be retrieved, in the form + # of + # `projects/{project_number}/locations/{location}/liveConfigs/{id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::LiveConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Video::Stitcher::V1::LiveConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::GetLiveConfigRequest.new + # + # # Call the get_live_config method. + # result = client.get_live_config request + # + # # The returned object is of type Google::Cloud::Video::Stitcher::V1::LiveConfig. + # p result + # + def get_live_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetLiveConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_live_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::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_live_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_live_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :get_live_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 + + ## + # Deletes the specified live config. + # + # @overload delete_live_config(request, options = nil) + # Pass arguments to `delete_live_config` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::DeleteLiveConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::DeleteLiveConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_live_config(name: nil) + # Pass arguments to `delete_live_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 live config to be deleted, in the form of + # `projects/{project_number}/locations/{location}/liveConfigs/{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/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::DeleteLiveConfigRequest.new + # + # # Call the delete_live_config method. + # result = client.delete_live_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_live_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::DeleteLiveConfigRequest + + # Converts hash and nil to 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_live_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::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_live_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_live_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :delete_live_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 specified LiveConfig. Only update fields specified + # in the call method body. + # + # @overload update_live_config(request, options = nil) + # Pass arguments to `update_live_config` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::UpdateLiveConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::UpdateLiveConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_live_config(live_config: nil, update_mask: nil) + # Pass arguments to `update_live_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 live_config [::Google::Cloud::Video::Stitcher::V1::LiveConfig, ::Hash] + # Required. The LiveConfig resource which replaces the resource on the + # server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask applies to the resource. + # For the `FieldMask` definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::UpdateLiveConfigRequest.new + # + # # Call the update_live_config method. + # result = client.update_live_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_live_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::UpdateLiveConfigRequest + + # Converts hash and nil to 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_live_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::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.live_config&.name + header_params["live_config.name"] = request.live_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_live_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_live_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :update_live_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 + + ## + # Registers the VOD config with the provided unique ID in + # the specified region. + # + # @overload create_vod_config(request, options = nil) + # Pass arguments to `create_vod_config` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::CreateVodConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::CreateVodConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_vod_config(parent: nil, vod_config_id: nil, vod_config: nil, request_id: nil) + # Pass arguments to `create_vod_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 project in which the VOD config should be created, in + # the form of `projects/{project_number}/locations/{location}`. + # @param vod_config_id [::String] + # Required. The unique identifier ID to use for the VOD config. + # @param vod_config [::Google::Cloud::Video::Stitcher::V1::VodConfig, ::Hash] + # Required. The VOD config resource to create. + # @param request_id [::String] + # Optional. A 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/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::CreateVodConfigRequest.new + # + # # Call the create_vod_config method. + # result = client.create_vod_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_vod_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::CreateVodConfigRequest + + # Converts hash and nil to 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_vod_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::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_vod_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_vod_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :create_vod_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 + + ## + # Lists all VOD configs managed by the Video Stitcher API that + # belong to the specified project and region. + # + # @overload list_vod_configs(request, options = nil) + # Pass arguments to `list_vod_configs` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::ListVodConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::ListVodConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_vod_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_vod_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 project that contains the list of VOD configs, in the + # form of `projects/{project_number}/locations/{location}`. + # @param page_size [::Integer] + # Optional. The maximum number of items to return. + # @param page_token [::String] + # Optional. The next_page_token value returned from a previous List request, + # if any. + # @param filter [::String] + # Optional. The filter to apply to list results (see + # [Filtering](https://google.aip.dev/160)). + # @param order_by [::String] + # Optional. Specifies the ordering of results following + # [Cloud API + # syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::VodConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::VodConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::ListVodConfigsRequest.new + # + # # Call the list_vod_configs method. + # result = client.list_vod_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::Video::Stitcher::V1::VodConfig. + # p item + # end + # + def list_vod_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::ListVodConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_vod_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::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_vod_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_vod_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :list_vod_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @video_stitcher_service_stub, :list_vod_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 + + ## + # Returns the specified VOD config managed by the Video + # Stitcher API service. + # + # @overload get_vod_config(request, options = nil) + # Pass arguments to `get_vod_config` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::GetVodConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::GetVodConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_vod_config(name: nil) + # Pass arguments to `get_vod_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 VOD config to be retrieved, in the form + # of `projects/{project_number}/locations/{location}/vodConfigs/{id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::VodConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Video::Stitcher::V1::VodConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::GetVodConfigRequest.new + # + # # Call the get_vod_config method. + # result = client.get_vod_config request + # + # # The returned object is of type Google::Cloud::Video::Stitcher::V1::VodConfig. + # p result + # + def get_vod_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetVodConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_vod_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::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_vod_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_vod_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :get_vod_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 + + ## + # Deletes the specified VOD config. + # + # @overload delete_vod_config(request, options = nil) + # Pass arguments to `delete_vod_config` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::DeleteVodConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::DeleteVodConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_vod_config(name: nil) + # Pass arguments to `delete_vod_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 VOD config to be deleted, in the form of + # `projects/{project_number}/locations/{location}/vodConfigs/{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/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::DeleteVodConfigRequest.new + # + # # Call the delete_vod_config method. + # result = client.delete_vod_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_vod_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::DeleteVodConfigRequest + + # Converts hash and nil to 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_vod_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::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_vod_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_vod_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :delete_vod_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 specified VOD config. Only update fields specified + # in the call method body. + # + # @overload update_vod_config(request, options = nil) + # Pass arguments to `update_vod_config` via a request object, either of type + # {::Google::Cloud::Video::Stitcher::V1::UpdateVodConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Stitcher::V1::UpdateVodConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_vod_config(vod_config: nil, update_mask: nil) + # Pass arguments to `update_vod_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 vod_config [::Google::Cloud::Video::Stitcher::V1::VodConfig, ::Hash] + # Required. The VOD config resource which replaces the resource on the + # server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask applies to the resource. + # For the `FieldMask` definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/stitcher/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Stitcher::V1::UpdateVodConfigRequest.new + # + # # Call the update_vod_config method. + # result = client.update_vod_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_vod_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::UpdateVodConfigRequest + + # Converts hash and nil to 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_vod_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::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.vod_config&.name + header_params["vod_config.name"] = request.vod_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_vod_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_vod_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_stitcher_service_stub.call_rpc :update_vod_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 + + ## + # Configuration class for the VideoStitcherService API. + # + # This class represents the configuration for VideoStitcherService, + # 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::Video::Stitcher::V1::VideoStitcherService::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_cdn_key to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_cdn_key.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_cdn_key.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::Video::Stitcher::V1::VideoStitcherService::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 = "videostitcher.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 VideoStitcherService 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_cdn_key` + # @return [::Gapic::Config::Method] + # + attr_reader :create_cdn_key + ## + # RPC-specific configuration for `list_cdn_keys` + # @return [::Gapic::Config::Method] + # + attr_reader :list_cdn_keys + ## + # RPC-specific configuration for `get_cdn_key` + # @return [::Gapic::Config::Method] + # + attr_reader :get_cdn_key + ## + # RPC-specific configuration for `delete_cdn_key` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_cdn_key + ## + # RPC-specific configuration for `update_cdn_key` + # @return [::Gapic::Config::Method] + # + attr_reader :update_cdn_key + ## + # RPC-specific configuration for `create_vod_session` + # @return [::Gapic::Config::Method] + # + attr_reader :create_vod_session + ## + # RPC-specific configuration for `get_vod_session` + # @return [::Gapic::Config::Method] + # + attr_reader :get_vod_session + ## + # RPC-specific configuration for `list_vod_stitch_details` + # @return [::Gapic::Config::Method] + # + attr_reader :list_vod_stitch_details + ## + # RPC-specific configuration for `get_vod_stitch_detail` + # @return [::Gapic::Config::Method] + # + attr_reader :get_vod_stitch_detail + ## + # RPC-specific configuration for `list_vod_ad_tag_details` + # @return [::Gapic::Config::Method] + # + attr_reader :list_vod_ad_tag_details + ## + # RPC-specific configuration for `get_vod_ad_tag_detail` + # @return [::Gapic::Config::Method] + # + attr_reader :get_vod_ad_tag_detail + ## + # RPC-specific configuration for `list_live_ad_tag_details` + # @return [::Gapic::Config::Method] + # + attr_reader :list_live_ad_tag_details + ## + # RPC-specific configuration for `get_live_ad_tag_detail` + # @return [::Gapic::Config::Method] + # + attr_reader :get_live_ad_tag_detail + ## + # RPC-specific configuration for `create_slate` + # @return [::Gapic::Config::Method] + # + attr_reader :create_slate + ## + # RPC-specific configuration for `list_slates` + # @return [::Gapic::Config::Method] + # + attr_reader :list_slates + ## + # RPC-specific configuration for `get_slate` + # @return [::Gapic::Config::Method] + # + attr_reader :get_slate + ## + # RPC-specific configuration for `update_slate` + # @return [::Gapic::Config::Method] + # + attr_reader :update_slate + ## + # RPC-specific configuration for `delete_slate` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_slate + ## + # RPC-specific configuration for `create_live_session` + # @return [::Gapic::Config::Method] + # + attr_reader :create_live_session + ## + # RPC-specific configuration for `get_live_session` + # @return [::Gapic::Config::Method] + # + attr_reader :get_live_session + ## + # RPC-specific configuration for `create_live_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_live_config + ## + # RPC-specific configuration for `list_live_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_live_configs + ## + # RPC-specific configuration for `get_live_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_live_config + ## + # RPC-specific configuration for `delete_live_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_live_config + ## + # RPC-specific configuration for `update_live_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_live_config + ## + # RPC-specific configuration for `create_vod_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_vod_config + ## + # RPC-specific configuration for `list_vod_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_vod_configs + ## + # RPC-specific configuration for `get_vod_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_vod_config + ## + # RPC-specific configuration for `delete_vod_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_vod_config + ## + # RPC-specific configuration for `update_vod_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_vod_config + + # @private + def initialize parent_rpcs = nil + create_cdn_key_config = parent_rpcs.create_cdn_key if parent_rpcs.respond_to? :create_cdn_key + @create_cdn_key = ::Gapic::Config::Method.new create_cdn_key_config + list_cdn_keys_config = parent_rpcs.list_cdn_keys if parent_rpcs.respond_to? :list_cdn_keys + @list_cdn_keys = ::Gapic::Config::Method.new list_cdn_keys_config + get_cdn_key_config = parent_rpcs.get_cdn_key if parent_rpcs.respond_to? :get_cdn_key + @get_cdn_key = ::Gapic::Config::Method.new get_cdn_key_config + delete_cdn_key_config = parent_rpcs.delete_cdn_key if parent_rpcs.respond_to? :delete_cdn_key + @delete_cdn_key = ::Gapic::Config::Method.new delete_cdn_key_config + update_cdn_key_config = parent_rpcs.update_cdn_key if parent_rpcs.respond_to? :update_cdn_key + @update_cdn_key = ::Gapic::Config::Method.new update_cdn_key_config + create_vod_session_config = parent_rpcs.create_vod_session if parent_rpcs.respond_to? :create_vod_session + @create_vod_session = ::Gapic::Config::Method.new create_vod_session_config + get_vod_session_config = parent_rpcs.get_vod_session if parent_rpcs.respond_to? :get_vod_session + @get_vod_session = ::Gapic::Config::Method.new get_vod_session_config + list_vod_stitch_details_config = parent_rpcs.list_vod_stitch_details if parent_rpcs.respond_to? :list_vod_stitch_details + @list_vod_stitch_details = ::Gapic::Config::Method.new list_vod_stitch_details_config + get_vod_stitch_detail_config = parent_rpcs.get_vod_stitch_detail if parent_rpcs.respond_to? :get_vod_stitch_detail + @get_vod_stitch_detail = ::Gapic::Config::Method.new get_vod_stitch_detail_config + list_vod_ad_tag_details_config = parent_rpcs.list_vod_ad_tag_details if parent_rpcs.respond_to? :list_vod_ad_tag_details + @list_vod_ad_tag_details = ::Gapic::Config::Method.new list_vod_ad_tag_details_config + get_vod_ad_tag_detail_config = parent_rpcs.get_vod_ad_tag_detail if parent_rpcs.respond_to? :get_vod_ad_tag_detail + @get_vod_ad_tag_detail = ::Gapic::Config::Method.new get_vod_ad_tag_detail_config + list_live_ad_tag_details_config = parent_rpcs.list_live_ad_tag_details if parent_rpcs.respond_to? :list_live_ad_tag_details + @list_live_ad_tag_details = ::Gapic::Config::Method.new list_live_ad_tag_details_config + get_live_ad_tag_detail_config = parent_rpcs.get_live_ad_tag_detail if parent_rpcs.respond_to? :get_live_ad_tag_detail + @get_live_ad_tag_detail = ::Gapic::Config::Method.new get_live_ad_tag_detail_config + create_slate_config = parent_rpcs.create_slate if parent_rpcs.respond_to? :create_slate + @create_slate = ::Gapic::Config::Method.new create_slate_config + list_slates_config = parent_rpcs.list_slates if parent_rpcs.respond_to? :list_slates + @list_slates = ::Gapic::Config::Method.new list_slates_config + get_slate_config = parent_rpcs.get_slate if parent_rpcs.respond_to? :get_slate + @get_slate = ::Gapic::Config::Method.new get_slate_config + update_slate_config = parent_rpcs.update_slate if parent_rpcs.respond_to? :update_slate + @update_slate = ::Gapic::Config::Method.new update_slate_config + delete_slate_config = parent_rpcs.delete_slate if parent_rpcs.respond_to? :delete_slate + @delete_slate = ::Gapic::Config::Method.new delete_slate_config + create_live_session_config = parent_rpcs.create_live_session if parent_rpcs.respond_to? :create_live_session + @create_live_session = ::Gapic::Config::Method.new create_live_session_config + get_live_session_config = parent_rpcs.get_live_session if parent_rpcs.respond_to? :get_live_session + @get_live_session = ::Gapic::Config::Method.new get_live_session_config + create_live_config_config = parent_rpcs.create_live_config if parent_rpcs.respond_to? :create_live_config + @create_live_config = ::Gapic::Config::Method.new create_live_config_config + list_live_configs_config = parent_rpcs.list_live_configs if parent_rpcs.respond_to? :list_live_configs + @list_live_configs = ::Gapic::Config::Method.new list_live_configs_config + get_live_config_config = parent_rpcs.get_live_config if parent_rpcs.respond_to? :get_live_config + @get_live_config = ::Gapic::Config::Method.new get_live_config_config + delete_live_config_config = parent_rpcs.delete_live_config if parent_rpcs.respond_to? :delete_live_config + @delete_live_config = ::Gapic::Config::Method.new delete_live_config_config + update_live_config_config = parent_rpcs.update_live_config if parent_rpcs.respond_to? :update_live_config + @update_live_config = ::Gapic::Config::Method.new update_live_config_config + create_vod_config_config = parent_rpcs.create_vod_config if parent_rpcs.respond_to? :create_vod_config + @create_vod_config = ::Gapic::Config::Method.new create_vod_config_config + list_vod_configs_config = parent_rpcs.list_vod_configs if parent_rpcs.respond_to? :list_vod_configs + @list_vod_configs = ::Gapic::Config::Method.new list_vod_configs_config + get_vod_config_config = parent_rpcs.get_vod_config if parent_rpcs.respond_to? :get_vod_config + @get_vod_config = ::Gapic::Config::Method.new get_vod_config_config + delete_vod_config_config = parent_rpcs.delete_vod_config if parent_rpcs.respond_to? :delete_vod_config + @delete_vod_config = ::Gapic::Config::Method.new delete_vod_config_config + update_vod_config_config = parent_rpcs.update_vod_config if parent_rpcs.respond_to? :update_vod_config + @update_vod_config = ::Gapic::Config::Method.new update_vod_config_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/credentials.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/credentials.rb new file mode 100644 index 000000000000..b20edb5b337f --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Video + module Stitcher + module V1 + module VideoStitcherService + # Credentials for the VideoStitcherService 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 +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/operations.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/operations.rb new file mode 100644 index 000000000000..36f8c246e596 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/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 Video + module Stitcher + module V1 + module VideoStitcherService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "videostitcher.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the VideoStitcherService 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 VideoStitcherService 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::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Video::Stitcher::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Video::Stitcher::V1::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 = "videostitcher.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-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/paths.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/paths.rb new file mode 100644 index 000000000000..632a487b123e --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/paths.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 Cloud + module Video + module Stitcher + module V1 + module VideoStitcherService + # Path helper methods for the VideoStitcherService API. + module Paths + ## + # Create a fully-qualified CdnKey resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/cdnKeys/{cdn_key}` + # + # @param project [String] + # @param location [String] + # @param cdn_key [String] + # + # @return [::String] + def cdn_key_path project:, location:, cdn_key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/cdnKeys/#{cdn_key}" + end + + ## + # Create a fully-qualified LiveAdTagDetail resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}` + # + # @param project [String] + # @param location [String] + # @param live_session [String] + # @param live_ad_tag_detail [String] + # + # @return [::String] + def live_ad_tag_detail_path project:, location:, live_session:, live_ad_tag_detail: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "live_session cannot contain /" if live_session.to_s.include? "/" + + "projects/#{project}/locations/#{location}/liveSessions/#{live_session}/liveAdTagDetails/#{live_ad_tag_detail}" + end + + ## + # Create a fully-qualified LiveConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/liveConfigs/{live_config}` + # + # @param project [String] + # @param location [String] + # @param live_config [String] + # + # @return [::String] + def live_config_path project:, location:, live_config: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/liveConfigs/#{live_config}" + end + + ## + # Create a fully-qualified LiveSession resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/liveSessions/{live_session}` + # + # @param project [String] + # @param location [String] + # @param live_session [String] + # + # @return [::String] + def live_session_path project:, location:, live_session: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/liveSessions/#{live_session}" + 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 Slate resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/slates/{slate}` + # + # @param project [String] + # @param location [String] + # @param slate [String] + # + # @return [::String] + def slate_path project:, location:, slate: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/slates/#{slate}" + end + + ## + # Create a fully-qualified VodAdTagDetail resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/vodSessions/{vod_session}/vodAdTagDetails/{vod_ad_tag_detail}` + # + # @param project [String] + # @param location [String] + # @param vod_session [String] + # @param vod_ad_tag_detail [String] + # + # @return [::String] + def vod_ad_tag_detail_path project:, location:, vod_session:, vod_ad_tag_detail: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "vod_session cannot contain /" if vod_session.to_s.include? "/" + + "projects/#{project}/locations/#{location}/vodSessions/#{vod_session}/vodAdTagDetails/#{vod_ad_tag_detail}" + end + + ## + # Create a fully-qualified VodConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/vodConfigs/{vod_config}` + # + # @param project [String] + # @param location [String] + # @param vod_config [String] + # + # @return [::String] + def vod_config_path project:, location:, vod_config: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/vodConfigs/#{vod_config}" + end + + ## + # Create a fully-qualified VodSession resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/vodSessions/{vod_session}` + # + # @param project [String] + # @param location [String] + # @param vod_session [String] + # + # @return [::String] + def vod_session_path project:, location:, vod_session: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/vodSessions/#{vod_session}" + end + + ## + # Create a fully-qualified VodStitchDetail resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/vodSessions/{vod_session}/vodStitchDetails/{vod_stitch_detail}` + # + # @param project [String] + # @param location [String] + # @param vod_session [String] + # @param vod_stitch_detail [String] + # + # @return [::String] + def vod_stitch_detail_path project:, location:, vod_session:, vod_stitch_detail: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "vod_session cannot contain /" if vod_session.to_s.include? "/" + + "projects/#{project}/locations/#{location}/vodSessions/#{vod_session}/vodStitchDetails/#{vod_stitch_detail}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service_pb.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service_pb.rb new file mode 100644 index 000000000000..1ceaa82ca026 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service_pb.rb @@ -0,0 +1,76 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/video/stitcher/v1/video_stitcher_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/video/stitcher/v1/ad_tag_details_pb' +require 'google/cloud/video/stitcher/v1/cdn_keys_pb' +require 'google/cloud/video/stitcher/v1/live_configs_pb' +require 'google/cloud/video/stitcher/v1/sessions_pb' +require 'google/cloud/video/stitcher/v1/slates_pb' +require 'google/cloud/video/stitcher/v1/stitch_details_pb' +require 'google/cloud/video/stitcher/v1/vod_configs_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/video/stitcher/v1/video_stitcher_service.proto\x12\x1egoogle.cloud.video.stitcher.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x33google/cloud/video/stitcher/v1/ad_tag_details.proto\x1a-google/cloud/video/stitcher/v1/cdn_keys.proto\x1a\x31google/cloud/video/stitcher/v1/live_configs.proto\x1a-google/cloud/video/stitcher/v1/sessions.proto\x1a+google/cloud/video/stitcher/v1/slates.proto\x1a\x33google/cloud/video/stitcher/v1/stitch_details.proto\x1a\x30google/cloud/video/stitcher/v1/vod_configs.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa9\x01\n\x13\x43reateCdnKeyRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#videostitcher.googleapis.com/CdnKey\x12<\n\x07\x63\x64n_key\x18\x02 \x01(\x0b\x32&.google.cloud.video.stitcher.v1.CdnKeyB\x03\xe0\x41\x02\x12\x17\n\ncdn_key_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x9a\x01\n\x12ListCdnKeysRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#videostitcher.googleapis.com/CdnKey\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\x13ListCdnKeysResponse\x12\x38\n\x08\x63\x64n_keys\x18\x01 \x03(\x0b\x32&.google.cloud.video.stitcher.v1.CdnKey\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"M\n\x10GetCdnKeyRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#videostitcher.googleapis.com/CdnKey\"P\n\x13\x44\x65leteCdnKeyRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#videostitcher.googleapis.com/CdnKey\"\x89\x01\n\x13UpdateCdnKeyRequest\x12<\n\x07\x63\x64n_key\x18\x01 \x01(\x0b\x32&.google.cloud.video.stitcher.v1.CdnKeyB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xa0\x01\n\x17\x43reateVodSessionRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'videostitcher.googleapis.com/VodSession\x12\x44\n\x0bvod_session\x18\x02 \x01(\x0b\x32*.google.cloud.video.stitcher.v1.VodSessionB\x03\xe0\x41\x02\"U\n\x14GetVodSessionRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'videostitcher.googleapis.com/VodSession\"\x8a\x01\n\x1bListVodStitchDetailsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,videostitcher.googleapis.com/VodStitchDetail\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x84\x01\n\x1cListVodStitchDetailsResponse\x12K\n\x12vod_stitch_details\x18\x01 \x03(\x0b\x32/.google.cloud.video.stitcher.v1.VodStitchDetail\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"_\n\x19GetVodStitchDetailRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,videostitcher.googleapis.com/VodStitchDetail\"\x88\x01\n\x1aListVodAdTagDetailsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+videostitcher.googleapis.com/VodAdTagDetail\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x82\x01\n\x1bListVodAdTagDetailsResponse\x12J\n\x12vod_ad_tag_details\x18\x01 \x03(\x0b\x32..google.cloud.video.stitcher.v1.VodAdTagDetail\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"]\n\x18GetVodAdTagDetailRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+videostitcher.googleapis.com/VodAdTagDetail\"\x8a\x01\n\x1bListLiveAdTagDetailsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,videostitcher.googleapis.com/LiveAdTagDetail\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x85\x01\n\x1cListLiveAdTagDetailsResponse\x12L\n\x13live_ad_tag_details\x18\x01 \x03(\x0b\x32/.google.cloud.video.stitcher.v1.LiveAdTagDetail\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"_\n\x19GetLiveAdTagDetailRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,videostitcher.googleapis.com/LiveAdTagDetail\"\xb6\x01\n\x12\x43reateSlateRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"videostitcher.googleapis.com/Slate\x12\x15\n\x08slate_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x05slate\x18\x03 \x01(\x0b\x32%.google.cloud.video.stitcher.v1.SlateB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"K\n\x0fGetSlateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"videostitcher.googleapis.com/Slate\"\x98\x01\n\x11ListSlatesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"videostitcher.googleapis.com/Slate\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\"y\n\x12ListSlatesResponse\x12\x35\n\x06slates\x18\x01 \x03(\x0b\x32%.google.cloud.video.stitcher.v1.Slate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x85\x01\n\x12UpdateSlateRequest\x12\x39\n\x05slate\x18\x01 \x01(\x0b\x32%.google.cloud.video.stitcher.v1.SlateB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"N\n\x12\x44\x65leteSlateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"videostitcher.googleapis.com/Slate\"\xa4\x01\n\x18\x43reateLiveSessionRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(videostitcher.googleapis.com/LiveSession\x12\x46\n\x0clive_session\x18\x02 \x01(\x0b\x32+.google.cloud.video.stitcher.v1.LiveSessionB\x03\xe0\x41\x02\"W\n\x15GetLiveSessionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(videostitcher.googleapis.com/LiveSession\"\xd1\x01\n\x17\x43reateLiveConfigRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'videostitcher.googleapis.com/LiveConfig\x12\x1b\n\x0elive_config_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x0blive_config\x18\x03 \x01(\x0b\x32*.google.cloud.video.stitcher.v1.LiveConfigB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"\xac\x01\n\x16ListLiveConfigsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'videostitcher.googleapis.com/LiveConfig\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\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\"\x89\x01\n\x17ListLiveConfigsResponse\x12@\n\x0clive_configs\x18\x01 \x03(\x0b\x32*.google.cloud.video.stitcher.v1.LiveConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"U\n\x14GetLiveConfigRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'videostitcher.googleapis.com/LiveConfig\"X\n\x17\x44\x65leteLiveConfigRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'videostitcher.googleapis.com/LiveConfig\"\x95\x01\n\x17UpdateLiveConfigRequest\x12\x44\n\x0blive_config\x18\x01 \x01(\x0b\x32*.google.cloud.video.stitcher.v1.LiveConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xd1\x01\n\x16\x43reateVodConfigRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&videostitcher.googleapis.com/VodConfig\x12\x1a\n\rvod_config_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x42\n\nvod_config\x18\x03 \x01(\x0b\x32).google.cloud.video.stitcher.v1.VodConfigB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xb4\x01\n\x15ListVodConfigsRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&videostitcher.googleapis.com/VodConfig\x12\x16\n\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\"\x86\x01\n\x16ListVodConfigsResponse\x12>\n\x0bvod_configs\x18\x01 \x03(\x0b\x32).google.cloud.video.stitcher.v1.VodConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"S\n\x13GetVodConfigRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&videostitcher.googleapis.com/VodConfig\"V\n\x16\x44\x65leteVodConfigRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&videostitcher.googleapis.com/VodConfig\"\x92\x01\n\x16UpdateVodConfigRequest\x12\x42\n\nvod_config\x18\x01 \x01(\x0b\x32).google.cloud.video.stitcher.v1.VodConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x90\x01\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(\t2\xd7\x36\n\x14VideoStitcherService\x12\x99\x02\n\x0c\x43reateCdnKey\x12\x33.google.cloud.video.stitcher.v1.CreateCdnKeyRequest\x1a\x1d.google.longrunning.Operation\"\xb4\x01\xca\x41Y\n%google.cloud.video.stitcher.v1.CdnKey\x12\x30google.cloud.video.stitcher.v1.OperationMetadata\xda\x41\x19parent,cdn_key,cdn_key_id\x82\xd3\xe4\x93\x02\x36\"+/v1/{parent=projects/*/locations/*}/cdnKeys:\x07\x63\x64n_key\x12\xb4\x01\n\x0bListCdnKeys\x12\x32.google.cloud.video.stitcher.v1.ListCdnKeysRequest\x1a\x33.google.cloud.video.stitcher.v1.ListCdnKeysResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=projects/*/locations/*}/cdnKeys\x12\xa1\x01\n\tGetCdnKey\x12\x30.google.cloud.video.stitcher.v1.GetCdnKeyRequest\x1a&.google.cloud.video.stitcher.v1.CdnKey\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v1/{name=projects/*/locations/*/cdnKeys/*}\x12\xeb\x01\n\x0c\x44\x65leteCdnKey\x12\x33.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest\x1a\x1d.google.longrunning.Operation\"\x86\x01\xca\x41I\n\x15google.protobuf.Empty\x12\x30google.cloud.video.stitcher.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02-*+/v1/{name=projects/*/locations/*/cdnKeys/*}\x12\x9b\x02\n\x0cUpdateCdnKey\x12\x33.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest\x1a\x1d.google.longrunning.Operation\"\xb6\x01\xca\x41Y\n%google.cloud.video.stitcher.v1.CdnKey\x12\x30google.cloud.video.stitcher.v1.OperationMetadata\xda\x41\x13\x63\x64n_key,update_mask\x82\xd3\xe4\x93\x02>23/v1/{cdn_key.name=projects/*/locations/*/cdnKeys/*}:\x07\x63\x64n_key\x12\xd2\x01\n\x10\x43reateVodSession\x12\x37.google.cloud.video.stitcher.v1.CreateVodSessionRequest\x1a*.google.cloud.video.stitcher.v1.VodSession\"Y\xda\x41\x12parent,vod_session\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/vodSessions:\x0bvod_session\x12\xb1\x01\n\rGetVodSession\x12\x34.google.cloud.video.stitcher.v1.GetVodSessionRequest\x1a*.google.cloud.video.stitcher.v1.VodSession\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/vodSessions/*}\x12\xe6\x01\n\x14ListVodStitchDetails\x12;.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest\x1a<.google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{parent=projects/*/locations/*/vodSessions/*}/vodStitchDetails\x12\xd3\x01\n\x12GetVodStitchDetail\x12\x39.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest\x1a/.google.cloud.video.stitcher.v1.VodStitchDetail\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{name=projects/*/locations/*/vodSessions/*/vodStitchDetails/*}\x12\xe2\x01\n\x13ListVodAdTagDetails\x12:.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest\x1a;.google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse\"R\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{parent=projects/*/locations/*/vodSessions/*}/vodAdTagDetails\x12\xcf\x01\n\x11GetVodAdTagDetail\x12\x38.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest\x1a..google.cloud.video.stitcher.v1.VodAdTagDetail\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{name=projects/*/locations/*/vodSessions/*/vodAdTagDetails/*}\x12\xe7\x01\n\x14ListLiveAdTagDetails\x12;.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest\x1a<.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse\"T\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\x12\x43/v1/{parent=projects/*/locations/*/liveSessions/*}/liveAdTagDetails\x12\xd4\x01\n\x12GetLiveAdTagDetail\x12\x39.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest\x1a/.google.cloud.video.stitcher.v1.LiveAdTagDetail\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45\x12\x43/v1/{name=projects/*/locations/*/liveSessions/*/liveAdTagDetails/*}\x12\x8f\x02\n\x0b\x43reateSlate\x12\x32.google.cloud.video.stitcher.v1.CreateSlateRequest\x1a\x1d.google.longrunning.Operation\"\xac\x01\xca\x41X\n$google.cloud.video.stitcher.v1.Slate\x12\x30google.cloud.video.stitcher.v1.OperationMetadata\xda\x41\x15parent,slate,slate_id\x82\xd3\xe4\x93\x02\x33\"*/v1/{parent=projects/*/locations/*}/slates:\x05slate\x12\xb0\x01\n\nListSlates\x12\x31.google.cloud.video.stitcher.v1.ListSlatesRequest\x1a\x32.google.cloud.video.stitcher.v1.ListSlatesResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/slates\x12\x9d\x01\n\x08GetSlate\x12/.google.cloud.video.stitcher.v1.GetSlateRequest\x1a%.google.cloud.video.stitcher.v1.Slate\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/slates/*}\x12\x91\x02\n\x0bUpdateSlate\x12\x32.google.cloud.video.stitcher.v1.UpdateSlateRequest\x1a\x1d.google.longrunning.Operation\"\xae\x01\xca\x41X\n$google.cloud.video.stitcher.v1.Slate\x12\x30google.cloud.video.stitcher.v1.OperationMetadata\xda\x41\x11slate,update_mask\x82\xd3\xe4\x93\x02\x39\x32\x30/v1/{slate.name=projects/*/locations/*/slates/*}:\x05slate\x12\xe8\x01\n\x0b\x44\x65leteSlate\x12\x32.google.cloud.video.stitcher.v1.DeleteSlateRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\xca\x41I\n\x15google.protobuf.Empty\x12\x30google.cloud.video.stitcher.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/slates/*}\x12\xd8\x01\n\x11\x43reateLiveSession\x12\x38.google.cloud.video.stitcher.v1.CreateLiveSessionRequest\x1a+.google.cloud.video.stitcher.v1.LiveSession\"\\\xda\x41\x13parent,live_session\x82\xd3\xe4\x93\x02@\"0/v1/{parent=projects/*/locations/*}/liveSessions:\x0clive_session\x12\xb5\x01\n\x0eGetLiveSession\x12\x35.google.cloud.video.stitcher.v1.GetLiveSessionRequest\x1a+.google.cloud.video.stitcher.v1.LiveSession\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/liveSessions/*}\x12\xb5\x02\n\x10\x43reateLiveConfig\x12\x37.google.cloud.video.stitcher.v1.CreateLiveConfigRequest\x1a\x1d.google.longrunning.Operation\"\xc8\x01\xca\x41]\n)google.cloud.video.stitcher.v1.LiveConfig\x12\x30google.cloud.video.stitcher.v1.OperationMetadata\xda\x41!parent,live_config,live_config_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/liveConfigs:\x0blive_config\x12\xc4\x01\n\x0fListLiveConfigs\x12\x36.google.cloud.video.stitcher.v1.ListLiveConfigsRequest\x1a\x37.google.cloud.video.stitcher.v1.ListLiveConfigsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/liveConfigs\x12\xb1\x01\n\rGetLiveConfig\x12\x34.google.cloud.video.stitcher.v1.GetLiveConfigRequest\x1a*.google.cloud.video.stitcher.v1.LiveConfig\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/liveConfigs/*}\x12\xf7\x01\n\x10\x44\x65leteLiveConfig\x12\x37.google.cloud.video.stitcher.v1.DeleteLiveConfigRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41I\n\x15google.protobuf.Empty\x12\x30google.cloud.video.stitcher.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/liveConfigs/*}\x12\xb7\x02\n\x10UpdateLiveConfig\x12\x37.google.cloud.video.stitcher.v1.UpdateLiveConfigRequest\x1a\x1d.google.longrunning.Operation\"\xca\x01\xca\x41]\n)google.cloud.video.stitcher.v1.LiveConfig\x12\x30google.cloud.video.stitcher.v1.OperationMetadata\xda\x41\x17live_config,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{live_config.name=projects/*/locations/*/liveConfigs/*}:\x0blive_config\x12\xae\x02\n\x0f\x43reateVodConfig\x12\x36.google.cloud.video.stitcher.v1.CreateVodConfigRequest\x1a\x1d.google.longrunning.Operation\"\xc3\x01\xca\x41\\\n(google.cloud.video.stitcher.v1.VodConfig\x12\x30google.cloud.video.stitcher.v1.OperationMetadata\xda\x41\x1fparent,vod_config,vod_config_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/vodConfigs:\nvod_config\x12\xc0\x01\n\x0eListVodConfigs\x12\x35.google.cloud.video.stitcher.v1.ListVodConfigsRequest\x1a\x36.google.cloud.video.stitcher.v1.ListVodConfigsResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/vodConfigs\x12\xad\x01\n\x0cGetVodConfig\x12\x33.google.cloud.video.stitcher.v1.GetVodConfigRequest\x1a).google.cloud.video.stitcher.v1.VodConfig\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/vodConfigs/*}\x12\xf4\x01\n\x0f\x44\x65leteVodConfig\x12\x36.google.cloud.video.stitcher.v1.DeleteVodConfigRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41I\n\x15google.protobuf.Empty\x12\x30google.cloud.video.stitcher.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/vodConfigs/*}\x12\xb0\x02\n\x0fUpdateVodConfig\x12\x36.google.cloud.video.stitcher.v1.UpdateVodConfigRequest\x1a\x1d.google.longrunning.Operation\"\xc5\x01\xca\x41\\\n(google.cloud.video.stitcher.v1.VodConfig\x12\x30google.cloud.video.stitcher.v1.OperationMetadata\xda\x41\x16vod_config,update_mask\x82\xd3\xe4\x93\x02G29/v1/{vod_config.name=projects/*/locations/*/vodConfigs/*}:\nvod_config\x1aP\xca\x41\x1cvideostitcher.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x81\x01\n\"com.google.cloud.video.stitcher.v1B\x19VideoStitcherServiceProtoP\x01Z>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Video + module Stitcher + module V1 + CreateCdnKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.CreateCdnKeyRequest").msgclass + ListCdnKeysRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListCdnKeysRequest").msgclass + ListCdnKeysResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListCdnKeysResponse").msgclass + GetCdnKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.GetCdnKeyRequest").msgclass + DeleteCdnKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.DeleteCdnKeyRequest").msgclass + UpdateCdnKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.UpdateCdnKeyRequest").msgclass + CreateVodSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.CreateVodSessionRequest").msgclass + GetVodSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.GetVodSessionRequest").msgclass + ListVodStitchDetailsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest").msgclass + ListVodStitchDetailsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse").msgclass + GetVodStitchDetailRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.GetVodStitchDetailRequest").msgclass + ListVodAdTagDetailsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest").msgclass + ListVodAdTagDetailsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse").msgclass + GetVodAdTagDetailRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest").msgclass + ListLiveAdTagDetailsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest").msgclass + ListLiveAdTagDetailsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse").msgclass + GetLiveAdTagDetailRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest").msgclass + CreateSlateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.CreateSlateRequest").msgclass + GetSlateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.GetSlateRequest").msgclass + ListSlatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListSlatesRequest").msgclass + ListSlatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListSlatesResponse").msgclass + UpdateSlateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.UpdateSlateRequest").msgclass + DeleteSlateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.DeleteSlateRequest").msgclass + CreateLiveSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.CreateLiveSessionRequest").msgclass + GetLiveSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.GetLiveSessionRequest").msgclass + CreateLiveConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.CreateLiveConfigRequest").msgclass + ListLiveConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListLiveConfigsRequest").msgclass + ListLiveConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListLiveConfigsResponse").msgclass + GetLiveConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.GetLiveConfigRequest").msgclass + DeleteLiveConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.DeleteLiveConfigRequest").msgclass + UpdateLiveConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.UpdateLiveConfigRequest").msgclass + CreateVodConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.CreateVodConfigRequest").msgclass + ListVodConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListVodConfigsRequest").msgclass + ListVodConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListVodConfigsResponse").msgclass + GetVodConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.GetVodConfigRequest").msgclass + DeleteVodConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.DeleteVodConfigRequest").msgclass + UpdateVodConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.UpdateVodConfigRequest").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.OperationMetadata").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service_services_pb.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service_services_pb.rb new file mode 100644 index 000000000000..479a2a7e25d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service_services_pb.rb @@ -0,0 +1,121 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/video/stitcher/v1/video_stitcher_service.proto for package 'google.cloud.video.stitcher.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/video/stitcher/v1/video_stitcher_service_pb' + +module Google + module Cloud + module Video + module Stitcher + module V1 + module VideoStitcherService + # Video-On-Demand content stitching API allows you to insert ads + # into (VoD) video on demand files. You will be able to render custom + # scrubber bars with highlighted ads, enforce ad policies, allow + # seamless playback and tracking on native players and monetize + # content with any standard VMAP compliant ad server. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.video.stitcher.v1.VideoStitcherService' + + # Creates a new CDN key. + rpc :CreateCdnKey, ::Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest, ::Google::Longrunning::Operation + # Lists all CDN keys in the specified project and location. + rpc :ListCdnKeys, ::Google::Cloud::Video::Stitcher::V1::ListCdnKeysRequest, ::Google::Cloud::Video::Stitcher::V1::ListCdnKeysResponse + # Returns the specified CDN key. + rpc :GetCdnKey, ::Google::Cloud::Video::Stitcher::V1::GetCdnKeyRequest, ::Google::Cloud::Video::Stitcher::V1::CdnKey + # Deletes the specified CDN key. + rpc :DeleteCdnKey, ::Google::Cloud::Video::Stitcher::V1::DeleteCdnKeyRequest, ::Google::Longrunning::Operation + # Updates the specified CDN key. Only update fields specified + # in the call method body. + rpc :UpdateCdnKey, ::Google::Cloud::Video::Stitcher::V1::UpdateCdnKeyRequest, ::Google::Longrunning::Operation + # Creates a client side playback VOD session and returns the full + # tracking and playback metadata of the session. + rpc :CreateVodSession, ::Google::Cloud::Video::Stitcher::V1::CreateVodSessionRequest, ::Google::Cloud::Video::Stitcher::V1::VodSession + # Returns the full tracking, playback metadata, and relevant ad-ops + # logs for the specified VOD session. + rpc :GetVodSession, ::Google::Cloud::Video::Stitcher::V1::GetVodSessionRequest, ::Google::Cloud::Video::Stitcher::V1::VodSession + # Returns a list of detailed stitching information of the specified VOD + # session. + rpc :ListVodStitchDetails, ::Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsRequest, ::Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsResponse + # Returns the specified stitching information for the specified VOD session. + rpc :GetVodStitchDetail, ::Google::Cloud::Video::Stitcher::V1::GetVodStitchDetailRequest, ::Google::Cloud::Video::Stitcher::V1::VodStitchDetail + # Return the list of ad tag details for the specified VOD session. + rpc :ListVodAdTagDetails, ::Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsRequest, ::Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsResponse + # Returns the specified ad tag detail for the specified VOD session. + rpc :GetVodAdTagDetail, ::Google::Cloud::Video::Stitcher::V1::GetVodAdTagDetailRequest, ::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail + # Return the list of ad tag details for the specified live session. + rpc :ListLiveAdTagDetails, ::Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsRequest, ::Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsResponse + # Returns the specified ad tag detail for the specified live session. + rpc :GetLiveAdTagDetail, ::Google::Cloud::Video::Stitcher::V1::GetLiveAdTagDetailRequest, ::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail + # Creates a slate. + rpc :CreateSlate, ::Google::Cloud::Video::Stitcher::V1::CreateSlateRequest, ::Google::Longrunning::Operation + # Lists all slates in the specified project and location. + rpc :ListSlates, ::Google::Cloud::Video::Stitcher::V1::ListSlatesRequest, ::Google::Cloud::Video::Stitcher::V1::ListSlatesResponse + # Returns the specified slate. + rpc :GetSlate, ::Google::Cloud::Video::Stitcher::V1::GetSlateRequest, ::Google::Cloud::Video::Stitcher::V1::Slate + # Updates the specified slate. + rpc :UpdateSlate, ::Google::Cloud::Video::Stitcher::V1::UpdateSlateRequest, ::Google::Longrunning::Operation + # Deletes the specified slate. + rpc :DeleteSlate, ::Google::Cloud::Video::Stitcher::V1::DeleteSlateRequest, ::Google::Longrunning::Operation + # Creates a new live session. + rpc :CreateLiveSession, ::Google::Cloud::Video::Stitcher::V1::CreateLiveSessionRequest, ::Google::Cloud::Video::Stitcher::V1::LiveSession + # Returns the details for the specified live session. + rpc :GetLiveSession, ::Google::Cloud::Video::Stitcher::V1::GetLiveSessionRequest, ::Google::Cloud::Video::Stitcher::V1::LiveSession + # Registers the live config with the provided unique ID in + # the specified region. + rpc :CreateLiveConfig, ::Google::Cloud::Video::Stitcher::V1::CreateLiveConfigRequest, ::Google::Longrunning::Operation + # Lists all live configs managed by the Video Stitcher that + # belong to the specified project and region. + rpc :ListLiveConfigs, ::Google::Cloud::Video::Stitcher::V1::ListLiveConfigsRequest, ::Google::Cloud::Video::Stitcher::V1::ListLiveConfigsResponse + # Returns the specified live config managed by the Video + # Stitcher service. + rpc :GetLiveConfig, ::Google::Cloud::Video::Stitcher::V1::GetLiveConfigRequest, ::Google::Cloud::Video::Stitcher::V1::LiveConfig + # Deletes the specified live config. + rpc :DeleteLiveConfig, ::Google::Cloud::Video::Stitcher::V1::DeleteLiveConfigRequest, ::Google::Longrunning::Operation + # Updates the specified LiveConfig. Only update fields specified + # in the call method body. + rpc :UpdateLiveConfig, ::Google::Cloud::Video::Stitcher::V1::UpdateLiveConfigRequest, ::Google::Longrunning::Operation + # Registers the VOD config with the provided unique ID in + # the specified region. + rpc :CreateVodConfig, ::Google::Cloud::Video::Stitcher::V1::CreateVodConfigRequest, ::Google::Longrunning::Operation + # Lists all VOD configs managed by the Video Stitcher API that + # belong to the specified project and region. + rpc :ListVodConfigs, ::Google::Cloud::Video::Stitcher::V1::ListVodConfigsRequest, ::Google::Cloud::Video::Stitcher::V1::ListVodConfigsResponse + # Returns the specified VOD config managed by the Video + # Stitcher API service. + rpc :GetVodConfig, ::Google::Cloud::Video::Stitcher::V1::GetVodConfigRequest, ::Google::Cloud::Video::Stitcher::V1::VodConfig + # Deletes the specified VOD config. + rpc :DeleteVodConfig, ::Google::Cloud::Video::Stitcher::V1::DeleteVodConfigRequest, ::Google::Longrunning::Operation + # Updates the specified VOD config. Only update fields specified + # in the call method body. + rpc :UpdateVodConfig, ::Google::Cloud::Video::Stitcher::V1::UpdateVodConfigRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/vod_configs_pb.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/vod_configs_pb.rb new file mode 100644 index 000000000000..1933f42a2c65 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/vod_configs_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/video/stitcher/v1/vod_configs.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/video/stitcher/v1/fetch_options_pb' + + +descriptor_data = "\n0google/cloud/video/stitcher/v1/vod_configs.proto\x12\x1egoogle.cloud.video.stitcher.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/video/stitcher/v1/fetch_options.proto\"\xe1\x03\n\tVodConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nsource_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nad_tag_uri\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12I\n\x0egam_vod_config\x18\x04 \x01(\x0b\x32,.google.cloud.video.stitcher.v1.GamVodConfigB\x03\xe0\x41\x01\x12\x43\n\x05state\x18\x05 \x01(\x0e\x32/.google.cloud.video.stitcher.v1.VodConfig.StateB\x03\xe0\x41\x03\x12J\n\x14source_fetch_options\x18\x08 \x01(\x0b\x32,.google.cloud.video.stitcher.v1.FetchOptions\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03:l\xea\x41i\n&videostitcher.googleapis.com/VodConfig\x12?projects/{project}/locations/{location}/vodConfigs/{vod_config}\")\n\x0cGamVodConfig\x12\x19\n\x0cnetwork_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42w\n\"com.google.cloud.video.stitcher.v1B\x0fVodConfigsProtoP\x01Z>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Video + module Stitcher + module V1 + VodConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.VodConfig").msgclass + VodConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.VodConfig.State").enummodule + GamVodConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.GamVodConfig").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/README.md new file mode 100644 index 000000000000..ea625720640c --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Video Stitcher 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-video-stitcher-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # 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. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + # + # Example: + # + # 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 + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # 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 + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # 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 + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/ad_tag_details.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/ad_tag_details.rb new file mode 100644 index 000000000000..932420cbd12b --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/ad_tag_details.rb @@ -0,0 +1,106 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Video + module Stitcher + module V1 + # Information related to the details for one ad tag. This resource is only + # available for live sessions that do not implement Google Ad Manager ad + # insertion. + # @!attribute [rw] name + # @return [::String] + # The resource name in the form of + # `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{id}`. + # @!attribute [rw] ad_requests + # @return [::Array<::Google::Cloud::Video::Stitcher::V1::AdRequest>] + # A list of ad requests. + class LiveAdTagDetail + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information related to the details for one ad tag. This resource is only + # available for VOD sessions that do not implement Google Ad Manager ad + # insertion. + # @!attribute [rw] name + # @return [::String] + # The name of the ad tag detail for the specified VOD session, in the form of + # `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{id}`. + # @!attribute [rw] ad_requests + # @return [::Array<::Google::Cloud::Video::Stitcher::V1::AdRequest>] + # A list of ad requests for one ad tag. + class VodAdTagDetail + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of an ad request to an ad server. + # @!attribute [rw] uri + # @return [::String] + # The ad tag URI processed with integrated macros. + # @!attribute [rw] request_metadata + # @return [::Google::Cloud::Video::Stitcher::V1::RequestMetadata] + # The request metadata used to make the ad request. + # @!attribute [rw] response_metadata + # @return [::Google::Cloud::Video::Stitcher::V1::ResponseMetadata] + # The response metadata received from the ad request. + class AdRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for an ad request. + # @!attribute [rw] headers + # @return [::Google::Protobuf::Struct] + # The HTTP headers of the ad request. + class RequestMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for the response of an ad request. + # @!attribute [rw] error + # @return [::String] + # Error message received when making the ad request. + # @!attribute [rw] headers + # @return [::Google::Protobuf::Struct] + # Headers from the response. + # @!attribute [rw] status_code + # @return [::String] + # Status code for the response. + # @!attribute [rw] size_bytes + # @return [::Integer] + # Size in bytes of the response. + # @!attribute [rw] duration + # @return [::Google::Protobuf::Duration] + # Total time elapsed for the response. + # @!attribute [rw] body + # @return [::String] + # The body of the response. + class ResponseMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/cdn_keys.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/cdn_keys.rb new file mode 100644 index 000000000000..103d90b49c20 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/cdn_keys.rb @@ -0,0 +1,112 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Video + module Stitcher + module V1 + # Configuration for a CDN key. Used by the Video Stitcher + # to sign URIs for fetching video manifests and signing + # media segments for playback. + # @!attribute [rw] google_cdn_key + # @return [::Google::Cloud::Video::Stitcher::V1::GoogleCdnKey] + # The configuration for a Google Cloud CDN key. + # + # Note: The following fields are mutually exclusive: `google_cdn_key`, `akamai_cdn_key`, `media_cdn_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] akamai_cdn_key + # @return [::Google::Cloud::Video::Stitcher::V1::AkamaiCdnKey] + # The configuration for an Akamai CDN key. + # + # Note: The following fields are mutually exclusive: `akamai_cdn_key`, `google_cdn_key`, `media_cdn_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] media_cdn_key + # @return [::Google::Cloud::Video::Stitcher::V1::MediaCdnKey] + # The configuration for a Media CDN key. + # + # Note: The following fields are mutually exclusive: `media_cdn_key`, `google_cdn_key`, `akamai_cdn_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # The resource name of the CDN key, in the form of + # `projects/{project}/locations/{location}/cdnKeys/{id}`. + # The name is ignored when creating a CDN key. + # @!attribute [rw] hostname + # @return [::String] + # The hostname this key applies to. + class CdnKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for a Google Cloud CDN key. + # @!attribute [rw] private_key + # @return [::String] + # Input only. Secret for this Google Cloud CDN key. + # @!attribute [rw] key_name + # @return [::String] + # The public name of the Google Cloud CDN key. + class GoogleCdnKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for an Akamai CDN key. + # @!attribute [rw] token_key + # @return [::String] + # Input only. Token key for the Akamai CDN edge configuration. + class AkamaiCdnKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for a Media CDN key. + # @!attribute [rw] private_key + # @return [::String] + # Input only. 64-byte ed25519 private key for this Media CDN key. + # @!attribute [rw] key_name + # @return [::String] + # The keyset name of the Media CDN key. + # @!attribute [rw] token_config + # @return [::Google::Cloud::Video::Stitcher::V1::MediaCdnKey::TokenConfig] + # Optional. If set, the URL will be signed using the Media CDN token. + # Otherwise, the URL would be signed using the standard Media CDN signature. + class MediaCdnKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for a Media CDN token. + # @!attribute [rw] query_parameter + # @return [::String] + # Optional. The query parameter in which to find the token. + # + # The name must be 1-64 characters long and match + # the regular expression `[a-zA-Z]([a-zA-Z0-9_-])*` which means the + # first character must be a letter, and all following characters + # must be a dash, underscore, letter or digit. + # + # Defaults to `edge-cache-token`. + class TokenConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/companions.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/companions.rb new file mode 100644 index 000000000000..6815f91d8f6b --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/companions.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 Cloud + module Video + module Stitcher + module V1 + # Metadata for companion ads. + # @!attribute [rw] display_requirement + # @return [::Google::Cloud::Video::Stitcher::V1::CompanionAds::DisplayRequirement] + # Indicates how many of the companions should be displayed with the ad. + # @!attribute [rw] companions + # @return [::Array<::Google::Cloud::Video::Stitcher::V1::Companion>] + # List of companion ads. + class CompanionAds + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Indicates how many of the companions should be displayed with the ad. + module DisplayRequirement + # Required companions are not specified. The default is ALL. + DISPLAY_REQUIREMENT_UNSPECIFIED = 0 + + # All companions are required to be displayed. + ALL = 1 + + # At least one of companions needs to be displayed. + ANY = 2 + + # All companions are optional for display. + NONE = 3 + end + end + + # Metadata for a companion. + # @!attribute [rw] iframe_ad_resource + # @return [::Google::Cloud::Video::Stitcher::V1::IframeAdResource] + # The IFrame ad resource associated with the companion ad. + # + # Note: The following fields are mutually exclusive: `iframe_ad_resource`, `static_ad_resource`, `html_ad_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] static_ad_resource + # @return [::Google::Cloud::Video::Stitcher::V1::StaticAdResource] + # The static ad resource associated with the companion ad. + # + # Note: The following fields are mutually exclusive: `static_ad_resource`, `iframe_ad_resource`, `html_ad_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] html_ad_resource + # @return [::Google::Cloud::Video::Stitcher::V1::HtmlAdResource] + # The HTML ad resource associated with the companion ad. + # + # Note: The following fields are mutually exclusive: `html_ad_resource`, `iframe_ad_resource`, `static_ad_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] api_framework + # @return [::String] + # The API necessary to communicate with the creative if available. + # @!attribute [rw] height_px + # @return [::Integer] + # The pixel height of the placement slot for the intended creative. + # @!attribute [rw] width_px + # @return [::Integer] + # The pixel width of the placement slot for the intended creative. + # @!attribute [rw] asset_height_px + # @return [::Integer] + # The pixel height of the creative. + # @!attribute [rw] expanded_height_px + # @return [::Integer] + # The maximum pixel height of the creative in its expanded state. + # @!attribute [rw] asset_width_px + # @return [::Integer] + # The pixel width of the creative. + # @!attribute [rw] expanded_width_px + # @return [::Integer] + # The maximum pixel width of the creative in its expanded state. + # @!attribute [rw] ad_slot_id + # @return [::String] + # The ID used to identify the desired placement on a publisher's page. + # Values to be used should be discussed between publishers and + # advertisers. + # @!attribute [rw] events + # @return [::Array<::Google::Cloud::Video::Stitcher::V1::Event>] + # The list of tracking events for the companion. + class Companion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for an HTML ad resource. + # @!attribute [rw] html_source + # @return [::String] + # The HTML to display for the ad resource. + class HtmlAdResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for an IFrame ad resource. + # @!attribute [rw] uri + # @return [::String] + # URI source for an IFrame to display for the ad resource. + class IframeAdResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for a static ad resource. + # @!attribute [rw] uri + # @return [::String] + # URI to the static file for the ad resource. + # @!attribute [rw] creative_type + # @return [::String] + # Describes the MIME type of the ad resource. + class StaticAdResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/events.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/events.rb new file mode 100644 index 000000000000..1e4391d24bc9 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/events.rb @@ -0,0 +1,141 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Video + module Stitcher + module V1 + # Describes an event and a trigger URI. + # @!attribute [rw] type + # @return [::Google::Cloud::Video::Stitcher::V1::Event::EventType] + # Describes the event that occurred. + # @!attribute [rw] uri + # @return [::String] + # The URI to trigger for this event. + # @!attribute [rw] id + # @return [::String] + # The ID of the event. + # @!attribute [rw] offset + # @return [::Google::Protobuf::Duration] + # The offset in seconds if the event type is `PROGRESS`. + class Event + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes the event that occurred. + module EventType + # The event type is unspecified. + EVENT_TYPE_UNSPECIFIED = 0 + + # First frame of creative ad viewed. + CREATIVE_VIEW = 1 + + # Creative ad started. + START = 2 + + # Start of an ad break. + BREAK_START = 3 + + # End of an ad break. + BREAK_END = 4 + + # Impression. + IMPRESSION = 5 + + # First quartile progress. + FIRST_QUARTILE = 6 + + # Midpoint progress. + MIDPOINT = 7 + + # Third quartile progress. + THIRD_QUARTILE = 8 + + # Ad progress completed. + COMPLETE = 9 + + # Specific progress event with an offset. + PROGRESS = 10 + + # Player muted. + MUTE = 11 + + # Player unmuted. + UNMUTE = 12 + + # Player paused. + PAUSE = 13 + + # Click event. + CLICK = 14 + + # Click-through event. + CLICK_THROUGH = 15 + + # Player rewinding. + REWIND = 16 + + # Player resumed. + RESUME = 17 + + # Error event. + ERROR = 18 + + # Ad expanded to a larger size. + EXPAND = 21 + + # Ad collapsed to a smaller size. + COLLAPSE = 22 + + # Non-linear ad closed. + CLOSE = 24 + + # Linear ad closed. + CLOSE_LINEAR = 25 + + # Ad skipped. + SKIP = 26 + + # Accept invitation event. + ACCEPT_INVITATION = 27 + end + end + + # Indicates a time in which a list of events should be triggered + # during media playback. + # @!attribute [rw] time_offset + # @return [::Google::Protobuf::Duration] + # The time when the following tracking events occurs. The time is in + # seconds relative to the start of the VOD asset. + # @!attribute [rw] events + # @return [::Array<::Google::Cloud::Video::Stitcher::V1::Event>] + # The list of progress tracking events for the ad break. These can be of + # the following IAB types: `BREAK_START`, `BREAK_END`, `IMPRESSION`, + # `CREATIVE_VIEW`, `START`, `FIRST_QUARTILE`, `MIDPOINT`, `THIRD_QUARTILE`, + # `COMPLETE`, `PROGRESS`. + class ProgressEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/fetch_options.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/fetch_options.rb new file mode 100644 index 000000000000..aec79c174015 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/fetch_options.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 Cloud + module Video + module Stitcher + module V1 + # Options on how fetches should be made. + # @!attribute [rw] headers + # @return [::Google::Protobuf::Map{::String => ::String}] + # Custom headers to pass into fetch request. + # Headers must have a maximum of 3 key value pairs. + # Each key value pair must have a maximum of 256 characters per key and 256 + # characters per value. + class FetchOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class HeadersEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/live_configs.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/live_configs.rb new file mode 100644 index 000000000000..03f3943a9f9f --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/live_configs.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 Cloud + module Video + module Stitcher + module V1 + # Metadata for used to register live configs. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the live config, in the form of + # `projects/{project}/locations/{location}/liveConfigs/{id}`. + # @!attribute [rw] source_uri + # @return [::String] + # Required. Source URI for the live stream manifest. + # @!attribute [rw] ad_tag_uri + # @return [::String] + # The default ad tag associated with this live stream config. + # @!attribute [rw] gam_live_config + # @return [::Google::Cloud::Video::Stitcher::V1::GamLiveConfig] + # Additional metadata used to register a live stream with Google Ad Manager + # (GAM) + # @!attribute [r] state + # @return [::Google::Cloud::Video::Stitcher::V1::LiveConfig::State] + # Output only. State of the live config. + # @!attribute [rw] ad_tracking + # @return [::Google::Cloud::Video::Stitcher::V1::AdTracking] + # Required. Determines how the ads are tracked. + # @!attribute [rw] default_slate + # @return [::String] + # This must refer to a slate in the same + # project. If Google Ad Manager (GAM) is used for ads, this string sets the + # value of `slateCreativeId` in + # https://developers.google.com/ad-manager/api/reference/v202211/LiveStreamEventService.LiveStreamEvent#slateCreativeId + # @!attribute [rw] stitching_policy + # @return [::Google::Cloud::Video::Stitcher::V1::LiveConfig::StitchingPolicy] + # Defines the stitcher behavior in case an ad does not align exactly with + # the ad break boundaries. If not specified, the default is `CUT_CURRENT`. + # @!attribute [rw] prefetch_config + # @return [::Google::Cloud::Video::Stitcher::V1::PrefetchConfig] + # The configuration for prefetching ads. + # @!attribute [rw] source_fetch_options + # @return [::Google::Cloud::Video::Stitcher::V1::FetchOptions] + # Options for fetching source manifests and segments. + class LiveConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # State of the live config. + module State + # State is not specified. + STATE_UNSPECIFIED = 0 + + # Live config is being created. + CREATING = 1 + + # Live config is ready for use. + READY = 2 + + # Live config is queued up for deletion. + DELETING = 3 + end + + # Defines the ad stitching behavior in case the ad duration does not align + # exactly with the ad break boundaries. If not specified, the default is + # `CUT_CURRENT`. + module StitchingPolicy + # Stitching policy is not specified. + STITCHING_POLICY_UNSPECIFIED = 0 + + # Cuts an ad short and returns to content in the middle of the ad. + CUT_CURRENT = 1 + + # Finishes stitching the current ad before returning to content. + COMPLETE_AD = 2 + end + end + + # The configuration for prefetch ads. + # @!attribute [rw] enabled + # @return [::Boolean] + # Required. Indicates whether the option to prefetch ad requests is enabled. + # @!attribute [rw] initial_ad_request_duration + # @return [::Google::Protobuf::Duration] + # The duration in seconds of the part of the break to be prefetched. + # This field is only relevant if prefetch is enabled. + # You should set this duration to as long as possible to increase the + # benefits of prefetching, but not longer than the shortest ad break + # expected. For example, for a live event with 30s and 60s ad breaks, the + # initial duration should be set to 30s. + class PrefetchConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata used to register a live stream with Google Ad Manager (GAM) + # @!attribute [rw] network_code + # @return [::String] + # Required. Ad Manager network code to associate with the live config. + # @!attribute [r] asset_key + # @return [::String] + # Output only. The asset key identifier generated for the live config. + # @!attribute [r] custom_asset_key + # @return [::String] + # Output only. The custom asset key identifier generated for the live config. + class GamLiveConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Determines the ad tracking policy. + module AdTracking + # The ad tracking policy is not specified. + AD_TRACKING_UNSPECIFIED = 0 + + # Client-side ad tracking is specified. The client player is expected to + # trigger playback and activity events itself. + CLIENT = 1 + + # The Video Stitcher API will trigger playback events on behalf of + # the client player. + SERVER = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/sessions.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/sessions.rb new file mode 100644 index 000000000000..538a72d08006 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/sessions.rb @@ -0,0 +1,285 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Video + module Stitcher + module V1 + # Metadata for a VOD session. The session expires 4 hours after its creation. + # @!attribute [r] name + # @return [::String] + # Output only. The name of the VOD session, in the form of + # `projects/{project_number}/locations/{location}/vodSessions/{id}`. + # @!attribute [r] interstitials + # @return [::Google::Cloud::Video::Stitcher::V1::Interstitials] + # Output only. Metadata of what was stitched into the content. + # @!attribute [r] play_uri + # @return [::String] + # Output only. The playback URI of the stitched content. + # @!attribute [rw] source_uri + # @return [::String] + # URI of the media to stitch. For most use cases, you should create a + # {::Google::Cloud::Video::Stitcher::V1::VodConfig VodConfig} with this information + # rather than setting this field directly. + # @!attribute [rw] ad_tag_uri + # @return [::String] + # Ad tag URI. For most use cases, you should create a + # {::Google::Cloud::Video::Stitcher::V1::VodConfig VodConfig} with this information + # rather than setting this field directly. + # @!attribute [rw] ad_tag_macro_map + # @return [::Google::Protobuf::Map{::String => ::String}] + # Key value pairs for ad tag macro replacement, only available for VOD + # sessions that do not implement Google Ad manager ad insertion. If the + # specified ad tag URI has macros, this field provides the mapping to the + # value that will replace the macro in the ad tag URI. + # + # Macros are designated by square brackets, for example: + # + # Ad tag URI: `"https://doubleclick.google.com/ad/1?geo_id=[geoId]"` + # + # Ad tag macro map: `{"geoId": "123"}` + # + # Fully qualified ad tag: + # `"https://doubleclick.google.com/ad/1?geo_id=123"` + # @!attribute [rw] manifest_options + # @return [::Google::Cloud::Video::Stitcher::V1::ManifestOptions] + # Additional options that affect the output of the manifest. + # @!attribute [r] asset_id + # @return [::String] + # Output only. The generated ID of the VodSession's source media. + # @!attribute [rw] ad_tracking + # @return [::Google::Cloud::Video::Stitcher::V1::AdTracking] + # Required. Determines how the ad should be tracked. + # @!attribute [rw] gam_settings + # @return [::Google::Cloud::Video::Stitcher::V1::VodSession::GamSettings] + # This field should be set with appropriate values if GAM is being used for + # ads. + # @!attribute [rw] vod_config + # @return [::String] + # The resource name of the VOD config for this session, in the form of + # `projects/{project}/locations/{location}/vodConfigs/{id}`. + class VodSession + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines fields related to Google Ad Manager (GAM). This should be set if + # GAM is being used for ads. + # @!attribute [rw] network_code + # @return [::String] + # Required. Ad Manager network code. + # @!attribute [rw] stream_id + # @return [::String] + # Required. The stream ID generated by Ad Manager. + class GamSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AdTagMacroMapEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes what was stitched into a VOD session's manifest. + # @!attribute [rw] ad_breaks + # @return [::Array<::Google::Cloud::Video::Stitcher::V1::VodSessionAdBreak>] + # List of ad breaks ordered by time. + # @!attribute [rw] session_content + # @return [::Google::Cloud::Video::Stitcher::V1::VodSessionContent] + # Information related to the content of the VOD session. + class Interstitials + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for an inserted ad in a VOD session. + # @!attribute [rw] duration + # @return [::Google::Protobuf::Duration] + # Duration in seconds of the ad. + # @!attribute [rw] companion_ads + # @return [::Google::Cloud::Video::Stitcher::V1::CompanionAds] + # Metadata of companion ads associated with the ad. + # @!attribute [rw] activity_events + # @return [::Array<::Google::Cloud::Video::Stitcher::V1::Event>] + # The list of progress tracking events for the ad break. These can be of + # the following IAB types: `MUTE`, `UNMUTE`, `PAUSE`, `CLICK`, + # `CLICK_THROUGH`, `REWIND`, `RESUME`, `ERROR`, `FULLSCREEN`, + # `EXIT_FULLSCREEN`, `EXPAND`, `COLLAPSE`, `ACCEPT_INVITATION_LINEAR`, + # `CLOSE_LINEAR`, `SKIP`. + class VodSessionAd + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for the entire stitched content in a VOD session. + # @!attribute [rw] duration + # @return [::Google::Protobuf::Duration] + # The total duration in seconds of the content including the ads stitched + # in. + class VodSessionContent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for an inserted ad break. + # @!attribute [rw] progress_events + # @return [::Array<::Google::Cloud::Video::Stitcher::V1::ProgressEvent>] + # List of events that are expected to be triggered, ordered by time. + # @!attribute [rw] ads + # @return [::Array<::Google::Cloud::Video::Stitcher::V1::VodSessionAd>] + # Ordered list of ads stitched into the ad break. + # @!attribute [rw] end_time_offset + # @return [::Google::Protobuf::Duration] + # Ad break end time in seconds relative to the start of the VOD asset. + # @!attribute [rw] start_time_offset + # @return [::Google::Protobuf::Duration] + # Ad break start time in seconds relative to the start of the VOD asset. + class VodSessionAdBreak + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for a live session. The session expires 5 minutes after the client + # stops fetching the session's playlists. + # @!attribute [r] name + # @return [::String] + # Output only. The name of the live session, in the form of + # `projects/{project}/locations/{location}/liveSessions/{id}`. + # @!attribute [r] play_uri + # @return [::String] + # Output only. The URI to play the live session's ad-stitched stream. + # @!attribute [rw] ad_tag_macros + # @return [::Google::Protobuf::Map{::String => ::String}] + # Key value pairs for ad tag macro replacement, only available for live + # sessions that do not implement Google Ad manager ad insertion. If the + # specified ad tag URI has macros, this field provides the mapping to the + # value that will replace the macro in the ad tag URI. + # + # Macros are designated by square brackets, for example: + # + # Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]" + # + # Ad tag macros: `{"geoId": "123"}` + # + # Fully qualified ad tag: + # `"https://doubleclick.google.com/ad/1?geo_id=123"` + # @!attribute [rw] manifest_options + # @return [::Google::Cloud::Video::Stitcher::V1::ManifestOptions] + # Additional options that affect the output of the manifest. + # @!attribute [rw] gam_settings + # @return [::Google::Cloud::Video::Stitcher::V1::LiveSession::GamSettings] + # This field should be set with appropriate values if GAM is being used for + # ads. + # @!attribute [rw] live_config + # @return [::String] + # Required. The resource name of the live config for this session, in the + # form of `projects/{project}/locations/{location}/liveConfigs/{id}`. + # @!attribute [rw] ad_tracking + # @return [::Google::Cloud::Video::Stitcher::V1::AdTracking] + # Determines how the ad should be tracked. This overrides the value set in + # the live config for this session. + class LiveSession + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines fields related to Google Ad Manager (GAM). + # @!attribute [rw] stream_id + # @return [::String] + # Required. The stream ID generated by Ad Manager. This must be set if GAM + # is being used for ads and the session uses client-side ad tracking. + # @!attribute [rw] targeting_parameters + # @return [::Google::Protobuf::Map{::String => ::String}] + # [Targeting + # parameters](https://support.google.com/admanager/answer/7320899) to send + # to Ad Manager to generate a stream ID. This should only be set if the + # session uses server-side ad tracking. + class GamSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class TargetingParametersEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AdTagMacrosEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Options for manifest generation. + # @!attribute [rw] include_renditions + # @return [::Array<::Google::Cloud::Video::Stitcher::V1::RenditionFilter>] + # If specified, the output manifest will only return renditions matching the + # specified filters. + # @!attribute [rw] bitrate_order + # @return [::Google::Cloud::Video::Stitcher::V1::ManifestOptions::OrderPolicy] + # If specified, the output manifest will orders the video and muxed + # renditions by bitrate according to the ordering policy. + class ManifestOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines the ordering policy during manifest generation. + module OrderPolicy + # Ordering policy is not specified. + ORDER_POLICY_UNSPECIFIED = 0 + + # Order by ascending. + ASCENDING = 1 + + # Order by descending. + DESCENDING = 2 + end + end + + # Filters for a video or muxed redition. + # @!attribute [rw] bitrate_bps + # @return [::Integer] + # Bitrate in bits per second for the rendition. If set, only renditions with + # the exact bitrate will match. + # @!attribute [rw] codecs + # @return [::String] + # Codecs for the rendition. If set, only renditions with the exact value + # will match. + class RenditionFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/slates.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/slates.rb new file mode 100644 index 000000000000..eb7aadf122b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/slates.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! + + +module Google + module Cloud + module Video + module Stitcher + module V1 + # Slate object + # @!attribute [r] name + # @return [::String] + # Output only. The name of the slate, in the form of + # `projects/{project_number}/locations/{location}/slates/{id}`. + # @!attribute [rw] uri + # @return [::String] + # The URI to fetch the source content for the slate. This URI must return an + # MP4 video with at least one audio track. + # @!attribute [rw] gam_slate + # @return [::Google::Cloud::Video::Stitcher::V1::Slate::GamSlate] + # gam_slate has all the GAM-related attributes of slates. + class Slate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # GamSlate object has Google Ad Manager (GAM) related properties for the + # slate. + # @!attribute [rw] network_code + # @return [::String] + # Required. Ad Manager network code to associate with the live config. + # @!attribute [r] gam_slate_id + # @return [::Integer] + # Output only. The identifier generated for the slate by GAM. + class GamSlate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/stitch_details.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/stitch_details.rb new file mode 100644 index 000000000000..a858eb22ece3 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/stitch_details.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Video + module Stitcher + module V1 + # Information related to the interstitial of a VOD session. This resource is + # only available for VOD sessions that do not implement Google Ad Manager ad + # insertion. + # @!attribute [rw] name + # @return [::String] + # The name of the stitch detail in the specified VOD session, in the form of + # `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. + # @!attribute [rw] ad_stitch_details + # @return [::Array<::Google::Cloud::Video::Stitcher::V1::AdStitchDetail>] + # A list of ad processing details for the fetched ad playlist. + class VodStitchDetail + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for a stitched ad. + # @!attribute [rw] ad_break_id + # @return [::String] + # Required. The ad break ID of the processed ad. + # @!attribute [rw] ad_id + # @return [::String] + # Required. The ad ID of the processed ad. + # @!attribute [rw] ad_time_offset + # @return [::Google::Protobuf::Duration] + # Required. The time offset of the processed ad. + # @!attribute [rw] skip_reason + # @return [::String] + # Optional. Indicates the reason why the ad has been skipped. + # @!attribute [rw] media + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Optional. The metadata of the chosen media file for the ad. + class AdStitchDetail + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class MediaEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/video_stitcher_service.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/video_stitcher_service.rb new file mode 100644 index 000000000000..a546864575f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/video_stitcher_service.rb @@ -0,0 +1,619 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Video + module Stitcher + module V1 + # Request message for VideoStitcherService.createCdnKey. + # @!attribute [rw] parent + # @return [::String] + # Required. The project in which the CDN key should be created, in the form + # of `projects/{project_number}/locations/{location}`. + # @!attribute [rw] cdn_key + # @return [::Google::Cloud::Video::Stitcher::V1::CdnKey] + # Required. The CDN key resource to create. + # @!attribute [rw] cdn_key_id + # @return [::String] + # Required. The ID to use for the CDN key, which will become the final + # component of the CDN key's resource name. + # + # This value should conform to RFC-1034, which restricts to + # lower-case letters, numbers, and hyphen, with the first character a + # letter, the last a letter or a number, and a 63 character maximum. + class CreateCdnKeyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.listCdnKeys. + # @!attribute [rw] parent + # @return [::String] + # Required. The project that contains the list of CDN keys, in the form of + # `projects/{project_number}/locations/{location}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Filtering results + # @!attribute [rw] order_by + # @return [::String] + # Hint for how to order the results + class ListCdnKeysRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for VideoStitcher.ListCdnKeys. + # @!attribute [rw] cdn_keys + # @return [::Array<::Google::Cloud::Video::Stitcher::V1::CdnKey>] + # List of CDN keys. + # @!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 ListCdnKeysResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.getCdnKey. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the CDN key to be retrieved, in the form of + # `projects/{project}/locations/{location}/cdnKeys/{id}`. + class GetCdnKeyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.deleteCdnKey. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the CDN key to be deleted, in the form of + # `projects/{project_number}/locations/{location}/cdnKeys/{id}`. + class DeleteCdnKeyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.updateCdnKey. + # @!attribute [rw] cdn_key + # @return [::Google::Cloud::Video::Stitcher::V1::CdnKey] + # Required. The CDN key resource which replaces the resource on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The update mask applies to the resource. + # For the `FieldMask` definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + class UpdateCdnKeyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.createVodSession + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location in which the VOD session should be + # created, in the form of `projects/{project_number}/locations/{location}`. + # @!attribute [rw] vod_session + # @return [::Google::Cloud::Video::Stitcher::V1::VodSession] + # Required. Parameters for creating a session. + class CreateVodSessionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.getVodSession + # @!attribute [rw] name + # @return [::String] + # Required. The name of the VOD session to be retrieved, in the form of + # `projects/{project_number}/locations/{location}/vodSessions/{id}`. + class GetVodSessionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.listVodStitchDetails. + # @!attribute [rw] parent + # @return [::String] + # Required. The VOD session where the stitch details belong to, in the form + # of `projects/{project}/locations/{location}/vodSessions/{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 returned from a previous List request, if any. + class ListVodStitchDetailsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for VideoStitcherService.listVodStitchDetails. + # @!attribute [rw] vod_stitch_details + # @return [::Array<::Google::Cloud::Video::Stitcher::V1::VodStitchDetail>] + # A List of stitch Details. + # @!attribute [rw] next_page_token + # @return [::String] + # The pagination token. + class ListVodStitchDetailsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.getVodStitchDetail. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the stitch detail in the specified VOD session, in + # the form of + # `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. + class GetVodStitchDetailRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.listVodAdTagDetails. + # @!attribute [rw] parent + # @return [::String] + # Required. The VOD session which the ad tag details belong to, in the form + # of `projects/{project}/locations/{location}/vodSessions/{vod_session_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 returned from a previous List request, if any. + class ListVodAdTagDetailsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for VideoStitcherService.listVodAdTagDetails. + # @!attribute [rw] vod_ad_tag_details + # @return [::Array<::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail>] + # A List of ad tag details. + # @!attribute [rw] next_page_token + # @return [::String] + # The pagination token. + class ListVodAdTagDetailsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.getVodAdTagDetail + # @!attribute [rw] name + # @return [::String] + # Required. The name of the ad tag detail for the specified VOD session, in + # the form of + # `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. + class GetVodAdTagDetailRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.listLiveAdTagDetails. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource parent in the form of + # `projects/{project}/locations/{location}/liveSessions/{live_session}`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return. + # @!attribute [rw] page_token + # @return [::String] + # The pagination token returned from a previous List request. + class ListLiveAdTagDetailsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for VideoStitcherService.listLiveAdTagDetails. + # @!attribute [rw] live_ad_tag_details + # @return [::Array<::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail>] + # A list of live session ad tag details. + # @!attribute [rw] next_page_token + # @return [::String] + # The pagination token. + class ListLiveAdTagDetailsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.getLiveAdTagDetail + # @!attribute [rw] name + # @return [::String] + # Required. The resource name in the form of + # `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. + class GetLiveAdTagDetailRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.createSlate. + # @!attribute [rw] parent + # @return [::String] + # Required. The project in which the slate should be created, in the form of + # `projects/{project_number}/locations/{location}`. + # @!attribute [rw] slate_id + # @return [::String] + # Required. The unique identifier for the slate. + # This value should conform to RFC-1034, which restricts to + # lower-case letters, numbers, and hyphen, with the first character a + # letter, the last a letter or a number, and a 63 character maximum. + # @!attribute [rw] slate + # @return [::Google::Cloud::Video::Stitcher::V1::Slate] + # Required. The slate to create. + # @!attribute [rw] request_id + # @return [::String] + # A 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 CreateSlateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.getSlate. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the slate to be retrieved, of the slate, in the form + # of `projects/{project_number}/locations/{location}/slates/{id}`. + class GetSlateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.listSlates. + # @!attribute [rw] parent + # @return [::String] + # Required. The project to list slates, in the form of + # `projects/{project_number}/locations/{location}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Filtering results + # @!attribute [rw] order_by + # @return [::String] + # Hint for how to order the results + class ListSlatesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for VideoStitcherService.listSlates. + # @!attribute [rw] slates + # @return [::Array<::Google::Cloud::Video::Stitcher::V1::Slate>] + # The list of slates + # @!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 ListSlatesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.updateSlate. + # @!attribute [rw] slate + # @return [::Google::Cloud::Video::Stitcher::V1::Slate] + # Required. The resource with updated fields. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The update mask which specifies fields which should be updated. + class UpdateSlateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.deleteSlate. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the slate to be deleted, in the form of + # `projects/{project_number}/locations/{location}/slates/{id}`. + class DeleteSlateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.createLiveSession. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location in which the live session should be + # created, in the form of `projects/{project_number}/locations/{location}`. + # @!attribute [rw] live_session + # @return [::Google::Cloud::Video::Stitcher::V1::LiveSession] + # Required. Parameters for creating a live session. + class CreateLiveSessionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.getSession. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the live session, in the form of + # `projects/{project_number}/locations/{location}/liveSessions/{id}`. + class GetLiveSessionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.createLiveConfig + # @!attribute [rw] parent + # @return [::String] + # Required. The project in which the live config should be created, in + # the form of `projects/{project_number}/locations/{location}`. + # @!attribute [rw] live_config_id + # @return [::String] + # Required. The unique identifier ID to use for the live config. + # @!attribute [rw] live_config + # @return [::Google::Cloud::Video::Stitcher::V1::LiveConfig] + # Required. The live config resource to create. + # @!attribute [rw] request_id + # @return [::String] + # A 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 CreateLiveConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.listLiveConfig. + # @!attribute [rw] parent + # @return [::String] + # Required. The project that contains the list of live configs, in the + # form of `projects/{project_number}/locations/{location}`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous List request, if any. + # @!attribute [rw] filter + # @return [::String] + # Optional. The filter to apply to list results (see + # [Filtering](https://google.aip.dev/160)). + # @!attribute [rw] order_by + # @return [::String] + # Optional. Specifies the ordering of results following + # [Cloud API + # syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). + class ListLiveConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for VideoStitcher.ListLiveConfig. + # @!attribute [rw] live_configs + # @return [::Array<::Google::Cloud::Video::Stitcher::V1::LiveConfig>] + # List of live configs. + # @!attribute [rw] next_page_token + # @return [::String] + # The pagination token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListLiveConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.getLiveConfig. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the live config to be retrieved, in the form + # of + # `projects/{project_number}/locations/{location}/liveConfigs/{id}`. + class GetLiveConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.deleteLiveConfig. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the live config to be deleted, in the form of + # `projects/{project_number}/locations/{location}/liveConfigs/{id}`. + class DeleteLiveConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.updateLiveConfig. + # @!attribute [rw] live_config + # @return [::Google::Cloud::Video::Stitcher::V1::LiveConfig] + # Required. The LiveConfig resource which replaces the resource on the + # server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The update mask applies to the resource. + # For the `FieldMask` definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + class UpdateLiveConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.createVodConfig + # @!attribute [rw] parent + # @return [::String] + # Required. The project in which the VOD config should be created, in + # the form of `projects/{project_number}/locations/{location}`. + # @!attribute [rw] vod_config_id + # @return [::String] + # Required. The unique identifier ID to use for the VOD config. + # @!attribute [rw] vod_config + # @return [::Google::Cloud::Video::Stitcher::V1::VodConfig] + # Required. The VOD config resource to create. + # @!attribute [rw] request_id + # @return [::String] + # Optional. A 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 CreateVodConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.listVodConfig. + # @!attribute [rw] parent + # @return [::String] + # Required. The project that contains the list of VOD configs, in the + # form of `projects/{project_number}/locations/{location}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of items to return. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The next_page_token value returned from a previous List request, + # if any. + # @!attribute [rw] filter + # @return [::String] + # Optional. The filter to apply to list results (see + # [Filtering](https://google.aip.dev/160)). + # @!attribute [rw] order_by + # @return [::String] + # Optional. Specifies the ordering of results following + # [Cloud API + # syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). + class ListVodConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for VideoStitcher.ListVodConfig. + # @!attribute [rw] vod_configs + # @return [::Array<::Google::Cloud::Video::Stitcher::V1::VodConfig>] + # List of VOD configs. + # @!attribute [rw] next_page_token + # @return [::String] + # The pagination token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListVodConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.getVodConfig. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the VOD config to be retrieved, in the form + # of `projects/{project_number}/locations/{location}/vodConfigs/{id}`. + class GetVodConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.deleteVodConfig. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the VOD config to be deleted, in the form of + # `projects/{project_number}/locations/{location}/vodConfigs/{id}`. + class DeleteVodConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for VideoStitcherService.updateVodConfig. + # @!attribute [rw] vod_config + # @return [::Google::Cloud::Video::Stitcher::V1::VodConfig] + # Required. The VOD config resource which replaces the resource on the + # server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The update mask applies to the resource. + # For the `FieldMask` definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + class UpdateVodConfigRequest + 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. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/vod_configs.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/vod_configs.rb new file mode 100644 index 000000000000..97013d984b08 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/vod_configs.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 Video + module Stitcher + module V1 + # Metadata used to register VOD configs. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the VOD config, in the form of + # `projects/{project}/locations/{location}/vodConfigs/{id}`. + # @!attribute [rw] source_uri + # @return [::String] + # Required. Source URI for the VOD stream manifest. + # @!attribute [rw] ad_tag_uri + # @return [::String] + # Required. The default ad tag associated with this VOD config. + # @!attribute [rw] gam_vod_config + # @return [::Google::Cloud::Video::Stitcher::V1::GamVodConfig] + # Optional. Google Ad Manager (GAM) metadata. + # @!attribute [r] state + # @return [::Google::Cloud::Video::Stitcher::V1::VodConfig::State] + # Output only. State of the VOD config. + # @!attribute [rw] source_fetch_options + # @return [::Google::Cloud::Video::Stitcher::V1::FetchOptions] + # Options for fetching source manifests and segments. + class VodConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # State of the VOD config. + module State + # State is not specified. + STATE_UNSPECIFIED = 0 + + # VOD config is being created. + CREATING = 1 + + # VOD config is ready for use. + READY = 2 + + # VOD config is queued up for deletion. + DELETING = 3 + end + end + + # Metadata used for GAM ad decisioning. + # @!attribute [rw] network_code + # @return [::String] + # Required. Ad Manager network code to associate with the VOD config. + class GamVodConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/Gemfile new file mode 100644 index 000000000000..fc1885b12214 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1", path: "../" +else + gem "google-cloud-video-stitcher-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-video-stitcher-v1/snippets/snippet_metadata_google.cloud.video.stitcher.v1.json b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/snippet_metadata_google.cloud.video.stitcher.v1.json new file mode 100644 index 000000000000..89b9526e4d64 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/snippet_metadata_google.cloud.video.stitcher.v1.json @@ -0,0 +1,1215 @@ +{ + "client_library": { + "name": "google-cloud-video-stitcher-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.video.stitcher.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_CreateCdnKey_sync", + "title": "Snippet for the create_cdn_key call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_cdn_key.", + "file": "video_stitcher_service/create_cdn_key.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_cdn_key", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_cdn_key", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "CreateCdnKey", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.CreateCdnKey", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_ListCdnKeys_sync", + "title": "Snippet for the list_cdn_keys call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_cdn_keys.", + "file": "video_stitcher_service/list_cdn_keys.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_cdn_keys", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_cdn_keys", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::ListCdnKeysRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::Stitcher::V1::ListCdnKeysResponse", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "ListCdnKeys", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.ListCdnKeys", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_GetCdnKey_sync", + "title": "Snippet for the get_cdn_key call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_cdn_key.", + "file": "video_stitcher_service/get_cdn_key.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_cdn_key", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_cdn_key", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::GetCdnKeyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::Stitcher::V1::CdnKey", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "GetCdnKey", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.GetCdnKey", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_DeleteCdnKey_sync", + "title": "Snippet for the delete_cdn_key call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#delete_cdn_key.", + "file": "video_stitcher_service/delete_cdn_key.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_cdn_key", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#delete_cdn_key", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::DeleteCdnKeyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "DeleteCdnKey", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.DeleteCdnKey", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_UpdateCdnKey_sync", + "title": "Snippet for the update_cdn_key call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#update_cdn_key.", + "file": "video_stitcher_service/update_cdn_key.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_cdn_key", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#update_cdn_key", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::UpdateCdnKeyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "UpdateCdnKey", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.UpdateCdnKey", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_CreateVodSession_sync", + "title": "Snippet for the create_vod_session call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_vod_session.", + "file": "video_stitcher_service/create_vod_session.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_vod_session", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_vod_session", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::CreateVodSessionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::Stitcher::V1::VodSession", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "CreateVodSession", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.CreateVodSession", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_GetVodSession_sync", + "title": "Snippet for the get_vod_session call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_vod_session.", + "file": "video_stitcher_service/get_vod_session.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_vod_session", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_vod_session", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::GetVodSessionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::Stitcher::V1::VodSession", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "GetVodSession", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.GetVodSession", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_ListVodStitchDetails_sync", + "title": "Snippet for the list_vod_stitch_details call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_vod_stitch_details.", + "file": "video_stitcher_service/list_vod_stitch_details.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_vod_stitch_details", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_vod_stitch_details", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsResponse", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "ListVodStitchDetails", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.ListVodStitchDetails", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_GetVodStitchDetail_sync", + "title": "Snippet for the get_vod_stitch_detail call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_vod_stitch_detail.", + "file": "video_stitcher_service/get_vod_stitch_detail.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_vod_stitch_detail", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_vod_stitch_detail", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::GetVodStitchDetailRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::Stitcher::V1::VodStitchDetail", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "GetVodStitchDetail", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.GetVodStitchDetail", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_ListVodAdTagDetails_sync", + "title": "Snippet for the list_vod_ad_tag_details call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_vod_ad_tag_details.", + "file": "video_stitcher_service/list_vod_ad_tag_details.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_vod_ad_tag_details", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_vod_ad_tag_details", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsResponse", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "ListVodAdTagDetails", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.ListVodAdTagDetails", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_GetVodAdTagDetail_sync", + "title": "Snippet for the get_vod_ad_tag_detail call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_vod_ad_tag_detail.", + "file": "video_stitcher_service/get_vod_ad_tag_detail.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_vod_ad_tag_detail", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_vod_ad_tag_detail", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::GetVodAdTagDetailRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "GetVodAdTagDetail", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.GetVodAdTagDetail", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_ListLiveAdTagDetails_sync", + "title": "Snippet for the list_live_ad_tag_details call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_live_ad_tag_details.", + "file": "video_stitcher_service/list_live_ad_tag_details.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_live_ad_tag_details", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_live_ad_tag_details", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsResponse", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "ListLiveAdTagDetails", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.ListLiveAdTagDetails", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_GetLiveAdTagDetail_sync", + "title": "Snippet for the get_live_ad_tag_detail call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_live_ad_tag_detail.", + "file": "video_stitcher_service/get_live_ad_tag_detail.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_live_ad_tag_detail", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_live_ad_tag_detail", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::GetLiveAdTagDetailRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "GetLiveAdTagDetail", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.GetLiveAdTagDetail", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_CreateSlate_sync", + "title": "Snippet for the create_slate call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_slate.", + "file": "video_stitcher_service/create_slate.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_slate", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_slate", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::CreateSlateRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "CreateSlate", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.CreateSlate", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_ListSlates_sync", + "title": "Snippet for the list_slates call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_slates.", + "file": "video_stitcher_service/list_slates.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_slates", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_slates", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::ListSlatesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::Stitcher::V1::ListSlatesResponse", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "ListSlates", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.ListSlates", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_GetSlate_sync", + "title": "Snippet for the get_slate call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_slate.", + "file": "video_stitcher_service/get_slate.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_slate", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_slate", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::GetSlateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::Stitcher::V1::Slate", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "GetSlate", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.GetSlate", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_UpdateSlate_sync", + "title": "Snippet for the update_slate call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#update_slate.", + "file": "video_stitcher_service/update_slate.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_slate", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#update_slate", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::UpdateSlateRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "UpdateSlate", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.UpdateSlate", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_DeleteSlate_sync", + "title": "Snippet for the delete_slate call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#delete_slate.", + "file": "video_stitcher_service/delete_slate.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_slate", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#delete_slate", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::DeleteSlateRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "DeleteSlate", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.DeleteSlate", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_CreateLiveSession_sync", + "title": "Snippet for the create_live_session call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_live_session.", + "file": "video_stitcher_service/create_live_session.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_live_session", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_live_session", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::CreateLiveSessionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::Stitcher::V1::LiveSession", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "CreateLiveSession", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.CreateLiveSession", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_GetLiveSession_sync", + "title": "Snippet for the get_live_session call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_live_session.", + "file": "video_stitcher_service/get_live_session.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_live_session", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_live_session", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::GetLiveSessionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::Stitcher::V1::LiveSession", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "GetLiveSession", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.GetLiveSession", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_CreateLiveConfig_sync", + "title": "Snippet for the create_live_config call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_live_config.", + "file": "video_stitcher_service/create_live_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_live_config", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_live_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::CreateLiveConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "CreateLiveConfig", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.CreateLiveConfig", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_ListLiveConfigs_sync", + "title": "Snippet for the list_live_configs call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_live_configs.", + "file": "video_stitcher_service/list_live_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_live_configs", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_live_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::ListLiveConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::Stitcher::V1::ListLiveConfigsResponse", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "ListLiveConfigs", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.ListLiveConfigs", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_GetLiveConfig_sync", + "title": "Snippet for the get_live_config call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_live_config.", + "file": "video_stitcher_service/get_live_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_live_config", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_live_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::GetLiveConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::Stitcher::V1::LiveConfig", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "GetLiveConfig", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.GetLiveConfig", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_DeleteLiveConfig_sync", + "title": "Snippet for the delete_live_config call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#delete_live_config.", + "file": "video_stitcher_service/delete_live_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_live_config", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#delete_live_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::DeleteLiveConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "DeleteLiveConfig", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.DeleteLiveConfig", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_UpdateLiveConfig_sync", + "title": "Snippet for the update_live_config call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#update_live_config.", + "file": "video_stitcher_service/update_live_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_live_config", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#update_live_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::UpdateLiveConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "UpdateLiveConfig", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.UpdateLiveConfig", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_CreateVodConfig_sync", + "title": "Snippet for the create_vod_config call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_vod_config.", + "file": "video_stitcher_service/create_vod_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_vod_config", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_vod_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::CreateVodConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "CreateVodConfig", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.CreateVodConfig", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_ListVodConfigs_sync", + "title": "Snippet for the list_vod_configs call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_vod_configs.", + "file": "video_stitcher_service/list_vod_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_vod_configs", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_vod_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::ListVodConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::Stitcher::V1::ListVodConfigsResponse", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "ListVodConfigs", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.ListVodConfigs", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_GetVodConfig_sync", + "title": "Snippet for the get_vod_config call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_vod_config.", + "file": "video_stitcher_service/get_vod_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_vod_config", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_vod_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::GetVodConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::Stitcher::V1::VodConfig", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "GetVodConfig", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.GetVodConfig", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_DeleteVodConfig_sync", + "title": "Snippet for the delete_vod_config call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#delete_vod_config.", + "file": "video_stitcher_service/delete_vod_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_vod_config", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#delete_vod_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::DeleteVodConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "DeleteVodConfig", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.DeleteVodConfig", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "videostitcher_v1_generated_VideoStitcherService_UpdateVodConfig_sync", + "title": "Snippet for the update_vod_config call in the VideoStitcherService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#update_vod_config.", + "file": "video_stitcher_service/update_vod_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_vod_config", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#update_vod_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Stitcher::V1::UpdateVodConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "VideoStitcherService::Client", + "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" + }, + "method": { + "short_name": "UpdateVodConfig", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.UpdateVodConfig", + "service": { + "short_name": "VideoStitcherService", + "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + }, + "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-video-stitcher-v1/snippets/video_stitcher_service/create_cdn_key.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_cdn_key.rb new file mode 100644 index 000000000000..4f93f07d50b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_cdn_key.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 videostitcher_v1_generated_VideoStitcherService_CreateCdnKey_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the create_cdn_key call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_cdn_key. +# +def create_cdn_key + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest.new + + # Call the create_cdn_key method. + result = client.create_cdn_key request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END videostitcher_v1_generated_VideoStitcherService_CreateCdnKey_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_live_config.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_live_config.rb new file mode 100644 index 000000000000..ad64692796d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_live_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 videostitcher_v1_generated_VideoStitcherService_CreateLiveConfig_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the create_live_config call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_live_config. +# +def create_live_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::CreateLiveConfigRequest.new + + # Call the create_live_config method. + result = client.create_live_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 videostitcher_v1_generated_VideoStitcherService_CreateLiveConfig_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_live_session.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_live_session.rb new file mode 100644 index 000000000000..812a9460fcc3 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_live_session.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 videostitcher_v1_generated_VideoStitcherService_CreateLiveSession_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the create_live_session call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_live_session. +# +def create_live_session + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::CreateLiveSessionRequest.new + + # Call the create_live_session method. + result = client.create_live_session request + + # The returned object is of type Google::Cloud::Video::Stitcher::V1::LiveSession. + p result +end +# [END videostitcher_v1_generated_VideoStitcherService_CreateLiveSession_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_slate.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_slate.rb new file mode 100644 index 000000000000..377c3d09e374 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_slate.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 videostitcher_v1_generated_VideoStitcherService_CreateSlate_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the create_slate call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_slate. +# +def create_slate + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::CreateSlateRequest.new + + # Call the create_slate method. + result = client.create_slate request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END videostitcher_v1_generated_VideoStitcherService_CreateSlate_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_vod_config.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_vod_config.rb new file mode 100644 index 000000000000..3075faa25311 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_vod_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 videostitcher_v1_generated_VideoStitcherService_CreateVodConfig_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the create_vod_config call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_vod_config. +# +def create_vod_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::CreateVodConfigRequest.new + + # Call the create_vod_config method. + result = client.create_vod_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 videostitcher_v1_generated_VideoStitcherService_CreateVodConfig_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_vod_session.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_vod_session.rb new file mode 100644 index 000000000000..8aa06069b767 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_vod_session.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 videostitcher_v1_generated_VideoStitcherService_CreateVodSession_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the create_vod_session call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_vod_session. +# +def create_vod_session + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::CreateVodSessionRequest.new + + # Call the create_vod_session method. + result = client.create_vod_session request + + # The returned object is of type Google::Cloud::Video::Stitcher::V1::VodSession. + p result +end +# [END videostitcher_v1_generated_VideoStitcherService_CreateVodSession_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_cdn_key.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_cdn_key.rb new file mode 100644 index 000000000000..ba59795b9966 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_cdn_key.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 videostitcher_v1_generated_VideoStitcherService_DeleteCdnKey_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the delete_cdn_key call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#delete_cdn_key. +# +def delete_cdn_key + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::DeleteCdnKeyRequest.new + + # Call the delete_cdn_key method. + result = client.delete_cdn_key request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END videostitcher_v1_generated_VideoStitcherService_DeleteCdnKey_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_live_config.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_live_config.rb new file mode 100644 index 000000000000..355999513abb --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_live_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 videostitcher_v1_generated_VideoStitcherService_DeleteLiveConfig_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the delete_live_config call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#delete_live_config. +# +def delete_live_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::DeleteLiveConfigRequest.new + + # Call the delete_live_config method. + result = client.delete_live_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 videostitcher_v1_generated_VideoStitcherService_DeleteLiveConfig_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_slate.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_slate.rb new file mode 100644 index 000000000000..732238f243d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_slate.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 videostitcher_v1_generated_VideoStitcherService_DeleteSlate_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the delete_slate call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#delete_slate. +# +def delete_slate + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::DeleteSlateRequest.new + + # Call the delete_slate method. + result = client.delete_slate request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END videostitcher_v1_generated_VideoStitcherService_DeleteSlate_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_vod_config.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_vod_config.rb new file mode 100644 index 000000000000..7cc05a585be9 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_vod_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 videostitcher_v1_generated_VideoStitcherService_DeleteVodConfig_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the delete_vod_config call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#delete_vod_config. +# +def delete_vod_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::DeleteVodConfigRequest.new + + # Call the delete_vod_config method. + result = client.delete_vod_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 videostitcher_v1_generated_VideoStitcherService_DeleteVodConfig_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_cdn_key.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_cdn_key.rb new file mode 100644 index 000000000000..d07f32a355f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_cdn_key.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 videostitcher_v1_generated_VideoStitcherService_GetCdnKey_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the get_cdn_key call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_cdn_key. +# +def get_cdn_key + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::GetCdnKeyRequest.new + + # Call the get_cdn_key method. + result = client.get_cdn_key request + + # The returned object is of type Google::Cloud::Video::Stitcher::V1::CdnKey. + p result +end +# [END videostitcher_v1_generated_VideoStitcherService_GetCdnKey_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_live_ad_tag_detail.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_live_ad_tag_detail.rb new file mode 100644 index 000000000000..943a2e729227 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_live_ad_tag_detail.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 videostitcher_v1_generated_VideoStitcherService_GetLiveAdTagDetail_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the get_live_ad_tag_detail call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_live_ad_tag_detail. +# +def get_live_ad_tag_detail + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::GetLiveAdTagDetailRequest.new + + # Call the get_live_ad_tag_detail method. + result = client.get_live_ad_tag_detail request + + # The returned object is of type Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail. + p result +end +# [END videostitcher_v1_generated_VideoStitcherService_GetLiveAdTagDetail_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_live_config.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_live_config.rb new file mode 100644 index 000000000000..358e9f7675da --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_live_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 videostitcher_v1_generated_VideoStitcherService_GetLiveConfig_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the get_live_config call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_live_config. +# +def get_live_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::GetLiveConfigRequest.new + + # Call the get_live_config method. + result = client.get_live_config request + + # The returned object is of type Google::Cloud::Video::Stitcher::V1::LiveConfig. + p result +end +# [END videostitcher_v1_generated_VideoStitcherService_GetLiveConfig_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_live_session.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_live_session.rb new file mode 100644 index 000000000000..b967344c678d --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_live_session.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 videostitcher_v1_generated_VideoStitcherService_GetLiveSession_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the get_live_session call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_live_session. +# +def get_live_session + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::GetLiveSessionRequest.new + + # Call the get_live_session method. + result = client.get_live_session request + + # The returned object is of type Google::Cloud::Video::Stitcher::V1::LiveSession. + p result +end +# [END videostitcher_v1_generated_VideoStitcherService_GetLiveSession_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_slate.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_slate.rb new file mode 100644 index 000000000000..7d01a07c8397 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_slate.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 videostitcher_v1_generated_VideoStitcherService_GetSlate_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the get_slate call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_slate. +# +def get_slate + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::GetSlateRequest.new + + # Call the get_slate method. + result = client.get_slate request + + # The returned object is of type Google::Cloud::Video::Stitcher::V1::Slate. + p result +end +# [END videostitcher_v1_generated_VideoStitcherService_GetSlate_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_ad_tag_detail.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_ad_tag_detail.rb new file mode 100644 index 000000000000..1b0faf9532e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_ad_tag_detail.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 videostitcher_v1_generated_VideoStitcherService_GetVodAdTagDetail_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the get_vod_ad_tag_detail call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_vod_ad_tag_detail. +# +def get_vod_ad_tag_detail + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::GetVodAdTagDetailRequest.new + + # Call the get_vod_ad_tag_detail method. + result = client.get_vod_ad_tag_detail request + + # The returned object is of type Google::Cloud::Video::Stitcher::V1::VodAdTagDetail. + p result +end +# [END videostitcher_v1_generated_VideoStitcherService_GetVodAdTagDetail_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_config.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_config.rb new file mode 100644 index 000000000000..86bc718feb01 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_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 videostitcher_v1_generated_VideoStitcherService_GetVodConfig_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the get_vod_config call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_vod_config. +# +def get_vod_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::GetVodConfigRequest.new + + # Call the get_vod_config method. + result = client.get_vod_config request + + # The returned object is of type Google::Cloud::Video::Stitcher::V1::VodConfig. + p result +end +# [END videostitcher_v1_generated_VideoStitcherService_GetVodConfig_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_session.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_session.rb new file mode 100644 index 000000000000..3cac0a5c987e --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_session.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 videostitcher_v1_generated_VideoStitcherService_GetVodSession_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the get_vod_session call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_vod_session. +# +def get_vod_session + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::GetVodSessionRequest.new + + # Call the get_vod_session method. + result = client.get_vod_session request + + # The returned object is of type Google::Cloud::Video::Stitcher::V1::VodSession. + p result +end +# [END videostitcher_v1_generated_VideoStitcherService_GetVodSession_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_stitch_detail.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_stitch_detail.rb new file mode 100644 index 000000000000..10da147a720c --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_stitch_detail.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 videostitcher_v1_generated_VideoStitcherService_GetVodStitchDetail_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the get_vod_stitch_detail call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_vod_stitch_detail. +# +def get_vod_stitch_detail + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::GetVodStitchDetailRequest.new + + # Call the get_vod_stitch_detail method. + result = client.get_vod_stitch_detail request + + # The returned object is of type Google::Cloud::Video::Stitcher::V1::VodStitchDetail. + p result +end +# [END videostitcher_v1_generated_VideoStitcherService_GetVodStitchDetail_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_cdn_keys.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_cdn_keys.rb new file mode 100644 index 000000000000..63aca6016057 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_cdn_keys.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 videostitcher_v1_generated_VideoStitcherService_ListCdnKeys_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the list_cdn_keys call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_cdn_keys. +# +def list_cdn_keys + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::ListCdnKeysRequest.new + + # Call the list_cdn_keys method. + result = client.list_cdn_keys request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Video::Stitcher::V1::CdnKey. + p item + end +end +# [END videostitcher_v1_generated_VideoStitcherService_ListCdnKeys_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_live_ad_tag_details.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_live_ad_tag_details.rb new file mode 100644 index 000000000000..44638cb1c0c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_live_ad_tag_details.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 videostitcher_v1_generated_VideoStitcherService_ListLiveAdTagDetails_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the list_live_ad_tag_details call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_live_ad_tag_details. +# +def list_live_ad_tag_details + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsRequest.new + + # Call the list_live_ad_tag_details method. + result = client.list_live_ad_tag_details request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail. + p item + end +end +# [END videostitcher_v1_generated_VideoStitcherService_ListLiveAdTagDetails_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_live_configs.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_live_configs.rb new file mode 100644 index 000000000000..9507da1fae8e --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_live_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 videostitcher_v1_generated_VideoStitcherService_ListLiveConfigs_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the list_live_configs call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_live_configs. +# +def list_live_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::ListLiveConfigsRequest.new + + # Call the list_live_configs method. + result = client.list_live_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::Video::Stitcher::V1::LiveConfig. + p item + end +end +# [END videostitcher_v1_generated_VideoStitcherService_ListLiveConfigs_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_slates.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_slates.rb new file mode 100644 index 000000000000..12315d4f5058 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_slates.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 videostitcher_v1_generated_VideoStitcherService_ListSlates_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the list_slates call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_slates. +# +def list_slates + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::ListSlatesRequest.new + + # Call the list_slates method. + result = client.list_slates request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Video::Stitcher::V1::Slate. + p item + end +end +# [END videostitcher_v1_generated_VideoStitcherService_ListSlates_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_vod_ad_tag_details.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_vod_ad_tag_details.rb new file mode 100644 index 000000000000..e51bb58489ef --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_vod_ad_tag_details.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 videostitcher_v1_generated_VideoStitcherService_ListVodAdTagDetails_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the list_vod_ad_tag_details call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_vod_ad_tag_details. +# +def list_vod_ad_tag_details + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsRequest.new + + # Call the list_vod_ad_tag_details method. + result = client.list_vod_ad_tag_details request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail. + p item + end +end +# [END videostitcher_v1_generated_VideoStitcherService_ListVodAdTagDetails_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_vod_configs.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_vod_configs.rb new file mode 100644 index 000000000000..773b2529e272 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_vod_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 videostitcher_v1_generated_VideoStitcherService_ListVodConfigs_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the list_vod_configs call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_vod_configs. +# +def list_vod_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::ListVodConfigsRequest.new + + # Call the list_vod_configs method. + result = client.list_vod_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::Video::Stitcher::V1::VodConfig. + p item + end +end +# [END videostitcher_v1_generated_VideoStitcherService_ListVodConfigs_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_vod_stitch_details.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_vod_stitch_details.rb new file mode 100644 index 000000000000..748fefa9f26d --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_vod_stitch_details.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 videostitcher_v1_generated_VideoStitcherService_ListVodStitchDetails_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the list_vod_stitch_details call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_vod_stitch_details. +# +def list_vod_stitch_details + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsRequest.new + + # Call the list_vod_stitch_details method. + result = client.list_vod_stitch_details request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Video::Stitcher::V1::VodStitchDetail. + p item + end +end +# [END videostitcher_v1_generated_VideoStitcherService_ListVodStitchDetails_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_cdn_key.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_cdn_key.rb new file mode 100644 index 000000000000..0ad9ba8e41a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_cdn_key.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 videostitcher_v1_generated_VideoStitcherService_UpdateCdnKey_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the update_cdn_key call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#update_cdn_key. +# +def update_cdn_key + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::UpdateCdnKeyRequest.new + + # Call the update_cdn_key method. + result = client.update_cdn_key request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END videostitcher_v1_generated_VideoStitcherService_UpdateCdnKey_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_live_config.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_live_config.rb new file mode 100644 index 000000000000..bd120b70ec7f --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_live_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 videostitcher_v1_generated_VideoStitcherService_UpdateLiveConfig_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the update_live_config call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#update_live_config. +# +def update_live_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::UpdateLiveConfigRequest.new + + # Call the update_live_config method. + result = client.update_live_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 videostitcher_v1_generated_VideoStitcherService_UpdateLiveConfig_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_slate.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_slate.rb new file mode 100644 index 000000000000..5cecebc76ecd --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_slate.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 videostitcher_v1_generated_VideoStitcherService_UpdateSlate_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the update_slate call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#update_slate. +# +def update_slate + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::UpdateSlateRequest.new + + # Call the update_slate method. + result = client.update_slate request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END videostitcher_v1_generated_VideoStitcherService_UpdateSlate_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_vod_config.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_vod_config.rb new file mode 100644 index 000000000000..4d4ad3375e4c --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_vod_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 videostitcher_v1_generated_VideoStitcherService_UpdateVodConfig_sync] +require "google/cloud/video/stitcher/v1" + +## +# Snippet for the update_vod_config call in the VideoStitcherService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#update_vod_config. +# +def update_vod_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Stitcher::V1::UpdateVodConfigRequest.new + + # Call the update_vod_config method. + result = client.update_vod_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 videostitcher_v1_generated_VideoStitcherService_UpdateVodConfig_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/test/google/cloud/video/stitcher/v1/video_stitcher_service_operations_test.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/test/google/cloud/video/stitcher/v1/video_stitcher_service_operations_test.rb new file mode 100644 index 000000000000..f44cef1362e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/test/google/cloud/video/stitcher/v1/video_stitcher_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/video/stitcher/v1/video_stitcher_service_pb" +require "google/cloud/video/stitcher/v1/video_stitcher_service_services_pb" +require "google/cloud/video/stitcher/v1/video_stitcher_service" + +class ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::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::Video::Stitcher::V1::VideoStitcherService::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::Video::Stitcher::V1::VideoStitcherService::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::Video::Stitcher::V1::VideoStitcherService::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::Video::Stitcher::V1::VideoStitcherService::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::Video::Stitcher::V1::VideoStitcherService::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::Video::Stitcher::V1::VideoStitcherService::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::Video::Stitcher::V1::VideoStitcherService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/test/google/cloud/video/stitcher/v1/video_stitcher_service_paths_test.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/test/google/cloud/video/stitcher/v1/video_stitcher_service_paths_test.rb new file mode 100644 index 000000000000..031dc2b0572f --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/test/google/cloud/video/stitcher/v1/video_stitcher_service_paths_test.rb @@ -0,0 +1,163 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/video/stitcher/v1/video_stitcher_service" + +class ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::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_cdn_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::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.cdn_key_path project: "value0", location: "value1", cdn_key: "value2" + assert_equal "projects/value0/locations/value1/cdnKeys/value2", path + end + end + + def test_live_ad_tag_detail_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.live_ad_tag_detail_path project: "value0", location: "value1", live_session: "value2", live_ad_tag_detail: "value3" + assert_equal "projects/value0/locations/value1/liveSessions/value2/liveAdTagDetails/value3", path + end + end + + def test_live_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::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.live_config_path project: "value0", location: "value1", live_config: "value2" + assert_equal "projects/value0/locations/value1/liveConfigs/value2", path + end + end + + def test_live_session_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.live_session_path project: "value0", location: "value1", live_session: "value2" + assert_equal "projects/value0/locations/value1/liveSessions/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::Video::Stitcher::V1::VideoStitcherService::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_slate_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.slate_path project: "value0", location: "value1", slate: "value2" + assert_equal "projects/value0/locations/value1/slates/value2", path + end + end + + def test_vod_ad_tag_detail_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.vod_ad_tag_detail_path project: "value0", location: "value1", vod_session: "value2", vod_ad_tag_detail: "value3" + assert_equal "projects/value0/locations/value1/vodSessions/value2/vodAdTagDetails/value3", path + end + end + + def test_vod_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::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.vod_config_path project: "value0", location: "value1", vod_config: "value2" + assert_equal "projects/value0/locations/value1/vodConfigs/value2", path + end + end + + def test_vod_session_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.vod_session_path project: "value0", location: "value1", vod_session: "value2" + assert_equal "projects/value0/locations/value1/vodSessions/value2", path + end + end + + def test_vod_stitch_detail_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.vod_stitch_detail_path project: "value0", location: "value1", vod_session: "value2", vod_stitch_detail: "value3" + assert_equal "projects/value0/locations/value1/vodSessions/value2/vodStitchDetails/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/test/google/cloud/video/stitcher/v1/video_stitcher_service_test.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/test/google/cloud/video/stitcher/v1/video_stitcher_service_test.rb new file mode 100644 index 000000000000..3dda07e9810b --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/test/google/cloud/video/stitcher/v1/video_stitcher_service_test.rb @@ -0,0 +1,2031 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/video/stitcher/v1/video_stitcher_service_pb" +require "google/cloud/video/stitcher/v1/video_stitcher_service" + +class ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::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_cdn_key + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + cdn_key = {} + cdn_key_id = "hello world" + + create_cdn_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_cdn_key, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::Stitcher::V1::CdnKey), request["cdn_key"] + assert_equal "hello world", request["cdn_key_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_cdn_key_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_cdn_key({ parent: parent, cdn_key: cdn_key, cdn_key_id: cdn_key_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_cdn_key parent: parent, cdn_key: cdn_key, cdn_key_id: cdn_key_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_cdn_key ::Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest.new(parent: parent, cdn_key: cdn_key, cdn_key_id: cdn_key_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_cdn_key({ parent: parent, cdn_key: cdn_key, cdn_key_id: cdn_key_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_cdn_key(::Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest.new(parent: parent, cdn_key: cdn_key, cdn_key_id: cdn_key_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_cdn_key_client_stub.call_rpc_count + end + end + + def test_list_cdn_keys + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::Stitcher::V1::ListCdnKeysResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_cdn_keys_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_cdn_keys, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::ListCdnKeysRequest, 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_cdn_keys_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_cdn_keys({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_cdn_keys parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_cdn_keys ::Google::Cloud::Video::Stitcher::V1::ListCdnKeysRequest.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_cdn_keys({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_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_cdn_keys(::Google::Cloud::Video::Stitcher::V1::ListCdnKeysRequest.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_cdn_keys_client_stub.call_rpc_count + end + end + + def test_get_cdn_key + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::Stitcher::V1::CdnKey.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_cdn_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_cdn_key, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::GetCdnKeyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_cdn_key_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_cdn_key({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_cdn_key name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_cdn_key ::Google::Cloud::Video::Stitcher::V1::GetCdnKeyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_cdn_key({ 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_cdn_key(::Google::Cloud::Video::Stitcher::V1::GetCdnKeyRequest.new(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_cdn_key_client_stub.call_rpc_count + end + end + + def test_delete_cdn_key + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_cdn_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_cdn_key, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::DeleteCdnKeyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_cdn_key_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_cdn_key({ name: 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_cdn_key name: 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_cdn_key ::Google::Cloud::Video::Stitcher::V1::DeleteCdnKeyRequest.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_cdn_key({ 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_cdn_key(::Google::Cloud::Video::Stitcher::V1::DeleteCdnKeyRequest.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_cdn_key_client_stub.call_rpc_count + end + end + + def test_update_cdn_key + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + cdn_key = {} + update_mask = {} + + update_cdn_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_cdn_key, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::UpdateCdnKeyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::Stitcher::V1::CdnKey), request["cdn_key"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_cdn_key_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_cdn_key({ cdn_key: cdn_key, 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_cdn_key cdn_key: cdn_key, 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_cdn_key ::Google::Cloud::Video::Stitcher::V1::UpdateCdnKeyRequest.new(cdn_key: cdn_key, 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_cdn_key({ cdn_key: cdn_key, 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_cdn_key(::Google::Cloud::Video::Stitcher::V1::UpdateCdnKeyRequest.new(cdn_key: cdn_key, 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_cdn_key_client_stub.call_rpc_count + end + end + + def test_create_vod_session + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::Stitcher::V1::VodSession.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + vod_session = {} + + create_vod_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_vod_session, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::CreateVodSessionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::Stitcher::V1::VodSession), request["vod_session"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_vod_session_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_vod_session({ parent: parent, vod_session: vod_session }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_vod_session parent: parent, vod_session: vod_session do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_vod_session ::Google::Cloud::Video::Stitcher::V1::CreateVodSessionRequest.new(parent: parent, vod_session: vod_session) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_vod_session({ parent: parent, vod_session: vod_session }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_vod_session(::Google::Cloud::Video::Stitcher::V1::CreateVodSessionRequest.new(parent: parent, vod_session: vod_session), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_vod_session_client_stub.call_rpc_count + end + end + + def test_get_vod_session + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::Stitcher::V1::VodSession.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_vod_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_vod_session, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::GetVodSessionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_vod_session_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_vod_session({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_vod_session name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_vod_session ::Google::Cloud::Video::Stitcher::V1::GetVodSessionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_vod_session({ 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_vod_session(::Google::Cloud::Video::Stitcher::V1::GetVodSessionRequest.new(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_vod_session_client_stub.call_rpc_count + end + end + + def test_list_vod_stitch_details + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_vod_stitch_details_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_vod_stitch_details, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsRequest, 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_vod_stitch_details_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_vod_stitch_details({ 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_vod_stitch_details 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_vod_stitch_details ::Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsRequest.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_vod_stitch_details({ 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_vod_stitch_details(::Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsRequest.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_vod_stitch_details_client_stub.call_rpc_count + end + end + + def test_get_vod_stitch_detail + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::Stitcher::V1::VodStitchDetail.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_vod_stitch_detail_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_vod_stitch_detail, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::GetVodStitchDetailRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_vod_stitch_detail_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_vod_stitch_detail({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_vod_stitch_detail name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_vod_stitch_detail ::Google::Cloud::Video::Stitcher::V1::GetVodStitchDetailRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_vod_stitch_detail({ 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_vod_stitch_detail(::Google::Cloud::Video::Stitcher::V1::GetVodStitchDetailRequest.new(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_vod_stitch_detail_client_stub.call_rpc_count + end + end + + def test_list_vod_ad_tag_details + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_vod_ad_tag_details_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_vod_ad_tag_details, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsRequest, 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_vod_ad_tag_details_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_vod_ad_tag_details({ 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_vod_ad_tag_details 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_vod_ad_tag_details ::Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsRequest.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_vod_ad_tag_details({ 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_vod_ad_tag_details(::Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsRequest.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_vod_ad_tag_details_client_stub.call_rpc_count + end + end + + def test_get_vod_ad_tag_detail + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_vod_ad_tag_detail_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_vod_ad_tag_detail, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::GetVodAdTagDetailRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_vod_ad_tag_detail_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_vod_ad_tag_detail({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_vod_ad_tag_detail name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_vod_ad_tag_detail ::Google::Cloud::Video::Stitcher::V1::GetVodAdTagDetailRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_vod_ad_tag_detail({ 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_vod_ad_tag_detail(::Google::Cloud::Video::Stitcher::V1::GetVodAdTagDetailRequest.new(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_vod_ad_tag_detail_client_stub.call_rpc_count + end + end + + def test_list_live_ad_tag_details + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_live_ad_tag_details_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_live_ad_tag_details, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsRequest, 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_live_ad_tag_details_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_live_ad_tag_details({ 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_live_ad_tag_details 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_live_ad_tag_details ::Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsRequest.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_live_ad_tag_details({ 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_live_ad_tag_details(::Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsRequest.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_live_ad_tag_details_client_stub.call_rpc_count + end + end + + def test_get_live_ad_tag_detail + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_live_ad_tag_detail_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_live_ad_tag_detail, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::GetLiveAdTagDetailRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_live_ad_tag_detail_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_live_ad_tag_detail({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_live_ad_tag_detail name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_live_ad_tag_detail ::Google::Cloud::Video::Stitcher::V1::GetLiveAdTagDetailRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_live_ad_tag_detail({ 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_live_ad_tag_detail(::Google::Cloud::Video::Stitcher::V1::GetLiveAdTagDetailRequest.new(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_live_ad_tag_detail_client_stub.call_rpc_count + end + end + + def test_create_slate + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + slate_id = "hello world" + slate = {} + request_id = "hello world" + + create_slate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_slate, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::CreateSlateRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["slate_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::Stitcher::V1::Slate), request["slate"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_slate_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_slate({ parent: parent, slate_id: slate_id, slate: slate, 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_slate parent: parent, slate_id: slate_id, slate: slate, 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_slate ::Google::Cloud::Video::Stitcher::V1::CreateSlateRequest.new(parent: parent, slate_id: slate_id, slate: slate, 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_slate({ parent: parent, slate_id: slate_id, slate: slate, 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_slate(::Google::Cloud::Video::Stitcher::V1::CreateSlateRequest.new(parent: parent, slate_id: slate_id, slate: slate, 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_slate_client_stub.call_rpc_count + end + end + + def test_list_slates + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::Stitcher::V1::ListSlatesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_slates_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_slates, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::ListSlatesRequest, 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_slates_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_slates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_slates parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_slates ::Google::Cloud::Video::Stitcher::V1::ListSlatesRequest.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_slates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_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_slates(::Google::Cloud::Video::Stitcher::V1::ListSlatesRequest.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_slates_client_stub.call_rpc_count + end + end + + def test_get_slate + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::Stitcher::V1::Slate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_slate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_slate, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::GetSlateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_slate_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_slate({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_slate name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_slate ::Google::Cloud::Video::Stitcher::V1::GetSlateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_slate({ 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_slate(::Google::Cloud::Video::Stitcher::V1::GetSlateRequest.new(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_slate_client_stub.call_rpc_count + end + end + + def test_update_slate + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + slate = {} + update_mask = {} + + update_slate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_slate, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::UpdateSlateRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::Stitcher::V1::Slate), request["slate"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_slate_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_slate({ slate: slate, 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_slate slate: slate, 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_slate ::Google::Cloud::Video::Stitcher::V1::UpdateSlateRequest.new(slate: slate, 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_slate({ slate: slate, 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_slate(::Google::Cloud::Video::Stitcher::V1::UpdateSlateRequest.new(slate: slate, 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_slate_client_stub.call_rpc_count + end + end + + def test_delete_slate + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_slate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_slate, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::DeleteSlateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_slate_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_slate({ name: 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_slate name: 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_slate ::Google::Cloud::Video::Stitcher::V1::DeleteSlateRequest.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_slate({ 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_slate(::Google::Cloud::Video::Stitcher::V1::DeleteSlateRequest.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_slate_client_stub.call_rpc_count + end + end + + def test_create_live_session + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::Stitcher::V1::LiveSession.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + live_session = {} + + create_live_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_live_session, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::CreateLiveSessionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::Stitcher::V1::LiveSession), request["live_session"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_live_session_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_live_session({ parent: parent, live_session: live_session }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_live_session parent: parent, live_session: live_session do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_live_session ::Google::Cloud::Video::Stitcher::V1::CreateLiveSessionRequest.new(parent: parent, live_session: live_session) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_live_session({ parent: parent, live_session: live_session }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_live_session(::Google::Cloud::Video::Stitcher::V1::CreateLiveSessionRequest.new(parent: parent, live_session: live_session), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_live_session_client_stub.call_rpc_count + end + end + + def test_get_live_session + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::Stitcher::V1::LiveSession.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_live_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_live_session, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::GetLiveSessionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_live_session_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_live_session({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_live_session name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_live_session ::Google::Cloud::Video::Stitcher::V1::GetLiveSessionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_live_session({ 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_live_session(::Google::Cloud::Video::Stitcher::V1::GetLiveSessionRequest.new(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_live_session_client_stub.call_rpc_count + end + end + + def test_create_live_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" + live_config_id = "hello world" + live_config = {} + request_id = "hello world" + + create_live_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_live_config, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::CreateLiveConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["live_config_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::Stitcher::V1::LiveConfig), request["live_config"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_live_config_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_live_config({ parent: parent, live_config_id: live_config_id, live_config: live_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_live_config parent: parent, live_config_id: live_config_id, live_config: live_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_live_config ::Google::Cloud::Video::Stitcher::V1::CreateLiveConfigRequest.new(parent: parent, live_config_id: live_config_id, live_config: live_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_live_config({ parent: parent, live_config_id: live_config_id, live_config: live_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_live_config(::Google::Cloud::Video::Stitcher::V1::CreateLiveConfigRequest.new(parent: parent, live_config_id: live_config_id, live_config: live_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_live_config_client_stub.call_rpc_count + end + end + + def test_list_live_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::Stitcher::V1::ListLiveConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_live_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_live_configs, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::ListLiveConfigsRequest, 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_live_configs_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_live_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_live_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_live_configs ::Google::Cloud::Video::Stitcher::V1::ListLiveConfigsRequest.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_live_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_live_configs(::Google::Cloud::Video::Stitcher::V1::ListLiveConfigsRequest.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_live_configs_client_stub.call_rpc_count + end + end + + def test_get_live_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::Stitcher::V1::LiveConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_live_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_live_config, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::GetLiveConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_live_config_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_live_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_live_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_live_config ::Google::Cloud::Video::Stitcher::V1::GetLiveConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_live_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_live_config(::Google::Cloud::Video::Stitcher::V1::GetLiveConfigRequest.new(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_live_config_client_stub.call_rpc_count + end + end + + def test_delete_live_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" + + delete_live_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_live_config, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::DeleteLiveConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_live_config_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_live_config({ name: 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_live_config name: 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_live_config ::Google::Cloud::Video::Stitcher::V1::DeleteLiveConfigRequest.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_live_config({ 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_live_config(::Google::Cloud::Video::Stitcher::V1::DeleteLiveConfigRequest.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_live_config_client_stub.call_rpc_count + end + end + + def test_update_live_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. + live_config = {} + update_mask = {} + + update_live_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_live_config, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::UpdateLiveConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::Stitcher::V1::LiveConfig), request["live_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_live_config_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_live_config({ live_config: live_config, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_live_config live_config: live_config, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_live_config ::Google::Cloud::Video::Stitcher::V1::UpdateLiveConfigRequest.new(live_config: live_config, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_live_config({ live_config: live_config, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_live_config(::Google::Cloud::Video::Stitcher::V1::UpdateLiveConfigRequest.new(live_config: live_config, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_live_config_client_stub.call_rpc_count + end + end + + def test_create_vod_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" + vod_config_id = "hello world" + vod_config = {} + request_id = "hello world" + + create_vod_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_vod_config, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::CreateVodConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["vod_config_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::Stitcher::V1::VodConfig), request["vod_config"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_vod_config_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_vod_config({ parent: parent, vod_config_id: vod_config_id, vod_config: vod_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_vod_config parent: parent, vod_config_id: vod_config_id, vod_config: vod_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_vod_config ::Google::Cloud::Video::Stitcher::V1::CreateVodConfigRequest.new(parent: parent, vod_config_id: vod_config_id, vod_config: vod_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_vod_config({ parent: parent, vod_config_id: vod_config_id, vod_config: vod_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_vod_config(::Google::Cloud::Video::Stitcher::V1::CreateVodConfigRequest.new(parent: parent, vod_config_id: vod_config_id, vod_config: vod_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_vod_config_client_stub.call_rpc_count + end + end + + def test_list_vod_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::Stitcher::V1::ListVodConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_vod_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_vod_configs, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::ListVodConfigsRequest, 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_vod_configs_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_vod_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_vod_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_vod_configs ::Google::Cloud::Video::Stitcher::V1::ListVodConfigsRequest.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_vod_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_vod_configs(::Google::Cloud::Video::Stitcher::V1::ListVodConfigsRequest.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_vod_configs_client_stub.call_rpc_count + end + end + + def test_get_vod_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::Stitcher::V1::VodConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_vod_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_vod_config, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::GetVodConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_vod_config_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_vod_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_vod_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_vod_config ::Google::Cloud::Video::Stitcher::V1::GetVodConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_vod_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_vod_config(::Google::Cloud::Video::Stitcher::V1::GetVodConfigRequest.new(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_vod_config_client_stub.call_rpc_count + end + end + + def test_delete_vod_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" + + delete_vod_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_vod_config, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::DeleteVodConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_vod_config_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_vod_config({ name: 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_vod_config name: 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_vod_config ::Google::Cloud::Video::Stitcher::V1::DeleteVodConfigRequest.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_vod_config({ 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_vod_config(::Google::Cloud::Video::Stitcher::V1::DeleteVodConfigRequest.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_vod_config_client_stub.call_rpc_count + end + end + + def test_update_vod_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. + vod_config = {} + update_mask = {} + + update_vod_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_vod_config, name + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::UpdateVodConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::Stitcher::V1::VodConfig), request["vod_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_vod_config_client_stub do + # Create client + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_vod_config({ vod_config: vod_config, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_vod_config vod_config: vod_config, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_vod_config ::Google::Cloud::Video::Stitcher::V1::UpdateVodConfigRequest.new(vod_config: vod_config, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_vod_config({ vod_config: vod_config, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_vod_config(::Google::Cloud::Video::Stitcher::V1::UpdateVodConfigRequest.new(vod_config: vod_config, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_vod_config_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::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::Video::Stitcher::V1::VideoStitcherService::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::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::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::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/test/helper.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-stitcher-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/.gitignore b/owl-bot-staging/google-cloud-video-transcoder-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-video-transcoder-v1/.repo-metadata.json new file mode 100644 index 000000000000..210f3e4c0ac8 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "transcoder.googleapis.com", + "api_shortname": "transcoder", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-video-transcoder-v1/latest", + "distribution_name": "google-cloud-video-transcoder-v1", + "is_cloud": true, + "language": "ruby", + "name": "transcoder", + "name_pretty": "Transcoder V1 API", + "product_documentation": "https://cloud.google.com/transcoder/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The Transcoder API allows you to convert video files and package them for optimized delivery to web, mobile and connected TVs. Note that google-cloud-video-transcoder-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video-transcoder instead. See the readme for more details.", + "ruby-cloud-env-prefix": "TRANSCODER", + "ruby-cloud-product-url": "https://cloud.google.com/transcoder/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/.rubocop.yml b/owl-bot-staging/google-cloud-video-transcoder-v1/.rubocop.yml new file mode 100644 index 000000000000..cf8b44206f29 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-video-transcoder-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-video-transcoder-v1.rb" diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/.toys.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1/.yardopts b/owl-bot-staging/google-cloud-video-transcoder-v1/.yardopts new file mode 100644 index 000000000000..4e4d74b6bdd7 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Transcoder 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-video-transcoder-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-video-transcoder-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..eb68199aa7f3 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-video-transcoder-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-video-transcoder-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/video/transcoder/v1" + +client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/video/transcoder/v1" + +::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::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-video-transcoder-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/video/transcoder/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::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-video-transcoder-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-video-transcoder-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/Gemfile b/owl-bot-staging/google-cloud-video-transcoder-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/LICENSE.md b/owl-bot-staging/google-cloud-video-transcoder-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1/README.md b/owl-bot-staging/google-cloud-video-transcoder-v1/README.md new file mode 100644 index 000000000000..2fcb1128e3c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Transcoder V1 API + +This API converts video files into formats suitable for consumer distribution. For more information, see the Transcoder API overview. + +The Transcoder API allows you to convert video files and package them for optimized delivery to web, mobile and connected TVs. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Transcoder V1 API. Most users should consider using +the main client gem, +[google-cloud-video-transcoder](https://rubygems.org/gems/google-cloud-video-transcoder). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-video-transcoder-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/transcoder.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/video/transcoder/v1" + +client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new +request = ::Google::Cloud::Video::Transcoder::V1::CreateJobRequest.new # (request fields as keyword arguments...) +response = client.create_job request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-video-transcoder-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/transcoder/) +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/video/transcoder/v1" +require "logger" + +client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::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-video-transcoder`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-video-transcoder-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-video-transcoder`. +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-video-transcoder-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-video-transcoder-v1/Rakefile b/owl-bot-staging/google-cloud-video-transcoder-v1/Rakefile new file mode 100644 index 000000000000..2273913846e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["TRANSCODER_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["TRANSCODER_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["TRANSCODER_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 TRANSCODER_TEST_PROJECT=test123 TRANSCODER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/video/transcoder/v1/transcoder_service/credentials" + ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["TRANSCODER_PROJECT"] = project + ENV["TRANSCODER_TEST_PROJECT"] = project + ENV["TRANSCODER_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-video-transcoder-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-video-transcoder-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-video-transcoder-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-video-transcoder-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-video-transcoder-v1" + header "google-cloud-video-transcoder-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-video-transcoder-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-video-transcoder-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-video-transcoder-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-video-transcoder-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-video-transcoder-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-video-transcoder-v1/gapic_metadata.json new file mode 100644 index 000000000000..e266e5e3689d --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/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.video.transcoder.v1", + "libraryPackage": "::Google::Cloud::Video::Transcoder::V1", + "services": { + "TranscoderService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client", + "rpcs": { + "CreateJob": { + "methods": [ + "create_job" + ] + }, + "ListJobs": { + "methods": [ + "list_jobs" + ] + }, + "GetJob": { + "methods": [ + "get_job" + ] + }, + "DeleteJob": { + "methods": [ + "delete_job" + ] + }, + "CreateJobTemplate": { + "methods": [ + "create_job_template" + ] + }, + "ListJobTemplates": { + "methods": [ + "list_job_templates" + ] + }, + "GetJobTemplate": { + "methods": [ + "get_job_template" + ] + }, + "DeleteJobTemplate": { + "methods": [ + "delete_job_template" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/google-cloud-video-transcoder-v1.gemspec b/owl-bot-staging/google-cloud-video-transcoder-v1/google-cloud-video-transcoder-v1.gemspec new file mode 100644 index 000000000000..0f6d4448ef8a --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/google-cloud-video-transcoder-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/video/transcoder/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-video-transcoder-v1" + gem.version = Google::Cloud::Video::Transcoder::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The Transcoder API allows you to convert video files and package them for optimized delivery to web, mobile and connected TVs. Note that google-cloud-video-transcoder-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video-transcoder instead. See the readme for more details." + gem.summary = "This API converts video files into formats suitable for consumer distribution. For more information, see the Transcoder API overview." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google-cloud-video-transcoder-v1.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google-cloud-video-transcoder-v1.rb new file mode 100644 index 000000000000..a5c2e317a7b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google-cloud-video-transcoder-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/video/transcoder/v1" diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1.rb new file mode 100644 index 000000000000..21b4690a134e --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/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/video/transcoder/v1/transcoder_service" +require "google/cloud/video/transcoder/v1/version" + +module Google + module Cloud + module Video + module Transcoder + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/video/transcoder/v1" + # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/video/transcoder/v1" + # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/video/transcoder/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/resources_pb.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/resources_pb.rb new file mode 100644 index 000000000000..cfe53f158e3e --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/resources_pb.rb @@ -0,0 +1,94 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/video/transcoder/v1/resources.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n0google/cloud/video/transcoder/v1/resources.proto\x12 google.cloud.video.transcoder.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xb9\t\n\x03Job\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x16\n\tinput_uri\x18\x02 \x01(\tB\x03\xe0\x41\x04\x12\x17\n\noutput_uri\x18\x03 \x01(\tB\x03\xe0\x41\x04\x12\x1a\n\x0btemplate_id\x18\x04 \x01(\tB\x03\xe0\x41\x04H\x00\x12=\n\x06\x63onfig\x18\x05 \x01(\x0b\x32+.google.cloud.video.transcoder.v1.JobConfigH\x00\x12I\n\x05state\x18\x08 \x01(\x0e\x32\x35.google.cloud.video.transcoder.v1.Job.ProcessingStateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12!\n\x19ttl_after_completion_days\x18\x0f \x01(\x05\x12\x41\n\x06labels\x18\x10 \x03(\x0b\x32\x31.google.cloud.video.transcoder.v1.Job.LabelsEntry\x12&\n\x05\x65rror\x18\x11 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x42\n\x04mode\x18\x14 \x01(\x0e\x32\x34.google.cloud.video.transcoder.v1.Job.ProcessingMode\x12\x1b\n\x13\x62\x61tch_mode_priority\x18\x15 \x01(\x05\x12U\n\x0coptimization\x18\x16 \x01(\x0e\x32:.google.cloud.video.transcoder.v1.Job.OptimizationStrategyB\x03\xe0\x41\x01\x12\x1e\n\x11\x66ill_content_gaps\x18\x19 \x01(\x08\x42\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\"h\n\x0fProcessingState\x12 \n\x1cPROCESSING_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\"m\n\x0eProcessingMode\x12\x1f\n\x1bPROCESSING_MODE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bPROCESSING_MODE_INTERACTIVE\x10\x01\x12\x19\n\x15PROCESSING_MODE_BATCH\x10\x02\"[\n\x14OptimizationStrategy\x12%\n!OPTIMIZATION_STRATEGY_UNSPECIFIED\x10\x00\x12\x0e\n\nAUTODETECT\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02:V\xea\x41S\n\x1dtranscoder.googleapis.com/Job\x12\x32projects/{project}/locations/{location}/jobs/{job}B\x0c\n\njob_config\"\xc3\x02\n\x0bJobTemplate\x12\x0c\n\x04name\x18\x01 \x01(\t\x12;\n\x06\x63onfig\x18\x02 \x01(\x0b\x32+.google.cloud.video.transcoder.v1.JobConfig\x12I\n\x06labels\x18\x03 \x03(\x0b\x32\x39.google.cloud.video.transcoder.v1.JobTemplate.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:o\xea\x41l\n%transcoder.googleapis.com/JobTemplate\x12\x43projects/{project}/locations/{location}/jobTemplates/{job_template}\"\xe3\x05\n\tJobConfig\x12\x37\n\x06inputs\x18\x01 \x03(\x0b\x32\'.google.cloud.video.transcoder.v1.Input\x12=\n\tedit_list\x18\x02 \x03(\x0b\x32*.google.cloud.video.transcoder.v1.EditAtom\x12N\n\x12\x65lementary_streams\x18\x03 \x03(\x0b\x32\x32.google.cloud.video.transcoder.v1.ElementaryStream\x12@\n\x0bmux_streams\x18\x04 \x03(\x0b\x32+.google.cloud.video.transcoder.v1.MuxStream\x12=\n\tmanifests\x18\x05 \x03(\x0b\x32*.google.cloud.video.transcoder.v1.Manifest\x12\x38\n\x06output\x18\x06 \x01(\x0b\x32(.google.cloud.video.transcoder.v1.Output\x12<\n\tad_breaks\x18\x07 \x03(\x0b\x32).google.cloud.video.transcoder.v1.AdBreak\x12O\n\x12pubsub_destination\x18\x08 \x01(\x0b\x32\x33.google.cloud.video.transcoder.v1.PubsubDestination\x12\x44\n\rsprite_sheets\x18\t \x03(\x0b\x32-.google.cloud.video.transcoder.v1.SpriteSheet\x12;\n\x08overlays\x18\n \x03(\x0b\x32).google.cloud.video.transcoder.v1.Overlay\x12\x41\n\x0b\x65ncryptions\x18\x0b \x03(\x0b\x32,.google.cloud.video.transcoder.v1.Encryption\"\xc2\x01\n\x05Input\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12S\n\x14preprocessing_config\x18\x03 \x01(\x0b\x32\x35.google.cloud.video.transcoder.v1.PreprocessingConfig\x12J\n\nattributes\x18\x04 \x01(\x0b\x32\x31.google.cloud.video.transcoder.v1.InputAttributesB\x03\xe0\x41\x01\"\x15\n\x06Output\x12\x0b\n\x03uri\x18\x01 \x01(\t\"\x91\x01\n\x08\x45\x64itAtom\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0e\n\x06inputs\x18\x02 \x03(\t\x12\x32\n\x0f\x65nd_time_offset\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11start_time_offset\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\"?\n\x07\x41\x64\x42reak\x12\x34\n\x11start_time_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x87\x02\n\x10\x45lementaryStream\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x45\n\x0cvideo_stream\x18\x01 \x01(\x0b\x32-.google.cloud.video.transcoder.v1.VideoStreamH\x00\x12\x45\n\x0c\x61udio_stream\x18\x02 \x01(\x0b\x32-.google.cloud.video.transcoder.v1.AudioStreamH\x00\x12\x43\n\x0btext_stream\x18\x03 \x01(\x0b\x32,.google.cloud.video.transcoder.v1.TextStreamH\x00\x42\x13\n\x11\x65lementary_stream\"\xc5\x02\n\tMuxStream\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x11\n\tfile_name\x18\x02 \x01(\t\x12\x11\n\tcontainer\x18\x03 \x01(\t\x12\x1a\n\x12\x65lementary_streams\x18\x04 \x03(\t\x12K\n\x10segment_settings\x18\x05 \x01(\x0b\x32\x31.google.cloud.video.transcoder.v1.SegmentSettings\x12\x15\n\rencryption_id\x18\x07 \x01(\t\x12K\n\x04\x66mp4\x18\x08 \x01(\x0b\x32\x36.google.cloud.video.transcoder.v1.MuxStream.Fmp4ConfigB\x03\xe0\x41\x01H\x00\x1a$\n\nFmp4Config\x12\x16\n\tcodec_tag\x18\x01 \x01(\tB\x03\xe0\x41\x01\x42\x12\n\x10\x63ontainer_config\"\x91\x04\n\x08Manifest\x12\x11\n\tfile_name\x18\x01 \x01(\t\x12J\n\x04type\x18\x02 \x01(\x0e\x32\x37.google.cloud.video.transcoder.v1.Manifest.ManifestTypeB\x03\xe0\x41\x02\x12\x18\n\x0bmux_streams\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12\x45\n\x04\x64\x61sh\x18\x04 \x01(\x0b\x32\x35.google.cloud.video.transcoder.v1.Manifest.DashConfigH\x00\x1a\xef\x01\n\nDashConfig\x12n\n\x18segment_reference_scheme\x18\x01 \x01(\x0e\x32L.google.cloud.video.transcoder.v1.Manifest.DashConfig.SegmentReferenceScheme\"q\n\x16SegmentReferenceScheme\x12(\n$SEGMENT_REFERENCE_SCHEME_UNSPECIFIED\x10\x00\x12\x10\n\x0cSEGMENT_LIST\x10\x01\x12\x1b\n\x17SEGMENT_TEMPLATE_NUMBER\x10\x02\"@\n\x0cManifestType\x12\x1d\n\x19MANIFEST_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03HLS\x10\x01\x12\x08\n\x04\x44\x41SH\x10\x02\x42\x11\n\x0fmanifest_config\"\"\n\x11PubsubDestination\x12\r\n\x05topic\x18\x01 \x01(\t\"\xfd\x02\n\x0bSpriteSheet\x12\x0e\n\x06\x66ormat\x18\x01 \x01(\t\x12\x18\n\x0b\x66ile_prefix\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13sprite_width_pixels\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\x12!\n\x14sprite_height_pixels\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x14\n\x0c\x63olumn_count\x18\x05 \x01(\x05\x12\x11\n\trow_count\x18\x06 \x01(\x05\x12\x34\n\x11start_time_offset\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0f\x65nd_time_offset\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\x0btotal_count\x18\t \x01(\x05H\x00\x12-\n\x08interval\x18\n \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x0f\n\x07quality\x18\x0b \x01(\x05\x42\x15\n\x13\x65xtraction_strategy\"\x8b\t\n\x07Overlay\x12>\n\x05image\x18\x01 \x01(\x0b\x32/.google.cloud.video.transcoder.v1.Overlay.Image\x12G\n\nanimations\x18\x02 \x03(\x0b\x32\x33.google.cloud.video.transcoder.v1.Overlay.Animation\x1a,\n\x14NormalizedCoordinate\x12\t\n\x01x\x18\x01 \x01(\x01\x12\t\n\x01y\x18\x02 \x01(\x01\x1a|\n\x05Image\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\nresolution\x18\x02 \x01(\x0b\x32>.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate\x12\r\n\x05\x61lpha\x18\x03 \x01(\x01\x1a\x93\x01\n\x0f\x41nimationStatic\x12J\n\x02xy\x18\x01 \x01(\x0b\x32>.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate\x12\x34\n\x11start_time_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x91\x02\n\rAnimationFade\x12J\n\tfade_type\x18\x01 \x01(\x0e\x32\x32.google.cloud.video.transcoder.v1.Overlay.FadeTypeB\x03\xe0\x41\x02\x12J\n\x02xy\x18\x02 \x01(\x0b\x32>.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate\x12\x34\n\x11start_time_offset\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0f\x65nd_time_offset\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x44\n\x0c\x41nimationEnd\x12\x34\n\x11start_time_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x98\x02\n\tAnimation\x12U\n\x10\x61nimation_static\x18\x01 \x01(\x0b\x32\x39.google.cloud.video.transcoder.v1.Overlay.AnimationStaticH\x00\x12Q\n\x0e\x61nimation_fade\x18\x02 \x01(\x0b\x32\x37.google.cloud.video.transcoder.v1.Overlay.AnimationFadeH\x00\x12O\n\ranimation_end\x18\x03 \x01(\x0b\x32\x36.google.cloud.video.transcoder.v1.Overlay.AnimationEndH\x00\x42\x10\n\x0e\x61nimation_type\"@\n\x08\x46\x61\x64\x65Type\x12\x19\n\x15\x46\x41\x44\x45_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x46\x41\x44\x45_IN\x10\x01\x12\x0c\n\x08\x46\x41\x44\x45_OUT\x10\x02\"\xf3\n\n\x13PreprocessingConfig\x12J\n\x05\x63olor\x18\x01 \x01(\x0b\x32;.google.cloud.video.transcoder.v1.PreprocessingConfig.Color\x12N\n\x07\x64\x65noise\x18\x02 \x01(\x0b\x32=.google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise\x12N\n\x07\x64\x65\x62lock\x18\x03 \x01(\x0b\x32=.google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock\x12J\n\x05\x61udio\x18\x04 \x01(\x0b\x32;.google.cloud.video.transcoder.v1.PreprocessingConfig.Audio\x12H\n\x04\x63rop\x18\x05 \x01(\x0b\x32:.google.cloud.video.transcoder.v1.PreprocessingConfig.Crop\x12\x46\n\x03pad\x18\x06 \x01(\x0b\x32\x39.google.cloud.video.transcoder.v1.PreprocessingConfig.Pad\x12V\n\x0b\x64\x65interlace\x18\x07 \x01(\x0b\x32\x41.google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace\x1a\x41\n\x05\x43olor\x12\x12\n\nsaturation\x18\x01 \x01(\x01\x12\x10\n\x08\x63ontrast\x18\x02 \x01(\x01\x12\x12\n\nbrightness\x18\x03 \x01(\x01\x1a)\n\x07\x44\x65noise\x12\x10\n\x08strength\x18\x01 \x01(\x01\x12\x0c\n\x04tune\x18\x02 \x01(\t\x1a,\n\x07\x44\x65\x62lock\x12\x10\n\x08strength\x18\x01 \x01(\x01\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\x1a<\n\x05\x41udio\x12\x0c\n\x04lufs\x18\x01 \x01(\x01\x12\x12\n\nhigh_boost\x18\x02 \x01(\x08\x12\x11\n\tlow_boost\x18\x03 \x01(\x08\x1a\\\n\x04\x43rop\x12\x12\n\ntop_pixels\x18\x01 \x01(\x05\x12\x15\n\rbottom_pixels\x18\x02 \x01(\x05\x12\x13\n\x0bleft_pixels\x18\x03 \x01(\x05\x12\x14\n\x0cright_pixels\x18\x04 \x01(\x05\x1a[\n\x03Pad\x12\x12\n\ntop_pixels\x18\x01 \x01(\x05\x12\x15\n\rbottom_pixels\x18\x02 \x01(\x05\x12\x13\n\x0bleft_pixels\x18\x03 \x01(\x05\x12\x14\n\x0cright_pixels\x18\x04 \x01(\x05\x1a\xa4\x03\n\x0b\x44\x65interlace\x12^\n\x05yadif\x18\x01 \x01(\x0b\x32M.google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.YadifConfigH\x00\x12^\n\x05\x62wdif\x18\x02 \x01(\x0b\x32M.google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.BwdifConfigH\x00\x1ap\n\x0bYadifConfig\x12\x0c\n\x04mode\x18\x01 \x01(\t\x12#\n\x1b\x64isable_spatial_interlacing\x18\x02 \x01(\x08\x12\x0e\n\x06parity\x18\x03 \x01(\t\x12\x1e\n\x16\x64\x65interlace_all_frames\x18\x04 \x01(\x08\x1aK\n\x0b\x42wdifConfig\x12\x0c\n\x04mode\x18\x01 \x01(\t\x12\x0e\n\x06parity\x18\x02 \x01(\t\x12\x1e\n\x16\x64\x65interlace_all_frames\x18\x03 \x01(\x08\x42\x16\n\x14\x64\x65interlacing_filter\"\x93\x01\n\x0fTrackDefinition\x12\x18\n\x0binput_track\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x16\n\tlanguages\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x64\x65tect_languages\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12\x64\x65tected_languages\x18\x04 \x03(\tB\x03\xe0\x41\x03\x42\x0e\n\x0c_input_track\"d\n\x0fInputAttributes\x12Q\n\x11track_definitions\x18\x01 \x03(\x0b\x32\x31.google.cloud.video.transcoder.v1.TrackDefinitionB\x03\xe0\x41\x01\"\x96\x16\n\x0bVideoStream\x12O\n\x04h264\x18\x01 \x01(\x0b\x32?.google.cloud.video.transcoder.v1.VideoStream.H264CodecSettingsH\x00\x12O\n\x04h265\x18\x02 \x01(\x0b\x32?.google.cloud.video.transcoder.v1.VideoStream.H265CodecSettingsH\x00\x12M\n\x03vp9\x18\x03 \x01(\x0b\x32>.google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettingsH\x00\x1a\x14\n\x12H264ColorFormatSDR\x1a\x14\n\x12H264ColorFormatHLG\x1a\xad\x06\n\x11H264CodecSettings\x12\x14\n\x0cwidth_pixels\x18\x01 \x01(\x05\x12\x15\n\rheight_pixels\x18\x02 \x01(\x05\x12\x17\n\nframe_rate\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\x12v\n\x1e\x66rame_rate_conversion_strategy\x18\x17 \x01(\x0e\x32I.google.cloud.video.transcoder.v1.VideoStream.FrameRateConversionStrategyB\x03\xe0\x41\x01\x12\x18\n\x0b\x62itrate_bps\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x14\n\x0cpixel_format\x18\x05 \x01(\t\x12\x19\n\x11rate_control_mode\x18\x06 \x01(\t\x12\x11\n\tcrf_level\x18\x07 \x01(\x05\x12\x16\n\x0e\x61llow_open_gop\x18\x08 \x01(\x08\x12\x19\n\x0fgop_frame_count\x18\t \x01(\x05H\x00\x12\x31\n\x0cgop_duration\x18\n \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x17\n\x0f\x65nable_two_pass\x18\x0b \x01(\x08\x12\x15\n\rvbv_size_bits\x18\x0c \x01(\x05\x12\x19\n\x11vbv_fullness_bits\x18\r \x01(\x05\x12\x15\n\rentropy_coder\x18\x0e \x01(\t\x12\x11\n\tb_pyramid\x18\x0f \x01(\x08\x12\x15\n\rb_frame_count\x18\x10 \x01(\x05\x12\x13\n\x0b\x61q_strength\x18\x11 \x01(\x01\x12\x0f\n\x07profile\x18\x12 \x01(\t\x12\x0c\n\x04tune\x18\x13 \x01(\t\x12\x0e\n\x06preset\x18\x14 \x01(\t\x12T\n\x03sdr\x18\x15 \x01(\x0b\x32@.google.cloud.video.transcoder.v1.VideoStream.H264ColorFormatSDRB\x03\xe0\x41\x01H\x01\x12T\n\x03hlg\x18\x16 \x01(\x0b\x32@.google.cloud.video.transcoder.v1.VideoStream.H264ColorFormatHLGB\x03\xe0\x41\x01H\x01\x42\n\n\x08gop_modeB\x0e\n\x0c\x63olor_format\x1a\x14\n\x12H265ColorFormatSDR\x1a\x14\n\x12H265ColorFormatHLG\x1a\x16\n\x14H265ColorFormatHDR10\x1a\xf0\x06\n\x11H265CodecSettings\x12\x14\n\x0cwidth_pixels\x18\x01 \x01(\x05\x12\x15\n\rheight_pixels\x18\x02 \x01(\x05\x12\x17\n\nframe_rate\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\x12v\n\x1e\x66rame_rate_conversion_strategy\x18\x17 \x01(\x0e\x32I.google.cloud.video.transcoder.v1.VideoStream.FrameRateConversionStrategyB\x03\xe0\x41\x01\x12\x18\n\x0b\x62itrate_bps\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x14\n\x0cpixel_format\x18\x05 \x01(\t\x12\x19\n\x11rate_control_mode\x18\x06 \x01(\t\x12\x11\n\tcrf_level\x18\x07 \x01(\x05\x12\x16\n\x0e\x61llow_open_gop\x18\x08 \x01(\x08\x12\x19\n\x0fgop_frame_count\x18\t \x01(\x05H\x00\x12\x31\n\x0cgop_duration\x18\n \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x17\n\x0f\x65nable_two_pass\x18\x0b \x01(\x08\x12\x15\n\rvbv_size_bits\x18\x0c \x01(\x05\x12\x19\n\x11vbv_fullness_bits\x18\r \x01(\x05\x12\x11\n\tb_pyramid\x18\x0e \x01(\x08\x12\x15\n\rb_frame_count\x18\x0f \x01(\x05\x12\x13\n\x0b\x61q_strength\x18\x10 \x01(\x01\x12\x0f\n\x07profile\x18\x11 \x01(\t\x12\x0c\n\x04tune\x18\x12 \x01(\t\x12\x0e\n\x06preset\x18\x13 \x01(\t\x12T\n\x03sdr\x18\x14 \x01(\x0b\x32@.google.cloud.video.transcoder.v1.VideoStream.H265ColorFormatSDRB\x03\xe0\x41\x01H\x01\x12T\n\x03hlg\x18\x15 \x01(\x0b\x32@.google.cloud.video.transcoder.v1.VideoStream.H265ColorFormatHLGB\x03\xe0\x41\x01H\x01\x12X\n\x05hdr10\x18\x16 \x01(\x0b\x32\x42.google.cloud.video.transcoder.v1.VideoStream.H265ColorFormatHDR10B\x03\xe0\x41\x01H\x01\x42\n\n\x08gop_modeB\x0e\n\x0c\x63olor_format\x1a\x13\n\x11Vp9ColorFormatSDR\x1a\x13\n\x11Vp9ColorFormatHLG\x1a\xd3\x04\n\x10Vp9CodecSettings\x12\x14\n\x0cwidth_pixels\x18\x01 \x01(\x05\x12\x15\n\rheight_pixels\x18\x02 \x01(\x05\x12\x17\n\nframe_rate\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\x12v\n\x1e\x66rame_rate_conversion_strategy\x18\r \x01(\x0e\x32I.google.cloud.video.transcoder.v1.VideoStream.FrameRateConversionStrategyB\x03\xe0\x41\x01\x12\x18\n\x0b\x62itrate_bps\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x14\n\x0cpixel_format\x18\x05 \x01(\t\x12\x19\n\x11rate_control_mode\x18\x06 \x01(\t\x12\x11\n\tcrf_level\x18\x07 \x01(\x05\x12\x19\n\x0fgop_frame_count\x18\x08 \x01(\x05H\x00\x12\x31\n\x0cgop_duration\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x0f\n\x07profile\x18\n \x01(\t\x12S\n\x03sdr\x18\x0b \x01(\x0b\x32?.google.cloud.video.transcoder.v1.VideoStream.Vp9ColorFormatSDRB\x03\xe0\x41\x01H\x01\x12S\n\x03hlg\x18\x0c \x01(\x0b\x32?.google.cloud.video.transcoder.v1.VideoStream.Vp9ColorFormatHLGB\x03\xe0\x41\x01H\x01\x42\n\n\x08gop_modeB\x0e\n\x0c\x63olor_format\"q\n\x1b\x46rameRateConversionStrategy\x12.\n*FRAME_RATE_CONVERSION_STRATEGY_UNSPECIFIED\x10\x00\x12\x0e\n\nDOWNSAMPLE\x10\x01\x12\x12\n\x0e\x44ROP_DUPLICATE\x10\x02\x42\x10\n\x0e\x63odec_settings\"\x9e\x03\n\x0b\x41udioStream\x12\r\n\x05\x63odec\x18\x01 \x01(\t\x12\x18\n\x0b\x62itrate_bps\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12\x15\n\rchannel_count\x18\x03 \x01(\x05\x12\x16\n\x0e\x63hannel_layout\x18\x04 \x03(\t\x12K\n\x07mapping\x18\x05 \x03(\x0b\x32:.google.cloud.video.transcoder.v1.AudioStream.AudioMapping\x12\x19\n\x11sample_rate_hertz\x18\x06 \x01(\x05\x12\x15\n\rlanguage_code\x18\x07 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x08 \x01(\t\x1a\xa1\x01\n\x0c\x41udioMapping\x12\x15\n\x08\x61tom_key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tinput_key\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0binput_track\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1a\n\rinput_channel\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1b\n\x0eoutput_channel\x18\x05 \x01(\x05\x42\x03\xe0\x41\x02\x12\x0f\n\x07gain_db\x18\x06 \x01(\x01\"\xeb\x01\n\nTextStream\x12\r\n\x05\x63odec\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\t\x12I\n\x07mapping\x18\x03 \x03(\x0b\x32\x38.google.cloud.video.transcoder.v1.TextStream.TextMapping\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\t\x1aV\n\x0bTextMapping\x12\x15\n\x08\x61tom_key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tinput_key\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0binput_track\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\"h\n\x0fSegmentSettings\x12\x33\n\x10segment_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12 \n\x13individual_segments\x18\x03 \x01(\x08\x42\x03\xe0\x41\x02\"\xef\x07\n\nEncryption\x12\x0f\n\x02id\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12P\n\x07\x61\x65s_128\x18\x03 \x01(\x0b\x32=.google.cloud.video.transcoder.v1.Encryption.Aes128EncryptionH\x00\x12V\n\nsample_aes\x18\x04 \x01(\x0b\x32@.google.cloud.video.transcoder.v1.Encryption.SampleAesEncryptionH\x00\x12V\n\tmpeg_cenc\x18\x05 \x01(\x0b\x32\x41.google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryptionH\x00\x12\x65\n\x19secret_manager_key_source\x18\x07 \x01(\x0b\x32@.google.cloud.video.transcoder.v1.Encryption.SecretManagerSourceH\x01\x12Q\n\x0b\x64rm_systems\x18\x08 \x01(\x0b\x32\x37.google.cloud.video.transcoder.v1.Encryption.DrmSystemsB\x03\xe0\x41\x02\x1a\x12\n\x10\x41\x65s128Encryption\x1a\x15\n\x13SampleAesEncryption\x1a+\n\x14MpegCommonEncryption\x12\x13\n\x06scheme\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\x32\n\x13SecretManagerSource\x12\x1b\n\x0esecret_version\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\n\n\x08Widevine\x1a\n\n\x08\x46\x61irplay\x1a\x0b\n\tPlayready\x1a\n\n\x08\x43learkey\x1a\xb2\x02\n\nDrmSystems\x12G\n\x08widevine\x18\x01 \x01(\x0b\x32\x35.google.cloud.video.transcoder.v1.Encryption.Widevine\x12G\n\x08\x66\x61irplay\x18\x02 \x01(\x0b\x32\x35.google.cloud.video.transcoder.v1.Encryption.Fairplay\x12I\n\tplayready\x18\x03 \x01(\x0b\x32\x36.google.cloud.video.transcoder.v1.Encryption.Playready\x12G\n\x08\x63learkey\x18\x04 \x01(\x0b\x32\x35.google.cloud.video.transcoder.v1.Encryption.ClearkeyB\x11\n\x0f\x65ncryption_modeB\x0f\n\rsecret_sourceB~\n$com.google.cloud.video.transcoder.v1B\x0eResourcesProtoP\x01ZDcloud.google.com/go/video/transcoder/apiv1/transcoderpb;transcoderpbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Video + module Transcoder + module V1 + Job = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Job").msgclass + Job::ProcessingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Job.ProcessingState").enummodule + Job::ProcessingMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Job.ProcessingMode").enummodule + Job::OptimizationStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Job.OptimizationStrategy").enummodule + JobTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.JobTemplate").msgclass + JobConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.JobConfig").msgclass + Input = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Input").msgclass + Output = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Output").msgclass + EditAtom = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.EditAtom").msgclass + AdBreak = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.AdBreak").msgclass + ElementaryStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.ElementaryStream").msgclass + MuxStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.MuxStream").msgclass + MuxStream::Fmp4Config = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.MuxStream.Fmp4Config").msgclass + Manifest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Manifest").msgclass + Manifest::DashConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Manifest.DashConfig").msgclass + Manifest::DashConfig::SegmentReferenceScheme = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Manifest.DashConfig.SegmentReferenceScheme").enummodule + Manifest::ManifestType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Manifest.ManifestType").enummodule + PubsubDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.PubsubDestination").msgclass + SpriteSheet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.SpriteSheet").msgclass + Overlay = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Overlay").msgclass + Overlay::NormalizedCoordinate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate").msgclass + Overlay::Image = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Overlay.Image").msgclass + Overlay::AnimationStatic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Overlay.AnimationStatic").msgclass + Overlay::AnimationFade = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Overlay.AnimationFade").msgclass + Overlay::AnimationEnd = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Overlay.AnimationEnd").msgclass + Overlay::Animation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Overlay.Animation").msgclass + Overlay::FadeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Overlay.FadeType").enummodule + PreprocessingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.PreprocessingConfig").msgclass + PreprocessingConfig::Color = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.PreprocessingConfig.Color").msgclass + PreprocessingConfig::Denoise = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise").msgclass + PreprocessingConfig::Deblock = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock").msgclass + PreprocessingConfig::Audio = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.PreprocessingConfig.Audio").msgclass + PreprocessingConfig::Crop = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.PreprocessingConfig.Crop").msgclass + PreprocessingConfig::Pad = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.PreprocessingConfig.Pad").msgclass + PreprocessingConfig::Deinterlace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace").msgclass + PreprocessingConfig::Deinterlace::YadifConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.YadifConfig").msgclass + PreprocessingConfig::Deinterlace::BwdifConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.BwdifConfig").msgclass + TrackDefinition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.TrackDefinition").msgclass + InputAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.InputAttributes").msgclass + VideoStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream").msgclass + VideoStream::H264ColorFormatSDR = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.H264ColorFormatSDR").msgclass + VideoStream::H264ColorFormatHLG = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.H264ColorFormatHLG").msgclass + VideoStream::H264CodecSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings").msgclass + VideoStream::H265ColorFormatSDR = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.H265ColorFormatSDR").msgclass + VideoStream::H265ColorFormatHLG = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.H265ColorFormatHLG").msgclass + VideoStream::H265ColorFormatHDR10 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.H265ColorFormatHDR10").msgclass + VideoStream::H265CodecSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings").msgclass + VideoStream::Vp9ColorFormatSDR = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.Vp9ColorFormatSDR").msgclass + VideoStream::Vp9ColorFormatHLG = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.Vp9ColorFormatHLG").msgclass + VideoStream::Vp9CodecSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings").msgclass + VideoStream::FrameRateConversionStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.FrameRateConversionStrategy").enummodule + AudioStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.AudioStream").msgclass + AudioStream::AudioMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.AudioStream.AudioMapping").msgclass + TextStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.TextStream").msgclass + TextStream::TextMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.TextStream.TextMapping").msgclass + SegmentSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.SegmentSettings").msgclass + Encryption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Encryption").msgclass + Encryption::Aes128Encryption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Encryption.Aes128Encryption").msgclass + Encryption::SampleAesEncryption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption").msgclass + Encryption::MpegCommonEncryption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption").msgclass + Encryption::SecretManagerSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Encryption.SecretManagerSource").msgclass + Encryption::Widevine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Encryption.Widevine").msgclass + Encryption::Fairplay = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Encryption.Fairplay").msgclass + Encryption::Playready = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Encryption.Playready").msgclass + Encryption::Clearkey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Encryption.Clearkey").msgclass + Encryption::DrmSystems = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Encryption.DrmSystems").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/rest.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/rest.rb new file mode 100644 index 000000000000..33b964a4549d --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/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/video/transcoder/v1/transcoder_service/rest" +require "google/cloud/video/transcoder/v1/version" + +module Google + module Cloud + module Video + module Transcoder + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/video/transcoder/v1/rest" + # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/services_pb.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/services_pb.rb new file mode 100644 index 000000000000..aa0933efd6fe --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/services_pb.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/video/transcoder/v1/services.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/video/transcoder/v1/resources_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n/google/cloud/video/transcoder/v1/services.proto\x12 google.cloud.video.transcoder.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/video/transcoder/v1/resources.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x86\x01\n\x10\x43reateJobRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x37\n\x03job\x18\x02 \x01(\x0b\x32%.google.cloud.video.transcoder.v1.JobB\x03\xe0\x41\x02\"\x95\x01\n\x0fListJobsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\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\"D\n\rGetJobRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dtranscoder.googleapis.com/Job\"^\n\x10\x44\x65leteJobRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dtranscoder.googleapis.com/Job\x12\x15\n\rallow_missing\x18\x02 \x01(\x08\"u\n\x10ListJobsResponse\x12\x33\n\x04jobs\x18\x01 \x03(\x0b\x32%.google.cloud.video.transcoder.v1.Job\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xbd\x01\n\x18\x43reateJobTemplateRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12H\n\x0cjob_template\x18\x02 \x01(\x0b\x32-.google.cloud.video.transcoder.v1.JobTemplateB\x03\xe0\x41\x02\x12\x1c\n\x0fjob_template_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x9d\x01\n\x17ListJobTemplatesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\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\"T\n\x15GetJobTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%transcoder.googleapis.com/JobTemplate\"n\n\x18\x44\x65leteJobTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%transcoder.googleapis.com/JobTemplate\x12\x15\n\rallow_missing\x18\x02 \x01(\x08\"\x8e\x01\n\x18ListJobTemplatesResponse\x12\x44\n\rjob_templates\x18\x01 \x03(\x0b\x32-.google.cloud.video.transcoder.v1.JobTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t2\x92\x0c\n\x11TranscoderService\x12\xaa\x01\n\tCreateJob\x12\x32.google.cloud.video.transcoder.v1.CreateJobRequest\x1a%.google.cloud.video.transcoder.v1.Job\"B\xda\x41\nparent,job\x82\xd3\xe4\x93\x02/\"(/v1/{parent=projects/*/locations/*}/jobs:\x03job\x12\xac\x01\n\x08ListJobs\x12\x31.google.cloud.video.transcoder.v1.ListJobsRequest\x1a\x32.google.cloud.video.transcoder.v1.ListJobsResponse\"9\xda\x41\x06parent\x82\xd3\xe4\x93\x02*\x12(/v1/{parent=projects/*/locations/*}/jobs\x12\x99\x01\n\x06GetJob\x12/.google.cloud.video.transcoder.v1.GetJobRequest\x1a%.google.cloud.video.transcoder.v1.Job\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v1/{name=projects/*/locations/*/jobs/*}\x12\x90\x01\n\tDeleteJob\x12\x32.google.cloud.video.transcoder.v1.DeleteJobRequest\x1a\x16.google.protobuf.Empty\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02**(/v1/{name=projects/*/locations/*/jobs/*}\x12\xec\x01\n\x11\x43reateJobTemplate\x12:.google.cloud.video.transcoder.v1.CreateJobTemplateRequest\x1a-.google.cloud.video.transcoder.v1.JobTemplate\"l\xda\x41#parent,job_template,job_template_id\x82\xd3\xe4\x93\x02@\"0/v1/{parent=projects/*/locations/*}/jobTemplates:\x0cjob_template\x12\xcc\x01\n\x10ListJobTemplates\x12\x39.google.cloud.video.transcoder.v1.ListJobTemplatesRequest\x1a:.google.cloud.video.transcoder.v1.ListJobTemplatesResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/jobTemplates\x12\xb9\x01\n\x0eGetJobTemplate\x12\x37.google.cloud.video.transcoder.v1.GetJobTemplateRequest\x1a-.google.cloud.video.transcoder.v1.JobTemplate\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/jobTemplates/*}\x12\xa8\x01\n\x11\x44\x65leteJobTemplate\x12:.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest\x1a\x16.google.protobuf.Empty\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/locations/*/jobTemplates/*}\x1aM\xca\x41\x19transcoder.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xea\x01\n$com.google.cloud.video.transcoder.v1B\rServicesProtoP\x01ZDcloud.google.com/go/video/transcoder/apiv1/transcoderpb;transcoderpb\xaa\x02 Google.Cloud.Video.Transcoder.V1\xca\x02 Google\\Cloud\\Video\\Transcoder\\V1\xea\x02$Google::Cloud::Video::Transcoder::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Video + module Transcoder + module V1 + CreateJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.CreateJobRequest").msgclass + ListJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.ListJobsRequest").msgclass + GetJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.GetJobRequest").msgclass + DeleteJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.DeleteJobRequest").msgclass + ListJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.ListJobsResponse").msgclass + CreateJobTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.CreateJobTemplateRequest").msgclass + ListJobTemplatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.ListJobTemplatesRequest").msgclass + GetJobTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.GetJobTemplateRequest").msgclass + DeleteJobTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.DeleteJobTemplateRequest").msgclass + ListJobTemplatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.ListJobTemplatesResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/services_services_pb.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/services_services_pb.rb new file mode 100644 index 000000000000..f71f55e3383f --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/services_services_pb.rb @@ -0,0 +1,66 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/video/transcoder/v1/services.proto for package 'Google.Cloud.Video.Transcoder.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/video/transcoder/v1/services_pb' + +module Google + module Cloud + module Video + module Transcoder + module V1 + module TranscoderService + # Using the Transcoder API, you can queue asynchronous jobs for transcoding + # media into various output formats. Output formats may include different + # streaming standards such as HTTP Live Streaming (HLS) and Dynamic Adaptive + # Streaming over HTTP (DASH). You can also customize jobs using advanced + # features such as Digital Rights Management (DRM), audio equalization, content + # concatenation, and digital ad-stitch ready content generation. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.video.transcoder.v1.TranscoderService' + + # Creates a job in the specified region. + rpc :CreateJob, ::Google::Cloud::Video::Transcoder::V1::CreateJobRequest, ::Google::Cloud::Video::Transcoder::V1::Job + # Lists jobs in the specified region. + rpc :ListJobs, ::Google::Cloud::Video::Transcoder::V1::ListJobsRequest, ::Google::Cloud::Video::Transcoder::V1::ListJobsResponse + # Returns the job data. + rpc :GetJob, ::Google::Cloud::Video::Transcoder::V1::GetJobRequest, ::Google::Cloud::Video::Transcoder::V1::Job + # Deletes a job. + rpc :DeleteJob, ::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest, ::Google::Protobuf::Empty + # Creates a job template in the specified region. + rpc :CreateJobTemplate, ::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest, ::Google::Cloud::Video::Transcoder::V1::JobTemplate + # Lists job templates in the specified region. + rpc :ListJobTemplates, ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest, ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesResponse + # Returns the job template data. + rpc :GetJobTemplate, ::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest, ::Google::Cloud::Video::Transcoder::V1::JobTemplate + # Deletes a job template. + rpc :DeleteJobTemplate, ::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service.rb new file mode 100644 index 000000000000..c168f1bf53ac --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/video/transcoder/v1/version" + +require "google/cloud/video/transcoder/v1/transcoder_service/credentials" +require "google/cloud/video/transcoder/v1/transcoder_service/paths" +require "google/cloud/video/transcoder/v1/transcoder_service/client" +require "google/cloud/video/transcoder/v1/transcoder_service/rest" + +module Google + module Cloud + module Video + module Transcoder + module V1 + ## + # Using the Transcoder API, you can queue asynchronous jobs for transcoding + # media into various output formats. Output formats may include different + # streaming standards such as HTTP Live Streaming (HLS) and Dynamic Adaptive + # Streaming over HTTP (DASH). You can also customize jobs using advanced + # features such as Digital Rights Management (DRM), audio equalization, content + # concatenation, and digital ad-stitch ready content generation. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/video/transcoder/v1/transcoder_service" + # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/video/transcoder/v1/transcoder_service/rest" + # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new + # + module TranscoderService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "transcoder_service", "helpers.rb" +require "google/cloud/video/transcoder/v1/transcoder_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/client.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/client.rb new file mode 100644 index 000000000000..4add10a8b4aa --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/client.rb @@ -0,0 +1,1211 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/video/transcoder/v1/services_pb" + +module Google + module Cloud + module Video + module Transcoder + module V1 + module TranscoderService + ## + # Client for the TranscoderService service. + # + # Using the Transcoder API, you can queue asynchronous jobs for transcoding + # media into various output formats. Output formats may include different + # streaming standards such as HTTP Live Streaming (HLS) and Dynamic Adaptive + # Streaming over HTTP (DASH). You can also customize jobs using advanced + # features such as Digital Rights Management (DRM), audio equalization, content + # concatenation, and digital ad-stitch ready content generation. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "transcoder.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :transcoder_service_stub + + ## + # Configure the TranscoderService Client class. + # + # See {::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TranscoderService clients + # ::Google::Cloud::Video::Transcoder::V1::TranscoderService::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", "Video", "Transcoder", "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_job.timeout = 60.0 + + default_config.rpcs.list_jobs.timeout = 60.0 + default_config.rpcs.list_jobs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_job.timeout = 60.0 + default_config.rpcs.get_job.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_job.timeout = 60.0 + + default_config.rpcs.create_job_template.timeout = 60.0 + + default_config.rpcs.list_job_templates.timeout = 60.0 + default_config.rpcs.list_job_templates.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_job_template.timeout = 60.0 + default_config.rpcs.get_job_template.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_job_template.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TranscoderService 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::Video::Transcoder::V1::TranscoderService::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 + @transcoder_service_stub.universe_domain + end + + ## + # Create a new TranscoderService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TranscoderService 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/video/transcoder/v1/services_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 + + @transcoder_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Video::Transcoder::V1::TranscoderService::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 + ) + + @transcoder_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 + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @transcoder_service_stub.logger + end + + # Service calls + + ## + # Creates a job in the specified region. + # + # @overload create_job(request, options = nil) + # Pass arguments to `create_job` via a request object, either of type + # {::Google::Cloud::Video::Transcoder::V1::CreateJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Transcoder::V1::CreateJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_job(parent: nil, job: nil) + # Pass arguments to `create_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent location to create and process this job. + # Format: `projects/{project}/locations/{location}` + # @param job [::Google::Cloud::Video::Transcoder::V1::Job, ::Hash] + # Required. Parameters for creating transcoding job. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Video::Transcoder::V1::Job] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Video::Transcoder::V1::Job] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/transcoder/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Transcoder::V1::CreateJobRequest.new + # + # # Call the create_job method. + # result = client.create_job request + # + # # The returned object is of type Google::Cloud::Video::Transcoder::V1::Job. + # p result + # + def create_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::CreateJobRequest + + # Converts hash and nil to 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_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @transcoder_service_stub.call_rpc :create_job, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists jobs in the specified region. + # + # @overload list_jobs(request, options = nil) + # Pass arguments to `list_jobs` via a request object, either of type + # {::Google::Cloud::Video::Transcoder::V1::ListJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Transcoder::V1::ListJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Format: `projects/{project}/locations/{location}` + # @param page_size [::Integer] + # The maximum number of items to return. + # @param page_token [::String] + # The `next_page_token` value returned from a previous List request, if + # any. + # @param filter [::String] + # The filter expression, following the syntax outlined in + # https://google.aip.dev/160. + # @param order_by [::String] + # One or more fields to compare and use to sort the output. + # See https://google.aip.dev/132#ordering. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Transcoder::V1::Job>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Transcoder::V1::Job>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/transcoder/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Transcoder::V1::ListJobsRequest.new + # + # # Call the list_jobs method. + # result = client.list_jobs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Video::Transcoder::V1::Job. + # p item + # end + # + def list_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::ListJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_jobs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_jobs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @transcoder_service_stub.call_rpc :list_jobs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @transcoder_service_stub, :list_jobs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the job data. + # + # @overload get_job(request, options = nil) + # Pass arguments to `get_job` via a request object, either of type + # {::Google::Cloud::Video::Transcoder::V1::GetJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Transcoder::V1::GetJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_job(name: nil) + # Pass arguments to `get_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the job to retrieve. + # Format: `projects/{project}/locations/{location}/jobs/{job}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Video::Transcoder::V1::Job] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Video::Transcoder::V1::Job] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/transcoder/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Transcoder::V1::GetJobRequest.new + # + # # Call the get_job method. + # result = client.get_job request + # + # # The returned object is of type Google::Cloud::Video::Transcoder::V1::Job. + # p result + # + def get_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::GetJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @transcoder_service_stub.call_rpc :get_job, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a job. + # + # @overload delete_job(request, options = nil) + # Pass arguments to `delete_job` via a request object, either of type + # {::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_job(name: nil, allow_missing: nil) + # Pass arguments to `delete_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the job to delete. + # Format: `projects/{project}/locations/{location}/jobs/{job}` + # @param allow_missing [::Boolean] + # If set to true, and the job is not found, the request will succeed but no + # action will be taken on the server. + # + # @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/video/transcoder/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Transcoder::V1::DeleteJobRequest.new + # + # # Call the delete_job method. + # result = client.delete_job request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest + + # Converts hash and nil to 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_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @transcoder_service_stub.call_rpc :delete_job, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a job template in the specified region. + # + # @overload create_job_template(request, options = nil) + # Pass arguments to `create_job_template` via a request object, either of type + # {::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_job_template(parent: nil, job_template: nil, job_template_id: nil) + # Pass arguments to `create_job_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 location to create this job template. + # Format: `projects/{project}/locations/{location}` + # @param job_template [::Google::Cloud::Video::Transcoder::V1::JobTemplate, ::Hash] + # Required. Parameters for creating job template. + # @param job_template_id [::String] + # Required. The ID to use for the job template, which will become the final + # component of the job template's resource name. + # + # This value should be 4-63 characters, and valid characters must match the + # regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Video::Transcoder::V1::JobTemplate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Video::Transcoder::V1::JobTemplate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/transcoder/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest.new + # + # # Call the create_job_template method. + # result = client.create_job_template request + # + # # The returned object is of type Google::Cloud::Video::Transcoder::V1::JobTemplate. + # p result + # + def create_job_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest + + # Converts hash and nil to 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_job_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_job_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_job_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @transcoder_service_stub.call_rpc :create_job_template, request, 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 job templates in the specified region. + # + # @overload list_job_templates(request, options = nil) + # Pass arguments to `list_job_templates` via a request object, either of type + # {::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_job_templates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_job_templates` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 location from which to retrieve the collection of job + # templates. Format: `projects/{project}/locations/{location}` + # @param page_size [::Integer] + # The maximum number of items to return. + # @param page_token [::String] + # The `next_page_token` value returned from a previous List request, if + # any. + # @param filter [::String] + # The filter expression, following the syntax outlined in + # https://google.aip.dev/160. + # @param order_by [::String] + # One or more fields to compare and use to sort the output. + # See https://google.aip.dev/132#ordering. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Transcoder::V1::JobTemplate>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Transcoder::V1::JobTemplate>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/transcoder/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest.new + # + # # Call the list_job_templates method. + # result = client.list_job_templates request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Video::Transcoder::V1::JobTemplate. + # p item + # end + # + def list_job_templates request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_job_templates.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_job_templates.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_job_templates.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @transcoder_service_stub.call_rpc :list_job_templates, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @transcoder_service_stub, :list_job_templates, 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 the job template data. + # + # @overload get_job_template(request, options = nil) + # Pass arguments to `get_job_template` via a request object, either of type + # {::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_job_template(name: nil) + # Pass arguments to `get_job_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 job template to retrieve. + # Format: + # `projects/{project}/locations/{location}/jobTemplates/{job_template}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Video::Transcoder::V1::JobTemplate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Video::Transcoder::V1::JobTemplate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video/transcoder/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest.new + # + # # Call the get_job_template method. + # result = client.get_job_template request + # + # # The returned object is of type Google::Cloud::Video::Transcoder::V1::JobTemplate. + # p result + # + def get_job_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_job_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_job_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_job_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @transcoder_service_stub.call_rpc :get_job_template, request, 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 job template. + # + # @overload delete_job_template(request, options = nil) + # Pass arguments to `delete_job_template` via a request object, either of type + # {::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_job_template(name: nil, allow_missing: nil) + # Pass arguments to `delete_job_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 job template to delete. + # `projects/{project}/locations/{location}/jobTemplates/{job_template}` + # @param allow_missing [::Boolean] + # If set to true, and the job template is not found, the request will succeed + # but no action will be taken on the server. + # + # @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/video/transcoder/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest.new + # + # # Call the delete_job_template method. + # result = client.delete_job_template request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_job_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest + + # Converts hash and nil to 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_job_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_job_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_job_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @transcoder_service_stub.call_rpc :delete_job_template, request, 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 TranscoderService API. + # + # This class represents the configuration for TranscoderService, + # 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::Video::Transcoder::V1::TranscoderService::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_job to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_job.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_job.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::Video::Transcoder::V1::TranscoderService::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 = "transcoder.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 TranscoderService 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_job` + # @return [::Gapic::Config::Method] + # + attr_reader :create_job + ## + # RPC-specific configuration for `list_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_jobs + ## + # RPC-specific configuration for `get_job` + # @return [::Gapic::Config::Method] + # + attr_reader :get_job + ## + # RPC-specific configuration for `delete_job` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_job + ## + # RPC-specific configuration for `create_job_template` + # @return [::Gapic::Config::Method] + # + attr_reader :create_job_template + ## + # RPC-specific configuration for `list_job_templates` + # @return [::Gapic::Config::Method] + # + attr_reader :list_job_templates + ## + # RPC-specific configuration for `get_job_template` + # @return [::Gapic::Config::Method] + # + attr_reader :get_job_template + ## + # RPC-specific configuration for `delete_job_template` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_job_template + + # @private + def initialize parent_rpcs = nil + create_job_config = parent_rpcs.create_job if parent_rpcs.respond_to? :create_job + @create_job = ::Gapic::Config::Method.new create_job_config + list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs + @list_jobs = ::Gapic::Config::Method.new list_jobs_config + get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job + @get_job = ::Gapic::Config::Method.new get_job_config + delete_job_config = parent_rpcs.delete_job if parent_rpcs.respond_to? :delete_job + @delete_job = ::Gapic::Config::Method.new delete_job_config + create_job_template_config = parent_rpcs.create_job_template if parent_rpcs.respond_to? :create_job_template + @create_job_template = ::Gapic::Config::Method.new create_job_template_config + list_job_templates_config = parent_rpcs.list_job_templates if parent_rpcs.respond_to? :list_job_templates + @list_job_templates = ::Gapic::Config::Method.new list_job_templates_config + get_job_template_config = parent_rpcs.get_job_template if parent_rpcs.respond_to? :get_job_template + @get_job_template = ::Gapic::Config::Method.new get_job_template_config + delete_job_template_config = parent_rpcs.delete_job_template if parent_rpcs.respond_to? :delete_job_template + @delete_job_template = ::Gapic::Config::Method.new delete_job_template_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/credentials.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/credentials.rb new file mode 100644 index 000000000000..19b2f1cfdb4a --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/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 Video + module Transcoder + module V1 + module TranscoderService + # Credentials for the TranscoderService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "TRANSCODER_CREDENTIALS", + "TRANSCODER_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "TRANSCODER_CREDENTIALS_JSON", + "TRANSCODER_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-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/paths.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/paths.rb new file mode 100644 index 000000000000..905796280879 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/paths.rb @@ -0,0 +1,90 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Video + module Transcoder + module V1 + module TranscoderService + # Path helper methods for the TranscoderService API. + module Paths + ## + # Create a fully-qualified Job resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/jobs/{job}` + # + # @param project [String] + # @param location [String] + # @param job [String] + # + # @return [::String] + def job_path project:, location:, job: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/jobs/#{job}" + end + + ## + # Create a fully-qualified JobTemplate resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/jobTemplates/{job_template}` + # + # @param project [String] + # @param location [String] + # @param job_template [String] + # + # @return [::String] + def job_template_path project:, location:, job_template: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/jobTemplates/#{job_template}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/rest.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/rest.rb new file mode 100644 index 000000000000..cb501da2f910 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_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/video/transcoder/v1/version" + +require "google/cloud/video/transcoder/v1/transcoder_service/credentials" +require "google/cloud/video/transcoder/v1/transcoder_service/paths" +require "google/cloud/video/transcoder/v1/transcoder_service/rest/client" + +module Google + module Cloud + module Video + module Transcoder + module V1 + ## + # Using the Transcoder API, you can queue asynchronous jobs for transcoding + # media into various output formats. Output formats may include different + # streaming standards such as HTTP Live Streaming (HLS) and Dynamic Adaptive + # Streaming over HTTP (DASH). You can also customize jobs using advanced + # features such as Digital Rights Management (DRM), audio equalization, content + # concatenation, and digital ad-stitch ready content generation. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/video/transcoder/v1/transcoder_service/rest" + # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new + # + module TranscoderService + # 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/video/transcoder/v1/transcoder_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/rest/client.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/rest/client.rb new file mode 100644 index 000000000000..2d78c87e397f --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/rest/client.rb @@ -0,0 +1,1112 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/video/transcoder/v1/services_pb" +require "google/cloud/video/transcoder/v1/transcoder_service/rest/service_stub" + +module Google + module Cloud + module Video + module Transcoder + module V1 + module TranscoderService + module Rest + ## + # REST client for the TranscoderService service. + # + # Using the Transcoder API, you can queue asynchronous jobs for transcoding + # media into various output formats. Output formats may include different + # streaming standards such as HTTP Live Streaming (HLS) and Dynamic Adaptive + # Streaming over HTTP (DASH). You can also customize jobs using advanced + # features such as Digital Rights Management (DRM), audio equalization, content + # concatenation, and digital ad-stitch ready content generation. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "transcoder.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :transcoder_service_stub + + ## + # Configure the TranscoderService Client class. + # + # See {::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TranscoderService clients + # ::Google::Cloud::Video::Transcoder::V1::TranscoderService::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", "Video", "Transcoder", "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_job.timeout = 60.0 + + default_config.rpcs.list_jobs.timeout = 60.0 + default_config.rpcs.list_jobs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_job.timeout = 60.0 + default_config.rpcs.get_job.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_job.timeout = 60.0 + + default_config.rpcs.create_job_template.timeout = 60.0 + + default_config.rpcs.list_job_templates.timeout = 60.0 + default_config.rpcs.list_job_templates.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_job_template.timeout = 60.0 + default_config.rpcs.get_job_template.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_job_template.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TranscoderService 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::Video::Transcoder::V1::TranscoderService::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 + @transcoder_service_stub.universe_domain + end + + ## + # Create a new TranscoderService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TranscoderService 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 + + @transcoder_service_stub = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @transcoder_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 + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @transcoder_service_stub.logger + end + + # Service calls + + ## + # Creates a job in the specified region. + # + # @overload create_job(request, options = nil) + # Pass arguments to `create_job` via a request object, either of type + # {::Google::Cloud::Video::Transcoder::V1::CreateJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Transcoder::V1::CreateJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_job(parent: nil, job: nil) + # Pass arguments to `create_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent location to create and process this job. + # Format: `projects/{project}/locations/{location}` + # @param job [::Google::Cloud::Video::Transcoder::V1::Job, ::Hash] + # Required. Parameters for creating transcoding job. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::Transcoder::V1::Job] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::Transcoder::V1::Job] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/video/transcoder/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Transcoder::V1::CreateJobRequest.new + # + # # Call the create_job method. + # result = client.create_job request + # + # # The returned object is of type Google::Cloud::Video::Transcoder::V1::Job. + # p result + # + def create_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::CreateJobRequest + + # Converts hash and nil to an 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_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @transcoder_service_stub.create_job request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists jobs in the specified region. + # + # @overload list_jobs(request, options = nil) + # Pass arguments to `list_jobs` via a request object, either of type + # {::Google::Cloud::Video::Transcoder::V1::ListJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Transcoder::V1::ListJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Format: `projects/{project}/locations/{location}` + # @param page_size [::Integer] + # The maximum number of items to return. + # @param page_token [::String] + # The `next_page_token` value returned from a previous List request, if + # any. + # @param filter [::String] + # The filter expression, following the syntax outlined in + # https://google.aip.dev/160. + # @param order_by [::String] + # One or more fields to compare and use to sort the output. + # 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::Video::Transcoder::V1::Job>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Video::Transcoder::V1::Job>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/video/transcoder/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Transcoder::V1::ListJobsRequest.new + # + # # Call the list_jobs method. + # result = client.list_jobs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Video::Transcoder::V1::Job. + # p item + # end + # + def list_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::ListJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_jobs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_jobs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @transcoder_service_stub.list_jobs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @transcoder_service_stub, :list_jobs, "jobs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the job data. + # + # @overload get_job(request, options = nil) + # Pass arguments to `get_job` via a request object, either of type + # {::Google::Cloud::Video::Transcoder::V1::GetJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Transcoder::V1::GetJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_job(name: nil) + # Pass arguments to `get_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the job to retrieve. + # Format: `projects/{project}/locations/{location}/jobs/{job}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::Transcoder::V1::Job] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::Transcoder::V1::Job] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/video/transcoder/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Transcoder::V1::GetJobRequest.new + # + # # Call the get_job method. + # result = client.get_job request + # + # # The returned object is of type Google::Cloud::Video::Transcoder::V1::Job. + # p result + # + def get_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::GetJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @transcoder_service_stub.get_job request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a job. + # + # @overload delete_job(request, options = nil) + # Pass arguments to `delete_job` via a request object, either of type + # {::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_job(name: nil, allow_missing: nil) + # Pass arguments to `delete_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the job to delete. + # Format: `projects/{project}/locations/{location}/jobs/{job}` + # @param allow_missing [::Boolean] + # If set to true, and the job is not found, the request will succeed but no + # action will be taken on the server. + # @yield [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/video/transcoder/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Transcoder::V1::DeleteJobRequest.new + # + # # Call the delete_job method. + # result = client.delete_job request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest + + # Converts hash and nil to an 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_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @transcoder_service_stub.delete_job request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a job template in the specified region. + # + # @overload create_job_template(request, options = nil) + # Pass arguments to `create_job_template` via a request object, either of type + # {::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_job_template(parent: nil, job_template: nil, job_template_id: nil) + # Pass arguments to `create_job_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 location to create this job template. + # Format: `projects/{project}/locations/{location}` + # @param job_template [::Google::Cloud::Video::Transcoder::V1::JobTemplate, ::Hash] + # Required. Parameters for creating job template. + # @param job_template_id [::String] + # Required. The ID to use for the job template, which will become the final + # component of the job template's resource name. + # + # This value should be 4-63 characters, and valid characters must match the + # regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::Transcoder::V1::JobTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::Transcoder::V1::JobTemplate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/video/transcoder/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest.new + # + # # Call the create_job_template method. + # result = client.create_job_template request + # + # # The returned object is of type Google::Cloud::Video::Transcoder::V1::JobTemplate. + # p result + # + def create_job_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest + + # Converts hash and nil to an 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_job_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_job_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_job_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @transcoder_service_stub.create_job_template request, 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 job templates in the specified region. + # + # @overload list_job_templates(request, options = nil) + # Pass arguments to `list_job_templates` via a request object, either of type + # {::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_job_templates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_job_templates` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 location from which to retrieve the collection of job + # templates. Format: `projects/{project}/locations/{location}` + # @param page_size [::Integer] + # The maximum number of items to return. + # @param page_token [::String] + # The `next_page_token` value returned from a previous List request, if + # any. + # @param filter [::String] + # The filter expression, following the syntax outlined in + # https://google.aip.dev/160. + # @param order_by [::String] + # One or more fields to compare and use to sort the output. + # 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::Video::Transcoder::V1::JobTemplate>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Video::Transcoder::V1::JobTemplate>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/video/transcoder/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest.new + # + # # Call the list_job_templates method. + # result = client.list_job_templates request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Video::Transcoder::V1::JobTemplate. + # p item + # end + # + def list_job_templates request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_job_templates.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_job_templates.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_job_templates.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @transcoder_service_stub.list_job_templates request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @transcoder_service_stub, :list_job_templates, "job_templates", 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 the job template data. + # + # @overload get_job_template(request, options = nil) + # Pass arguments to `get_job_template` via a request object, either of type + # {::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_job_template(name: nil) + # Pass arguments to `get_job_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 job template to retrieve. + # Format: + # `projects/{project}/locations/{location}/jobTemplates/{job_template}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::Transcoder::V1::JobTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::Transcoder::V1::JobTemplate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/video/transcoder/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest.new + # + # # Call the get_job_template method. + # result = client.get_job_template request + # + # # The returned object is of type Google::Cloud::Video::Transcoder::V1::JobTemplate. + # p result + # + def get_job_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_job_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_job_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_job_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @transcoder_service_stub.get_job_template request, 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 job template. + # + # @overload delete_job_template(request, options = nil) + # Pass arguments to `delete_job_template` via a request object, either of type + # {::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_job_template(name: nil, allow_missing: nil) + # Pass arguments to `delete_job_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 job template to delete. + # `projects/{project}/locations/{location}/jobTemplates/{job_template}` + # @param allow_missing [::Boolean] + # If set to true, and the job template is not found, the request will succeed + # but no action will be taken on the server. + # @yield [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/video/transcoder/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest.new + # + # # Call the delete_job_template method. + # result = client.delete_job_template request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_job_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest + + # Converts hash and nil to an 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_job_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_job_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_job_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @transcoder_service_stub.delete_job_template request, 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 TranscoderService REST API. + # + # This class represents the configuration for TranscoderService 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::Video::Transcoder::V1::TranscoderService::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_job to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_job.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_job.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 = "transcoder.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 TranscoderService 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_job` + # @return [::Gapic::Config::Method] + # + attr_reader :create_job + ## + # RPC-specific configuration for `list_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_jobs + ## + # RPC-specific configuration for `get_job` + # @return [::Gapic::Config::Method] + # + attr_reader :get_job + ## + # RPC-specific configuration for `delete_job` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_job + ## + # RPC-specific configuration for `create_job_template` + # @return [::Gapic::Config::Method] + # + attr_reader :create_job_template + ## + # RPC-specific configuration for `list_job_templates` + # @return [::Gapic::Config::Method] + # + attr_reader :list_job_templates + ## + # RPC-specific configuration for `get_job_template` + # @return [::Gapic::Config::Method] + # + attr_reader :get_job_template + ## + # RPC-specific configuration for `delete_job_template` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_job_template + + # @private + def initialize parent_rpcs = nil + create_job_config = parent_rpcs.create_job if parent_rpcs.respond_to? :create_job + @create_job = ::Gapic::Config::Method.new create_job_config + list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs + @list_jobs = ::Gapic::Config::Method.new list_jobs_config + get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job + @get_job = ::Gapic::Config::Method.new get_job_config + delete_job_config = parent_rpcs.delete_job if parent_rpcs.respond_to? :delete_job + @delete_job = ::Gapic::Config::Method.new delete_job_config + create_job_template_config = parent_rpcs.create_job_template if parent_rpcs.respond_to? :create_job_template + @create_job_template = ::Gapic::Config::Method.new create_job_template_config + list_job_templates_config = parent_rpcs.list_job_templates if parent_rpcs.respond_to? :list_job_templates + @list_job_templates = ::Gapic::Config::Method.new list_job_templates_config + get_job_template_config = parent_rpcs.get_job_template if parent_rpcs.respond_to? :get_job_template + @get_job_template = ::Gapic::Config::Method.new get_job_template_config + delete_job_template_config = parent_rpcs.delete_job_template if parent_rpcs.respond_to? :delete_job_template + @delete_job_template = ::Gapic::Config::Method.new delete_job_template_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-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/rest/service_stub.rb new file mode 100644 index 000000000000..424ce193ad4a --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_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/video/transcoder/v1/services_pb" + +module Google + module Cloud + module Video + module Transcoder + module V1 + module TranscoderService + module Rest + ## + # REST service stub for the TranscoderService 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_job REST call + # + # @param request_pb [::Google::Cloud::Video::Transcoder::V1::CreateJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::Transcoder::V1::Job] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::Transcoder::V1::Job] + # A result object deserialized from the server's reply + def create_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_job", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Video::Transcoder::V1::Job.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_jobs REST call + # + # @param request_pb [::Google::Cloud::Video::Transcoder::V1::ListJobsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::Transcoder::V1::ListJobsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::Transcoder::V1::ListJobsResponse] + # A result object deserialized from the server's reply + def list_jobs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_jobs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_jobs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Video::Transcoder::V1::ListJobsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_job REST call + # + # @param request_pb [::Google::Cloud::Video::Transcoder::V1::GetJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::Transcoder::V1::Job] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::Transcoder::V1::Job] + # A result object deserialized from the server's reply + def get_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_job", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Video::Transcoder::V1::Job.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_job REST call + # + # @param request_pb [::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_job", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_job_template REST call + # + # @param request_pb [::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::Transcoder::V1::JobTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::Transcoder::V1::JobTemplate] + # A result object deserialized from the server's reply + def create_job_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_job_template_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_job_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Video::Transcoder::V1::JobTemplate.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_job_templates REST call + # + # @param request_pb [::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesResponse] + # A result object deserialized from the server's reply + def list_job_templates request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_job_templates_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_job_templates", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_job_template REST call + # + # @param request_pb [::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Video::Transcoder::V1::JobTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Video::Transcoder::V1::JobTemplate] + # A result object deserialized from the server's reply + def get_job_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_job_template_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_job_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Video::Transcoder::V1::JobTemplate.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_job_template REST call + # + # @param request_pb [::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_job_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_job_template_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_job_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the create_job REST call + # + # @param request_pb [::Google::Cloud::Video::Transcoder::V1::CreateJobRequest] + # 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_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/jobs", + body: "job", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_jobs REST call + # + # @param request_pb [::Google::Cloud::Video::Transcoder::V1::ListJobsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_jobs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/jobs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_job REST call + # + # @param request_pb [::Google::Cloud::Video::Transcoder::V1::GetJobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_job REST call + # + # @param request_pb [::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest] + # 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_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_job_template REST call + # + # @param request_pb [::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest] + # 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_job_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/jobTemplates", + body: "job_template", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_job_templates REST call + # + # @param request_pb [::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_job_templates_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/jobTemplates", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_job_template REST call + # + # @param request_pb [::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_job_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/jobTemplates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_job_template REST call + # + # @param request_pb [::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest] + # 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_job_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/jobTemplates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/version.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/version.rb new file mode 100644 index 000000000000..b41a794a563b --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/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 Video + module Transcoder + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/README.md new file mode 100644 index 000000000000..56ec23d53a1c --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Transcoder 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-video-transcoder-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # 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. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + # + # Example: + # + # 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 + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # 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 + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # 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 + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1/proto_docs/google/cloud/video/transcoder/v1/resources.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/cloud/video/transcoder/v1/resources.rb new file mode 100644 index 000000000000..b05f0efb6de7 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/cloud/video/transcoder/v1/resources.rb @@ -0,0 +1,1763 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Video + module Transcoder + module V1 + # Transcoding job resource. + # @!attribute [rw] name + # @return [::String] + # The resource name of the job. + # Format: `projects/{project_number}/locations/{location}/jobs/{job}` + # @!attribute [rw] input_uri + # @return [::String] + # Input only. Specify the `input_uri` to populate empty `uri` fields in each + # element of `Job.config.inputs` or `JobTemplate.config.inputs` when using + # template. URI of the media. Input files must be at least 5 seconds in + # duration and stored in Cloud Storage (for example, + # `gs://bucket/inputs/file.mp4`). See [Supported input and output + # formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + # @!attribute [rw] output_uri + # @return [::String] + # Input only. Specify the `output_uri` to populate an empty + # `Job.config.output.uri` or `JobTemplate.config.output.uri` when using + # template. URI for the output file(s). For example, + # `gs://my-bucket/outputs/`. See [Supported input and output + # formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + # @!attribute [rw] template_id + # @return [::String] + # Input only. Specify the `template_id` to use for populating `Job.config`. + # The default is `preset/web-hd`, which is the only supported preset. + # + # User defined JobTemplate: `{job_template_id}` + # + # Note: The following fields are mutually exclusive: `template_id`, `config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] config + # @return [::Google::Cloud::Video::Transcoder::V1::JobConfig] + # The configuration for this job. + # + # Note: The following fields are mutually exclusive: `config`, `template_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] state + # @return [::Google::Cloud::Video::Transcoder::V1::Job::ProcessingState] + # Output only. The current state of the job. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the job was created. + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the transcoding started. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the transcoding finished. + # @!attribute [rw] ttl_after_completion_days + # @return [::Integer] + # Job time to live value in days, which will be effective after job + # completion. Job should be deleted automatically after the given TTL. Enter + # a value between 1 and 90. The default is 30. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # The labels associated with this job. You can use these to organize and + # group your jobs. + # @!attribute [r] error + # @return [::Google::Rpc::Status] + # Output only. An error object that describes the reason for the failure. + # This property is always present when + # {::Google::Cloud::Video::Transcoder::V1::Job::ProcessingState ProcessingState} is + # `FAILED`. + # @!attribute [rw] mode + # @return [::Google::Cloud::Video::Transcoder::V1::Job::ProcessingMode] + # The processing mode of the job. + # The default is `PROCESSING_MODE_INTERACTIVE`. + # @!attribute [rw] batch_mode_priority + # @return [::Integer] + # The processing priority of a batch job. + # This field can only be set for batch mode jobs. The default value is 0. + # This value cannot be negative. Higher values correspond to higher + # priorities for the job. + # @!attribute [rw] optimization + # @return [::Google::Cloud::Video::Transcoder::V1::Job::OptimizationStrategy] + # Optional. The optimization strategy of the job. The default is + # `AUTODETECT`. + # @!attribute [rw] fill_content_gaps + # @return [::Boolean] + # Optional. Insert silence and duplicate frames when timestamp gaps are + # detected in a given stream. + class Job + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The current state of the job. + module ProcessingState + # The processing state is not specified. + PROCESSING_STATE_UNSPECIFIED = 0 + + # The job is enqueued and will be picked up for processing soon. + PENDING = 1 + + # The job is being processed. + RUNNING = 2 + + # The job has been completed successfully. + SUCCEEDED = 3 + + # The job has failed. For additional information, see + # [Troubleshooting](https://cloud.google.com/transcoder/docs/troubleshooting). + FAILED = 4 + end + + # The processing mode of the job. + module ProcessingMode + # The job processing mode is not specified. + PROCESSING_MODE_UNSPECIFIED = 0 + + # The job processing mode is interactive mode. + # Interactive job will either be ran or rejected if quota does not allow + # for it. + PROCESSING_MODE_INTERACTIVE = 1 + + # The job processing mode is batch mode. + # Batch mode allows queuing of jobs. + PROCESSING_MODE_BATCH = 2 + end + + # The optimization strategy of the job. The default is `AUTODETECT`. + module OptimizationStrategy + # The optimization strategy is not specified. + OPTIMIZATION_STRATEGY_UNSPECIFIED = 0 + + # Prioritize job processing speed. + AUTODETECT = 1 + + # Disable all optimizations. + DISABLED = 2 + end + end + + # Transcoding job template resource. + # @!attribute [rw] name + # @return [::String] + # The resource name of the job template. + # Format: + # `projects/{project_number}/locations/{location}/jobTemplates/{job_template}` + # @!attribute [rw] config + # @return [::Google::Cloud::Video::Transcoder::V1::JobConfig] + # The configuration for this template. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # The labels associated with this job template. You can use these to organize + # and group your job templates. + class JobTemplate + 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 + + # Job configuration + # @!attribute [rw] inputs + # @return [::Array<::Google::Cloud::Video::Transcoder::V1::Input>] + # List of input assets stored in Cloud Storage. + # @!attribute [rw] edit_list + # @return [::Array<::Google::Cloud::Video::Transcoder::V1::EditAtom>] + # List of edit atoms. Defines the ultimate timeline of the resulting + # file or manifest. + # @!attribute [rw] elementary_streams + # @return [::Array<::Google::Cloud::Video::Transcoder::V1::ElementaryStream>] + # List of elementary streams. + # @!attribute [rw] mux_streams + # @return [::Array<::Google::Cloud::Video::Transcoder::V1::MuxStream>] + # List of multiplexing settings for output streams. + # @!attribute [rw] manifests + # @return [::Array<::Google::Cloud::Video::Transcoder::V1::Manifest>] + # List of output manifests. + # @!attribute [rw] output + # @return [::Google::Cloud::Video::Transcoder::V1::Output] + # Output configuration. + # @!attribute [rw] ad_breaks + # @return [::Array<::Google::Cloud::Video::Transcoder::V1::AdBreak>] + # List of ad breaks. Specifies where to insert ad break tags in the output + # manifests. + # @!attribute [rw] pubsub_destination + # @return [::Google::Cloud::Video::Transcoder::V1::PubsubDestination] + # Destination on Pub/Sub. + # @!attribute [rw] sprite_sheets + # @return [::Array<::Google::Cloud::Video::Transcoder::V1::SpriteSheet>] + # List of output sprite sheets. + # Spritesheets require at least one VideoStream in the Jobconfig. + # @!attribute [rw] overlays + # @return [::Array<::Google::Cloud::Video::Transcoder::V1::Overlay>] + # List of overlays on the output video, in descending Z-order. + # @!attribute [rw] encryptions + # @return [::Array<::Google::Cloud::Video::Transcoder::V1::Encryption>] + # List of encryption configurations for the content. + # Each configuration has an ID. Specify this ID in the + # {::Google::Cloud::Video::Transcoder::V1::MuxStream#encryption_id MuxStream.encryption_id} + # field to indicate the configuration to use for that `MuxStream` output. + class JobConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input asset. + # @!attribute [rw] key + # @return [::String] + # A unique key for this input. Must be specified when using advanced + # mapping and edit lists. + # @!attribute [rw] uri + # @return [::String] + # URI of the media. Input files must be at least 5 seconds in duration and + # stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). + # If empty, the value is populated from + # {::Google::Cloud::Video::Transcoder::V1::Job#input_uri Job.input_uri}. See + # [Supported input and output + # formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + # @!attribute [rw] preprocessing_config + # @return [::Google::Cloud::Video::Transcoder::V1::PreprocessingConfig] + # Preprocessing configurations. + # @!attribute [rw] attributes + # @return [::Google::Cloud::Video::Transcoder::V1::InputAttributes] + # Optional. Input Attributes. + class Input + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Location of output file(s) in a Cloud Storage bucket. + # @!attribute [rw] uri + # @return [::String] + # URI for the output file(s). For example, `gs://my-bucket/outputs/`. Must be + # a directory and not a top-level bucket. If empty, the value is populated + # from {::Google::Cloud::Video::Transcoder::V1::Job#output_uri Job.output_uri}. See + # [Supported input and output + # formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + class Output + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Edit atom. + # @!attribute [rw] key + # @return [::String] + # A unique key for this atom. Must be specified when using advanced + # mapping. + # @!attribute [rw] inputs + # @return [::Array<::String>] + # List of {::Google::Cloud::Video::Transcoder::V1::Input#key Input.key} values + # identifying files that should be used in this atom. The listed `inputs` + # must have the same timeline. + # @!attribute [rw] end_time_offset + # @return [::Google::Protobuf::Duration] + # End time in seconds for the atom, relative to the input file timeline. + # When `end_time_offset` is not specified, the `inputs` are used until + # the end of the atom. + # @!attribute [rw] start_time_offset + # @return [::Google::Protobuf::Duration] + # Start time in seconds for the atom, relative to the input file timeline. + # The default is `0s`. + class EditAtom + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Ad break. + # @!attribute [rw] start_time_offset + # @return [::Google::Protobuf::Duration] + # Start time in seconds for the ad break, relative to the output file + # timeline. The default is `0s`. + class AdBreak + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Encoding of an input file such as an audio, video, or text track. + # Elementary streams must be packaged before + # mapping and sharing between different output formats. + # @!attribute [rw] key + # @return [::String] + # A unique key for this elementary stream. + # @!attribute [rw] video_stream + # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream] + # Encoding of a video stream. + # + # Note: The following fields are mutually exclusive: `video_stream`, `audio_stream`, `text_stream`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] audio_stream + # @return [::Google::Cloud::Video::Transcoder::V1::AudioStream] + # Encoding of an audio stream. + # + # Note: The following fields are mutually exclusive: `audio_stream`, `video_stream`, `text_stream`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_stream + # @return [::Google::Cloud::Video::Transcoder::V1::TextStream] + # Encoding of a text stream. For example, closed captions or subtitles. + # + # Note: The following fields are mutually exclusive: `text_stream`, `video_stream`, `audio_stream`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ElementaryStream + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Multiplexing settings for output stream. + # @!attribute [rw] key + # @return [::String] + # A unique key for this multiplexed stream. + # @!attribute [rw] file_name + # @return [::String] + # The name of the generated file. The default is + # {::Google::Cloud::Video::Transcoder::V1::MuxStream#key MuxStream.key} with the + # extension suffix corresponding to the + # {::Google::Cloud::Video::Transcoder::V1::MuxStream#container MuxStream.container}. + # + # Individual segments also have an incremental 10-digit zero-padded suffix + # starting from 0 before the extension, such as `mux_stream0000000123.ts`. + # @!attribute [rw] container + # @return [::String] + # The container format. The default is `mp4` + # + # Supported streaming formats: + # + # - `ts` + # - `fmp4`- the corresponding file extension is `.m4s` + # + # Supported standalone file formats: + # + # - `mp4` + # - `mp3` + # - `ogg` + # - `vtt` + # + # See also: + # [Supported input and output + # formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) + # @!attribute [rw] elementary_streams + # @return [::Array<::String>] + # List of + # {::Google::Cloud::Video::Transcoder::V1::ElementaryStream#key ElementaryStream.key} + # values multiplexed in this stream. + # @!attribute [rw] segment_settings + # @return [::Google::Cloud::Video::Transcoder::V1::SegmentSettings] + # Segment settings for `ts`, `fmp4` and `vtt`. + # @!attribute [rw] encryption_id + # @return [::String] + # Identifier of the encryption configuration to use. If omitted, output will + # be unencrypted. + # @!attribute [rw] fmp4 + # @return [::Google::Cloud::Video::Transcoder::V1::MuxStream::Fmp4Config] + # Optional. `fmp4` container configuration. + class MuxStream + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # `fmp4` container configuration. + # @!attribute [rw] codec_tag + # @return [::String] + # Optional. Specify the codec tag string that will be used in the media + # bitstream. When not specified, the codec appropriate value is used. + # + # Supported H265 codec tags: + # + # - `hvc1` (default) + # - `hev1` + class Fmp4Config + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Manifest configuration. + # @!attribute [rw] file_name + # @return [::String] + # The name of the generated file. The default is `manifest` with the + # extension suffix corresponding to the + # {::Google::Cloud::Video::Transcoder::V1::Manifest#type Manifest.type}. + # @!attribute [rw] type + # @return [::Google::Cloud::Video::Transcoder::V1::Manifest::ManifestType] + # Required. Type of the manifest. + # @!attribute [rw] mux_streams + # @return [::Array<::String>] + # Required. List of user supplied + # {::Google::Cloud::Video::Transcoder::V1::MuxStream#key MuxStream.key} values that + # should appear in this manifest. + # + # When {::Google::Cloud::Video::Transcoder::V1::Manifest#type Manifest.type} is + # `HLS`, a media manifest with name + # {::Google::Cloud::Video::Transcoder::V1::MuxStream#key MuxStream.key} and `.m3u8` + # extension is generated for each element in this list. + # @!attribute [rw] dash + # @return [::Google::Cloud::Video::Transcoder::V1::Manifest::DashConfig] + # `DASH` manifest configuration. + class Manifest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # `DASH` manifest configuration. + # @!attribute [rw] segment_reference_scheme + # @return [::Google::Cloud::Video::Transcoder::V1::Manifest::DashConfig::SegmentReferenceScheme] + # The segment reference scheme for a `DASH` manifest. The default is + # `SEGMENT_LIST`. + class DashConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The segment reference scheme for a `DASH` manifest. + module SegmentReferenceScheme + # The segment reference scheme is not specified. + SEGMENT_REFERENCE_SCHEME_UNSPECIFIED = 0 + + # Explicitly lists the URLs of media files for each segment. For example, + # if + # {::Google::Cloud::Video::Transcoder::V1::SegmentSettings#individual_segments SegmentSettings.individual_segments} + # is `true`, then the manifest contains fields similar to the following: + # ```xml + # + # + # + # + # ... + # ``` + SEGMENT_LIST = 1 + + # {::Google::Cloud::Video::Transcoder::V1::SegmentSettings#individual_segments SegmentSettings.individual_segments} + # must be set to `true` to use this segment reference scheme. Uses the + # DASH specification + # `` tag to determine the URLs of media files for each + # segment. For example: + # ```xml + # + # ... + # ``` + SEGMENT_TEMPLATE_NUMBER = 2 + end + end + + # The manifest type, which corresponds to the adaptive streaming format used. + module ManifestType + # The manifest type is not specified. + MANIFEST_TYPE_UNSPECIFIED = 0 + + # Create an HLS manifest. The corresponding file extension is `.m3u8`. + HLS = 1 + + # Create an MPEG-DASH manifest. The corresponding file extension is `.mpd`. + DASH = 2 + end + end + + # A Pub/Sub destination. + # @!attribute [rw] topic + # @return [::String] + # The name of the Pub/Sub topic to publish job completion notification + # to. For example: `projects/{project}/topics/{topic}`. + class PubsubDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Sprite sheet configuration. + # @!attribute [rw] format + # @return [::String] + # Format type. The default is `jpeg`. + # + # Supported formats: + # + # - `jpeg` + # @!attribute [rw] file_prefix + # @return [::String] + # Required. File name prefix for the generated sprite sheets. + # + # Each sprite sheet has an incremental 10-digit zero-padded suffix starting + # from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. + # @!attribute [rw] sprite_width_pixels + # @return [::Integer] + # Required. The width of sprite in pixels. Must be an even integer. To + # preserve the source aspect ratio, set the + # {::Google::Cloud::Video::Transcoder::V1::SpriteSheet#sprite_width_pixels SpriteSheet.sprite_width_pixels} + # field or the + # {::Google::Cloud::Video::Transcoder::V1::SpriteSheet#sprite_height_pixels SpriteSheet.sprite_height_pixels} + # field, but not both (the API will automatically calculate the missing + # field). + # + # For portrait videos that contain horizontal ASR and rotation metadata, + # provide the width, in pixels, per the horizontal ASR. The API calculates + # the height per the horizontal ASR. The API detects any rotation metadata + # and swaps the requested height and width for the output. + # @!attribute [rw] sprite_height_pixels + # @return [::Integer] + # Required. The height of sprite in pixels. Must be an even integer. To + # preserve the source aspect ratio, set the + # {::Google::Cloud::Video::Transcoder::V1::SpriteSheet#sprite_height_pixels SpriteSheet.sprite_height_pixels} + # field or the + # {::Google::Cloud::Video::Transcoder::V1::SpriteSheet#sprite_width_pixels SpriteSheet.sprite_width_pixels} + # field, but not both (the API will automatically calculate the missing + # field). + # + # For portrait videos that contain horizontal ASR and rotation metadata, + # provide the height, in pixels, per the horizontal ASR. The API calculates + # the width per the horizontal ASR. The API detects any rotation metadata + # and swaps the requested height and width for the output. + # @!attribute [rw] column_count + # @return [::Integer] + # The maximum number of sprites per row in a sprite sheet. The default is 0, + # which indicates no maximum limit. + # @!attribute [rw] row_count + # @return [::Integer] + # The maximum number of rows per sprite sheet. When the sprite sheet is full, + # a new sprite sheet is created. The default is 0, which indicates no maximum + # limit. + # @!attribute [rw] start_time_offset + # @return [::Google::Protobuf::Duration] + # Start time in seconds, relative to the output file timeline. Determines the + # first sprite to pick. The default is `0s`. + # @!attribute [rw] end_time_offset + # @return [::Google::Protobuf::Duration] + # End time in seconds, relative to the output file timeline. When + # `end_time_offset` is not specified, the sprites are generated until the end + # of the output file. + # @!attribute [rw] total_count + # @return [::Integer] + # Total number of sprites. Create the specified number of sprites + # distributed evenly across the timeline of the output media. The default + # is 100. + # + # Note: The following fields are mutually exclusive: `total_count`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] interval + # @return [::Google::Protobuf::Duration] + # Starting from `0s`, create sprites at regular intervals. Specify the + # interval value in seconds. + # + # Note: The following fields are mutually exclusive: `interval`, `total_count`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] quality + # @return [::Integer] + # The quality of the generated sprite sheet. Enter a value between 1 + # and 100, where 1 is the lowest quality and 100 is the highest quality. + # The default is 100. A high quality value corresponds to a low image data + # compression ratio. + class SpriteSheet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Overlay configuration. + # @!attribute [rw] image + # @return [::Google::Cloud::Video::Transcoder::V1::Overlay::Image] + # Image overlay. + # @!attribute [rw] animations + # @return [::Array<::Google::Cloud::Video::Transcoder::V1::Overlay::Animation>] + # List of animations. The list should be chronological, without any time + # overlap. + class Overlay + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # 2D normalized coordinates. Default: `{0.0, 0.0}` + # @!attribute [rw] x + # @return [::Float] + # Normalized x coordinate. + # @!attribute [rw] y + # @return [::Float] + # Normalized y coordinate. + class NormalizedCoordinate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Overlaid image. + # @!attribute [rw] uri + # @return [::String] + # Required. URI of the image in Cloud Storage. For example, + # `gs://bucket/inputs/image.png`. Only PNG and JPEG images are supported. + # @!attribute [rw] resolution + # @return [::Google::Cloud::Video::Transcoder::V1::Overlay::NormalizedCoordinate] + # Normalized image resolution, based on output video resolution. Valid + # values: `0.0`–`1.0`. To respect the original image aspect ratio, set + # either `x` or `y` to `0.0`. To use the original image resolution, set + # both `x` and `y` to `0.0`. + # @!attribute [rw] alpha + # @return [::Float] + # Target image opacity. Valid values are from `1.0` (solid, default) to + # `0.0` (transparent), exclusive. Set this to a value greater than `0.0`. + class Image + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Display static overlay object. + # @!attribute [rw] xy + # @return [::Google::Cloud::Video::Transcoder::V1::Overlay::NormalizedCoordinate] + # Normalized coordinates based on output video resolution. Valid + # values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay + # object. For example, use the x and y coordinates \\{0,0} to position the + # top-left corner of the overlay animation in the top-left corner of the + # output video. + # @!attribute [rw] start_time_offset + # @return [::Google::Protobuf::Duration] + # The time to start displaying the overlay object, in seconds. Default: 0 + class AnimationStatic + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Display overlay object with fade animation. + # @!attribute [rw] fade_type + # @return [::Google::Cloud::Video::Transcoder::V1::Overlay::FadeType] + # Required. Type of fade animation: `FADE_IN` or `FADE_OUT`. + # @!attribute [rw] xy + # @return [::Google::Cloud::Video::Transcoder::V1::Overlay::NormalizedCoordinate] + # Normalized coordinates based on output video resolution. Valid + # values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay + # object. For example, use the x and y coordinates \\{0,0} to position the + # top-left corner of the overlay animation in the top-left corner of the + # output video. + # @!attribute [rw] start_time_offset + # @return [::Google::Protobuf::Duration] + # The time to start the fade animation, in seconds. Default: 0 + # @!attribute [rw] end_time_offset + # @return [::Google::Protobuf::Duration] + # The time to end the fade animation, in seconds. Default: + # `start_time_offset` + 1s + class AnimationFade + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # End previous overlay animation from the video. Without `AnimationEnd`, the + # overlay object will keep the state of previous animation until the end of + # the video. + # @!attribute [rw] start_time_offset + # @return [::Google::Protobuf::Duration] + # The time to end overlay object, in seconds. Default: 0 + class AnimationEnd + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Animation types. + # @!attribute [rw] animation_static + # @return [::Google::Cloud::Video::Transcoder::V1::Overlay::AnimationStatic] + # Display static overlay object. + # + # Note: The following fields are mutually exclusive: `animation_static`, `animation_fade`, `animation_end`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] animation_fade + # @return [::Google::Cloud::Video::Transcoder::V1::Overlay::AnimationFade] + # Display overlay object with fade animation. + # + # Note: The following fields are mutually exclusive: `animation_fade`, `animation_static`, `animation_end`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] animation_end + # @return [::Google::Cloud::Video::Transcoder::V1::Overlay::AnimationEnd] + # End previous animation. + # + # Note: The following fields are mutually exclusive: `animation_end`, `animation_static`, `animation_fade`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Animation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fade type for the overlay: `FADE_IN` or `FADE_OUT`. + module FadeType + # The fade type is not specified. + FADE_TYPE_UNSPECIFIED = 0 + + # Fade the overlay object into view. + FADE_IN = 1 + + # Fade the overlay object out of view. + FADE_OUT = 2 + end + end + + # Preprocessing configurations. + # @!attribute [rw] color + # @return [::Google::Cloud::Video::Transcoder::V1::PreprocessingConfig::Color] + # Color preprocessing configuration. + # @!attribute [rw] denoise + # @return [::Google::Cloud::Video::Transcoder::V1::PreprocessingConfig::Denoise] + # Denoise preprocessing configuration. + # @!attribute [rw] deblock + # @return [::Google::Cloud::Video::Transcoder::V1::PreprocessingConfig::Deblock] + # Deblock preprocessing configuration. + # @!attribute [rw] audio + # @return [::Google::Cloud::Video::Transcoder::V1::PreprocessingConfig::Audio] + # Audio preprocessing configuration. + # @!attribute [rw] crop + # @return [::Google::Cloud::Video::Transcoder::V1::PreprocessingConfig::Crop] + # Specify the video cropping configuration. + # @!attribute [rw] pad + # @return [::Google::Cloud::Video::Transcoder::V1::PreprocessingConfig::Pad] + # Specify the video pad filter configuration. + # @!attribute [rw] deinterlace + # @return [::Google::Cloud::Video::Transcoder::V1::PreprocessingConfig::Deinterlace] + # Specify the video deinterlace configuration. + class PreprocessingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Color preprocessing configuration. + # + # **Note:** This configuration is not supported. + # @!attribute [rw] saturation + # @return [::Float] + # Control color saturation of the video. Enter a value between -1 and 1, + # where -1 is fully desaturated and 1 is maximum saturation. 0 is no + # change. The default is 0. + # @!attribute [rw] contrast + # @return [::Float] + # Control black and white contrast of the video. Enter a value between -1 + # and 1, where -1 is minimum contrast and 1 is maximum contrast. 0 is no + # change. The default is 0. + # @!attribute [rw] brightness + # @return [::Float] + # Control brightness of the video. Enter a value between -1 and 1, where -1 + # is minimum brightness and 1 is maximum brightness. 0 is no change. The + # default is 0. + class Color + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Denoise preprocessing configuration. + # + # **Note:** This configuration is not supported. + # @!attribute [rw] strength + # @return [::Float] + # Set strength of the denoise. Enter a value between 0 and 1. The higher + # the value, the smoother the image. 0 is no denoising. The default is 0. + # @!attribute [rw] tune + # @return [::String] + # Set the denoiser mode. The default is `standard`. + # + # Supported denoiser modes: + # + # - `standard` + # - `grain` + class Denoise + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Deblock preprocessing configuration. + # + # **Note:** This configuration is not supported. + # @!attribute [rw] strength + # @return [::Float] + # Set strength of the deblocker. Enter a value between 0 and 1. The higher + # the value, the stronger the block removal. 0 is no deblocking. The + # default is 0. + # @!attribute [rw] enabled + # @return [::Boolean] + # Enable deblocker. The default is `false`. + class Deblock + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Audio preprocessing configuration. + # @!attribute [rw] lufs + # @return [::Float] + # Specify audio loudness normalization in loudness units relative to full + # scale (LUFS). Enter a value between -24 and 0 (the default), where: + # + # * -24 is the Advanced Television Systems Committee (ATSC A/85) standard + # * -23 is the EU R128 broadcast standard + # * -19 is the prior standard for online mono audio + # * -18 is the ReplayGain standard + # * -16 is the prior standard for stereo audio + # * -14 is the new online audio standard recommended by Spotify, as well + # as Amazon Echo + # * 0 disables normalization + # @!attribute [rw] high_boost + # @return [::Boolean] + # Enable boosting high frequency components. The default is `false`. + # + # **Note:** This field is not supported. + # @!attribute [rw] low_boost + # @return [::Boolean] + # Enable boosting low frequency components. The default is `false`. + # + # **Note:** This field is not supported. + class Audio + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video cropping configuration for the input video. The cropped input video + # is scaled to match the output resolution. + # @!attribute [rw] top_pixels + # @return [::Integer] + # The number of pixels to crop from the top. The default is 0. + # @!attribute [rw] bottom_pixels + # @return [::Integer] + # The number of pixels to crop from the bottom. The default is 0. + # @!attribute [rw] left_pixels + # @return [::Integer] + # The number of pixels to crop from the left. The default is 0. + # @!attribute [rw] right_pixels + # @return [::Integer] + # The number of pixels to crop from the right. The default is 0. + class Crop + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Pad filter configuration for the input video. The padded input video + # is scaled after padding with black to match the output resolution. + # @!attribute [rw] top_pixels + # @return [::Integer] + # The number of pixels to add to the top. The default is 0. + # @!attribute [rw] bottom_pixels + # @return [::Integer] + # The number of pixels to add to the bottom. The default is 0. + # @!attribute [rw] left_pixels + # @return [::Integer] + # The number of pixels to add to the left. The default is 0. + # @!attribute [rw] right_pixels + # @return [::Integer] + # The number of pixels to add to the right. The default is 0. + class Pad + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Deinterlace configuration for input video. + # @!attribute [rw] yadif + # @return [::Google::Cloud::Video::Transcoder::V1::PreprocessingConfig::Deinterlace::YadifConfig] + # Specifies the Yet Another Deinterlacing Filter Configuration. + # + # Note: The following fields are mutually exclusive: `yadif`, `bwdif`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bwdif + # @return [::Google::Cloud::Video::Transcoder::V1::PreprocessingConfig::Deinterlace::BwdifConfig] + # Specifies the Bob Weaver Deinterlacing Filter Configuration. + # + # Note: The following fields are mutually exclusive: `bwdif`, `yadif`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Deinterlace + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Yet Another Deinterlacing Filter Configuration. + # @!attribute [rw] mode + # @return [::String] + # Specifies the deinterlacing mode to adopt. + # The default is `send_frame`. + # Supported values: + # + # - `send_frame`: Output one frame for each frame + # - `send_field`: Output one frame for each field + # @!attribute [rw] disable_spatial_interlacing + # @return [::Boolean] + # Disable spacial interlacing. + # The default is `false`. + # @!attribute [rw] parity + # @return [::String] + # The picture field parity assumed for the input interlaced video. + # The default is `auto`. + # Supported values: + # + # - `tff`: Assume the top field is first + # - `bff`: Assume the bottom field is first + # - `auto`: Enable automatic detection of field parity + # @!attribute [rw] deinterlace_all_frames + # @return [::Boolean] + # Deinterlace all frames rather than just the frames identified as + # interlaced. The default is `false`. + class YadifConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Bob Weaver Deinterlacing Filter Configuration. + # @!attribute [rw] mode + # @return [::String] + # Specifies the deinterlacing mode to adopt. + # The default is `send_frame`. + # Supported values: + # + # - `send_frame`: Output one frame for each frame + # - `send_field`: Output one frame for each field + # @!attribute [rw] parity + # @return [::String] + # The picture field parity assumed for the input interlaced video. + # The default is `auto`. + # Supported values: + # + # - `tff`: Assume the top field is first + # - `bff`: Assume the bottom field is first + # - `auto`: Enable automatic detection of field parity + # @!attribute [rw] deinterlace_all_frames + # @return [::Boolean] + # Deinterlace all frames rather than just the frames identified as + # interlaced. The default is `false`. + class BwdifConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Track definition for the input asset. + # @!attribute [rw] input_track + # @return [::Integer] + # The input track. + # @!attribute [rw] languages + # @return [::Array<::String>] + # Optional. A list of languages spoken in the input asset, represented by a + # BCP 47 language code, such as "en-US" or "sr-Latn". For more information, + # see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + # @!attribute [rw] detect_languages + # @return [::Boolean] + # Optional. Whether to automatically detect the languages present in the + # track. If true, the system will attempt to identify all the languages + # present in the track and populate the languages field. + # @!attribute [r] detected_languages + # @return [::Array<::String>] + # Output only. A list of languages detected in the input asset, represented + # by a BCP 47 language code, such as "en-US" or "sr-Latn". For more + # information, see + # https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + # This field is only populated if the detect_languages field is set to true. + class TrackDefinition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input attributes that provide additional information about the input asset. + # @!attribute [rw] track_definitions + # @return [::Array<::Google::Cloud::Video::Transcoder::V1::TrackDefinition>] + # Optional. A list of track definitions for the input asset. + class InputAttributes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video stream resource. + # @!attribute [rw] h264 + # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::H264CodecSettings] + # H264 codec settings. + # + # Note: The following fields are mutually exclusive: `h264`, `h265`, `vp9`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] h265 + # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::H265CodecSettings] + # H265 codec settings. + # + # Note: The following fields are mutually exclusive: `h265`, `h264`, `vp9`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] vp9 + # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::Vp9CodecSettings] + # VP9 codec settings. + # + # Note: The following fields are mutually exclusive: `vp9`, `h264`, `h265`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class VideoStream + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Convert the input video to a Standard Dynamic Range (SDR) video. + class H264ColorFormatSDR + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Convert the input video to a Hybrid Log Gamma (HLG) video. + class H264ColorFormatHLG + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # H264 codec settings. + # @!attribute [rw] width_pixels + # @return [::Integer] + # The width of the video in pixels. Must be an even integer. + # When not specified, the width is adjusted to match the specified height + # and input aspect ratio. If both are omitted, the input width is used. + # + # For portrait videos that contain horizontal ASR and rotation metadata, + # provide the width, in pixels, per the horizontal ASR. The API calculates + # the height per the horizontal ASR. The API detects any rotation metadata + # and swaps the requested height and width for the output. + # @!attribute [rw] height_pixels + # @return [::Integer] + # The height of the video in pixels. Must be an even integer. + # When not specified, the height is adjusted to match the specified width + # and input aspect ratio. If both are omitted, the input height is used. + # + # For portrait videos that contain horizontal ASR and rotation metadata, + # provide the height, in pixels, per the horizontal ASR. The API calculates + # the width per the horizontal ASR. The API detects any rotation metadata + # and swaps the requested height and width for the output. + # @!attribute [rw] frame_rate + # @return [::Float] + # Required. The target video frame rate in frames per second (FPS). Must be + # less than or equal to 120. + # @!attribute [rw] frame_rate_conversion_strategy + # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::FrameRateConversionStrategy] + # Optional. Frame rate conversion strategy for desired frame rate. The + # default is `DOWNSAMPLE`. + # @!attribute [rw] bitrate_bps + # @return [::Integer] + # Required. The video bitrate in bits per second. The minimum value is + # 1,000. The maximum value is 800,000,000. + # @!attribute [rw] pixel_format + # @return [::String] + # Pixel format to use. The default is `yuv420p`. + # + # Supported pixel formats: + # + # - `yuv420p` pixel format + # - `yuv422p` pixel format + # - `yuv444p` pixel format + # - `yuv420p10` 10-bit HDR pixel format + # - `yuv422p10` 10-bit HDR pixel format + # - `yuv444p10` 10-bit HDR pixel format + # - `yuv420p12` 12-bit HDR pixel format + # - `yuv422p12` 12-bit HDR pixel format + # - `yuv444p12` 12-bit HDR pixel format + # @!attribute [rw] rate_control_mode + # @return [::String] + # Specify the mode. The default is `vbr`. + # + # Supported rate control modes: + # + # - `vbr` - variable bitrate + # - `crf` - constant rate factor + # @!attribute [rw] crf_level + # @return [::Integer] + # Target CRF level. Must be between 10 and 36, where 10 is the highest + # quality and 36 is the most efficient compression. The default is 21. + # @!attribute [rw] allow_open_gop + # @return [::Boolean] + # Specifies whether an open Group of Pictures (GOP) structure should be + # allowed or not. The default is `false`. + # @!attribute [rw] gop_frame_count + # @return [::Integer] + # Select the GOP size based on the specified frame count. Must be greater + # than zero. + # + # Note: The following fields are mutually exclusive: `gop_frame_count`, `gop_duration`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gop_duration + # @return [::Google::Protobuf::Duration] + # Select the GOP size based on the specified duration. The default is + # `3s`. Note that `gopDuration` must be less than or equal to + # [`segmentDuration`](#SegmentSettings), and + # [`segmentDuration`](#SegmentSettings) must be divisible by + # `gopDuration`. + # + # Note: The following fields are mutually exclusive: `gop_duration`, `gop_frame_count`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] enable_two_pass + # @return [::Boolean] + # Use two-pass encoding strategy to achieve better video quality. + # {::Google::Cloud::Video::Transcoder::V1::VideoStream::H264CodecSettings#rate_control_mode H264CodecSettings.rate_control_mode} + # must be `vbr`. The default is `false`. + # @!attribute [rw] vbv_size_bits + # @return [::Integer] + # Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + # greater than zero. The default is equal to + # {::Google::Cloud::Video::Transcoder::V1::VideoStream::H264CodecSettings#bitrate_bps H264CodecSettings.bitrate_bps}. + # @!attribute [rw] vbv_fullness_bits + # @return [::Integer] + # Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + # Must be greater than zero. The default is equal to 90% of + # {::Google::Cloud::Video::Transcoder::V1::VideoStream::H264CodecSettings#vbv_size_bits H264CodecSettings.vbv_size_bits}. + # @!attribute [rw] entropy_coder + # @return [::String] + # The entropy coder to use. The default is `cabac`. + # + # Supported entropy coders: + # + # - `cavlc` + # - `cabac` + # @!attribute [rw] b_pyramid + # @return [::Boolean] + # Allow B-pyramid for reference frame selection. This may not be supported + # on all decoders. The default is `false`. + # @!attribute [rw] b_frame_count + # @return [::Integer] + # The number of consecutive B-frames. Must be greater than or equal to + # zero. Must be less than + # {::Google::Cloud::Video::Transcoder::V1::VideoStream::H264CodecSettings#gop_frame_count H264CodecSettings.gop_frame_count} + # if set. The default is 0. + # @!attribute [rw] aq_strength + # @return [::Float] + # Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + # and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + # higher value equals a lower bitrate but smoother image. The default is 0. + # @!attribute [rw] profile + # @return [::String] + # Enforces the specified codec profile. The following profiles are + # supported: + # + # * `baseline` + # * `main` + # * `high` (default) + # + # The available options are + # [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). + # Note that certain values for this field may cause the + # transcoder to override other fields you set in the `H264CodecSettings` + # message. + # @!attribute [rw] tune + # @return [::String] + # Enforces the specified codec tune. The available options are + # [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). + # Note that certain values for this field may cause the + # transcoder to override other fields you set in the `H264CodecSettings` + # message. + # @!attribute [rw] preset + # @return [::String] + # Enforces the specified codec preset. The default is `veryfast`. The + # available options are + # [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Preset). + # Note that certain values for this field may cause the + # transcoder to override other fields you set in the `H264CodecSettings` + # message. + # @!attribute [rw] sdr + # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::H264ColorFormatSDR] + # Optional. SDR color format setting for H264. + # + # Note: The following fields are mutually exclusive: `sdr`, `hlg`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] hlg + # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::H264ColorFormatHLG] + # Optional. HLG color format setting for H264. + # + # Note: The following fields are mutually exclusive: `hlg`, `sdr`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class H264CodecSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Convert the input video to a Standard Dynamic Range (SDR) video. + class H265ColorFormatSDR + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Convert the input video to a Hybrid Log Gamma (HLG) video. + class H265ColorFormatHLG + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Convert the input video to a High Dynamic Range 10 (HDR10) video. + class H265ColorFormatHDR10 + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # H265 codec settings. + # @!attribute [rw] width_pixels + # @return [::Integer] + # The width of the video in pixels. Must be an even integer. + # When not specified, the width is adjusted to match the specified height + # and input aspect ratio. If both are omitted, the input width is used. + # + # For portrait videos that contain horizontal ASR and rotation metadata, + # provide the width, in pixels, per the horizontal ASR. The API calculates + # the height per the horizontal ASR. The API detects any rotation metadata + # and swaps the requested height and width for the output. + # @!attribute [rw] height_pixels + # @return [::Integer] + # The height of the video in pixels. Must be an even integer. + # When not specified, the height is adjusted to match the specified width + # and input aspect ratio. If both are omitted, the input height is used. + # + # For portrait videos that contain horizontal ASR and rotation metadata, + # provide the height, in pixels, per the horizontal ASR. The API calculates + # the width per the horizontal ASR. The API detects any rotation metadata + # and swaps the requested height and width for the output. + # @!attribute [rw] frame_rate + # @return [::Float] + # Required. The target video frame rate in frames per second (FPS). Must be + # less than or equal to 120. + # @!attribute [rw] frame_rate_conversion_strategy + # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::FrameRateConversionStrategy] + # Optional. Frame rate conversion strategy for desired frame rate. The + # default is `DOWNSAMPLE`. + # @!attribute [rw] bitrate_bps + # @return [::Integer] + # Required. The video bitrate in bits per second. The minimum value is + # 1,000. The maximum value is 800,000,000. + # @!attribute [rw] pixel_format + # @return [::String] + # Pixel format to use. The default is `yuv420p`. + # + # Supported pixel formats: + # + # - `yuv420p` pixel format + # - `yuv422p` pixel format + # - `yuv444p` pixel format + # - `yuv420p10` 10-bit HDR pixel format + # - `yuv422p10` 10-bit HDR pixel format + # - `yuv444p10` 10-bit HDR pixel format + # - `yuv420p12` 12-bit HDR pixel format + # - `yuv422p12` 12-bit HDR pixel format + # - `yuv444p12` 12-bit HDR pixel format + # @!attribute [rw] rate_control_mode + # @return [::String] + # Specify the mode. The default is `vbr`. + # + # Supported rate control modes: + # + # - `vbr` - variable bitrate + # - `crf` - constant rate factor + # @!attribute [rw] crf_level + # @return [::Integer] + # Target CRF level. Must be between 10 and 36, where 10 is the highest + # quality and 36 is the most efficient compression. The default is 21. + # @!attribute [rw] allow_open_gop + # @return [::Boolean] + # Specifies whether an open Group of Pictures (GOP) structure should be + # allowed or not. The default is `false`. + # @!attribute [rw] gop_frame_count + # @return [::Integer] + # Select the GOP size based on the specified frame count. Must be greater + # than zero. + # + # Note: The following fields are mutually exclusive: `gop_frame_count`, `gop_duration`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gop_duration + # @return [::Google::Protobuf::Duration] + # Select the GOP size based on the specified duration. The default is + # `3s`. Note that `gopDuration` must be less than or equal to + # [`segmentDuration`](#SegmentSettings), and + # [`segmentDuration`](#SegmentSettings) must be divisible by + # `gopDuration`. + # + # Note: The following fields are mutually exclusive: `gop_duration`, `gop_frame_count`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] enable_two_pass + # @return [::Boolean] + # Use two-pass encoding strategy to achieve better video quality. + # {::Google::Cloud::Video::Transcoder::V1::VideoStream::H265CodecSettings#rate_control_mode H265CodecSettings.rate_control_mode} + # must be `vbr`. The default is `false`. + # @!attribute [rw] vbv_size_bits + # @return [::Integer] + # Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + # greater than zero. The default is equal to `VideoStream.bitrate_bps`. + # @!attribute [rw] vbv_fullness_bits + # @return [::Integer] + # Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + # Must be greater than zero. The default is equal to 90% of + # {::Google::Cloud::Video::Transcoder::V1::VideoStream::H265CodecSettings#vbv_size_bits H265CodecSettings.vbv_size_bits}. + # @!attribute [rw] b_pyramid + # @return [::Boolean] + # Allow B-pyramid for reference frame selection. This may not be supported + # on all decoders. The default is `false`. + # @!attribute [rw] b_frame_count + # @return [::Integer] + # The number of consecutive B-frames. Must be greater than or equal to + # zero. Must be less than + # {::Google::Cloud::Video::Transcoder::V1::VideoStream::H265CodecSettings#gop_frame_count H265CodecSettings.gop_frame_count} + # if set. The default is 0. + # @!attribute [rw] aq_strength + # @return [::Float] + # Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + # and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + # higher value equals a lower bitrate but smoother image. The default is 0. + # @!attribute [rw] profile + # @return [::String] + # Enforces the specified codec profile. The following profiles are + # supported: + # + # * 8-bit profiles + # * `main` (default) + # * `main-intra` + # * `mainstillpicture` + # * 10-bit profiles + # * `main10` (default) + # * `main10-intra` + # * `main422-10` + # * `main422-10-intra` + # * `main444-10` + # * `main444-10-intra` + # * 12-bit profiles + # * `main12` (default) + # * `main12-intra` + # * `main422-12` + # * `main422-12-intra` + # * `main444-12` + # * `main444-12-intra` + # + # The available options are + # [FFmpeg-compatible](https://x265.readthedocs.io/). + # Note that certain values for this field may cause the + # transcoder to override other fields you set in the `H265CodecSettings` + # message. + # @!attribute [rw] tune + # @return [::String] + # Enforces the specified codec tune. The available options are + # [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). + # Note that certain values for this field may cause the + # transcoder to override other fields you set in the `H265CodecSettings` + # message. + # @!attribute [rw] preset + # @return [::String] + # Enforces the specified codec preset. The default is `veryfast`. The + # available options are + # [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). + # Note that certain values for this field may cause the + # transcoder to override other fields you set in the `H265CodecSettings` + # message. + # @!attribute [rw] sdr + # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::H265ColorFormatSDR] + # Optional. SDR color format setting for H265. + # + # Note: The following fields are mutually exclusive: `sdr`, `hlg`, `hdr10`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] hlg + # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::H265ColorFormatHLG] + # Optional. HLG color format setting for H265. + # + # Note: The following fields are mutually exclusive: `hlg`, `sdr`, `hdr10`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] hdr10 + # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::H265ColorFormatHDR10] + # Optional. HDR10 color format setting for H265. + # + # Note: The following fields are mutually exclusive: `hdr10`, `sdr`, `hlg`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class H265CodecSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Convert the input video to a Standard Dynamic Range (SDR) video. + class Vp9ColorFormatSDR + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Convert the input video to a Hybrid Log Gamma (HLG) video. + class Vp9ColorFormatHLG + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # VP9 codec settings. + # @!attribute [rw] width_pixels + # @return [::Integer] + # The width of the video in pixels. Must be an even integer. + # When not specified, the width is adjusted to match the specified height + # and input aspect ratio. If both are omitted, the input width is used. + # + # For portrait videos that contain horizontal ASR and rotation metadata, + # provide the width, in pixels, per the horizontal ASR. The API calculates + # the height per the horizontal ASR. The API detects any rotation metadata + # and swaps the requested height and width for the output. + # @!attribute [rw] height_pixels + # @return [::Integer] + # The height of the video in pixels. Must be an even integer. + # When not specified, the height is adjusted to match the specified width + # and input aspect ratio. If both are omitted, the input height is used. + # + # For portrait videos that contain horizontal ASR and rotation metadata, + # provide the height, in pixels, per the horizontal ASR. The API calculates + # the width per the horizontal ASR. The API detects any rotation metadata + # and swaps the requested height and width for the output. + # @!attribute [rw] frame_rate + # @return [::Float] + # Required. The target video frame rate in frames per second (FPS). Must be + # less than or equal to 120. + # @!attribute [rw] frame_rate_conversion_strategy + # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::FrameRateConversionStrategy] + # Optional. Frame rate conversion strategy for desired frame rate. The + # default is `DOWNSAMPLE`. + # @!attribute [rw] bitrate_bps + # @return [::Integer] + # Required. The video bitrate in bits per second. The minimum value is + # 1,000. The maximum value is 480,000,000. + # @!attribute [rw] pixel_format + # @return [::String] + # Pixel format to use. The default is `yuv420p`. + # + # Supported pixel formats: + # + # - `yuv420p` pixel format + # - `yuv422p` pixel format + # - `yuv444p` pixel format + # - `yuv420p10` 10-bit HDR pixel format + # - `yuv422p10` 10-bit HDR pixel format + # - `yuv444p10` 10-bit HDR pixel format + # - `yuv420p12` 12-bit HDR pixel format + # - `yuv422p12` 12-bit HDR pixel format + # - `yuv444p12` 12-bit HDR pixel format + # @!attribute [rw] rate_control_mode + # @return [::String] + # Specify the mode. The default is `vbr`. + # + # Supported rate control modes: + # + # - `vbr` - variable bitrate + # @!attribute [rw] crf_level + # @return [::Integer] + # Target CRF level. Must be between 10 and 36, where 10 is the highest + # quality and 36 is the most efficient compression. The default is 21. + # + # **Note:** This field is not supported. + # @!attribute [rw] gop_frame_count + # @return [::Integer] + # Select the GOP size based on the specified frame count. Must be greater + # than zero. + # + # Note: The following fields are mutually exclusive: `gop_frame_count`, `gop_duration`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gop_duration + # @return [::Google::Protobuf::Duration] + # Select the GOP size based on the specified duration. The default is + # `3s`. Note that `gopDuration` must be less than or equal to + # [`segmentDuration`](#SegmentSettings), and + # [`segmentDuration`](#SegmentSettings) must be divisible by + # `gopDuration`. + # + # Note: The following fields are mutually exclusive: `gop_duration`, `gop_frame_count`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] profile + # @return [::String] + # Enforces the specified codec profile. The following profiles are + # supported: + # + # * `profile0` (default) + # * `profile1` + # * `profile2` + # * `profile3` + # + # The available options are + # [WebM-compatible](https://www.webmproject.org/vp9/profiles/). + # Note that certain values for this field may cause the + # transcoder to override other fields you set in the `Vp9CodecSettings` + # message. + # @!attribute [rw] sdr + # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::Vp9ColorFormatSDR] + # Optional. SDR color format setting for VP9. + # + # Note: The following fields are mutually exclusive: `sdr`, `hlg`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] hlg + # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::Vp9ColorFormatHLG] + # Optional. HLG color format setting for VP9. + # + # Note: The following fields are mutually exclusive: `hlg`, `sdr`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Vp9CodecSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The conversion strategy for desired frame rate. + module FrameRateConversionStrategy + # Unspecified frame rate conversion strategy. + FRAME_RATE_CONVERSION_STRATEGY_UNSPECIFIED = 0 + + # Selectively retain frames to reduce the output frame rate. + # Every _n_ th frame is kept, where `n = ceil(input frame rate / target + # frame rate)`. When _n_ = 1 (that is, the target frame rate is greater + # than the input frame rate), the output frame rate matches the input frame + # rate. When _n_ > 1, frames are dropped and the output frame rate is + # equal to `(input frame rate / n)`. For more information, see + # [Calculate frame + # rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate). + DOWNSAMPLE = 1 + + # Drop or duplicate frames to match the specified frame rate. + DROP_DUPLICATE = 2 + end + end + + # Audio stream resource. + # @!attribute [rw] codec + # @return [::String] + # The codec for this audio stream. The default is `aac`. + # + # Supported audio codecs: + # + # - `aac` + # - `aac-he` + # - `aac-he-v2` + # - `mp3` + # - `ac3` + # - `eac3` + # - `vorbis` + # @!attribute [rw] bitrate_bps + # @return [::Integer] + # Required. Audio bitrate in bits per second. Must be between 1 and + # 10,000,000. + # @!attribute [rw] channel_count + # @return [::Integer] + # Number of audio channels. Must be between 1 and 6. The default is 2. + # @!attribute [rw] channel_layout + # @return [::Array<::String>] + # A list of channel names specifying layout of the audio channels. + # This only affects the metadata embedded in the container headers, if + # supported by the specified format. The default is `["fl", "fr"]`. + # + # Supported channel names: + # + # - `fl` - Front left channel + # - `fr` - Front right channel + # - `sl` - Side left channel + # - `sr` - Side right channel + # - `fc` - Front center channel + # - `lfe` - Low frequency + # @!attribute [rw] mapping + # @return [::Array<::Google::Cloud::Video::Transcoder::V1::AudioStream::AudioMapping>] + # The mapping for the + # {::Google::Cloud::Video::Transcoder::V1::JobConfig#edit_list JobConfig.edit_list} + # atoms with audio + # {::Google::Cloud::Video::Transcoder::V1::EditAtom#inputs EditAtom.inputs}. + # @!attribute [rw] sample_rate_hertz + # @return [::Integer] + # The audio sample rate in Hertz. The default is 48000 Hertz. + # @!attribute [rw] language_code + # @return [::String] + # The BCP-47 language code, such as `en-US` or `sr-Latn`. For more + # information, see + # https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not + # supported in MP4 files. + # @!attribute [rw] display_name + # @return [::String] + # The name for this particular audio stream that + # will be added to the HLS/DASH manifest. Not supported in MP4 files. + class AudioStream + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The mapping for the + # {::Google::Cloud::Video::Transcoder::V1::JobConfig#edit_list JobConfig.edit_list} + # atoms with audio + # {::Google::Cloud::Video::Transcoder::V1::EditAtom#inputs EditAtom.inputs}. + # @!attribute [rw] atom_key + # @return [::String] + # Required. The + # {::Google::Cloud::Video::Transcoder::V1::EditAtom#key EditAtom.key} that + # references the atom with audio inputs in the + # {::Google::Cloud::Video::Transcoder::V1::JobConfig#edit_list JobConfig.edit_list}. + # @!attribute [rw] input_key + # @return [::String] + # Required. The {::Google::Cloud::Video::Transcoder::V1::Input#key Input.key} + # that identifies the input file. + # @!attribute [rw] input_track + # @return [::Integer] + # Required. The zero-based index of the track in the input file. + # @!attribute [rw] input_channel + # @return [::Integer] + # Required. The zero-based index of the channel in the input audio stream. + # @!attribute [rw] output_channel + # @return [::Integer] + # Required. The zero-based index of the channel in the output audio stream. + # @!attribute [rw] gain_db + # @return [::Float] + # Audio volume control in dB. Negative values decrease volume, + # positive values increase. The default is 0. + class AudioMapping + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Encoding of a text stream. For example, closed captions or subtitles. + # @!attribute [rw] codec + # @return [::String] + # The codec for this text stream. The default is `webvtt`. + # + # Supported text codecs: + # + # - `srt` + # - `ttml` + # - `cea608` + # - `cea708` + # - `webvtt` + # @!attribute [rw] language_code + # @return [::String] + # The BCP-47 language code, such as `en-US` or `sr-Latn`. For more + # information, see + # https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not + # supported in MP4 files. + # @!attribute [rw] mapping + # @return [::Array<::Google::Cloud::Video::Transcoder::V1::TextStream::TextMapping>] + # The mapping for the + # {::Google::Cloud::Video::Transcoder::V1::JobConfig#edit_list JobConfig.edit_list} + # atoms with text + # {::Google::Cloud::Video::Transcoder::V1::EditAtom#inputs EditAtom.inputs}. + # @!attribute [rw] display_name + # @return [::String] + # The name for this particular text stream that + # will be added to the HLS/DASH manifest. Not supported in MP4 files. + class TextStream + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The mapping for the + # {::Google::Cloud::Video::Transcoder::V1::JobConfig#edit_list JobConfig.edit_list} + # atoms with text + # {::Google::Cloud::Video::Transcoder::V1::EditAtom#inputs EditAtom.inputs}. + # @!attribute [rw] atom_key + # @return [::String] + # Required. The + # {::Google::Cloud::Video::Transcoder::V1::EditAtom#key EditAtom.key} that + # references atom with text inputs in the + # {::Google::Cloud::Video::Transcoder::V1::JobConfig#edit_list JobConfig.edit_list}. + # @!attribute [rw] input_key + # @return [::String] + # Required. The {::Google::Cloud::Video::Transcoder::V1::Input#key Input.key} + # that identifies the input file. + # @!attribute [rw] input_track + # @return [::Integer] + # Required. The zero-based index of the track in the input file. + class TextMapping + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Segment settings for `ts`, `fmp4` and `vtt`. + # @!attribute [rw] segment_duration + # @return [::Google::Protobuf::Duration] + # Duration of the segments in seconds. The default is `6.0s`. Note that + # `segmentDuration` must be greater than or equal to + # [`gopDuration`](#videostream), and `segmentDuration` must be divisible by + # [`gopDuration`](#videostream). + # @!attribute [rw] individual_segments + # @return [::Boolean] + # Required. Create an individual segment file. The default is `false`. + class SegmentSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Encryption settings. + # @!attribute [rw] id + # @return [::String] + # Required. Identifier for this set of encryption options. + # @!attribute [rw] aes_128 + # @return [::Google::Cloud::Video::Transcoder::V1::Encryption::Aes128Encryption] + # Configuration for AES-128 encryption. + # + # Note: The following fields are mutually exclusive: `aes_128`, `sample_aes`, `mpeg_cenc`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] sample_aes + # @return [::Google::Cloud::Video::Transcoder::V1::Encryption::SampleAesEncryption] + # Configuration for SAMPLE-AES encryption. + # + # Note: The following fields are mutually exclusive: `sample_aes`, `aes_128`, `mpeg_cenc`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] mpeg_cenc + # @return [::Google::Cloud::Video::Transcoder::V1::Encryption::MpegCommonEncryption] + # Configuration for MPEG Common Encryption (MPEG-CENC). + # + # Note: The following fields are mutually exclusive: `mpeg_cenc`, `aes_128`, `sample_aes`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] secret_manager_key_source + # @return [::Google::Cloud::Video::Transcoder::V1::Encryption::SecretManagerSource] + # Keys are stored in Google Secret Manager. + # @!attribute [rw] drm_systems + # @return [::Google::Cloud::Video::Transcoder::V1::Encryption::DrmSystems] + # Required. DRM system(s) to use; at least one must be specified. If a + # DRM system is omitted, it is considered disabled. + class Encryption + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for AES-128 encryption. + class Aes128Encryption + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for SAMPLE-AES encryption. + class SampleAesEncryption + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for MPEG Common Encryption (MPEG-CENC). + # @!attribute [rw] scheme + # @return [::String] + # Required. Specify the encryption scheme. + # + # Supported encryption schemes: + # + # - `cenc` + # - `cbcs` + class MpegCommonEncryption + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for secrets stored in Google Secret Manager. + # @!attribute [rw] secret_version + # @return [::String] + # Required. The name of the Secret Version containing the encryption key in + # the following format: + # `projects/{project}/secrets/{secret_id}/versions/{version_number}` + # + # Note that only numbered versions are supported. Aliases like "latest" are + # not supported. + class SecretManagerSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Widevine configuration. + class Widevine + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fairplay configuration. + class Fairplay + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Playready configuration. + class Playready + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Clearkey configuration. + class Clearkey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines configuration for DRM systems in use. + # @!attribute [rw] widevine + # @return [::Google::Cloud::Video::Transcoder::V1::Encryption::Widevine] + # Widevine configuration. + # @!attribute [rw] fairplay + # @return [::Google::Cloud::Video::Transcoder::V1::Encryption::Fairplay] + # Fairplay configuration. + # @!attribute [rw] playready + # @return [::Google::Cloud::Video::Transcoder::V1::Encryption::Playready] + # Playready configuration. + # @!attribute [rw] clearkey + # @return [::Google::Cloud::Video::Transcoder::V1::Encryption::Clearkey] + # Clearkey configuration. + class DrmSystems + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/cloud/video/transcoder/v1/services.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/cloud/video/transcoder/v1/services.rb new file mode 100644 index 000000000000..3a670aa7f739 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/cloud/video/transcoder/v1/services.rb @@ -0,0 +1,190 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Video + module Transcoder + module V1 + # Request message for `TranscoderService.CreateJob`. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent location to create and process this job. + # Format: `projects/{project}/locations/{location}` + # @!attribute [rw] job + # @return [::Google::Cloud::Video::Transcoder::V1::Job] + # Required. Parameters for creating transcoding job. + class CreateJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TranscoderService.ListJobs`. + # The parent location from which to retrieve the collection of jobs. + # @!attribute [rw] parent + # @return [::String] + # Required. Format: `projects/{project}/locations/{location}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return. + # @!attribute [rw] page_token + # @return [::String] + # The `next_page_token` value returned from a previous List request, if + # any. + # @!attribute [rw] filter + # @return [::String] + # The filter expression, following the syntax outlined in + # https://google.aip.dev/160. + # @!attribute [rw] order_by + # @return [::String] + # One or more fields to compare and use to sort the output. + # See https://google.aip.dev/132#ordering. + class ListJobsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TranscoderService.GetJob`. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the job to retrieve. + # Format: `projects/{project}/locations/{location}/jobs/{job}` + class GetJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TranscoderService.DeleteJob`. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the job to delete. + # Format: `projects/{project}/locations/{location}/jobs/{job}` + # @!attribute [rw] allow_missing + # @return [::Boolean] + # If set to true, and the job is not found, the request will succeed but no + # action will be taken on the server. + class DeleteJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TranscoderService.ListJobs`. + # @!attribute [rw] jobs + # @return [::Array<::Google::Cloud::Video::Transcoder::V1::Job>] + # List of jobs in the specified region. + # @!attribute [rw] next_page_token + # @return [::String] + # The pagination token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # List of regions that could not be reached. + class ListJobsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TranscoderService.CreateJobTemplate`. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent location to create this job template. + # Format: `projects/{project}/locations/{location}` + # @!attribute [rw] job_template + # @return [::Google::Cloud::Video::Transcoder::V1::JobTemplate] + # Required. Parameters for creating job template. + # @!attribute [rw] job_template_id + # @return [::String] + # Required. The ID to use for the job template, which will become the final + # component of the job template's resource name. + # + # This value should be 4-63 characters, and valid characters must match the + # regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. + class CreateJobTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TranscoderService.ListJobTemplates`. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent location from which to retrieve the collection of job + # templates. Format: `projects/{project}/locations/{location}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return. + # @!attribute [rw] page_token + # @return [::String] + # The `next_page_token` value returned from a previous List request, if + # any. + # @!attribute [rw] filter + # @return [::String] + # The filter expression, following the syntax outlined in + # https://google.aip.dev/160. + # @!attribute [rw] order_by + # @return [::String] + # One or more fields to compare and use to sort the output. + # See https://google.aip.dev/132#ordering. + class ListJobTemplatesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TranscoderService.GetJobTemplate`. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the job template to retrieve. + # Format: + # `projects/{project}/locations/{location}/jobTemplates/{job_template}` + class GetJobTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TranscoderService.DeleteJobTemplate`. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the job template to delete. + # `projects/{project}/locations/{location}/jobTemplates/{job_template}` + # @!attribute [rw] allow_missing + # @return [::Boolean] + # If set to true, and the job template is not found, the request will succeed + # but no action will be taken on the server. + class DeleteJobTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TranscoderService.ListJobTemplates`. + # @!attribute [rw] job_templates + # @return [::Array<::Google::Cloud::Video::Transcoder::V1::JobTemplate>] + # List of job templates in the specified region. + # @!attribute [rw] next_page_token + # @return [::String] + # The pagination token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # List of regions that could not be reached. + class ListJobTemplatesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/Gemfile new file mode 100644 index 000000000000..97b2f4237f53 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1", path: "../" +else + gem "google-cloud-video-transcoder-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-video-transcoder-v1/snippets/snippet_metadata_google.cloud.video.transcoder.v1.json b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/snippet_metadata_google.cloud.video.transcoder.v1.json new file mode 100644 index 000000000000..20712ba598b0 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/snippet_metadata_google.cloud.video.transcoder.v1.json @@ -0,0 +1,335 @@ +{ + "client_library": { + "name": "google-cloud-video-transcoder-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.video.transcoder.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "transcoder_v1_generated_TranscoderService_CreateJob_sync", + "title": "Snippet for the create_job call in the TranscoderService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#create_job.", + "file": "transcoder_service/create_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_job", + "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#create_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Transcoder::V1::CreateJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::Transcoder::V1::Job", + "client": { + "short_name": "TranscoderService::Client", + "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client" + }, + "method": { + "short_name": "CreateJob", + "full_name": "google.cloud.video.transcoder.v1.TranscoderService.CreateJob", + "service": { + "short_name": "TranscoderService", + "full_name": "google.cloud.video.transcoder.v1.TranscoderService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "transcoder_v1_generated_TranscoderService_ListJobs_sync", + "title": "Snippet for the list_jobs call in the TranscoderService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#list_jobs.", + "file": "transcoder_service/list_jobs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_jobs", + "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#list_jobs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Transcoder::V1::ListJobsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::Transcoder::V1::ListJobsResponse", + "client": { + "short_name": "TranscoderService::Client", + "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client" + }, + "method": { + "short_name": "ListJobs", + "full_name": "google.cloud.video.transcoder.v1.TranscoderService.ListJobs", + "service": { + "short_name": "TranscoderService", + "full_name": "google.cloud.video.transcoder.v1.TranscoderService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "transcoder_v1_generated_TranscoderService_GetJob_sync", + "title": "Snippet for the get_job call in the TranscoderService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#get_job.", + "file": "transcoder_service/get_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_job", + "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#get_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Transcoder::V1::GetJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::Transcoder::V1::Job", + "client": { + "short_name": "TranscoderService::Client", + "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client" + }, + "method": { + "short_name": "GetJob", + "full_name": "google.cloud.video.transcoder.v1.TranscoderService.GetJob", + "service": { + "short_name": "TranscoderService", + "full_name": "google.cloud.video.transcoder.v1.TranscoderService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "transcoder_v1_generated_TranscoderService_DeleteJob_sync", + "title": "Snippet for the delete_job call in the TranscoderService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#delete_job.", + "file": "transcoder_service/delete_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_job", + "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#delete_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "TranscoderService::Client", + "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client" + }, + "method": { + "short_name": "DeleteJob", + "full_name": "google.cloud.video.transcoder.v1.TranscoderService.DeleteJob", + "service": { + "short_name": "TranscoderService", + "full_name": "google.cloud.video.transcoder.v1.TranscoderService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "transcoder_v1_generated_TranscoderService_CreateJobTemplate_sync", + "title": "Snippet for the create_job_template call in the TranscoderService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#create_job_template.", + "file": "transcoder_service/create_job_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_job_template", + "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#create_job_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::Transcoder::V1::JobTemplate", + "client": { + "short_name": "TranscoderService::Client", + "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client" + }, + "method": { + "short_name": "CreateJobTemplate", + "full_name": "google.cloud.video.transcoder.v1.TranscoderService.CreateJobTemplate", + "service": { + "short_name": "TranscoderService", + "full_name": "google.cloud.video.transcoder.v1.TranscoderService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "transcoder_v1_generated_TranscoderService_ListJobTemplates_sync", + "title": "Snippet for the list_job_templates call in the TranscoderService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#list_job_templates.", + "file": "transcoder_service/list_job_templates.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_job_templates", + "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#list_job_templates", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesResponse", + "client": { + "short_name": "TranscoderService::Client", + "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client" + }, + "method": { + "short_name": "ListJobTemplates", + "full_name": "google.cloud.video.transcoder.v1.TranscoderService.ListJobTemplates", + "service": { + "short_name": "TranscoderService", + "full_name": "google.cloud.video.transcoder.v1.TranscoderService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "transcoder_v1_generated_TranscoderService_GetJobTemplate_sync", + "title": "Snippet for the get_job_template call in the TranscoderService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#get_job_template.", + "file": "transcoder_service/get_job_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_job_template", + "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#get_job_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Video::Transcoder::V1::JobTemplate", + "client": { + "short_name": "TranscoderService::Client", + "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client" + }, + "method": { + "short_name": "GetJobTemplate", + "full_name": "google.cloud.video.transcoder.v1.TranscoderService.GetJobTemplate", + "service": { + "short_name": "TranscoderService", + "full_name": "google.cloud.video.transcoder.v1.TranscoderService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "transcoder_v1_generated_TranscoderService_DeleteJobTemplate_sync", + "title": "Snippet for the delete_job_template call in the TranscoderService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#delete_job_template.", + "file": "transcoder_service/delete_job_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_job_template", + "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#delete_job_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "TranscoderService::Client", + "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client" + }, + "method": { + "short_name": "DeleteJobTemplate", + "full_name": "google.cloud.video.transcoder.v1.TranscoderService.DeleteJobTemplate", + "service": { + "short_name": "TranscoderService", + "full_name": "google.cloud.video.transcoder.v1.TranscoderService" + } + } + }, + "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-video-transcoder-v1/snippets/transcoder_service/create_job.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/create_job.rb new file mode 100644 index 000000000000..e57e49dfae29 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/create_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START transcoder_v1_generated_TranscoderService_CreateJob_sync] +require "google/cloud/video/transcoder/v1" + +## +# Snippet for the create_job call in the TranscoderService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#create_job. +# +def create_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Transcoder::V1::CreateJobRequest.new + + # Call the create_job method. + result = client.create_job request + + # The returned object is of type Google::Cloud::Video::Transcoder::V1::Job. + p result +end +# [END transcoder_v1_generated_TranscoderService_CreateJob_sync] diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/create_job_template.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/create_job_template.rb new file mode 100644 index 000000000000..f3584b0dd7ff --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/create_job_template.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 transcoder_v1_generated_TranscoderService_CreateJobTemplate_sync] +require "google/cloud/video/transcoder/v1" + +## +# Snippet for the create_job_template call in the TranscoderService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#create_job_template. +# +def create_job_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest.new + + # Call the create_job_template method. + result = client.create_job_template request + + # The returned object is of type Google::Cloud::Video::Transcoder::V1::JobTemplate. + p result +end +# [END transcoder_v1_generated_TranscoderService_CreateJobTemplate_sync] diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/delete_job.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/delete_job.rb new file mode 100644 index 000000000000..7f91ab7e899c --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/delete_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START transcoder_v1_generated_TranscoderService_DeleteJob_sync] +require "google/cloud/video/transcoder/v1" + +## +# Snippet for the delete_job call in the TranscoderService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#delete_job. +# +def delete_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Transcoder::V1::DeleteJobRequest.new + + # Call the delete_job method. + result = client.delete_job request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END transcoder_v1_generated_TranscoderService_DeleteJob_sync] diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/delete_job_template.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/delete_job_template.rb new file mode 100644 index 000000000000..b32f99c777ed --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/delete_job_template.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 transcoder_v1_generated_TranscoderService_DeleteJobTemplate_sync] +require "google/cloud/video/transcoder/v1" + +## +# Snippet for the delete_job_template call in the TranscoderService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#delete_job_template. +# +def delete_job_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest.new + + # Call the delete_job_template method. + result = client.delete_job_template request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END transcoder_v1_generated_TranscoderService_DeleteJobTemplate_sync] diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/get_job.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/get_job.rb new file mode 100644 index 000000000000..fc2aa2bcc67b --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/get_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START transcoder_v1_generated_TranscoderService_GetJob_sync] +require "google/cloud/video/transcoder/v1" + +## +# Snippet for the get_job call in the TranscoderService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#get_job. +# +def get_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Transcoder::V1::GetJobRequest.new + + # Call the get_job method. + result = client.get_job request + + # The returned object is of type Google::Cloud::Video::Transcoder::V1::Job. + p result +end +# [END transcoder_v1_generated_TranscoderService_GetJob_sync] diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/get_job_template.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/get_job_template.rb new file mode 100644 index 000000000000..b2e5796596f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/get_job_template.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 transcoder_v1_generated_TranscoderService_GetJobTemplate_sync] +require "google/cloud/video/transcoder/v1" + +## +# Snippet for the get_job_template call in the TranscoderService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#get_job_template. +# +def get_job_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest.new + + # Call the get_job_template method. + result = client.get_job_template request + + # The returned object is of type Google::Cloud::Video::Transcoder::V1::JobTemplate. + p result +end +# [END transcoder_v1_generated_TranscoderService_GetJobTemplate_sync] diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/list_job_templates.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/list_job_templates.rb new file mode 100644 index 000000000000..1d7806f8df76 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/list_job_templates.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 transcoder_v1_generated_TranscoderService_ListJobTemplates_sync] +require "google/cloud/video/transcoder/v1" + +## +# Snippet for the list_job_templates call in the TranscoderService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#list_job_templates. +# +def list_job_templates + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest.new + + # Call the list_job_templates method. + result = client.list_job_templates request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Video::Transcoder::V1::JobTemplate. + p item + end +end +# [END transcoder_v1_generated_TranscoderService_ListJobTemplates_sync] diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/list_jobs.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/list_jobs.rb new file mode 100644 index 000000000000..538fdc5f9444 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/list_jobs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START transcoder_v1_generated_TranscoderService_ListJobs_sync] +require "google/cloud/video/transcoder/v1" + +## +# Snippet for the list_jobs call in the TranscoderService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#list_jobs. +# +def list_jobs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Video::Transcoder::V1::ListJobsRequest.new + + # Call the list_jobs method. + result = client.list_jobs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Video::Transcoder::V1::Job. + p item + end +end +# [END transcoder_v1_generated_TranscoderService_ListJobs_sync] diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/test/google/cloud/video/transcoder/v1/transcoder_service_paths_test.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/test/google/cloud/video/transcoder/v1/transcoder_service_paths_test.rb new file mode 100644 index 000000000000..91c6c6dedbd6 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/test/google/cloud/video/transcoder/v1/transcoder_service_paths_test.rb @@ -0,0 +1,79 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/video/transcoder/v1/transcoder_service" + +class ::Google::Cloud::Video::Transcoder::V1::TranscoderService::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_job_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.job_path project: "value0", location: "value1", job: "value2" + assert_equal "projects/value0/locations/value1/jobs/value2", path + end + end + + def test_job_template_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.job_template_path project: "value0", location: "value1", job_template: "value2" + assert_equal "projects/value0/locations/value1/jobTemplates/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::Video::Transcoder::V1::TranscoderService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/test/google/cloud/video/transcoder/v1/transcoder_service_rest_test.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/test/google/cloud/video/transcoder/v1/transcoder_service_rest_test.rb new file mode 100644 index 000000000000..b8f33856e029 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/test/google/cloud/video/transcoder/v1/transcoder_service_rest_test.rb @@ -0,0 +1,544 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/video/transcoder/v1/services_pb" +require "google/cloud/video/transcoder/v1/transcoder_service/rest" + + +class ::Google::Cloud::Video::Transcoder::V1::TranscoderService::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_job + # Create test objects. + client_result = ::Google::Cloud::Video::Transcoder::V1::Job.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + job = {} + + create_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::ServiceStub.stub :transcode_create_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_job_client_stub do + # Create client + client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_job({ parent: parent, job: job }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_job parent: parent, job: job do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_job ::Google::Cloud::Video::Transcoder::V1::CreateJobRequest.new(parent: parent, job: job) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_job({ parent: parent, job: job }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_job(::Google::Cloud::Video::Transcoder::V1::CreateJobRequest.new(parent: parent, job: job), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_job_client_stub.call_count + end + end + end + + def test_list_jobs + # Create test objects. + client_result = ::Google::Cloud::Video::Transcoder::V1::ListJobsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::ServiceStub.stub :transcode_list_jobs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_jobs_client_stub do + # Create client + client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_jobs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_jobs ::Google::Cloud::Video::Transcoder::V1::ListJobsRequest.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_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_jobs(::Google::Cloud::Video::Transcoder::V1::ListJobsRequest.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_jobs_client_stub.call_count + end + end + end + + def test_get_job + # Create test objects. + client_result = ::Google::Cloud::Video::Transcoder::V1::Job.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::ServiceStub.stub :transcode_get_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_job_client_stub do + # Create client + client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_job({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_job name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_job ::Google::Cloud::Video::Transcoder::V1::GetJobRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_job({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_job(::Google::Cloud::Video::Transcoder::V1::GetJobRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_job_client_stub.call_count + end + end + end + + def test_delete_job + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + allow_missing = true + + delete_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::ServiceStub.stub :transcode_delete_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_job_client_stub do + # Create client + client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_job({ name: name, allow_missing: allow_missing }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_job name: name, allow_missing: allow_missing do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_job ::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest.new(name: name, allow_missing: allow_missing) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_job({ name: name, allow_missing: allow_missing }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_job(::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest.new(name: name, allow_missing: allow_missing), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_job_client_stub.call_count + end + end + end + + def test_create_job_template + # Create test objects. + client_result = ::Google::Cloud::Video::Transcoder::V1::JobTemplate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + job_template = {} + job_template_id = "hello world" + + create_job_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::ServiceStub.stub :transcode_create_job_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_job_template_client_stub do + # Create client + client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_job_template({ parent: parent, job_template: job_template, job_template_id: job_template_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_job_template parent: parent, job_template: job_template, job_template_id: job_template_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_job_template ::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest.new(parent: parent, job_template: job_template, job_template_id: job_template_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_job_template({ parent: parent, job_template: job_template, job_template_id: job_template_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_job_template(::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest.new(parent: parent, job_template: job_template, job_template_id: job_template_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_job_template_client_stub.call_count + end + end + end + + def test_list_job_templates + # Create test objects. + client_result = ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesResponse.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_job_templates_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::ServiceStub.stub :transcode_list_job_templates_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_job_templates_client_stub do + # Create client + client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_job_templates({ parent: parent, page_size: 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_job_templates parent: parent, page_size: 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_job_templates ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest.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_job_templates({ parent: parent, page_size: page_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_job_templates(::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest.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_job_templates_client_stub.call_count + end + end + end + + def test_get_job_template + # Create test objects. + client_result = ::Google::Cloud::Video::Transcoder::V1::JobTemplate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_job_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::ServiceStub.stub :transcode_get_job_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_job_template_client_stub do + # Create client + client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_job_template({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_job_template name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_job_template ::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_job_template({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_job_template(::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_job_template_client_stub.call_count + end + end + end + + def test_delete_job_template + # 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" + allow_missing = true + + delete_job_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::ServiceStub.stub :transcode_delete_job_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_job_template_client_stub do + # Create client + client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_job_template({ name: name, allow_missing: allow_missing }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_job_template name: name, allow_missing: allow_missing do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_job_template ::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest.new(name: name, allow_missing: allow_missing) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_job_template({ name: name, allow_missing: allow_missing }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_job_template(::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest.new(name: name, allow_missing: allow_missing), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_job_template_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::Video::Transcoder::V1::TranscoderService::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::Video::Transcoder::V1::TranscoderService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/test/google/cloud/video/transcoder/v1/transcoder_service_test.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/test/google/cloud/video/transcoder/v1/transcoder_service_test.rb new file mode 100644 index 000000000000..e6311ef452dc --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/test/google/cloud/video/transcoder/v1/transcoder_service_test.rb @@ -0,0 +1,604 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/video/transcoder/v1/services_pb" +require "google/cloud/video/transcoder/v1/transcoder_service" + +class ::Google::Cloud::Video::Transcoder::V1::TranscoderService::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_job + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::Transcoder::V1::Job.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + job = {} + + create_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_job, name + assert_kind_of ::Google::Cloud::Video::Transcoder::V1::CreateJobRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::Transcoder::V1::Job), request["job"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_job_client_stub do + # Create client + client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_job({ parent: parent, job: job }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_job parent: parent, job: job do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_job ::Google::Cloud::Video::Transcoder::V1::CreateJobRequest.new(parent: parent, job: job) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_job({ parent: parent, job: job }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_job(::Google::Cloud::Video::Transcoder::V1::CreateJobRequest.new(parent: parent, job: job), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_job_client_stub.call_rpc_count + end + end + + def test_list_jobs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::Transcoder::V1::ListJobsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_jobs, name + assert_kind_of ::Google::Cloud::Video::Transcoder::V1::ListJobsRequest, 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_jobs_client_stub do + # Create client + client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_jobs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_jobs ::Google::Cloud::Video::Transcoder::V1::ListJobsRequest.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_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_jobs(::Google::Cloud::Video::Transcoder::V1::ListJobsRequest.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_jobs_client_stub.call_rpc_count + end + end + + def test_get_job + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::Transcoder::V1::Job.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_job, name + assert_kind_of ::Google::Cloud::Video::Transcoder::V1::GetJobRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_job_client_stub do + # Create client + client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_job({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_job name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_job ::Google::Cloud::Video::Transcoder::V1::GetJobRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_job({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_job(::Google::Cloud::Video::Transcoder::V1::GetJobRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_job_client_stub.call_rpc_count + end + end + + def test_delete_job + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + allow_missing = true + + delete_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_job, name + assert_kind_of ::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["allow_missing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_job_client_stub do + # Create client + client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_job({ name: name, allow_missing: allow_missing }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_job name: name, allow_missing: allow_missing do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_job ::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest.new(name: name, allow_missing: allow_missing) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_job({ name: name, allow_missing: allow_missing }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_job(::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest.new(name: name, allow_missing: allow_missing), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_job_client_stub.call_rpc_count + end + end + + def test_create_job_template + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::Transcoder::V1::JobTemplate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + job_template = {} + job_template_id = "hello world" + + create_job_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_job_template, name + assert_kind_of ::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::Transcoder::V1::JobTemplate), request["job_template"] + assert_equal "hello world", request["job_template_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_job_template_client_stub do + # Create client + client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_job_template({ parent: parent, job_template: job_template, job_template_id: job_template_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_job_template parent: parent, job_template: job_template, job_template_id: job_template_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_job_template ::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest.new(parent: parent, job_template: job_template, job_template_id: job_template_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_job_template({ parent: parent, job_template: job_template, job_template_id: job_template_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_job_template(::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest.new(parent: parent, job_template: job_template, job_template_id: job_template_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_job_template_client_stub.call_rpc_count + end + end + + def test_list_job_templates + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_job_templates_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_job_templates, name + assert_kind_of ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest, 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_job_templates_client_stub do + # Create client + client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_job_templates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_job_templates parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_job_templates ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest.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_job_templates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_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_job_templates(::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest.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_job_templates_client_stub.call_rpc_count + end + end + + def test_get_job_template + # Create GRPC objects. + grpc_response = ::Google::Cloud::Video::Transcoder::V1::JobTemplate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_job_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_job_template, name + assert_kind_of ::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_job_template_client_stub do + # Create client + client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_job_template({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_job_template name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_job_template ::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_job_template({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_job_template(::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_job_template_client_stub.call_rpc_count + end + end + + def test_delete_job_template + # 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" + allow_missing = true + + delete_job_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_job_template, name + assert_kind_of ::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["allow_missing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_job_template_client_stub do + # Create client + client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_job_template({ name: name, allow_missing: allow_missing }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_job_template name: name, allow_missing: allow_missing do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_job_template ::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest.new(name: name, allow_missing: allow_missing) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_job_template({ name: name, allow_missing: allow_missing }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_job_template(::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest.new(name: name, allow_missing: allow_missing), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_job_template_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::Video::Transcoder::V1::TranscoderService::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::Video::Transcoder::V1::TranscoderService::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::Video::Transcoder::V1::TranscoderService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/test/helper.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-video-transcoder-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/.gitignore b/owl-bot-staging/google-cloud-video_intelligence-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-video_intelligence-v1/.repo-metadata.json new file mode 100644 index 000000000000..fd72c6eaa8bc --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "videointelligence.googleapis.com", + "api_shortname": "videointelligence", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-video_intelligence-v1/latest", + "distribution_name": "google-cloud-video_intelligence-v1", + "is_cloud": true, + "language": "ruby", + "name": "videointelligence", + "name_pretty": "Cloud Video Intelligence V1 API", + "product_documentation": "https://cloud.google.com/video-intelligence", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API. Note that google-cloud-video_intelligence-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video_intelligence instead. See the readme for more details.", + "ruby-cloud-env-prefix": "VIDEO_INTELLIGENCE", + "ruby-cloud-product-url": "https://cloud.google.com/video-intelligence", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/.rubocop.yml b/owl-bot-staging/google-cloud-video_intelligence-v1/.rubocop.yml new file mode 100644 index 000000000000..697ce3ad8472 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-video_intelligence-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-video_intelligence-v1.rb" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/.toys.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1/.yardopts b/owl-bot-staging/google-cloud-video_intelligence-v1/.yardopts new file mode 100644 index 000000000000..a5654de497b4 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Video Intelligence 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-video_intelligence-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-video_intelligence-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..c0eda224807f --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-video_intelligence-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-video_intelligence-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/video_intelligence/v1" + +client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/video_intelligence/v1" + +::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::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-video_intelligence-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/video_intelligence/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::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-video_intelligence-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-video_intelligence-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/Gemfile b/owl-bot-staging/google-cloud-video_intelligence-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/LICENSE.md b/owl-bot-staging/google-cloud-video_intelligence-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1/README.md b/owl-bot-staging/google-cloud-video_intelligence-v1/README.md new file mode 100644 index 000000000000..dd633f99baa3 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the Cloud Video Intelligence V1 API + +Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming 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 Cloud Video Intelligence V1 API. Most users should consider using +the main client gem, +[google-cloud-video_intelligence](https://rubygems.org/gems/google-cloud-video_intelligence). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-video_intelligence-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/videointelligence.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/video_intelligence/v1" + +client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new +request = ::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest.new # (request fields as keyword arguments...) +response = client.annotate_video request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-video_intelligence-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/video-intelligence) +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/video_intelligence/v1" +require "logger" + +client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::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-video_intelligence`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-video_intelligence-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-video_intelligence`. +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-video_intelligence-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-video_intelligence-v1/Rakefile b/owl-bot-staging/google-cloud-video_intelligence-v1/Rakefile new file mode 100644 index 000000000000..be41ab6af9b2 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["VIDEO_INTELLIGENCE_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["VIDEO_INTELLIGENCE_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["VIDEO_INTELLIGENCE_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 VIDEO_INTELLIGENCE_TEST_PROJECT=test123 VIDEO_INTELLIGENCE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/video_intelligence/v1/video_intelligence_service/credentials" + ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["VIDEO_INTELLIGENCE_PROJECT"] = project + ENV["VIDEO_INTELLIGENCE_TEST_PROJECT"] = project + ENV["VIDEO_INTELLIGENCE_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-video_intelligence-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-video_intelligence-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-video_intelligence-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-video_intelligence-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-video_intelligence-v1" + header "google-cloud-video_intelligence-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-video_intelligence-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-video_intelligence-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-video_intelligence-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-video_intelligence-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-video_intelligence-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-video_intelligence-v1/gapic_metadata.json new file mode 100644 index 000000000000..c63f91c761e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/gapic_metadata.json @@ -0,0 +1,23 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.videointelligence.v1", + "libraryPackage": "::Google::Cloud::VideoIntelligence::V1", + "services": { + "VideoIntelligenceService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client", + "rpcs": { + "AnnotateVideo": { + "methods": [ + "annotate_video" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/google-cloud-video_intelligence-v1.gemspec b/owl-bot-staging/google-cloud-video_intelligence-v1/google-cloud-video_intelligence-v1.gemspec new file mode 100644 index 000000000000..bd13d57851fe --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/google-cloud-video_intelligence-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/video_intelligence/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-video_intelligence-v1" + gem.version = Google::Cloud::VideoIntelligence::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API. Note that google-cloud-video_intelligence-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video_intelligence instead. See the readme for more details." + gem.summary = "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming 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.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google-cloud-video_intelligence-v1.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google-cloud-video_intelligence-v1.rb new file mode 100644 index 000000000000..5cf564001ea9 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google-cloud-video_intelligence-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/video_intelligence/v1" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1.rb new file mode 100644 index 000000000000..dc3277529713 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/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/video_intelligence/v1/video_intelligence_service" +require "google/cloud/video_intelligence/v1/version" + +module Google + module Cloud + module VideoIntelligence + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/video_intelligence/v1" + # client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/video_intelligence/v1" + # client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/video_intelligence/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/rest.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/rest.rb new file mode 100644 index 000000000000..4c8ddf732c3a --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/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/video_intelligence/v1/video_intelligence_service/rest" +require "google/cloud/video_intelligence/v1/version" + +module Google + module Cloud + module VideoIntelligence + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/video_intelligence/v1/rest" + # client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/version.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/version.rb new file mode 100644 index 000000000000..6775de1f8f63 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/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 VideoIntelligence + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service.rb new file mode 100644 index 000000000000..0c182f50e7b8 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service.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/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/video_intelligence/v1/version" + +require "google/cloud/video_intelligence/v1/video_intelligence_service/credentials" +require "google/cloud/video_intelligence/v1/video_intelligence_service/operations" +require "google/cloud/video_intelligence/v1/video_intelligence_service/client" +require "google/cloud/video_intelligence/v1/video_intelligence_service/rest" + +module Google + module Cloud + module VideoIntelligence + module V1 + ## + # Service that implements the Video Intelligence API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/video_intelligence/v1/video_intelligence_service" + # client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/video_intelligence/v1/video_intelligence_service/rest" + # client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client.new + # + module VideoIntelligenceService + end + end + end + end +end + +helper_path = ::File.join __dir__, "video_intelligence_service", "helpers.rb" +require "google/cloud/video_intelligence/v1/video_intelligence_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/client.rb new file mode 100644 index 000000000000..6853d23a2ffd --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/client.rb @@ -0,0 +1,526 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/videointelligence/v1/video_intelligence_pb" + +module Google + module Cloud + module VideoIntelligence + module V1 + module VideoIntelligenceService + ## + # Client for the VideoIntelligenceService service. + # + # Service that implements the Video Intelligence API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :video_intelligence_service_stub + + ## + # Configure the VideoIntelligenceService Client class. + # + # See {::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all VideoIntelligenceService clients + # ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::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", "VideoIntelligence", "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.annotate_video.timeout = 600.0 + default_config.rpcs.annotate_video.retry_policy = { + initial_delay: 1.0, max_delay: 120.0, multiplier: 2.5, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the VideoIntelligenceService 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::VideoIntelligence::V1::VideoIntelligenceService::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 + @video_intelligence_service_stub.universe_domain + end + + ## + # Create a new VideoIntelligenceService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the VideoIntelligenceService 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/videointelligence/v1/video_intelligence_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 + + @video_intelligence_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::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 + ) + + @video_intelligence_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 + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @video_intelligence_service_stub.logger + end + + # Service calls + + ## + # Performs asynchronous video annotation. Progress and results can be + # retrieved through the `google.longrunning.Operations` interface. + # `Operation.metadata` contains `AnnotateVideoProgress` (progress). + # `Operation.response` contains `AnnotateVideoResponse` (results). + # + # @overload annotate_video(request, options = nil) + # Pass arguments to `annotate_video` via a request object, either of type + # {::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload annotate_video(input_uri: nil, input_content: nil, features: nil, video_context: nil, output_uri: nil, location_id: nil) + # Pass arguments to `annotate_video` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param input_uri [::String] + # Input video location. Currently, only + # [Cloud Storage](https://cloud.google.com/storage/) URIs are + # supported. URIs must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + # more information, see [Request + # URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify + # multiple videos, a video URI may include wildcards in the `object-id`. + # Supported wildcards: '*' to match 0 or more characters; + # '?' to match 1 character. If unset, the input video should be embedded + # in the request as `input_content`. If set, `input_content` must be unset. + # @param input_content [::String] + # The video data bytes. + # If unset, the input video(s) should be specified via the `input_uri`. + # If set, `input_uri` must be unset. + # @param features [::Array<::Google::Cloud::VideoIntelligence::V1::Feature>] + # Required. Requested video annotation features. + # @param video_context [::Google::Cloud::VideoIntelligence::V1::VideoContext, ::Hash] + # Additional video context and/or feature-specific parameters. + # @param output_uri [::String] + # Optional. Location where the output (in JSON format) should be stored. + # Currently, only [Cloud Storage](https://cloud.google.com/storage/) + # URIs are supported. These must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + # more information, see [Request + # URIs](https://cloud.google.com/storage/docs/request-endpoints). + # @param location_id [::String] + # Optional. Cloud region where annotation should take place. Supported cloud + # regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no + # region is specified, the region will be determined based on video file + # 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/video_intelligence/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest.new + # + # # Call the annotate_video method. + # result = client.annotate_video request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def annotate_video request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.annotate_video.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::VideoIntelligence::V1::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.annotate_video.timeout, + metadata: metadata, + retry_policy: @config.rpcs.annotate_video.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_intelligence_service_stub.call_rpc :annotate_video, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 VideoIntelligenceService API. + # + # This class represents the configuration for VideoIntelligenceService, + # 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::VideoIntelligence::V1::VideoIntelligenceService::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 + # # annotate_video to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.annotate_video.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.annotate_video.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::VideoIntelligence::V1::VideoIntelligenceService::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 = "videointelligence.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 VideoIntelligenceService 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 `annotate_video` + # @return [::Gapic::Config::Method] + # + attr_reader :annotate_video + + # @private + def initialize parent_rpcs = nil + annotate_video_config = parent_rpcs.annotate_video if parent_rpcs.respond_to? :annotate_video + @annotate_video = ::Gapic::Config::Method.new annotate_video_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/credentials.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/credentials.rb new file mode 100644 index 000000000000..7e5f41c8e344 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_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 VideoIntelligence + module V1 + module VideoIntelligenceService + # Credentials for the VideoIntelligenceService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "VIDEO_INTELLIGENCE_CREDENTIALS", + "VIDEO_INTELLIGENCE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "VIDEO_INTELLIGENCE_CREDENTIALS_JSON", + "VIDEO_INTELLIGENCE_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-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/operations.rb new file mode 100644 index 000000000000..72a71611c2c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_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 VideoIntelligence + module V1 + module VideoIntelligenceService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the VideoIntelligenceService 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 VideoIntelligenceService 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::VideoIntelligence::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::VideoIntelligence::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::VideoIntelligence::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::VideoIntelligence::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::VideoIntelligence::V1::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 = "videointelligence.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-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest.rb new file mode 100644 index 000000000000..5e8aa73048ff --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest.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 "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/video_intelligence/v1/version" + +require "google/cloud/video_intelligence/v1/video_intelligence_service/credentials" +require "google/cloud/video_intelligence/v1/video_intelligence_service/rest/operations" +require "google/cloud/video_intelligence/v1/video_intelligence_service/rest/client" + +module Google + module Cloud + module VideoIntelligence + module V1 + ## + # Service that implements the Video Intelligence API. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/video_intelligence/v1/video_intelligence_service/rest" + # client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client.new + # + module VideoIntelligenceService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/video_intelligence/v1/video_intelligence_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest/client.rb new file mode 100644 index 000000000000..760b8450aae2 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest/client.rb @@ -0,0 +1,484 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/videointelligence/v1/video_intelligence_pb" +require "google/cloud/video_intelligence/v1/video_intelligence_service/rest/service_stub" + +module Google + module Cloud + module VideoIntelligence + module V1 + module VideoIntelligenceService + module Rest + ## + # REST client for the VideoIntelligenceService service. + # + # Service that implements the Video Intelligence API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :video_intelligence_service_stub + + ## + # Configure the VideoIntelligenceService Client class. + # + # See {::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all VideoIntelligenceService clients + # ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::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", "VideoIntelligence", "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.annotate_video.timeout = 600.0 + default_config.rpcs.annotate_video.retry_policy = { + initial_delay: 1.0, max_delay: 120.0, multiplier: 2.5, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the VideoIntelligenceService 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::VideoIntelligence::V1::VideoIntelligenceService::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 + @video_intelligence_service_stub.universe_domain + end + + ## + # Create a new VideoIntelligenceService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the VideoIntelligenceService 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::VideoIntelligence::V1::VideoIntelligenceService::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 + + @video_intelligence_service_stub = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @video_intelligence_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 + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @video_intelligence_service_stub.logger + end + + # Service calls + + ## + # Performs asynchronous video annotation. Progress and results can be + # retrieved through the `google.longrunning.Operations` interface. + # `Operation.metadata` contains `AnnotateVideoProgress` (progress). + # `Operation.response` contains `AnnotateVideoResponse` (results). + # + # @overload annotate_video(request, options = nil) + # Pass arguments to `annotate_video` via a request object, either of type + # {::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload annotate_video(input_uri: nil, input_content: nil, features: nil, video_context: nil, output_uri: nil, location_id: nil) + # Pass arguments to `annotate_video` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param input_uri [::String] + # Input video location. Currently, only + # [Cloud Storage](https://cloud.google.com/storage/) URIs are + # supported. URIs must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + # more information, see [Request + # URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify + # multiple videos, a video URI may include wildcards in the `object-id`. + # Supported wildcards: '*' to match 0 or more characters; + # '?' to match 1 character. If unset, the input video should be embedded + # in the request as `input_content`. If set, `input_content` must be unset. + # @param input_content [::String] + # The video data bytes. + # If unset, the input video(s) should be specified via the `input_uri`. + # If set, `input_uri` must be unset. + # @param features [::Array<::Google::Cloud::VideoIntelligence::V1::Feature>] + # Required. Requested video annotation features. + # @param video_context [::Google::Cloud::VideoIntelligence::V1::VideoContext, ::Hash] + # Additional video context and/or feature-specific parameters. + # @param output_uri [::String] + # Optional. Location where the output (in JSON format) should be stored. + # Currently, only [Cloud Storage](https://cloud.google.com/storage/) + # URIs are supported. These must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + # more information, see [Request + # URIs](https://cloud.google.com/storage/docs/request-endpoints). + # @param location_id [::String] + # Optional. Cloud region where annotation should take place. Supported cloud + # regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no + # region is specified, the region will be determined based on video file + # 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/video_intelligence/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest.new + # + # # Call the annotate_video method. + # result = client.annotate_video request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def annotate_video request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.annotate_video.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::VideoIntelligence::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.annotate_video.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.annotate_video.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_intelligence_service_stub.annotate_video request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 VideoIntelligenceService REST API. + # + # This class represents the configuration for VideoIntelligenceService 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::VideoIntelligence::V1::VideoIntelligenceService::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 + # # annotate_video to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.annotate_video.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.annotate_video.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 = "videointelligence.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 VideoIntelligenceService 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 `annotate_video` + # @return [::Gapic::Config::Method] + # + attr_reader :annotate_video + + # @private + def initialize parent_rpcs = nil + annotate_video_config = parent_rpcs.annotate_video if parent_rpcs.respond_to? :annotate_video + @annotate_video = ::Gapic::Config::Method.new annotate_video_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest/operations.rb new file mode 100644 index 000000000000..9b39f97ac2df --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest/operations.rb @@ -0,0 +1,946 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 VideoIntelligence + module V1 + module VideoIntelligenceService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the VideoIntelligenceService 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 VideoIntelligenceService 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::VideoIntelligence::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "videointelligence.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] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/operations/{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] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/operations/{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] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/operations/{name}:cancel", + 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-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest/service_stub.rb new file mode 100644 index 000000000000..b9e70ec29668 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest/service_stub.rb @@ -0,0 +1,141 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/videointelligence/v1/video_intelligence_pb" + +module Google + module Cloud + module VideoIntelligence + module V1 + module VideoIntelligenceService + module Rest + ## + # REST service stub for the VideoIntelligenceService 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 annotate_video REST call + # + # @param request_pb [::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def annotate_video request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_annotate_video_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "annotate_video", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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 annotate_video REST call + # + # @param request_pb [::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_annotate_video_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/videos:annotate", + body: "*", + matches: [] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/videointelligence/v1/video_intelligence_pb.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/videointelligence/v1/video_intelligence_pb.rb new file mode 100644 index 000000000000..08d7103b5122 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/videointelligence/v1/video_intelligence_pb.rb @@ -0,0 +1,74 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/videointelligence/v1/video_intelligence.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n:google/cloud/videointelligence/v1/video_intelligence.proto\x12!google.cloud.videointelligence.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xfe\x01\n\x14\x41nnotateVideoRequest\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\x15\n\rinput_content\x18\x06 \x01(\x0c\x12\x41\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0e\x32*.google.cloud.videointelligence.v1.FeatureB\x03\xe0\x41\x02\x12\x46\n\rvideo_context\x18\x03 \x01(\x0b\x32/.google.cloud.videointelligence.v1.VideoContext\x12\x17\n\noutput_uri\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0blocation_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xc1\x06\n\x0cVideoContext\x12\x41\n\x08segments\x18\x01 \x03(\x0b\x32/.google.cloud.videointelligence.v1.VideoSegment\x12W\n\x16label_detection_config\x18\x02 \x01(\x0b\x32\x37.google.cloud.videointelligence.v1.LabelDetectionConfig\x12\x62\n\x1cshot_change_detection_config\x18\x03 \x01(\x0b\x32<.google.cloud.videointelligence.v1.ShotChangeDetectionConfig\x12l\n!explicit_content_detection_config\x18\x04 \x01(\x0b\x32\x41.google.cloud.videointelligence.v1.ExplicitContentDetectionConfig\x12U\n\x15\x66\x61\x63\x65_detection_config\x18\x05 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1.FaceDetectionConfig\x12\x61\n\x1bspeech_transcription_config\x18\x06 \x01(\x0b\x32<.google.cloud.videointelligence.v1.SpeechTranscriptionConfig\x12U\n\x15text_detection_config\x18\x08 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1.TextDetectionConfig\x12Y\n\x17person_detection_config\x18\x0b \x01(\x0b\x32\x38.google.cloud.videointelligence.v1.PersonDetectionConfig\x12W\n\x16object_tracking_config\x18\r \x01(\x0b\x32\x37.google.cloud.videointelligence.v1.ObjectTrackingConfig\"\xdd\x01\n\x14LabelDetectionConfig\x12S\n\x14label_detection_mode\x18\x01 \x01(\x0e\x32\x35.google.cloud.videointelligence.v1.LabelDetectionMode\x12\x19\n\x11stationary_camera\x18\x02 \x01(\x08\x12\r\n\x05model\x18\x03 \x01(\t\x12\"\n\x1a\x66rame_confidence_threshold\x18\x04 \x01(\x02\x12\"\n\x1avideo_confidence_threshold\x18\x05 \x01(\x02\"*\n\x19ShotChangeDetectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\"%\n\x14ObjectTrackingConfig\x12\r\n\x05model\x18\x01 \x01(\t\"`\n\x13\x46\x61\x63\x65\x44\x65tectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\x12\x1e\n\x16include_bounding_boxes\x18\x02 \x01(\x08\x12\x1a\n\x12include_attributes\x18\x05 \x01(\x08\"s\n\x15PersonDetectionConfig\x12\x1e\n\x16include_bounding_boxes\x18\x01 \x01(\x08\x12\x1e\n\x16include_pose_landmarks\x18\x02 \x01(\x08\x12\x1a\n\x12include_attributes\x18\x03 \x01(\x08\"/\n\x1e\x45xplicitContentDetectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\"<\n\x13TextDetectionConfig\x12\x16\n\x0elanguage_hints\x18\x01 \x03(\t\x12\r\n\x05model\x18\x02 \x01(\t\"x\n\x0cVideoSegment\x12\x34\n\x11start_time_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0f\x65nd_time_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"d\n\x0cLabelSegment\x12@\n\x07segment\x18\x01 \x01(\x0b\x32/.google.cloud.videointelligence.v1.VideoSegment\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"P\n\nLabelFrame\x12.\n\x0btime_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"G\n\x06\x45ntity\x12\x11\n\tentity_id\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x15\n\rlanguage_code\x18\x03 \x01(\t\"\xa5\x02\n\x0fLabelAnnotation\x12\x39\n\x06\x65ntity\x18\x01 \x01(\x0b\x32).google.cloud.videointelligence.v1.Entity\x12\x44\n\x11\x63\x61tegory_entities\x18\x02 \x03(\x0b\x32).google.cloud.videointelligence.v1.Entity\x12\x41\n\x08segments\x18\x03 \x03(\x0b\x32/.google.cloud.videointelligence.v1.LabelSegment\x12=\n\x06\x66rames\x18\x04 \x03(\x0b\x32-.google.cloud.videointelligence.v1.LabelFrame\x12\x0f\n\x07version\x18\x05 \x01(\t\"\x95\x01\n\x14\x45xplicitContentFrame\x12.\n\x0btime_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12M\n\x16pornography_likelihood\x18\x02 \x01(\x0e\x32-.google.cloud.videointelligence.v1.Likelihood\"u\n\x19\x45xplicitContentAnnotation\x12G\n\x06\x66rames\x18\x01 \x03(\x0b\x32\x37.google.cloud.videointelligence.v1.ExplicitContentFrame\x12\x0f\n\x07version\x18\x02 \x01(\t\"Q\n\x15NormalizedBoundingBox\x12\x0c\n\x04left\x18\x01 \x01(\x02\x12\x0b\n\x03top\x18\x02 \x01(\x02\x12\r\n\x05right\x18\x03 \x01(\x02\x12\x0e\n\x06\x62ottom\x18\x04 \x01(\x02\"w\n\x17\x46\x61\x63\x65\x44\x65tectionAnnotation\x12\x38\n\x06tracks\x18\x03 \x03(\x0b\x32(.google.cloud.videointelligence.v1.Track\x12\x11\n\tthumbnail\x18\x04 \x01(\x0c\x12\x0f\n\x07version\x18\x05 \x01(\t\"f\n\x19PersonDetectionAnnotation\x12\x38\n\x06tracks\x18\x01 \x03(\x0b\x32(.google.cloud.videointelligence.v1.Track\x12\x0f\n\x07version\x18\x02 \x01(\t\"O\n\x0b\x46\x61\x63\x65Segment\x12@\n\x07segment\x18\x01 \x01(\x0b\x32/.google.cloud.videointelligence.v1.VideoSegment\"\x9c\x01\n\tFaceFrame\x12[\n\x19normalized_bounding_boxes\x18\x01 \x03(\x0b\x32\x38.google.cloud.videointelligence.v1.NormalizedBoundingBox\x12.\n\x0btime_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration:\x02\x18\x01\"\xa7\x01\n\x0e\x46\x61\x63\x65\x41nnotation\x12\x11\n\tthumbnail\x18\x01 \x01(\x0c\x12@\n\x08segments\x18\x02 \x03(\x0b\x32..google.cloud.videointelligence.v1.FaceSegment\x12<\n\x06\x66rames\x18\x03 \x03(\x0b\x32,.google.cloud.videointelligence.v1.FaceFrame:\x02\x18\x01\"\xba\x02\n\x11TimestampedObject\x12Y\n\x17normalized_bounding_box\x18\x01 \x01(\x0b\x32\x38.google.cloud.videointelligence.v1.NormalizedBoundingBox\x12.\n\x0btime_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12M\n\nattributes\x18\x03 \x03(\x0b\x32\x34.google.cloud.videointelligence.v1.DetectedAttributeB\x03\xe0\x41\x01\x12K\n\tlandmarks\x18\x04 \x03(\x0b\x32\x33.google.cloud.videointelligence.v1.DetectedLandmarkB\x03\xe0\x41\x01\"\x84\x02\n\x05Track\x12@\n\x07segment\x18\x01 \x01(\x0b\x32/.google.cloud.videointelligence.v1.VideoSegment\x12Q\n\x13timestamped_objects\x18\x02 \x03(\x0b\x32\x34.google.cloud.videointelligence.v1.TimestampedObject\x12M\n\nattributes\x18\x03 \x03(\x0b\x32\x34.google.cloud.videointelligence.v1.DetectedAttributeB\x03\xe0\x41\x01\x12\x17\n\nconfidence\x18\x04 \x01(\x02\x42\x03\xe0\x41\x01\"D\n\x11\x44\x65tectedAttribute\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12\r\n\x05value\x18\x03 \x01(\t\"x\n\x10\x44\x65tectedLandmark\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x42\n\x05point\x18\x02 \x01(\x0b\x32\x33.google.cloud.videointelligence.v1.NormalizedVertex\x12\x12\n\nconfidence\x18\x03 \x01(\x02\"\xe9\n\n\x16VideoAnnotationResults\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12@\n\x07segment\x18\n \x01(\x0b\x32/.google.cloud.videointelligence.v1.VideoSegment\x12U\n\x19segment_label_annotations\x18\x02 \x03(\x0b\x32\x32.google.cloud.videointelligence.v1.LabelAnnotation\x12^\n\"segment_presence_label_annotations\x18\x17 \x03(\x0b\x32\x32.google.cloud.videointelligence.v1.LabelAnnotation\x12R\n\x16shot_label_annotations\x18\x03 \x03(\x0b\x32\x32.google.cloud.videointelligence.v1.LabelAnnotation\x12[\n\x1fshot_presence_label_annotations\x18\x18 \x03(\x0b\x32\x32.google.cloud.videointelligence.v1.LabelAnnotation\x12S\n\x17\x66rame_label_annotations\x18\x04 \x03(\x0b\x32\x32.google.cloud.videointelligence.v1.LabelAnnotation\x12O\n\x10\x66\x61\x63\x65_annotations\x18\x05 \x03(\x0b\x32\x31.google.cloud.videointelligence.v1.FaceAnnotationB\x02\x18\x01\x12^\n\x1a\x66\x61\x63\x65_detection_annotations\x18\r \x03(\x0b\x32:.google.cloud.videointelligence.v1.FaceDetectionAnnotation\x12I\n\x10shot_annotations\x18\x06 \x03(\x0b\x32/.google.cloud.videointelligence.v1.VideoSegment\x12Y\n\x13\x65xplicit_annotation\x18\x07 \x01(\x0b\x32<.google.cloud.videointelligence.v1.ExplicitContentAnnotation\x12U\n\x15speech_transcriptions\x18\x0b \x03(\x0b\x32\x36.google.cloud.videointelligence.v1.SpeechTranscription\x12K\n\x10text_annotations\x18\x0c \x03(\x0b\x32\x31.google.cloud.videointelligence.v1.TextAnnotation\x12W\n\x12object_annotations\x18\x0e \x03(\x0b\x32;.google.cloud.videointelligence.v1.ObjectTrackingAnnotation\x12\x62\n\x1clogo_recognition_annotations\x18\x13 \x03(\x0b\x32<.google.cloud.videointelligence.v1.LogoRecognitionAnnotation\x12\x62\n\x1cperson_detection_annotations\x18\x14 \x03(\x0b\x32<.google.cloud.videointelligence.v1.PersonDetectionAnnotation\x12!\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.Status\"n\n\x15\x41nnotateVideoResponse\x12U\n\x12\x61nnotation_results\x18\x01 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1.VideoAnnotationResults\"\xa6\x02\n\x17VideoAnnotationProgress\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\x18\n\x10progress_percent\x18\x02 \x01(\x05\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12;\n\x07\x66\x65\x61ture\x18\x05 \x01(\x0e\x32*.google.cloud.videointelligence.v1.Feature\x12@\n\x07segment\x18\x06 \x01(\x0b\x32/.google.cloud.videointelligence.v1.VideoSegment\"p\n\x15\x41nnotateVideoProgress\x12W\n\x13\x61nnotation_progress\x18\x01 \x03(\x0b\x32:.google.cloud.videointelligence.v1.VideoAnnotationProgress\"\x81\x03\n\x19SpeechTranscriptionConfig\x12\x1a\n\rlanguage_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10max_alternatives\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1d\n\x10\x66ilter_profanity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12N\n\x0fspeech_contexts\x18\x04 \x03(\x0b\x32\x30.google.cloud.videointelligence.v1.SpeechContextB\x03\xe0\x41\x01\x12)\n\x1c\x65nable_automatic_punctuation\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x19\n\x0c\x61udio_tracks\x18\x06 \x03(\x05\x42\x03\xe0\x41\x01\x12\'\n\x1a\x65nable_speaker_diarization\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12&\n\x19\x64iarization_speaker_count\x18\x08 \x01(\x05\x42\x03\xe0\x41\x01\x12#\n\x16\x65nable_word_confidence\x18\t \x01(\x08\x42\x03\xe0\x41\x01\"%\n\rSpeechContext\x12\x14\n\x07phrases\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x88\x01\n\x13SpeechTranscription\x12U\n\x0c\x61lternatives\x18\x01 \x03(\x0b\x32?.google.cloud.videointelligence.v1.SpeechRecognitionAlternative\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\x8c\x01\n\x1cSpeechRecognitionAlternative\x12\x12\n\ntranscript\x18\x01 \x01(\t\x12\x17\n\nconfidence\x18\x02 \x01(\x02\x42\x03\xe0\x41\x03\x12?\n\x05words\x18\x03 \x03(\x0b\x32+.google.cloud.videointelligence.v1.WordInfoB\x03\xe0\x41\x03\"\xa7\x01\n\x08WordInfo\x12-\n\nstart_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12+\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0c\n\x04word\x18\x03 \x01(\t\x12\x17\n\nconfidence\x18\x04 \x01(\x02\x42\x03\xe0\x41\x03\x12\x18\n\x0bspeaker_tag\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\"(\n\x10NormalizedVertex\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\"_\n\x16NormalizedBoundingPoly\x12\x45\n\x08vertices\x18\x01 \x03(\x0b\x32\x33.google.cloud.videointelligence.v1.NormalizedVertex\"\xa1\x01\n\x0bTextSegment\x12@\n\x07segment\x18\x01 \x01(\x0b\x32/.google.cloud.videointelligence.v1.VideoSegment\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12<\n\x06\x66rames\x18\x03 \x03(\x0b\x32,.google.cloud.videointelligence.v1.TextFrame\"\x94\x01\n\tTextFrame\x12W\n\x14rotated_bounding_box\x18\x01 \x01(\x0b\x32\x39.google.cloud.videointelligence.v1.NormalizedBoundingPoly\x12.\n\x0btime_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"q\n\x0eTextAnnotation\x12\x0c\n\x04text\x18\x01 \x01(\t\x12@\n\x08segments\x18\x02 \x03(\x0b\x32..google.cloud.videointelligence.v1.TextSegment\x12\x0f\n\x07version\x18\x03 \x01(\t\"\xa0\x01\n\x13ObjectTrackingFrame\x12Y\n\x17normalized_bounding_box\x18\x01 \x01(\x0b\x32\x38.google.cloud.videointelligence.v1.NormalizedBoundingBox\x12.\n\x0btime_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xa8\x02\n\x18ObjectTrackingAnnotation\x12\x42\n\x07segment\x18\x03 \x01(\x0b\x32/.google.cloud.videointelligence.v1.VideoSegmentH\x00\x12\x12\n\x08track_id\x18\x05 \x01(\x03H\x00\x12\x39\n\x06\x65ntity\x18\x01 \x01(\x0b\x32).google.cloud.videointelligence.v1.Entity\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x12\x46\n\x06\x66rames\x18\x02 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1.ObjectTrackingFrame\x12\x0f\n\x07version\x18\x06 \x01(\tB\x0c\n\ntrack_info\"\xd3\x01\n\x19LogoRecognitionAnnotation\x12\x39\n\x06\x65ntity\x18\x01 \x01(\x0b\x32).google.cloud.videointelligence.v1.Entity\x12\x38\n\x06tracks\x18\x02 \x03(\x0b\x32(.google.cloud.videointelligence.v1.Track\x12\x41\n\x08segments\x18\x03 \x03(\x0b\x32/.google.cloud.videointelligence.v1.VideoSegment*\xf5\x01\n\x07\x46\x65\x61ture\x12\x17\n\x13\x46\x45\x41TURE_UNSPECIFIED\x10\x00\x12\x13\n\x0fLABEL_DETECTION\x10\x01\x12\x19\n\x15SHOT_CHANGE_DETECTION\x10\x02\x12\x1e\n\x1a\x45XPLICIT_CONTENT_DETECTION\x10\x03\x12\x12\n\x0e\x46\x41\x43\x45_DETECTION\x10\x04\x12\x18\n\x14SPEECH_TRANSCRIPTION\x10\x06\x12\x12\n\x0eTEXT_DETECTION\x10\x07\x12\x13\n\x0fOBJECT_TRACKING\x10\t\x12\x14\n\x10LOGO_RECOGNITION\x10\x0c\x12\x14\n\x10PERSON_DETECTION\x10\x0e*r\n\x12LabelDetectionMode\x12$\n LABEL_DETECTION_MODE_UNSPECIFIED\x10\x00\x12\r\n\tSHOT_MODE\x10\x01\x12\x0e\n\nFRAME_MODE\x10\x02\x12\x17\n\x13SHOT_AND_FRAME_MODE\x10\x03*t\n\nLikelihood\x12\x1a\n\x16LIKELIHOOD_UNSPECIFIED\x10\x00\x12\x11\n\rVERY_UNLIKELY\x10\x01\x12\x0c\n\x08UNLIKELY\x10\x02\x12\x0c\n\x08POSSIBLE\x10\x03\x12\n\n\x06LIKELY\x10\x04\x12\x0f\n\x0bVERY_LIKELY\x10\x05\x32\xc0\x02\n\x18VideoIntelligenceService\x12\xcd\x01\n\rAnnotateVideo\x12\x37.google.cloud.videointelligence.v1.AnnotateVideoRequest\x1a\x1d.google.longrunning.Operation\"d\xca\x41.\n\x15\x41nnotateVideoResponse\x12\x15\x41nnotateVideoProgress\xda\x41\x12input_uri,features\x82\xd3\xe4\x93\x02\x18\"\x13/v1/videos:annotate:\x01*\x1aT\xca\x41 videointelligence.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x8c\x02\n%com.google.cloud.videointelligence.v1B\x1dVideoIntelligenceServiceProtoP\x01ZScloud.google.com/go/videointelligence/apiv1/videointelligencepb;videointelligencepb\xaa\x02!Google.Cloud.VideoIntelligence.V1\xca\x02!Google\\Cloud\\VideoIntelligence\\V1\xea\x02$Google::Cloud::VideoIntelligence::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module VideoIntelligence + module V1 + AnnotateVideoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.AnnotateVideoRequest").msgclass + VideoContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.VideoContext").msgclass + LabelDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.LabelDetectionConfig").msgclass + ShotChangeDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.ShotChangeDetectionConfig").msgclass + ObjectTrackingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.ObjectTrackingConfig").msgclass + FaceDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.FaceDetectionConfig").msgclass + PersonDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.PersonDetectionConfig").msgclass + ExplicitContentDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.ExplicitContentDetectionConfig").msgclass + TextDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.TextDetectionConfig").msgclass + VideoSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.VideoSegment").msgclass + LabelSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.LabelSegment").msgclass + LabelFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.LabelFrame").msgclass + Entity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.Entity").msgclass + LabelAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.LabelAnnotation").msgclass + ExplicitContentFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.ExplicitContentFrame").msgclass + ExplicitContentAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.ExplicitContentAnnotation").msgclass + NormalizedBoundingBox = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.NormalizedBoundingBox").msgclass + FaceDetectionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.FaceDetectionAnnotation").msgclass + PersonDetectionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.PersonDetectionAnnotation").msgclass + FaceSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.FaceSegment").msgclass + FaceFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.FaceFrame").msgclass + FaceAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.FaceAnnotation").msgclass + TimestampedObject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.TimestampedObject").msgclass + Track = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.Track").msgclass + DetectedAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.DetectedAttribute").msgclass + DetectedLandmark = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.DetectedLandmark").msgclass + VideoAnnotationResults = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.VideoAnnotationResults").msgclass + AnnotateVideoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.AnnotateVideoResponse").msgclass + VideoAnnotationProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.VideoAnnotationProgress").msgclass + AnnotateVideoProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.AnnotateVideoProgress").msgclass + SpeechTranscriptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.SpeechTranscriptionConfig").msgclass + SpeechContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.SpeechContext").msgclass + SpeechTranscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.SpeechTranscription").msgclass + SpeechRecognitionAlternative = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.SpeechRecognitionAlternative").msgclass + WordInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.WordInfo").msgclass + NormalizedVertex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.NormalizedVertex").msgclass + NormalizedBoundingPoly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.NormalizedBoundingPoly").msgclass + TextSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.TextSegment").msgclass + TextFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.TextFrame").msgclass + TextAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.TextAnnotation").msgclass + ObjectTrackingFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.ObjectTrackingFrame").msgclass + ObjectTrackingAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.ObjectTrackingAnnotation").msgclass + LogoRecognitionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.LogoRecognitionAnnotation").msgclass + Feature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.Feature").enummodule + LabelDetectionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.LabelDetectionMode").enummodule + Likelihood = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.Likelihood").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/videointelligence/v1/video_intelligence_services_pb.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/videointelligence/v1/video_intelligence_services_pb.rb new file mode 100644 index 000000000000..0627d01c95d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/videointelligence/v1/video_intelligence_services_pb.rb @@ -0,0 +1,48 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/videointelligence/v1/video_intelligence.proto for package 'Google.Cloud.VideoIntelligence.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/videointelligence/v1/video_intelligence_pb' + +module Google + module Cloud + module VideoIntelligence + module V1 + module VideoIntelligenceService + # Service that implements the Video Intelligence API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.videointelligence.v1.VideoIntelligenceService' + + # Performs asynchronous video annotation. Progress and results can be + # retrieved through the `google.longrunning.Operations` interface. + # `Operation.metadata` contains `AnnotateVideoProgress` (progress). + # `Operation.response` contains `AnnotateVideoResponse` (results). + rpc :AnnotateVideo, ::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/README.md new file mode 100644 index 000000000000..1067402de074 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Video Intelligence 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-video_intelligence-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # 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. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + # + # Example: + # + # 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 + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # 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 + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # 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 + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1/proto_docs/google/cloud/videointelligence/v1/video_intelligence.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/cloud/videointelligence/v1/video_intelligence.rb new file mode 100644 index 000000000000..ef693ed03d79 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/cloud/videointelligence/v1/video_intelligence.rb @@ -0,0 +1,998 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module VideoIntelligence + module V1 + # Video annotation request. + # @!attribute [rw] input_uri + # @return [::String] + # Input video location. Currently, only + # [Cloud Storage](https://cloud.google.com/storage/) URIs are + # supported. URIs must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + # more information, see [Request + # URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify + # multiple videos, a video URI may include wildcards in the `object-id`. + # Supported wildcards: '*' to match 0 or more characters; + # '?' to match 1 character. If unset, the input video should be embedded + # in the request as `input_content`. If set, `input_content` must be unset. + # @!attribute [rw] input_content + # @return [::String] + # The video data bytes. + # If unset, the input video(s) should be specified via the `input_uri`. + # If set, `input_uri` must be unset. + # @!attribute [rw] features + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::Feature>] + # Required. Requested video annotation features. + # @!attribute [rw] video_context + # @return [::Google::Cloud::VideoIntelligence::V1::VideoContext] + # Additional video context and/or feature-specific parameters. + # @!attribute [rw] output_uri + # @return [::String] + # Optional. Location where the output (in JSON format) should be stored. + # Currently, only [Cloud Storage](https://cloud.google.com/storage/) + # URIs are supported. These must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + # more information, see [Request + # URIs](https://cloud.google.com/storage/docs/request-endpoints). + # @!attribute [rw] location_id + # @return [::String] + # Optional. Cloud region where annotation should take place. Supported cloud + # regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no + # region is specified, the region will be determined based on video file + # location. + class AnnotateVideoRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video context and/or feature-specific parameters. + # @!attribute [rw] segments + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::VideoSegment>] + # Video segments to annotate. The segments may overlap and are not required + # to be contiguous or span the whole video. If unspecified, each video is + # treated as a single segment. + # @!attribute [rw] label_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1::LabelDetectionConfig] + # Config for LABEL_DETECTION. + # @!attribute [rw] shot_change_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1::ShotChangeDetectionConfig] + # Config for SHOT_CHANGE_DETECTION. + # @!attribute [rw] explicit_content_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1::ExplicitContentDetectionConfig] + # Config for EXPLICIT_CONTENT_DETECTION. + # @!attribute [rw] face_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1::FaceDetectionConfig] + # Config for FACE_DETECTION. + # @!attribute [rw] speech_transcription_config + # @return [::Google::Cloud::VideoIntelligence::V1::SpeechTranscriptionConfig] + # Config for SPEECH_TRANSCRIPTION. + # @!attribute [rw] text_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1::TextDetectionConfig] + # Config for TEXT_DETECTION. + # @!attribute [rw] person_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1::PersonDetectionConfig] + # Config for PERSON_DETECTION. + # @!attribute [rw] object_tracking_config + # @return [::Google::Cloud::VideoIntelligence::V1::ObjectTrackingConfig] + # Config for OBJECT_TRACKING. + class VideoContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for LABEL_DETECTION. + # @!attribute [rw] label_detection_mode + # @return [::Google::Cloud::VideoIntelligence::V1::LabelDetectionMode] + # What labels should be detected with LABEL_DETECTION, in addition to + # video-level labels or segment-level labels. + # If unspecified, defaults to `SHOT_MODE`. + # @!attribute [rw] stationary_camera + # @return [::Boolean] + # Whether the video has been shot from a stationary (i.e., non-moving) + # camera. When set to true, might improve detection accuracy for moving + # objects. Should be used with `SHOT_AND_FRAME_MODE` enabled. + # @!attribute [rw] model + # @return [::String] + # Model to use for label detection. + # Supported values: "builtin/stable" (the default if unset) and + # "builtin/latest". + # @!attribute [rw] frame_confidence_threshold + # @return [::Float] + # The confidence threshold we perform filtering on the labels from + # frame-level detection. If not set, it is set to 0.4 by default. The valid + # range for this threshold is [0.1, 0.9]. Any value set outside of this + # range will be clipped. + # Note: For best results, follow the default threshold. We will update + # the default threshold everytime when we release a new model. + # @!attribute [rw] video_confidence_threshold + # @return [::Float] + # The confidence threshold we perform filtering on the labels from + # video-level and shot-level detections. If not set, it's set to 0.3 by + # default. The valid range for this threshold is [0.1, 0.9]. Any value set + # outside of this range will be clipped. + # Note: For best results, follow the default threshold. We will update + # the default threshold everytime when we release a new model. + class LabelDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for SHOT_CHANGE_DETECTION. + # @!attribute [rw] model + # @return [::String] + # Model to use for shot change detection. + # Supported values: "builtin/stable" (the default if unset) and + # "builtin/latest". + class ShotChangeDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for OBJECT_TRACKING. + # @!attribute [rw] model + # @return [::String] + # Model to use for object tracking. + # Supported values: "builtin/stable" (the default if unset) and + # "builtin/latest". + class ObjectTrackingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for FACE_DETECTION. + # @!attribute [rw] model + # @return [::String] + # Model to use for face detection. + # Supported values: "builtin/stable" (the default if unset) and + # "builtin/latest". + # @!attribute [rw] include_bounding_boxes + # @return [::Boolean] + # Whether bounding boxes are included in the face annotation output. + # @!attribute [rw] include_attributes + # @return [::Boolean] + # Whether to enable face attributes detection, such as glasses, dark_glasses, + # mouth_open etc. Ignored if 'include_bounding_boxes' is set to false. + class FaceDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for PERSON_DETECTION. + # @!attribute [rw] include_bounding_boxes + # @return [::Boolean] + # Whether bounding boxes are included in the person detection annotation + # output. + # @!attribute [rw] include_pose_landmarks + # @return [::Boolean] + # Whether to enable pose landmarks detection. Ignored if + # 'include_bounding_boxes' is set to false. + # @!attribute [rw] include_attributes + # @return [::Boolean] + # Whether to enable person attributes detection, such as cloth color (black, + # blue, etc), type (coat, dress, etc), pattern (plain, floral, etc), hair, + # etc. + # Ignored if 'include_bounding_boxes' is set to false. + class PersonDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for EXPLICIT_CONTENT_DETECTION. + # @!attribute [rw] model + # @return [::String] + # Model to use for explicit content detection. + # Supported values: "builtin/stable" (the default if unset) and + # "builtin/latest". + class ExplicitContentDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for TEXT_DETECTION. + # @!attribute [rw] language_hints + # @return [::Array<::String>] + # Language hint can be specified if the language to be detected is known a + # priori. It can increase the accuracy of the detection. Language hint must + # be language code in BCP-47 format. + # + # Automatic language detection is performed if no hint is provided. + # @!attribute [rw] model + # @return [::String] + # Model to use for text detection. + # Supported values: "builtin/stable" (the default if unset) and + # "builtin/latest". + class TextDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video segment. + # @!attribute [rw] start_time_offset + # @return [::Google::Protobuf::Duration] + # Time-offset, relative to the beginning of the video, + # corresponding to the start of the segment (inclusive). + # @!attribute [rw] end_time_offset + # @return [::Google::Protobuf::Duration] + # Time-offset, relative to the beginning of the video, + # corresponding to the end of the segment (inclusive). + class VideoSegment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video segment level annotation results for label detection. + # @!attribute [rw] segment + # @return [::Google::Cloud::VideoIntelligence::V1::VideoSegment] + # Video segment where a label was detected. + # @!attribute [rw] confidence + # @return [::Float] + # Confidence that the label is accurate. Range: [0, 1]. + class LabelSegment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video frame level annotation results for label detection. + # @!attribute [rw] time_offset + # @return [::Google::Protobuf::Duration] + # Time-offset, relative to the beginning of the video, corresponding to the + # video frame for this location. + # @!attribute [rw] confidence + # @return [::Float] + # Confidence that the label is accurate. Range: [0, 1]. + class LabelFrame + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Detected entity from video analysis. + # @!attribute [rw] entity_id + # @return [::String] + # Opaque entity ID. Some IDs may be available in + # [Google Knowledge Graph Search + # API](https://developers.google.com/knowledge-graph/). + # @!attribute [rw] description + # @return [::String] + # Textual description, e.g., `Fixed-gear bicycle`. + # @!attribute [rw] language_code + # @return [::String] + # Language code for `description` in BCP-47 format. + class Entity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Label annotation. + # @!attribute [rw] entity + # @return [::Google::Cloud::VideoIntelligence::V1::Entity] + # Detected entity. + # @!attribute [rw] category_entities + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::Entity>] + # Common categories for the detected entity. + # For example, when the label is `Terrier`, the category is likely `dog`. And + # in some cases there might be more than one categories e.g., `Terrier` could + # also be a `pet`. + # @!attribute [rw] segments + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::LabelSegment>] + # All video segments where a label was detected. + # @!attribute [rw] frames + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::LabelFrame>] + # All video frames where a label was detected. + # @!attribute [rw] version + # @return [::String] + # Feature version. + class LabelAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video frame level annotation results for explicit content. + # @!attribute [rw] time_offset + # @return [::Google::Protobuf::Duration] + # Time-offset, relative to the beginning of the video, corresponding to the + # video frame for this location. + # @!attribute [rw] pornography_likelihood + # @return [::Google::Cloud::VideoIntelligence::V1::Likelihood] + # Likelihood of the pornography content.. + class ExplicitContentFrame + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Explicit content annotation (based on per-frame visual signals only). + # If no explicit content has been detected in a frame, no annotations are + # present for that frame. + # @!attribute [rw] frames + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::ExplicitContentFrame>] + # All video frames where explicit content was detected. + # @!attribute [rw] version + # @return [::String] + # Feature version. + class ExplicitContentAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Normalized bounding box. + # The normalized vertex coordinates are relative to the original image. + # Range: [0, 1]. + # @!attribute [rw] left + # @return [::Float] + # Left X coordinate. + # @!attribute [rw] top + # @return [::Float] + # Top Y coordinate. + # @!attribute [rw] right + # @return [::Float] + # Right X coordinate. + # @!attribute [rw] bottom + # @return [::Float] + # Bottom Y coordinate. + class NormalizedBoundingBox + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Face detection annotation. + # @!attribute [rw] tracks + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::Track>] + # The face tracks with attributes. + # @!attribute [rw] thumbnail + # @return [::String] + # The thumbnail of a person's face. + # @!attribute [rw] version + # @return [::String] + # Feature version. + class FaceDetectionAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Person detection annotation per video. + # @!attribute [rw] tracks + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::Track>] + # The detected tracks of a person. + # @!attribute [rw] version + # @return [::String] + # Feature version. + class PersonDetectionAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video segment level annotation results for face detection. + # @!attribute [rw] segment + # @return [::Google::Cloud::VideoIntelligence::V1::VideoSegment] + # Video segment where a face was detected. + class FaceSegment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Deprecated. No effect. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] normalized_bounding_boxes + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::NormalizedBoundingBox>] + # Normalized Bounding boxes in a frame. + # There can be more than one boxes if the same face is detected in multiple + # locations within the current frame. + # @!attribute [rw] time_offset + # @return [::Google::Protobuf::Duration] + # Time-offset, relative to the beginning of the video, + # corresponding to the video frame for this location. + class FaceFrame + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Deprecated. No effect. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] thumbnail + # @return [::String] + # Thumbnail of a representative face view (in JPEG format). + # @!attribute [rw] segments + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::FaceSegment>] + # All video segments where a face was detected. + # @!attribute [rw] frames + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::FaceFrame>] + # All video frames where a face was detected. + class FaceAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # For tracking related features. + # An object at time_offset with attributes, and located with + # normalized_bounding_box. + # @!attribute [rw] normalized_bounding_box + # @return [::Google::Cloud::VideoIntelligence::V1::NormalizedBoundingBox] + # Normalized Bounding box in a frame, where the object is located. + # @!attribute [rw] time_offset + # @return [::Google::Protobuf::Duration] + # Time-offset, relative to the beginning of the video, + # corresponding to the video frame for this object. + # @!attribute [rw] attributes + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::DetectedAttribute>] + # Optional. The attributes of the object in the bounding box. + # @!attribute [rw] landmarks + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::DetectedLandmark>] + # Optional. The detected landmarks. + class TimestampedObject + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A track of an object instance. + # @!attribute [rw] segment + # @return [::Google::Cloud::VideoIntelligence::V1::VideoSegment] + # Video segment of a track. + # @!attribute [rw] timestamped_objects + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::TimestampedObject>] + # The object with timestamp and attributes per frame in the track. + # @!attribute [rw] attributes + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::DetectedAttribute>] + # Optional. Attributes in the track level. + # @!attribute [rw] confidence + # @return [::Float] + # Optional. The confidence score of the tracked object. + class Track + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A generic detected attribute represented by name in string format. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute, for example, glasses, dark_glasses, mouth_open. + # A full list of supported type names will be provided in the document. + # @!attribute [rw] confidence + # @return [::Float] + # Detected attribute confidence. Range [0, 1]. + # @!attribute [rw] value + # @return [::String] + # Text value of the detection result. For example, the value for "HairColor" + # can be "black", "blonde", etc. + class DetectedAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A generic detected landmark represented by name in string format and a 2D + # location. + # @!attribute [rw] name + # @return [::String] + # The name of this landmark, for example, left_hand, right_shoulder. + # @!attribute [rw] point + # @return [::Google::Cloud::VideoIntelligence::V1::NormalizedVertex] + # The 2D point of the detected landmark using the normalized image + # coordindate system. The normalized coordinates have the range from 0 to 1. + # @!attribute [rw] confidence + # @return [::Float] + # The confidence score of the detected landmark. Range [0, 1]. + class DetectedLandmark + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Annotation results for a single video. + # @!attribute [rw] input_uri + # @return [::String] + # Video file location in + # [Cloud Storage](https://cloud.google.com/storage/). + # @!attribute [rw] segment + # @return [::Google::Cloud::VideoIntelligence::V1::VideoSegment] + # Video segment on which the annotation is run. + # @!attribute [rw] segment_label_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::LabelAnnotation>] + # Topical label annotations on video level or user-specified segment level. + # There is exactly one element for each unique label. + # @!attribute [rw] segment_presence_label_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::LabelAnnotation>] + # Presence label annotations on video level or user-specified segment level. + # There is exactly one element for each unique label. Compared to the + # existing topical `segment_label_annotations`, this field presents more + # fine-grained, segment-level labels detected in video content and is made + # available only when the client sets `LabelDetectionConfig.model` to + # "builtin/latest" in the request. + # @!attribute [rw] shot_label_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::LabelAnnotation>] + # Topical label annotations on shot level. + # There is exactly one element for each unique label. + # @!attribute [rw] shot_presence_label_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::LabelAnnotation>] + # Presence label annotations on shot level. There is exactly one element for + # each unique label. Compared to the existing topical + # `shot_label_annotations`, this field presents more fine-grained, shot-level + # labels detected in video content and is made available only when the client + # sets `LabelDetectionConfig.model` to "builtin/latest" in the request. + # @!attribute [rw] frame_label_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::LabelAnnotation>] + # Label annotations on frame level. + # There is exactly one element for each unique label. + # @!attribute [rw] face_annotations + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::FaceAnnotation>] + # Deprecated. Please use `face_detection_annotations` instead. + # @!attribute [rw] face_detection_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::FaceDetectionAnnotation>] + # Face detection annotations. + # @!attribute [rw] shot_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::VideoSegment>] + # Shot annotations. Each shot is represented as a video segment. + # @!attribute [rw] explicit_annotation + # @return [::Google::Cloud::VideoIntelligence::V1::ExplicitContentAnnotation] + # Explicit content annotation. + # @!attribute [rw] speech_transcriptions + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::SpeechTranscription>] + # Speech transcription. + # @!attribute [rw] text_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::TextAnnotation>] + # OCR text detection and tracking. + # Annotations for list of detected text snippets. Each will have list of + # frame information associated with it. + # @!attribute [rw] object_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::ObjectTrackingAnnotation>] + # Annotations for list of objects detected and tracked in video. + # @!attribute [rw] logo_recognition_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::LogoRecognitionAnnotation>] + # Annotations for list of logos detected, tracked and recognized in video. + # @!attribute [rw] person_detection_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::PersonDetectionAnnotation>] + # Person detection annotations. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # If set, indicates an error. Note that for a single `AnnotateVideoRequest` + # some videos may succeed and some may fail. + class VideoAnnotationResults + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video annotation response. Included in the `response` + # field of the `Operation` returned by the `GetOperation` + # call of the `google::longrunning::Operations` service. + # @!attribute [rw] annotation_results + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::VideoAnnotationResults>] + # Annotation results for all videos specified in `AnnotateVideoRequest`. + class AnnotateVideoResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Annotation progress for a single video. + # @!attribute [rw] input_uri + # @return [::String] + # Video file location in + # [Cloud Storage](https://cloud.google.com/storage/). + # @!attribute [rw] progress_percent + # @return [::Integer] + # Approximate percentage processed thus far. Guaranteed to be + # 100 when fully processed. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Time when the request was received. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Time of the most recent update. + # @!attribute [rw] feature + # @return [::Google::Cloud::VideoIntelligence::V1::Feature] + # Specifies which feature is being tracked if the request contains more than + # one feature. + # @!attribute [rw] segment + # @return [::Google::Cloud::VideoIntelligence::V1::VideoSegment] + # Specifies which segment is being tracked if the request contains more than + # one segment. + class VideoAnnotationProgress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video annotation progress. Included in the `metadata` + # field of the `Operation` returned by the `GetOperation` + # call of the `google::longrunning::Operations` service. + # @!attribute [rw] annotation_progress + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::VideoAnnotationProgress>] + # Progress metadata for all videos specified in `AnnotateVideoRequest`. + class AnnotateVideoProgress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for SPEECH_TRANSCRIPTION. + # @!attribute [rw] language_code + # @return [::String] + # Required. *Required* The language of the supplied audio as a + # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + # Example: "en-US". + # See [Language Support](https://cloud.google.com/speech/docs/languages) + # for a list of the currently supported language codes. + # @!attribute [rw] max_alternatives + # @return [::Integer] + # Optional. Maximum number of recognition hypotheses to be returned. + # Specifically, the maximum number of `SpeechRecognitionAlternative` messages + # within each `SpeechTranscription`. The server may return fewer than + # `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will + # return a maximum of one. If omitted, will return a maximum of one. + # @!attribute [rw] filter_profanity + # @return [::Boolean] + # Optional. If set to `true`, the server will attempt to filter out + # profanities, replacing all but the initial character in each filtered word + # with asterisks, e.g. "f***". If set to `false` or omitted, profanities + # won't be filtered out. + # @!attribute [rw] speech_contexts + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::SpeechContext>] + # Optional. A means to provide context to assist the speech recognition. + # @!attribute [rw] enable_automatic_punctuation + # @return [::Boolean] + # Optional. If 'true', adds punctuation to recognition result hypotheses. + # This feature is only available in select languages. Setting this for + # requests in other languages has no effect at all. The default 'false' value + # does not add punctuation to result hypotheses. NOTE: "This is currently + # offered as an experimental service, complimentary to all users. In the + # future this may be exclusively available as a premium feature." + # @!attribute [rw] audio_tracks + # @return [::Array<::Integer>] + # Optional. For file formats, such as MXF or MKV, supporting multiple audio + # tracks, specify up to two tracks. Default: track 0. + # @!attribute [rw] enable_speaker_diarization + # @return [::Boolean] + # Optional. If 'true', enables speaker detection for each recognized word in + # the top alternative of the recognition result using a speaker_tag provided + # in the WordInfo. + # Note: When this is true, we send all the words from the beginning of the + # audio for the top alternative in every consecutive response. + # This is done in order to improve our speaker tags as our models learn to + # identify the speakers in the conversation over time. + # @!attribute [rw] diarization_speaker_count + # @return [::Integer] + # Optional. If set, specifies the estimated number of speakers in the + # conversation. If not set, defaults to '2'. Ignored unless + # enable_speaker_diarization is set to true. + # @!attribute [rw] enable_word_confidence + # @return [::Boolean] + # Optional. If `true`, the top result includes a list of words and the + # confidence for those words. If `false`, no word-level confidence + # information is returned. The default is `false`. + class SpeechTranscriptionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides "hints" to the speech recognizer to favor specific words and phrases + # in the results. + # @!attribute [rw] phrases + # @return [::Array<::String>] + # Optional. A list of strings containing words and phrases "hints" so that + # the speech recognition is more likely to recognize them. This can be used + # to improve the accuracy for specific words and phrases, for example, if + # specific commands are typically spoken by the user. This can also be used + # to add additional words to the vocabulary of the recognizer. See + # [usage limits](https://cloud.google.com/speech/limits#content). + class SpeechContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A speech recognition result corresponding to a portion of the audio. + # @!attribute [rw] alternatives + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::SpeechRecognitionAlternative>] + # May contain one or more recognition hypotheses (up to the maximum specified + # in `max_alternatives`). These alternatives are ordered in terms of + # accuracy, with the top (first) alternative being the most probable, as + # ranked by the recognizer. + # @!attribute [r] language_code + # @return [::String] + # Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + # language tag of the language in this result. This language code was + # detected to have the most likelihood of being spoken in the audio. + class SpeechTranscription + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Alternative hypotheses (a.k.a. n-best list). + # @!attribute [rw] transcript + # @return [::String] + # Transcript text representing the words that the user spoke. + # @!attribute [r] confidence + # @return [::Float] + # Output only. The confidence estimate between 0.0 and 1.0. A higher number + # indicates an estimated greater likelihood that the recognized words are + # correct. This field is set only for the top alternative. + # This field is not guaranteed to be accurate and users should not rely on it + # to be always provided. + # The default of 0.0 is a sentinel value indicating `confidence` was not set. + # @!attribute [r] words + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::WordInfo>] + # Output only. A list of word-specific information for each recognized word. + # Note: When `enable_speaker_diarization` is set to true, you will see all + # the words from the beginning of the audio. + class SpeechRecognitionAlternative + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Word-specific information for recognized words. Word information is only + # included in the response when certain request parameters are set, such + # as `enable_word_time_offsets`. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Duration] + # Time offset relative to the beginning of the audio, and + # corresponding to the start of the spoken word. This field is only set if + # `enable_word_time_offsets=true` and only in the top hypothesis. This is an + # experimental feature and the accuracy of the time offset can vary. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Duration] + # Time offset relative to the beginning of the audio, and + # corresponding to the end of the spoken word. This field is only set if + # `enable_word_time_offsets=true` and only in the top hypothesis. This is an + # experimental feature and the accuracy of the time offset can vary. + # @!attribute [rw] word + # @return [::String] + # The word corresponding to this set of information. + # @!attribute [r] confidence + # @return [::Float] + # Output only. The confidence estimate between 0.0 and 1.0. A higher number + # indicates an estimated greater likelihood that the recognized words are + # correct. This field is set only for the top alternative. + # This field is not guaranteed to be accurate and users should not rely on it + # to be always provided. + # The default of 0.0 is a sentinel value indicating `confidence` was not set. + # @!attribute [r] speaker_tag + # @return [::Integer] + # Output only. A distinct integer value is assigned for every speaker within + # the audio. This field specifies which one of those speakers was detected to + # have spoken this word. Value ranges from 1 up to diarization_speaker_count, + # and is only set if speaker diarization is enabled. + class WordInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A vertex represents a 2D point in the image. + # NOTE: the normalized vertex coordinates are relative to the original image + # and range from 0 to 1. + # @!attribute [rw] x + # @return [::Float] + # X coordinate. + # @!attribute [rw] y + # @return [::Float] + # Y coordinate. + class NormalizedVertex + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Normalized bounding polygon for text (that might not be aligned with axis). + # Contains list of the corner points in clockwise order starting from + # top-left corner. For example, for a rectangular bounding box: + # When the text is horizontal it might look like: + # 0----1 + # | | + # 3----2 + # + # When it's clockwise rotated 180 degrees around the top-left corner it + # becomes: + # 2----3 + # | | + # 1----0 + # + # and the vertex order will still be (0, 1, 2, 3). Note that values can be less + # than 0, or greater than 1 due to trignometric calculations for location of + # the box. + # @!attribute [rw] vertices + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::NormalizedVertex>] + # Normalized vertices of the bounding polygon. + class NormalizedBoundingPoly + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video segment level annotation results for text detection. + # @!attribute [rw] segment + # @return [::Google::Cloud::VideoIntelligence::V1::VideoSegment] + # Video segment where a text snippet was detected. + # @!attribute [rw] confidence + # @return [::Float] + # Confidence for the track of detected text. It is calculated as the highest + # over all frames where OCR detected text appears. + # @!attribute [rw] frames + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::TextFrame>] + # Information related to the frames where OCR detected text appears. + class TextSegment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video frame level annotation results for text annotation (OCR). + # Contains information regarding timestamp and bounding box locations for the + # frames containing detected OCR text snippets. + # @!attribute [rw] rotated_bounding_box + # @return [::Google::Cloud::VideoIntelligence::V1::NormalizedBoundingPoly] + # Bounding polygon of the detected text for this frame. + # @!attribute [rw] time_offset + # @return [::Google::Protobuf::Duration] + # Timestamp of this frame. + class TextFrame + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Annotations related to one detected OCR text snippet. This will contain the + # corresponding text, confidence value, and frame level information for each + # detection. + # @!attribute [rw] text + # @return [::String] + # The detected text. + # @!attribute [rw] segments + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::TextSegment>] + # All video segments where OCR detected text appears. + # @!attribute [rw] version + # @return [::String] + # Feature version. + class TextAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video frame level annotations for object detection and tracking. This field + # stores per frame location, time offset, and confidence. + # @!attribute [rw] normalized_bounding_box + # @return [::Google::Cloud::VideoIntelligence::V1::NormalizedBoundingBox] + # The normalized bounding box location of this object track for the frame. + # @!attribute [rw] time_offset + # @return [::Google::Protobuf::Duration] + # The timestamp of the frame in microseconds. + class ObjectTrackingFrame + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Annotations corresponding to one tracked object. + # @!attribute [rw] segment + # @return [::Google::Cloud::VideoIntelligence::V1::VideoSegment] + # Non-streaming batch mode ONLY. + # Each object track corresponds to one video segment where it appears. + # + # Note: The following fields are mutually exclusive: `segment`, `track_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] track_id + # @return [::Integer] + # Streaming mode ONLY. + # In streaming mode, we do not know the end time of a tracked object + # before it is completed. Hence, there is no VideoSegment info returned. + # Instead, we provide a unique identifiable integer track_id so that + # the customers can correlate the results of the ongoing + # ObjectTrackAnnotation of the same track_id over time. + # + # Note: The following fields are mutually exclusive: `track_id`, `segment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] entity + # @return [::Google::Cloud::VideoIntelligence::V1::Entity] + # Entity to specify the object category that this track is labeled as. + # @!attribute [rw] confidence + # @return [::Float] + # Object category's labeling confidence of this track. + # @!attribute [rw] frames + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::ObjectTrackingFrame>] + # Information corresponding to all frames where this object track appears. + # Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame + # messages in frames. + # Streaming mode: it can only be one ObjectTrackingFrame message in frames. + # @!attribute [rw] version + # @return [::String] + # Feature version. + class ObjectTrackingAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Annotation corresponding to one detected, tracked and recognized logo class. + # @!attribute [rw] entity + # @return [::Google::Cloud::VideoIntelligence::V1::Entity] + # Entity category information to specify the logo class that all the logo + # tracks within this LogoRecognitionAnnotation are recognized as. + # @!attribute [rw] tracks + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::Track>] + # All logo tracks where the recognized logo appears. Each track corresponds + # to one logo instance appearing in consecutive frames. + # @!attribute [rw] segments + # @return [::Array<::Google::Cloud::VideoIntelligence::V1::VideoSegment>] + # All video segments where the recognized logo appears. There might be + # multiple instances of the same logo class appearing in one VideoSegment. + class LogoRecognitionAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video annotation feature. + module Feature + # Unspecified. + FEATURE_UNSPECIFIED = 0 + + # Label detection. Detect objects, such as dog or flower. + LABEL_DETECTION = 1 + + # Shot change detection. + SHOT_CHANGE_DETECTION = 2 + + # Explicit content detection. + EXPLICIT_CONTENT_DETECTION = 3 + + # Human face detection. + FACE_DETECTION = 4 + + # Speech transcription. + SPEECH_TRANSCRIPTION = 6 + + # OCR text detection and tracking. + TEXT_DETECTION = 7 + + # Object detection and tracking. + OBJECT_TRACKING = 9 + + # Logo detection, tracking, and recognition. + LOGO_RECOGNITION = 12 + + # Person detection. + PERSON_DETECTION = 14 + end + + # Label detection mode. + module LabelDetectionMode + # Unspecified. + LABEL_DETECTION_MODE_UNSPECIFIED = 0 + + # Detect shot-level labels. + SHOT_MODE = 1 + + # Detect frame-level labels. + FRAME_MODE = 2 + + # Detect both shot-level and frame-level labels. + SHOT_AND_FRAME_MODE = 3 + end + + # Bucketized representation of likelihood. + module Likelihood + # Unspecified likelihood. + LIKELIHOOD_UNSPECIFIED = 0 + + # Very unlikely. + VERY_UNLIKELY = 1 + + # Unlikely. + UNLIKELY = 2 + + # Possible. + POSSIBLE = 3 + + # Likely. + LIKELY = 4 + + # Very likely. + VERY_LIKELY = 5 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-video_intelligence-v1/snippets/Gemfile new file mode 100644 index 000000000000..d8b6f1a66fae --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1", path: "../" +else + gem "google-cloud-video_intelligence-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-video_intelligence-v1/snippets/snippet_metadata_google.cloud.videointelligence.v1.json b/owl-bot-staging/google-cloud-video_intelligence-v1/snippets/snippet_metadata_google.cloud.videointelligence.v1.json new file mode 100644 index 000000000000..2d46b33efc64 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/snippets/snippet_metadata_google.cloud.videointelligence.v1.json @@ -0,0 +1,55 @@ +{ + "client_library": { + "name": "google-cloud-video_intelligence-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.videointelligence.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "videointelligence_v1_generated_VideoIntelligenceService_AnnotateVideo_sync", + "title": "Snippet for the annotate_video call in the VideoIntelligenceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client#annotate_video.", + "file": "video_intelligence_service/annotate_video.rb", + "language": "RUBY", + "client_method": { + "short_name": "annotate_video", + "full_name": "::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client#annotate_video", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "VideoIntelligenceService::Client", + "full_name": "::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client" + }, + "method": { + "short_name": "AnnotateVideo", + "full_name": "google.cloud.videointelligence.v1.VideoIntelligenceService.AnnotateVideo", + "service": { + "short_name": "VideoIntelligenceService", + "full_name": "google.cloud.videointelligence.v1.VideoIntelligenceService" + } + } + }, + "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-video_intelligence-v1/snippets/video_intelligence_service/annotate_video.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/snippets/video_intelligence_service/annotate_video.rb new file mode 100644 index 000000000000..e8e3ca4809e6 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/snippets/video_intelligence_service/annotate_video.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 videointelligence_v1_generated_VideoIntelligenceService_AnnotateVideo_sync] +require "google/cloud/video_intelligence/v1" + +## +# Snippet for the annotate_video call in the VideoIntelligenceService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client#annotate_video. +# +def annotate_video + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest.new + + # Call the annotate_video method. + result = client.annotate_video request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END videointelligence_v1_generated_VideoIntelligenceService_AnnotateVideo_sync] diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/test/google/cloud/video_intelligence/v1/video_intelligence_service_operations_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/test/google/cloud/video_intelligence/v1/video_intelligence_service_operations_test.rb new file mode 100644 index 000000000000..d7c0fe61046d --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/test/google/cloud/video_intelligence/v1/video_intelligence_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/videointelligence/v1/video_intelligence_pb" +require "google/cloud/videointelligence/v1/video_intelligence_services_pb" +require "google/cloud/video_intelligence/v1/video_intelligence_service" + +class ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::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::VideoIntelligence::V1::VideoIntelligenceService::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::VideoIntelligence::V1::VideoIntelligenceService::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::VideoIntelligence::V1::VideoIntelligenceService::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::VideoIntelligence::V1::VideoIntelligenceService::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::VideoIntelligence::V1::VideoIntelligenceService::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::VideoIntelligence::V1::VideoIntelligenceService::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::VideoIntelligence::V1::VideoIntelligenceService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/test/google/cloud/video_intelligence/v1/video_intelligence_service_rest_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/test/google/cloud/video_intelligence/v1/video_intelligence_service_rest_test.rb new file mode 100644 index 000000000000..694a3cfb8e36 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/test/google/cloud/video_intelligence/v1/video_intelligence_service_rest_test.rb @@ -0,0 +1,158 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/videointelligence/v1/video_intelligence_pb" +require "google/cloud/video_intelligence/v1/video_intelligence_service/rest" + + +class ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::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_annotate_video + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + input_uri = "hello world" + input_content = "hello world" + features = [:FEATURE_UNSPECIFIED] + video_context = {} + output_uri = "hello world" + location_id = "hello world" + + annotate_video_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::ServiceStub.stub :transcode_annotate_video_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, annotate_video_client_stub do + # Create client + client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.annotate_video input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.annotate_video ::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.annotate_video(::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, annotate_video_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::VideoIntelligence::V1::VideoIntelligenceService::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::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/test/google/cloud/video_intelligence/v1/video_intelligence_service_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/test/google/cloud/video_intelligence/v1/video_intelligence_service_test.rb new file mode 100644 index 000000000000..9a7512281622 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/test/google/cloud/video_intelligence/v1/video_intelligence_service_test.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! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/videointelligence/v1/video_intelligence_pb" +require "google/cloud/video_intelligence/v1/video_intelligence_service" + +class ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::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_annotate_video + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + input_uri = "hello world" + input_content = "hello world" + features = [:FEATURE_UNSPECIFIED] + video_context = {} + output_uri = "hello world" + location_id = "hello world" + + annotate_video_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :annotate_video, name + assert_kind_of ::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest, request + assert_equal "hello world", request["input_uri"] + assert_equal "hello world", request["input_content"] + assert_equal [:FEATURE_UNSPECIFIED], request["features"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::VideoIntelligence::V1::VideoContext), request["video_context"] + assert_equal "hello world", request["output_uri"] + assert_equal "hello world", request["location_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, annotate_video_client_stub do + # Create client + client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video ::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video(::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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, annotate_video_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::VideoIntelligence::V1::VideoIntelligenceService::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::VideoIntelligence::V1::VideoIntelligenceService::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::VideoIntelligence::V1::VideoIntelligenceService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::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::VideoIntelligence::V1::VideoIntelligenceService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/test/helper.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.gitignore b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.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-video_intelligence-v1beta2/.repo-metadata.json b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.repo-metadata.json new file mode 100644 index 000000000000..4004255462b0 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "videointelligence.googleapis.com", + "api_shortname": "videointelligence", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-video_intelligence-v1beta2/latest", + "distribution_name": "google-cloud-video_intelligence-v1beta2", + "is_cloud": true, + "language": "ruby", + "name": "videointelligence", + "name_pretty": "Cloud Video Intelligence V1beta2 API", + "product_documentation": "https://cloud.google.com/video-intelligence", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API. Note that google-cloud-video_intelligence-v1beta2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video_intelligence instead. See the readme for more details.", + "ruby-cloud-env-prefix": "VIDEO_INTELLIGENCE", + "ruby-cloud-product-url": "https://cloud.google.com/video-intelligence", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.rubocop.yml b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.rubocop.yml new file mode 100644 index 000000000000..6a40a2f1ed20 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-video_intelligence-v1beta2.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-video_intelligence-v1beta2.rb" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.toys.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.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-video_intelligence-v1beta2/.yardopts b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.yardopts new file mode 100644 index 000000000000..d0ca4b201896 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Video Intelligence V1beta2 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-video_intelligence-v1beta2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/AUTHENTICATION.md new file mode 100644 index 000000000000..4e6e68e28cee --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-video_intelligence-v1beta2 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-video_intelligence-v1beta2 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/video_intelligence/v1beta2" + +client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/video_intelligence/v1beta2" + +::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::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-video_intelligence-v1beta2 +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/video_intelligence/v1beta2" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::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-video_intelligence-v1beta2/CHANGELOG.md b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/Gemfile b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/LICENSE.md b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/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-video_intelligence-v1beta2/README.md b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/README.md new file mode 100644 index 000000000000..1c0a33caf125 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the Cloud Video Intelligence V1beta2 API + +Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming 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 Cloud Video Intelligence V1beta2 API. Most users should consider using +the main client gem, +[google-cloud-video_intelligence](https://rubygems.org/gems/google-cloud-video_intelligence). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-video_intelligence-v1beta2 +``` + +## 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/videointelligence.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/video_intelligence/v1beta2" + +client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new +request = ::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest.new # (request fields as keyword arguments...) +response = client.annotate_video request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-video_intelligence-v1beta2/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/video-intelligence) +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/video_intelligence/v1beta2" +require "logger" + +client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::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-video_intelligence`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-video_intelligence-v1beta2`. +_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-video_intelligence`. +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-video_intelligence-v1beta2`. + +### 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-video_intelligence-v1beta2/Rakefile b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/Rakefile new file mode 100644 index 000000000000..bfbc82c01ab0 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/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-video_intelligence-v1beta2 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["VIDEO_INTELLIGENCE_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["VIDEO_INTELLIGENCE_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["VIDEO_INTELLIGENCE_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 VIDEO_INTELLIGENCE_TEST_PROJECT=test123 VIDEO_INTELLIGENCE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/credentials" + ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["VIDEO_INTELLIGENCE_PROJECT"] = project + ENV["VIDEO_INTELLIGENCE_TEST_PROJECT"] = project + ENV["VIDEO_INTELLIGENCE_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-video_intelligence-v1beta2 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-video_intelligence-v1beta2 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-video_intelligence-v1beta2 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-video_intelligence-v1beta2 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-video_intelligence-v1beta2" + header "google-cloud-video_intelligence-v1beta2 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-video_intelligence-v1beta2 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-video_intelligence-v1beta2 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-video_intelligence-v1beta2 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-video_intelligence-v1beta2 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-video_intelligence-v1beta2/gapic_metadata.json b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/gapic_metadata.json new file mode 100644 index 000000000000..f83ec6e5ee0e --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/gapic_metadata.json @@ -0,0 +1,23 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.videointelligence.v1beta2", + "libraryPackage": "::Google::Cloud::VideoIntelligence::V1beta2", + "services": { + "VideoIntelligenceService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client", + "rpcs": { + "AnnotateVideo": { + "methods": [ + "annotate_video" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/google-cloud-video_intelligence-v1beta2.gemspec b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/google-cloud-video_intelligence-v1beta2.gemspec new file mode 100644 index 000000000000..39aa5d048236 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/google-cloud-video_intelligence-v1beta2.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/video_intelligence/v1beta2/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-video_intelligence-v1beta2" + gem.version = Google::Cloud::VideoIntelligence::V1beta2::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API. Note that google-cloud-video_intelligence-v1beta2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video_intelligence instead. See the readme for more details." + gem.summary = "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming 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.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google-cloud-video_intelligence-v1beta2.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google-cloud-video_intelligence-v1beta2.rb new file mode 100644 index 000000000000..0362a2f88ccc --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google-cloud-video_intelligence-v1beta2.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/video_intelligence/v1beta2" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2.rb new file mode 100644 index 000000000000..32ede984a16b --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2.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/video_intelligence/v1beta2/video_intelligence_service" +require "google/cloud/video_intelligence/v1beta2/version" + +module Google + module Cloud + module VideoIntelligence + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/video_intelligence/v1beta2" + # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/video_intelligence/v1beta2" + # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Client.new + # + module V1beta2 + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta2", "_helpers.rb" +require "google/cloud/video_intelligence/v1beta2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/rest.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/rest.rb new file mode 100644 index 000000000000..846afc6e1e0a --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/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/video_intelligence/v1beta2/video_intelligence_service/rest" +require "google/cloud/video_intelligence/v1beta2/version" + +module Google + module Cloud + module VideoIntelligence + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/video_intelligence/v1beta2/rest" + # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Client.new + # + module V1beta2 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/version.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/version.rb new file mode 100644 index 000000000000..b0069d8a14eb --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/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 VideoIntelligence + module V1beta2 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service.rb new file mode 100644 index 000000000000..313d03dfd30c --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service.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/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/video_intelligence/v1beta2/version" + +require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/credentials" +require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/operations" +require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/client" +require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest" + +module Google + module Cloud + module VideoIntelligence + module V1beta2 + ## + # Service that implements Google Cloud Video Intelligence API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/video_intelligence/v1beta2/video_intelligence_service" + # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest" + # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Client.new + # + module VideoIntelligenceService + end + end + end + end +end + +helper_path = ::File.join __dir__, "video_intelligence_service", "helpers.rb" +require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/client.rb new file mode 100644 index 000000000000..1068f7ec41df --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/client.rb @@ -0,0 +1,525 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/videointelligence/v1beta2/video_intelligence_pb" + +module Google + module Cloud + module VideoIntelligence + module V1beta2 + module VideoIntelligenceService + ## + # Client for the VideoIntelligenceService service. + # + # Service that implements Google Cloud Video Intelligence API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :video_intelligence_service_stub + + ## + # Configure the VideoIntelligenceService Client class. + # + # See {::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all VideoIntelligenceService clients + # ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::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", "VideoIntelligence", "V1beta2"] + 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.annotate_video.timeout = 600.0 + default_config.rpcs.annotate_video.retry_policy = { + initial_delay: 1.0, max_delay: 120.0, multiplier: 2.5, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the VideoIntelligenceService 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::VideoIntelligence::V1beta2::VideoIntelligenceService::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 + @video_intelligence_service_stub.universe_domain + end + + ## + # Create a new VideoIntelligenceService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the VideoIntelligenceService 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/videointelligence/v1beta2/video_intelligence_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 + + @video_intelligence_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::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 + ) + + @video_intelligence_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 + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @video_intelligence_service_stub.logger + end + + # Service calls + + ## + # Performs asynchronous video annotation. Progress and results can be + # retrieved through the `google.longrunning.Operations` interface. + # `Operation.metadata` contains `AnnotateVideoProgress` (progress). + # `Operation.response` contains `AnnotateVideoResponse` (results). + # + # @overload annotate_video(request, options = nil) + # Pass arguments to `annotate_video` via a request object, either of type + # {::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload annotate_video(input_uri: nil, input_content: nil, features: nil, video_context: nil, output_uri: nil, location_id: nil) + # Pass arguments to `annotate_video` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param input_uri [::String] + # Input video location. Currently, only + # [Google Cloud Storage](https://cloud.google.com/storage/) URIs are + # supported, which must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + # more information, see [Request + # URIs](https://cloud.google.com/storage/docs/request-endpoints). A video URI + # may include wildcards in `object-id`, and thus identify multiple videos. + # Supported wildcards: '*' to match 0 or more characters; + # '?' to match 1 character. If unset, the input video should be embedded + # in the request as `input_content`. If set, `input_content` should be unset. + # @param input_content [::String] + # The video data bytes. + # If unset, the input video(s) should be specified via `input_uri`. + # If set, `input_uri` should be unset. + # @param features [::Array<::Google::Cloud::VideoIntelligence::V1beta2::Feature>] + # Required. Requested video annotation features. + # @param video_context [::Google::Cloud::VideoIntelligence::V1beta2::VideoContext, ::Hash] + # Additional video context and/or feature-specific parameters. + # @param output_uri [::String] + # Optional. Location where the output (in JSON format) should be stored. + # Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) + # URIs are supported, which must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + # more information, see [Request + # URIs](https://cloud.google.com/storage/docs/request-endpoints). + # @param location_id [::String] + # Optional. Cloud region where annotation should take place. Supported cloud + # regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region + # is specified, a region will be determined based on video file 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/video_intelligence/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest.new + # + # # Call the annotate_video method. + # result = client.annotate_video request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def annotate_video request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.annotate_video.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::VideoIntelligence::V1beta2::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.annotate_video.timeout, + metadata: metadata, + retry_policy: @config.rpcs.annotate_video.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_intelligence_service_stub.call_rpc :annotate_video, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 VideoIntelligenceService API. + # + # This class represents the configuration for VideoIntelligenceService, + # 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::VideoIntelligence::V1beta2::VideoIntelligenceService::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 + # # annotate_video to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.annotate_video.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.annotate_video.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::VideoIntelligence::V1beta2::VideoIntelligenceService::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 = "videointelligence.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 VideoIntelligenceService 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 `annotate_video` + # @return [::Gapic::Config::Method] + # + attr_reader :annotate_video + + # @private + def initialize parent_rpcs = nil + annotate_video_config = parent_rpcs.annotate_video if parent_rpcs.respond_to? :annotate_video + @annotate_video = ::Gapic::Config::Method.new annotate_video_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/credentials.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/credentials.rb new file mode 100644 index 000000000000..68c0723523ce --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_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 VideoIntelligence + module V1beta2 + module VideoIntelligenceService + # Credentials for the VideoIntelligenceService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "VIDEO_INTELLIGENCE_CREDENTIALS", + "VIDEO_INTELLIGENCE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "VIDEO_INTELLIGENCE_CREDENTIALS_JSON", + "VIDEO_INTELLIGENCE_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-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/operations.rb new file mode 100644 index 000000000000..9341d71bf6e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_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 VideoIntelligence + module V1beta2 + module VideoIntelligenceService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the VideoIntelligenceService 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 VideoIntelligenceService 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::VideoIntelligence::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::VideoIntelligence::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::VideoIntelligence::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::VideoIntelligence::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::VideoIntelligence::V1beta2::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 = "videointelligence.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-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest.rb new file mode 100644 index 000000000000..c593a033e77f --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest.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 "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/video_intelligence/v1beta2/version" + +require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/credentials" +require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/operations" +require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/client" + +module Google + module Cloud + module VideoIntelligence + module V1beta2 + ## + # Service that implements Google Cloud Video Intelligence API. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest" + # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Client.new + # + module VideoIntelligenceService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/client.rb new file mode 100644 index 000000000000..c815dffe7c6e --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/client.rb @@ -0,0 +1,483 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/videointelligence/v1beta2/video_intelligence_pb" +require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/service_stub" + +module Google + module Cloud + module VideoIntelligence + module V1beta2 + module VideoIntelligenceService + module Rest + ## + # REST client for the VideoIntelligenceService service. + # + # Service that implements Google Cloud Video Intelligence API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :video_intelligence_service_stub + + ## + # Configure the VideoIntelligenceService Client class. + # + # See {::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all VideoIntelligenceService clients + # ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::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", "VideoIntelligence", "V1beta2"] + 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.annotate_video.timeout = 600.0 + default_config.rpcs.annotate_video.retry_policy = { + initial_delay: 1.0, max_delay: 120.0, multiplier: 2.5, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the VideoIntelligenceService 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::VideoIntelligence::V1beta2::VideoIntelligenceService::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 + @video_intelligence_service_stub.universe_domain + end + + ## + # Create a new VideoIntelligenceService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the VideoIntelligenceService 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::VideoIntelligence::V1beta2::VideoIntelligenceService::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 + + @video_intelligence_service_stub = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @video_intelligence_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 + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @video_intelligence_service_stub.logger + end + + # Service calls + + ## + # Performs asynchronous video annotation. Progress and results can be + # retrieved through the `google.longrunning.Operations` interface. + # `Operation.metadata` contains `AnnotateVideoProgress` (progress). + # `Operation.response` contains `AnnotateVideoResponse` (results). + # + # @overload annotate_video(request, options = nil) + # Pass arguments to `annotate_video` via a request object, either of type + # {::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload annotate_video(input_uri: nil, input_content: nil, features: nil, video_context: nil, output_uri: nil, location_id: nil) + # Pass arguments to `annotate_video` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param input_uri [::String] + # Input video location. Currently, only + # [Google Cloud Storage](https://cloud.google.com/storage/) URIs are + # supported, which must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + # more information, see [Request + # URIs](https://cloud.google.com/storage/docs/request-endpoints). A video URI + # may include wildcards in `object-id`, and thus identify multiple videos. + # Supported wildcards: '*' to match 0 or more characters; + # '?' to match 1 character. If unset, the input video should be embedded + # in the request as `input_content`. If set, `input_content` should be unset. + # @param input_content [::String] + # The video data bytes. + # If unset, the input video(s) should be specified via `input_uri`. + # If set, `input_uri` should be unset. + # @param features [::Array<::Google::Cloud::VideoIntelligence::V1beta2::Feature>] + # Required. Requested video annotation features. + # @param video_context [::Google::Cloud::VideoIntelligence::V1beta2::VideoContext, ::Hash] + # Additional video context and/or feature-specific parameters. + # @param output_uri [::String] + # Optional. Location where the output (in JSON format) should be stored. + # Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) + # URIs are supported, which must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + # more information, see [Request + # URIs](https://cloud.google.com/storage/docs/request-endpoints). + # @param location_id [::String] + # Optional. Cloud region where annotation should take place. Supported cloud + # regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region + # is specified, a region will be determined based on video file 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/video_intelligence/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest.new + # + # # Call the annotate_video method. + # result = client.annotate_video request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def annotate_video request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.annotate_video.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::VideoIntelligence::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.annotate_video.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.annotate_video.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_intelligence_service_stub.annotate_video request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 VideoIntelligenceService REST API. + # + # This class represents the configuration for VideoIntelligenceService 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::VideoIntelligence::V1beta2::VideoIntelligenceService::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 + # # annotate_video to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.annotate_video.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.annotate_video.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 = "videointelligence.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 VideoIntelligenceService 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 `annotate_video` + # @return [::Gapic::Config::Method] + # + attr_reader :annotate_video + + # @private + def initialize parent_rpcs = nil + annotate_video_config = parent_rpcs.annotate_video if parent_rpcs.respond_to? :annotate_video + @annotate_video = ::Gapic::Config::Method.new annotate_video_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/operations.rb new file mode 100644 index 000000000000..bb4303a54c2f --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/operations.rb @@ -0,0 +1,946 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 VideoIntelligence + module V1beta2 + module VideoIntelligenceService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the VideoIntelligenceService 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 VideoIntelligenceService 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::VideoIntelligence::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "videointelligence.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: "/v1beta2/{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: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/operations/{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: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta2/operations/{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: "/v1beta2/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta2/operations/{name}:cancel", + 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-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/service_stub.rb new file mode 100644 index 000000000000..e3dfedc1a5c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/service_stub.rb @@ -0,0 +1,141 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/videointelligence/v1beta2/video_intelligence_pb" + +module Google + module Cloud + module VideoIntelligence + module V1beta2 + module VideoIntelligenceService + module Rest + ## + # REST service stub for the VideoIntelligenceService 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 annotate_video REST call + # + # @param request_pb [::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def annotate_video request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_annotate_video_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "annotate_video", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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 annotate_video REST call + # + # @param request_pb [::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_annotate_video_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta2/videos:annotate", + body: "*", + matches: [] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/videointelligence/v1beta2/video_intelligence_pb.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/videointelligence/v1beta2/video_intelligence_pb.rb new file mode 100644 index 000000000000..a62a077b7c24 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/videointelligence/v1beta2/video_intelligence_pb.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/videointelligence/v1beta2/video_intelligence.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n?google/cloud/videointelligence/v1beta2/video_intelligence.proto\x12&google.cloud.videointelligence.v1beta2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x88\x02\n\x14\x41nnotateVideoRequest\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\x15\n\rinput_content\x18\x06 \x01(\x0c\x12\x46\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0e\x32/.google.cloud.videointelligence.v1beta2.FeatureB\x03\xe0\x41\x02\x12K\n\rvideo_context\x18\x03 \x01(\x0b\x32\x34.google.cloud.videointelligence.v1beta2.VideoContext\x12\x17\n\noutput_uri\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0blocation_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xec\x03\n\x0cVideoContext\x12\x46\n\x08segments\x18\x01 \x03(\x0b\x32\x34.google.cloud.videointelligence.v1beta2.VideoSegment\x12\\\n\x16label_detection_config\x18\x02 \x01(\x0b\x32<.google.cloud.videointelligence.v1beta2.LabelDetectionConfig\x12g\n\x1cshot_change_detection_config\x18\x03 \x01(\x0b\x32\x41.google.cloud.videointelligence.v1beta2.ShotChangeDetectionConfig\x12q\n!explicit_content_detection_config\x18\x04 \x01(\x0b\x32\x46.google.cloud.videointelligence.v1beta2.ExplicitContentDetectionConfig\x12Z\n\x15\x66\x61\x63\x65_detection_config\x18\x05 \x01(\x0b\x32;.google.cloud.videointelligence.v1beta2.FaceDetectionConfig\"\x9a\x01\n\x14LabelDetectionConfig\x12X\n\x14label_detection_mode\x18\x01 \x01(\x0e\x32:.google.cloud.videointelligence.v1beta2.LabelDetectionMode\x12\x19\n\x11stationary_camera\x18\x02 \x01(\x08\x12\r\n\x05model\x18\x03 \x01(\t\"*\n\x19ShotChangeDetectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\"/\n\x1e\x45xplicitContentDetectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\"D\n\x13\x46\x61\x63\x65\x44\x65tectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\x12\x1e\n\x16include_bounding_boxes\x18\x02 \x01(\x08\"x\n\x0cVideoSegment\x12\x34\n\x11start_time_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0f\x65nd_time_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"i\n\x0cLabelSegment\x12\x45\n\x07segment\x18\x01 \x01(\x0b\x32\x34.google.cloud.videointelligence.v1beta2.VideoSegment\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"P\n\nLabelFrame\x12.\n\x0btime_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"G\n\x06\x45ntity\x12\x11\n\tentity_id\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x15\n\rlanguage_code\x18\x03 \x01(\t\"\xa8\x02\n\x0fLabelAnnotation\x12>\n\x06\x65ntity\x18\x01 \x01(\x0b\x32..google.cloud.videointelligence.v1beta2.Entity\x12I\n\x11\x63\x61tegory_entities\x18\x02 \x03(\x0b\x32..google.cloud.videointelligence.v1beta2.Entity\x12\x46\n\x08segments\x18\x03 \x03(\x0b\x32\x34.google.cloud.videointelligence.v1beta2.LabelSegment\x12\x42\n\x06\x66rames\x18\x04 \x03(\x0b\x32\x32.google.cloud.videointelligence.v1beta2.LabelFrame\"\x9a\x01\n\x14\x45xplicitContentFrame\x12.\n\x0btime_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12R\n\x16pornography_likelihood\x18\x02 \x01(\x0e\x32\x32.google.cloud.videointelligence.v1beta2.Likelihood\"i\n\x19\x45xplicitContentAnnotation\x12L\n\x06\x66rames\x18\x01 \x03(\x0b\x32<.google.cloud.videointelligence.v1beta2.ExplicitContentFrame\"Q\n\x15NormalizedBoundingBox\x12\x0c\n\x04left\x18\x01 \x01(\x02\x12\x0b\n\x03top\x18\x02 \x01(\x02\x12\r\n\x05right\x18\x03 \x01(\x02\x12\x0e\n\x06\x62ottom\x18\x04 \x01(\x02\"T\n\x0b\x46\x61\x63\x65Segment\x12\x45\n\x07segment\x18\x01 \x01(\x0b\x32\x34.google.cloud.videointelligence.v1beta2.VideoSegment\"\x9d\x01\n\tFaceFrame\x12`\n\x19normalized_bounding_boxes\x18\x01 \x03(\x0b\x32=.google.cloud.videointelligence.v1beta2.NormalizedBoundingBox\x12.\n\x0btime_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xad\x01\n\x0e\x46\x61\x63\x65\x41nnotation\x12\x11\n\tthumbnail\x18\x01 \x01(\x0c\x12\x45\n\x08segments\x18\x02 \x03(\x0b\x32\x33.google.cloud.videointelligence.v1beta2.FaceSegment\x12\x41\n\x06\x66rames\x18\x03 \x03(\x0b\x32\x31.google.cloud.videointelligence.v1beta2.FaceFrame\"\xdf\x04\n\x16VideoAnnotationResults\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12Z\n\x19segment_label_annotations\x18\x02 \x03(\x0b\x32\x37.google.cloud.videointelligence.v1beta2.LabelAnnotation\x12W\n\x16shot_label_annotations\x18\x03 \x03(\x0b\x32\x37.google.cloud.videointelligence.v1beta2.LabelAnnotation\x12X\n\x17\x66rame_label_annotations\x18\x04 \x03(\x0b\x32\x37.google.cloud.videointelligence.v1beta2.LabelAnnotation\x12P\n\x10\x66\x61\x63\x65_annotations\x18\x05 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1beta2.FaceAnnotation\x12N\n\x10shot_annotations\x18\x06 \x03(\x0b\x32\x34.google.cloud.videointelligence.v1beta2.VideoSegment\x12^\n\x13\x65xplicit_annotation\x18\x07 \x01(\x0b\x32\x41.google.cloud.videointelligence.v1beta2.ExplicitContentAnnotation\x12!\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.Status\"s\n\x15\x41nnotateVideoResponse\x12Z\n\x12\x61nnotation_results\x18\x01 \x03(\x0b\x32>.google.cloud.videointelligence.v1beta2.VideoAnnotationResults\"\xa7\x01\n\x17VideoAnnotationProgress\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\x18\n\x10progress_percent\x18\x02 \x01(\x05\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"u\n\x15\x41nnotateVideoProgress\x12\\\n\x13\x61nnotation_progress\x18\x01 \x03(\x0b\x32?.google.cloud.videointelligence.v1beta2.VideoAnnotationProgress*\x86\x01\n\x07\x46\x65\x61ture\x12\x17\n\x13\x46\x45\x41TURE_UNSPECIFIED\x10\x00\x12\x13\n\x0fLABEL_DETECTION\x10\x01\x12\x19\n\x15SHOT_CHANGE_DETECTION\x10\x02\x12\x1e\n\x1a\x45XPLICIT_CONTENT_DETECTION\x10\x03\x12\x12\n\x0e\x46\x41\x43\x45_DETECTION\x10\x04*r\n\x12LabelDetectionMode\x12$\n LABEL_DETECTION_MODE_UNSPECIFIED\x10\x00\x12\r\n\tSHOT_MODE\x10\x01\x12\x0e\n\nFRAME_MODE\x10\x02\x12\x17\n\x13SHOT_AND_FRAME_MODE\x10\x03*t\n\nLikelihood\x12\x1a\n\x16LIKELIHOOD_UNSPECIFIED\x10\x00\x12\x11\n\rVERY_UNLIKELY\x10\x01\x12\x0c\n\x08UNLIKELY\x10\x02\x12\x0c\n\x08POSSIBLE\x10\x03\x12\n\n\x06LIKELY\x10\x04\x12\x0f\n\x0bVERY_LIKELY\x10\x05\x32\xca\x02\n\x18VideoIntelligenceService\x12\xd7\x01\n\rAnnotateVideo\x12<.google.cloud.videointelligence.v1beta2.AnnotateVideoRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41.\n\x15\x41nnotateVideoResponse\x12\x15\x41nnotateVideoProgress\xda\x41\x12input_uri,features\x82\xd3\xe4\x93\x02\x1d\"\x18/v1beta2/videos:annotate:\x01*\x1aT\xca\x41 videointelligence.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa5\x02\n*com.google.cloud.videointelligence.v1beta2B\x1dVideoIntelligenceServiceProtoP\x01ZXcloud.google.com/go/videointelligence/apiv1beta2/videointelligencepb;videointelligencepb\xaa\x02&Google.Cloud.VideoIntelligence.V1Beta2\xca\x02&Google\\Cloud\\VideoIntelligence\\V1beta2\xea\x02)Google::Cloud::VideoIntelligence::V1beta2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module VideoIntelligence + module V1beta2 + AnnotateVideoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.AnnotateVideoRequest").msgclass + VideoContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.VideoContext").msgclass + LabelDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.LabelDetectionConfig").msgclass + ShotChangeDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.ShotChangeDetectionConfig").msgclass + ExplicitContentDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.ExplicitContentDetectionConfig").msgclass + FaceDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.FaceDetectionConfig").msgclass + VideoSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.VideoSegment").msgclass + LabelSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.LabelSegment").msgclass + LabelFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.LabelFrame").msgclass + Entity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.Entity").msgclass + LabelAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.LabelAnnotation").msgclass + ExplicitContentFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.ExplicitContentFrame").msgclass + ExplicitContentAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.ExplicitContentAnnotation").msgclass + NormalizedBoundingBox = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.NormalizedBoundingBox").msgclass + FaceSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.FaceSegment").msgclass + FaceFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.FaceFrame").msgclass + FaceAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.FaceAnnotation").msgclass + VideoAnnotationResults = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.VideoAnnotationResults").msgclass + AnnotateVideoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.AnnotateVideoResponse").msgclass + VideoAnnotationProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.VideoAnnotationProgress").msgclass + AnnotateVideoProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.AnnotateVideoProgress").msgclass + Feature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.Feature").enummodule + LabelDetectionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.LabelDetectionMode").enummodule + Likelihood = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.Likelihood").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/videointelligence/v1beta2/video_intelligence_services_pb.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/videointelligence/v1beta2/video_intelligence_services_pb.rb new file mode 100644 index 000000000000..70241bfb714b --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/videointelligence/v1beta2/video_intelligence_services_pb.rb @@ -0,0 +1,49 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/videointelligence/v1beta2/video_intelligence.proto for package 'Google.Cloud.VideoIntelligence.V1beta2' +# 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/videointelligence/v1beta2/video_intelligence_pb' + +module Google + module Cloud + module VideoIntelligence + module V1beta2 + module VideoIntelligenceService + # Service that implements Google Cloud Video Intelligence API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.videointelligence.v1beta2.VideoIntelligenceService' + + # Performs asynchronous video annotation. Progress and results can be + # retrieved through the `google.longrunning.Operations` interface. + # `Operation.metadata` contains `AnnotateVideoProgress` (progress). + # `Operation.response` contains `AnnotateVideoResponse` (results). + rpc :AnnotateVideo, ::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/README.md b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/README.md new file mode 100644 index 000000000000..01348c5923d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Video Intelligence V1beta2 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-video_intelligence-v1beta2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # 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. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + # + # Example: + # + # 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 + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # 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 + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # 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 + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/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-video_intelligence-v1beta2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/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-video_intelligence-v1beta2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/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-video_intelligence-v1beta2/proto_docs/google/cloud/videointelligence/v1beta2/video_intelligence.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/cloud/videointelligence/v1beta2/video_intelligence.rb new file mode 100644 index 000000000000..b3db26f3a9e6 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/cloud/videointelligence/v1beta2/video_intelligence.rb @@ -0,0 +1,441 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module VideoIntelligence + module V1beta2 + # Video annotation request. + # @!attribute [rw] input_uri + # @return [::String] + # Input video location. Currently, only + # [Google Cloud Storage](https://cloud.google.com/storage/) URIs are + # supported, which must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + # more information, see [Request + # URIs](https://cloud.google.com/storage/docs/request-endpoints). A video URI + # may include wildcards in `object-id`, and thus identify multiple videos. + # Supported wildcards: '*' to match 0 or more characters; + # '?' to match 1 character. If unset, the input video should be embedded + # in the request as `input_content`. If set, `input_content` should be unset. + # @!attribute [rw] input_content + # @return [::String] + # The video data bytes. + # If unset, the input video(s) should be specified via `input_uri`. + # If set, `input_uri` should be unset. + # @!attribute [rw] features + # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::Feature>] + # Required. Requested video annotation features. + # @!attribute [rw] video_context + # @return [::Google::Cloud::VideoIntelligence::V1beta2::VideoContext] + # Additional video context and/or feature-specific parameters. + # @!attribute [rw] output_uri + # @return [::String] + # Optional. Location where the output (in JSON format) should be stored. + # Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) + # URIs are supported, which must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + # more information, see [Request + # URIs](https://cloud.google.com/storage/docs/request-endpoints). + # @!attribute [rw] location_id + # @return [::String] + # Optional. Cloud region where annotation should take place. Supported cloud + # regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region + # is specified, a region will be determined based on video file location. + class AnnotateVideoRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video context and/or feature-specific parameters. + # @!attribute [rw] segments + # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::VideoSegment>] + # Video segments to annotate. The segments may overlap and are not required + # to be contiguous or span the whole video. If unspecified, each video is + # treated as a single segment. + # @!attribute [rw] label_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1beta2::LabelDetectionConfig] + # Config for LABEL_DETECTION. + # @!attribute [rw] shot_change_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1beta2::ShotChangeDetectionConfig] + # Config for SHOT_CHANGE_DETECTION. + # @!attribute [rw] explicit_content_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1beta2::ExplicitContentDetectionConfig] + # Config for EXPLICIT_CONTENT_DETECTION. + # @!attribute [rw] face_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1beta2::FaceDetectionConfig] + # Config for FACE_DETECTION. + class VideoContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for LABEL_DETECTION. + # @!attribute [rw] label_detection_mode + # @return [::Google::Cloud::VideoIntelligence::V1beta2::LabelDetectionMode] + # What labels should be detected with LABEL_DETECTION, in addition to + # video-level labels or segment-level labels. + # If unspecified, defaults to `SHOT_MODE`. + # @!attribute [rw] stationary_camera + # @return [::Boolean] + # Whether the video has been shot from a stationary (i.e. non-moving) camera. + # When set to true, might improve detection accuracy for moving objects. + # Should be used with `SHOT_AND_FRAME_MODE` enabled. + # @!attribute [rw] model + # @return [::String] + # Model to use for label detection. + # Supported values: "builtin/stable" (the default if unset) and + # "builtin/latest". + class LabelDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for SHOT_CHANGE_DETECTION. + # @!attribute [rw] model + # @return [::String] + # Model to use for shot change detection. + # Supported values: "builtin/stable" (the default if unset) and + # "builtin/latest". + class ShotChangeDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for EXPLICIT_CONTENT_DETECTION. + # @!attribute [rw] model + # @return [::String] + # Model to use for explicit content detection. + # Supported values: "builtin/stable" (the default if unset) and + # "builtin/latest". + class ExplicitContentDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for FACE_DETECTION. + # @!attribute [rw] model + # @return [::String] + # Model to use for face detection. + # Supported values: "builtin/stable" (the default if unset) and + # "builtin/latest". + # @!attribute [rw] include_bounding_boxes + # @return [::Boolean] + # Whether bounding boxes be included in the face annotation output. + class FaceDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video segment. + # @!attribute [rw] start_time_offset + # @return [::Google::Protobuf::Duration] + # Time-offset, relative to the beginning of the video, + # corresponding to the start of the segment (inclusive). + # @!attribute [rw] end_time_offset + # @return [::Google::Protobuf::Duration] + # Time-offset, relative to the beginning of the video, + # corresponding to the end of the segment (inclusive). + class VideoSegment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video segment level annotation results for label detection. + # @!attribute [rw] segment + # @return [::Google::Cloud::VideoIntelligence::V1beta2::VideoSegment] + # Video segment where a label was detected. + # @!attribute [rw] confidence + # @return [::Float] + # Confidence that the label is accurate. Range: [0, 1]. + class LabelSegment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video frame level annotation results for label detection. + # @!attribute [rw] time_offset + # @return [::Google::Protobuf::Duration] + # Time-offset, relative to the beginning of the video, corresponding to the + # video frame for this location. + # @!attribute [rw] confidence + # @return [::Float] + # Confidence that the label is accurate. Range: [0, 1]. + class LabelFrame + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Detected entity from video analysis. + # @!attribute [rw] entity_id + # @return [::String] + # Opaque entity ID. Some IDs may be available in + # [Google Knowledge Graph Search + # API](https://developers.google.com/knowledge-graph/). + # @!attribute [rw] description + # @return [::String] + # Textual description, e.g. `Fixed-gear bicycle`. + # @!attribute [rw] language_code + # @return [::String] + # Language code for `description` in BCP-47 format. + class Entity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Label annotation. + # @!attribute [rw] entity + # @return [::Google::Cloud::VideoIntelligence::V1beta2::Entity] + # Detected entity. + # @!attribute [rw] category_entities + # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::Entity>] + # Common categories for the detected entity. + # E.g. when the label is `Terrier` the category is likely `dog`. And in some + # cases there might be more than one categories e.g. `Terrier` could also be + # a `pet`. + # @!attribute [rw] segments + # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::LabelSegment>] + # All video segments where a label was detected. + # @!attribute [rw] frames + # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::LabelFrame>] + # All video frames where a label was detected. + class LabelAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video frame level annotation results for explicit content. + # @!attribute [rw] time_offset + # @return [::Google::Protobuf::Duration] + # Time-offset, relative to the beginning of the video, corresponding to the + # video frame for this location. + # @!attribute [rw] pornography_likelihood + # @return [::Google::Cloud::VideoIntelligence::V1beta2::Likelihood] + # Likelihood of the pornography content.. + class ExplicitContentFrame + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Explicit content annotation (based on per-frame visual signals only). + # If no explicit content has been detected in a frame, no annotations are + # present for that frame. + # @!attribute [rw] frames + # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::ExplicitContentFrame>] + # All video frames where explicit content was detected. + class ExplicitContentAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Normalized bounding box. + # The normalized vertex coordinates are relative to the original image. + # Range: [0, 1]. + # @!attribute [rw] left + # @return [::Float] + # Left X coordinate. + # @!attribute [rw] top + # @return [::Float] + # Top Y coordinate. + # @!attribute [rw] right + # @return [::Float] + # Right X coordinate. + # @!attribute [rw] bottom + # @return [::Float] + # Bottom Y coordinate. + class NormalizedBoundingBox + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video segment level annotation results for face detection. + # @!attribute [rw] segment + # @return [::Google::Cloud::VideoIntelligence::V1beta2::VideoSegment] + # Video segment where a face was detected. + class FaceSegment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video frame level annotation results for face detection. + # @!attribute [rw] normalized_bounding_boxes + # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::NormalizedBoundingBox>] + # Normalized Bounding boxes in a frame. + # There can be more than one boxes if the same face is detected in multiple + # locations within the current frame. + # @!attribute [rw] time_offset + # @return [::Google::Protobuf::Duration] + # Time-offset, relative to the beginning of the video, + # corresponding to the video frame for this location. + class FaceFrame + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Face annotation. + # @!attribute [rw] thumbnail + # @return [::String] + # Thumbnail of a representative face view (in JPEG format). + # @!attribute [rw] segments + # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::FaceSegment>] + # All video segments where a face was detected. + # @!attribute [rw] frames + # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::FaceFrame>] + # All video frames where a face was detected. + class FaceAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Annotation results for a single video. + # @!attribute [rw] input_uri + # @return [::String] + # Video file location in + # [Google Cloud Storage](https://cloud.google.com/storage/). + # @!attribute [rw] segment_label_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::LabelAnnotation>] + # Label annotations on video level or user specified segment level. + # There is exactly one element for each unique label. + # @!attribute [rw] shot_label_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::LabelAnnotation>] + # Label annotations on shot level. + # There is exactly one element for each unique label. + # @!attribute [rw] frame_label_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::LabelAnnotation>] + # Label annotations on frame level. + # There is exactly one element for each unique label. + # @!attribute [rw] face_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::FaceAnnotation>] + # Face annotations. There is exactly one element for each unique face. + # @!attribute [rw] shot_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::VideoSegment>] + # Shot annotations. Each shot is represented as a video segment. + # @!attribute [rw] explicit_annotation + # @return [::Google::Cloud::VideoIntelligence::V1beta2::ExplicitContentAnnotation] + # Explicit content annotation. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # If set, indicates an error. Note that for a single `AnnotateVideoRequest` + # some videos may succeed and some may fail. + class VideoAnnotationResults + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video annotation response. Included in the `response` + # field of the `Operation` returned by the `GetOperation` + # call of the `google::longrunning::Operations` service. + # @!attribute [rw] annotation_results + # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::VideoAnnotationResults>] + # Annotation results for all videos specified in `AnnotateVideoRequest`. + class AnnotateVideoResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Annotation progress for a single video. + # @!attribute [rw] input_uri + # @return [::String] + # Video file location in + # [Google Cloud Storage](https://cloud.google.com/storage/). + # @!attribute [rw] progress_percent + # @return [::Integer] + # Approximate percentage processed thus far. + # Guaranteed to be 100 when fully processed. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Time when the request was received. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Time of the most recent update. + class VideoAnnotationProgress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video annotation progress. Included in the `metadata` + # field of the `Operation` returned by the `GetOperation` + # call of the `google::longrunning::Operations` service. + # @!attribute [rw] annotation_progress + # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::VideoAnnotationProgress>] + # Progress metadata for all videos specified in `AnnotateVideoRequest`. + class AnnotateVideoProgress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video annotation feature. + module Feature + # Unspecified. + FEATURE_UNSPECIFIED = 0 + + # Label detection. Detect objects, such as dog or flower. + LABEL_DETECTION = 1 + + # Shot change detection. + SHOT_CHANGE_DETECTION = 2 + + # Explicit content detection. + EXPLICIT_CONTENT_DETECTION = 3 + + # Human face detection and tracking. + FACE_DETECTION = 4 + end + + # Label detection mode. + module LabelDetectionMode + # Unspecified. + LABEL_DETECTION_MODE_UNSPECIFIED = 0 + + # Detect shot-level labels. + SHOT_MODE = 1 + + # Detect frame-level labels. + FRAME_MODE = 2 + + # Detect both shot-level and frame-level labels. + SHOT_AND_FRAME_MODE = 3 + end + + # Bucketized representation of likelihood. + module Likelihood + # Unspecified likelihood. + LIKELIHOOD_UNSPECIFIED = 0 + + # Very unlikely. + VERY_UNLIKELY = 1 + + # Unlikely. + UNLIKELY = 2 + + # Possible. + POSSIBLE = 3 + + # Likely. + LIKELY = 4 + + # Very likely. + VERY_LIKELY = 5 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/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-video_intelligence-v1beta2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/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-video_intelligence-v1beta2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/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-video_intelligence-v1beta2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/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-video_intelligence-v1beta2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/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-video_intelligence-v1beta2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/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-video_intelligence-v1beta2/snippets/Gemfile b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/snippets/Gemfile new file mode 100644 index 000000000000..e128c730ef50 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/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-video_intelligence-v1beta2", path: "../" +else + gem "google-cloud-video_intelligence-v1beta2" +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-video_intelligence-v1beta2/snippets/snippet_metadata_google.cloud.videointelligence.v1beta2.json b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/snippets/snippet_metadata_google.cloud.videointelligence.v1beta2.json new file mode 100644 index 000000000000..ef0acd63362a --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/snippets/snippet_metadata_google.cloud.videointelligence.v1beta2.json @@ -0,0 +1,55 @@ +{ + "client_library": { + "name": "google-cloud-video_intelligence-v1beta2", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.videointelligence.v1beta2", + "version": "v1beta2" + } + ] + }, + "snippets": [ + { + "region_tag": "videointelligence_v1beta2_generated_VideoIntelligenceService_AnnotateVideo_sync", + "title": "Snippet for the annotate_video call in the VideoIntelligenceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client#annotate_video.", + "file": "video_intelligence_service/annotate_video.rb", + "language": "RUBY", + "client_method": { + "short_name": "annotate_video", + "full_name": "::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client#annotate_video", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "VideoIntelligenceService::Client", + "full_name": "::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client" + }, + "method": { + "short_name": "AnnotateVideo", + "full_name": "google.cloud.videointelligence.v1beta2.VideoIntelligenceService.AnnotateVideo", + "service": { + "short_name": "VideoIntelligenceService", + "full_name": "google.cloud.videointelligence.v1beta2.VideoIntelligenceService" + } + } + }, + "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-video_intelligence-v1beta2/snippets/video_intelligence_service/annotate_video.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/snippets/video_intelligence_service/annotate_video.rb new file mode 100644 index 000000000000..473b6ffb1f4f --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/snippets/video_intelligence_service/annotate_video.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 videointelligence_v1beta2_generated_VideoIntelligenceService_AnnotateVideo_sync] +require "google/cloud/video_intelligence/v1beta2" + +## +# Snippet for the annotate_video call in the VideoIntelligenceService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client#annotate_video. +# +def annotate_video + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest.new + + # Call the annotate_video method. + result = client.annotate_video request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END videointelligence_v1beta2_generated_VideoIntelligenceService_AnnotateVideo_sync] diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/google/cloud/video_intelligence/v1beta2/video_intelligence_service_operations_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/google/cloud/video_intelligence/v1beta2/video_intelligence_service_operations_test.rb new file mode 100644 index 000000000000..dc8974408ccf --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/google/cloud/video_intelligence/v1beta2/video_intelligence_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/videointelligence/v1beta2/video_intelligence_pb" +require "google/cloud/videointelligence/v1beta2/video_intelligence_services_pb" +require "google/cloud/video_intelligence/v1beta2/video_intelligence_service" + +class ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::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::VideoIntelligence::V1beta2::VideoIntelligenceService::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::VideoIntelligence::V1beta2::VideoIntelligenceService::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::VideoIntelligence::V1beta2::VideoIntelligenceService::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::VideoIntelligence::V1beta2::VideoIntelligenceService::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::VideoIntelligence::V1beta2::VideoIntelligenceService::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::VideoIntelligence::V1beta2::VideoIntelligenceService::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::VideoIntelligence::V1beta2::VideoIntelligenceService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/google/cloud/video_intelligence/v1beta2/video_intelligence_service_rest_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/google/cloud/video_intelligence/v1beta2/video_intelligence_service_rest_test.rb new file mode 100644 index 000000000000..2560d4fc9a73 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/google/cloud/video_intelligence/v1beta2/video_intelligence_service_rest_test.rb @@ -0,0 +1,158 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/videointelligence/v1beta2/video_intelligence_pb" +require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest" + + +class ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::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_annotate_video + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + input_uri = "hello world" + input_content = "hello world" + features = [:FEATURE_UNSPECIFIED] + video_context = {} + output_uri = "hello world" + location_id = "hello world" + + annotate_video_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::ServiceStub.stub :transcode_annotate_video_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, annotate_video_client_stub do + # Create client + client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.annotate_video input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.annotate_video ::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.annotate_video(::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, annotate_video_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::VideoIntelligence::V1beta2::VideoIntelligenceService::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::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/google/cloud/video_intelligence/v1beta2/video_intelligence_service_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/google/cloud/video_intelligence/v1beta2/video_intelligence_service_test.rb new file mode 100644 index 000000000000..cb3613677fdc --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/google/cloud/video_intelligence/v1beta2/video_intelligence_service_test.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! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/videointelligence/v1beta2/video_intelligence_pb" +require "google/cloud/video_intelligence/v1beta2/video_intelligence_service" + +class ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::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_annotate_video + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + input_uri = "hello world" + input_content = "hello world" + features = [:FEATURE_UNSPECIFIED] + video_context = {} + output_uri = "hello world" + location_id = "hello world" + + annotate_video_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :annotate_video, name + assert_kind_of ::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest, request + assert_equal "hello world", request["input_uri"] + assert_equal "hello world", request["input_content"] + assert_equal [:FEATURE_UNSPECIFIED], request["features"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::VideoIntelligence::V1beta2::VideoContext), request["video_context"] + assert_equal "hello world", request["output_uri"] + assert_equal "hello world", request["location_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, annotate_video_client_stub do + # Create client + client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video ::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video(::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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, annotate_video_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::VideoIntelligence::V1beta2::VideoIntelligenceService::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::VideoIntelligence::V1beta2::VideoIntelligenceService::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::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::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::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/helper.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.gitignore b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.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-video_intelligence-v1p1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.repo-metadata.json new file mode 100644 index 000000000000..e84b79568fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "videointelligence.googleapis.com", + "api_shortname": "videointelligence", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-video_intelligence-v1p1beta1/latest", + "distribution_name": "google-cloud-video_intelligence-v1p1beta1", + "is_cloud": true, + "language": "ruby", + "name": "videointelligence", + "name_pretty": "Cloud Video Intelligence V1p1beta1 API", + "product_documentation": "https://cloud.google.com/video-intelligence", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API. Note that google-cloud-video_intelligence-v1p1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video_intelligence instead. See the readme for more details.", + "ruby-cloud-env-prefix": "VIDEO_INTELLIGENCE", + "ruby-cloud-product-url": "https://cloud.google.com/video-intelligence", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.rubocop.yml new file mode 100644 index 000000000000..06f967ab8cea --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-video_intelligence-v1p1beta1.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-video_intelligence-v1p1beta1.rb" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.toys.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.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-video_intelligence-v1p1beta1/.yardopts b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.yardopts new file mode 100644 index 000000000000..a2d1103c19fc --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Video Intelligence V1p1beta1 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-video_intelligence-v1p1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/AUTHENTICATION.md new file mode 100644 index 000000000000..81b01d85ef28 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-video_intelligence-v1p1beta1 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-video_intelligence-v1p1beta1 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/video_intelligence/v1p1beta1" + +client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/video_intelligence/v1p1beta1" + +::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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-video_intelligence-v1p1beta1 +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/video_intelligence/v1p1beta1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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-video_intelligence-v1p1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/Gemfile b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/LICENSE.md b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/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-video_intelligence-v1p1beta1/README.md b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/README.md new file mode 100644 index 000000000000..fad0b994865a --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the Cloud Video Intelligence V1p1beta1 API + +Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming 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 Cloud Video Intelligence V1p1beta1 API. Most users should consider using +the main client gem, +[google-cloud-video_intelligence](https://rubygems.org/gems/google-cloud-video_intelligence). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-video_intelligence-v1p1beta1 +``` + +## 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/videointelligence.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/video_intelligence/v1p1beta1" + +client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new +request = ::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest.new # (request fields as keyword arguments...) +response = client.annotate_video request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-video_intelligence-v1p1beta1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/video-intelligence) +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/video_intelligence/v1p1beta1" +require "logger" + +client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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-video_intelligence`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-video_intelligence-v1p1beta1`. +_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-video_intelligence`. +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-video_intelligence-v1p1beta1`. + +### 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-video_intelligence-v1p1beta1/Rakefile b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/Rakefile new file mode 100644 index 000000000000..5ca04360d456 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/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-video_intelligence-v1p1beta1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["VIDEO_INTELLIGENCE_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["VIDEO_INTELLIGENCE_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["VIDEO_INTELLIGENCE_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 VIDEO_INTELLIGENCE_TEST_PROJECT=test123 VIDEO_INTELLIGENCE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/credentials" + ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["VIDEO_INTELLIGENCE_PROJECT"] = project + ENV["VIDEO_INTELLIGENCE_TEST_PROJECT"] = project + ENV["VIDEO_INTELLIGENCE_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-video_intelligence-v1p1beta1 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-video_intelligence-v1p1beta1 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-video_intelligence-v1p1beta1 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-video_intelligence-v1p1beta1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-video_intelligence-v1p1beta1" + header "google-cloud-video_intelligence-v1p1beta1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-video_intelligence-v1p1beta1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-video_intelligence-v1p1beta1 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-video_intelligence-v1p1beta1 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-video_intelligence-v1p1beta1 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-video_intelligence-v1p1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/gapic_metadata.json new file mode 100644 index 000000000000..ffae5fe9d9ce --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/gapic_metadata.json @@ -0,0 +1,23 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.videointelligence.v1p1beta1", + "libraryPackage": "::Google::Cloud::VideoIntelligence::V1p1beta1", + "services": { + "VideoIntelligenceService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client", + "rpcs": { + "AnnotateVideo": { + "methods": [ + "annotate_video" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/google-cloud-video_intelligence-v1p1beta1.gemspec b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/google-cloud-video_intelligence-v1p1beta1.gemspec new file mode 100644 index 000000000000..e5459c05aef7 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/google-cloud-video_intelligence-v1p1beta1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/video_intelligence/v1p1beta1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-video_intelligence-v1p1beta1" + gem.version = Google::Cloud::VideoIntelligence::V1p1beta1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API. Note that google-cloud-video_intelligence-v1p1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video_intelligence instead. See the readme for more details." + gem.summary = "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming 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.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google-cloud-video_intelligence-v1p1beta1.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google-cloud-video_intelligence-v1p1beta1.rb new file mode 100644 index 000000000000..475d62fd8050 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google-cloud-video_intelligence-v1p1beta1.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/video_intelligence/v1p1beta1" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1.rb new file mode 100644 index 000000000000..12c22992512f --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1.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/video_intelligence/v1p1beta1/video_intelligence_service" +require "google/cloud/video_intelligence/v1p1beta1/version" + +module Google + module Cloud + module VideoIntelligence + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/video_intelligence/v1p1beta1" + # client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/video_intelligence/v1p1beta1" + # client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client.new + # + module V1p1beta1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1p1beta1", "_helpers.rb" +require "google/cloud/video_intelligence/v1p1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/rest.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/rest.rb new file mode 100644 index 000000000000..80e0dd487e17 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/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/video_intelligence/v1p1beta1/video_intelligence_service/rest" +require "google/cloud/video_intelligence/v1p1beta1/version" + +module Google + module Cloud + module VideoIntelligence + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/video_intelligence/v1p1beta1/rest" + # client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client.new + # + module V1p1beta1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/version.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/version.rb new file mode 100644 index 000000000000..f1c3432a41fd --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/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 VideoIntelligence + module V1p1beta1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service.rb new file mode 100644 index 000000000000..7f2c31d43920 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service.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/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/video_intelligence/v1p1beta1/version" + +require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/credentials" +require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/operations" +require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/client" +require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest" + +module Google + module Cloud + module VideoIntelligence + module V1p1beta1 + ## + # Service that implements Google Cloud Video Intelligence API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service" + # client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest" + # client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client.new + # + module VideoIntelligenceService + end + end + end + end +end + +helper_path = ::File.join __dir__, "video_intelligence_service", "helpers.rb" +require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/client.rb new file mode 100644 index 000000000000..49c3feb116a1 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/client.rb @@ -0,0 +1,525 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/videointelligence/v1p1beta1/video_intelligence_pb" + +module Google + module Cloud + module VideoIntelligence + module V1p1beta1 + module VideoIntelligenceService + ## + # Client for the VideoIntelligenceService service. + # + # Service that implements Google Cloud Video Intelligence API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :video_intelligence_service_stub + + ## + # Configure the VideoIntelligenceService Client class. + # + # See {::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all VideoIntelligenceService clients + # ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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", "VideoIntelligence", "V1p1beta1"] + 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.annotate_video.timeout = 600.0 + default_config.rpcs.annotate_video.retry_policy = { + initial_delay: 1.0, max_delay: 120.0, multiplier: 2.5, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the VideoIntelligenceService 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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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 + @video_intelligence_service_stub.universe_domain + end + + ## + # Create a new VideoIntelligenceService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the VideoIntelligenceService 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/videointelligence/v1p1beta1/video_intelligence_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 + + @video_intelligence_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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 + ) + + @video_intelligence_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 + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @video_intelligence_service_stub.logger + end + + # Service calls + + ## + # Performs asynchronous video annotation. Progress and results can be + # retrieved through the `google.longrunning.Operations` interface. + # `Operation.metadata` contains `AnnotateVideoProgress` (progress). + # `Operation.response` contains `AnnotateVideoResponse` (results). + # + # @overload annotate_video(request, options = nil) + # Pass arguments to `annotate_video` via a request object, either of type + # {::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload annotate_video(input_uri: nil, input_content: nil, features: nil, video_context: nil, output_uri: nil, location_id: nil) + # Pass arguments to `annotate_video` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param input_uri [::String] + # Input video location. Currently, only + # [Google Cloud Storage](https://cloud.google.com/storage/) URIs are + # supported, which must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + # more information, see [Request + # URIs](https://cloud.google.com/storage/docs/request-endpoints). A video URI + # may include wildcards in `object-id`, and thus identify multiple videos. + # Supported wildcards: '*' to match 0 or more characters; + # '?' to match 1 character. If unset, the input video should be embedded + # in the request as `input_content`. If set, `input_content` should be unset. + # @param input_content [::String] + # The video data bytes. + # If unset, the input video(s) should be specified via `input_uri`. + # If set, `input_uri` should be unset. + # @param features [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::Feature>] + # Required. Requested video annotation features. + # @param video_context [::Google::Cloud::VideoIntelligence::V1p1beta1::VideoContext, ::Hash] + # Additional video context and/or feature-specific parameters. + # @param output_uri [::String] + # Optional. Location where the output (in JSON format) should be stored. + # Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) + # URIs are supported, which must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + # more information, see [Request + # URIs](https://cloud.google.com/storage/docs/request-endpoints). + # @param location_id [::String] + # Optional. Cloud region where annotation should take place. Supported cloud + # regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region + # is specified, a region will be determined based on video file 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/video_intelligence/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest.new + # + # # Call the annotate_video method. + # result = client.annotate_video request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def annotate_video request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.annotate_video.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::VideoIntelligence::V1p1beta1::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.annotate_video.timeout, + metadata: metadata, + retry_policy: @config.rpcs.annotate_video.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_intelligence_service_stub.call_rpc :annotate_video, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 VideoIntelligenceService API. + # + # This class represents the configuration for VideoIntelligenceService, + # 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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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 + # # annotate_video to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.annotate_video.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.annotate_video.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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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 = "videointelligence.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 VideoIntelligenceService 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 `annotate_video` + # @return [::Gapic::Config::Method] + # + attr_reader :annotate_video + + # @private + def initialize parent_rpcs = nil + annotate_video_config = parent_rpcs.annotate_video if parent_rpcs.respond_to? :annotate_video + @annotate_video = ::Gapic::Config::Method.new annotate_video_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/credentials.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/credentials.rb new file mode 100644 index 000000000000..6758d6d0ee15 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_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 VideoIntelligence + module V1p1beta1 + module VideoIntelligenceService + # Credentials for the VideoIntelligenceService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "VIDEO_INTELLIGENCE_CREDENTIALS", + "VIDEO_INTELLIGENCE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "VIDEO_INTELLIGENCE_CREDENTIALS_JSON", + "VIDEO_INTELLIGENCE_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-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/operations.rb new file mode 100644 index 000000000000..662a00a2e73b --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_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 VideoIntelligence + module V1p1beta1 + module VideoIntelligenceService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the VideoIntelligenceService 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 VideoIntelligenceService 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::VideoIntelligence::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::VideoIntelligence::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::VideoIntelligence::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::VideoIntelligence::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::VideoIntelligence::V1p1beta1::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 = "videointelligence.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-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest.rb new file mode 100644 index 000000000000..c61e6347f685 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest.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 "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/video_intelligence/v1p1beta1/version" + +require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/credentials" +require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/operations" +require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/client" + +module Google + module Cloud + module VideoIntelligence + module V1p1beta1 + ## + # Service that implements Google Cloud Video Intelligence API. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest" + # client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client.new + # + module VideoIntelligenceService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/client.rb new file mode 100644 index 000000000000..5a52c7e2aa1c --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/client.rb @@ -0,0 +1,483 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/videointelligence/v1p1beta1/video_intelligence_pb" +require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/service_stub" + +module Google + module Cloud + module VideoIntelligence + module V1p1beta1 + module VideoIntelligenceService + module Rest + ## + # REST client for the VideoIntelligenceService service. + # + # Service that implements Google Cloud Video Intelligence API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :video_intelligence_service_stub + + ## + # Configure the VideoIntelligenceService Client class. + # + # See {::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all VideoIntelligenceService clients + # ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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", "VideoIntelligence", "V1p1beta1"] + 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.annotate_video.timeout = 600.0 + default_config.rpcs.annotate_video.retry_policy = { + initial_delay: 1.0, max_delay: 120.0, multiplier: 2.5, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the VideoIntelligenceService 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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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 + @video_intelligence_service_stub.universe_domain + end + + ## + # Create a new VideoIntelligenceService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the VideoIntelligenceService 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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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 + + @video_intelligence_service_stub = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @video_intelligence_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 + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @video_intelligence_service_stub.logger + end + + # Service calls + + ## + # Performs asynchronous video annotation. Progress and results can be + # retrieved through the `google.longrunning.Operations` interface. + # `Operation.metadata` contains `AnnotateVideoProgress` (progress). + # `Operation.response` contains `AnnotateVideoResponse` (results). + # + # @overload annotate_video(request, options = nil) + # Pass arguments to `annotate_video` via a request object, either of type + # {::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload annotate_video(input_uri: nil, input_content: nil, features: nil, video_context: nil, output_uri: nil, location_id: nil) + # Pass arguments to `annotate_video` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param input_uri [::String] + # Input video location. Currently, only + # [Google Cloud Storage](https://cloud.google.com/storage/) URIs are + # supported, which must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + # more information, see [Request + # URIs](https://cloud.google.com/storage/docs/request-endpoints). A video URI + # may include wildcards in `object-id`, and thus identify multiple videos. + # Supported wildcards: '*' to match 0 or more characters; + # '?' to match 1 character. If unset, the input video should be embedded + # in the request as `input_content`. If set, `input_content` should be unset. + # @param input_content [::String] + # The video data bytes. + # If unset, the input video(s) should be specified via `input_uri`. + # If set, `input_uri` should be unset. + # @param features [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::Feature>] + # Required. Requested video annotation features. + # @param video_context [::Google::Cloud::VideoIntelligence::V1p1beta1::VideoContext, ::Hash] + # Additional video context and/or feature-specific parameters. + # @param output_uri [::String] + # Optional. Location where the output (in JSON format) should be stored. + # Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) + # URIs are supported, which must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + # more information, see [Request + # URIs](https://cloud.google.com/storage/docs/request-endpoints). + # @param location_id [::String] + # Optional. Cloud region where annotation should take place. Supported cloud + # regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region + # is specified, a region will be determined based on video file 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/video_intelligence/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest.new + # + # # Call the annotate_video method. + # result = client.annotate_video request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def annotate_video request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.annotate_video.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::VideoIntelligence::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.annotate_video.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.annotate_video.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_intelligence_service_stub.annotate_video request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 VideoIntelligenceService REST API. + # + # This class represents the configuration for VideoIntelligenceService 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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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 + # # annotate_video to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.annotate_video.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.annotate_video.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 = "videointelligence.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 VideoIntelligenceService 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 `annotate_video` + # @return [::Gapic::Config::Method] + # + attr_reader :annotate_video + + # @private + def initialize parent_rpcs = nil + annotate_video_config = parent_rpcs.annotate_video if parent_rpcs.respond_to? :annotate_video + @annotate_video = ::Gapic::Config::Method.new annotate_video_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/operations.rb new file mode 100644 index 000000000000..5f631972f630 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/operations.rb @@ -0,0 +1,946 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 VideoIntelligence + module V1p1beta1 + module VideoIntelligenceService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the VideoIntelligenceService 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 VideoIntelligenceService 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::VideoIntelligence::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "videointelligence.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: "/v1p1beta1/{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: "/v1p1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1p1beta1/operations/{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: "/v1p1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1p1beta1/operations/{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: "/v1p1beta1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1p1beta1/operations/{name}:cancel", + 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-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/service_stub.rb new file mode 100644 index 000000000000..193f07193710 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/service_stub.rb @@ -0,0 +1,141 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/videointelligence/v1p1beta1/video_intelligence_pb" + +module Google + module Cloud + module VideoIntelligence + module V1p1beta1 + module VideoIntelligenceService + module Rest + ## + # REST service stub for the VideoIntelligenceService 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 annotate_video REST call + # + # @param request_pb [::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def annotate_video request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_annotate_video_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "annotate_video", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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 annotate_video REST call + # + # @param request_pb [::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_annotate_video_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1p1beta1/videos:annotate", + body: "*", + matches: [] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/videointelligence/v1p1beta1/video_intelligence_pb.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/videointelligence/v1p1beta1/video_intelligence_pb.rb new file mode 100644 index 000000000000..2dcd4aa0a444 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/videointelligence/v1p1beta1/video_intelligence_pb.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/videointelligence/v1p1beta1/video_intelligence.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nAgoogle/cloud/videointelligence/v1p1beta1/video_intelligence.proto\x12(google.cloud.videointelligence.v1p1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x8c\x02\n\x14\x41nnotateVideoRequest\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\x15\n\rinput_content\x18\x06 \x01(\x0c\x12H\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0e\x32\x31.google.cloud.videointelligence.v1p1beta1.FeatureB\x03\xe0\x41\x02\x12M\n\rvideo_context\x18\x03 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p1beta1.VideoContext\x12\x17\n\noutput_uri\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0blocation_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x82\x04\n\x0cVideoContext\x12H\n\x08segments\x18\x01 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1p1beta1.VideoSegment\x12^\n\x16label_detection_config\x18\x02 \x01(\x0b\x32>.google.cloud.videointelligence.v1p1beta1.LabelDetectionConfig\x12i\n\x1cshot_change_detection_config\x18\x03 \x01(\x0b\x32\x43.google.cloud.videointelligence.v1p1beta1.ShotChangeDetectionConfig\x12s\n!explicit_content_detection_config\x18\x04 \x01(\x0b\x32H.google.cloud.videointelligence.v1p1beta1.ExplicitContentDetectionConfig\x12h\n\x1bspeech_transcription_config\x18\x06 \x01(\x0b\x32\x43.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig\"\x9c\x01\n\x14LabelDetectionConfig\x12Z\n\x14label_detection_mode\x18\x01 \x01(\x0e\x32<.google.cloud.videointelligence.v1p1beta1.LabelDetectionMode\x12\x19\n\x11stationary_camera\x18\x02 \x01(\x08\x12\r\n\x05model\x18\x03 \x01(\t\"*\n\x19ShotChangeDetectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\"/\n\x1e\x45xplicitContentDetectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\"x\n\x0cVideoSegment\x12\x34\n\x11start_time_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0f\x65nd_time_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"k\n\x0cLabelSegment\x12G\n\x07segment\x18\x01 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p1beta1.VideoSegment\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"P\n\nLabelFrame\x12.\n\x0btime_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"G\n\x06\x45ntity\x12\x11\n\tentity_id\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x15\n\rlanguage_code\x18\x03 \x01(\t\"\xb0\x02\n\x0fLabelAnnotation\x12@\n\x06\x65ntity\x18\x01 \x01(\x0b\x32\x30.google.cloud.videointelligence.v1p1beta1.Entity\x12K\n\x11\x63\x61tegory_entities\x18\x02 \x03(\x0b\x32\x30.google.cloud.videointelligence.v1p1beta1.Entity\x12H\n\x08segments\x18\x03 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1p1beta1.LabelSegment\x12\x44\n\x06\x66rames\x18\x04 \x03(\x0b\x32\x34.google.cloud.videointelligence.v1p1beta1.LabelFrame\"\x9c\x01\n\x14\x45xplicitContentFrame\x12.\n\x0btime_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12T\n\x16pornography_likelihood\x18\x02 \x01(\x0e\x32\x34.google.cloud.videointelligence.v1p1beta1.Likelihood\"k\n\x19\x45xplicitContentAnnotation\x12N\n\x06\x66rames\x18\x01 \x03(\x0b\x32>.google.cloud.videointelligence.v1p1beta1.ExplicitContentFrame\"\xf5\x04\n\x16VideoAnnotationResults\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\\\n\x19segment_label_annotations\x18\x02 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p1beta1.LabelAnnotation\x12Y\n\x16shot_label_annotations\x18\x03 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p1beta1.LabelAnnotation\x12Z\n\x17\x66rame_label_annotations\x18\x04 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p1beta1.LabelAnnotation\x12P\n\x10shot_annotations\x18\x06 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1p1beta1.VideoSegment\x12`\n\x13\x65xplicit_annotation\x18\x07 \x01(\x0b\x32\x43.google.cloud.videointelligence.v1p1beta1.ExplicitContentAnnotation\x12\\\n\x15speech_transcriptions\x18\x0b \x03(\x0b\x32=.google.cloud.videointelligence.v1p1beta1.SpeechTranscription\x12!\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.Status\"u\n\x15\x41nnotateVideoResponse\x12\\\n\x12\x61nnotation_results\x18\x01 \x03(\x0b\x32@.google.cloud.videointelligence.v1p1beta1.VideoAnnotationResults\"\xa7\x01\n\x17VideoAnnotationProgress\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\x18\n\x10progress_percent\x18\x02 \x01(\x05\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"w\n\x15\x41nnotateVideoProgress\x12^\n\x13\x61nnotation_progress\x18\x01 \x03(\x0b\x32\x41.google.cloud.videointelligence.v1p1beta1.VideoAnnotationProgress\"\x92\x02\n\x19SpeechTranscriptionConfig\x12\x1a\n\rlanguage_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10max_alternatives\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1d\n\x10\x66ilter_profanity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12U\n\x0fspeech_contexts\x18\x04 \x03(\x0b\x32\x37.google.cloud.videointelligence.v1p1beta1.SpeechContextB\x03\xe0\x41\x01\x12)\n\x1c\x65nable_automatic_punctuation\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x19\n\x0c\x61udio_tracks\x18\x06 \x03(\x05\x42\x03\xe0\x41\x01\"%\n\rSpeechContext\x12\x14\n\x07phrases\x18\x01 \x03(\tB\x03\xe0\x41\x01\"s\n\x13SpeechTranscription\x12\\\n\x0c\x61lternatives\x18\x01 \x03(\x0b\x32\x46.google.cloud.videointelligence.v1p1beta1.SpeechRecognitionAlternative\"\x8e\x01\n\x1cSpeechRecognitionAlternative\x12\x12\n\ntranscript\x18\x01 \x01(\t\x12\x17\n\nconfidence\x18\x02 \x01(\x02\x42\x03\xe0\x41\x03\x12\x41\n\x05words\x18\x03 \x03(\x0b\x32\x32.google.cloud.videointelligence.v1p1beta1.WordInfo\"t\n\x08WordInfo\x12-\n\nstart_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12+\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0c\n\x04word\x18\x03 \x01(\t*\x8c\x01\n\x07\x46\x65\x61ture\x12\x17\n\x13\x46\x45\x41TURE_UNSPECIFIED\x10\x00\x12\x13\n\x0fLABEL_DETECTION\x10\x01\x12\x19\n\x15SHOT_CHANGE_DETECTION\x10\x02\x12\x1e\n\x1a\x45XPLICIT_CONTENT_DETECTION\x10\x03\x12\x18\n\x14SPEECH_TRANSCRIPTION\x10\x06*r\n\x12LabelDetectionMode\x12$\n LABEL_DETECTION_MODE_UNSPECIFIED\x10\x00\x12\r\n\tSHOT_MODE\x10\x01\x12\x0e\n\nFRAME_MODE\x10\x02\x12\x17\n\x13SHOT_AND_FRAME_MODE\x10\x03*t\n\nLikelihood\x12\x1a\n\x16LIKELIHOOD_UNSPECIFIED\x10\x00\x12\x11\n\rVERY_UNLIKELY\x10\x01\x12\x0c\n\x08UNLIKELY\x10\x02\x12\x0c\n\x08POSSIBLE\x10\x03\x12\n\n\x06LIKELY\x10\x04\x12\x0f\n\x0bVERY_LIKELY\x10\x05\x32\xce\x02\n\x18VideoIntelligenceService\x12\xdb\x01\n\rAnnotateVideo\x12>.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41.\n\x15\x41nnotateVideoResponse\x12\x15\x41nnotateVideoProgress\xda\x41\x12input_uri,features\x82\xd3\xe4\x93\x02\x1f\"\x1a/v1p1beta1/videos:annotate:\x01*\x1aT\xca\x41 videointelligence.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xaf\x02\n,com.google.cloud.videointelligence.v1p1beta1B\x1dVideoIntelligenceServiceProtoP\x01ZZcloud.google.com/go/videointelligence/apiv1p1beta1/videointelligencepb;videointelligencepb\xaa\x02(Google.Cloud.VideoIntelligence.V1P1Beta1\xca\x02(Google\\Cloud\\VideoIntelligence\\V1p1beta1\xea\x02+Google::Cloud::VideoIntelligence::V1p1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module VideoIntelligence + module V1p1beta1 + AnnotateVideoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest").msgclass + VideoContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.VideoContext").msgclass + LabelDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.LabelDetectionConfig").msgclass + ShotChangeDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.ShotChangeDetectionConfig").msgclass + ExplicitContentDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.ExplicitContentDetectionConfig").msgclass + VideoSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.VideoSegment").msgclass + LabelSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.LabelSegment").msgclass + LabelFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.LabelFrame").msgclass + Entity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.Entity").msgclass + LabelAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.LabelAnnotation").msgclass + ExplicitContentFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.ExplicitContentFrame").msgclass + ExplicitContentAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.ExplicitContentAnnotation").msgclass + VideoAnnotationResults = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.VideoAnnotationResults").msgclass + AnnotateVideoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.AnnotateVideoResponse").msgclass + VideoAnnotationProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.VideoAnnotationProgress").msgclass + AnnotateVideoProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.AnnotateVideoProgress").msgclass + SpeechTranscriptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig").msgclass + SpeechContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.SpeechContext").msgclass + SpeechTranscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.SpeechTranscription").msgclass + SpeechRecognitionAlternative = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.SpeechRecognitionAlternative").msgclass + WordInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.WordInfo").msgclass + Feature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.Feature").enummodule + LabelDetectionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.LabelDetectionMode").enummodule + Likelihood = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.Likelihood").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/videointelligence/v1p1beta1/video_intelligence_services_pb.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/videointelligence/v1p1beta1/video_intelligence_services_pb.rb new file mode 100644 index 000000000000..53aeb5996063 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/videointelligence/v1p1beta1/video_intelligence_services_pb.rb @@ -0,0 +1,49 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/videointelligence/v1p1beta1/video_intelligence.proto for package 'Google.Cloud.VideoIntelligence.V1p1beta1' +# 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/videointelligence/v1p1beta1/video_intelligence_pb' + +module Google + module Cloud + module VideoIntelligence + module V1p1beta1 + module VideoIntelligenceService + # Service that implements Google Cloud Video Intelligence API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.videointelligence.v1p1beta1.VideoIntelligenceService' + + # Performs asynchronous video annotation. Progress and results can be + # retrieved through the `google.longrunning.Operations` interface. + # `Operation.metadata` contains `AnnotateVideoProgress` (progress). + # `Operation.response` contains `AnnotateVideoResponse` (results). + rpc :AnnotateVideo, ::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/README.md new file mode 100644 index 000000000000..06963a9dbbb8 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Video Intelligence V1p1beta1 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-video_intelligence-v1p1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # 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. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + # + # Example: + # + # 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 + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # 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 + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # 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 + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/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-video_intelligence-v1p1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/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-video_intelligence-v1p1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/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-video_intelligence-v1p1beta1/proto_docs/google/cloud/videointelligence/v1p1beta1/video_intelligence.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/cloud/videointelligence/v1p1beta1/video_intelligence.rb new file mode 100644 index 000000000000..f08d47aa7016 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/cloud/videointelligence/v1p1beta1/video_intelligence.rb @@ -0,0 +1,479 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module VideoIntelligence + module V1p1beta1 + # Video annotation request. + # @!attribute [rw] input_uri + # @return [::String] + # Input video location. Currently, only + # [Google Cloud Storage](https://cloud.google.com/storage/) URIs are + # supported, which must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + # more information, see [Request + # URIs](https://cloud.google.com/storage/docs/request-endpoints). A video URI + # may include wildcards in `object-id`, and thus identify multiple videos. + # Supported wildcards: '*' to match 0 or more characters; + # '?' to match 1 character. If unset, the input video should be embedded + # in the request as `input_content`. If set, `input_content` should be unset. + # @!attribute [rw] input_content + # @return [::String] + # The video data bytes. + # If unset, the input video(s) should be specified via `input_uri`. + # If set, `input_uri` should be unset. + # @!attribute [rw] features + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::Feature>] + # Required. Requested video annotation features. + # @!attribute [rw] video_context + # @return [::Google::Cloud::VideoIntelligence::V1p1beta1::VideoContext] + # Additional video context and/or feature-specific parameters. + # @!attribute [rw] output_uri + # @return [::String] + # Optional. Location where the output (in JSON format) should be stored. + # Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) + # URIs are supported, which must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + # more information, see [Request + # URIs](https://cloud.google.com/storage/docs/request-endpoints). + # @!attribute [rw] location_id + # @return [::String] + # Optional. Cloud region where annotation should take place. Supported cloud + # regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region + # is specified, a region will be determined based on video file location. + class AnnotateVideoRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video context and/or feature-specific parameters. + # @!attribute [rw] segments + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::VideoSegment>] + # Video segments to annotate. The segments may overlap and are not required + # to be contiguous or span the whole video. If unspecified, each video is + # treated as a single segment. + # @!attribute [rw] label_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1p1beta1::LabelDetectionConfig] + # Config for LABEL_DETECTION. + # @!attribute [rw] shot_change_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1p1beta1::ShotChangeDetectionConfig] + # Config for SHOT_CHANGE_DETECTION. + # @!attribute [rw] explicit_content_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1p1beta1::ExplicitContentDetectionConfig] + # Config for EXPLICIT_CONTENT_DETECTION. + # @!attribute [rw] speech_transcription_config + # @return [::Google::Cloud::VideoIntelligence::V1p1beta1::SpeechTranscriptionConfig] + # Config for SPEECH_TRANSCRIPTION. + class VideoContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for LABEL_DETECTION. + # @!attribute [rw] label_detection_mode + # @return [::Google::Cloud::VideoIntelligence::V1p1beta1::LabelDetectionMode] + # What labels should be detected with LABEL_DETECTION, in addition to + # video-level labels or segment-level labels. + # If unspecified, defaults to `SHOT_MODE`. + # @!attribute [rw] stationary_camera + # @return [::Boolean] + # Whether the video has been shot from a stationary (i.e. non-moving) camera. + # When set to true, might improve detection accuracy for moving objects. + # Should be used with `SHOT_AND_FRAME_MODE` enabled. + # @!attribute [rw] model + # @return [::String] + # Model to use for label detection. + # Supported values: "builtin/stable" (the default if unset) and + # "builtin/latest". + class LabelDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for SHOT_CHANGE_DETECTION. + # @!attribute [rw] model + # @return [::String] + # Model to use for shot change detection. + # Supported values: "builtin/stable" (the default if unset) and + # "builtin/latest". + class ShotChangeDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for EXPLICIT_CONTENT_DETECTION. + # @!attribute [rw] model + # @return [::String] + # Model to use for explicit content detection. + # Supported values: "builtin/stable" (the default if unset) and + # "builtin/latest". + class ExplicitContentDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video segment. + # @!attribute [rw] start_time_offset + # @return [::Google::Protobuf::Duration] + # Time-offset, relative to the beginning of the video, + # corresponding to the start of the segment (inclusive). + # @!attribute [rw] end_time_offset + # @return [::Google::Protobuf::Duration] + # Time-offset, relative to the beginning of the video, + # corresponding to the end of the segment (inclusive). + class VideoSegment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video segment level annotation results for label detection. + # @!attribute [rw] segment + # @return [::Google::Cloud::VideoIntelligence::V1p1beta1::VideoSegment] + # Video segment where a label was detected. + # @!attribute [rw] confidence + # @return [::Float] + # Confidence that the label is accurate. Range: [0, 1]. + class LabelSegment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video frame level annotation results for label detection. + # @!attribute [rw] time_offset + # @return [::Google::Protobuf::Duration] + # Time-offset, relative to the beginning of the video, corresponding to the + # video frame for this location. + # @!attribute [rw] confidence + # @return [::Float] + # Confidence that the label is accurate. Range: [0, 1]. + class LabelFrame + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Detected entity from video analysis. + # @!attribute [rw] entity_id + # @return [::String] + # Opaque entity ID. Some IDs may be available in + # [Google Knowledge Graph Search + # API](https://developers.google.com/knowledge-graph/). + # @!attribute [rw] description + # @return [::String] + # Textual description, e.g. `Fixed-gear bicycle`. + # @!attribute [rw] language_code + # @return [::String] + # Language code for `description` in BCP-47 format. + class Entity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Label annotation. + # @!attribute [rw] entity + # @return [::Google::Cloud::VideoIntelligence::V1p1beta1::Entity] + # Detected entity. + # @!attribute [rw] category_entities + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::Entity>] + # Common categories for the detected entity. + # E.g. when the label is `Terrier` the category is likely `dog`. And in some + # cases there might be more than one categories e.g. `Terrier` could also be + # a `pet`. + # @!attribute [rw] segments + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::LabelSegment>] + # All video segments where a label was detected. + # @!attribute [rw] frames + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::LabelFrame>] + # All video frames where a label was detected. + class LabelAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video frame level annotation results for explicit content. + # @!attribute [rw] time_offset + # @return [::Google::Protobuf::Duration] + # Time-offset, relative to the beginning of the video, corresponding to the + # video frame for this location. + # @!attribute [rw] pornography_likelihood + # @return [::Google::Cloud::VideoIntelligence::V1p1beta1::Likelihood] + # Likelihood of the pornography content.. + class ExplicitContentFrame + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Explicit content annotation (based on per-frame visual signals only). + # If no explicit content has been detected in a frame, no annotations are + # present for that frame. + # @!attribute [rw] frames + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::ExplicitContentFrame>] + # All video frames where explicit content was detected. + class ExplicitContentAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Annotation results for a single video. + # @!attribute [rw] input_uri + # @return [::String] + # Output only. Video file location in + # [Google Cloud Storage](https://cloud.google.com/storage/). + # @!attribute [rw] segment_label_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::LabelAnnotation>] + # Label annotations on video level or user specified segment level. + # There is exactly one element for each unique label. + # @!attribute [rw] shot_label_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::LabelAnnotation>] + # Label annotations on shot level. + # There is exactly one element for each unique label. + # @!attribute [rw] frame_label_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::LabelAnnotation>] + # Label annotations on frame level. + # There is exactly one element for each unique label. + # @!attribute [rw] shot_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::VideoSegment>] + # Shot annotations. Each shot is represented as a video segment. + # @!attribute [rw] explicit_annotation + # @return [::Google::Cloud::VideoIntelligence::V1p1beta1::ExplicitContentAnnotation] + # Explicit content annotation. + # @!attribute [rw] speech_transcriptions + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::SpeechTranscription>] + # Speech transcription. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # Output only. If set, indicates an error. Note that for a single + # `AnnotateVideoRequest` some videos may succeed and some may fail. + class VideoAnnotationResults + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video annotation response. Included in the `response` + # field of the `Operation` returned by the `GetOperation` + # call of the `google::longrunning::Operations` service. + # @!attribute [rw] annotation_results + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::VideoAnnotationResults>] + # Annotation results for all videos specified in `AnnotateVideoRequest`. + class AnnotateVideoResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Annotation progress for a single video. + # @!attribute [rw] input_uri + # @return [::String] + # Output only. Video file location in + # [Google Cloud Storage](https://cloud.google.com/storage/). + # @!attribute [rw] progress_percent + # @return [::Integer] + # Output only. Approximate percentage processed thus far. Guaranteed to be + # 100 when fully processed. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the request was received. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time of the most recent update. + class VideoAnnotationProgress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video annotation progress. Included in the `metadata` + # field of the `Operation` returned by the `GetOperation` + # call of the `google::longrunning::Operations` service. + # @!attribute [rw] annotation_progress + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::VideoAnnotationProgress>] + # Progress metadata for all videos specified in `AnnotateVideoRequest`. + class AnnotateVideoProgress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for SPEECH_TRANSCRIPTION. + # @!attribute [rw] language_code + # @return [::String] + # Required. *Required* The language of the supplied audio as a + # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + # Example: "en-US". + # See [Language Support](https://cloud.google.com/speech/docs/languages) + # for a list of the currently supported language codes. + # @!attribute [rw] max_alternatives + # @return [::Integer] + # Optional. Maximum number of recognition hypotheses to be returned. + # Specifically, the maximum number of `SpeechRecognitionAlternative` messages + # within each `SpeechTranscription`. The server may return fewer than + # `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will + # return a maximum of one. If omitted, will return a maximum of one. + # @!attribute [rw] filter_profanity + # @return [::Boolean] + # Optional. If set to `true`, the server will attempt to filter out + # profanities, replacing all but the initial character in each filtered word + # with asterisks, e.g. "f***". If set to `false` or omitted, profanities + # won't be filtered out. + # @!attribute [rw] speech_contexts + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::SpeechContext>] + # Optional. A means to provide context to assist the speech recognition. + # @!attribute [rw] enable_automatic_punctuation + # @return [::Boolean] + # Optional. If 'true', adds punctuation to recognition result hypotheses. + # This feature is only available in select languages. Setting this for + # requests in other languages has no effect at all. The default 'false' value + # does not add punctuation to result hypotheses. NOTE: "This is currently + # offered as an experimental service, complimentary to all users. In the + # future this may be exclusively available as a premium feature." + # @!attribute [rw] audio_tracks + # @return [::Array<::Integer>] + # Optional. For file formats, such as MXF or MKV, supporting multiple audio + # tracks, specify up to two tracks. Default: track 0. + class SpeechTranscriptionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides "hints" to the speech recognizer to favor specific words and phrases + # in the results. + # @!attribute [rw] phrases + # @return [::Array<::String>] + # Optional. A list of strings containing words and phrases "hints" so that + # the speech recognition is more likely to recognize them. This can be used + # to improve the accuracy for specific words and phrases, for example, if + # specific commands are typically spoken by the user. This can also be used + # to add additional words to the vocabulary of the recognizer. See + # [usage limits](https://cloud.google.com/speech/limits#content). + class SpeechContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A speech recognition result corresponding to a portion of the audio. + # @!attribute [rw] alternatives + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::SpeechRecognitionAlternative>] + # May contain one or more recognition hypotheses (up to the maximum specified + # in `max_alternatives`). These alternatives are ordered in terms of + # accuracy, with the top (first) alternative being the most probable, as + # ranked by the recognizer. + class SpeechTranscription + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Alternative hypotheses (a.k.a. n-best list). + # @!attribute [rw] transcript + # @return [::String] + # Output only. Transcript text representing the words that the user spoke. + # @!attribute [r] confidence + # @return [::Float] + # Output only. The confidence estimate between 0.0 and 1.0. A higher number + # indicates an estimated greater likelihood that the recognized words are + # correct. This field is set only for the top alternative. + # This field is not guaranteed to be accurate and users should not rely on it + # to be always provided. + # The default of 0.0 is a sentinel value indicating `confidence` was not set. + # @!attribute [rw] words + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::WordInfo>] + # Output only. A list of word-specific information for each recognized word. + class SpeechRecognitionAlternative + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Word-specific information for recognized words. Word information is only + # included in the response when certain request parameters are set, such + # as `enable_word_time_offsets`. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Duration] + # Output only. Time offset relative to the beginning of the audio, and + # corresponding to the start of the spoken word. This field is only set if + # `enable_word_time_offsets=true` and only in the top hypothesis. This is an + # experimental feature and the accuracy of the time offset can vary. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Duration] + # Output only. Time offset relative to the beginning of the audio, and + # corresponding to the end of the spoken word. This field is only set if + # `enable_word_time_offsets=true` and only in the top hypothesis. This is an + # experimental feature and the accuracy of the time offset can vary. + # @!attribute [rw] word + # @return [::String] + # Output only. The word corresponding to this set of information. + class WordInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video annotation feature. + module Feature + # Unspecified. + FEATURE_UNSPECIFIED = 0 + + # Label detection. Detect objects, such as dog or flower. + LABEL_DETECTION = 1 + + # Shot change detection. + SHOT_CHANGE_DETECTION = 2 + + # Explicit content detection. + EXPLICIT_CONTENT_DETECTION = 3 + + # Speech transcription. + SPEECH_TRANSCRIPTION = 6 + end + + # Label detection mode. + module LabelDetectionMode + # Unspecified. + LABEL_DETECTION_MODE_UNSPECIFIED = 0 + + # Detect shot-level labels. + SHOT_MODE = 1 + + # Detect frame-level labels. + FRAME_MODE = 2 + + # Detect both shot-level and frame-level labels. + SHOT_AND_FRAME_MODE = 3 + end + + # Bucketized representation of likelihood. + module Likelihood + # Unspecified likelihood. + LIKELIHOOD_UNSPECIFIED = 0 + + # Very unlikely. + VERY_UNLIKELY = 1 + + # Unlikely. + UNLIKELY = 2 + + # Possible. + POSSIBLE = 3 + + # Likely. + LIKELY = 4 + + # Very likely. + VERY_LIKELY = 5 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/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-video_intelligence-v1p1beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/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-video_intelligence-v1p1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/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-video_intelligence-v1p1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/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-video_intelligence-v1p1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/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-video_intelligence-v1p1beta1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/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-video_intelligence-v1p1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/snippets/Gemfile new file mode 100644 index 000000000000..2d2fbb5d740a --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/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-video_intelligence-v1p1beta1", path: "../" +else + gem "google-cloud-video_intelligence-v1p1beta1" +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-video_intelligence-v1p1beta1/snippets/snippet_metadata_google.cloud.videointelligence.v1p1beta1.json b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/snippets/snippet_metadata_google.cloud.videointelligence.v1p1beta1.json new file mode 100644 index 000000000000..124ae10d2592 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/snippets/snippet_metadata_google.cloud.videointelligence.v1p1beta1.json @@ -0,0 +1,55 @@ +{ + "client_library": { + "name": "google-cloud-video_intelligence-v1p1beta1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.videointelligence.v1p1beta1", + "version": "v1p1beta1" + } + ] + }, + "snippets": [ + { + "region_tag": "videointelligence_v1p1beta1_generated_VideoIntelligenceService_AnnotateVideo_sync", + "title": "Snippet for the annotate_video call in the VideoIntelligenceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client#annotate_video.", + "file": "video_intelligence_service/annotate_video.rb", + "language": "RUBY", + "client_method": { + "short_name": "annotate_video", + "full_name": "::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client#annotate_video", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "VideoIntelligenceService::Client", + "full_name": "::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client" + }, + "method": { + "short_name": "AnnotateVideo", + "full_name": "google.cloud.videointelligence.v1p1beta1.VideoIntelligenceService.AnnotateVideo", + "service": { + "short_name": "VideoIntelligenceService", + "full_name": "google.cloud.videointelligence.v1p1beta1.VideoIntelligenceService" + } + } + }, + "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-video_intelligence-v1p1beta1/snippets/video_intelligence_service/annotate_video.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/snippets/video_intelligence_service/annotate_video.rb new file mode 100644 index 000000000000..e815c58e72cf --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/snippets/video_intelligence_service/annotate_video.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 videointelligence_v1p1beta1_generated_VideoIntelligenceService_AnnotateVideo_sync] +require "google/cloud/video_intelligence/v1p1beta1" + +## +# Snippet for the annotate_video call in the VideoIntelligenceService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client#annotate_video. +# +def annotate_video + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest.new + + # Call the annotate_video method. + result = client.annotate_video request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END videointelligence_v1p1beta1_generated_VideoIntelligenceService_AnnotateVideo_sync] diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_operations_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_operations_test.rb new file mode 100644 index 000000000000..38365ebb437d --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/google/cloud/video_intelligence/v1p1beta1/video_intelligence_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/videointelligence/v1p1beta1/video_intelligence_pb" +require "google/cloud/videointelligence/v1p1beta1/video_intelligence_services_pb" +require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service" + +class ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_rest_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_rest_test.rb new file mode 100644 index 000000000000..8cc3c3f40336 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_rest_test.rb @@ -0,0 +1,158 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/videointelligence/v1p1beta1/video_intelligence_pb" +require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest" + + +class ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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_annotate_video + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + input_uri = "hello world" + input_content = "hello world" + features = [:FEATURE_UNSPECIFIED] + video_context = {} + output_uri = "hello world" + location_id = "hello world" + + annotate_video_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::ServiceStub.stub :transcode_annotate_video_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, annotate_video_client_stub do + # Create client + client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.annotate_video input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.annotate_video ::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.annotate_video(::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, annotate_video_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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_test.rb new file mode 100644 index 000000000000..d7c34a426e49 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_test.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! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/videointelligence/v1p1beta1/video_intelligence_pb" +require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service" + +class ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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_annotate_video + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + input_uri = "hello world" + input_content = "hello world" + features = [:FEATURE_UNSPECIFIED] + video_context = {} + output_uri = "hello world" + location_id = "hello world" + + annotate_video_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :annotate_video, name + assert_kind_of ::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest, request + assert_equal "hello world", request["input_uri"] + assert_equal "hello world", request["input_content"] + assert_equal [:FEATURE_UNSPECIFIED], request["features"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoContext), request["video_context"] + assert_equal "hello world", request["output_uri"] + assert_equal "hello world", request["location_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, annotate_video_client_stub do + # Create client + client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video ::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video(::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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, annotate_video_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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/helper.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.gitignore b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.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-video_intelligence-v1p2beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.repo-metadata.json new file mode 100644 index 000000000000..8230f83917bf --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "videointelligence.googleapis.com", + "api_shortname": "videointelligence", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-video_intelligence-v1p2beta1/latest", + "distribution_name": "google-cloud-video_intelligence-v1p2beta1", + "is_cloud": true, + "language": "ruby", + "name": "videointelligence", + "name_pretty": "Cloud Video Intelligence V1p2beta1 API", + "product_documentation": "https://cloud.google.com/video-intelligence", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API. Note that google-cloud-video_intelligence-v1p2beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video_intelligence instead. See the readme for more details.", + "ruby-cloud-env-prefix": "VIDEO_INTELLIGENCE", + "ruby-cloud-product-url": "https://cloud.google.com/video-intelligence", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.rubocop.yml b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.rubocop.yml new file mode 100644 index 000000000000..334ea0e42e58 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-video_intelligence-v1p2beta1.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-video_intelligence-v1p2beta1.rb" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.toys.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.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-video_intelligence-v1p2beta1/.yardopts b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.yardopts new file mode 100644 index 000000000000..0538001fd5b8 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Video Intelligence V1p2beta1 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-video_intelligence-v1p2beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/AUTHENTICATION.md new file mode 100644 index 000000000000..202c74ac9973 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-video_intelligence-v1p2beta1 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-video_intelligence-v1p2beta1 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/video_intelligence/v1p2beta1" + +client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/video_intelligence/v1p2beta1" + +::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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-video_intelligence-v1p2beta1 +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/video_intelligence/v1p2beta1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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-video_intelligence-v1p2beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/Gemfile b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/LICENSE.md b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/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-video_intelligence-v1p2beta1/README.md b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/README.md new file mode 100644 index 000000000000..0fee75515965 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the Cloud Video Intelligence V1p2beta1 API + +Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming 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 Cloud Video Intelligence V1p2beta1 API. Most users should consider using +the main client gem, +[google-cloud-video_intelligence](https://rubygems.org/gems/google-cloud-video_intelligence). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-video_intelligence-v1p2beta1 +``` + +## 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/videointelligence.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/video_intelligence/v1p2beta1" + +client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.new +request = ::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest.new # (request fields as keyword arguments...) +response = client.annotate_video request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-video_intelligence-v1p2beta1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/video-intelligence) +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/video_intelligence/v1p2beta1" +require "logger" + +client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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-video_intelligence`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-video_intelligence-v1p2beta1`. +_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-video_intelligence`. +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-video_intelligence-v1p2beta1`. + +### 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-video_intelligence-v1p2beta1/Rakefile b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/Rakefile new file mode 100644 index 000000000000..ba2b0edee9ea --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/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-video_intelligence-v1p2beta1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["VIDEO_INTELLIGENCE_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["VIDEO_INTELLIGENCE_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["VIDEO_INTELLIGENCE_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 VIDEO_INTELLIGENCE_TEST_PROJECT=test123 VIDEO_INTELLIGENCE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/credentials" + ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["VIDEO_INTELLIGENCE_PROJECT"] = project + ENV["VIDEO_INTELLIGENCE_TEST_PROJECT"] = project + ENV["VIDEO_INTELLIGENCE_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-video_intelligence-v1p2beta1 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-video_intelligence-v1p2beta1 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-video_intelligence-v1p2beta1 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-video_intelligence-v1p2beta1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-video_intelligence-v1p2beta1" + header "google-cloud-video_intelligence-v1p2beta1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-video_intelligence-v1p2beta1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-video_intelligence-v1p2beta1 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-video_intelligence-v1p2beta1 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-video_intelligence-v1p2beta1 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-video_intelligence-v1p2beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/gapic_metadata.json new file mode 100644 index 000000000000..da4d73c9c709 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/gapic_metadata.json @@ -0,0 +1,23 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.videointelligence.v1p2beta1", + "libraryPackage": "::Google::Cloud::VideoIntelligence::V1p2beta1", + "services": { + "VideoIntelligenceService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client", + "rpcs": { + "AnnotateVideo": { + "methods": [ + "annotate_video" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/google-cloud-video_intelligence-v1p2beta1.gemspec b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/google-cloud-video_intelligence-v1p2beta1.gemspec new file mode 100644 index 000000000000..b334769ff6ca --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/google-cloud-video_intelligence-v1p2beta1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/video_intelligence/v1p2beta1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-video_intelligence-v1p2beta1" + gem.version = Google::Cloud::VideoIntelligence::V1p2beta1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API. Note that google-cloud-video_intelligence-v1p2beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video_intelligence instead. See the readme for more details." + gem.summary = "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming 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.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google-cloud-video_intelligence-v1p2beta1.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google-cloud-video_intelligence-v1p2beta1.rb new file mode 100644 index 000000000000..9c679f753c91 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google-cloud-video_intelligence-v1p2beta1.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/video_intelligence/v1p2beta1" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1.rb new file mode 100644 index 000000000000..90127baade2f --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1.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/video_intelligence/v1p2beta1/video_intelligence_service" +require "google/cloud/video_intelligence/v1p2beta1/version" + +module Google + module Cloud + module VideoIntelligence + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/video_intelligence/v1p2beta1" + # client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/video_intelligence/v1p2beta1" + # client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Client.new + # + module V1p2beta1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1p2beta1", "_helpers.rb" +require "google/cloud/video_intelligence/v1p2beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/rest.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/rest.rb new file mode 100644 index 000000000000..8735000bb9f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/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/video_intelligence/v1p2beta1/video_intelligence_service/rest" +require "google/cloud/video_intelligence/v1p2beta1/version" + +module Google + module Cloud + module VideoIntelligence + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/video_intelligence/v1p2beta1/rest" + # client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Client.new + # + module V1p2beta1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/version.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/version.rb new file mode 100644 index 000000000000..9f9cba15b4b4 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/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 VideoIntelligence + module V1p2beta1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service.rb new file mode 100644 index 000000000000..db73f2bad942 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service.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/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/video_intelligence/v1p2beta1/version" + +require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/credentials" +require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/operations" +require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/client" +require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest" + +module Google + module Cloud + module VideoIntelligence + module V1p2beta1 + ## + # Service that implements Google Cloud Video Intelligence API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service" + # client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest" + # client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Client.new + # + module VideoIntelligenceService + end + end + end + end +end + +helper_path = ::File.join __dir__, "video_intelligence_service", "helpers.rb" +require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/client.rb new file mode 100644 index 000000000000..7a684b23a9ed --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/client.rb @@ -0,0 +1,523 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/videointelligence/v1p2beta1/video_intelligence_pb" + +module Google + module Cloud + module VideoIntelligence + module V1p2beta1 + module VideoIntelligenceService + ## + # Client for the VideoIntelligenceService service. + # + # Service that implements Google Cloud Video Intelligence API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :video_intelligence_service_stub + + ## + # Configure the VideoIntelligenceService Client class. + # + # See {::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all VideoIntelligenceService clients + # ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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", "VideoIntelligence", "V1p2beta1"] + 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.annotate_video.timeout = 600.0 + default_config.rpcs.annotate_video.retry_policy = { + initial_delay: 1.0, max_delay: 120.0, multiplier: 2.5, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the VideoIntelligenceService 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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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 + @video_intelligence_service_stub.universe_domain + end + + ## + # Create a new VideoIntelligenceService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the VideoIntelligenceService 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/videointelligence/v1p2beta1/video_intelligence_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 + + @video_intelligence_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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 + ) + + @video_intelligence_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 + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @video_intelligence_service_stub.logger + end + + # Service calls + + ## + # Performs asynchronous video annotation. Progress and results can be + # retrieved through the `google.longrunning.Operations` interface. + # `Operation.metadata` contains `AnnotateVideoProgress` (progress). + # `Operation.response` contains `AnnotateVideoResponse` (results). + # + # @overload annotate_video(request, options = nil) + # Pass arguments to `annotate_video` via a request object, either of type + # {::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload annotate_video(input_uri: nil, input_content: nil, features: nil, video_context: nil, output_uri: nil, location_id: nil) + # Pass arguments to `annotate_video` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param input_uri [::String] + # Input video location. Currently, only + # [Google Cloud Storage](https://cloud.google.com/storage/) URIs are + # supported, which must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see + # [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). + # A video URI may include wildcards in `object-id`, and thus identify + # multiple videos. Supported wildcards: '*' to match 0 or more characters; + # '?' to match 1 character. If unset, the input video should be embedded + # in the request as `input_content`. If set, `input_content` should be unset. + # @param input_content [::String] + # The video data bytes. + # If unset, the input video(s) should be specified via `input_uri`. + # If set, `input_uri` should be unset. + # @param features [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::Feature>] + # Required. Requested video annotation features. + # @param video_context [::Google::Cloud::VideoIntelligence::V1p2beta1::VideoContext, ::Hash] + # Additional video context and/or feature-specific parameters. + # @param output_uri [::String] + # Optional. Location where the output (in JSON format) should be stored. + # Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) + # URIs are supported, which must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see + # [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). + # @param location_id [::String] + # Optional. Cloud region where annotation should take place. Supported cloud + # regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region + # is specified, a region will be determined based on video file 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/video_intelligence/v1p2beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest.new + # + # # Call the annotate_video method. + # result = client.annotate_video request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def annotate_video request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.annotate_video.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::VideoIntelligence::V1p2beta1::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.annotate_video.timeout, + metadata: metadata, + retry_policy: @config.rpcs.annotate_video.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_intelligence_service_stub.call_rpc :annotate_video, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 VideoIntelligenceService API. + # + # This class represents the configuration for VideoIntelligenceService, + # 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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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 + # # annotate_video to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.annotate_video.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.annotate_video.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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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 = "videointelligence.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 VideoIntelligenceService 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 `annotate_video` + # @return [::Gapic::Config::Method] + # + attr_reader :annotate_video + + # @private + def initialize parent_rpcs = nil + annotate_video_config = parent_rpcs.annotate_video if parent_rpcs.respond_to? :annotate_video + @annotate_video = ::Gapic::Config::Method.new annotate_video_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/credentials.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/credentials.rb new file mode 100644 index 000000000000..fe67e737e5cf --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_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 VideoIntelligence + module V1p2beta1 + module VideoIntelligenceService + # Credentials for the VideoIntelligenceService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "VIDEO_INTELLIGENCE_CREDENTIALS", + "VIDEO_INTELLIGENCE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "VIDEO_INTELLIGENCE_CREDENTIALS_JSON", + "VIDEO_INTELLIGENCE_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-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/operations.rb new file mode 100644 index 000000000000..cd05e3cf0072 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_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 VideoIntelligence + module V1p2beta1 + module VideoIntelligenceService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the VideoIntelligenceService 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 VideoIntelligenceService 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::VideoIntelligence::V1p2beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::VideoIntelligence::V1p2beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::VideoIntelligence::V1p2beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::VideoIntelligence::V1p2beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::VideoIntelligence::V1p2beta1::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 = "videointelligence.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-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest.rb new file mode 100644 index 000000000000..d266c03a77a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest.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 "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/video_intelligence/v1p2beta1/version" + +require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/credentials" +require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/operations" +require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/client" + +module Google + module Cloud + module VideoIntelligence + module V1p2beta1 + ## + # Service that implements Google Cloud Video Intelligence API. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest" + # client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Client.new + # + module VideoIntelligenceService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/client.rb new file mode 100644 index 000000000000..5e9e2bcc6d33 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/client.rb @@ -0,0 +1,481 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/videointelligence/v1p2beta1/video_intelligence_pb" +require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/service_stub" + +module Google + module Cloud + module VideoIntelligence + module V1p2beta1 + module VideoIntelligenceService + module Rest + ## + # REST client for the VideoIntelligenceService service. + # + # Service that implements Google Cloud Video Intelligence API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :video_intelligence_service_stub + + ## + # Configure the VideoIntelligenceService Client class. + # + # See {::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all VideoIntelligenceService clients + # ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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", "VideoIntelligence", "V1p2beta1"] + 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.annotate_video.timeout = 600.0 + default_config.rpcs.annotate_video.retry_policy = { + initial_delay: 1.0, max_delay: 120.0, multiplier: 2.5, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the VideoIntelligenceService 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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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 + @video_intelligence_service_stub.universe_domain + end + + ## + # Create a new VideoIntelligenceService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the VideoIntelligenceService 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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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 + + @video_intelligence_service_stub = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @video_intelligence_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 + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @video_intelligence_service_stub.logger + end + + # Service calls + + ## + # Performs asynchronous video annotation. Progress and results can be + # retrieved through the `google.longrunning.Operations` interface. + # `Operation.metadata` contains `AnnotateVideoProgress` (progress). + # `Operation.response` contains `AnnotateVideoResponse` (results). + # + # @overload annotate_video(request, options = nil) + # Pass arguments to `annotate_video` via a request object, either of type + # {::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload annotate_video(input_uri: nil, input_content: nil, features: nil, video_context: nil, output_uri: nil, location_id: nil) + # Pass arguments to `annotate_video` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param input_uri [::String] + # Input video location. Currently, only + # [Google Cloud Storage](https://cloud.google.com/storage/) URIs are + # supported, which must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see + # [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). + # A video URI may include wildcards in `object-id`, and thus identify + # multiple videos. Supported wildcards: '*' to match 0 or more characters; + # '?' to match 1 character. If unset, the input video should be embedded + # in the request as `input_content`. If set, `input_content` should be unset. + # @param input_content [::String] + # The video data bytes. + # If unset, the input video(s) should be specified via `input_uri`. + # If set, `input_uri` should be unset. + # @param features [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::Feature>] + # Required. Requested video annotation features. + # @param video_context [::Google::Cloud::VideoIntelligence::V1p2beta1::VideoContext, ::Hash] + # Additional video context and/or feature-specific parameters. + # @param output_uri [::String] + # Optional. Location where the output (in JSON format) should be stored. + # Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) + # URIs are supported, which must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see + # [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). + # @param location_id [::String] + # Optional. Cloud region where annotation should take place. Supported cloud + # regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region + # is specified, a region will be determined based on video file 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/video_intelligence/v1p2beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest.new + # + # # Call the annotate_video method. + # result = client.annotate_video request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def annotate_video request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.annotate_video.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::VideoIntelligence::V1p2beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.annotate_video.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.annotate_video.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_intelligence_service_stub.annotate_video request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 VideoIntelligenceService REST API. + # + # This class represents the configuration for VideoIntelligenceService 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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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 + # # annotate_video to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.annotate_video.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.annotate_video.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 = "videointelligence.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 VideoIntelligenceService 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 `annotate_video` + # @return [::Gapic::Config::Method] + # + attr_reader :annotate_video + + # @private + def initialize parent_rpcs = nil + annotate_video_config = parent_rpcs.annotate_video if parent_rpcs.respond_to? :annotate_video + @annotate_video = ::Gapic::Config::Method.new annotate_video_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/operations.rb new file mode 100644 index 000000000000..f7e1a28c14d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/operations.rb @@ -0,0 +1,946 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 VideoIntelligence + module V1p2beta1 + module VideoIntelligenceService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the VideoIntelligenceService 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 VideoIntelligenceService 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::VideoIntelligence::V1p2beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1p2beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1p2beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1p2beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "videointelligence.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: "/v1p2beta1/{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: "/v1p2beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1p2beta1/operations/{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: "/v1p2beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1p2beta1/operations/{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: "/v1p2beta1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1p2beta1/operations/{name}:cancel", + 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-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/service_stub.rb new file mode 100644 index 000000000000..3758000da7a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/service_stub.rb @@ -0,0 +1,141 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/videointelligence/v1p2beta1/video_intelligence_pb" + +module Google + module Cloud + module VideoIntelligence + module V1p2beta1 + module VideoIntelligenceService + module Rest + ## + # REST service stub for the VideoIntelligenceService 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 annotate_video REST call + # + # @param request_pb [::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def annotate_video request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_annotate_video_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "annotate_video", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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 annotate_video REST call + # + # @param request_pb [::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_annotate_video_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1p2beta1/videos:annotate", + body: "*", + matches: [] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/videointelligence/v1p2beta1/video_intelligence_pb.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/videointelligence/v1p2beta1/video_intelligence_pb.rb new file mode 100644 index 000000000000..d1fca6dad5f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/videointelligence/v1p2beta1/video_intelligence_pb.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/videointelligence/v1p2beta1/video_intelligence.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nAgoogle/cloud/videointelligence/v1p2beta1/video_intelligence.proto\x12(google.cloud.videointelligence.v1p2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x8c\x02\n\x14\x41nnotateVideoRequest\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\x15\n\rinput_content\x18\x06 \x01(\x0c\x12H\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0e\x32\x31.google.cloud.videointelligence.v1p2beta1.FeatureB\x03\xe0\x41\x02\x12M\n\rvideo_context\x18\x03 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p2beta1.VideoContext\x12\x17\n\noutput_uri\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0blocation_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xf6\x03\n\x0cVideoContext\x12H\n\x08segments\x18\x01 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1p2beta1.VideoSegment\x12^\n\x16label_detection_config\x18\x02 \x01(\x0b\x32>.google.cloud.videointelligence.v1p2beta1.LabelDetectionConfig\x12i\n\x1cshot_change_detection_config\x18\x03 \x01(\x0b\x32\x43.google.cloud.videointelligence.v1p2beta1.ShotChangeDetectionConfig\x12s\n!explicit_content_detection_config\x18\x04 \x01(\x0b\x32H.google.cloud.videointelligence.v1p2beta1.ExplicitContentDetectionConfig\x12\\\n\x15text_detection_config\x18\x08 \x01(\x0b\x32=.google.cloud.videointelligence.v1p2beta1.TextDetectionConfig\"\x9c\x01\n\x14LabelDetectionConfig\x12Z\n\x14label_detection_mode\x18\x01 \x01(\x0e\x32<.google.cloud.videointelligence.v1p2beta1.LabelDetectionMode\x12\x19\n\x11stationary_camera\x18\x02 \x01(\x08\x12\r\n\x05model\x18\x03 \x01(\t\"*\n\x19ShotChangeDetectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\"/\n\x1e\x45xplicitContentDetectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\"-\n\x13TextDetectionConfig\x12\x16\n\x0elanguage_hints\x18\x01 \x03(\t\"x\n\x0cVideoSegment\x12\x34\n\x11start_time_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0f\x65nd_time_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"k\n\x0cLabelSegment\x12G\n\x07segment\x18\x01 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p2beta1.VideoSegment\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"P\n\nLabelFrame\x12.\n\x0btime_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"G\n\x06\x45ntity\x12\x11\n\tentity_id\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x15\n\rlanguage_code\x18\x03 \x01(\t\"\xb0\x02\n\x0fLabelAnnotation\x12@\n\x06\x65ntity\x18\x01 \x01(\x0b\x32\x30.google.cloud.videointelligence.v1p2beta1.Entity\x12K\n\x11\x63\x61tegory_entities\x18\x02 \x03(\x0b\x32\x30.google.cloud.videointelligence.v1p2beta1.Entity\x12H\n\x08segments\x18\x03 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1p2beta1.LabelSegment\x12\x44\n\x06\x66rames\x18\x04 \x03(\x0b\x32\x34.google.cloud.videointelligence.v1p2beta1.LabelFrame\"\x9c\x01\n\x14\x45xplicitContentFrame\x12.\n\x0btime_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12T\n\x16pornography_likelihood\x18\x02 \x01(\x0e\x32\x34.google.cloud.videointelligence.v1p2beta1.Likelihood\"k\n\x19\x45xplicitContentAnnotation\x12N\n\x06\x66rames\x18\x01 \x03(\x0b\x32>.google.cloud.videointelligence.v1p2beta1.ExplicitContentFrame\"Q\n\x15NormalizedBoundingBox\x12\x0c\n\x04left\x18\x01 \x01(\x02\x12\x0b\n\x03top\x18\x02 \x01(\x02\x12\r\n\x05right\x18\x03 \x01(\x02\x12\x0e\n\x06\x62ottom\x18\x04 \x01(\x02\"\xcb\x05\n\x16VideoAnnotationResults\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\\\n\x19segment_label_annotations\x18\x02 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p2beta1.LabelAnnotation\x12Y\n\x16shot_label_annotations\x18\x03 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p2beta1.LabelAnnotation\x12Z\n\x17\x66rame_label_annotations\x18\x04 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p2beta1.LabelAnnotation\x12P\n\x10shot_annotations\x18\x06 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1p2beta1.VideoSegment\x12`\n\x13\x65xplicit_annotation\x18\x07 \x01(\x0b\x32\x43.google.cloud.videointelligence.v1p2beta1.ExplicitContentAnnotation\x12R\n\x10text_annotations\x18\x0c \x03(\x0b\x32\x38.google.cloud.videointelligence.v1p2beta1.TextAnnotation\x12^\n\x12object_annotations\x18\x0e \x03(\x0b\x32\x42.google.cloud.videointelligence.v1p2beta1.ObjectTrackingAnnotation\x12!\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.Status\"u\n\x15\x41nnotateVideoResponse\x12\\\n\x12\x61nnotation_results\x18\x01 \x03(\x0b\x32@.google.cloud.videointelligence.v1p2beta1.VideoAnnotationResults\"\xa7\x01\n\x17VideoAnnotationProgress\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\x18\n\x10progress_percent\x18\x02 \x01(\x05\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"w\n\x15\x41nnotateVideoProgress\x12^\n\x13\x61nnotation_progress\x18\x01 \x03(\x0b\x32\x41.google.cloud.videointelligence.v1p2beta1.VideoAnnotationProgress\"(\n\x10NormalizedVertex\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\"f\n\x16NormalizedBoundingPoly\x12L\n\x08vertices\x18\x01 \x03(\x0b\x32:.google.cloud.videointelligence.v1p2beta1.NormalizedVertex\"\xaf\x01\n\x0bTextSegment\x12G\n\x07segment\x18\x01 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p2beta1.VideoSegment\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12\x43\n\x06\x66rames\x18\x03 \x03(\x0b\x32\x33.google.cloud.videointelligence.v1p2beta1.TextFrame\"\x9b\x01\n\tTextFrame\x12^\n\x14rotated_bounding_box\x18\x01 \x01(\x0b\x32@.google.cloud.videointelligence.v1p2beta1.NormalizedBoundingPoly\x12.\n\x0btime_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"g\n\x0eTextAnnotation\x12\x0c\n\x04text\x18\x01 \x01(\t\x12G\n\x08segments\x18\x02 \x03(\x0b\x32\x35.google.cloud.videointelligence.v1p2beta1.TextSegment\"\xa7\x01\n\x13ObjectTrackingFrame\x12`\n\x17normalized_bounding_box\x18\x01 \x01(\x0b\x32?.google.cloud.videointelligence.v1p2beta1.NormalizedBoundingBox\x12.\n\x0btime_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xac\x02\n\x18ObjectTrackingAnnotation\x12I\n\x07segment\x18\x03 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p2beta1.VideoSegmentH\x00\x12\x12\n\x08track_id\x18\x05 \x01(\x03H\x00\x12@\n\x06\x65ntity\x18\x01 \x01(\x0b\x32\x30.google.cloud.videointelligence.v1p2beta1.Entity\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x12M\n\x06\x66rames\x18\x02 \x03(\x0b\x32=.google.cloud.videointelligence.v1p2beta1.ObjectTrackingFrameB\x0c\n\ntrack_info*\x9b\x01\n\x07\x46\x65\x61ture\x12\x17\n\x13\x46\x45\x41TURE_UNSPECIFIED\x10\x00\x12\x13\n\x0fLABEL_DETECTION\x10\x01\x12\x19\n\x15SHOT_CHANGE_DETECTION\x10\x02\x12\x1e\n\x1a\x45XPLICIT_CONTENT_DETECTION\x10\x03\x12\x12\n\x0eTEXT_DETECTION\x10\x07\x12\x13\n\x0fOBJECT_TRACKING\x10\t*r\n\x12LabelDetectionMode\x12$\n LABEL_DETECTION_MODE_UNSPECIFIED\x10\x00\x12\r\n\tSHOT_MODE\x10\x01\x12\x0e\n\nFRAME_MODE\x10\x02\x12\x17\n\x13SHOT_AND_FRAME_MODE\x10\x03*t\n\nLikelihood\x12\x1a\n\x16LIKELIHOOD_UNSPECIFIED\x10\x00\x12\x11\n\rVERY_UNLIKELY\x10\x01\x12\x0c\n\x08UNLIKELY\x10\x02\x12\x0c\n\x08POSSIBLE\x10\x03\x12\n\n\x06LIKELY\x10\x04\x12\x0f\n\x0bVERY_LIKELY\x10\x05\x32\xce\x02\n\x18VideoIntelligenceService\x12\xdb\x01\n\rAnnotateVideo\x12>.google.cloud.videointelligence.v1p2beta1.AnnotateVideoRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41.\n\x15\x41nnotateVideoResponse\x12\x15\x41nnotateVideoProgress\xda\x41\x12input_uri,features\x82\xd3\xe4\x93\x02\x1f\"\x1a/v1p2beta1/videos:annotate:\x01*\x1aT\xca\x41 videointelligence.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xaf\x02\n,com.google.cloud.videointelligence.v1p2beta1B\x1dVideoIntelligenceServiceProtoP\x01ZZcloud.google.com/go/videointelligence/apiv1p2beta1/videointelligencepb;videointelligencepb\xaa\x02(Google.Cloud.VideoIntelligence.V1P2Beta1\xca\x02(Google\\Cloud\\VideoIntelligence\\V1p2beta1\xea\x02+Google::Cloud::VideoIntelligence::V1p2beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module VideoIntelligence + module V1p2beta1 + AnnotateVideoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.AnnotateVideoRequest").msgclass + VideoContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.VideoContext").msgclass + LabelDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.LabelDetectionConfig").msgclass + ShotChangeDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.ShotChangeDetectionConfig").msgclass + ExplicitContentDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.ExplicitContentDetectionConfig").msgclass + TextDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.TextDetectionConfig").msgclass + VideoSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.VideoSegment").msgclass + LabelSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.LabelSegment").msgclass + LabelFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.LabelFrame").msgclass + Entity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.Entity").msgclass + LabelAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.LabelAnnotation").msgclass + ExplicitContentFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.ExplicitContentFrame").msgclass + ExplicitContentAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.ExplicitContentAnnotation").msgclass + NormalizedBoundingBox = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.NormalizedBoundingBox").msgclass + VideoAnnotationResults = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.VideoAnnotationResults").msgclass + AnnotateVideoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.AnnotateVideoResponse").msgclass + VideoAnnotationProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.VideoAnnotationProgress").msgclass + AnnotateVideoProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.AnnotateVideoProgress").msgclass + NormalizedVertex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.NormalizedVertex").msgclass + NormalizedBoundingPoly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.NormalizedBoundingPoly").msgclass + TextSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.TextSegment").msgclass + TextFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.TextFrame").msgclass + TextAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.TextAnnotation").msgclass + ObjectTrackingFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.ObjectTrackingFrame").msgclass + ObjectTrackingAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.ObjectTrackingAnnotation").msgclass + Feature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.Feature").enummodule + LabelDetectionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.LabelDetectionMode").enummodule + Likelihood = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.Likelihood").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/videointelligence/v1p2beta1/video_intelligence_services_pb.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/videointelligence/v1p2beta1/video_intelligence_services_pb.rb new file mode 100644 index 000000000000..9a4d9534961b --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/videointelligence/v1p2beta1/video_intelligence_services_pb.rb @@ -0,0 +1,49 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/videointelligence/v1p2beta1/video_intelligence.proto for package 'Google.Cloud.VideoIntelligence.V1p2beta1' +# 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/videointelligence/v1p2beta1/video_intelligence_pb' + +module Google + module Cloud + module VideoIntelligence + module V1p2beta1 + module VideoIntelligenceService + # Service that implements Google Cloud Video Intelligence API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.videointelligence.v1p2beta1.VideoIntelligenceService' + + # Performs asynchronous video annotation. Progress and results can be + # retrieved through the `google.longrunning.Operations` interface. + # `Operation.metadata` contains `AnnotateVideoProgress` (progress). + # `Operation.response` contains `AnnotateVideoResponse` (results). + rpc :AnnotateVideo, ::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/README.md new file mode 100644 index 000000000000..0cebb7431296 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Video Intelligence V1p2beta1 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-video_intelligence-v1p2beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # 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. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + # + # Example: + # + # 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 + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # 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 + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # 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 + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/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-video_intelligence-v1p2beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/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-video_intelligence-v1p2beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/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-video_intelligence-v1p2beta1/proto_docs/google/cloud/videointelligence/v1p2beta1/video_intelligence.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/cloud/videointelligence/v1p2beta1/video_intelligence.rb new file mode 100644 index 000000000000..960a7e17a23e --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/cloud/videointelligence/v1p2beta1/video_intelligence.rb @@ -0,0 +1,534 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module VideoIntelligence + module V1p2beta1 + # Video annotation request. + # @!attribute [rw] input_uri + # @return [::String] + # Input video location. Currently, only + # [Google Cloud Storage](https://cloud.google.com/storage/) URIs are + # supported, which must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see + # [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). + # A video URI may include wildcards in `object-id`, and thus identify + # multiple videos. Supported wildcards: '*' to match 0 or more characters; + # '?' to match 1 character. If unset, the input video should be embedded + # in the request as `input_content`. If set, `input_content` should be unset. + # @!attribute [rw] input_content + # @return [::String] + # The video data bytes. + # If unset, the input video(s) should be specified via `input_uri`. + # If set, `input_uri` should be unset. + # @!attribute [rw] features + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::Feature>] + # Required. Requested video annotation features. + # @!attribute [rw] video_context + # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::VideoContext] + # Additional video context and/or feature-specific parameters. + # @!attribute [rw] output_uri + # @return [::String] + # Optional. Location where the output (in JSON format) should be stored. + # Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) + # URIs are supported, which must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see + # [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). + # @!attribute [rw] location_id + # @return [::String] + # Optional. Cloud region where annotation should take place. Supported cloud + # regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region + # is specified, a region will be determined based on video file location. + class AnnotateVideoRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video context and/or feature-specific parameters. + # @!attribute [rw] segments + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::VideoSegment>] + # Video segments to annotate. The segments may overlap and are not required + # to be contiguous or span the whole video. If unspecified, each video is + # treated as a single segment. + # @!attribute [rw] label_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::LabelDetectionConfig] + # Config for LABEL_DETECTION. + # @!attribute [rw] shot_change_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::ShotChangeDetectionConfig] + # Config for SHOT_CHANGE_DETECTION. + # @!attribute [rw] explicit_content_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::ExplicitContentDetectionConfig] + # Config for EXPLICIT_CONTENT_DETECTION. + # @!attribute [rw] text_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::TextDetectionConfig] + # Config for TEXT_DETECTION. + class VideoContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for LABEL_DETECTION. + # @!attribute [rw] label_detection_mode + # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::LabelDetectionMode] + # What labels should be detected with LABEL_DETECTION, in addition to + # video-level labels or segment-level labels. + # If unspecified, defaults to `SHOT_MODE`. + # @!attribute [rw] stationary_camera + # @return [::Boolean] + # Whether the video has been shot from a stationary (i.e. non-moving) camera. + # When set to true, might improve detection accuracy for moving objects. + # Should be used with `SHOT_AND_FRAME_MODE` enabled. + # @!attribute [rw] model + # @return [::String] + # Model to use for label detection. + # Supported values: "builtin/stable" (the default if unset) and + # "builtin/latest". + class LabelDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for SHOT_CHANGE_DETECTION. + # @!attribute [rw] model + # @return [::String] + # Model to use for shot change detection. + # Supported values: "builtin/stable" (the default if unset) and + # "builtin/latest". + class ShotChangeDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for EXPLICIT_CONTENT_DETECTION. + # @!attribute [rw] model + # @return [::String] + # Model to use for explicit content detection. + # Supported values: "builtin/stable" (the default if unset) and + # "builtin/latest". + class ExplicitContentDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for TEXT_DETECTION. + # @!attribute [rw] language_hints + # @return [::Array<::String>] + # Language hint can be specified if the language to be detected is known a + # priori. It can increase the accuracy of the detection. Language hint must + # be language code in BCP-47 format. + # + # Automatic language detection is performed if no hint is provided. + class TextDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video segment. + # @!attribute [rw] start_time_offset + # @return [::Google::Protobuf::Duration] + # Time-offset, relative to the beginning of the video, + # corresponding to the start of the segment (inclusive). + # @!attribute [rw] end_time_offset + # @return [::Google::Protobuf::Duration] + # Time-offset, relative to the beginning of the video, + # corresponding to the end of the segment (inclusive). + class VideoSegment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video segment level annotation results for label detection. + # @!attribute [rw] segment + # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::VideoSegment] + # Video segment where a label was detected. + # @!attribute [rw] confidence + # @return [::Float] + # Confidence that the label is accurate. Range: [0, 1]. + class LabelSegment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video frame level annotation results for label detection. + # @!attribute [rw] time_offset + # @return [::Google::Protobuf::Duration] + # Time-offset, relative to the beginning of the video, corresponding to the + # video frame for this location. + # @!attribute [rw] confidence + # @return [::Float] + # Confidence that the label is accurate. Range: [0, 1]. + class LabelFrame + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Detected entity from video analysis. + # @!attribute [rw] entity_id + # @return [::String] + # Opaque entity ID. Some IDs may be available in + # [Google Knowledge Graph Search + # API](https://developers.google.com/knowledge-graph/). + # @!attribute [rw] description + # @return [::String] + # Textual description, e.g. `Fixed-gear bicycle`. + # @!attribute [rw] language_code + # @return [::String] + # Language code for `description` in BCP-47 format. + class Entity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Label annotation. + # @!attribute [rw] entity + # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::Entity] + # Detected entity. + # @!attribute [rw] category_entities + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::Entity>] + # Common categories for the detected entity. + # E.g. when the label is `Terrier` the category is likely `dog`. And in some + # cases there might be more than one categories e.g. `Terrier` could also be + # a `pet`. + # @!attribute [rw] segments + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::LabelSegment>] + # All video segments where a label was detected. + # @!attribute [rw] frames + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::LabelFrame>] + # All video frames where a label was detected. + class LabelAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video frame level annotation results for explicit content. + # @!attribute [rw] time_offset + # @return [::Google::Protobuf::Duration] + # Time-offset, relative to the beginning of the video, corresponding to the + # video frame for this location. + # @!attribute [rw] pornography_likelihood + # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::Likelihood] + # Likelihood of the pornography content.. + class ExplicitContentFrame + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Explicit content annotation (based on per-frame visual signals only). + # If no explicit content has been detected in a frame, no annotations are + # present for that frame. + # @!attribute [rw] frames + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::ExplicitContentFrame>] + # All video frames where explicit content was detected. + class ExplicitContentAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Normalized bounding box. + # The normalized vertex coordinates are relative to the original image. + # Range: [0, 1]. + # @!attribute [rw] left + # @return [::Float] + # Left X coordinate. + # @!attribute [rw] top + # @return [::Float] + # Top Y coordinate. + # @!attribute [rw] right + # @return [::Float] + # Right X coordinate. + # @!attribute [rw] bottom + # @return [::Float] + # Bottom Y coordinate. + class NormalizedBoundingBox + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Annotation results for a single video. + # @!attribute [rw] input_uri + # @return [::String] + # Video file location in + # [Google Cloud Storage](https://cloud.google.com/storage/). + # @!attribute [rw] segment_label_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::LabelAnnotation>] + # Label annotations on video level or user specified segment level. + # There is exactly one element for each unique label. + # @!attribute [rw] shot_label_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::LabelAnnotation>] + # Label annotations on shot level. + # There is exactly one element for each unique label. + # @!attribute [rw] frame_label_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::LabelAnnotation>] + # Label annotations on frame level. + # There is exactly one element for each unique label. + # @!attribute [rw] shot_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::VideoSegment>] + # Shot annotations. Each shot is represented as a video segment. + # @!attribute [rw] explicit_annotation + # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::ExplicitContentAnnotation] + # Explicit content annotation. + # @!attribute [rw] text_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::TextAnnotation>] + # OCR text detection and tracking. + # Annotations for list of detected text snippets. Each will have list of + # frame information associated with it. + # @!attribute [rw] object_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::ObjectTrackingAnnotation>] + # Annotations for list of objects detected and tracked in video. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # If set, indicates an error. Note that for a single `AnnotateVideoRequest` + # some videos may succeed and some may fail. + class VideoAnnotationResults + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video annotation response. Included in the `response` + # field of the `Operation` returned by the `GetOperation` + # call of the `google::longrunning::Operations` service. + # @!attribute [rw] annotation_results + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::VideoAnnotationResults>] + # Annotation results for all videos specified in `AnnotateVideoRequest`. + class AnnotateVideoResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Annotation progress for a single video. + # @!attribute [rw] input_uri + # @return [::String] + # Video file location in + # [Google Cloud Storage](https://cloud.google.com/storage/). + # @!attribute [rw] progress_percent + # @return [::Integer] + # Approximate percentage processed thus far. Guaranteed to be + # 100 when fully processed. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Time when the request was received. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Time of the most recent update. + class VideoAnnotationProgress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video annotation progress. Included in the `metadata` + # field of the `Operation` returned by the `GetOperation` + # call of the `google::longrunning::Operations` service. + # @!attribute [rw] annotation_progress + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::VideoAnnotationProgress>] + # Progress metadata for all videos specified in `AnnotateVideoRequest`. + class AnnotateVideoProgress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A vertex represents a 2D point in the image. + # NOTE: the normalized vertex coordinates are relative to the original image + # and range from 0 to 1. + # @!attribute [rw] x + # @return [::Float] + # X coordinate. + # @!attribute [rw] y + # @return [::Float] + # Y coordinate. + class NormalizedVertex + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Normalized bounding polygon for text (that might not be aligned with axis). + # Contains list of the corner points in clockwise order starting from + # top-left corner. For example, for a rectangular bounding box: + # When the text is horizontal it might look like: + # 0----1 + # | | + # 3----2 + # + # When it's clockwise rotated 180 degrees around the top-left corner it + # becomes: + # 2----3 + # | | + # 1----0 + # + # and the vertex order will still be (0, 1, 2, 3). Note that values can be less + # than 0, or greater than 1 due to trignometric calculations for location of + # the box. + # @!attribute [rw] vertices + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::NormalizedVertex>] + # Normalized vertices of the bounding polygon. + class NormalizedBoundingPoly + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video segment level annotation results for text detection. + # @!attribute [rw] segment + # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::VideoSegment] + # Video segment where a text snippet was detected. + # @!attribute [rw] confidence + # @return [::Float] + # Confidence for the track of detected text. It is calculated as the highest + # over all frames where OCR detected text appears. + # @!attribute [rw] frames + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::TextFrame>] + # Information related to the frames where OCR detected text appears. + class TextSegment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video frame level annotation results for text annotation (OCR). + # Contains information regarding timestamp and bounding box locations for the + # frames containing detected OCR text snippets. + # @!attribute [rw] rotated_bounding_box + # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::NormalizedBoundingPoly] + # Bounding polygon of the detected text for this frame. + # @!attribute [rw] time_offset + # @return [::Google::Protobuf::Duration] + # Timestamp of this frame. + class TextFrame + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Annotations related to one detected OCR text snippet. This will contain the + # corresponding text, confidence value, and frame level information for each + # detection. + # @!attribute [rw] text + # @return [::String] + # The detected text. + # @!attribute [rw] segments + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::TextSegment>] + # All video segments where OCR detected text appears. + class TextAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video frame level annotations for object detection and tracking. This field + # stores per frame location, time offset, and confidence. + # @!attribute [rw] normalized_bounding_box + # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::NormalizedBoundingBox] + # The normalized bounding box location of this object track for the frame. + # @!attribute [rw] time_offset + # @return [::Google::Protobuf::Duration] + # The timestamp of the frame in microseconds. + class ObjectTrackingFrame + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Annotations corresponding to one tracked object. + # @!attribute [rw] segment + # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::VideoSegment] + # Non-streaming batch mode ONLY. + # Each object track corresponds to one video segment where it appears. + # + # Note: The following fields are mutually exclusive: `segment`, `track_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] track_id + # @return [::Integer] + # Streaming mode ONLY. + # In streaming mode, we do not know the end time of a tracked object + # before it is completed. Hence, there is no VideoSegment info returned. + # Instead, we provide a unique identifiable integer track_id so that + # the customers can correlate the results of the ongoing + # ObjectTrackAnnotation of the same track_id over time. + # + # Note: The following fields are mutually exclusive: `track_id`, `segment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] entity + # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::Entity] + # Entity to specify the object category that this track is labeled as. + # @!attribute [rw] confidence + # @return [::Float] + # Object category's labeling confidence of this track. + # @!attribute [rw] frames + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::ObjectTrackingFrame>] + # Information corresponding to all frames where this object track appears. + class ObjectTrackingAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video annotation feature. + module Feature + # Unspecified. + FEATURE_UNSPECIFIED = 0 + + # Label detection. Detect objects, such as dog or flower. + LABEL_DETECTION = 1 + + # Shot change detection. + SHOT_CHANGE_DETECTION = 2 + + # Explicit content detection. + EXPLICIT_CONTENT_DETECTION = 3 + + # OCR text detection and tracking. + TEXT_DETECTION = 7 + + # Object detection and tracking. + OBJECT_TRACKING = 9 + end + + # Label detection mode. + module LabelDetectionMode + # Unspecified. + LABEL_DETECTION_MODE_UNSPECIFIED = 0 + + # Detect shot-level labels. + SHOT_MODE = 1 + + # Detect frame-level labels. + FRAME_MODE = 2 + + # Detect both shot-level and frame-level labels. + SHOT_AND_FRAME_MODE = 3 + end + + # Bucketized representation of likelihood. + module Likelihood + # Unspecified likelihood. + LIKELIHOOD_UNSPECIFIED = 0 + + # Very unlikely. + VERY_UNLIKELY = 1 + + # Unlikely. + UNLIKELY = 2 + + # Possible. + POSSIBLE = 3 + + # Likely. + LIKELY = 4 + + # Very likely. + VERY_LIKELY = 5 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/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-video_intelligence-v1p2beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/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-video_intelligence-v1p2beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/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-video_intelligence-v1p2beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/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-video_intelligence-v1p2beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/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-video_intelligence-v1p2beta1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/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-video_intelligence-v1p2beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/snippets/Gemfile new file mode 100644 index 000000000000..8f1241ae6a82 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/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-video_intelligence-v1p2beta1", path: "../" +else + gem "google-cloud-video_intelligence-v1p2beta1" +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-video_intelligence-v1p2beta1/snippets/snippet_metadata_google.cloud.videointelligence.v1p2beta1.json b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/snippets/snippet_metadata_google.cloud.videointelligence.v1p2beta1.json new file mode 100644 index 000000000000..9d132735f087 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/snippets/snippet_metadata_google.cloud.videointelligence.v1p2beta1.json @@ -0,0 +1,55 @@ +{ + "client_library": { + "name": "google-cloud-video_intelligence-v1p2beta1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.videointelligence.v1p2beta1", + "version": "v1p2beta1" + } + ] + }, + "snippets": [ + { + "region_tag": "videointelligence_v1p2beta1_generated_VideoIntelligenceService_AnnotateVideo_sync", + "title": "Snippet for the annotate_video call in the VideoIntelligenceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client#annotate_video.", + "file": "video_intelligence_service/annotate_video.rb", + "language": "RUBY", + "client_method": { + "short_name": "annotate_video", + "full_name": "::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client#annotate_video", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "VideoIntelligenceService::Client", + "full_name": "::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client" + }, + "method": { + "short_name": "AnnotateVideo", + "full_name": "google.cloud.videointelligence.v1p2beta1.VideoIntelligenceService.AnnotateVideo", + "service": { + "short_name": "VideoIntelligenceService", + "full_name": "google.cloud.videointelligence.v1p2beta1.VideoIntelligenceService" + } + } + }, + "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-video_intelligence-v1p2beta1/snippets/video_intelligence_service/annotate_video.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/snippets/video_intelligence_service/annotate_video.rb new file mode 100644 index 000000000000..e2be4b971a1d --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/snippets/video_intelligence_service/annotate_video.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 videointelligence_v1p2beta1_generated_VideoIntelligenceService_AnnotateVideo_sync] +require "google/cloud/video_intelligence/v1p2beta1" + +## +# Snippet for the annotate_video call in the VideoIntelligenceService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client#annotate_video. +# +def annotate_video + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest.new + + # Call the annotate_video method. + result = client.annotate_video request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END videointelligence_v1p2beta1_generated_VideoIntelligenceService_AnnotateVideo_sync] diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_operations_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_operations_test.rb new file mode 100644 index 000000000000..302732f0a876 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/google/cloud/video_intelligence/v1p2beta1/video_intelligence_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/videointelligence/v1p2beta1/video_intelligence_pb" +require "google/cloud/videointelligence/v1p2beta1/video_intelligence_services_pb" +require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service" + +class ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_rest_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_rest_test.rb new file mode 100644 index 000000000000..3e0a034e4d7d --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_rest_test.rb @@ -0,0 +1,158 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/videointelligence/v1p2beta1/video_intelligence_pb" +require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest" + + +class ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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_annotate_video + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + input_uri = "hello world" + input_content = "hello world" + features = [:FEATURE_UNSPECIFIED] + video_context = {} + output_uri = "hello world" + location_id = "hello world" + + annotate_video_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::ServiceStub.stub :transcode_annotate_video_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, annotate_video_client_stub do + # Create client + client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.annotate_video input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.annotate_video ::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.annotate_video(::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, annotate_video_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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_test.rb new file mode 100644 index 000000000000..f4205d2f29c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_test.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! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/videointelligence/v1p2beta1/video_intelligence_pb" +require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service" + +class ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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_annotate_video + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + input_uri = "hello world" + input_content = "hello world" + features = [:FEATURE_UNSPECIFIED] + video_context = {} + output_uri = "hello world" + location_id = "hello world" + + annotate_video_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :annotate_video, name + assert_kind_of ::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest, request + assert_equal "hello world", request["input_uri"] + assert_equal "hello world", request["input_content"] + assert_equal [:FEATURE_UNSPECIFIED], request["features"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoContext), request["video_context"] + assert_equal "hello world", request["output_uri"] + assert_equal "hello world", request["location_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, annotate_video_client_stub do + # Create client + client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video ::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video(::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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, annotate_video_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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/helper.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.gitignore b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.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-video_intelligence-v1p3beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.repo-metadata.json new file mode 100644 index 000000000000..d4c1d914c4da --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "videointelligence.googleapis.com", + "api_shortname": "videointelligence", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-video_intelligence-v1p3beta1/latest", + "distribution_name": "google-cloud-video_intelligence-v1p3beta1", + "is_cloud": true, + "language": "ruby", + "name": "videointelligence", + "name_pretty": "Cloud Video Intelligence V1p3beta1 API", + "product_documentation": "https://cloud.google.com/video-intelligence", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API. Note that google-cloud-video_intelligence-v1p3beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video_intelligence instead. See the readme for more details.", + "ruby-cloud-env-prefix": "VIDEO_INTELLIGENCE", + "ruby-cloud-product-url": "https://cloud.google.com/video-intelligence", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.rubocop.yml b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.rubocop.yml new file mode 100644 index 000000000000..09a0a6fd85df --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-video_intelligence-v1p3beta1.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-video_intelligence-v1p3beta1.rb" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.toys.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.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-video_intelligence-v1p3beta1/.yardopts b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.yardopts new file mode 100644 index 000000000000..d124e945b546 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Video Intelligence V1p3beta1 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-video_intelligence-v1p3beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/AUTHENTICATION.md new file mode 100644 index 000000000000..96456e9c7604 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-video_intelligence-v1p3beta1 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-video_intelligence-v1p3beta1 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/video_intelligence/v1p3beta1" + +client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/video_intelligence/v1p3beta1" + +::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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-video_intelligence-v1p3beta1 +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/video_intelligence/v1p3beta1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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-video_intelligence-v1p3beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/Gemfile b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/LICENSE.md b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/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-video_intelligence-v1p3beta1/README.md b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/README.md new file mode 100644 index 000000000000..938c258af608 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the Cloud Video Intelligence V1p3beta1 API + +Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming 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 Cloud Video Intelligence V1p3beta1 API. Most users should consider using +the main client gem, +[google-cloud-video_intelligence](https://rubygems.org/gems/google-cloud-video_intelligence). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-video_intelligence-v1p3beta1 +``` + +## 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/videointelligence.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/video_intelligence/v1p3beta1" + +client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.new +request = ::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest.new # (request fields as keyword arguments...) +response = client.annotate_video request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-video_intelligence-v1p3beta1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/video-intelligence) +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/video_intelligence/v1p3beta1" +require "logger" + +client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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-video_intelligence`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-video_intelligence-v1p3beta1`. +_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-video_intelligence`. +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-video_intelligence-v1p3beta1`. + +### 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-video_intelligence-v1p3beta1/Rakefile b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/Rakefile new file mode 100644 index 000000000000..242985151f80 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/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-video_intelligence-v1p3beta1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["VIDEO_INTELLIGENCE_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["VIDEO_INTELLIGENCE_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["VIDEO_INTELLIGENCE_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 VIDEO_INTELLIGENCE_TEST_PROJECT=test123 VIDEO_INTELLIGENCE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/credentials" + ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["VIDEO_INTELLIGENCE_PROJECT"] = project + ENV["VIDEO_INTELLIGENCE_TEST_PROJECT"] = project + ENV["VIDEO_INTELLIGENCE_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-video_intelligence-v1p3beta1 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-video_intelligence-v1p3beta1 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-video_intelligence-v1p3beta1 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-video_intelligence-v1p3beta1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-video_intelligence-v1p3beta1" + header "google-cloud-video_intelligence-v1p3beta1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-video_intelligence-v1p3beta1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-video_intelligence-v1p3beta1 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-video_intelligence-v1p3beta1 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-video_intelligence-v1p3beta1 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-video_intelligence-v1p3beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/gapic_metadata.json new file mode 100644 index 000000000000..c850b466a839 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/gapic_metadata.json @@ -0,0 +1,37 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.videointelligence.v1p3beta1", + "libraryPackage": "::Google::Cloud::VideoIntelligence::V1p3beta1", + "services": { + "VideoIntelligenceService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client", + "rpcs": { + "AnnotateVideo": { + "methods": [ + "annotate_video" + ] + } + } + } + } + }, + "StreamingVideoIntelligenceService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client", + "rpcs": { + "StreamingAnnotateVideo": { + "methods": [ + "streaming_annotate_video" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/google-cloud-video_intelligence-v1p3beta1.gemspec b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/google-cloud-video_intelligence-v1p3beta1.gemspec new file mode 100644 index 000000000000..dd7ea0904a09 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/google-cloud-video_intelligence-v1p3beta1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/video_intelligence/v1p3beta1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-video_intelligence-v1p3beta1" + gem.version = Google::Cloud::VideoIntelligence::V1p3beta1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API. Note that google-cloud-video_intelligence-v1p3beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video_intelligence instead. See the readme for more details." + gem.summary = "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming 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.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google-cloud-video_intelligence-v1p3beta1.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google-cloud-video_intelligence-v1p3beta1.rb new file mode 100644 index 000000000000..a636cadcfbd6 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google-cloud-video_intelligence-v1p3beta1.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/video_intelligence/v1p3beta1" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1.rb new file mode 100644 index 000000000000..c960edc62709 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/video_intelligence/v1p3beta1/video_intelligence_service" +require "google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service" +require "google/cloud/video_intelligence/v1p3beta1/version" + +module Google + module Cloud + module VideoIntelligence + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/video_intelligence/v1p3beta1" + # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/video_intelligence/v1p3beta1" + # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Client.new + # + module V1p3beta1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1p3beta1", "_helpers.rb" +require "google/cloud/video_intelligence/v1p3beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/rest.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/rest.rb new file mode 100644 index 000000000000..d27389ee8029 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/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/video_intelligence/v1p3beta1/video_intelligence_service/rest" +require "google/cloud/video_intelligence/v1p3beta1/version" + +module Google + module Cloud + module VideoIntelligence + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/video_intelligence/v1p3beta1/rest" + # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Client.new + # + module V1p3beta1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service.rb new file mode 100644 index 000000000000..9f1a517eab6f --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service.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! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/video_intelligence/v1p3beta1/version" + +require "google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service/credentials" +require "google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service/client" + +module Google + module Cloud + module VideoIntelligence + module V1p3beta1 + ## + # Service that implements streaming Video Intelligence API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service" + # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client.new + # + module StreamingVideoIntelligenceService + end + end + end + end +end + +helper_path = ::File.join __dir__, "streaming_video_intelligence_service", "helpers.rb" +require "google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service/client.rb new file mode 100644 index 000000000000..c2c6849c0fd3 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service/client.rb @@ -0,0 +1,472 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/videointelligence/v1p3beta1/video_intelligence_pb" + +module Google + module Cloud + module VideoIntelligence + module V1p3beta1 + module StreamingVideoIntelligenceService + ## + # Client for the StreamingVideoIntelligenceService service. + # + # Service that implements streaming Video Intelligence API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :streaming_video_intelligence_service_stub + + ## + # Configure the StreamingVideoIntelligenceService Client class. + # + # See {::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all StreamingVideoIntelligenceService clients + # ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::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", "VideoIntelligence", "V1p3beta1"] + 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.streaming_annotate_video.timeout = 10_800.0 + default_config.rpcs.streaming_annotate_video.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the StreamingVideoIntelligenceService 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::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::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 + @streaming_video_intelligence_service_stub.universe_domain + end + + ## + # Create a new StreamingVideoIntelligenceService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the StreamingVideoIntelligenceService 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/videointelligence/v1p3beta1/video_intelligence_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 + + @streaming_video_intelligence_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::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 + ) + + @streaming_video_intelligence_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 + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @streaming_video_intelligence_service_stub.logger + end + + # Service calls + + ## + # Performs video annotation with bidirectional streaming: emitting results + # while sending video/audio bytes. + # This method is only available via the gRPC API (not REST). + # + # @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest, ::Hash>] + # An enumerable of {::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest} 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::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoResponse>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/video_intelligence/v1p3beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client.new + # + # # Create an input stream. + # input = Gapic::StreamInput.new + # + # # Call the streaming_annotate_video method to start streaming. + # output = client.streaming_annotate_video 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::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest.new + # input << Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest.new + # input.close + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoResponse + # output.each do |current_response| + # p current_response + # end + # + def streaming_annotate_video 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::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest + 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.streaming_annotate_video.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::VideoIntelligence::V1p3beta1::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.streaming_annotate_video.timeout, + metadata: metadata, + retry_policy: @config.rpcs.streaming_annotate_video.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @streaming_video_intelligence_service_stub.call_rpc :streaming_annotate_video, request, 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 StreamingVideoIntelligenceService API. + # + # This class represents the configuration for StreamingVideoIntelligenceService, + # 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::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::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 + # # streaming_annotate_video to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.streaming_annotate_video.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.streaming_annotate_video.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::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::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 = "videointelligence.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 StreamingVideoIntelligenceService 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 `streaming_annotate_video` + # @return [::Gapic::Config::Method] + # + attr_reader :streaming_annotate_video + + # @private + def initialize parent_rpcs = nil + streaming_annotate_video_config = parent_rpcs.streaming_annotate_video if parent_rpcs.respond_to? :streaming_annotate_video + @streaming_annotate_video = ::Gapic::Config::Method.new streaming_annotate_video_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service/credentials.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service/credentials.rb new file mode 100644 index 000000000000..145a185003c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_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 VideoIntelligence + module V1p3beta1 + module StreamingVideoIntelligenceService + # Credentials for the StreamingVideoIntelligenceService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "VIDEO_INTELLIGENCE_CREDENTIALS", + "VIDEO_INTELLIGENCE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "VIDEO_INTELLIGENCE_CREDENTIALS_JSON", + "VIDEO_INTELLIGENCE_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-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/version.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/version.rb new file mode 100644 index 000000000000..767b2db494e9 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/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 VideoIntelligence + module V1p3beta1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service.rb new file mode 100644 index 000000000000..8c8e6e62883a --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service.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/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/video_intelligence/v1p3beta1/version" + +require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/credentials" +require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/operations" +require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/client" +require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest" + +module Google + module Cloud + module VideoIntelligence + module V1p3beta1 + ## + # Service that implements the Video Intelligence API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service" + # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest" + # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Client.new + # + module VideoIntelligenceService + end + end + end + end +end + +helper_path = ::File.join __dir__, "video_intelligence_service", "helpers.rb" +require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/client.rb new file mode 100644 index 000000000000..ccd37b864497 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/client.rb @@ -0,0 +1,526 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/videointelligence/v1p3beta1/video_intelligence_pb" + +module Google + module Cloud + module VideoIntelligence + module V1p3beta1 + module VideoIntelligenceService + ## + # Client for the VideoIntelligenceService service. + # + # Service that implements the Video Intelligence API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :video_intelligence_service_stub + + ## + # Configure the VideoIntelligenceService Client class. + # + # See {::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all VideoIntelligenceService clients + # ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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", "VideoIntelligence", "V1p3beta1"] + 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.annotate_video.timeout = 600.0 + default_config.rpcs.annotate_video.retry_policy = { + initial_delay: 1.0, max_delay: 120.0, multiplier: 2.5, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the VideoIntelligenceService 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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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 + @video_intelligence_service_stub.universe_domain + end + + ## + # Create a new VideoIntelligenceService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the VideoIntelligenceService 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/videointelligence/v1p3beta1/video_intelligence_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 + + @video_intelligence_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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 + ) + + @video_intelligence_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 + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @video_intelligence_service_stub.logger + end + + # Service calls + + ## + # Performs asynchronous video annotation. Progress and results can be + # retrieved through the `google.longrunning.Operations` interface. + # `Operation.metadata` contains `AnnotateVideoProgress` (progress). + # `Operation.response` contains `AnnotateVideoResponse` (results). + # + # @overload annotate_video(request, options = nil) + # Pass arguments to `annotate_video` via a request object, either of type + # {::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload annotate_video(input_uri: nil, input_content: nil, features: nil, video_context: nil, output_uri: nil, location_id: nil) + # Pass arguments to `annotate_video` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param input_uri [::String] + # Input video location. Currently, only + # [Cloud Storage](https://cloud.google.com/storage/) URIs are + # supported. URIs must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + # more information, see [Request + # URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify + # multiple videos, a video URI may include wildcards in the `object-id`. + # Supported wildcards: '*' to match 0 or more characters; + # '?' to match 1 character. If unset, the input video should be embedded + # in the request as `input_content`. If set, `input_content` must be unset. + # @param input_content [::String] + # The video data bytes. + # If unset, the input video(s) should be specified via the `input_uri`. + # If set, `input_uri` must be unset. + # @param features [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::Feature>] + # Required. Requested video annotation features. + # @param video_context [::Google::Cloud::VideoIntelligence::V1p3beta1::VideoContext, ::Hash] + # Additional video context and/or feature-specific parameters. + # @param output_uri [::String] + # Optional. Location where the output (in JSON format) should be stored. + # Currently, only [Cloud Storage](https://cloud.google.com/storage/) + # URIs are supported. These must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + # more information, see [Request + # URIs](https://cloud.google.com/storage/docs/request-endpoints). + # @param location_id [::String] + # Optional. Cloud region where annotation should take place. Supported cloud + # regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no + # region is specified, the region will be determined based on video file + # 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/video_intelligence/v1p3beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest.new + # + # # Call the annotate_video method. + # result = client.annotate_video request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def annotate_video request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.annotate_video.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::VideoIntelligence::V1p3beta1::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.annotate_video.timeout, + metadata: metadata, + retry_policy: @config.rpcs.annotate_video.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_intelligence_service_stub.call_rpc :annotate_video, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 VideoIntelligenceService API. + # + # This class represents the configuration for VideoIntelligenceService, + # 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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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 + # # annotate_video to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.annotate_video.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.annotate_video.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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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 = "videointelligence.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 VideoIntelligenceService 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 `annotate_video` + # @return [::Gapic::Config::Method] + # + attr_reader :annotate_video + + # @private + def initialize parent_rpcs = nil + annotate_video_config = parent_rpcs.annotate_video if parent_rpcs.respond_to? :annotate_video + @annotate_video = ::Gapic::Config::Method.new annotate_video_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/credentials.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/credentials.rb new file mode 100644 index 000000000000..0f1bf89bf76e --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_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 VideoIntelligence + module V1p3beta1 + module VideoIntelligenceService + # Credentials for the VideoIntelligenceService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "VIDEO_INTELLIGENCE_CREDENTIALS", + "VIDEO_INTELLIGENCE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "VIDEO_INTELLIGENCE_CREDENTIALS_JSON", + "VIDEO_INTELLIGENCE_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-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/operations.rb new file mode 100644 index 000000000000..2692b0512d28 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_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 VideoIntelligence + module V1p3beta1 + module VideoIntelligenceService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the VideoIntelligenceService 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 VideoIntelligenceService 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::VideoIntelligence::V1p3beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::VideoIntelligence::V1p3beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::VideoIntelligence::V1p3beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::VideoIntelligence::V1p3beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::VideoIntelligence::V1p3beta1::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 = "videointelligence.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-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest.rb new file mode 100644 index 000000000000..fe53fa81bca5 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest.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 "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/video_intelligence/v1p3beta1/version" + +require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/credentials" +require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/operations" +require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/client" + +module Google + module Cloud + module VideoIntelligence + module V1p3beta1 + ## + # Service that implements the Video Intelligence API. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest" + # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Client.new + # + module VideoIntelligenceService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/client.rb new file mode 100644 index 000000000000..ed791536b9d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/client.rb @@ -0,0 +1,484 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/videointelligence/v1p3beta1/video_intelligence_pb" +require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/service_stub" + +module Google + module Cloud + module VideoIntelligence + module V1p3beta1 + module VideoIntelligenceService + module Rest + ## + # REST client for the VideoIntelligenceService service. + # + # Service that implements the Video Intelligence API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :video_intelligence_service_stub + + ## + # Configure the VideoIntelligenceService Client class. + # + # See {::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all VideoIntelligenceService clients + # ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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", "VideoIntelligence", "V1p3beta1"] + 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.annotate_video.timeout = 600.0 + default_config.rpcs.annotate_video.retry_policy = { + initial_delay: 1.0, max_delay: 120.0, multiplier: 2.5, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the VideoIntelligenceService 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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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 + @video_intelligence_service_stub.universe_domain + end + + ## + # Create a new VideoIntelligenceService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the VideoIntelligenceService 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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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 + + @video_intelligence_service_stub = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @video_intelligence_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 + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @video_intelligence_service_stub.logger + end + + # Service calls + + ## + # Performs asynchronous video annotation. Progress and results can be + # retrieved through the `google.longrunning.Operations` interface. + # `Operation.metadata` contains `AnnotateVideoProgress` (progress). + # `Operation.response` contains `AnnotateVideoResponse` (results). + # + # @overload annotate_video(request, options = nil) + # Pass arguments to `annotate_video` via a request object, either of type + # {::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload annotate_video(input_uri: nil, input_content: nil, features: nil, video_context: nil, output_uri: nil, location_id: nil) + # Pass arguments to `annotate_video` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param input_uri [::String] + # Input video location. Currently, only + # [Cloud Storage](https://cloud.google.com/storage/) URIs are + # supported. URIs must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + # more information, see [Request + # URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify + # multiple videos, a video URI may include wildcards in the `object-id`. + # Supported wildcards: '*' to match 0 or more characters; + # '?' to match 1 character. If unset, the input video should be embedded + # in the request as `input_content`. If set, `input_content` must be unset. + # @param input_content [::String] + # The video data bytes. + # If unset, the input video(s) should be specified via the `input_uri`. + # If set, `input_uri` must be unset. + # @param features [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::Feature>] + # Required. Requested video annotation features. + # @param video_context [::Google::Cloud::VideoIntelligence::V1p3beta1::VideoContext, ::Hash] + # Additional video context and/or feature-specific parameters. + # @param output_uri [::String] + # Optional. Location where the output (in JSON format) should be stored. + # Currently, only [Cloud Storage](https://cloud.google.com/storage/) + # URIs are supported. These must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + # more information, see [Request + # URIs](https://cloud.google.com/storage/docs/request-endpoints). + # @param location_id [::String] + # Optional. Cloud region where annotation should take place. Supported cloud + # regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no + # region is specified, the region will be determined based on video file + # 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/video_intelligence/v1p3beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest.new + # + # # Call the annotate_video method. + # result = client.annotate_video request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def annotate_video request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.annotate_video.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::VideoIntelligence::V1p3beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.annotate_video.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.annotate_video.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @video_intelligence_service_stub.annotate_video request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 VideoIntelligenceService REST API. + # + # This class represents the configuration for VideoIntelligenceService 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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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 + # # annotate_video to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.annotate_video.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.annotate_video.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 = "videointelligence.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 VideoIntelligenceService 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 `annotate_video` + # @return [::Gapic::Config::Method] + # + attr_reader :annotate_video + + # @private + def initialize parent_rpcs = nil + annotate_video_config = parent_rpcs.annotate_video if parent_rpcs.respond_to? :annotate_video + @annotate_video = ::Gapic::Config::Method.new annotate_video_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/operations.rb new file mode 100644 index 000000000000..614ce2db4860 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_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 VideoIntelligence + module V1p3beta1 + module VideoIntelligenceService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the VideoIntelligenceService 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 VideoIntelligenceService 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::VideoIntelligence::V1p3beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1p3beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1p3beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1p3beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "videointelligence.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}", + matches: [ + ["name", %r{^operations/?$}, 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{^operations(?:/.*)?$}, true] + ] + ) + 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-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/service_stub.rb new file mode 100644 index 000000000000..011112a7e872 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/service_stub.rb @@ -0,0 +1,141 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/videointelligence/v1p3beta1/video_intelligence_pb" + +module Google + module Cloud + module VideoIntelligence + module V1p3beta1 + module VideoIntelligenceService + module Rest + ## + # REST service stub for the VideoIntelligenceService 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 annotate_video REST call + # + # @param request_pb [::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def annotate_video request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_annotate_video_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "annotate_video", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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 annotate_video REST call + # + # @param request_pb [::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_annotate_video_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1p3beta1/videos:annotate", + body: "*", + matches: [] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/videointelligence/v1p3beta1/video_intelligence_pb.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/videointelligence/v1p3beta1/video_intelligence_pb.rb new file mode 100644 index 000000000000..218d9820781b --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/videointelligence/v1p3beta1/video_intelligence_pb.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nAgoogle/cloud/videointelligence/v1p3beta1/video_intelligence.proto\x12(google.cloud.videointelligence.v1p3beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x8c\x02\n\x14\x41nnotateVideoRequest\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\x15\n\rinput_content\x18\x06 \x01(\x0c\x12H\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0e\x32\x31.google.cloud.videointelligence.v1p3beta1.FeatureB\x03\xe0\x41\x02\x12M\n\rvideo_context\x18\x03 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p3beta1.VideoContext\x12\x17\n\noutput_uri\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0blocation_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x80\x07\n\x0cVideoContext\x12H\n\x08segments\x18\x01 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1p3beta1.VideoSegment\x12^\n\x16label_detection_config\x18\x02 \x01(\x0b\x32>.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig\x12i\n\x1cshot_change_detection_config\x18\x03 \x01(\x0b\x32\x43.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig\x12s\n!explicit_content_detection_config\x18\x04 \x01(\x0b\x32H.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig\x12\\\n\x15\x66\x61\x63\x65_detection_config\x18\x05 \x01(\x0b\x32=.google.cloud.videointelligence.v1p3beta1.FaceDetectionConfig\x12h\n\x1bspeech_transcription_config\x18\x06 \x01(\x0b\x32\x43.google.cloud.videointelligence.v1p3beta1.SpeechTranscriptionConfig\x12\\\n\x15text_detection_config\x18\x08 \x01(\x0b\x32=.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig\x12`\n\x17person_detection_config\x18\x0b \x01(\x0b\x32?.google.cloud.videointelligence.v1p3beta1.PersonDetectionConfig\x12^\n\x16object_tracking_config\x18\r \x01(\x0b\x32>.google.cloud.videointelligence.v1p3beta1.ObjectTrackingConfig\"\xe4\x01\n\x14LabelDetectionConfig\x12Z\n\x14label_detection_mode\x18\x01 \x01(\x0e\x32<.google.cloud.videointelligence.v1p3beta1.LabelDetectionMode\x12\x19\n\x11stationary_camera\x18\x02 \x01(\x08\x12\r\n\x05model\x18\x03 \x01(\t\x12\"\n\x1a\x66rame_confidence_threshold\x18\x04 \x01(\x02\x12\"\n\x1avideo_confidence_threshold\x18\x05 \x01(\x02\"*\n\x19ShotChangeDetectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\"%\n\x14ObjectTrackingConfig\x12\r\n\x05model\x18\x01 \x01(\t\"/\n\x1e\x45xplicitContentDetectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\"`\n\x13\x46\x61\x63\x65\x44\x65tectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\x12\x1e\n\x16include_bounding_boxes\x18\x02 \x01(\x08\x12\x1a\n\x12include_attributes\x18\x05 \x01(\x08\"s\n\x15PersonDetectionConfig\x12\x1e\n\x16include_bounding_boxes\x18\x01 \x01(\x08\x12\x1e\n\x16include_pose_landmarks\x18\x02 \x01(\x08\x12\x1a\n\x12include_attributes\x18\x03 \x01(\x08\"<\n\x13TextDetectionConfig\x12\x16\n\x0elanguage_hints\x18\x01 \x03(\t\x12\r\n\x05model\x18\x02 \x01(\t\"x\n\x0cVideoSegment\x12\x34\n\x11start_time_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0f\x65nd_time_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"k\n\x0cLabelSegment\x12G\n\x07segment\x18\x01 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p3beta1.VideoSegment\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"P\n\nLabelFrame\x12.\n\x0btime_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"G\n\x06\x45ntity\x12\x11\n\tentity_id\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x15\n\rlanguage_code\x18\x03 \x01(\t\"\xb0\x02\n\x0fLabelAnnotation\x12@\n\x06\x65ntity\x18\x01 \x01(\x0b\x32\x30.google.cloud.videointelligence.v1p3beta1.Entity\x12K\n\x11\x63\x61tegory_entities\x18\x02 \x03(\x0b\x32\x30.google.cloud.videointelligence.v1p3beta1.Entity\x12H\n\x08segments\x18\x03 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1p3beta1.LabelSegment\x12\x44\n\x06\x66rames\x18\x04 \x03(\x0b\x32\x34.google.cloud.videointelligence.v1p3beta1.LabelFrame\"\x9c\x01\n\x14\x45xplicitContentFrame\x12.\n\x0btime_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12T\n\x16pornography_likelihood\x18\x02 \x01(\x0e\x32\x34.google.cloud.videointelligence.v1p3beta1.Likelihood\"k\n\x19\x45xplicitContentAnnotation\x12N\n\x06\x66rames\x18\x01 \x03(\x0b\x32>.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame\"Q\n\x15NormalizedBoundingBox\x12\x0c\n\x04left\x18\x01 \x01(\x02\x12\x0b\n\x03top\x18\x02 \x01(\x02\x12\r\n\x05right\x18\x03 \x01(\x02\x12\x0e\n\x06\x62ottom\x18\x04 \x01(\x02\"\xcf\x02\n\x11TimestampedObject\x12`\n\x17normalized_bounding_box\x18\x01 \x01(\x0b\x32?.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox\x12.\n\x0btime_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12T\n\nattributes\x18\x03 \x03(\x0b\x32;.google.cloud.videointelligence.v1p3beta1.DetectedAttributeB\x03\xe0\x41\x01\x12R\n\tlandmarks\x18\x04 \x03(\x0b\x32:.google.cloud.videointelligence.v1p3beta1.DetectedLandmarkB\x03\xe0\x41\x01\"\x99\x02\n\x05Track\x12G\n\x07segment\x18\x01 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p3beta1.VideoSegment\x12X\n\x13timestamped_objects\x18\x02 \x03(\x0b\x32;.google.cloud.videointelligence.v1p3beta1.TimestampedObject\x12T\n\nattributes\x18\x03 \x03(\x0b\x32;.google.cloud.videointelligence.v1p3beta1.DetectedAttributeB\x03\xe0\x41\x01\x12\x17\n\nconfidence\x18\x04 \x01(\x02\x42\x03\xe0\x41\x01\"D\n\x11\x44\x65tectedAttribute\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12\r\n\x05value\x18\x03 \x01(\t\"D\n\tCelebrity\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\"\xab\x02\n\x0e\x43\x65lebrityTrack\x12\x61\n\x0b\x63\x65lebrities\x18\x01 \x03(\x0b\x32L.google.cloud.videointelligence.v1p3beta1.CelebrityTrack.RecognizedCelebrity\x12\x43\n\nface_track\x18\x03 \x01(\x0b\x32/.google.cloud.videointelligence.v1p3beta1.Track\x1aq\n\x13RecognizedCelebrity\x12\x46\n\tcelebrity\x18\x01 \x01(\x0b\x32\x33.google.cloud.videointelligence.v1p3beta1.Celebrity\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"t\n\x1e\x43\x65lebrityRecognitionAnnotation\x12R\n\x10\x63\x65lebrity_tracks\x18\x01 \x03(\x0b\x32\x38.google.cloud.videointelligence.v1p3beta1.CelebrityTrack\"\x7f\n\x10\x44\x65tectedLandmark\x12\x0c\n\x04name\x18\x01 \x01(\t\x12I\n\x05point\x18\x02 \x01(\x0b\x32:.google.cloud.videointelligence.v1p3beta1.NormalizedVertex\x12\x12\n\nconfidence\x18\x03 \x01(\x02\"m\n\x17\x46\x61\x63\x65\x44\x65tectionAnnotation\x12?\n\x06tracks\x18\x03 \x03(\x0b\x32/.google.cloud.videointelligence.v1p3beta1.Track\x12\x11\n\tthumbnail\x18\x04 \x01(\x0c\"\\\n\x19PersonDetectionAnnotation\x12?\n\x06tracks\x18\x01 \x03(\x0b\x32/.google.cloud.videointelligence.v1p3beta1.Track\"\xef\x0b\n\x16VideoAnnotationResults\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12G\n\x07segment\x18\n \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p3beta1.VideoSegment\x12\\\n\x19segment_label_annotations\x18\x02 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p3beta1.LabelAnnotation\x12\x65\n\"segment_presence_label_annotations\x18\x17 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p3beta1.LabelAnnotation\x12Y\n\x16shot_label_annotations\x18\x03 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p3beta1.LabelAnnotation\x12\x62\n\x1fshot_presence_label_annotations\x18\x18 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p3beta1.LabelAnnotation\x12Z\n\x17\x66rame_label_annotations\x18\x04 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p3beta1.LabelAnnotation\x12\x65\n\x1a\x66\x61\x63\x65_detection_annotations\x18\r \x03(\x0b\x32\x41.google.cloud.videointelligence.v1p3beta1.FaceDetectionAnnotation\x12P\n\x10shot_annotations\x18\x06 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1p3beta1.VideoSegment\x12`\n\x13\x65xplicit_annotation\x18\x07 \x01(\x0b\x32\x43.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation\x12\\\n\x15speech_transcriptions\x18\x0b \x03(\x0b\x32=.google.cloud.videointelligence.v1p3beta1.SpeechTranscription\x12R\n\x10text_annotations\x18\x0c \x03(\x0b\x32\x38.google.cloud.videointelligence.v1p3beta1.TextAnnotation\x12^\n\x12object_annotations\x18\x0e \x03(\x0b\x32\x42.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation\x12i\n\x1clogo_recognition_annotations\x18\x13 \x03(\x0b\x32\x43.google.cloud.videointelligence.v1p3beta1.LogoRecognitionAnnotation\x12i\n\x1cperson_detection_annotations\x18\x14 \x03(\x0b\x32\x43.google.cloud.videointelligence.v1p3beta1.PersonDetectionAnnotation\x12s\n!celebrity_recognition_annotations\x18\x15 \x01(\x0b\x32H.google.cloud.videointelligence.v1p3beta1.CelebrityRecognitionAnnotation\x12!\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.Status\"u\n\x15\x41nnotateVideoResponse\x12\\\n\x12\x61nnotation_results\x18\x01 \x03(\x0b\x32@.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults\"\xb4\x02\n\x17VideoAnnotationProgress\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\x18\n\x10progress_percent\x18\x02 \x01(\x05\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x07\x66\x65\x61ture\x18\x05 \x01(\x0e\x32\x31.google.cloud.videointelligence.v1p3beta1.Feature\x12G\n\x07segment\x18\x06 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p3beta1.VideoSegment\"w\n\x15\x41nnotateVideoProgress\x12^\n\x13\x61nnotation_progress\x18\x01 \x03(\x0b\x32\x41.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress\"\x88\x03\n\x19SpeechTranscriptionConfig\x12\x1a\n\rlanguage_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10max_alternatives\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1d\n\x10\x66ilter_profanity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12U\n\x0fspeech_contexts\x18\x04 \x03(\x0b\x32\x37.google.cloud.videointelligence.v1p3beta1.SpeechContextB\x03\xe0\x41\x01\x12)\n\x1c\x65nable_automatic_punctuation\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x19\n\x0c\x61udio_tracks\x18\x06 \x03(\x05\x42\x03\xe0\x41\x01\x12\'\n\x1a\x65nable_speaker_diarization\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12&\n\x19\x64iarization_speaker_count\x18\x08 \x01(\x05\x42\x03\xe0\x41\x01\x12#\n\x16\x65nable_word_confidence\x18\t \x01(\x08\x42\x03\xe0\x41\x01\"%\n\rSpeechContext\x12\x14\n\x07phrases\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x8f\x01\n\x13SpeechTranscription\x12\\\n\x0c\x61lternatives\x18\x01 \x03(\x0b\x32\x46.google.cloud.videointelligence.v1p3beta1.SpeechRecognitionAlternative\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\x93\x01\n\x1cSpeechRecognitionAlternative\x12\x12\n\ntranscript\x18\x01 \x01(\t\x12\x17\n\nconfidence\x18\x02 \x01(\x02\x42\x03\xe0\x41\x03\x12\x46\n\x05words\x18\x03 \x03(\x0b\x32\x32.google.cloud.videointelligence.v1p3beta1.WordInfoB\x03\xe0\x41\x03\"\xa7\x01\n\x08WordInfo\x12-\n\nstart_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12+\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0c\n\x04word\x18\x03 \x01(\t\x12\x17\n\nconfidence\x18\x04 \x01(\x02\x42\x03\xe0\x41\x03\x12\x18\n\x0bspeaker_tag\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\"(\n\x10NormalizedVertex\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\"f\n\x16NormalizedBoundingPoly\x12L\n\x08vertices\x18\x01 \x03(\x0b\x32:.google.cloud.videointelligence.v1p3beta1.NormalizedVertex\"\xaf\x01\n\x0bTextSegment\x12G\n\x07segment\x18\x01 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p3beta1.VideoSegment\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12\x43\n\x06\x66rames\x18\x03 \x03(\x0b\x32\x33.google.cloud.videointelligence.v1p3beta1.TextFrame\"\x9b\x01\n\tTextFrame\x12^\n\x14rotated_bounding_box\x18\x01 \x01(\x0b\x32@.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly\x12.\n\x0btime_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"g\n\x0eTextAnnotation\x12\x0c\n\x04text\x18\x01 \x01(\t\x12G\n\x08segments\x18\x02 \x03(\x0b\x32\x35.google.cloud.videointelligence.v1p3beta1.TextSegment\"\xa7\x01\n\x13ObjectTrackingFrame\x12`\n\x17normalized_bounding_box\x18\x01 \x01(\x0b\x32?.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox\x12.\n\x0btime_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xac\x02\n\x18ObjectTrackingAnnotation\x12I\n\x07segment\x18\x03 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p3beta1.VideoSegmentH\x00\x12\x12\n\x08track_id\x18\x05 \x01(\x03H\x00\x12@\n\x06\x65ntity\x18\x01 \x01(\x0b\x32\x30.google.cloud.videointelligence.v1p3beta1.Entity\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x12M\n\x06\x66rames\x18\x02 \x03(\x0b\x32=.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrameB\x0c\n\ntrack_info\"\xe8\x01\n\x19LogoRecognitionAnnotation\x12@\n\x06\x65ntity\x18\x01 \x01(\x0b\x32\x30.google.cloud.videointelligence.v1p3beta1.Entity\x12?\n\x06tracks\x18\x02 \x03(\x0b\x32/.google.cloud.videointelligence.v1p3beta1.Track\x12H\n\x08segments\x18\x03 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1p3beta1.VideoSegment\"\xa5\x01\n\x1dStreamingAnnotateVideoRequest\x12V\n\x0cvideo_config\x18\x01 \x01(\x0b\x32>.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfigH\x00\x12\x17\n\rinput_content\x18\x02 \x01(\x0cH\x00\x42\x13\n\x11streaming_request\"\x8a\x08\n\x14StreamingVideoConfig\x12t\n\x1cshot_change_detection_config\x18\x02 \x01(\x0b\x32L.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfigH\x00\x12i\n\x16label_detection_config\x18\x03 \x01(\x0b\x32G.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfigH\x00\x12~\n!explicit_content_detection_config\x18\x04 \x01(\x0b\x32Q.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfigH\x00\x12i\n\x16object_tracking_config\x18\x05 \x01(\x0b\x32G.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfigH\x00\x12|\n automl_action_recognition_config\x18\x17 \x01(\x0b\x32P.google.cloud.videointelligence.v1p3beta1.StreamingAutomlActionRecognitionConfigH\x00\x12u\n\x1c\x61utoml_classification_config\x18\x15 \x01(\x0b\x32M.google.cloud.videointelligence.v1p3beta1.StreamingAutomlClassificationConfigH\x00\x12v\n\x1d\x61utoml_object_tracking_config\x18\x16 \x01(\x0b\x32M.google.cloud.videointelligence.v1p3beta1.StreamingAutomlObjectTrackingConfigH\x00\x12K\n\x07\x66\x65\x61ture\x18\x01 \x01(\x0e\x32:.google.cloud.videointelligence.v1p3beta1.StreamingFeature\x12X\n\x0estorage_config\x18\x1e \x01(\x0b\x32@.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfigB\x12\n\x10streaming_config\"\xca\x01\n\x1eStreamingAnnotateVideoResponse\x12!\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12\x65\n\x12\x61nnotation_results\x18\x02 \x01(\x0b\x32I.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults\x12\x1e\n\x16\x61nnotation_results_uri\x18\x03 \x01(\t\"\x8b\x03\n\x1fStreamingVideoAnnotationResults\x12P\n\x10shot_annotations\x18\x01 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1p3beta1.VideoSegment\x12T\n\x11label_annotations\x18\x02 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p3beta1.LabelAnnotation\x12`\n\x13\x65xplicit_annotation\x18\x03 \x01(\x0b\x32\x43.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation\x12^\n\x12object_annotations\x18\x04 \x03(\x0b\x32\x42.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation\"$\n\"StreamingShotChangeDetectionConfig\":\n\x1dStreamingLabelDetectionConfig\x12\x19\n\x11stationary_camera\x18\x01 \x01(\x08\")\n\'StreamingExplicitContentDetectionConfig\"\x1f\n\x1dStreamingObjectTrackingConfig\"<\n&StreamingAutomlActionRecognitionConfig\x12\x12\n\nmodel_name\x18\x01 \x01(\t\"9\n#StreamingAutomlClassificationConfig\x12\x12\n\nmodel_name\x18\x01 \x01(\t\"9\n#StreamingAutomlObjectTrackingConfig\x12\x12\n\nmodel_name\x18\x01 \x01(\t\"o\n\x16StreamingStorageConfig\x12(\n enable_storage_annotation_result\x18\x01 \x01(\x08\x12+\n#annotation_result_storage_directory\x18\x03 \x01(\t*r\n\x12LabelDetectionMode\x12$\n LABEL_DETECTION_MODE_UNSPECIFIED\x10\x00\x12\r\n\tSHOT_MODE\x10\x01\x12\x0e\n\nFRAME_MODE\x10\x02\x12\x17\n\x13SHOT_AND_FRAME_MODE\x10\x03*t\n\nLikelihood\x12\x1a\n\x16LIKELIHOOD_UNSPECIFIED\x10\x00\x12\x11\n\rVERY_UNLIKELY\x10\x01\x12\x0c\n\x08UNLIKELY\x10\x02\x12\x0c\n\x08POSSIBLE\x10\x03\x12\n\n\x06LIKELY\x10\x04\x12\x0f\n\x0bVERY_LIKELY\x10\x05*\xb6\x02\n\x10StreamingFeature\x12!\n\x1dSTREAMING_FEATURE_UNSPECIFIED\x10\x00\x12\x1d\n\x19STREAMING_LABEL_DETECTION\x10\x01\x12#\n\x1fSTREAMING_SHOT_CHANGE_DETECTION\x10\x02\x12(\n$STREAMING_EXPLICIT_CONTENT_DETECTION\x10\x03\x12\x1d\n\x19STREAMING_OBJECT_TRACKING\x10\x04\x12\'\n#STREAMING_AUTOML_ACTION_RECOGNITION\x10\x17\x12#\n\x1fSTREAMING_AUTOML_CLASSIFICATION\x10\x15\x12$\n STREAMING_AUTOML_OBJECT_TRACKING\x10\x16*\x90\x02\n\x07\x46\x65\x61ture\x12\x17\n\x13\x46\x45\x41TURE_UNSPECIFIED\x10\x00\x12\x13\n\x0fLABEL_DETECTION\x10\x01\x12\x19\n\x15SHOT_CHANGE_DETECTION\x10\x02\x12\x1e\n\x1a\x45XPLICIT_CONTENT_DETECTION\x10\x03\x12\x12\n\x0e\x46\x41\x43\x45_DETECTION\x10\x04\x12\x18\n\x14SPEECH_TRANSCRIPTION\x10\x06\x12\x12\n\x0eTEXT_DETECTION\x10\x07\x12\x13\n\x0fOBJECT_TRACKING\x10\t\x12\x14\n\x10LOGO_RECOGNITION\x10\x0c\x12\x19\n\x15\x43\x45LEBRITY_RECOGNITION\x10\r\x12\x14\n\x10PERSON_DETECTION\x10\x0e\x32\xce\x02\n\x18VideoIntelligenceService\x12\xdb\x01\n\rAnnotateVideo\x12>.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41.\n\x15\x41nnotateVideoResponse\x12\x15\x41nnotateVideoProgress\xda\x41\x12input_uri,features\x82\xd3\xe4\x93\x02\x1f\"\x1a/v1p3beta1/videos:annotate:\x01*\x1aT\xca\x41 videointelligence.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platform2\xad\x02\n!StreamingVideoIntelligenceService\x12\xb1\x01\n\x16StreamingAnnotateVideo\x12G.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest\x1aH.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse\"\x00(\x01\x30\x01\x1aT\xca\x41 videointelligence.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xaf\x02\n,com.google.cloud.videointelligence.v1p3beta1B\x1dVideoIntelligenceServiceProtoP\x01ZZcloud.google.com/go/videointelligence/apiv1p3beta1/videointelligencepb;videointelligencepb\xaa\x02(Google.Cloud.VideoIntelligence.V1P3Beta1\xca\x02(Google\\Cloud\\VideoIntelligence\\V1p3beta1\xea\x02+Google::Cloud::VideoIntelligence::V1p3beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module VideoIntelligence + module V1p3beta1 + AnnotateVideoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest").msgclass + VideoContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.VideoContext").msgclass + LabelDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig").msgclass + ShotChangeDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig").msgclass + ObjectTrackingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.ObjectTrackingConfig").msgclass + ExplicitContentDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig").msgclass + FaceDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.FaceDetectionConfig").msgclass + PersonDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.PersonDetectionConfig").msgclass + TextDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.TextDetectionConfig").msgclass + VideoSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.VideoSegment").msgclass + LabelSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.LabelSegment").msgclass + LabelFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.LabelFrame").msgclass + Entity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.Entity").msgclass + LabelAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.LabelAnnotation").msgclass + ExplicitContentFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame").msgclass + ExplicitContentAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation").msgclass + NormalizedBoundingBox = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox").msgclass + TimestampedObject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.TimestampedObject").msgclass + Track = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.Track").msgclass + DetectedAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.DetectedAttribute").msgclass + Celebrity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.Celebrity").msgclass + CelebrityTrack = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.CelebrityTrack").msgclass + CelebrityTrack::RecognizedCelebrity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.CelebrityTrack.RecognizedCelebrity").msgclass + CelebrityRecognitionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.CelebrityRecognitionAnnotation").msgclass + DetectedLandmark = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.DetectedLandmark").msgclass + FaceDetectionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.FaceDetectionAnnotation").msgclass + PersonDetectionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.PersonDetectionAnnotation").msgclass + VideoAnnotationResults = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults").msgclass + AnnotateVideoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse").msgclass + VideoAnnotationProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress").msgclass + AnnotateVideoProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress").msgclass + SpeechTranscriptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.SpeechTranscriptionConfig").msgclass + SpeechContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.SpeechContext").msgclass + SpeechTranscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.SpeechTranscription").msgclass + SpeechRecognitionAlternative = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.SpeechRecognitionAlternative").msgclass + WordInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.WordInfo").msgclass + NormalizedVertex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.NormalizedVertex").msgclass + NormalizedBoundingPoly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly").msgclass + TextSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.TextSegment").msgclass + TextFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.TextFrame").msgclass + TextAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.TextAnnotation").msgclass + ObjectTrackingFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame").msgclass + ObjectTrackingAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation").msgclass + LogoRecognitionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.LogoRecognitionAnnotation").msgclass + StreamingAnnotateVideoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest").msgclass + StreamingVideoConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig").msgclass + StreamingAnnotateVideoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse").msgclass + StreamingVideoAnnotationResults = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults").msgclass + StreamingShotChangeDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig").msgclass + StreamingLabelDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig").msgclass + StreamingExplicitContentDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig").msgclass + StreamingObjectTrackingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig").msgclass + StreamingAutomlActionRecognitionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingAutomlActionRecognitionConfig").msgclass + StreamingAutomlClassificationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingAutomlClassificationConfig").msgclass + StreamingAutomlObjectTrackingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingAutomlObjectTrackingConfig").msgclass + StreamingStorageConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig").msgclass + LabelDetectionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.LabelDetectionMode").enummodule + Likelihood = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.Likelihood").enummodule + StreamingFeature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingFeature").enummodule + Feature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.Feature").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/videointelligence/v1p3beta1/video_intelligence_services_pb.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/videointelligence/v1p3beta1/video_intelligence_services_pb.rb new file mode 100644 index 000000000000..d4175f64d70e --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/videointelligence/v1p3beta1/video_intelligence_services_pb.rb @@ -0,0 +1,66 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto for package 'Google.Cloud.VideoIntelligence.V1p3beta1' +# 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/videointelligence/v1p3beta1/video_intelligence_pb' + +module Google + module Cloud + module VideoIntelligence + module V1p3beta1 + module VideoIntelligenceService + # Service that implements the Video Intelligence API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.videointelligence.v1p3beta1.VideoIntelligenceService' + + # Performs asynchronous video annotation. Progress and results can be + # retrieved through the `google.longrunning.Operations` interface. + # `Operation.metadata` contains `AnnotateVideoProgress` (progress). + # `Operation.response` contains `AnnotateVideoResponse` (results). + rpc :AnnotateVideo, ::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + module StreamingVideoIntelligenceService + # Service that implements streaming Video Intelligence API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.videointelligence.v1p3beta1.StreamingVideoIntelligenceService' + + # Performs video annotation with bidirectional streaming: emitting results + # while sending video/audio bytes. + # This method is only available via the gRPC API (not REST). + rpc :StreamingAnnotateVideo, stream(::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest), stream(::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoResponse) + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/README.md new file mode 100644 index 000000000000..a691aaa55d46 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Video Intelligence V1p3beta1 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-video_intelligence-v1p3beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # 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. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + # + # Example: + # + # 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 + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # 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 + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # 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 + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/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-video_intelligence-v1p3beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/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-video_intelligence-v1p3beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/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-video_intelligence-v1p3beta1/proto_docs/google/cloud/videointelligence/v1p3beta1/video_intelligence.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/cloud/videointelligence/v1p3beta1/video_intelligence.rb new file mode 100644 index 000000000000..571ca0cd3e9d --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/cloud/videointelligence/v1p3beta1/video_intelligence.rb @@ -0,0 +1,1218 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module VideoIntelligence + module V1p3beta1 + # Video annotation request. + # @!attribute [rw] input_uri + # @return [::String] + # Input video location. Currently, only + # [Cloud Storage](https://cloud.google.com/storage/) URIs are + # supported. URIs must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + # more information, see [Request + # URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify + # multiple videos, a video URI may include wildcards in the `object-id`. + # Supported wildcards: '*' to match 0 or more characters; + # '?' to match 1 character. If unset, the input video should be embedded + # in the request as `input_content`. If set, `input_content` must be unset. + # @!attribute [rw] input_content + # @return [::String] + # The video data bytes. + # If unset, the input video(s) should be specified via the `input_uri`. + # If set, `input_uri` must be unset. + # @!attribute [rw] features + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::Feature>] + # Required. Requested video annotation features. + # @!attribute [rw] video_context + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::VideoContext] + # Additional video context and/or feature-specific parameters. + # @!attribute [rw] output_uri + # @return [::String] + # Optional. Location where the output (in JSON format) should be stored. + # Currently, only [Cloud Storage](https://cloud.google.com/storage/) + # URIs are supported. These must be specified in the following format: + # `gs://bucket-id/object-id` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + # more information, see [Request + # URIs](https://cloud.google.com/storage/docs/request-endpoints). + # @!attribute [rw] location_id + # @return [::String] + # Optional. Cloud region where annotation should take place. Supported cloud + # regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no + # region is specified, the region will be determined based on video file + # location. + class AnnotateVideoRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video context and/or feature-specific parameters. + # @!attribute [rw] segments + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::VideoSegment>] + # Video segments to annotate. The segments may overlap and are not required + # to be contiguous or span the whole video. If unspecified, each video is + # treated as a single segment. + # @!attribute [rw] label_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::LabelDetectionConfig] + # Config for LABEL_DETECTION. + # @!attribute [rw] shot_change_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::ShotChangeDetectionConfig] + # Config for SHOT_CHANGE_DETECTION. + # @!attribute [rw] explicit_content_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::ExplicitContentDetectionConfig] + # Config for EXPLICIT_CONTENT_DETECTION. + # @!attribute [rw] face_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::FaceDetectionConfig] + # Config for FACE_DETECTION. + # @!attribute [rw] speech_transcription_config + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::SpeechTranscriptionConfig] + # Config for SPEECH_TRANSCRIPTION. + # @!attribute [rw] text_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::TextDetectionConfig] + # Config for TEXT_DETECTION. + # @!attribute [rw] person_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::PersonDetectionConfig] + # Config for PERSON_DETECTION. + # @!attribute [rw] object_tracking_config + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::ObjectTrackingConfig] + # Config for OBJECT_TRACKING. + class VideoContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for LABEL_DETECTION. + # @!attribute [rw] label_detection_mode + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::LabelDetectionMode] + # What labels should be detected with LABEL_DETECTION, in addition to + # video-level labels or segment-level labels. + # If unspecified, defaults to `SHOT_MODE`. + # @!attribute [rw] stationary_camera + # @return [::Boolean] + # Whether the video has been shot from a stationary (i.e., non-moving) + # camera. When set to true, might improve detection accuracy for moving + # objects. Should be used with `SHOT_AND_FRAME_MODE` enabled. + # @!attribute [rw] model + # @return [::String] + # Model to use for label detection. + # Supported values: "builtin/stable" (the default if unset) and + # "builtin/latest". + # @!attribute [rw] frame_confidence_threshold + # @return [::Float] + # The confidence threshold we perform filtering on the labels from + # frame-level detection. If not set, it is set to 0.4 by default. The valid + # range for this threshold is [0.1, 0.9]. Any value set outside of this + # range will be clipped. + # Note: For best results, follow the default threshold. We will update + # the default threshold everytime when we release a new model. + # @!attribute [rw] video_confidence_threshold + # @return [::Float] + # The confidence threshold we perform filtering on the labels from + # video-level and shot-level detections. If not set, it's set to 0.3 by + # default. The valid range for this threshold is [0.1, 0.9]. Any value set + # outside of this range will be clipped. + # Note: For best results, follow the default threshold. We will update + # the default threshold everytime when we release a new model. + class LabelDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for SHOT_CHANGE_DETECTION. + # @!attribute [rw] model + # @return [::String] + # Model to use for shot change detection. + # Supported values: "builtin/stable" (the default if unset) and + # "builtin/latest". + class ShotChangeDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for OBJECT_TRACKING. + # @!attribute [rw] model + # @return [::String] + # Model to use for object tracking. + # Supported values: "builtin/stable" (the default if unset) and + # "builtin/latest". + class ObjectTrackingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for EXPLICIT_CONTENT_DETECTION. + # @!attribute [rw] model + # @return [::String] + # Model to use for explicit content detection. + # Supported values: "builtin/stable" (the default if unset) and + # "builtin/latest". + class ExplicitContentDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for FACE_DETECTION. + # @!attribute [rw] model + # @return [::String] + # Model to use for face detection. + # Supported values: "builtin/stable" (the default if unset) and + # "builtin/latest". + # @!attribute [rw] include_bounding_boxes + # @return [::Boolean] + # Whether bounding boxes are included in the face annotation output. + # @!attribute [rw] include_attributes + # @return [::Boolean] + # Whether to enable face attributes detection, such as glasses, dark_glasses, + # mouth_open etc. Ignored if 'include_bounding_boxes' is set to false. + class FaceDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for PERSON_DETECTION. + # @!attribute [rw] include_bounding_boxes + # @return [::Boolean] + # Whether bounding boxes are included in the person detection annotation + # output. + # @!attribute [rw] include_pose_landmarks + # @return [::Boolean] + # Whether to enable pose landmarks detection. Ignored if + # 'include_bounding_boxes' is set to false. + # @!attribute [rw] include_attributes + # @return [::Boolean] + # Whether to enable person attributes detection, such as cloth color (black, + # blue, etc), type (coat, dress, etc), pattern (plain, floral, etc), hair, + # etc. + # Ignored if 'include_bounding_boxes' is set to false. + class PersonDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for TEXT_DETECTION. + # @!attribute [rw] language_hints + # @return [::Array<::String>] + # Language hint can be specified if the language to be detected is known a + # priori. It can increase the accuracy of the detection. Language hint must + # be language code in BCP-47 format. + # + # Automatic language detection is performed if no hint is provided. + # @!attribute [rw] model + # @return [::String] + # Model to use for text detection. + # Supported values: "builtin/stable" (the default if unset) and + # "builtin/latest". + class TextDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video segment. + # @!attribute [rw] start_time_offset + # @return [::Google::Protobuf::Duration] + # Time-offset, relative to the beginning of the video, + # corresponding to the start of the segment (inclusive). + # @!attribute [rw] end_time_offset + # @return [::Google::Protobuf::Duration] + # Time-offset, relative to the beginning of the video, + # corresponding to the end of the segment (inclusive). + class VideoSegment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video segment level annotation results for label detection. + # @!attribute [rw] segment + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::VideoSegment] + # Video segment where a label was detected. + # @!attribute [rw] confidence + # @return [::Float] + # Confidence that the label is accurate. Range: [0, 1]. + class LabelSegment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video frame level annotation results for label detection. + # @!attribute [rw] time_offset + # @return [::Google::Protobuf::Duration] + # Time-offset, relative to the beginning of the video, corresponding to the + # video frame for this location. + # @!attribute [rw] confidence + # @return [::Float] + # Confidence that the label is accurate. Range: [0, 1]. + class LabelFrame + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Detected entity from video analysis. + # @!attribute [rw] entity_id + # @return [::String] + # Opaque entity ID. Some IDs may be available in + # [Google Knowledge Graph Search + # API](https://developers.google.com/knowledge-graph/). + # @!attribute [rw] description + # @return [::String] + # Textual description, e.g., `Fixed-gear bicycle`. + # @!attribute [rw] language_code + # @return [::String] + # Language code for `description` in BCP-47 format. + class Entity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Label annotation. + # @!attribute [rw] entity + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::Entity] + # Detected entity. + # @!attribute [rw] category_entities + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::Entity>] + # Common categories for the detected entity. + # For example, when the label is `Terrier`, the category is likely `dog`. And + # in some cases there might be more than one categories e.g., `Terrier` could + # also be a `pet`. + # @!attribute [rw] segments + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::LabelSegment>] + # All video segments where a label was detected. + # @!attribute [rw] frames + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::LabelFrame>] + # All video frames where a label was detected. + class LabelAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video frame level annotation results for explicit content. + # @!attribute [rw] time_offset + # @return [::Google::Protobuf::Duration] + # Time-offset, relative to the beginning of the video, corresponding to the + # video frame for this location. + # @!attribute [rw] pornography_likelihood + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::Likelihood] + # Likelihood of the pornography content.. + class ExplicitContentFrame + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Explicit content annotation (based on per-frame visual signals only). + # If no explicit content has been detected in a frame, no annotations are + # present for that frame. + # @!attribute [rw] frames + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::ExplicitContentFrame>] + # All video frames where explicit content was detected. + class ExplicitContentAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Normalized bounding box. + # The normalized vertex coordinates are relative to the original image. + # Range: [0, 1]. + # @!attribute [rw] left + # @return [::Float] + # Left X coordinate. + # @!attribute [rw] top + # @return [::Float] + # Top Y coordinate. + # @!attribute [rw] right + # @return [::Float] + # Right X coordinate. + # @!attribute [rw] bottom + # @return [::Float] + # Bottom Y coordinate. + class NormalizedBoundingBox + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # For tracking related features. + # An object at time_offset with attributes, and located with + # normalized_bounding_box. + # @!attribute [rw] normalized_bounding_box + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::NormalizedBoundingBox] + # Normalized Bounding box in a frame, where the object is located. + # @!attribute [rw] time_offset + # @return [::Google::Protobuf::Duration] + # Time-offset, relative to the beginning of the video, + # corresponding to the video frame for this object. + # @!attribute [rw] attributes + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::DetectedAttribute>] + # Optional. The attributes of the object in the bounding box. + # @!attribute [rw] landmarks + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::DetectedLandmark>] + # Optional. The detected landmarks. + class TimestampedObject + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A track of an object instance. + # @!attribute [rw] segment + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::VideoSegment] + # Video segment of a track. + # @!attribute [rw] timestamped_objects + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::TimestampedObject>] + # The object with timestamp and attributes per frame in the track. + # @!attribute [rw] attributes + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::DetectedAttribute>] + # Optional. Attributes in the track level. + # @!attribute [rw] confidence + # @return [::Float] + # Optional. The confidence score of the tracked object. + class Track + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A generic detected attribute represented by name in string format. + # @!attribute [rw] name + # @return [::String] + # The name of the attribute, for example, glasses, dark_glasses, mouth_open. + # A full list of supported type names will be provided in the document. + # @!attribute [rw] confidence + # @return [::Float] + # Detected attribute confidence. Range [0, 1]. + # @!attribute [rw] value + # @return [::String] + # Text value of the detection result. For example, the value for "HairColor" + # can be "black", "blonde", etc. + class DetectedAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Celebrity definition. + # @!attribute [rw] name + # @return [::String] + # The resource name of the celebrity. Have the format + # `video-intelligence/kg-mid` indicates a celebrity from preloaded gallery. + # kg-mid is the id in Google knowledge graph, which is unique for the + # celebrity. + # @!attribute [rw] display_name + # @return [::String] + # The celebrity name. + # @!attribute [rw] description + # @return [::String] + # Textual description of additional information about the celebrity, if + # applicable. + class Celebrity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The annotation result of a celebrity face track. RecognizedCelebrity field + # could be empty if the face track does not have any matched celebrities. + # @!attribute [rw] celebrities + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::CelebrityTrack::RecognizedCelebrity>] + # Top N match of the celebrities for the face in this track. + # @!attribute [rw] face_track + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::Track] + # A track of a person's face. + class CelebrityTrack + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The recognized celebrity with confidence score. + # @!attribute [rw] celebrity + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::Celebrity] + # The recognized celebrity. + # @!attribute [rw] confidence + # @return [::Float] + # Recognition confidence. Range [0, 1]. + class RecognizedCelebrity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Celebrity recognition annotation per video. + # @!attribute [rw] celebrity_tracks + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::CelebrityTrack>] + # The tracks detected from the input video, including recognized celebrities + # and other detected faces in the video. + class CelebrityRecognitionAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A generic detected landmark represented by name in string format and a 2D + # location. + # @!attribute [rw] name + # @return [::String] + # The name of this landmark, for example, left_hand, right_shoulder. + # @!attribute [rw] point + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::NormalizedVertex] + # The 2D point of the detected landmark using the normalized image + # coordindate system. The normalized coordinates have the range from 0 to 1. + # @!attribute [rw] confidence + # @return [::Float] + # The confidence score of the detected landmark. Range [0, 1]. + class DetectedLandmark + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Face detection annotation. + # @!attribute [rw] tracks + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::Track>] + # The face tracks with attributes. + # @!attribute [rw] thumbnail + # @return [::String] + # The thumbnail of a person's face. + class FaceDetectionAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Person detection annotation per video. + # @!attribute [rw] tracks + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::Track>] + # The detected tracks of a person. + class PersonDetectionAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Annotation results for a single video. + # @!attribute [rw] input_uri + # @return [::String] + # Video file location in + # [Cloud Storage](https://cloud.google.com/storage/). + # @!attribute [rw] segment + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::VideoSegment] + # Video segment on which the annotation is run. + # @!attribute [rw] segment_label_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::LabelAnnotation>] + # Topical label annotations on video level or user-specified segment level. + # There is exactly one element for each unique label. + # @!attribute [rw] segment_presence_label_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::LabelAnnotation>] + # Presence label annotations on video level or user-specified segment level. + # There is exactly one element for each unique label. Compared to the + # existing topical `segment_label_annotations`, this field presents more + # fine-grained, segment-level labels detected in video content and is made + # available only when the client sets `LabelDetectionConfig.model` to + # "builtin/latest" in the request. + # @!attribute [rw] shot_label_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::LabelAnnotation>] + # Topical label annotations on shot level. + # There is exactly one element for each unique label. + # @!attribute [rw] shot_presence_label_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::LabelAnnotation>] + # Presence label annotations on shot level. There is exactly one element for + # each unique label. Compared to the existing topical + # `shot_label_annotations`, this field presents more fine-grained, shot-level + # labels detected in video content and is made available only when the client + # sets `LabelDetectionConfig.model` to "builtin/latest" in the request. + # @!attribute [rw] frame_label_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::LabelAnnotation>] + # Label annotations on frame level. + # There is exactly one element for each unique label. + # @!attribute [rw] face_detection_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::FaceDetectionAnnotation>] + # Face detection annotations. + # @!attribute [rw] shot_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::VideoSegment>] + # Shot annotations. Each shot is represented as a video segment. + # @!attribute [rw] explicit_annotation + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::ExplicitContentAnnotation] + # Explicit content annotation. + # @!attribute [rw] speech_transcriptions + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::SpeechTranscription>] + # Speech transcription. + # @!attribute [rw] text_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::TextAnnotation>] + # OCR text detection and tracking. + # Annotations for list of detected text snippets. Each will have list of + # frame information associated with it. + # @!attribute [rw] object_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::ObjectTrackingAnnotation>] + # Annotations for list of objects detected and tracked in video. + # @!attribute [rw] logo_recognition_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::LogoRecognitionAnnotation>] + # Annotations for list of logos detected, tracked and recognized in video. + # @!attribute [rw] person_detection_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::PersonDetectionAnnotation>] + # Person detection annotations. + # @!attribute [rw] celebrity_recognition_annotations + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::CelebrityRecognitionAnnotation] + # Celebrity recognition annotations. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # If set, indicates an error. Note that for a single `AnnotateVideoRequest` + # some videos may succeed and some may fail. + class VideoAnnotationResults + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video annotation response. Included in the `response` + # field of the `Operation` returned by the `GetOperation` + # call of the `google::longrunning::Operations` service. + # @!attribute [rw] annotation_results + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::VideoAnnotationResults>] + # Annotation results for all videos specified in `AnnotateVideoRequest`. + class AnnotateVideoResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Annotation progress for a single video. + # @!attribute [rw] input_uri + # @return [::String] + # Video file location in + # [Cloud Storage](https://cloud.google.com/storage/). + # @!attribute [rw] progress_percent + # @return [::Integer] + # Approximate percentage processed thus far. Guaranteed to be + # 100 when fully processed. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Time when the request was received. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Time of the most recent update. + # @!attribute [rw] feature + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::Feature] + # Specifies which feature is being tracked if the request contains more than + # one feature. + # @!attribute [rw] segment + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::VideoSegment] + # Specifies which segment is being tracked if the request contains more than + # one segment. + class VideoAnnotationProgress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video annotation progress. Included in the `metadata` + # field of the `Operation` returned by the `GetOperation` + # call of the `google::longrunning::Operations` service. + # @!attribute [rw] annotation_progress + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::VideoAnnotationProgress>] + # Progress metadata for all videos specified in `AnnotateVideoRequest`. + class AnnotateVideoProgress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for SPEECH_TRANSCRIPTION. + # @!attribute [rw] language_code + # @return [::String] + # Required. *Required* The language of the supplied audio as a + # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + # Example: "en-US". + # See [Language Support](https://cloud.google.com/speech/docs/languages) + # for a list of the currently supported language codes. + # @!attribute [rw] max_alternatives + # @return [::Integer] + # Optional. Maximum number of recognition hypotheses to be returned. + # Specifically, the maximum number of `SpeechRecognitionAlternative` messages + # within each `SpeechTranscription`. The server may return fewer than + # `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will + # return a maximum of one. If omitted, will return a maximum of one. + # @!attribute [rw] filter_profanity + # @return [::Boolean] + # Optional. If set to `true`, the server will attempt to filter out + # profanities, replacing all but the initial character in each filtered word + # with asterisks, e.g. "f***". If set to `false` or omitted, profanities + # won't be filtered out. + # @!attribute [rw] speech_contexts + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::SpeechContext>] + # Optional. A means to provide context to assist the speech recognition. + # @!attribute [rw] enable_automatic_punctuation + # @return [::Boolean] + # Optional. If 'true', adds punctuation to recognition result hypotheses. + # This feature is only available in select languages. Setting this for + # requests in other languages has no effect at all. The default 'false' value + # does not add punctuation to result hypotheses. NOTE: "This is currently + # offered as an experimental service, complimentary to all users. In the + # future this may be exclusively available as a premium feature." + # @!attribute [rw] audio_tracks + # @return [::Array<::Integer>] + # Optional. For file formats, such as MXF or MKV, supporting multiple audio + # tracks, specify up to two tracks. Default: track 0. + # @!attribute [rw] enable_speaker_diarization + # @return [::Boolean] + # Optional. If 'true', enables speaker detection for each recognized word in + # the top alternative of the recognition result using a speaker_tag provided + # in the WordInfo. + # Note: When this is true, we send all the words from the beginning of the + # audio for the top alternative in every consecutive response. + # This is done in order to improve our speaker tags as our models learn to + # identify the speakers in the conversation over time. + # @!attribute [rw] diarization_speaker_count + # @return [::Integer] + # Optional. If set, specifies the estimated number of speakers in the + # conversation. If not set, defaults to '2'. Ignored unless + # enable_speaker_diarization is set to true. + # @!attribute [rw] enable_word_confidence + # @return [::Boolean] + # Optional. If `true`, the top result includes a list of words and the + # confidence for those words. If `false`, no word-level confidence + # information is returned. The default is `false`. + class SpeechTranscriptionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides "hints" to the speech recognizer to favor specific words and phrases + # in the results. + # @!attribute [rw] phrases + # @return [::Array<::String>] + # Optional. A list of strings containing words and phrases "hints" so that + # the speech recognition is more likely to recognize them. This can be used + # to improve the accuracy for specific words and phrases, for example, if + # specific commands are typically spoken by the user. This can also be used + # to add additional words to the vocabulary of the recognizer. See + # [usage limits](https://cloud.google.com/speech/limits#content). + class SpeechContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A speech recognition result corresponding to a portion of the audio. + # @!attribute [rw] alternatives + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::SpeechRecognitionAlternative>] + # May contain one or more recognition hypotheses (up to the maximum specified + # in `max_alternatives`). These alternatives are ordered in terms of + # accuracy, with the top (first) alternative being the most probable, as + # ranked by the recognizer. + # @!attribute [r] language_code + # @return [::String] + # Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + # language tag of the language in this result. This language code was + # detected to have the most likelihood of being spoken in the audio. + class SpeechTranscription + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Alternative hypotheses (a.k.a. n-best list). + # @!attribute [rw] transcript + # @return [::String] + # Transcript text representing the words that the user spoke. + # @!attribute [r] confidence + # @return [::Float] + # Output only. The confidence estimate between 0.0 and 1.0. A higher number + # indicates an estimated greater likelihood that the recognized words are + # correct. This field is set only for the top alternative. + # This field is not guaranteed to be accurate and users should not rely on it + # to be always provided. + # The default of 0.0 is a sentinel value indicating `confidence` was not set. + # @!attribute [r] words + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::WordInfo>] + # Output only. A list of word-specific information for each recognized word. + # Note: When `enable_speaker_diarization` is set to true, you will see all + # the words from the beginning of the audio. + class SpeechRecognitionAlternative + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Word-specific information for recognized words. Word information is only + # included in the response when certain request parameters are set, such + # as `enable_word_time_offsets`. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Duration] + # Time offset relative to the beginning of the audio, and + # corresponding to the start of the spoken word. This field is only set if + # `enable_word_time_offsets=true` and only in the top hypothesis. This is an + # experimental feature and the accuracy of the time offset can vary. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Duration] + # Time offset relative to the beginning of the audio, and + # corresponding to the end of the spoken word. This field is only set if + # `enable_word_time_offsets=true` and only in the top hypothesis. This is an + # experimental feature and the accuracy of the time offset can vary. + # @!attribute [rw] word + # @return [::String] + # The word corresponding to this set of information. + # @!attribute [r] confidence + # @return [::Float] + # Output only. The confidence estimate between 0.0 and 1.0. A higher number + # indicates an estimated greater likelihood that the recognized words are + # correct. This field is set only for the top alternative. + # This field is not guaranteed to be accurate and users should not rely on it + # to be always provided. + # The default of 0.0 is a sentinel value indicating `confidence` was not set. + # @!attribute [r] speaker_tag + # @return [::Integer] + # Output only. A distinct integer value is assigned for every speaker within + # the audio. This field specifies which one of those speakers was detected to + # have spoken this word. Value ranges from 1 up to diarization_speaker_count, + # and is only set if speaker diarization is enabled. + class WordInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A vertex represents a 2D point in the image. + # NOTE: the normalized vertex coordinates are relative to the original image + # and range from 0 to 1. + # @!attribute [rw] x + # @return [::Float] + # X coordinate. + # @!attribute [rw] y + # @return [::Float] + # Y coordinate. + class NormalizedVertex + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Normalized bounding polygon for text (that might not be aligned with axis). + # Contains list of the corner points in clockwise order starting from + # top-left corner. For example, for a rectangular bounding box: + # When the text is horizontal it might look like: + # 0----1 + # | | + # 3----2 + # + # When it's clockwise rotated 180 degrees around the top-left corner it + # becomes: + # 2----3 + # | | + # 1----0 + # + # and the vertex order will still be (0, 1, 2, 3). Note that values can be less + # than 0, or greater than 1 due to trignometric calculations for location of + # the box. + # @!attribute [rw] vertices + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::NormalizedVertex>] + # Normalized vertices of the bounding polygon. + class NormalizedBoundingPoly + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video segment level annotation results for text detection. + # @!attribute [rw] segment + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::VideoSegment] + # Video segment where a text snippet was detected. + # @!attribute [rw] confidence + # @return [::Float] + # Confidence for the track of detected text. It is calculated as the highest + # over all frames where OCR detected text appears. + # @!attribute [rw] frames + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::TextFrame>] + # Information related to the frames where OCR detected text appears. + class TextSegment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video frame level annotation results for text annotation (OCR). + # Contains information regarding timestamp and bounding box locations for the + # frames containing detected OCR text snippets. + # @!attribute [rw] rotated_bounding_box + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::NormalizedBoundingPoly] + # Bounding polygon of the detected text for this frame. + # @!attribute [rw] time_offset + # @return [::Google::Protobuf::Duration] + # Timestamp of this frame. + class TextFrame + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Annotations related to one detected OCR text snippet. This will contain the + # corresponding text, confidence value, and frame level information for each + # detection. + # @!attribute [rw] text + # @return [::String] + # The detected text. + # @!attribute [rw] segments + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::TextSegment>] + # All video segments where OCR detected text appears. + class TextAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Video frame level annotations for object detection and tracking. This field + # stores per frame location, time offset, and confidence. + # @!attribute [rw] normalized_bounding_box + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::NormalizedBoundingBox] + # The normalized bounding box location of this object track for the frame. + # @!attribute [rw] time_offset + # @return [::Google::Protobuf::Duration] + # The timestamp of the frame in microseconds. + class ObjectTrackingFrame + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Annotations corresponding to one tracked object. + # @!attribute [rw] segment + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::VideoSegment] + # Non-streaming batch mode ONLY. + # Each object track corresponds to one video segment where it appears. + # + # Note: The following fields are mutually exclusive: `segment`, `track_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] track_id + # @return [::Integer] + # Streaming mode ONLY. + # In streaming mode, we do not know the end time of a tracked object + # before it is completed. Hence, there is no VideoSegment info returned. + # Instead, we provide a unique identifiable integer track_id so that + # the customers can correlate the results of the ongoing + # ObjectTrackAnnotation of the same track_id over time. + # + # Note: The following fields are mutually exclusive: `track_id`, `segment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] entity + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::Entity] + # Entity to specify the object category that this track is labeled as. + # @!attribute [rw] confidence + # @return [::Float] + # Object category's labeling confidence of this track. + # @!attribute [rw] frames + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::ObjectTrackingFrame>] + # Information corresponding to all frames where this object track appears. + # Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame + # messages in frames. + # Streaming mode: it can only be one ObjectTrackingFrame message in frames. + class ObjectTrackingAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Annotation corresponding to one detected, tracked and recognized logo class. + # @!attribute [rw] entity + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::Entity] + # Entity category information to specify the logo class that all the logo + # tracks within this LogoRecognitionAnnotation are recognized as. + # @!attribute [rw] tracks + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::Track>] + # All logo tracks where the recognized logo appears. Each track corresponds + # to one logo instance appearing in consecutive frames. + # @!attribute [rw] segments + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::VideoSegment>] + # All video segments where the recognized logo appears. There might be + # multiple instances of the same logo class appearing in one VideoSegment. + class LogoRecognitionAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The top-level message sent by the client for the `StreamingAnnotateVideo` + # method. Multiple `StreamingAnnotateVideoRequest` messages are sent. + # The first message must only contain a `StreamingVideoConfig` message. + # All subsequent messages must only contain `input_content` data. + # @!attribute [rw] video_config + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoConfig] + # Provides information to the annotator, specifing how to process the + # request. The first `AnnotateStreamingVideoRequest` message must only + # contain a `video_config` message. + # + # Note: The following fields are mutually exclusive: `video_config`, `input_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] input_content + # @return [::String] + # The video data to be annotated. Chunks of video data are sequentially + # sent in `StreamingAnnotateVideoRequest` messages. Except the initial + # `StreamingAnnotateVideoRequest` message containing only + # `video_config`, all subsequent `AnnotateStreamingVideoRequest` + # messages must only contain `input_content` field. + # Note: as with all bytes fields, protobuffers use a pure binary + # representation (not base64). + # + # Note: The following fields are mutually exclusive: `input_content`, `video_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class StreamingAnnotateVideoRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides information to the annotator that specifies how to process the + # request. + # @!attribute [rw] shot_change_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingShotChangeDetectionConfig] + # Config for STREAMING_SHOT_CHANGE_DETECTION. + # + # Note: The following fields are mutually exclusive: `shot_change_detection_config`, `label_detection_config`, `explicit_content_detection_config`, `object_tracking_config`, `automl_action_recognition_config`, `automl_classification_config`, `automl_object_tracking_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] label_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingLabelDetectionConfig] + # Config for STREAMING_LABEL_DETECTION. + # + # Note: The following fields are mutually exclusive: `label_detection_config`, `shot_change_detection_config`, `explicit_content_detection_config`, `object_tracking_config`, `automl_action_recognition_config`, `automl_classification_config`, `automl_object_tracking_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] explicit_content_detection_config + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingExplicitContentDetectionConfig] + # Config for STREAMING_EXPLICIT_CONTENT_DETECTION. + # + # Note: The following fields are mutually exclusive: `explicit_content_detection_config`, `shot_change_detection_config`, `label_detection_config`, `object_tracking_config`, `automl_action_recognition_config`, `automl_classification_config`, `automl_object_tracking_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] object_tracking_config + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingObjectTrackingConfig] + # Config for STREAMING_OBJECT_TRACKING. + # + # Note: The following fields are mutually exclusive: `object_tracking_config`, `shot_change_detection_config`, `label_detection_config`, `explicit_content_detection_config`, `automl_action_recognition_config`, `automl_classification_config`, `automl_object_tracking_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] automl_action_recognition_config + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAutomlActionRecognitionConfig] + # Config for STREAMING_AUTOML_ACTION_RECOGNITION. + # + # Note: The following fields are mutually exclusive: `automl_action_recognition_config`, `shot_change_detection_config`, `label_detection_config`, `explicit_content_detection_config`, `object_tracking_config`, `automl_classification_config`, `automl_object_tracking_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] automl_classification_config + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAutomlClassificationConfig] + # Config for STREAMING_AUTOML_CLASSIFICATION. + # + # Note: The following fields are mutually exclusive: `automl_classification_config`, `shot_change_detection_config`, `label_detection_config`, `explicit_content_detection_config`, `object_tracking_config`, `automl_action_recognition_config`, `automl_object_tracking_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] automl_object_tracking_config + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAutomlObjectTrackingConfig] + # Config for STREAMING_AUTOML_OBJECT_TRACKING. + # + # Note: The following fields are mutually exclusive: `automl_object_tracking_config`, `shot_change_detection_config`, `label_detection_config`, `explicit_content_detection_config`, `object_tracking_config`, `automl_action_recognition_config`, `automl_classification_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] feature + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingFeature] + # Requested annotation feature. + # @!attribute [rw] storage_config + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingStorageConfig] + # Streaming storage option. By default: storage is disabled. + class StreamingVideoConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `StreamingAnnotateVideoResponse` is the only message returned to the client + # by `StreamingAnnotateVideo`. A series of zero or more + # `StreamingAnnotateVideoResponse` messages are streamed back to the client. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # If set, returns a {::Google::Rpc::Status google.rpc.Status} message that + # specifies the error for the operation. + # @!attribute [rw] annotation_results + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoAnnotationResults] + # Streaming annotation results. + # @!attribute [rw] annotation_results_uri + # @return [::String] + # Google Cloud Storage(GCS) URI that stores annotation results of one + # streaming session in JSON format. + # It is the annotation_result_storage_directory + # from the request followed by '/cloud_project_number-session_id'. + class StreamingAnnotateVideoResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Streaming annotation results corresponding to a portion of the video + # that is currently being processed. + # @!attribute [rw] shot_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::VideoSegment>] + # Shot annotation results. Each shot is represented as a video segment. + # @!attribute [rw] label_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::LabelAnnotation>] + # Label annotation results. + # @!attribute [rw] explicit_annotation + # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::ExplicitContentAnnotation] + # Explicit content annotation results. + # @!attribute [rw] object_annotations + # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::ObjectTrackingAnnotation>] + # Object tracking results. + class StreamingVideoAnnotationResults + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for STREAMING_SHOT_CHANGE_DETECTION. + class StreamingShotChangeDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for STREAMING_LABEL_DETECTION. + # @!attribute [rw] stationary_camera + # @return [::Boolean] + # Whether the video has been captured from a stationary (i.e. non-moving) + # camera. When set to true, might improve detection accuracy for moving + # objects. Default: false. + class StreamingLabelDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for STREAMING_EXPLICIT_CONTENT_DETECTION. + class StreamingExplicitContentDetectionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for STREAMING_OBJECT_TRACKING. + class StreamingObjectTrackingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for STREAMING_AUTOML_ACTION_RECOGNITION. + # @!attribute [rw] model_name + # @return [::String] + # Resource name of AutoML model. + # Format: `projects/{project_id}/locations/{location_id}/models/{model_id}` + class StreamingAutomlActionRecognitionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for STREAMING_AUTOML_CLASSIFICATION. + # @!attribute [rw] model_name + # @return [::String] + # Resource name of AutoML model. + # Format: + # `projects/{project_number}/locations/{location_id}/models/{model_id}` + class StreamingAutomlClassificationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for STREAMING_AUTOML_OBJECT_TRACKING. + # @!attribute [rw] model_name + # @return [::String] + # Resource name of AutoML model. + # Format: `projects/{project_id}/locations/{location_id}/models/{model_id}` + class StreamingAutomlObjectTrackingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for streaming storage option. + # @!attribute [rw] enable_storage_annotation_result + # @return [::Boolean] + # Enable streaming storage. Default: false. + # @!attribute [rw] annotation_result_storage_directory + # @return [::String] + # Cloud Storage URI to store all annotation results for one client. Client + # should specify this field as the top-level storage directory. Annotation + # results of different sessions will be put into different sub-directories + # denoted by project_name and session_id. All sub-directories will be auto + # generated by program and will be made accessible to client in response + # proto. URIs must be specified in the following format: + # `gs://bucket-id/object-id` `bucket-id` should be a valid Cloud Storage + # bucket created by client and bucket permission shall also be configured + # properly. `object-id` can be arbitrary string that make sense to client. + # Other URI formats will return error and cause Cloud Storage write failure. + class StreamingStorageConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Label detection mode. + module LabelDetectionMode + # Unspecified. + LABEL_DETECTION_MODE_UNSPECIFIED = 0 + + # Detect shot-level labels. + SHOT_MODE = 1 + + # Detect frame-level labels. + FRAME_MODE = 2 + + # Detect both shot-level and frame-level labels. + SHOT_AND_FRAME_MODE = 3 + end + + # Bucketized representation of likelihood. + module Likelihood + # Unspecified likelihood. + LIKELIHOOD_UNSPECIFIED = 0 + + # Very unlikely. + VERY_UNLIKELY = 1 + + # Unlikely. + UNLIKELY = 2 + + # Possible. + POSSIBLE = 3 + + # Likely. + LIKELY = 4 + + # Very likely. + VERY_LIKELY = 5 + end + + # Streaming video annotation feature. + module StreamingFeature + # Unspecified. + STREAMING_FEATURE_UNSPECIFIED = 0 + + # Label detection. Detect objects, such as dog or flower. + STREAMING_LABEL_DETECTION = 1 + + # Shot change detection. + STREAMING_SHOT_CHANGE_DETECTION = 2 + + # Explicit content detection. + STREAMING_EXPLICIT_CONTENT_DETECTION = 3 + + # Object detection and tracking. + STREAMING_OBJECT_TRACKING = 4 + + # Action recognition based on AutoML model. + STREAMING_AUTOML_ACTION_RECOGNITION = 23 + + # Video classification based on AutoML model. + STREAMING_AUTOML_CLASSIFICATION = 21 + + # Object detection and tracking based on AutoML model. + STREAMING_AUTOML_OBJECT_TRACKING = 22 + end + + # Video annotation feature. + module Feature + # Unspecified. + FEATURE_UNSPECIFIED = 0 + + # Label detection. Detect objects, such as dog or flower. + LABEL_DETECTION = 1 + + # Shot change detection. + SHOT_CHANGE_DETECTION = 2 + + # Explicit content detection. + EXPLICIT_CONTENT_DETECTION = 3 + + # Human face detection. + FACE_DETECTION = 4 + + # Speech transcription. + SPEECH_TRANSCRIPTION = 6 + + # OCR text detection and tracking. + TEXT_DETECTION = 7 + + # Object detection and tracking. + OBJECT_TRACKING = 9 + + # Logo detection, tracking, and recognition. + LOGO_RECOGNITION = 12 + + # Celebrity recognition. + CELEBRITY_RECOGNITION = 13 + + # Person detection. + PERSON_DETECTION = 14 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/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-video_intelligence-v1p3beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/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-video_intelligence-v1p3beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/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-video_intelligence-v1p3beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/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-video_intelligence-v1p3beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/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-video_intelligence-v1p3beta1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/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-video_intelligence-v1p3beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/Gemfile new file mode 100644 index 000000000000..0ee93eb7f8a8 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/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-video_intelligence-v1p3beta1", path: "../" +else + gem "google-cloud-video_intelligence-v1p3beta1" +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-video_intelligence-v1p3beta1/snippets/snippet_metadata_google.cloud.videointelligence.v1p3beta1.json b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/snippet_metadata_google.cloud.videointelligence.v1p3beta1.json new file mode 100644 index 000000000000..2a7adfe7c1fe --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/snippet_metadata_google.cloud.videointelligence.v1p3beta1.json @@ -0,0 +1,95 @@ +{ + "client_library": { + "name": "google-cloud-video_intelligence-v1p3beta1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.videointelligence.v1p3beta1", + "version": "v1p3beta1" + } + ] + }, + "snippets": [ + { + "region_tag": "videointelligence_v1p3beta1_generated_VideoIntelligenceService_AnnotateVideo_sync", + "title": "Snippet for the annotate_video call in the VideoIntelligenceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client#annotate_video.", + "file": "video_intelligence_service/annotate_video.rb", + "language": "RUBY", + "client_method": { + "short_name": "annotate_video", + "full_name": "::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client#annotate_video", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "VideoIntelligenceService::Client", + "full_name": "::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client" + }, + "method": { + "short_name": "AnnotateVideo", + "full_name": "google.cloud.videointelligence.v1p3beta1.VideoIntelligenceService.AnnotateVideo", + "service": { + "short_name": "VideoIntelligenceService", + "full_name": "google.cloud.videointelligence.v1p3beta1.VideoIntelligenceService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "videointelligence_v1p3beta1_generated_StreamingVideoIntelligenceService_StreamingAnnotateVideo_sync", + "title": "Snippet for the streaming_annotate_video call in the StreamingVideoIntelligenceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client#streaming_annotate_video.", + "file": "streaming_video_intelligence_service/streaming_annotate_video.rb", + "language": "RUBY", + "client_method": { + "short_name": "streaming_annotate_video", + "full_name": "::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client#streaming_annotate_video", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoResponse", + "client": { + "short_name": "StreamingVideoIntelligenceService::Client", + "full_name": "::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client" + }, + "method": { + "short_name": "StreamingAnnotateVideo", + "full_name": "google.cloud.videointelligence.v1p3beta1.StreamingVideoIntelligenceService.StreamingAnnotateVideo", + "service": { + "short_name": "StreamingVideoIntelligenceService", + "full_name": "google.cloud.videointelligence.v1p3beta1.StreamingVideoIntelligenceService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 55, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/streaming_video_intelligence_service/streaming_annotate_video.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/streaming_video_intelligence_service/streaming_annotate_video.rb new file mode 100644 index 000000000000..935501f422fe --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/streaming_video_intelligence_service/streaming_annotate_video.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 videointelligence_v1p3beta1_generated_StreamingVideoIntelligenceService_StreamingAnnotateVideo_sync] +require "google/cloud/video_intelligence/v1p3beta1" + +## +# Snippet for the streaming_annotate_video call in the StreamingVideoIntelligenceService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client#streaming_annotate_video. +# +def streaming_annotate_video + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client.new + + # Create an input stream. + input = Gapic::StreamInput.new + + # Call the streaming_annotate_video method to start streaming. + output = client.streaming_annotate_video 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::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest.new + input << Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest.new + input.close + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoResponse + output.each do |current_response| + p current_response + end +end +# [END videointelligence_v1p3beta1_generated_StreamingVideoIntelligenceService_StreamingAnnotateVideo_sync] diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/video_intelligence_service/annotate_video.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/video_intelligence_service/annotate_video.rb new file mode 100644 index 000000000000..91bcf248009d --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/video_intelligence_service/annotate_video.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 videointelligence_v1p3beta1_generated_VideoIntelligenceService_AnnotateVideo_sync] +require "google/cloud/video_intelligence/v1p3beta1" + +## +# Snippet for the annotate_video call in the VideoIntelligenceService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client#annotate_video. +# +def annotate_video + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest.new + + # Call the annotate_video method. + result = client.annotate_video request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END videointelligence_v1p3beta1_generated_VideoIntelligenceService_AnnotateVideo_sync] diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service_test.rb new file mode 100644 index 000000000000..03710f9f7cf3 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service_test.rb @@ -0,0 +1,193 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/videointelligence/v1p3beta1/video_intelligence_pb" +require "google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service" + +class ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::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_streaming_annotate_video + # Create GRPC objects. + grpc_response = ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoResponse.new + grpc_operation = GRPC::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. + video_config = {} + + streaming_annotate_video_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :streaming_annotate_video, name + assert_kind_of Enumerable, request + refute_nil options + request + end + + Gapic::ServiceStub.stub :new, streaming_annotate_video_client_stub do + # Create client + client = ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use enumerable object with hash and protobuf object. + request_hash = { video_config: video_config } + request_proto = ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest.new video_config: video_config + enum_input = [request_hash, request_proto].to_enum + client.streaming_annotate_video enum_input do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoResponse, r + end + assert_equal grpc_operation, operation + end + + # Use stream input object (from gapic-common). + request_hash = { video_config: video_config } + request_proto = ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest.new video_config: video_config + stream_input = Gapic::StreamInput.new + client.streaming_annotate_video stream_input do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoResponse, 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 = { video_config: video_config } + request_proto = ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest.new video_config: video_config + enum_input = [request_hash, request_proto].to_enum + client.streaming_annotate_video enum_input, grpc_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoResponse, r + end + assert_equal grpc_operation, operation + end + + # Use stream input object (from gapic-common) with options. + request_hash = { video_config: video_config } + request_proto = ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest.new video_config: video_config + stream_input = Gapic::StreamInput.new + client.streaming_annotate_video stream_input, grpc_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoResponse, 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, streaming_annotate_video_client_stub.call_rpc_count + streaming_annotate_video_client_stub.requests.each do |request| + request.to_a.each do |r| + assert_kind_of ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest, r + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoConfig), r["video_config"] + assert_equal :video_config, r.streaming_request + end + end + 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::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::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::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::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::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service_operations_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service_operations_test.rb new file mode 100644 index 000000000000..b7be8023dfd0 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/video_intelligence_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/videointelligence/v1p3beta1/video_intelligence_pb" +require "google/cloud/videointelligence/v1p3beta1/video_intelligence_services_pb" +require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service" + +class ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service_rest_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service_rest_test.rb new file mode 100644 index 000000000000..e65a7efeb119 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service_rest_test.rb @@ -0,0 +1,158 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/videointelligence/v1p3beta1/video_intelligence_pb" +require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest" + + +class ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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_annotate_video + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + input_uri = "hello world" + input_content = "hello world" + features = [:FEATURE_UNSPECIFIED] + video_context = {} + output_uri = "hello world" + location_id = "hello world" + + annotate_video_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::ServiceStub.stub :transcode_annotate_video_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, annotate_video_client_stub do + # Create client + client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.annotate_video input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.annotate_video ::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.annotate_video(::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, annotate_video_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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service_test.rb new file mode 100644 index 000000000000..7141d86e1c4d --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service_test.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! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/videointelligence/v1p3beta1/video_intelligence_pb" +require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service" + +class ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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_annotate_video + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + input_uri = "hello world" + input_content = "hello world" + features = [:FEATURE_UNSPECIFIED] + video_context = {} + output_uri = "hello world" + location_id = "hello world" + + annotate_video_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :annotate_video, name + assert_kind_of ::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest, request + assert_equal "hello world", request["input_uri"] + assert_equal "hello world", request["input_content"] + assert_equal [:FEATURE_UNSPECIFIED], request["features"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoContext), request["video_context"] + assert_equal "hello world", request["output_uri"] + assert_equal "hello world", request["location_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, annotate_video_client_stub do + # Create client + client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video ::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video(::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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, annotate_video_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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/helper.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-vision-v1/.gitignore b/owl-bot-staging/google-cloud-vision-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-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-vision-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-vision-v1/.repo-metadata.json new file mode 100644 index 000000000000..14cf50628165 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "vision.googleapis.com", + "api_shortname": "vision", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-vision-v1/latest", + "distribution_name": "google-cloud-vision-v1", + "is_cloud": true, + "language": "ruby", + "name": "vision", + "name_pretty": "Cloud Vision V1 API", + "product_documentation": "https://cloud.google.com/vision", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Cloud Vision API allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content. Note that google-cloud-vision-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-vision instead. See the readme for more details.", + "ruby-cloud-env-prefix": "VISION", + "ruby-cloud-product-url": "https://cloud.google.com/vision", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-vision-v1/.rubocop.yml b/owl-bot-staging/google-cloud-vision-v1/.rubocop.yml new file mode 100644 index 000000000000..94d0134a2110 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-vision-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-vision-v1.rb" diff --git a/owl-bot-staging/google-cloud-vision-v1/.toys.rb b/owl-bot-staging/google-cloud-vision-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-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-vision-v1/.yardopts b/owl-bot-staging/google-cloud-vision-v1/.yardopts new file mode 100644 index 000000000000..d7051d552590 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Vision 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-vision-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-vision-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..96386136a3ed --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-vision-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-vision-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/vision/v1" + +client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/vision/v1" + +::Google::Cloud::Vision::V1::ProductSearch::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Vision::V1::ProductSearch::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-vision-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/vision/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Vision::V1::ProductSearch::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-vision-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-vision-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-vision-v1/Gemfile b/owl-bot-staging/google-cloud-vision-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-vision-v1/LICENSE.md b/owl-bot-staging/google-cloud-vision-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-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-vision-v1/README.md b/owl-bot-staging/google-cloud-vision-v1/README.md new file mode 100644 index 000000000000..76211e7edaa7 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Vision V1 API + +Integrates Google Vision features, including image labeling, face, logo, and landmark detection, optical character recognition (OCR), and detection of explicit content, into applications. + +Cloud Vision API allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content. + +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 Vision V1 API. Most users should consider using +the main client gem, +[google-cloud-vision](https://rubygems.org/gems/google-cloud-vision). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-vision-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/vision.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/vision/v1" + +client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new +request = ::Google::Cloud::Vision::V1::CreateProductSetRequest.new # (request fields as keyword arguments...) +response = client.create_product_set request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-vision-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/vision) +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/vision/v1" +require "logger" + +client = ::Google::Cloud::Vision::V1::ProductSearch::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-vision`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-vision-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-vision`. +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-vision-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-vision-v1/Rakefile b/owl-bot-staging/google-cloud-vision-v1/Rakefile new file mode 100644 index 000000000000..d701662730ed --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-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-vision-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["VISION_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["VISION_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["VISION_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 VISION_TEST_PROJECT=test123 VISION_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/vision/v1/product_search/credentials" + ::Google::Cloud::Vision::V1::ProductSearch::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["VISION_PROJECT"] = project + ENV["VISION_TEST_PROJECT"] = project + ENV["VISION_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-vision-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-vision-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-vision-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-vision-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-vision-v1" + header "google-cloud-vision-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-vision-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-vision-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-vision-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-vision-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-vision-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-vision-v1/gapic_metadata.json new file mode 100644 index 000000000000..d773615236cd --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/gapic_metadata.json @@ -0,0 +1,142 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.vision.v1", + "libraryPackage": "::Google::Cloud::Vision::V1", + "services": { + "ProductSearch": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Vision::V1::ProductSearch::Client", + "rpcs": { + "CreateProductSet": { + "methods": [ + "create_product_set" + ] + }, + "ListProductSets": { + "methods": [ + "list_product_sets" + ] + }, + "GetProductSet": { + "methods": [ + "get_product_set" + ] + }, + "UpdateProductSet": { + "methods": [ + "update_product_set" + ] + }, + "DeleteProductSet": { + "methods": [ + "delete_product_set" + ] + }, + "CreateProduct": { + "methods": [ + "create_product" + ] + }, + "ListProducts": { + "methods": [ + "list_products" + ] + }, + "GetProduct": { + "methods": [ + "get_product" + ] + }, + "UpdateProduct": { + "methods": [ + "update_product" + ] + }, + "DeleteProduct": { + "methods": [ + "delete_product" + ] + }, + "CreateReferenceImage": { + "methods": [ + "create_reference_image" + ] + }, + "DeleteReferenceImage": { + "methods": [ + "delete_reference_image" + ] + }, + "ListReferenceImages": { + "methods": [ + "list_reference_images" + ] + }, + "GetReferenceImage": { + "methods": [ + "get_reference_image" + ] + }, + "AddProductToProductSet": { + "methods": [ + "add_product_to_product_set" + ] + }, + "RemoveProductFromProductSet": { + "methods": [ + "remove_product_from_product_set" + ] + }, + "ListProductsInProductSet": { + "methods": [ + "list_products_in_product_set" + ] + }, + "ImportProductSets": { + "methods": [ + "import_product_sets" + ] + }, + "PurgeProducts": { + "methods": [ + "purge_products" + ] + } + } + } + } + }, + "ImageAnnotator": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Vision::V1::ImageAnnotator::Client", + "rpcs": { + "BatchAnnotateImages": { + "methods": [ + "batch_annotate_images" + ] + }, + "BatchAnnotateFiles": { + "methods": [ + "batch_annotate_files" + ] + }, + "AsyncBatchAnnotateImages": { + "methods": [ + "async_batch_annotate_images" + ] + }, + "AsyncBatchAnnotateFiles": { + "methods": [ + "async_batch_annotate_files" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-vision-v1/google-cloud-vision-v1.gemspec b/owl-bot-staging/google-cloud-vision-v1/google-cloud-vision-v1.gemspec new file mode 100644 index 000000000000..a114f0e9a4b4 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/google-cloud-vision-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/vision/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-vision-v1" + gem.version = Google::Cloud::Vision::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Cloud Vision API allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content. Note that google-cloud-vision-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-vision instead. See the readme for more details." + gem.summary = "Integrates Google Vision features, including image labeling, face, logo, and landmark detection, optical character recognition (OCR), and detection of explicit content, into applications." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google-cloud-vision-v1.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google-cloud-vision-v1.rb new file mode 100644 index 000000000000..8ff4e05d45fb --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google-cloud-vision-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/vision/v1" diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1.rb new file mode 100644 index 000000000000..b3608a1e85d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/vision/v1/product_search" +require "google/cloud/vision/v1/image_annotator" +require "google/cloud/vision/v1/version" + +module Google + module Cloud + module Vision + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/vision/v1" + # client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/vision/v1" + # client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/vision/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/geometry_pb.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/geometry_pb.rb new file mode 100644 index 000000000000..c5e7d5019963 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/geometry_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/vision/v1/geometry.proto + +require 'google/protobuf' + + +descriptor_data = "\n%google/cloud/vision/v1/geometry.proto\x12\x16google.cloud.vision.v1\"\x1e\n\x06Vertex\x12\t\n\x01x\x18\x01 \x01(\x05\x12\t\n\x01y\x18\x02 \x01(\x05\"(\n\x10NormalizedVertex\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\"\x87\x01\n\x0c\x42oundingPoly\x12\x30\n\x08vertices\x18\x01 \x03(\x0b\x32\x1e.google.cloud.vision.v1.Vertex\x12\x45\n\x13normalized_vertices\x18\x02 \x03(\x0b\x32(.google.cloud.vision.v1.NormalizedVertex\"+\n\x08Position\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\x12\t\n\x01z\x18\x03 \x01(\x02\x42n\n\x1a\x63om.google.cloud.vision.v1B\rGeometryProtoP\x01Z5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Vision + module V1 + Vertex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Vertex").msgclass + NormalizedVertex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.NormalizedVertex").msgclass + BoundingPoly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.BoundingPoly").msgclass + Position = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Position").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator.rb new file mode 100644 index 000000000000..9fd85e7dbecf --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/vision/v1/version" + +require "google/cloud/vision/v1/image_annotator/credentials" +require "google/cloud/vision/v1/image_annotator/paths" +require "google/cloud/vision/v1/image_annotator/operations" +require "google/cloud/vision/v1/image_annotator/client" +require "google/cloud/vision/v1/image_annotator/rest" + +module Google + module Cloud + module Vision + module V1 + ## + # Service that performs Google Cloud Vision API detection tasks over client + # images, such as face, landmark, logo, label, and text detection. The + # ImageAnnotator service returns detected entities from the images. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/vision/v1/image_annotator" + # client = ::Google::Cloud::Vision::V1::ImageAnnotator::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/vision/v1/image_annotator/rest" + # client = ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new + # + module ImageAnnotator + end + end + end + end +end + +helper_path = ::File.join __dir__, "image_annotator", "helpers.rb" +require "google/cloud/vision/v1/image_annotator/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/client.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/client.rb new file mode 100644 index 000000000000..c2df772dc124 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/client.rb @@ -0,0 +1,874 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/vision/v1/image_annotator_pb" + +module Google + module Cloud + module Vision + module V1 + module ImageAnnotator + ## + # Client for the ImageAnnotator service. + # + # Service that performs Google Cloud Vision API detection tasks over client + # images, such as face, landmark, logo, label, and text detection. The + # ImageAnnotator service returns detected entities from the images. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "vision.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :image_annotator_stub + + ## + # Configure the ImageAnnotator Client class. + # + # See {::Google::Cloud::Vision::V1::ImageAnnotator::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ImageAnnotator clients + # ::Google::Cloud::Vision::V1::ImageAnnotator::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", "Vision", "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.batch_annotate_images.timeout = 600.0 + default_config.rpcs.batch_annotate_images.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.batch_annotate_files.timeout = 600.0 + default_config.rpcs.batch_annotate_files.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.async_batch_annotate_images.timeout = 600.0 + default_config.rpcs.async_batch_annotate_images.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.async_batch_annotate_files.timeout = 600.0 + default_config.rpcs.async_batch_annotate_files.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ImageAnnotator 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::Vision::V1::ImageAnnotator::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 + @image_annotator_stub.universe_domain + end + + ## + # Create a new ImageAnnotator client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Vision::V1::ImageAnnotator::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Vision::V1::ImageAnnotator::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ImageAnnotator 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/vision/v1/image_annotator_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 + + @image_annotator_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Vision::V1::ImageAnnotator::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 + ) + + @image_annotator_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 + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Vision::V1::ImageAnnotator::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @image_annotator_stub.logger + end + + # Service calls + + ## + # Run image detection and annotation for a batch of images. + # + # @overload batch_annotate_images(request, options = nil) + # Pass arguments to `batch_annotate_images` via a request object, either of type + # {::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_annotate_images(requests: nil, parent: nil, labels: nil) + # Pass arguments to `batch_annotate_images` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param requests [::Array<::Google::Cloud::Vision::V1::AnnotateImageRequest, ::Hash>] + # Required. Individual image annotation requests for this batch. + # @param parent [::String] + # Optional. Target project and location to make a call. + # + # Format: `projects/{project-id}/locations/{location-id}`. + # + # If no parent is specified, a region will be chosen automatically. + # + # Supported location-ids: + # `us`: USA country only, + # `asia`: East asia areas, like Japan, Taiwan, + # `eu`: The European Union. + # + # Example: `projects/project-A/locations/eu`. + # @param labels [::Hash{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Vision::V1::BatchAnnotateImagesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Vision::V1::BatchAnnotateImagesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::BatchAnnotateImagesRequest.new + # + # # Call the batch_annotate_images method. + # result = client.batch_annotate_images request + # + # # The returned object is of type Google::Cloud::Vision::V1::BatchAnnotateImagesResponse. + # p result + # + def batch_annotate_images request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest + + # Converts hash and nil to 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_annotate_images.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::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.batch_annotate_images.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_annotate_images.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @image_annotator_stub.call_rpc :batch_annotate_images, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Service that performs image detection and annotation for a batch of files. + # Now only "application/pdf", "image/tiff" and "image/gif" are supported. + # + # This service will extract at most 5 (customers can specify which 5 in + # AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each + # file provided and perform detection and annotation for each image + # extracted. + # + # @overload batch_annotate_files(request, options = nil) + # Pass arguments to `batch_annotate_files` via a request object, either of type + # {::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_annotate_files(requests: nil, parent: nil, labels: nil) + # Pass arguments to `batch_annotate_files` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param requests [::Array<::Google::Cloud::Vision::V1::AnnotateFileRequest, ::Hash>] + # Required. The list of file annotation requests. Right now we support only + # one AnnotateFileRequest in BatchAnnotateFilesRequest. + # @param parent [::String] + # Optional. Target project and location to make a call. + # + # Format: `projects/{project-id}/locations/{location-id}`. + # + # If no parent is specified, a region will be chosen automatically. + # + # Supported location-ids: + # `us`: USA country only, + # `asia`: East asia areas, like Japan, Taiwan, + # `eu`: The European Union. + # + # Example: `projects/project-A/locations/eu`. + # @param labels [::Hash{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Vision::V1::BatchAnnotateFilesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Vision::V1::BatchAnnotateFilesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::BatchAnnotateFilesRequest.new + # + # # Call the batch_annotate_files method. + # result = client.batch_annotate_files request + # + # # The returned object is of type Google::Cloud::Vision::V1::BatchAnnotateFilesResponse. + # p result + # + def batch_annotate_files request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest + + # Converts hash and nil to 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_annotate_files.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::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.batch_annotate_files.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_annotate_files.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @image_annotator_stub.call_rpc :batch_annotate_files, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Run asynchronous image detection and annotation for a list of images. + # + # Progress and results can be retrieved through the + # `google.longrunning.Operations` interface. + # `Operation.metadata` contains `OperationMetadata` (metadata). + # `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). + # + # This service will write image annotation outputs to json files in customer + # GCS bucket, each json file containing BatchAnnotateImagesResponse proto. + # + # @overload async_batch_annotate_images(request, options = nil) + # Pass arguments to `async_batch_annotate_images` via a request object, either of type + # {::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload async_batch_annotate_images(requests: nil, output_config: nil, parent: nil, labels: nil) + # Pass arguments to `async_batch_annotate_images` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param requests [::Array<::Google::Cloud::Vision::V1::AnnotateImageRequest, ::Hash>] + # Required. Individual image annotation requests for this batch. + # @param output_config [::Google::Cloud::Vision::V1::OutputConfig, ::Hash] + # Required. The desired output location and metadata (e.g. format). + # @param parent [::String] + # Optional. Target project and location to make a call. + # + # Format: `projects/{project-id}/locations/{location-id}`. + # + # If no parent is specified, a region will be chosen automatically. + # + # Supported location-ids: + # `us`: USA country only, + # `asia`: East asia areas, like Japan, Taiwan, + # `eu`: The European Union. + # + # Example: `projects/project-A/locations/eu`. + # @param labels [::Hash{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest.new + # + # # Call the async_batch_annotate_images method. + # result = client.async_batch_annotate_images request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def async_batch_annotate_images request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.async_batch_annotate_images.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::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.async_batch_annotate_images.timeout, + metadata: metadata, + retry_policy: @config.rpcs.async_batch_annotate_images.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @image_annotator_stub.call_rpc :async_batch_annotate_images, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Run asynchronous image detection and annotation for a list of generic + # files, such as PDF files, which may contain multiple pages and multiple + # images per page. Progress and results can be retrieved through the + # `google.longrunning.Operations` interface. + # `Operation.metadata` contains `OperationMetadata` (metadata). + # `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). + # + # @overload async_batch_annotate_files(request, options = nil) + # Pass arguments to `async_batch_annotate_files` via a request object, either of type + # {::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload async_batch_annotate_files(requests: nil, parent: nil, labels: nil) + # Pass arguments to `async_batch_annotate_files` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param requests [::Array<::Google::Cloud::Vision::V1::AsyncAnnotateFileRequest, ::Hash>] + # Required. Individual async file annotation requests for this batch. + # @param parent [::String] + # Optional. Target project and location to make a call. + # + # Format: `projects/{project-id}/locations/{location-id}`. + # + # If no parent is specified, a region will be chosen automatically. + # + # Supported location-ids: + # `us`: USA country only, + # `asia`: East asia areas, like Japan, Taiwan, + # `eu`: The European Union. + # + # Example: `projects/project-A/locations/eu`. + # @param labels [::Hash{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest.new + # + # # Call the async_batch_annotate_files method. + # result = client.async_batch_annotate_files request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def async_batch_annotate_files request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.async_batch_annotate_files.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::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.async_batch_annotate_files.timeout, + metadata: metadata, + retry_policy: @config.rpcs.async_batch_annotate_files.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @image_annotator_stub.call_rpc :async_batch_annotate_files, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 ImageAnnotator API. + # + # This class represents the configuration for ImageAnnotator, + # 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::Vision::V1::ImageAnnotator::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 + # # batch_annotate_images to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Vision::V1::ImageAnnotator::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.batch_annotate_images.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Vision::V1::ImageAnnotator::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.batch_annotate_images.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::Vision::V1::ImageAnnotator::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 = "vision.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 ImageAnnotator 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 `batch_annotate_images` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_annotate_images + ## + # RPC-specific configuration for `batch_annotate_files` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_annotate_files + ## + # RPC-specific configuration for `async_batch_annotate_images` + # @return [::Gapic::Config::Method] + # + attr_reader :async_batch_annotate_images + ## + # RPC-specific configuration for `async_batch_annotate_files` + # @return [::Gapic::Config::Method] + # + attr_reader :async_batch_annotate_files + + # @private + def initialize parent_rpcs = nil + batch_annotate_images_config = parent_rpcs.batch_annotate_images if parent_rpcs.respond_to? :batch_annotate_images + @batch_annotate_images = ::Gapic::Config::Method.new batch_annotate_images_config + batch_annotate_files_config = parent_rpcs.batch_annotate_files if parent_rpcs.respond_to? :batch_annotate_files + @batch_annotate_files = ::Gapic::Config::Method.new batch_annotate_files_config + async_batch_annotate_images_config = parent_rpcs.async_batch_annotate_images if parent_rpcs.respond_to? :async_batch_annotate_images + @async_batch_annotate_images = ::Gapic::Config::Method.new async_batch_annotate_images_config + async_batch_annotate_files_config = parent_rpcs.async_batch_annotate_files if parent_rpcs.respond_to? :async_batch_annotate_files + @async_batch_annotate_files = ::Gapic::Config::Method.new async_batch_annotate_files_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/credentials.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/credentials.rb new file mode 100644 index 000000000000..eadc70647265 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/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 Vision + module V1 + module ImageAnnotator + # Credentials for the ImageAnnotator API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-vision" + ] + self.env_vars = [ + "VISION_CREDENTIALS", + "VISION_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "VISION_CREDENTIALS_JSON", + "VISION_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-vision-v1/lib/google/cloud/vision/v1/image_annotator/operations.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/operations.rb new file mode 100644 index 000000000000..dc4246627b9b --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/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 Vision + module V1 + module ImageAnnotator + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "vision.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ImageAnnotator 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 ImageAnnotator 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::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Vision::V1::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 = "vision.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-vision-v1/lib/google/cloud/vision/v1/image_annotator/paths.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/paths.rb new file mode 100644 index 000000000000..9b56f1615b26 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Vision + module V1 + module ImageAnnotator + # Path helper methods for the ImageAnnotator API. + module Paths + ## + # Create a fully-qualified ProductSet resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/productSets/{product_set}` + # + # @param project [String] + # @param location [String] + # @param product_set [String] + # + # @return [::String] + def product_set_path project:, location:, product_set: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/productSets/#{product_set}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest.rb new file mode 100644 index 000000000000..6486a7f9d90d --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/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/vision/v1/version" + +require "google/cloud/vision/v1/image_annotator/credentials" +require "google/cloud/vision/v1/image_annotator/paths" +require "google/cloud/vision/v1/image_annotator/rest/operations" +require "google/cloud/vision/v1/image_annotator/rest/client" + +module Google + module Cloud + module Vision + module V1 + ## + # Service that performs Google Cloud Vision API detection tasks over client + # images, such as face, landmark, logo, label, and text detection. The + # ImageAnnotator service returns detected entities from the images. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/vision/v1/image_annotator/rest" + # client = ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new + # + module ImageAnnotator + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/vision/v1/image_annotator/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest/client.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest/client.rb new file mode 100644 index 000000000000..5d335f788660 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest/client.rb @@ -0,0 +1,835 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/vision/v1/image_annotator_pb" +require "google/cloud/vision/v1/image_annotator/rest/service_stub" + +module Google + module Cloud + module Vision + module V1 + module ImageAnnotator + module Rest + ## + # REST client for the ImageAnnotator service. + # + # Service that performs Google Cloud Vision API detection tasks over client + # images, such as face, landmark, logo, label, and text detection. The + # ImageAnnotator service returns detected entities from the images. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "vision.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :image_annotator_stub + + ## + # Configure the ImageAnnotator Client class. + # + # See {::Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ImageAnnotator clients + # ::Google::Cloud::Vision::V1::ImageAnnotator::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", "Vision", "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.batch_annotate_images.timeout = 600.0 + default_config.rpcs.batch_annotate_images.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.batch_annotate_files.timeout = 600.0 + default_config.rpcs.batch_annotate_files.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.async_batch_annotate_images.timeout = 600.0 + default_config.rpcs.async_batch_annotate_images.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.async_batch_annotate_files.timeout = 600.0 + default_config.rpcs.async_batch_annotate_files.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ImageAnnotator 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::Vision::V1::ImageAnnotator::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 + @image_annotator_stub.universe_domain + end + + ## + # Create a new ImageAnnotator REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ImageAnnotator 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::Vision::V1::ImageAnnotator::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 + + @image_annotator_stub = ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @image_annotator_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 + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Vision::V1::ImageAnnotator::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @image_annotator_stub.logger + end + + # Service calls + + ## + # Run image detection and annotation for a batch of images. + # + # @overload batch_annotate_images(request, options = nil) + # Pass arguments to `batch_annotate_images` via a request object, either of type + # {::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_annotate_images(requests: nil, parent: nil, labels: nil) + # Pass arguments to `batch_annotate_images` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param requests [::Array<::Google::Cloud::Vision::V1::AnnotateImageRequest, ::Hash>] + # Required. Individual image annotation requests for this batch. + # @param parent [::String] + # Optional. Target project and location to make a call. + # + # Format: `projects/{project-id}/locations/{location-id}`. + # + # If no parent is specified, a region will be chosen automatically. + # + # Supported location-ids: + # `us`: USA country only, + # `asia`: East asia areas, like Japan, Taiwan, + # `eu`: The European Union. + # + # Example: `projects/project-A/locations/eu`. + # @param labels [::Hash{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Vision::V1::BatchAnnotateImagesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Vision::V1::BatchAnnotateImagesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::BatchAnnotateImagesRequest.new + # + # # Call the batch_annotate_images method. + # result = client.batch_annotate_images request + # + # # The returned object is of type Google::Cloud::Vision::V1::BatchAnnotateImagesResponse. + # p result + # + def batch_annotate_images request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest + + # Converts hash and nil to an 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_annotate_images.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_annotate_images.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_annotate_images.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @image_annotator_stub.batch_annotate_images request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Service that performs image detection and annotation for a batch of files. + # Now only "application/pdf", "image/tiff" and "image/gif" are supported. + # + # This service will extract at most 5 (customers can specify which 5 in + # AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each + # file provided and perform detection and annotation for each image + # extracted. + # + # @overload batch_annotate_files(request, options = nil) + # Pass arguments to `batch_annotate_files` via a request object, either of type + # {::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_annotate_files(requests: nil, parent: nil, labels: nil) + # Pass arguments to `batch_annotate_files` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param requests [::Array<::Google::Cloud::Vision::V1::AnnotateFileRequest, ::Hash>] + # Required. The list of file annotation requests. Right now we support only + # one AnnotateFileRequest in BatchAnnotateFilesRequest. + # @param parent [::String] + # Optional. Target project and location to make a call. + # + # Format: `projects/{project-id}/locations/{location-id}`. + # + # If no parent is specified, a region will be chosen automatically. + # + # Supported location-ids: + # `us`: USA country only, + # `asia`: East asia areas, like Japan, Taiwan, + # `eu`: The European Union. + # + # Example: `projects/project-A/locations/eu`. + # @param labels [::Hash{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Vision::V1::BatchAnnotateFilesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Vision::V1::BatchAnnotateFilesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::BatchAnnotateFilesRequest.new + # + # # Call the batch_annotate_files method. + # result = client.batch_annotate_files request + # + # # The returned object is of type Google::Cloud::Vision::V1::BatchAnnotateFilesResponse. + # p result + # + def batch_annotate_files request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest + + # Converts hash and nil to an 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_annotate_files.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_annotate_files.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_annotate_files.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @image_annotator_stub.batch_annotate_files request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Run asynchronous image detection and annotation for a list of images. + # + # Progress and results can be retrieved through the + # `google.longrunning.Operations` interface. + # `Operation.metadata` contains `OperationMetadata` (metadata). + # `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). + # + # This service will write image annotation outputs to json files in customer + # GCS bucket, each json file containing BatchAnnotateImagesResponse proto. + # + # @overload async_batch_annotate_images(request, options = nil) + # Pass arguments to `async_batch_annotate_images` via a request object, either of type + # {::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload async_batch_annotate_images(requests: nil, output_config: nil, parent: nil, labels: nil) + # Pass arguments to `async_batch_annotate_images` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param requests [::Array<::Google::Cloud::Vision::V1::AnnotateImageRequest, ::Hash>] + # Required. Individual image annotation requests for this batch. + # @param output_config [::Google::Cloud::Vision::V1::OutputConfig, ::Hash] + # Required. The desired output location and metadata (e.g. format). + # @param parent [::String] + # Optional. Target project and location to make a call. + # + # Format: `projects/{project-id}/locations/{location-id}`. + # + # If no parent is specified, a region will be chosen automatically. + # + # Supported location-ids: + # `us`: USA country only, + # `asia`: East asia areas, like Japan, Taiwan, + # `eu`: The European Union. + # + # Example: `projects/project-A/locations/eu`. + # @param labels [::Hash{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest.new + # + # # Call the async_batch_annotate_images method. + # result = client.async_batch_annotate_images request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def async_batch_annotate_images request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.async_batch_annotate_images.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.async_batch_annotate_images.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.async_batch_annotate_images.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @image_annotator_stub.async_batch_annotate_images request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Run asynchronous image detection and annotation for a list of generic + # files, such as PDF files, which may contain multiple pages and multiple + # images per page. Progress and results can be retrieved through the + # `google.longrunning.Operations` interface. + # `Operation.metadata` contains `OperationMetadata` (metadata). + # `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). + # + # @overload async_batch_annotate_files(request, options = nil) + # Pass arguments to `async_batch_annotate_files` via a request object, either of type + # {::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload async_batch_annotate_files(requests: nil, parent: nil, labels: nil) + # Pass arguments to `async_batch_annotate_files` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param requests [::Array<::Google::Cloud::Vision::V1::AsyncAnnotateFileRequest, ::Hash>] + # Required. Individual async file annotation requests for this batch. + # @param parent [::String] + # Optional. Target project and location to make a call. + # + # Format: `projects/{project-id}/locations/{location-id}`. + # + # If no parent is specified, a region will be chosen automatically. + # + # Supported location-ids: + # `us`: USA country only, + # `asia`: East asia areas, like Japan, Taiwan, + # `eu`: The European Union. + # + # Example: `projects/project-A/locations/eu`. + # @param labels [::Hash{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest.new + # + # # Call the async_batch_annotate_files method. + # result = client.async_batch_annotate_files request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def async_batch_annotate_files request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.async_batch_annotate_files.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.async_batch_annotate_files.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.async_batch_annotate_files.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @image_annotator_stub.async_batch_annotate_files request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 ImageAnnotator REST API. + # + # This class represents the configuration for ImageAnnotator 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::Vision::V1::ImageAnnotator::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 + # # batch_annotate_images to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.batch_annotate_images.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.batch_annotate_images.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 = "vision.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 ImageAnnotator 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 `batch_annotate_images` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_annotate_images + ## + # RPC-specific configuration for `batch_annotate_files` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_annotate_files + ## + # RPC-specific configuration for `async_batch_annotate_images` + # @return [::Gapic::Config::Method] + # + attr_reader :async_batch_annotate_images + ## + # RPC-specific configuration for `async_batch_annotate_files` + # @return [::Gapic::Config::Method] + # + attr_reader :async_batch_annotate_files + + # @private + def initialize parent_rpcs = nil + batch_annotate_images_config = parent_rpcs.batch_annotate_images if parent_rpcs.respond_to? :batch_annotate_images + @batch_annotate_images = ::Gapic::Config::Method.new batch_annotate_images_config + batch_annotate_files_config = parent_rpcs.batch_annotate_files if parent_rpcs.respond_to? :batch_annotate_files + @batch_annotate_files = ::Gapic::Config::Method.new batch_annotate_files_config + async_batch_annotate_images_config = parent_rpcs.async_batch_annotate_images if parent_rpcs.respond_to? :async_batch_annotate_images + @async_batch_annotate_images = ::Gapic::Config::Method.new async_batch_annotate_images_config + async_batch_annotate_files_config = parent_rpcs.async_batch_annotate_files if parent_rpcs.respond_to? :async_batch_annotate_files + @async_batch_annotate_files = ::Gapic::Config::Method.new async_batch_annotate_files_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest/operations.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest/operations.rb new file mode 100644 index 000000000000..1573ca9a6610 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest/operations.rb @@ -0,0 +1,946 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 Vision + module V1 + module ImageAnnotator + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "vision.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ImageAnnotator 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 ImageAnnotator 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::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "vision.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}", + matches: [ + ["name", %r{^operations/?$}, 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/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^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-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest/service_stub.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest/service_stub.rb new file mode 100644 index 000000000000..67fe142b1814 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest/service_stub.rb @@ -0,0 +1,385 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/vision/v1/image_annotator_pb" + +module Google + module Cloud + module Vision + module V1 + module ImageAnnotator + module Rest + ## + # REST service stub for the ImageAnnotator 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 batch_annotate_images REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Vision::V1::BatchAnnotateImagesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Vision::V1::BatchAnnotateImagesResponse] + # A result object deserialized from the server's reply + def batch_annotate_images request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_annotate_images_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_annotate_images", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Vision::V1::BatchAnnotateImagesResponse.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_annotate_files REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Vision::V1::BatchAnnotateFilesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Vision::V1::BatchAnnotateFilesResponse] + # A result object deserialized from the server's reply + def batch_annotate_files request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_annotate_files_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_annotate_files", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Vision::V1::BatchAnnotateFilesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the async_batch_annotate_images REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def async_batch_annotate_images request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_async_batch_annotate_images_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "async_batch_annotate_images", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the async_batch_annotate_files REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def async_batch_annotate_files request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_async_batch_annotate_files_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "async_batch_annotate_files", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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 batch_annotate_images REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest] + # 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_annotate_images_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/images:annotate", + body: "*", + matches: [] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/images:annotate", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/images:annotate", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_annotate_files REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest] + # 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_annotate_files_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/files:annotate", + body: "*", + matches: [] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/files:annotate", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/files:annotate", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the async_batch_annotate_images REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_async_batch_annotate_images_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/images:asyncBatchAnnotate", + body: "*", + matches: [] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/images:asyncBatchAnnotate", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/images:asyncBatchAnnotate", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the async_batch_annotate_files REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_async_batch_annotate_files_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/files:asyncBatchAnnotate", + body: "*", + matches: [] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/files:asyncBatchAnnotate", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/files:asyncBatchAnnotate", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator_pb.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator_pb.rb new file mode 100644 index 000000000000..c7084416ed81 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator_pb.rb @@ -0,0 +1,77 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/vision/v1/image_annotator.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/cloud/vision/v1/geometry_pb' +require 'google/cloud/vision/v1/product_search_pb' +require 'google/cloud/vision/v1/text_annotation_pb' +require 'google/cloud/vision/v1/web_detection_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' +require 'google/type/color_pb' +require 'google/type/latlng_pb' + + +descriptor_data = "\n,google/cloud/vision/v1/image_annotator.proto\x12\x16google.cloud.vision.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a%google/cloud/vision/v1/geometry.proto\x1a+google/cloud/vision/v1/product_search.proto\x1a,google/cloud/vision/v1/text_annotation.proto\x1a*google/cloud/vision/v1/web_detection.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x17google/type/color.proto\x1a\x18google/type/latlng.proto\"\x87\x03\n\x07\x46\x65\x61ture\x12\x32\n\x04type\x18\x01 \x01(\x0e\x32$.google.cloud.vision.v1.Feature.Type\x12\x13\n\x0bmax_results\x18\x02 \x01(\x05\x12\r\n\x05model\x18\x03 \x01(\t\"\xa3\x02\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x46\x41\x43\x45_DETECTION\x10\x01\x12\x16\n\x12LANDMARK_DETECTION\x10\x02\x12\x12\n\x0eLOGO_DETECTION\x10\x03\x12\x13\n\x0fLABEL_DETECTION\x10\x04\x12\x12\n\x0eTEXT_DETECTION\x10\x05\x12\x1b\n\x17\x44OCUMENT_TEXT_DETECTION\x10\x0b\x12\x19\n\x15SAFE_SEARCH_DETECTION\x10\x06\x12\x14\n\x10IMAGE_PROPERTIES\x10\x07\x12\x0e\n\nCROP_HINTS\x10\t\x12\x11\n\rWEB_DETECTION\x10\n\x12\x12\n\x0ePRODUCT_SEARCH\x10\x0c\x12\x17\n\x13OBJECT_LOCALIZATION\x10\x13\"7\n\x0bImageSource\x12\x15\n\rgcs_image_uri\x18\x01 \x01(\t\x12\x11\n\timage_uri\x18\x02 \x01(\t\"M\n\x05Image\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\x0c\x12\x33\n\x06source\x18\x02 \x01(\x0b\x32#.google.cloud.vision.v1.ImageSource\"\xf6\r\n\x0e\x46\x61\x63\x65\x41nnotation\x12;\n\rbounding_poly\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12>\n\x10\x66\x64_bounding_poly\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x42\n\tlandmarks\x18\x03 \x03(\x0b\x32/.google.cloud.vision.v1.FaceAnnotation.Landmark\x12\x12\n\nroll_angle\x18\x04 \x01(\x02\x12\x11\n\tpan_angle\x18\x05 \x01(\x02\x12\x12\n\ntilt_angle\x18\x06 \x01(\x02\x12\x1c\n\x14\x64\x65tection_confidence\x18\x07 \x01(\x02\x12\x1e\n\x16landmarking_confidence\x18\x08 \x01(\x02\x12:\n\x0ejoy_likelihood\x18\t \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12=\n\x11sorrow_likelihood\x18\n \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12<\n\x10\x61nger_likelihood\x18\x0b \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12?\n\x13surprise_likelihood\x18\x0c \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12\x44\n\x18under_exposed_likelihood\x18\r \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12>\n\x12\x62lurred_likelihood\x18\x0e \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12?\n\x13headwear_likelihood\x18\x0f \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x1a\xe8\x07\n\x08Landmark\x12\x42\n\x04type\x18\x03 \x01(\x0e\x32\x34.google.cloud.vision.v1.FaceAnnotation.Landmark.Type\x12\x32\n\x08position\x18\x04 \x01(\x0b\x32 .google.cloud.vision.v1.Position\"\xe3\x06\n\x04Type\x12\x14\n\x10UNKNOWN_LANDMARK\x10\x00\x12\x0c\n\x08LEFT_EYE\x10\x01\x12\r\n\tRIGHT_EYE\x10\x02\x12\x18\n\x14LEFT_OF_LEFT_EYEBROW\x10\x03\x12\x19\n\x15RIGHT_OF_LEFT_EYEBROW\x10\x04\x12\x19\n\x15LEFT_OF_RIGHT_EYEBROW\x10\x05\x12\x1a\n\x16RIGHT_OF_RIGHT_EYEBROW\x10\x06\x12\x19\n\x15MIDPOINT_BETWEEN_EYES\x10\x07\x12\x0c\n\x08NOSE_TIP\x10\x08\x12\r\n\tUPPER_LIP\x10\t\x12\r\n\tLOWER_LIP\x10\n\x12\x0e\n\nMOUTH_LEFT\x10\x0b\x12\x0f\n\x0bMOUTH_RIGHT\x10\x0c\x12\x10\n\x0cMOUTH_CENTER\x10\r\x12\x15\n\x11NOSE_BOTTOM_RIGHT\x10\x0e\x12\x14\n\x10NOSE_BOTTOM_LEFT\x10\x0f\x12\x16\n\x12NOSE_BOTTOM_CENTER\x10\x10\x12\x19\n\x15LEFT_EYE_TOP_BOUNDARY\x10\x11\x12\x19\n\x15LEFT_EYE_RIGHT_CORNER\x10\x12\x12\x1c\n\x18LEFT_EYE_BOTTOM_BOUNDARY\x10\x13\x12\x18\n\x14LEFT_EYE_LEFT_CORNER\x10\x14\x12\x1a\n\x16RIGHT_EYE_TOP_BOUNDARY\x10\x15\x12\x1a\n\x16RIGHT_EYE_RIGHT_CORNER\x10\x16\x12\x1d\n\x19RIGHT_EYE_BOTTOM_BOUNDARY\x10\x17\x12\x19\n\x15RIGHT_EYE_LEFT_CORNER\x10\x18\x12\x1f\n\x1bLEFT_EYEBROW_UPPER_MIDPOINT\x10\x19\x12 \n\x1cRIGHT_EYEBROW_UPPER_MIDPOINT\x10\x1a\x12\x14\n\x10LEFT_EAR_TRAGION\x10\x1b\x12\x15\n\x11RIGHT_EAR_TRAGION\x10\x1c\x12\x12\n\x0eLEFT_EYE_PUPIL\x10\x1d\x12\x13\n\x0fRIGHT_EYE_PUPIL\x10\x1e\x12\x15\n\x11\x46OREHEAD_GLABELLA\x10\x1f\x12\x11\n\rCHIN_GNATHION\x10 \x12\x14\n\x10\x43HIN_LEFT_GONION\x10!\x12\x15\n\x11\x43HIN_RIGHT_GONION\x10\"\x12\x15\n\x11LEFT_CHEEK_CENTER\x10#\x12\x16\n\x12RIGHT_CHEEK_CENTER\x10$\"4\n\x0cLocationInfo\x12$\n\x07lat_lng\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\"=\n\x08Property\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x14\n\x0cuint64_value\x18\x03 \x01(\x04\"\xab\x02\n\x10\x45ntityAnnotation\x12\x0b\n\x03mid\x18\x01 \x01(\t\x12\x0e\n\x06locale\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\r\n\x05score\x18\x04 \x01(\x02\x12\x16\n\nconfidence\x18\x05 \x01(\x02\x42\x02\x18\x01\x12\x12\n\ntopicality\x18\x06 \x01(\x02\x12;\n\rbounding_poly\x18\x07 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x37\n\tlocations\x18\x08 \x03(\x0b\x32$.google.cloud.vision.v1.LocationInfo\x12\x34\n\nproperties\x18\t \x03(\x0b\x32 .google.cloud.vision.v1.Property\"\x99\x01\n\x19LocalizedObjectAnnotation\x12\x0b\n\x03mid\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\r\n\x05score\x18\x04 \x01(\x02\x12;\n\rbounding_poly\x18\x05 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\"\x99\x02\n\x14SafeSearchAnnotation\x12\x31\n\x05\x61\x64ult\x18\x01 \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12\x31\n\x05spoof\x18\x02 \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12\x33\n\x07medical\x18\x03 \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12\x34\n\x08violence\x18\x04 \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12\x30\n\x04racy\x18\t \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\"a\n\x0bLatLongRect\x12(\n\x0bmin_lat_lng\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\x12(\n\x0bmax_lat_lng\x18\x02 \x01(\x0b\x32\x13.google.type.LatLng\"U\n\tColorInfo\x12!\n\x05\x63olor\x18\x01 \x01(\x0b\x32\x12.google.type.Color\x12\r\n\x05score\x18\x02 \x01(\x02\x12\x16\n\x0epixel_fraction\x18\x03 \x01(\x02\"M\n\x18\x44ominantColorsAnnotation\x12\x31\n\x06\x63olors\x18\x01 \x03(\x0b\x32!.google.cloud.vision.v1.ColorInfo\"\\\n\x0fImageProperties\x12I\n\x0f\x64ominant_colors\x18\x01 \x01(\x0b\x32\x30.google.cloud.vision.v1.DominantColorsAnnotation\"x\n\x08\x43ropHint\x12;\n\rbounding_poly\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12\x1b\n\x13importance_fraction\x18\x03 \x01(\x02\"K\n\x13\x43ropHintsAnnotation\x12\x34\n\ncrop_hints\x18\x01 \x03(\x0b\x32 .google.cloud.vision.v1.CropHint\"(\n\x0f\x43ropHintsParams\x12\x15\n\raspect_ratios\x18\x01 \x03(\x02\"5\n\x12WebDetectionParams\x12\x1f\n\x13include_geo_results\x18\x02 \x01(\x08\x42\x02\x18\x01\"c\n\x13TextDetectionParams\x12.\n&enable_text_detection_confidence_score\x18\t \x01(\x08\x12\x1c\n\x14\x61\x64vanced_ocr_options\x18\x0b \x03(\t\"\x88\x03\n\x0cImageContext\x12:\n\rlat_long_rect\x18\x01 \x01(\x0b\x32#.google.cloud.vision.v1.LatLongRect\x12\x16\n\x0elanguage_hints\x18\x02 \x03(\t\x12\x42\n\x11\x63rop_hints_params\x18\x04 \x01(\x0b\x32\'.google.cloud.vision.v1.CropHintsParams\x12J\n\x15product_search_params\x18\x05 \x01(\x0b\x32+.google.cloud.vision.v1.ProductSearchParams\x12H\n\x14web_detection_params\x18\x06 \x01(\x0b\x32*.google.cloud.vision.v1.WebDetectionParams\x12J\n\x15text_detection_params\x18\x0c \x01(\x0b\x32+.google.cloud.vision.v1.TextDetectionParams\"\xb4\x01\n\x14\x41nnotateImageRequest\x12,\n\x05image\x18\x01 \x01(\x0b\x32\x1d.google.cloud.vision.v1.Image\x12\x31\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32\x1f.google.cloud.vision.v1.Feature\x12;\n\rimage_context\x18\x03 \x01(\x0b\x32$.google.cloud.vision.v1.ImageContext\":\n\x16ImageAnnotationContext\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x13\n\x0bpage_number\x18\x02 \x01(\x05\"\xe4\x07\n\x15\x41nnotateImageResponse\x12@\n\x10\x66\x61\x63\x65_annotations\x18\x01 \x03(\x0b\x32&.google.cloud.vision.v1.FaceAnnotation\x12\x46\n\x14landmark_annotations\x18\x02 \x03(\x0b\x32(.google.cloud.vision.v1.EntityAnnotation\x12\x42\n\x10logo_annotations\x18\x03 \x03(\x0b\x32(.google.cloud.vision.v1.EntityAnnotation\x12\x43\n\x11label_annotations\x18\x04 \x03(\x0b\x32(.google.cloud.vision.v1.EntityAnnotation\x12W\n\x1clocalized_object_annotations\x18\x16 \x03(\x0b\x32\x31.google.cloud.vision.v1.LocalizedObjectAnnotation\x12\x42\n\x10text_annotations\x18\x05 \x03(\x0b\x32(.google.cloud.vision.v1.EntityAnnotation\x12\x44\n\x14\x66ull_text_annotation\x18\x0c \x01(\x0b\x32&.google.cloud.vision.v1.TextAnnotation\x12L\n\x16safe_search_annotation\x18\x06 \x01(\x0b\x32,.google.cloud.vision.v1.SafeSearchAnnotation\x12L\n\x1bimage_properties_annotation\x18\x08 \x01(\x0b\x32\'.google.cloud.vision.v1.ImageProperties\x12J\n\x15\x63rop_hints_annotation\x18\x0b \x01(\x0b\x32+.google.cloud.vision.v1.CropHintsAnnotation\x12;\n\rweb_detection\x18\r \x01(\x0b\x32$.google.cloud.vision.v1.WebDetection\x12L\n\x16product_search_results\x18\x0e \x01(\x0b\x32,.google.cloud.vision.v1.ProductSearchResults\x12!\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.Status\x12?\n\x07\x63ontext\x18\x15 \x01(\x0b\x32..google.cloud.vision.v1.ImageAnnotationContext\"\xf5\x01\n\x1a\x42\x61tchAnnotateImagesRequest\x12\x43\n\x08requests\x18\x01 \x03(\x0b\x32,.google.cloud.vision.v1.AnnotateImageRequestB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x04 \x01(\t\x12S\n\x06labels\x18\x05 \x03(\x0b\x32>.google.cloud.vision.v1.BatchAnnotateImagesRequest.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\"_\n\x1b\x42\x61tchAnnotateImagesResponse\x12@\n\tresponses\x18\x01 \x03(\x0b\x32-.google.cloud.vision.v1.AnnotateImageResponse\"\xcf\x01\n\x13\x41nnotateFileRequest\x12\x39\n\x0cinput_config\x18\x01 \x01(\x0b\x32#.google.cloud.vision.v1.InputConfig\x12\x31\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32\x1f.google.cloud.vision.v1.Feature\x12;\n\rimage_context\x18\x03 \x01(\x0b\x32$.google.cloud.vision.v1.ImageContext\x12\r\n\x05pages\x18\x04 \x03(\x05\"\xcb\x01\n\x14\x41nnotateFileResponse\x12\x39\n\x0cinput_config\x18\x01 \x01(\x0b\x32#.google.cloud.vision.v1.InputConfig\x12@\n\tresponses\x18\x02 \x03(\x0b\x32-.google.cloud.vision.v1.AnnotateImageResponse\x12\x13\n\x0btotal_pages\x18\x03 \x01(\x05\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"\xf2\x01\n\x19\x42\x61tchAnnotateFilesRequest\x12\x42\n\x08requests\x18\x01 \x03(\x0b\x32+.google.cloud.vision.v1.AnnotateFileRequestB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12R\n\x06labels\x18\x05 \x03(\x0b\x32=.google.cloud.vision.v1.BatchAnnotateFilesRequest.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\"]\n\x1a\x42\x61tchAnnotateFilesResponse\x12?\n\tresponses\x18\x01 \x03(\x0b\x32,.google.cloud.vision.v1.AnnotateFileResponse\"\x82\x02\n\x18\x41syncAnnotateFileRequest\x12\x39\n\x0cinput_config\x18\x01 \x01(\x0b\x32#.google.cloud.vision.v1.InputConfig\x12\x31\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32\x1f.google.cloud.vision.v1.Feature\x12;\n\rimage_context\x18\x03 \x01(\x0b\x32$.google.cloud.vision.v1.ImageContext\x12;\n\routput_config\x18\x04 \x01(\x0b\x32$.google.cloud.vision.v1.OutputConfig\"X\n\x19\x41syncAnnotateFileResponse\x12;\n\routput_config\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1.OutputConfig\"\xc1\x02\n\x1f\x41syncBatchAnnotateImagesRequest\x12\x43\n\x08requests\x18\x01 \x03(\x0b\x32,.google.cloud.vision.v1.AnnotateImageRequestB\x03\xe0\x41\x02\x12@\n\routput_config\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.OutputConfigB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x04 \x01(\t\x12X\n\x06labels\x18\x05 \x03(\x0b\x32\x43.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.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\"_\n AsyncBatchAnnotateImagesResponse\x12;\n\routput_config\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1.OutputConfig\"\x81\x02\n\x1e\x41syncBatchAnnotateFilesRequest\x12G\n\x08requests\x18\x01 \x03(\x0b\x32\x30.google.cloud.vision.v1.AsyncAnnotateFileRequestB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x04 \x01(\t\x12W\n\x06labels\x18\x05 \x03(\x0b\x32\x42.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.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\"g\n\x1f\x41syncBatchAnnotateFilesResponse\x12\x44\n\tresponses\x18\x01 \x03(\x0b\x32\x31.google.cloud.vision.v1.AsyncAnnotateFileResponse\"h\n\x0bInputConfig\x12\x35\n\ngcs_source\x18\x01 \x01(\x0b\x32!.google.cloud.vision.v1.GcsSource\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\x0c\x12\x11\n\tmime_type\x18\x02 \x01(\t\"c\n\x0cOutputConfig\x12?\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32&.google.cloud.vision.v1.GcsDestination\x12\x12\n\nbatch_size\x18\x02 \x01(\x05\"\x18\n\tGcsSource\x12\x0b\n\x03uri\x18\x01 \x01(\t\"\x1d\n\x0eGcsDestination\x12\x0b\n\x03uri\x18\x01 \x01(\t\"\x88\x02\n\x11OperationMetadata\x12>\n\x05state\x18\x01 \x01(\x0e\x32/.google.cloud.vision.v1.OperationMetadata.State\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43REATED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\r\n\tCANCELLED\x10\x04*e\n\nLikelihood\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x11\n\rVERY_UNLIKELY\x10\x01\x12\x0c\n\x08UNLIKELY\x10\x02\x12\x0c\n\x08POSSIBLE\x10\x03\x12\n\n\x06LIKELY\x10\x04\x12\x0f\n\x0bVERY_LIKELY\x10\x05\x32\xf5\n\n\x0eImageAnnotator\x12\x93\x02\n\x13\x42\x61tchAnnotateImages\x12\x32.google.cloud.vision.v1.BatchAnnotateImagesRequest\x1a\x33.google.cloud.vision.v1.BatchAnnotateImagesResponse\"\x92\x01\xda\x41\x08requests\x82\xd3\xe4\x93\x02\x80\x01\"\x13/v1/images:annotate:\x01*Z8\"3/v1/{parent=projects/*/locations/*}/images:annotate:\x01*Z,\"\'/v1/{parent=projects/*}/images:annotate:\x01*\x12\x8c\x02\n\x12\x42\x61tchAnnotateFiles\x12\x31.google.cloud.vision.v1.BatchAnnotateFilesRequest\x1a\x32.google.cloud.vision.v1.BatchAnnotateFilesResponse\"\x8e\x01\xda\x41\x08requests\x82\xd3\xe4\x93\x02}\"\x12/v1/files:annotate:\x01*Z7\"2/v1/{parent=projects/*/locations/*}/files:annotate:\x01*Z+\"&/v1/{parent=projects/*}/files:annotate:\x01*\x12\xeb\x02\n\x18\x41syncBatchAnnotateImages\x12\x37.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest\x1a\x1d.google.longrunning.Operation\"\xf6\x01\xca\x41\x35\n AsyncBatchAnnotateImagesResponse\x12\x11OperationMetadata\xda\x41\x16requests,output_config\x82\xd3\xe4\x93\x02\x9e\x01\"\x1d/v1/images:asyncBatchAnnotate:\x01*ZB\"=/v1/{parent=projects/*/locations/*}/images:asyncBatchAnnotate:\x01*Z6\"1/v1/{parent=projects/*}/images:asyncBatchAnnotate:\x01*\x12\xd7\x02\n\x17\x41syncBatchAnnotateFiles\x12\x36.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest\x1a\x1d.google.longrunning.Operation\"\xe4\x01\xca\x41\x34\n\x1f\x41syncBatchAnnotateFilesResponse\x12\x11OperationMetadata\xda\x41\x08requests\x82\xd3\xe4\x93\x02\x9b\x01\"\x1c/v1/files:asyncBatchAnnotate:\x01*ZA\" e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists ProductSets in an unspecified order. + # + # Possible errors: + # + # * Returns INVALID_ARGUMENT if page_size is greater than 100, or less + # than 1. + # + # @overload list_product_sets(request, options = nil) + # Pass arguments to `list_product_sets` via a request object, either of type + # {::Google::Cloud::Vision::V1::ListProductSetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::ListProductSetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_product_sets(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_product_sets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 from which ProductSets should be listed. + # + # Format is `projects/PROJECT_ID/locations/LOC_ID`. + # @param page_size [::Integer] + # The maximum number of items to return. Default 10, maximum 100. + # @param page_token [::String] + # The next_page_token returned from a previous List request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1::ProductSet>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1::ProductSet>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::ListProductSetsRequest.new + # + # # Call the list_product_sets method. + # result = client.list_product_sets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Vision::V1::ProductSet. + # p item + # end + # + def list_product_sets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::ListProductSetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_product_sets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_product_sets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_product_sets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.call_rpc :list_product_sets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @product_search_stub, :list_product_sets, 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 information associated with a ProductSet. + # + # Possible errors: + # + # * Returns NOT_FOUND if the ProductSet does not exist. + # + # @overload get_product_set(request, options = nil) + # Pass arguments to `get_product_set` via a request object, either of type + # {::Google::Cloud::Vision::V1::GetProductSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::GetProductSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_product_set(name: nil) + # Pass arguments to `get_product_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the ProductSet to get. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Vision::V1::ProductSet] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Vision::V1::ProductSet] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::GetProductSetRequest.new + # + # # Call the get_product_set method. + # result = client.get_product_set request + # + # # The returned object is of type Google::Cloud::Vision::V1::ProductSet. + # p result + # + def get_product_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::GetProductSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_product_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_product_set.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_product_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.call_rpc :get_product_set, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Makes changes to a ProductSet resource. + # Only display_name can be updated currently. + # + # Possible errors: + # + # * Returns NOT_FOUND if the ProductSet does not exist. + # * Returns INVALID_ARGUMENT if display_name is present in update_mask but + # missing from the request or longer than 4096 characters. + # + # @overload update_product_set(request, options = nil) + # Pass arguments to `update_product_set` via a request object, either of type + # {::Google::Cloud::Vision::V1::UpdateProductSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::UpdateProductSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_product_set(product_set: nil, update_mask: nil) + # Pass arguments to `update_product_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param product_set [::Google::Cloud::Vision::V1::ProductSet, ::Hash] + # Required. The ProductSet resource which replaces the one on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The {::Google::Protobuf::FieldMask FieldMask} that specifies which fields to + # update. + # If update_mask isn't specified, all mutable fields are to be updated. + # Valid mask path is `display_name`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Vision::V1::ProductSet] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Vision::V1::ProductSet] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::UpdateProductSetRequest.new + # + # # Call the update_product_set method. + # result = client.update_product_set request + # + # # The returned object is of type Google::Cloud::Vision::V1::ProductSet. + # p result + # + def update_product_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::UpdateProductSetRequest + + # Converts hash and nil to 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_product_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.product_set&.name + header_params["product_set.name"] = request.product_set.name + end + + request_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_product_set.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_product_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.call_rpc :update_product_set, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Permanently deletes a ProductSet. Products and ReferenceImages in the + # ProductSet are not deleted. + # + # The actual image files are not deleted from Google Cloud Storage. + # + # @overload delete_product_set(request, options = nil) + # Pass arguments to `delete_product_set` via a request object, either of type + # {::Google::Cloud::Vision::V1::DeleteProductSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::DeleteProductSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_product_set(name: nil) + # Pass arguments to `delete_product_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the ProductSet to delete. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_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/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::DeleteProductSetRequest.new + # + # # Call the delete_product_set method. + # result = client.delete_product_set request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_product_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::DeleteProductSetRequest + + # Converts hash and nil to 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_product_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_product_set.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_product_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.call_rpc :delete_product_set, request, 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 and returns a new product resource. + # + # Possible errors: + # + # * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 + # characters. + # * Returns INVALID_ARGUMENT if description is longer than 4096 characters. + # * Returns INVALID_ARGUMENT if product_category is missing or invalid. + # + # @overload create_product(request, options = nil) + # Pass arguments to `create_product` via a request object, either of type + # {::Google::Cloud::Vision::V1::CreateProductRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::CreateProductRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_product(parent: nil, product: nil, product_id: nil) + # Pass arguments to `create_product` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project in which the Product should be created. + # + # Format is + # `projects/PROJECT_ID/locations/LOC_ID`. + # @param product [::Google::Cloud::Vision::V1::Product, ::Hash] + # Required. The product to create. + # @param product_id [::String] + # A user-supplied resource id for this Product. If set, the server will + # attempt to use this value as the resource id. If it is already in use, an + # error is returned with code ALREADY_EXISTS. Must be at most 128 characters + # long. It cannot contain the character `/`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Vision::V1::Product] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Vision::V1::Product] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::CreateProductRequest.new + # + # # Call the create_product method. + # result = client.create_product request + # + # # The returned object is of type Google::Cloud::Vision::V1::Product. + # p result + # + def create_product request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::CreateProductRequest + + # Converts hash and nil to 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_product.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_product.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.call_rpc :create_product, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists products in an unspecified order. + # + # Possible errors: + # + # * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + # + # @overload list_products(request, options = nil) + # Pass arguments to `list_products` via a request object, either of type + # {::Google::Cloud::Vision::V1::ListProductsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::ListProductsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_products(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_products` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project OR ProductSet from which Products should be listed. + # + # Format: + # `projects/PROJECT_ID/locations/LOC_ID` + # @param page_size [::Integer] + # The maximum number of items to return. Default 10, maximum 100. + # @param page_token [::String] + # The next_page_token returned from a previous List request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1::Product>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1::Product>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::ListProductsRequest.new + # + # # Call the list_products method. + # result = client.list_products request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Vision::V1::Product. + # p item + # end + # + def list_products request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::ListProductsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_products.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_products.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_products.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.call_rpc :list_products, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @product_search_stub, :list_products, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets information associated with a Product. + # + # Possible errors: + # + # * Returns NOT_FOUND if the Product does not exist. + # + # @overload get_product(request, options = nil) + # Pass arguments to `get_product` via a request object, either of type + # {::Google::Cloud::Vision::V1::GetProductRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::GetProductRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_product(name: nil) + # Pass arguments to `get_product` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the Product to get. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Vision::V1::Product] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Vision::V1::Product] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::GetProductRequest.new + # + # # Call the get_product method. + # result = client.get_product request + # + # # The returned object is of type Google::Cloud::Vision::V1::Product. + # p result + # + def get_product request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::GetProductRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_product.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_product.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.call_rpc :get_product, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Makes changes to a Product resource. + # Only the `display_name`, `description`, and `labels` fields can be updated + # right now. + # + # If labels are updated, the change will not be reflected in queries until + # the next index time. + # + # Possible errors: + # + # * Returns NOT_FOUND if the Product does not exist. + # * Returns INVALID_ARGUMENT if display_name is present in update_mask but is + # missing from the request or longer than 4096 characters. + # * Returns INVALID_ARGUMENT if description is present in update_mask but is + # longer than 4096 characters. + # * Returns INVALID_ARGUMENT if product_category is present in update_mask. + # + # @overload update_product(request, options = nil) + # Pass arguments to `update_product` via a request object, either of type + # {::Google::Cloud::Vision::V1::UpdateProductRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::UpdateProductRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_product(product: nil, update_mask: nil) + # Pass arguments to `update_product` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param product [::Google::Cloud::Vision::V1::Product, ::Hash] + # Required. The Product resource which replaces the one on the server. + # product.name is immutable. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The {::Google::Protobuf::FieldMask FieldMask} that specifies which fields + # to update. + # If update_mask isn't specified, all mutable fields are to be updated. + # Valid mask paths include `product_labels`, `display_name`, and + # `description`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Vision::V1::Product] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Vision::V1::Product] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::UpdateProductRequest.new + # + # # Call the update_product method. + # result = client.update_product request + # + # # The returned object is of type Google::Cloud::Vision::V1::Product. + # p result + # + def update_product request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::UpdateProductRequest + + # Converts hash and nil to 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_product.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.product&.name + header_params["product.name"] = request.product.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_product.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.call_rpc :update_product, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Permanently deletes a product and its reference images. + # + # Metadata of the product and all its images will be deleted right away, but + # search queries against ProductSets containing the product may still work + # until all related caches are refreshed. + # + # @overload delete_product(request, options = nil) + # Pass arguments to `delete_product` via a request object, either of type + # {::Google::Cloud::Vision::V1::DeleteProductRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::DeleteProductRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_product(name: nil) + # Pass arguments to `delete_product` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of product to delete. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::DeleteProductRequest.new + # + # # Call the delete_product method. + # result = client.delete_product request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_product request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::DeleteProductRequest + + # Converts hash and nil to 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_product.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_product.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.call_rpc :delete_product, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates and returns a new ReferenceImage resource. + # + # The `bounding_poly` field is optional. If `bounding_poly` is not specified, + # the system will try to detect regions of interest in the image that are + # compatible with the product_category on the parent product. If it is + # specified, detection is ALWAYS skipped. The system converts polygons into + # non-rotated rectangles. + # + # Note that the pipeline will resize the image if the image resolution is too + # large to process (above 50MP). + # + # Possible errors: + # + # * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 + # characters. + # * Returns INVALID_ARGUMENT if the product does not exist. + # * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing + # compatible with the parent product's product_category is detected. + # * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + # + # @overload create_reference_image(request, options = nil) + # Pass arguments to `create_reference_image` via a request object, either of type + # {::Google::Cloud::Vision::V1::CreateReferenceImageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::CreateReferenceImageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_reference_image(parent: nil, reference_image: nil, reference_image_id: nil) + # Pass arguments to `create_reference_image` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the product in which to create the reference + # image. + # + # Format is + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + # @param reference_image [::Google::Cloud::Vision::V1::ReferenceImage, ::Hash] + # Required. The reference image to create. + # If an image ID is specified, it is ignored. + # @param reference_image_id [::String] + # A user-supplied resource id for the ReferenceImage to be added. If set, + # the server will attempt to use this value as the resource id. If it is + # already in use, an error is returned with code ALREADY_EXISTS. Must be at + # most 128 characters long. It cannot contain the character `/`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Vision::V1::ReferenceImage] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Vision::V1::ReferenceImage] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::CreateReferenceImageRequest.new + # + # # Call the create_reference_image method. + # result = client.create_reference_image request + # + # # The returned object is of type Google::Cloud::Vision::V1::ReferenceImage. + # p result + # + def create_reference_image request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::CreateReferenceImageRequest + + # Converts hash and nil to 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_reference_image.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_reference_image.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_reference_image.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.call_rpc :create_reference_image, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Permanently deletes a reference image. + # + # The image metadata will be deleted right away, but search queries + # against ProductSets containing the image may still work until all related + # caches are refreshed. + # + # The actual image files are not deleted from Google Cloud Storage. + # + # @overload delete_reference_image(request, options = nil) + # Pass arguments to `delete_reference_image` via a request object, either of type + # {::Google::Cloud::Vision::V1::DeleteReferenceImageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::DeleteReferenceImageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_reference_image(name: nil) + # Pass arguments to `delete_reference_image` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the reference image to delete. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_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/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::DeleteReferenceImageRequest.new + # + # # Call the delete_reference_image method. + # result = client.delete_reference_image request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_reference_image request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::DeleteReferenceImageRequest + + # Converts hash and nil to 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_reference_image.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_reference_image.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_reference_image.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.call_rpc :delete_reference_image, request, 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 reference images. + # + # Possible errors: + # + # * Returns NOT_FOUND if the parent product does not exist. + # * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less + # than 1. + # + # @overload list_reference_images(request, options = nil) + # Pass arguments to `list_reference_images` via a request object, either of type + # {::Google::Cloud::Vision::V1::ListReferenceImagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::ListReferenceImagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_reference_images(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_reference_images` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the product containing the reference images. + # + # Format is + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + # @param page_size [::Integer] + # The maximum number of items to return. Default 10, maximum 100. + # @param page_token [::String] + # A token identifying a page of results to be returned. This is the value + # of `nextPageToken` returned in a previous reference image list request. + # + # Defaults to the first page if not specified. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1::ReferenceImage>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1::ReferenceImage>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::ListReferenceImagesRequest.new + # + # # Call the list_reference_images method. + # result = client.list_reference_images request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Vision::V1::ReferenceImage. + # p item + # end + # + def list_reference_images request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::ListReferenceImagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_reference_images.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_reference_images.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_reference_images.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.call_rpc :list_reference_images, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @product_search_stub, :list_reference_images, 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 information associated with a ReferenceImage. + # + # Possible errors: + # + # * Returns NOT_FOUND if the specified image does not exist. + # + # @overload get_reference_image(request, options = nil) + # Pass arguments to `get_reference_image` via a request object, either of type + # {::Google::Cloud::Vision::V1::GetReferenceImageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::GetReferenceImageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_reference_image(name: nil) + # Pass arguments to `get_reference_image` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the ReferenceImage to get. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Vision::V1::ReferenceImage] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Vision::V1::ReferenceImage] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::GetReferenceImageRequest.new + # + # # Call the get_reference_image method. + # result = client.get_reference_image request + # + # # The returned object is of type Google::Cloud::Vision::V1::ReferenceImage. + # p result + # + def get_reference_image request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::GetReferenceImageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_reference_image.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_reference_image.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_reference_image.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.call_rpc :get_reference_image, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Adds a Product to the specified ProductSet. If the Product is already + # present, no change is made. + # + # One Product can be added to at most 100 ProductSets. + # + # Possible errors: + # + # * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + # + # @overload add_product_to_product_set(request, options = nil) + # Pass arguments to `add_product_to_product_set` via a request object, either of type + # {::Google::Cloud::Vision::V1::AddProductToProductSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::AddProductToProductSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload add_product_to_product_set(name: nil, product: nil) + # Pass arguments to `add_product_to_product_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for the ProductSet to modify. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + # @param product [::String] + # Required. The resource name for the Product to be added to this ProductSet. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::AddProductToProductSetRequest.new + # + # # Call the add_product_to_product_set method. + # result = client.add_product_to_product_set request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def add_product_to_product_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::AddProductToProductSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.add_product_to_product_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.add_product_to_product_set.timeout, + metadata: metadata, + retry_policy: @config.rpcs.add_product_to_product_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.call_rpc :add_product_to_product_set, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Removes a Product from the specified ProductSet. + # + # @overload remove_product_from_product_set(request, options = nil) + # Pass arguments to `remove_product_from_product_set` via a request object, either of type + # {::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload remove_product_from_product_set(name: nil, product: nil) + # Pass arguments to `remove_product_from_product_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for the ProductSet to modify. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + # @param product [::String] + # Required. The resource name for the Product to be removed from this + # ProductSet. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest.new + # + # # Call the remove_product_from_product_set method. + # result = client.remove_product_from_product_set request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def remove_product_from_product_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.remove_product_from_product_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.remove_product_from_product_set.timeout, + metadata: metadata, + retry_policy: @config.rpcs.remove_product_from_product_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.call_rpc :remove_product_from_product_set, request, 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 Products in a ProductSet, in an unspecified order. If the + # ProductSet does not exist, the products field of the response will be + # empty. + # + # Possible errors: + # + # * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + # + # @overload list_products_in_product_set(request, options = nil) + # Pass arguments to `list_products_in_product_set` via a request object, either of type + # {::Google::Cloud::Vision::V1::ListProductsInProductSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::ListProductsInProductSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_products_in_product_set(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_products_in_product_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The ProductSet resource for which to retrieve Products. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + # @param page_size [::Integer] + # The maximum number of items to return. Default 10, maximum 100. + # @param page_token [::String] + # The next_page_token returned from a previous List request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1::Product>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1::Product>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::ListProductsInProductSetRequest.new + # + # # Call the list_products_in_product_set method. + # result = client.list_products_in_product_set request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Vision::V1::Product. + # p item + # end + # + def list_products_in_product_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::ListProductsInProductSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_products_in_product_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_products_in_product_set.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_products_in_product_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.call_rpc :list_products_in_product_set, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @product_search_stub, :list_products_in_product_set, 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 + + ## + # Asynchronous API that imports a list of reference images to specified + # product sets based on a list of image information. + # + # The {::Google::Longrunning::Operation google.longrunning.Operation} API can be + # used to keep track of the progress and results of the request. + # `Operation.metadata` contains `BatchOperationMetadata`. (progress) + # `Operation.response` contains `ImportProductSetsResponse`. (results) + # + # The input source of this method is a csv file on Google Cloud Storage. + # For the format of the csv file please see + # {::Google::Cloud::Vision::V1::ImportProductSetsGcsSource#csv_file_uri ImportProductSetsGcsSource.csv_file_uri}. + # + # @overload import_product_sets(request, options = nil) + # Pass arguments to `import_product_sets` via a request object, either of type + # {::Google::Cloud::Vision::V1::ImportProductSetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::ImportProductSetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_product_sets(parent: nil, input_config: nil) + # Pass arguments to `import_product_sets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 in which the ProductSets should be imported. + # + # Format is `projects/PROJECT_ID/locations/LOC_ID`. + # @param input_config [::Google::Cloud::Vision::V1::ImportProductSetsInputConfig, ::Hash] + # Required. The input content for the list of requests. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::ImportProductSetsRequest.new + # + # # Call the import_product_sets method. + # result = client.import_product_sets request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_product_sets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::ImportProductSetsRequest + + # Converts hash and nil to 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_product_sets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_product_sets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.import_product_sets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.call_rpc :import_product_sets, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Asynchronous API to delete all Products in a ProductSet or all Products + # that are in no ProductSet. + # + # If a Product is a member of the specified ProductSet in addition to other + # ProductSets, the Product will still be deleted. + # + # It is recommended to not delete the specified ProductSet until after this + # operation has completed. It is also recommended to not add any of the + # Products involved in the batch delete to a new ProductSet while this + # operation is running because those Products may still end up deleted. + # + # It's not possible to undo the PurgeProducts operation. Therefore, it is + # recommended to keep the csv files used in ImportProductSets (if that was + # how you originally built the Product Set) before starting PurgeProducts, in + # case you need to re-import the data after deletion. + # + # If the plan is to purge all of the Products from a ProductSet and then + # re-use the empty ProductSet to re-import new Products into the empty + # ProductSet, you must wait until the PurgeProducts operation has finished + # for that ProductSet. + # + # The {::Google::Longrunning::Operation google.longrunning.Operation} API can be + # used to keep track of the progress and results of the request. + # `Operation.metadata` contains `BatchOperationMetadata`. (progress) + # + # @overload purge_products(request, options = nil) + # Pass arguments to `purge_products` via a request object, either of type + # {::Google::Cloud::Vision::V1::PurgeProductsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::PurgeProductsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload purge_products(product_set_purge_config: nil, delete_orphan_products: nil, parent: nil, force: nil) + # Pass arguments to `purge_products` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param product_set_purge_config [::Google::Cloud::Vision::V1::ProductSetPurgeConfig, ::Hash] + # Specify which ProductSet contains the Products to be deleted. + # + # Note: The following parameters are mutually exclusive: `product_set_purge_config`, `delete_orphan_products`. 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 delete_orphan_products [::Boolean] + # If delete_orphan_products is true, all Products that are not in any + # ProductSet will be deleted. + # + # Note: The following parameters are mutually exclusive: `delete_orphan_products`, `product_set_purge_config`. 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 parent [::String] + # Required. The project and location in which the Products should be deleted. + # + # Format is `projects/PROJECT_ID/locations/LOC_ID`. + # @param force [::Boolean] + # The default value is false. Override this value to true to actually perform + # the purge. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::PurgeProductsRequest.new + # + # # Call the purge_products method. + # result = client.purge_products request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def purge_products request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::PurgeProductsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.purge_products.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.purge_products.timeout, + metadata: metadata, + retry_policy: @config.rpcs.purge_products.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.call_rpc :purge_products, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 ProductSearch API. + # + # This class represents the configuration for ProductSearch, + # 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::Vision::V1::ProductSearch::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_product_set to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Vision::V1::ProductSearch::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_product_set.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_product_set.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::Vision::V1::ProductSearch::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 = "vision.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 ProductSearch 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_product_set` + # @return [::Gapic::Config::Method] + # + attr_reader :create_product_set + ## + # RPC-specific configuration for `list_product_sets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_product_sets + ## + # RPC-specific configuration for `get_product_set` + # @return [::Gapic::Config::Method] + # + attr_reader :get_product_set + ## + # RPC-specific configuration for `update_product_set` + # @return [::Gapic::Config::Method] + # + attr_reader :update_product_set + ## + # RPC-specific configuration for `delete_product_set` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_product_set + ## + # RPC-specific configuration for `create_product` + # @return [::Gapic::Config::Method] + # + attr_reader :create_product + ## + # RPC-specific configuration for `list_products` + # @return [::Gapic::Config::Method] + # + attr_reader :list_products + ## + # RPC-specific configuration for `get_product` + # @return [::Gapic::Config::Method] + # + attr_reader :get_product + ## + # RPC-specific configuration for `update_product` + # @return [::Gapic::Config::Method] + # + attr_reader :update_product + ## + # RPC-specific configuration for `delete_product` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_product + ## + # RPC-specific configuration for `create_reference_image` + # @return [::Gapic::Config::Method] + # + attr_reader :create_reference_image + ## + # RPC-specific configuration for `delete_reference_image` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_reference_image + ## + # RPC-specific configuration for `list_reference_images` + # @return [::Gapic::Config::Method] + # + attr_reader :list_reference_images + ## + # RPC-specific configuration for `get_reference_image` + # @return [::Gapic::Config::Method] + # + attr_reader :get_reference_image + ## + # RPC-specific configuration for `add_product_to_product_set` + # @return [::Gapic::Config::Method] + # + attr_reader :add_product_to_product_set + ## + # RPC-specific configuration for `remove_product_from_product_set` + # @return [::Gapic::Config::Method] + # + attr_reader :remove_product_from_product_set + ## + # RPC-specific configuration for `list_products_in_product_set` + # @return [::Gapic::Config::Method] + # + attr_reader :list_products_in_product_set + ## + # RPC-specific configuration for `import_product_sets` + # @return [::Gapic::Config::Method] + # + attr_reader :import_product_sets + ## + # RPC-specific configuration for `purge_products` + # @return [::Gapic::Config::Method] + # + attr_reader :purge_products + + # @private + def initialize parent_rpcs = nil + create_product_set_config = parent_rpcs.create_product_set if parent_rpcs.respond_to? :create_product_set + @create_product_set = ::Gapic::Config::Method.new create_product_set_config + list_product_sets_config = parent_rpcs.list_product_sets if parent_rpcs.respond_to? :list_product_sets + @list_product_sets = ::Gapic::Config::Method.new list_product_sets_config + get_product_set_config = parent_rpcs.get_product_set if parent_rpcs.respond_to? :get_product_set + @get_product_set = ::Gapic::Config::Method.new get_product_set_config + update_product_set_config = parent_rpcs.update_product_set if parent_rpcs.respond_to? :update_product_set + @update_product_set = ::Gapic::Config::Method.new update_product_set_config + delete_product_set_config = parent_rpcs.delete_product_set if parent_rpcs.respond_to? :delete_product_set + @delete_product_set = ::Gapic::Config::Method.new delete_product_set_config + create_product_config = parent_rpcs.create_product if parent_rpcs.respond_to? :create_product + @create_product = ::Gapic::Config::Method.new create_product_config + list_products_config = parent_rpcs.list_products if parent_rpcs.respond_to? :list_products + @list_products = ::Gapic::Config::Method.new list_products_config + get_product_config = parent_rpcs.get_product if parent_rpcs.respond_to? :get_product + @get_product = ::Gapic::Config::Method.new get_product_config + update_product_config = parent_rpcs.update_product if parent_rpcs.respond_to? :update_product + @update_product = ::Gapic::Config::Method.new update_product_config + delete_product_config = parent_rpcs.delete_product if parent_rpcs.respond_to? :delete_product + @delete_product = ::Gapic::Config::Method.new delete_product_config + create_reference_image_config = parent_rpcs.create_reference_image if parent_rpcs.respond_to? :create_reference_image + @create_reference_image = ::Gapic::Config::Method.new create_reference_image_config + delete_reference_image_config = parent_rpcs.delete_reference_image if parent_rpcs.respond_to? :delete_reference_image + @delete_reference_image = ::Gapic::Config::Method.new delete_reference_image_config + list_reference_images_config = parent_rpcs.list_reference_images if parent_rpcs.respond_to? :list_reference_images + @list_reference_images = ::Gapic::Config::Method.new list_reference_images_config + get_reference_image_config = parent_rpcs.get_reference_image if parent_rpcs.respond_to? :get_reference_image + @get_reference_image = ::Gapic::Config::Method.new get_reference_image_config + add_product_to_product_set_config = parent_rpcs.add_product_to_product_set if parent_rpcs.respond_to? :add_product_to_product_set + @add_product_to_product_set = ::Gapic::Config::Method.new add_product_to_product_set_config + remove_product_from_product_set_config = parent_rpcs.remove_product_from_product_set if parent_rpcs.respond_to? :remove_product_from_product_set + @remove_product_from_product_set = ::Gapic::Config::Method.new remove_product_from_product_set_config + list_products_in_product_set_config = parent_rpcs.list_products_in_product_set if parent_rpcs.respond_to? :list_products_in_product_set + @list_products_in_product_set = ::Gapic::Config::Method.new list_products_in_product_set_config + import_product_sets_config = parent_rpcs.import_product_sets if parent_rpcs.respond_to? :import_product_sets + @import_product_sets = ::Gapic::Config::Method.new import_product_sets_config + purge_products_config = parent_rpcs.purge_products if parent_rpcs.respond_to? :purge_products + @purge_products = ::Gapic::Config::Method.new purge_products_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/credentials.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/credentials.rb new file mode 100644 index 000000000000..f631d5bbc9d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/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 Vision + module V1 + module ProductSearch + # Credentials for the ProductSearch API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-vision" + ] + self.env_vars = [ + "VISION_CREDENTIALS", + "VISION_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "VISION_CREDENTIALS_JSON", + "VISION_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-vision-v1/lib/google/cloud/vision/v1/product_search/operations.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/operations.rb new file mode 100644 index 000000000000..aecd6acca0a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/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 Vision + module V1 + module ProductSearch + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "vision.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ProductSearch 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 ProductSearch 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::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Vision::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Vision::V1::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 = "vision.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-vision-v1/lib/google/cloud/vision/v1/product_search/paths.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/paths.rb new file mode 100644 index 000000000000..6027e8690518 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/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 Vision + module V1 + module ProductSearch + # Path helper methods for the ProductSearch API. + module Paths + ## + # 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 Product resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/products/{product}` + # + # @param project [String] + # @param location [String] + # @param product [String] + # + # @return [::String] + def product_path project:, location:, product: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/products/#{product}" + end + + ## + # Create a fully-qualified ProductSet resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/productSets/{product_set}` + # + # @param project [String] + # @param location [String] + # @param product_set [String] + # + # @return [::String] + def product_set_path project:, location:, product_set: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/productSets/#{product_set}" + end + + ## + # Create a fully-qualified ReferenceImage resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}` + # + # @param project [String] + # @param location [String] + # @param product [String] + # @param reference_image [String] + # + # @return [::String] + def reference_image_path project:, location:, product:, reference_image: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "product cannot contain /" if product.to_s.include? "/" + + "projects/#{project}/locations/#{location}/products/#{product}/referenceImages/#{reference_image}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest.rb new file mode 100644 index 000000000000..da02d8b8ab84 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest.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! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/vision/v1/version" + +require "google/cloud/vision/v1/product_search/credentials" +require "google/cloud/vision/v1/product_search/paths" +require "google/cloud/vision/v1/product_search/rest/operations" +require "google/cloud/vision/v1/product_search/rest/client" + +module Google + module Cloud + module Vision + module V1 + ## + # Manages Products and ProductSets of reference images for use in product + # search. It uses the following resource model: + # + # - The API has a collection of {::Google::Cloud::Vision::V1::ProductSet ProductSet} + # resources, named `projects/*/locations/*/productSets/*`, which acts as a way + # to put different products into groups to limit identification. + # + # In parallel, + # + # - The API has a collection of {::Google::Cloud::Vision::V1::Product Product} + # resources, named + # `projects/*/locations/*/products/*` + # + # - Each {::Google::Cloud::Vision::V1::Product Product} has a collection of + # {::Google::Cloud::Vision::V1::ReferenceImage ReferenceImage} resources, named + # `projects/*/locations/*/products/*/referenceImages/*` + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/vision/v1/product_search/rest" + # client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new + # + module ProductSearch + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/vision/v1/product_search/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/client.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/client.rb new file mode 100644 index 000000000000..d914d68d1c6a --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/client.rb @@ -0,0 +1,2383 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/vision/v1/product_search_service_pb" +require "google/cloud/vision/v1/product_search/rest/service_stub" + +module Google + module Cloud + module Vision + module V1 + module ProductSearch + module Rest + ## + # REST client for the ProductSearch service. + # + # Manages Products and ProductSets of reference images for use in product + # search. It uses the following resource model: + # + # - The API has a collection of {::Google::Cloud::Vision::V1::ProductSet ProductSet} + # resources, named `projects/*/locations/*/productSets/*`, which acts as a way + # to put different products into groups to limit identification. + # + # In parallel, + # + # - The API has a collection of {::Google::Cloud::Vision::V1::Product Product} + # resources, named + # `projects/*/locations/*/products/*` + # + # - Each {::Google::Cloud::Vision::V1::Product Product} has a collection of + # {::Google::Cloud::Vision::V1::ReferenceImage ReferenceImage} resources, named + # `projects/*/locations/*/products/*/referenceImages/*` + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "vision.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :product_search_stub + + ## + # Configure the ProductSearch Client class. + # + # See {::Google::Cloud::Vision::V1::ProductSearch::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ProductSearch clients + # ::Google::Cloud::Vision::V1::ProductSearch::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", "Vision", "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_product_set.timeout = 600.0 + default_config.rpcs.create_product_set.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [] + } + + default_config.rpcs.list_product_sets.timeout = 600.0 + default_config.rpcs.list_product_sets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_product_set.timeout = 600.0 + default_config.rpcs.get_product_set.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_product_set.timeout = 600.0 + default_config.rpcs.update_product_set.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_product_set.timeout = 600.0 + default_config.rpcs.delete_product_set.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_product.timeout = 600.0 + default_config.rpcs.create_product.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [] + } + + default_config.rpcs.list_products.timeout = 600.0 + default_config.rpcs.list_products.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_product.timeout = 600.0 + default_config.rpcs.get_product.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_product.timeout = 600.0 + default_config.rpcs.update_product.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_product.timeout = 600.0 + default_config.rpcs.delete_product.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_reference_image.timeout = 600.0 + default_config.rpcs.create_reference_image.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [] + } + + default_config.rpcs.delete_reference_image.timeout = 600.0 + default_config.rpcs.delete_reference_image.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_reference_images.timeout = 600.0 + default_config.rpcs.list_reference_images.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_reference_image.timeout = 600.0 + default_config.rpcs.get_reference_image.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.add_product_to_product_set.timeout = 600.0 + default_config.rpcs.add_product_to_product_set.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.remove_product_from_product_set.timeout = 600.0 + default_config.rpcs.remove_product_from_product_set.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_products_in_product_set.timeout = 600.0 + default_config.rpcs.list_products_in_product_set.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.import_product_sets.timeout = 600.0 + default_config.rpcs.import_product_sets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [] + } + + default_config.rpcs.purge_products.timeout = 600.0 + default_config.rpcs.purge_products.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ProductSearch 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::Vision::V1::ProductSearch::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 + @product_search_stub.universe_domain + end + + ## + # Create a new ProductSearch REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ProductSearch 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::Vision::V1::ProductSearch::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 + + @product_search_stub = ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @product_search_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 + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Vision::V1::ProductSearch::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @product_search_stub.logger + end + + # Service calls + + ## + # Creates and returns a new ProductSet resource. + # + # Possible errors: + # + # * Returns INVALID_ARGUMENT if display_name is missing, or is longer than + # 4096 characters. + # + # @overload create_product_set(request, options = nil) + # Pass arguments to `create_product_set` via a request object, either of type + # {::Google::Cloud::Vision::V1::CreateProductSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::CreateProductSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_product_set(parent: nil, product_set: nil, product_set_id: nil) + # Pass arguments to `create_product_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 in which the ProductSet should be created. + # + # Format is `projects/PROJECT_ID/locations/LOC_ID`. + # @param product_set [::Google::Cloud::Vision::V1::ProductSet, ::Hash] + # Required. The ProductSet to create. + # @param product_set_id [::String] + # A user-supplied resource id for this ProductSet. If set, the server will + # attempt to use this value as the resource id. If it is already in use, an + # error is returned with code ALREADY_EXISTS. Must be at most 128 characters + # long. It cannot contain the character `/`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Vision::V1::ProductSet] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Vision::V1::ProductSet] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::CreateProductSetRequest.new + # + # # Call the create_product_set method. + # result = client.create_product_set request + # + # # The returned object is of type Google::Cloud::Vision::V1::ProductSet. + # p result + # + def create_product_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::CreateProductSetRequest + + # Converts hash and nil to an 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_product_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_product_set.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_product_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.create_product_set request, 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 ProductSets in an unspecified order. + # + # Possible errors: + # + # * Returns INVALID_ARGUMENT if page_size is greater than 100, or less + # than 1. + # + # @overload list_product_sets(request, options = nil) + # Pass arguments to `list_product_sets` via a request object, either of type + # {::Google::Cloud::Vision::V1::ListProductSetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::ListProductSetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_product_sets(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_product_sets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 from which ProductSets should be listed. + # + # Format is `projects/PROJECT_ID/locations/LOC_ID`. + # @param page_size [::Integer] + # The maximum number of items to return. Default 10, maximum 100. + # @param page_token [::String] + # The next_page_token returned from a previous List request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1::ProductSet>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1::ProductSet>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::ListProductSetsRequest.new + # + # # Call the list_product_sets method. + # result = client.list_product_sets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Vision::V1::ProductSet. + # p item + # end + # + def list_product_sets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::ListProductSetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_product_sets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_product_sets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_product_sets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.list_product_sets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @product_search_stub, :list_product_sets, "product_sets", 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 information associated with a ProductSet. + # + # Possible errors: + # + # * Returns NOT_FOUND if the ProductSet does not exist. + # + # @overload get_product_set(request, options = nil) + # Pass arguments to `get_product_set` via a request object, either of type + # {::Google::Cloud::Vision::V1::GetProductSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::GetProductSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_product_set(name: nil) + # Pass arguments to `get_product_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the ProductSet to get. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Vision::V1::ProductSet] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Vision::V1::ProductSet] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::GetProductSetRequest.new + # + # # Call the get_product_set method. + # result = client.get_product_set request + # + # # The returned object is of type Google::Cloud::Vision::V1::ProductSet. + # p result + # + def get_product_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::GetProductSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_product_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_product_set.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_product_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.get_product_set request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Makes changes to a ProductSet resource. + # Only display_name can be updated currently. + # + # Possible errors: + # + # * Returns NOT_FOUND if the ProductSet does not exist. + # * Returns INVALID_ARGUMENT if display_name is present in update_mask but + # missing from the request or longer than 4096 characters. + # + # @overload update_product_set(request, options = nil) + # Pass arguments to `update_product_set` via a request object, either of type + # {::Google::Cloud::Vision::V1::UpdateProductSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::UpdateProductSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_product_set(product_set: nil, update_mask: nil) + # Pass arguments to `update_product_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param product_set [::Google::Cloud::Vision::V1::ProductSet, ::Hash] + # Required. The ProductSet resource which replaces the one on the server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The {::Google::Protobuf::FieldMask FieldMask} that specifies which fields to + # update. + # If update_mask isn't specified, all mutable fields are to be updated. + # Valid mask path is `display_name`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Vision::V1::ProductSet] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Vision::V1::ProductSet] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::UpdateProductSetRequest.new + # + # # Call the update_product_set method. + # result = client.update_product_set request + # + # # The returned object is of type Google::Cloud::Vision::V1::ProductSet. + # p result + # + def update_product_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::UpdateProductSetRequest + + # Converts hash and nil to an 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_product_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_product_set.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_product_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.update_product_set request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Permanently deletes a ProductSet. Products and ReferenceImages in the + # ProductSet are not deleted. + # + # The actual image files are not deleted from Google Cloud Storage. + # + # @overload delete_product_set(request, options = nil) + # Pass arguments to `delete_product_set` via a request object, either of type + # {::Google::Cloud::Vision::V1::DeleteProductSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::DeleteProductSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_product_set(name: nil) + # Pass arguments to `delete_product_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the ProductSet to delete. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_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/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::DeleteProductSetRequest.new + # + # # Call the delete_product_set method. + # result = client.delete_product_set request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_product_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::DeleteProductSetRequest + + # Converts hash and nil to an 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_product_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_product_set.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_product_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.delete_product_set request, 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 and returns a new product resource. + # + # Possible errors: + # + # * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 + # characters. + # * Returns INVALID_ARGUMENT if description is longer than 4096 characters. + # * Returns INVALID_ARGUMENT if product_category is missing or invalid. + # + # @overload create_product(request, options = nil) + # Pass arguments to `create_product` via a request object, either of type + # {::Google::Cloud::Vision::V1::CreateProductRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::CreateProductRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_product(parent: nil, product: nil, product_id: nil) + # Pass arguments to `create_product` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project in which the Product should be created. + # + # Format is + # `projects/PROJECT_ID/locations/LOC_ID`. + # @param product [::Google::Cloud::Vision::V1::Product, ::Hash] + # Required. The product to create. + # @param product_id [::String] + # A user-supplied resource id for this Product. If set, the server will + # attempt to use this value as the resource id. If it is already in use, an + # error is returned with code ALREADY_EXISTS. Must be at most 128 characters + # long. It cannot contain the character `/`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Vision::V1::Product] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Vision::V1::Product] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::CreateProductRequest.new + # + # # Call the create_product method. + # result = client.create_product request + # + # # The returned object is of type Google::Cloud::Vision::V1::Product. + # p result + # + def create_product request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::CreateProductRequest + + # Converts hash and nil to an 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_product.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_product.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.create_product request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists products in an unspecified order. + # + # Possible errors: + # + # * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + # + # @overload list_products(request, options = nil) + # Pass arguments to `list_products` via a request object, either of type + # {::Google::Cloud::Vision::V1::ListProductsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::ListProductsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_products(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_products` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project OR ProductSet from which Products should be listed. + # + # Format: + # `projects/PROJECT_ID/locations/LOC_ID` + # @param page_size [::Integer] + # The maximum number of items to return. Default 10, maximum 100. + # @param page_token [::String] + # The next_page_token returned from a previous List request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1::Product>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1::Product>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::ListProductsRequest.new + # + # # Call the list_products method. + # result = client.list_products request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Vision::V1::Product. + # p item + # end + # + def list_products request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::ListProductsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_products.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_products.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_products.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.list_products request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @product_search_stub, :list_products, "products", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets information associated with a Product. + # + # Possible errors: + # + # * Returns NOT_FOUND if the Product does not exist. + # + # @overload get_product(request, options = nil) + # Pass arguments to `get_product` via a request object, either of type + # {::Google::Cloud::Vision::V1::GetProductRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::GetProductRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_product(name: nil) + # Pass arguments to `get_product` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the Product to get. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Vision::V1::Product] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Vision::V1::Product] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::GetProductRequest.new + # + # # Call the get_product method. + # result = client.get_product request + # + # # The returned object is of type Google::Cloud::Vision::V1::Product. + # p result + # + def get_product request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::GetProductRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_product.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_product.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.get_product request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Makes changes to a Product resource. + # Only the `display_name`, `description`, and `labels` fields can be updated + # right now. + # + # If labels are updated, the change will not be reflected in queries until + # the next index time. + # + # Possible errors: + # + # * Returns NOT_FOUND if the Product does not exist. + # * Returns INVALID_ARGUMENT if display_name is present in update_mask but is + # missing from the request or longer than 4096 characters. + # * Returns INVALID_ARGUMENT if description is present in update_mask but is + # longer than 4096 characters. + # * Returns INVALID_ARGUMENT if product_category is present in update_mask. + # + # @overload update_product(request, options = nil) + # Pass arguments to `update_product` via a request object, either of type + # {::Google::Cloud::Vision::V1::UpdateProductRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::UpdateProductRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_product(product: nil, update_mask: nil) + # Pass arguments to `update_product` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param product [::Google::Cloud::Vision::V1::Product, ::Hash] + # Required. The Product resource which replaces the one on the server. + # product.name is immutable. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The {::Google::Protobuf::FieldMask FieldMask} that specifies which fields + # to update. + # If update_mask isn't specified, all mutable fields are to be updated. + # Valid mask paths include `product_labels`, `display_name`, and + # `description`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Vision::V1::Product] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Vision::V1::Product] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::UpdateProductRequest.new + # + # # Call the update_product method. + # result = client.update_product request + # + # # The returned object is of type Google::Cloud::Vision::V1::Product. + # p result + # + def update_product request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::UpdateProductRequest + + # Converts hash and nil to an 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_product.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_product.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.update_product request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Permanently deletes a product and its reference images. + # + # Metadata of the product and all its images will be deleted right away, but + # search queries against ProductSets containing the product may still work + # until all related caches are refreshed. + # + # @overload delete_product(request, options = nil) + # Pass arguments to `delete_product` via a request object, either of type + # {::Google::Cloud::Vision::V1::DeleteProductRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::DeleteProductRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_product(name: nil) + # Pass arguments to `delete_product` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of product to delete. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::DeleteProductRequest.new + # + # # Call the delete_product method. + # result = client.delete_product request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_product request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::DeleteProductRequest + + # Converts hash and nil to an 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_product.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_product.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.delete_product request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates and returns a new ReferenceImage resource. + # + # The `bounding_poly` field is optional. If `bounding_poly` is not specified, + # the system will try to detect regions of interest in the image that are + # compatible with the product_category on the parent product. If it is + # specified, detection is ALWAYS skipped. The system converts polygons into + # non-rotated rectangles. + # + # Note that the pipeline will resize the image if the image resolution is too + # large to process (above 50MP). + # + # Possible errors: + # + # * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 + # characters. + # * Returns INVALID_ARGUMENT if the product does not exist. + # * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing + # compatible with the parent product's product_category is detected. + # * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + # + # @overload create_reference_image(request, options = nil) + # Pass arguments to `create_reference_image` via a request object, either of type + # {::Google::Cloud::Vision::V1::CreateReferenceImageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::CreateReferenceImageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_reference_image(parent: nil, reference_image: nil, reference_image_id: nil) + # Pass arguments to `create_reference_image` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the product in which to create the reference + # image. + # + # Format is + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + # @param reference_image [::Google::Cloud::Vision::V1::ReferenceImage, ::Hash] + # Required. The reference image to create. + # If an image ID is specified, it is ignored. + # @param reference_image_id [::String] + # A user-supplied resource id for the ReferenceImage to be added. If set, + # the server will attempt to use this value as the resource id. If it is + # already in use, an error is returned with code ALREADY_EXISTS. Must be at + # most 128 characters long. It cannot contain the character `/`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Vision::V1::ReferenceImage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Vision::V1::ReferenceImage] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::CreateReferenceImageRequest.new + # + # # Call the create_reference_image method. + # result = client.create_reference_image request + # + # # The returned object is of type Google::Cloud::Vision::V1::ReferenceImage. + # p result + # + def create_reference_image request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::CreateReferenceImageRequest + + # Converts hash and nil to an 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_reference_image.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_reference_image.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_reference_image.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.create_reference_image request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Permanently deletes a reference image. + # + # The image metadata will be deleted right away, but search queries + # against ProductSets containing the image may still work until all related + # caches are refreshed. + # + # The actual image files are not deleted from Google Cloud Storage. + # + # @overload delete_reference_image(request, options = nil) + # Pass arguments to `delete_reference_image` via a request object, either of type + # {::Google::Cloud::Vision::V1::DeleteReferenceImageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::DeleteReferenceImageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_reference_image(name: nil) + # Pass arguments to `delete_reference_image` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the reference image to delete. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_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/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::DeleteReferenceImageRequest.new + # + # # Call the delete_reference_image method. + # result = client.delete_reference_image request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_reference_image request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::DeleteReferenceImageRequest + + # Converts hash and nil to an 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_reference_image.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_reference_image.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_reference_image.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.delete_reference_image request, 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 reference images. + # + # Possible errors: + # + # * Returns NOT_FOUND if the parent product does not exist. + # * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less + # than 1. + # + # @overload list_reference_images(request, options = nil) + # Pass arguments to `list_reference_images` via a request object, either of type + # {::Google::Cloud::Vision::V1::ListReferenceImagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::ListReferenceImagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_reference_images(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_reference_images` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the product containing the reference images. + # + # Format is + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + # @param page_size [::Integer] + # The maximum number of items to return. Default 10, maximum 100. + # @param page_token [::String] + # A token identifying a page of results to be returned. This is the value + # of `nextPageToken` returned in a previous reference image list request. + # + # Defaults to the first page if not specified. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1::ReferenceImage>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1::ReferenceImage>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::ListReferenceImagesRequest.new + # + # # Call the list_reference_images method. + # result = client.list_reference_images request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Vision::V1::ReferenceImage. + # p item + # end + # + def list_reference_images request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::ListReferenceImagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_reference_images.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_reference_images.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_reference_images.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.list_reference_images request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @product_search_stub, :list_reference_images, "reference_images", 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 information associated with a ReferenceImage. + # + # Possible errors: + # + # * Returns NOT_FOUND if the specified image does not exist. + # + # @overload get_reference_image(request, options = nil) + # Pass arguments to `get_reference_image` via a request object, either of type + # {::Google::Cloud::Vision::V1::GetReferenceImageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::GetReferenceImageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_reference_image(name: nil) + # Pass arguments to `get_reference_image` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the ReferenceImage to get. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Vision::V1::ReferenceImage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Vision::V1::ReferenceImage] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::GetReferenceImageRequest.new + # + # # Call the get_reference_image method. + # result = client.get_reference_image request + # + # # The returned object is of type Google::Cloud::Vision::V1::ReferenceImage. + # p result + # + def get_reference_image request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::GetReferenceImageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_reference_image.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_reference_image.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_reference_image.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.get_reference_image request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Adds a Product to the specified ProductSet. If the Product is already + # present, no change is made. + # + # One Product can be added to at most 100 ProductSets. + # + # Possible errors: + # + # * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + # + # @overload add_product_to_product_set(request, options = nil) + # Pass arguments to `add_product_to_product_set` via a request object, either of type + # {::Google::Cloud::Vision::V1::AddProductToProductSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::AddProductToProductSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload add_product_to_product_set(name: nil, product: nil) + # Pass arguments to `add_product_to_product_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for the ProductSet to modify. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + # @param product [::String] + # Required. The resource name for the Product to be added to this ProductSet. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::AddProductToProductSetRequest.new + # + # # Call the add_product_to_product_set method. + # result = client.add_product_to_product_set request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def add_product_to_product_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::AddProductToProductSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.add_product_to_product_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.add_product_to_product_set.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.add_product_to_product_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.add_product_to_product_set request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Removes a Product from the specified ProductSet. + # + # @overload remove_product_from_product_set(request, options = nil) + # Pass arguments to `remove_product_from_product_set` via a request object, either of type + # {::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload remove_product_from_product_set(name: nil, product: nil) + # Pass arguments to `remove_product_from_product_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for the ProductSet to modify. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + # @param product [::String] + # Required. The resource name for the Product to be removed from this + # ProductSet. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest.new + # + # # Call the remove_product_from_product_set method. + # result = client.remove_product_from_product_set request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def remove_product_from_product_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.remove_product_from_product_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.remove_product_from_product_set.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.remove_product_from_product_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.remove_product_from_product_set request, 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 Products in a ProductSet, in an unspecified order. If the + # ProductSet does not exist, the products field of the response will be + # empty. + # + # Possible errors: + # + # * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + # + # @overload list_products_in_product_set(request, options = nil) + # Pass arguments to `list_products_in_product_set` via a request object, either of type + # {::Google::Cloud::Vision::V1::ListProductsInProductSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::ListProductsInProductSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_products_in_product_set(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_products_in_product_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The ProductSet resource for which to retrieve Products. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + # @param page_size [::Integer] + # The maximum number of items to return. Default 10, maximum 100. + # @param page_token [::String] + # The next_page_token returned from a previous List request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1::Product>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1::Product>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::ListProductsInProductSetRequest.new + # + # # Call the list_products_in_product_set method. + # result = client.list_products_in_product_set request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Vision::V1::Product. + # p item + # end + # + def list_products_in_product_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::ListProductsInProductSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_products_in_product_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_products_in_product_set.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_products_in_product_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.list_products_in_product_set request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @product_search_stub, :list_products_in_product_set, "products", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Asynchronous API that imports a list of reference images to specified + # product sets based on a list of image information. + # + # The {::Google::Longrunning::Operation google.longrunning.Operation} API can be + # used to keep track of the progress and results of the request. + # `Operation.metadata` contains `BatchOperationMetadata`. (progress) + # `Operation.response` contains `ImportProductSetsResponse`. (results) + # + # The input source of this method is a csv file on Google Cloud Storage. + # For the format of the csv file please see + # {::Google::Cloud::Vision::V1::ImportProductSetsGcsSource#csv_file_uri ImportProductSetsGcsSource.csv_file_uri}. + # + # @overload import_product_sets(request, options = nil) + # Pass arguments to `import_product_sets` via a request object, either of type + # {::Google::Cloud::Vision::V1::ImportProductSetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::ImportProductSetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_product_sets(parent: nil, input_config: nil) + # Pass arguments to `import_product_sets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 in which the ProductSets should be imported. + # + # Format is `projects/PROJECT_ID/locations/LOC_ID`. + # @param input_config [::Google::Cloud::Vision::V1::ImportProductSetsInputConfig, ::Hash] + # Required. The input content for the list of requests. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::ImportProductSetsRequest.new + # + # # Call the import_product_sets method. + # result = client.import_product_sets request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_product_sets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::ImportProductSetsRequest + + # Converts hash and nil to an 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_product_sets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_product_sets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.import_product_sets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.import_product_sets request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Asynchronous API to delete all Products in a ProductSet or all Products + # that are in no ProductSet. + # + # If a Product is a member of the specified ProductSet in addition to other + # ProductSets, the Product will still be deleted. + # + # It is recommended to not delete the specified ProductSet until after this + # operation has completed. It is also recommended to not add any of the + # Products involved in the batch delete to a new ProductSet while this + # operation is running because those Products may still end up deleted. + # + # It's not possible to undo the PurgeProducts operation. Therefore, it is + # recommended to keep the csv files used in ImportProductSets (if that was + # how you originally built the Product Set) before starting PurgeProducts, in + # case you need to re-import the data after deletion. + # + # If the plan is to purge all of the Products from a ProductSet and then + # re-use the empty ProductSet to re-import new Products into the empty + # ProductSet, you must wait until the PurgeProducts operation has finished + # for that ProductSet. + # + # The {::Google::Longrunning::Operation google.longrunning.Operation} API can be + # used to keep track of the progress and results of the request. + # `Operation.metadata` contains `BatchOperationMetadata`. (progress) + # + # @overload purge_products(request, options = nil) + # Pass arguments to `purge_products` via a request object, either of type + # {::Google::Cloud::Vision::V1::PurgeProductsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Vision::V1::PurgeProductsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload purge_products(product_set_purge_config: nil, delete_orphan_products: nil, parent: nil, force: nil) + # Pass arguments to `purge_products` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param product_set_purge_config [::Google::Cloud::Vision::V1::ProductSetPurgeConfig, ::Hash] + # Specify which ProductSet contains the Products to be deleted. + # + # Note: The following parameters are mutually exclusive: `product_set_purge_config`, `delete_orphan_products`. 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 delete_orphan_products [::Boolean] + # If delete_orphan_products is true, all Products that are not in any + # ProductSet will be deleted. + # + # Note: The following parameters are mutually exclusive: `delete_orphan_products`, `product_set_purge_config`. 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 parent [::String] + # Required. The project and location in which the Products should be deleted. + # + # Format is `projects/PROJECT_ID/locations/LOC_ID`. + # @param force [::Boolean] + # The default value is false. Override this value to true to actually perform + # the purge. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::PurgeProductsRequest.new + # + # # Call the purge_products method. + # result = client.purge_products request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def purge_products request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::PurgeProductsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.purge_products.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.purge_products.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.purge_products.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_search_stub.purge_products request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 ProductSearch REST API. + # + # This class represents the configuration for ProductSearch 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::Vision::V1::ProductSearch::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_product_set to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_product_set.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_product_set.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 = "vision.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 ProductSearch 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_product_set` + # @return [::Gapic::Config::Method] + # + attr_reader :create_product_set + ## + # RPC-specific configuration for `list_product_sets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_product_sets + ## + # RPC-specific configuration for `get_product_set` + # @return [::Gapic::Config::Method] + # + attr_reader :get_product_set + ## + # RPC-specific configuration for `update_product_set` + # @return [::Gapic::Config::Method] + # + attr_reader :update_product_set + ## + # RPC-specific configuration for `delete_product_set` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_product_set + ## + # RPC-specific configuration for `create_product` + # @return [::Gapic::Config::Method] + # + attr_reader :create_product + ## + # RPC-specific configuration for `list_products` + # @return [::Gapic::Config::Method] + # + attr_reader :list_products + ## + # RPC-specific configuration for `get_product` + # @return [::Gapic::Config::Method] + # + attr_reader :get_product + ## + # RPC-specific configuration for `update_product` + # @return [::Gapic::Config::Method] + # + attr_reader :update_product + ## + # RPC-specific configuration for `delete_product` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_product + ## + # RPC-specific configuration for `create_reference_image` + # @return [::Gapic::Config::Method] + # + attr_reader :create_reference_image + ## + # RPC-specific configuration for `delete_reference_image` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_reference_image + ## + # RPC-specific configuration for `list_reference_images` + # @return [::Gapic::Config::Method] + # + attr_reader :list_reference_images + ## + # RPC-specific configuration for `get_reference_image` + # @return [::Gapic::Config::Method] + # + attr_reader :get_reference_image + ## + # RPC-specific configuration for `add_product_to_product_set` + # @return [::Gapic::Config::Method] + # + attr_reader :add_product_to_product_set + ## + # RPC-specific configuration for `remove_product_from_product_set` + # @return [::Gapic::Config::Method] + # + attr_reader :remove_product_from_product_set + ## + # RPC-specific configuration for `list_products_in_product_set` + # @return [::Gapic::Config::Method] + # + attr_reader :list_products_in_product_set + ## + # RPC-specific configuration for `import_product_sets` + # @return [::Gapic::Config::Method] + # + attr_reader :import_product_sets + ## + # RPC-specific configuration for `purge_products` + # @return [::Gapic::Config::Method] + # + attr_reader :purge_products + + # @private + def initialize parent_rpcs = nil + create_product_set_config = parent_rpcs.create_product_set if parent_rpcs.respond_to? :create_product_set + @create_product_set = ::Gapic::Config::Method.new create_product_set_config + list_product_sets_config = parent_rpcs.list_product_sets if parent_rpcs.respond_to? :list_product_sets + @list_product_sets = ::Gapic::Config::Method.new list_product_sets_config + get_product_set_config = parent_rpcs.get_product_set if parent_rpcs.respond_to? :get_product_set + @get_product_set = ::Gapic::Config::Method.new get_product_set_config + update_product_set_config = parent_rpcs.update_product_set if parent_rpcs.respond_to? :update_product_set + @update_product_set = ::Gapic::Config::Method.new update_product_set_config + delete_product_set_config = parent_rpcs.delete_product_set if parent_rpcs.respond_to? :delete_product_set + @delete_product_set = ::Gapic::Config::Method.new delete_product_set_config + create_product_config = parent_rpcs.create_product if parent_rpcs.respond_to? :create_product + @create_product = ::Gapic::Config::Method.new create_product_config + list_products_config = parent_rpcs.list_products if parent_rpcs.respond_to? :list_products + @list_products = ::Gapic::Config::Method.new list_products_config + get_product_config = parent_rpcs.get_product if parent_rpcs.respond_to? :get_product + @get_product = ::Gapic::Config::Method.new get_product_config + update_product_config = parent_rpcs.update_product if parent_rpcs.respond_to? :update_product + @update_product = ::Gapic::Config::Method.new update_product_config + delete_product_config = parent_rpcs.delete_product if parent_rpcs.respond_to? :delete_product + @delete_product = ::Gapic::Config::Method.new delete_product_config + create_reference_image_config = parent_rpcs.create_reference_image if parent_rpcs.respond_to? :create_reference_image + @create_reference_image = ::Gapic::Config::Method.new create_reference_image_config + delete_reference_image_config = parent_rpcs.delete_reference_image if parent_rpcs.respond_to? :delete_reference_image + @delete_reference_image = ::Gapic::Config::Method.new delete_reference_image_config + list_reference_images_config = parent_rpcs.list_reference_images if parent_rpcs.respond_to? :list_reference_images + @list_reference_images = ::Gapic::Config::Method.new list_reference_images_config + get_reference_image_config = parent_rpcs.get_reference_image if parent_rpcs.respond_to? :get_reference_image + @get_reference_image = ::Gapic::Config::Method.new get_reference_image_config + add_product_to_product_set_config = parent_rpcs.add_product_to_product_set if parent_rpcs.respond_to? :add_product_to_product_set + @add_product_to_product_set = ::Gapic::Config::Method.new add_product_to_product_set_config + remove_product_from_product_set_config = parent_rpcs.remove_product_from_product_set if parent_rpcs.respond_to? :remove_product_from_product_set + @remove_product_from_product_set = ::Gapic::Config::Method.new remove_product_from_product_set_config + list_products_in_product_set_config = parent_rpcs.list_products_in_product_set if parent_rpcs.respond_to? :list_products_in_product_set + @list_products_in_product_set = ::Gapic::Config::Method.new list_products_in_product_set_config + import_product_sets_config = parent_rpcs.import_product_sets if parent_rpcs.respond_to? :import_product_sets + @import_product_sets = ::Gapic::Config::Method.new import_product_sets_config + purge_products_config = parent_rpcs.purge_products if parent_rpcs.respond_to? :purge_products + @purge_products = ::Gapic::Config::Method.new purge_products_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/operations.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/operations.rb new file mode 100644 index 000000000000..e9863955af84 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/operations.rb @@ -0,0 +1,946 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 Vision + module V1 + module ProductSearch + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "vision.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ProductSearch 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 ProductSearch 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::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Vision::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "vision.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}", + matches: [ + ["name", %r{^operations/?$}, 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/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^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-vision-v1/lib/google/cloud/vision/v1/product_search/rest/service_stub.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/service_stub.rb new file mode 100644 index 000000000000..a84d30c2c0a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/service_stub.rb @@ -0,0 +1,1249 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/vision/v1/product_search_service_pb" + +module Google + module Cloud + module Vision + module V1 + module ProductSearch + module Rest + ## + # REST service stub for the ProductSearch 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_product_set REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::CreateProductSetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Vision::V1::ProductSet] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Vision::V1::ProductSet] + # A result object deserialized from the server's reply + def create_product_set request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_product_set_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_product_set", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Vision::V1::ProductSet.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_product_sets REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::ListProductSetsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Vision::V1::ListProductSetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Vision::V1::ListProductSetsResponse] + # A result object deserialized from the server's reply + def list_product_sets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_product_sets_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_product_sets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Vision::V1::ListProductSetsResponse.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_product_set REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::GetProductSetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Vision::V1::ProductSet] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Vision::V1::ProductSet] + # A result object deserialized from the server's reply + def get_product_set request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_product_set_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_product_set", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Vision::V1::ProductSet.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_product_set REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::UpdateProductSetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Vision::V1::ProductSet] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Vision::V1::ProductSet] + # A result object deserialized from the server's reply + def update_product_set request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_product_set_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_product_set", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Vision::V1::ProductSet.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_product_set REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::DeleteProductSetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_product_set request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_product_set_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_product_set", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_product REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::CreateProductRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Vision::V1::Product] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Vision::V1::Product] + # A result object deserialized from the server's reply + def create_product request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_product_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_product", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Vision::V1::Product.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_products REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::ListProductsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Vision::V1::ListProductsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Vision::V1::ListProductsResponse] + # A result object deserialized from the server's reply + def list_products request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_products_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_products", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Vision::V1::ListProductsResponse.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_product REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::GetProductRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Vision::V1::Product] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Vision::V1::Product] + # A result object deserialized from the server's reply + def get_product request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_product_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_product", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Vision::V1::Product.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_product REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::UpdateProductRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Vision::V1::Product] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Vision::V1::Product] + # A result object deserialized from the server's reply + def update_product request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_product_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_product", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Vision::V1::Product.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_product REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::DeleteProductRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_product request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_product_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_product", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_reference_image REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::CreateReferenceImageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Vision::V1::ReferenceImage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Vision::V1::ReferenceImage] + # A result object deserialized from the server's reply + def create_reference_image request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_reference_image_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_reference_image", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Vision::V1::ReferenceImage.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_reference_image REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::DeleteReferenceImageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_reference_image request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_reference_image_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_reference_image", + 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 list_reference_images REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::ListReferenceImagesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Vision::V1::ListReferenceImagesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Vision::V1::ListReferenceImagesResponse] + # A result object deserialized from the server's reply + def list_reference_images request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_reference_images_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_reference_images", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Vision::V1::ListReferenceImagesResponse.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_reference_image REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::GetReferenceImageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Vision::V1::ReferenceImage] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Vision::V1::ReferenceImage] + # A result object deserialized from the server's reply + def get_reference_image request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_reference_image_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_reference_image", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Vision::V1::ReferenceImage.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the add_product_to_product_set REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::AddProductToProductSetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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 add_product_to_product_set request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_add_product_to_product_set_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "add_product_to_product_set", + 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 remove_product_from_product_set REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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 remove_product_from_product_set request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_remove_product_from_product_set_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "remove_product_from_product_set", + 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 list_products_in_product_set REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::ListProductsInProductSetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Vision::V1::ListProductsInProductSetResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Vision::V1::ListProductsInProductSetResponse] + # A result object deserialized from the server's reply + def list_products_in_product_set request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_products_in_product_set_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_products_in_product_set", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Vision::V1::ListProductsInProductSetResponse.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_product_sets REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::ImportProductSetsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_product_sets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_import_product_sets_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_product_sets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the purge_products REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::PurgeProductsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def purge_products request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_purge_products_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "purge_products", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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_product_set REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::CreateProductSetRequest] + # 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_product_set_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/productSets", + body: "product_set", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_product_sets REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::ListProductSetsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_product_sets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/productSets", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_product_set REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::GetProductSetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_product_set_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/productSets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_product_set REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::UpdateProductSetRequest] + # 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_product_set_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{product_set.name}", + body: "product_set", + matches: [ + ["product_set.name", %r{^projects/[^/]+/locations/[^/]+/productSets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_product_set REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::DeleteProductSetRequest] + # 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_product_set_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/productSets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_product REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::CreateProductRequest] + # 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_product_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/products", + body: "product", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_products REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::ListProductsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_products_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/products", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_product REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::GetProductRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_product_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_product REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::UpdateProductRequest] + # 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_product_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{product.name}", + body: "product", + matches: [ + ["product.name", %r{^projects/[^/]+/locations/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_product REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::DeleteProductRequest] + # 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_product_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_reference_image REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::CreateReferenceImageRequest] + # 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_reference_image_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/referenceImages", + body: "reference_image", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_reference_image REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::DeleteReferenceImageRequest] + # 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_reference_image_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/products/[^/]+/referenceImages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_reference_images REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::ListReferenceImagesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_reference_images_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/referenceImages", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_reference_image REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::GetReferenceImageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_reference_image_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/products/[^/]+/referenceImages/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the add_product_to_product_set REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::AddProductToProductSetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_add_product_to_product_set_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:addProduct", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/productSets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the remove_product_from_product_set REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_remove_product_from_product_set_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:removeProduct", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/productSets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_products_in_product_set REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::ListProductsInProductSetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_products_in_product_set_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/products", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/productSets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the import_product_sets REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::ImportProductSetsRequest] + # 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_product_sets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/productSets:import", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the purge_products REST call + # + # @param request_pb [::Google::Cloud::Vision::V1::PurgeProductsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_purge_products_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/products:purge", + body: "*", + 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-vision-v1/lib/google/cloud/vision/v1/product_search_pb.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search_pb.rb new file mode 100644 index 000000000000..fbd9b0d6acd4 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/vision/v1/product_search.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/vision/v1/geometry_pb' +require 'google/cloud/vision/v1/product_search_service_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n+google/cloud/vision/v1/product_search.proto\x12\x16google.cloud.vision.v1\x1a\x19google/api/resource.proto\x1a%google/cloud/vision/v1/geometry.proto\x1a\x33google/cloud/vision/v1/product_search_service.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xba\x01\n\x13ProductSearchParams\x12;\n\rbounding_poly\x18\t \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12:\n\x0bproduct_set\x18\x06 \x01(\tB%\xfa\x41\"\n vision.googleapis.com/ProductSet\x12\x1a\n\x12product_categories\x18\x07 \x03(\t\x12\x0e\n\x06\x66ilter\x18\x08 \x01(\t\"\x88\x05\n\x14ProductSearchResults\x12.\n\nindex_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x44\n\x07results\x18\x05 \x03(\x0b\x32\x33.google.cloud.vision.v1.ProductSearchResults.Result\x12[\n\x17product_grouped_results\x18\x06 \x03(\x0b\x32:.google.cloud.vision.v1.ProductSearchResults.GroupedResult\x1aX\n\x06Result\x12\x30\n\x07product\x18\x01 \x01(\x0b\x32\x1f.google.cloud.vision.v1.Product\x12\r\n\x05score\x18\x02 \x01(\x02\x12\r\n\x05image\x18\x03 \x01(\t\x1aS\n\x10ObjectAnnotation\x12\x0b\n\x03mid\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\r\n\x05score\x18\x04 \x01(\x02\x1a\xed\x01\n\rGroupedResult\x12;\n\rbounding_poly\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x44\n\x07results\x18\x02 \x03(\x0b\x32\x33.google.cloud.vision.v1.ProductSearchResults.Result\x12Y\n\x12object_annotations\x18\x03 \x03(\x0b\x32=.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotationBs\n\x1a\x63om.google.cloud.vision.v1B\x12ProductSearchProtoP\x01Z5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Vision + module V1 + ProductSearchParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSearchParams").msgclass + ProductSearchResults = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSearchResults").msgclass + ProductSearchResults::Result = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSearchResults.Result").msgclass + ProductSearchResults::ObjectAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation").msgclass + ProductSearchResults::GroupedResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSearchResults.GroupedResult").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search_service_pb.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search_service_pb.rb new file mode 100644 index 000000000000..981a849d946a --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search_service_pb.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/vision/v1/product_search_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/vision/v1/geometry_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n3google/cloud/vision/v1/product_search_service.proto\x12\x16google.cloud.vision.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/vision/v1/geometry.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xab\x02\n\x07Product\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x1d\n\x10product_category\x18\x04 \x01(\tB\x03\xe0\x41\x05\x12@\n\x0eproduct_labels\x18\x05 \x03(\x0b\x32(.google.cloud.vision.v1.Product.KeyValue\x1a&\n\x08KeyValue\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:^\xea\x41[\n\x1dvision.googleapis.com/Product\x12:projects/{project}/locations/{location}/products/{product}\"\xfd\x01\n\nProductSet\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x33\n\nindex_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12,\n\x0bindex_error\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03:h\xea\x41\x65\n vision.googleapis.com/ProductSet\x12\x41projects/{project}/locations/{location}/productSets/{product_set}\"\xfe\x01\n\x0eReferenceImage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x0e\x62ounding_polys\x18\x03 \x03(\x0b\x32$.google.cloud.vision.v1.BoundingPolyB\x03\xe0\x41\x01:\x88\x01\xea\x41\x84\x01\n$vision.googleapis.com/ReferenceImage\x12\\projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}\"\x9c\x01\n\x14\x43reateProductRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x35\n\x07product\x18\x02 \x01(\x0b\x32\x1f.google.cloud.vision.v1.ProductB\x03\xe0\x41\x02\x12\x12\n\nproduct_id\x18\x03 \x01(\t\"w\n\x13ListProductsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"b\n\x14ListProductsResponse\x12\x31\n\x08products\x18\x01 \x03(\x0b\x32\x1f.google.cloud.vision.v1.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"H\n\x11GetProductRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\"~\n\x14UpdateProductRequest\x12\x35\n\x07product\x18\x01 \x01(\x0b\x32\x1f.google.cloud.vision.v1.ProductB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"K\n\x14\x44\x65leteProductRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\"\xaa\x01\n\x17\x43reateProductSetRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12<\n\x0bproduct_set\x18\x02 \x01(\x0b\x32\".google.cloud.vision.v1.ProductSetB\x03\xe0\x41\x02\x12\x16\n\x0eproduct_set_id\x18\x03 \x01(\t\"z\n\x16ListProductSetsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"l\n\x17ListProductSetsResponse\x12\x38\n\x0cproduct_sets\x18\x01 \x03(\x0b\x32\".google.cloud.vision.v1.ProductSet\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x14GetProductSetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n vision.googleapis.com/ProductSet\"\x88\x01\n\x17UpdateProductSetRequest\x12<\n\x0bproduct_set\x18\x01 \x01(\x0b\x32\".google.cloud.vision.v1.ProductSetB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"Q\n\x17\x44\x65leteProductSetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n vision.googleapis.com/ProductSet\"\xb6\x01\n\x1b\x43reateReferenceImageRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\x12\x44\n\x0freference_image\x18\x02 \x01(\x0b\x32&.google.cloud.vision.v1.ReferenceImageB\x03\xe0\x41\x02\x12\x1a\n\x12reference_image_id\x18\x03 \x01(\t\"z\n\x1aListReferenceImagesRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8b\x01\n\x1bListReferenceImagesResponse\x12@\n\x10reference_images\x18\x01 \x03(\x0b\x32&.google.cloud.vision.v1.ReferenceImage\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\"V\n\x18GetReferenceImageRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$vision.googleapis.com/ReferenceImage\"Y\n\x1b\x44\x65leteReferenceImageRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$vision.googleapis.com/ReferenceImage\"\x8f\x01\n\x1d\x41\x64\x64ProductToProductSetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n vision.googleapis.com/ProductSet\x12\x36\n\x07product\x18\x02 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\"\x94\x01\n\"RemoveProductFromProductSetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n vision.googleapis.com/ProductSet\x12\x36\n\x07product\x18\x02 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\"\x80\x01\n\x1fListProductsInProductSetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n vision.googleapis.com/ProductSet\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"n\n ListProductsInProductSetResponse\x12\x31\n\x08products\x18\x01 \x03(\x0b\x32\x1f.google.cloud.vision.v1.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"2\n\x1aImportProductSetsGcsSource\x12\x14\n\x0c\x63sv_file_uri\x18\x01 \x01(\t\"r\n\x1cImportProductSetsInputConfig\x12H\n\ngcs_source\x18\x01 \x01(\x0b\x32\x32.google.cloud.vision.v1.ImportProductSetsGcsSourceH\x00\x42\x08\n\x06source\"\xa6\x01\n\x18ImportProductSetsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12O\n\x0cinput_config\x18\x02 \x01(\x0b\x32\x34.google.cloud.vision.v1.ImportProductSetsInputConfigB\x03\xe0\x41\x02\"\x83\x01\n\x19ImportProductSetsResponse\x12@\n\x10reference_images\x18\x01 \x03(\x0b\x32&.google.cloud.vision.v1.ReferenceImage\x12$\n\x08statuses\x18\x02 \x03(\x0b\x32\x12.google.rpc.Status\"\x97\x02\n\x16\x42\x61tchOperationMetadata\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32\x34.google.cloud.vision.v1.BatchOperationMetadata.State\x12/\n\x0bsubmit_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"Y\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nPROCESSING\x10\x01\x12\x0e\n\nSUCCESSFUL\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\r\n\tCANCELLED\x10\x04\"/\n\x15ProductSetPurgeConfig\x12\x16\n\x0eproduct_set_id\x18\x01 \x01(\t\"\xdf\x01\n\x14PurgeProductsRequest\x12Q\n\x18product_set_purge_config\x18\x02 \x01(\x0b\x32-.google.cloud.vision.v1.ProductSetPurgeConfigH\x00\x12 \n\x16\x64\x65lete_orphan_products\x18\x03 \x01(\x08H\x00\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\r\n\x05\x66orce\x18\x04 \x01(\x08\x42\x08\n\x06target2\xf4\x1d\n\rProductSearch\x12\xd1\x01\n\x10\x43reateProductSet\x12/.google.cloud.vision.v1.CreateProductSetRequest\x1a\".google.cloud.vision.v1.ProductSet\"h\xda\x41!parent,product_set,product_set_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/productSets:\x0bproduct_set\x12\xb4\x01\n\x0fListProductSets\x12..google.cloud.vision.v1.ListProductSetsRequest\x1a/.google.cloud.vision.v1.ListProductSetsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/productSets\x12\xa1\x01\n\rGetProductSet\x12,.google.cloud.vision.v1.GetProductSetRequest\x1a\".google.cloud.vision.v1.ProductSet\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/productSets/*}\x12\xd3\x01\n\x10UpdateProductSet\x12/.google.cloud.vision.v1.UpdateProductSetRequest\x1a\".google.cloud.vision.v1.ProductSet\"j\xda\x41\x17product_set,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{product_set.name=projects/*/locations/*/productSets/*}:\x0bproduct_set\x12\x9b\x01\n\x10\x44\x65leteProductSet\x12/.google.cloud.vision.v1.DeleteProductSetRequest\x1a\x16.google.protobuf.Empty\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/productSets/*}\x12\xb9\x01\n\rCreateProduct\x12,.google.cloud.vision.v1.CreateProductRequest\x1a\x1f.google.cloud.vision.v1.Product\"Y\xda\x41\x19parent,product,product_id\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/products:\x07product\x12\xa8\x01\n\x0cListProducts\x12+.google.cloud.vision.v1.ListProductsRequest\x1a,.google.cloud.vision.v1.ListProductsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/products\x12\x95\x01\n\nGetProduct\x12).google.cloud.vision.v1.GetProductRequest\x1a\x1f.google.cloud.vision.v1.Product\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/products/*}\x12\xbb\x01\n\rUpdateProduct\x12,.google.cloud.vision.v1.UpdateProductRequest\x1a\x1f.google.cloud.vision.v1.Product\"[\xda\x41\x13product,update_mask\x82\xd3\xe4\x93\x02?24/v1/{product.name=projects/*/locations/*/products/*}:\x07product\x12\x92\x01\n\rDeleteProduct\x12,.google.cloud.vision.v1.DeleteProductRequest\x1a\x16.google.protobuf.Empty\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/products/*}\x12\xf9\x01\n\x14\x43reateReferenceImage\x12\x33.google.cloud.vision.v1.CreateReferenceImageRequest\x1a&.google.cloud.vision.v1.ReferenceImage\"\x83\x01\xda\x41)parent,reference_image,reference_image_id\x82\xd3\xe4\x93\x02Q\">/v1/{parent=projects/*/locations/*/products/*}/referenceImages:\x0freference_image\x12\xb2\x01\n\x14\x44\x65leteReferenceImage\x12\x33.google.cloud.vision.v1.DeleteReferenceImageRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/locations/*/products/*/referenceImages/*}\x12\xcf\x01\n\x13ListReferenceImages\x12\x32.google.cloud.vision.v1.ListReferenceImagesRequest\x1a\x33.google.cloud.vision.v1.ListReferenceImagesResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/products/*}/referenceImages\x12\xbc\x01\n\x11GetReferenceImage\x12\x30.google.cloud.vision.v1.GetReferenceImageRequest\x1a&.google.cloud.vision.v1.ReferenceImage\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/products/*/referenceImages/*}\x12\xbd\x01\n\x16\x41\x64\x64ProductToProductSet\x12\x35.google.cloud.vision.v1.AddProductToProductSetRequest\x1a\x16.google.protobuf.Empty\"T\xda\x41\x0cname,product\x82\xd3\xe4\x93\x02?\":/v1/{name=projects/*/locations/*/productSets/*}:addProduct:\x01*\x12\xca\x01\n\x1bRemoveProductFromProductSet\x12:.google.cloud.vision.v1.RemoveProductFromProductSetRequest\x1a\x16.google.protobuf.Empty\"W\xda\x41\x0cname,product\x82\xd3\xe4\x93\x02\x42\"=/v1/{name=projects/*/locations/*/productSets/*}:removeProduct:\x01*\x12\xd6\x01\n\x18ListProductsInProductSet\x12\x37.google.cloud.vision.v1.ListProductsInProductSetRequest\x1a\x38.google.cloud.vision.v1.ListProductsInProductSetResponse\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/productSets/*}/products\x12\xf4\x01\n\x11ImportProductSets\x12\x30.google.cloud.vision.v1.ImportProductSetsRequest\x1a\x1d.google.longrunning.Operation\"\x8d\x01\xca\x41\x33\n\x19ImportProductSetsResponse\x12\x16\x42\x61tchOperationMetadata\xda\x41\x13parent,input_config\x82\xd3\xe4\x93\x02;\"6/v1/{parent=projects/*/locations/*}/productSets:import:\x01*\x12\xd6\x01\n\rPurgeProducts\x12,.google.cloud.vision.v1.PurgeProductsRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41/\n\x15google.protobuf.Empty\x12\x16\x42\x61tchOperationMetadata\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\"2/v1/{parent=projects/*/locations/*}/products:purge:\x01*\x1av\xca\x41\x15vision.googleapis.com\xd2\x41[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-visionBz\n\x1a\x63om.google.cloud.vision.v1B\x19ProductSearchServiceProtoP\x01Z5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Vision + module V1 + Product = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Product").msgclass + Product::KeyValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Product.KeyValue").msgclass + ProductSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSet").msgclass + ReferenceImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ReferenceImage").msgclass + CreateProductRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.CreateProductRequest").msgclass + ListProductsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ListProductsRequest").msgclass + ListProductsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ListProductsResponse").msgclass + GetProductRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.GetProductRequest").msgclass + UpdateProductRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.UpdateProductRequest").msgclass + DeleteProductRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.DeleteProductRequest").msgclass + CreateProductSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.CreateProductSetRequest").msgclass + ListProductSetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ListProductSetsRequest").msgclass + ListProductSetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ListProductSetsResponse").msgclass + GetProductSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.GetProductSetRequest").msgclass + UpdateProductSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.UpdateProductSetRequest").msgclass + DeleteProductSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.DeleteProductSetRequest").msgclass + CreateReferenceImageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.CreateReferenceImageRequest").msgclass + ListReferenceImagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ListReferenceImagesRequest").msgclass + ListReferenceImagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ListReferenceImagesResponse").msgclass + GetReferenceImageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.GetReferenceImageRequest").msgclass + DeleteReferenceImageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.DeleteReferenceImageRequest").msgclass + AddProductToProductSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.AddProductToProductSetRequest").msgclass + RemoveProductFromProductSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.RemoveProductFromProductSetRequest").msgclass + ListProductsInProductSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ListProductsInProductSetRequest").msgclass + ListProductsInProductSetResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ListProductsInProductSetResponse").msgclass + ImportProductSetsGcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ImportProductSetsGcsSource").msgclass + ImportProductSetsInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ImportProductSetsInputConfig").msgclass + ImportProductSetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ImportProductSetsRequest").msgclass + ImportProductSetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ImportProductSetsResponse").msgclass + BatchOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.BatchOperationMetadata").msgclass + BatchOperationMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.BatchOperationMetadata.State").enummodule + ProductSetPurgeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSetPurgeConfig").msgclass + PurgeProductsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.PurgeProductsRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search_service_services_pb.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search_service_services_pb.rb new file mode 100644 index 000000000000..74a7744f243b --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search_service_services_pb.rb @@ -0,0 +1,233 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/vision/v1/product_search_service.proto for package 'google.cloud.vision.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/vision/v1/product_search_service_pb' + +module Google + module Cloud + module Vision + module V1 + module ProductSearch + # Manages Products and ProductSets of reference images for use in product + # search. It uses the following resource model: + # + # - The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] + # resources, named `projects/*/locations/*/productSets/*`, which acts as a way + # to put different products into groups to limit identification. + # + # In parallel, + # + # - The API has a collection of [Product][google.cloud.vision.v1.Product] + # resources, named + # `projects/*/locations/*/products/*` + # + # - Each [Product][google.cloud.vision.v1.Product] has a collection of + # [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named + # `projects/*/locations/*/products/*/referenceImages/*` + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.vision.v1.ProductSearch' + + # Creates and returns a new ProductSet resource. + # + # Possible errors: + # + # * Returns INVALID_ARGUMENT if display_name is missing, or is longer than + # 4096 characters. + rpc :CreateProductSet, ::Google::Cloud::Vision::V1::CreateProductSetRequest, ::Google::Cloud::Vision::V1::ProductSet + # Lists ProductSets in an unspecified order. + # + # Possible errors: + # + # * Returns INVALID_ARGUMENT if page_size is greater than 100, or less + # than 1. + rpc :ListProductSets, ::Google::Cloud::Vision::V1::ListProductSetsRequest, ::Google::Cloud::Vision::V1::ListProductSetsResponse + # Gets information associated with a ProductSet. + # + # Possible errors: + # + # * Returns NOT_FOUND if the ProductSet does not exist. + rpc :GetProductSet, ::Google::Cloud::Vision::V1::GetProductSetRequest, ::Google::Cloud::Vision::V1::ProductSet + # Makes changes to a ProductSet resource. + # Only display_name can be updated currently. + # + # Possible errors: + # + # * Returns NOT_FOUND if the ProductSet does not exist. + # * Returns INVALID_ARGUMENT if display_name is present in update_mask but + # missing from the request or longer than 4096 characters. + rpc :UpdateProductSet, ::Google::Cloud::Vision::V1::UpdateProductSetRequest, ::Google::Cloud::Vision::V1::ProductSet + # Permanently deletes a ProductSet. Products and ReferenceImages in the + # ProductSet are not deleted. + # + # The actual image files are not deleted from Google Cloud Storage. + rpc :DeleteProductSet, ::Google::Cloud::Vision::V1::DeleteProductSetRequest, ::Google::Protobuf::Empty + # Creates and returns a new product resource. + # + # Possible errors: + # + # * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 + # characters. + # * Returns INVALID_ARGUMENT if description is longer than 4096 characters. + # * Returns INVALID_ARGUMENT if product_category is missing or invalid. + rpc :CreateProduct, ::Google::Cloud::Vision::V1::CreateProductRequest, ::Google::Cloud::Vision::V1::Product + # Lists products in an unspecified order. + # + # Possible errors: + # + # * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + rpc :ListProducts, ::Google::Cloud::Vision::V1::ListProductsRequest, ::Google::Cloud::Vision::V1::ListProductsResponse + # Gets information associated with a Product. + # + # Possible errors: + # + # * Returns NOT_FOUND if the Product does not exist. + rpc :GetProduct, ::Google::Cloud::Vision::V1::GetProductRequest, ::Google::Cloud::Vision::V1::Product + # Makes changes to a Product resource. + # Only the `display_name`, `description`, and `labels` fields can be updated + # right now. + # + # If labels are updated, the change will not be reflected in queries until + # the next index time. + # + # Possible errors: + # + # * Returns NOT_FOUND if the Product does not exist. + # * Returns INVALID_ARGUMENT if display_name is present in update_mask but is + # missing from the request or longer than 4096 characters. + # * Returns INVALID_ARGUMENT if description is present in update_mask but is + # longer than 4096 characters. + # * Returns INVALID_ARGUMENT if product_category is present in update_mask. + rpc :UpdateProduct, ::Google::Cloud::Vision::V1::UpdateProductRequest, ::Google::Cloud::Vision::V1::Product + # Permanently deletes a product and its reference images. + # + # Metadata of the product and all its images will be deleted right away, but + # search queries against ProductSets containing the product may still work + # until all related caches are refreshed. + rpc :DeleteProduct, ::Google::Cloud::Vision::V1::DeleteProductRequest, ::Google::Protobuf::Empty + # Creates and returns a new ReferenceImage resource. + # + # The `bounding_poly` field is optional. If `bounding_poly` is not specified, + # the system will try to detect regions of interest in the image that are + # compatible with the product_category on the parent product. If it is + # specified, detection is ALWAYS skipped. The system converts polygons into + # non-rotated rectangles. + # + # Note that the pipeline will resize the image if the image resolution is too + # large to process (above 50MP). + # + # Possible errors: + # + # * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 + # characters. + # * Returns INVALID_ARGUMENT if the product does not exist. + # * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing + # compatible with the parent product's product_category is detected. + # * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + rpc :CreateReferenceImage, ::Google::Cloud::Vision::V1::CreateReferenceImageRequest, ::Google::Cloud::Vision::V1::ReferenceImage + # Permanently deletes a reference image. + # + # The image metadata will be deleted right away, but search queries + # against ProductSets containing the image may still work until all related + # caches are refreshed. + # + # The actual image files are not deleted from Google Cloud Storage. + rpc :DeleteReferenceImage, ::Google::Cloud::Vision::V1::DeleteReferenceImageRequest, ::Google::Protobuf::Empty + # Lists reference images. + # + # Possible errors: + # + # * Returns NOT_FOUND if the parent product does not exist. + # * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less + # than 1. + rpc :ListReferenceImages, ::Google::Cloud::Vision::V1::ListReferenceImagesRequest, ::Google::Cloud::Vision::V1::ListReferenceImagesResponse + # Gets information associated with a ReferenceImage. + # + # Possible errors: + # + # * Returns NOT_FOUND if the specified image does not exist. + rpc :GetReferenceImage, ::Google::Cloud::Vision::V1::GetReferenceImageRequest, ::Google::Cloud::Vision::V1::ReferenceImage + # Adds a Product to the specified ProductSet. If the Product is already + # present, no change is made. + # + # One Product can be added to at most 100 ProductSets. + # + # Possible errors: + # + # * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + rpc :AddProductToProductSet, ::Google::Cloud::Vision::V1::AddProductToProductSetRequest, ::Google::Protobuf::Empty + # Removes a Product from the specified ProductSet. + rpc :RemoveProductFromProductSet, ::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest, ::Google::Protobuf::Empty + # Lists the Products in a ProductSet, in an unspecified order. If the + # ProductSet does not exist, the products field of the response will be + # empty. + # + # Possible errors: + # + # * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + rpc :ListProductsInProductSet, ::Google::Cloud::Vision::V1::ListProductsInProductSetRequest, ::Google::Cloud::Vision::V1::ListProductsInProductSetResponse + # Asynchronous API that imports a list of reference images to specified + # product sets based on a list of image information. + # + # The [google.longrunning.Operation][google.longrunning.Operation] API can be + # used to keep track of the progress and results of the request. + # `Operation.metadata` contains `BatchOperationMetadata`. (progress) + # `Operation.response` contains `ImportProductSetsResponse`. (results) + # + # The input source of this method is a csv file on Google Cloud Storage. + # For the format of the csv file please see + # [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. + rpc :ImportProductSets, ::Google::Cloud::Vision::V1::ImportProductSetsRequest, ::Google::Longrunning::Operation + # Asynchronous API to delete all Products in a ProductSet or all Products + # that are in no ProductSet. + # + # If a Product is a member of the specified ProductSet in addition to other + # ProductSets, the Product will still be deleted. + # + # It is recommended to not delete the specified ProductSet until after this + # operation has completed. It is also recommended to not add any of the + # Products involved in the batch delete to a new ProductSet while this + # operation is running because those Products may still end up deleted. + # + # It's not possible to undo the PurgeProducts operation. Therefore, it is + # recommended to keep the csv files used in ImportProductSets (if that was + # how you originally built the Product Set) before starting PurgeProducts, in + # case you need to re-import the data after deletion. + # + # If the plan is to purge all of the Products from a ProductSet and then + # re-use the empty ProductSet to re-import new Products into the empty + # ProductSet, you must wait until the PurgeProducts operation has finished + # for that ProductSet. + # + # The [google.longrunning.Operation][google.longrunning.Operation] API can be + # used to keep track of the progress and results of the request. + # `Operation.metadata` contains `BatchOperationMetadata`. (progress) + rpc :PurgeProducts, ::Google::Cloud::Vision::V1::PurgeProductsRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/rest.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/rest.rb new file mode 100644 index 000000000000..4b55a00020cf --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/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/vision/v1/product_search/rest" +require "google/cloud/vision/v1/image_annotator/rest" +require "google/cloud/vision/v1/version" + +module Google + module Cloud + module Vision + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/vision/v1/rest" + # client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/text_annotation_pb.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/text_annotation_pb.rb new file mode 100644 index 000000000000..c4f9235f5dcf --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/text_annotation_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/vision/v1/text_annotation.proto + +require 'google/protobuf' + +require 'google/cloud/vision/v1/geometry_pb' + + +descriptor_data = "\n,google/cloud/vision/v1/text_annotation.proto\x12\x16google.cloud.vision.v1\x1a%google/cloud/vision/v1/geometry.proto\"\x96\x04\n\x0eTextAnnotation\x12+\n\x05pages\x18\x01 \x03(\x0b\x32\x1c.google.cloud.vision.v1.Page\x12\x0c\n\x04text\x18\x02 \x01(\t\x1a=\n\x10\x44\x65tectedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x1a\xd5\x01\n\rDetectedBreak\x12L\n\x04type\x18\x01 \x01(\x0e\x32>.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType\x12\x11\n\tis_prefix\x18\x02 \x01(\x08\"c\n\tBreakType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05SPACE\x10\x01\x12\x0e\n\nSURE_SPACE\x10\x02\x12\x12\n\x0e\x45OL_SURE_SPACE\x10\x03\x12\n\n\x06HYPHEN\x10\x04\x12\x0e\n\nLINE_BREAK\x10\x05\x1a\xb1\x01\n\x0cTextProperty\x12S\n\x12\x64\x65tected_languages\x18\x01 \x03(\x0b\x32\x37.google.cloud.vision.v1.TextAnnotation.DetectedLanguage\x12L\n\x0e\x64\x65tected_break\x18\x02 \x01(\x0b\x32\x34.google.cloud.vision.v1.TextAnnotation.DetectedBreak\"\xaf\x01\n\x04Page\x12\x45\n\x08property\x18\x01 \x01(\x0b\x32\x33.google.cloud.vision.v1.TextAnnotation.TextProperty\x12\r\n\x05width\x18\x02 \x01(\x05\x12\x0e\n\x06height\x18\x03 \x01(\x05\x12-\n\x06\x62locks\x18\x04 \x03(\x0b\x32\x1d.google.cloud.vision.v1.Block\x12\x12\n\nconfidence\x18\x05 \x01(\x02\"\xe6\x02\n\x05\x42lock\x12\x45\n\x08property\x18\x01 \x01(\x0b\x32\x33.google.cloud.vision.v1.TextAnnotation.TextProperty\x12:\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x35\n\nparagraphs\x18\x03 \x03(\x0b\x32!.google.cloud.vision.v1.Paragraph\x12;\n\nblock_type\x18\x04 \x01(\x0e\x32\'.google.cloud.vision.v1.Block.BlockType\x12\x12\n\nconfidence\x18\x05 \x01(\x02\"R\n\tBlockType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05TABLE\x10\x02\x12\x0b\n\x07PICTURE\x10\x03\x12\t\n\x05RULER\x10\x04\x12\x0b\n\x07\x42\x41RCODE\x10\x05\"\xcf\x01\n\tParagraph\x12\x45\n\x08property\x18\x01 \x01(\x0b\x32\x33.google.cloud.vision.v1.TextAnnotation.TextProperty\x12:\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12+\n\x05words\x18\x03 \x03(\x0b\x32\x1c.google.cloud.vision.v1.Word\x12\x12\n\nconfidence\x18\x04 \x01(\x02\"\xce\x01\n\x04Word\x12\x45\n\x08property\x18\x01 \x01(\x0b\x32\x33.google.cloud.vision.v1.TextAnnotation.TextProperty\x12:\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12/\n\x07symbols\x18\x03 \x03(\x0b\x32\x1e.google.cloud.vision.v1.Symbol\x12\x12\n\nconfidence\x18\x04 \x01(\x02\"\xad\x01\n\x06Symbol\x12\x45\n\x08property\x18\x01 \x01(\x0b\x32\x33.google.cloud.vision.v1.TextAnnotation.TextProperty\x12:\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x0c\n\x04text\x18\x03 \x01(\t\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x42t\n\x1a\x63om.google.cloud.vision.v1B\x13TextAnnotationProtoP\x01Z5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Vision + module V1 + TextAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.TextAnnotation").msgclass + TextAnnotation::DetectedLanguage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.TextAnnotation.DetectedLanguage").msgclass + TextAnnotation::DetectedBreak = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.TextAnnotation.DetectedBreak").msgclass + TextAnnotation::DetectedBreak::BreakType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType").enummodule + TextAnnotation::TextProperty = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.TextAnnotation.TextProperty").msgclass + Page = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Page").msgclass + Block = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Block").msgclass + Block::BlockType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Block.BlockType").enummodule + Paragraph = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Paragraph").msgclass + Word = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Word").msgclass + Symbol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Symbol").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/version.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/version.rb new file mode 100644 index 000000000000..85824890f02d --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/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 Vision + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/web_detection_pb.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/web_detection_pb.rb new file mode 100644 index 000000000000..148850eeea96 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/web_detection_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/vision/v1/web_detection.proto + +require 'google/protobuf' + + +descriptor_data = "\n*google/cloud/vision/v1/web_detection.proto\x12\x16google.cloud.vision.v1\"\xd4\x06\n\x0cWebDetection\x12\x44\n\x0cweb_entities\x18\x01 \x03(\x0b\x32..google.cloud.vision.v1.WebDetection.WebEntity\x12K\n\x14\x66ull_matching_images\x18\x02 \x03(\x0b\x32-.google.cloud.vision.v1.WebDetection.WebImage\x12N\n\x17partial_matching_images\x18\x03 \x03(\x0b\x32-.google.cloud.vision.v1.WebDetection.WebImage\x12P\n\x1apages_with_matching_images\x18\x04 \x03(\x0b\x32,.google.cloud.vision.v1.WebDetection.WebPage\x12N\n\x17visually_similar_images\x18\x06 \x03(\x0b\x32-.google.cloud.vision.v1.WebDetection.WebImage\x12H\n\x11\x62\x65st_guess_labels\x18\x08 \x03(\x0b\x32-.google.cloud.vision.v1.WebDetection.WebLabel\x1a\x42\n\tWebEntity\x12\x11\n\tentity_id\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x02\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x1a&\n\x08WebImage\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x02\x1a\xd6\x01\n\x07WebPage\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x02\x12\x12\n\npage_title\x18\x03 \x01(\t\x12K\n\x14\x66ull_matching_images\x18\x04 \x03(\x0b\x32-.google.cloud.vision.v1.WebDetection.WebImage\x12N\n\x17partial_matching_images\x18\x05 \x03(\x0b\x32-.google.cloud.vision.v1.WebDetection.WebImage\x1a\x30\n\x08WebLabel\x12\r\n\x05label\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\tBr\n\x1a\x63om.google.cloud.vision.v1B\x11WebDetectionProtoP\x01Z5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Vision + module V1 + WebDetection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.WebDetection").msgclass + WebDetection::WebEntity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.WebDetection.WebEntity").msgclass + WebDetection::WebImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.WebDetection.WebImage").msgclass + WebDetection::WebPage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.WebDetection.WebPage").msgclass + WebDetection::WebLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.WebDetection.WebLabel").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-vision-v1/proto_docs/README.md new file mode 100644 index 000000000000..3a71b88aaa8b --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Vision 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-vision-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # 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. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + # + # Example: + # + # 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 + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # 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 + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # 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 + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-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-vision-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-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-vision-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-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-vision-v1/proto_docs/google/cloud/vision/v1/geometry.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/geometry.rb new file mode 100644 index 000000000000..11ed57dd523a --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/geometry.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 Vision + module V1 + # A vertex represents a 2D point in the image. + # NOTE: the vertex coordinates are in the same scale as the original image. + # @!attribute [rw] x + # @return [::Integer] + # X coordinate. + # @!attribute [rw] y + # @return [::Integer] + # Y coordinate. + class Vertex + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A vertex represents a 2D point in the image. + # NOTE: the normalized vertex coordinates are relative to the original image + # and range from 0 to 1. + # @!attribute [rw] x + # @return [::Float] + # X coordinate. + # @!attribute [rw] y + # @return [::Float] + # Y coordinate. + class NormalizedVertex + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A bounding polygon for the detected image annotation. + # @!attribute [rw] vertices + # @return [::Array<::Google::Cloud::Vision::V1::Vertex>] + # The bounding polygon vertices. + # @!attribute [rw] normalized_vertices + # @return [::Array<::Google::Cloud::Vision::V1::NormalizedVertex>] + # The bounding polygon normalized vertices. + class BoundingPoly + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A 3D position in the image, used primarily for Face detection landmarks. + # A valid Position must have both x and y coordinates. + # The position coordinates are in the same scale as the original image. + # @!attribute [rw] x + # @return [::Float] + # X coordinate. + # @!attribute [rw] y + # @return [::Float] + # Y coordinate. + # @!attribute [rw] z + # @return [::Float] + # Z coordinate (or depth). + class Position + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/image_annotator.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/image_annotator.rb new file mode 100644 index 000000000000..44f3e06e82cd --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/image_annotator.rb @@ -0,0 +1,1126 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Vision + module V1 + # The type of Google Cloud Vision API detection to perform, and the maximum + # number of results to return for that type. Multiple `Feature` objects can + # be specified in the `features` list. + # @!attribute [rw] type + # @return [::Google::Cloud::Vision::V1::Feature::Type] + # The feature type. + # @!attribute [rw] max_results + # @return [::Integer] + # Maximum number of results of this type. Does not apply to + # `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. + # @!attribute [rw] model + # @return [::String] + # Model to use for the feature. + # Supported values: "builtin/stable" (the default if unset) and + # "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also + # support "builtin/weekly" for the bleeding edge release updated weekly. + class Feature + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of Google Cloud Vision API feature to be extracted. + module Type + # Unspecified feature type. + TYPE_UNSPECIFIED = 0 + + # Run face detection. + FACE_DETECTION = 1 + + # Run landmark detection. + LANDMARK_DETECTION = 2 + + # Run logo detection. + LOGO_DETECTION = 3 + + # Run label detection. + LABEL_DETECTION = 4 + + # Run text detection / optical character recognition (OCR). Text detection + # is optimized for areas of text within a larger image; if the image is + # a document, use `DOCUMENT_TEXT_DETECTION` instead. + TEXT_DETECTION = 5 + + # Run dense text document OCR. Takes precedence when both + # `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present. + DOCUMENT_TEXT_DETECTION = 11 + + # Run Safe Search to detect potentially unsafe + # or undesirable content. + SAFE_SEARCH_DETECTION = 6 + + # Compute a set of image properties, such as the + # image's dominant colors. + IMAGE_PROPERTIES = 7 + + # Run crop hints. + CROP_HINTS = 9 + + # Run web detection. + WEB_DETECTION = 10 + + # Run Product Search. + PRODUCT_SEARCH = 12 + + # Run localizer for object detection. + OBJECT_LOCALIZATION = 19 + end + end + + # External image source (Google Cloud Storage or web URL image location). + # @!attribute [rw] gcs_image_uri + # @return [::String] + # **Use `image_uri` instead.** + # + # The Google Cloud Storage URI of the form + # `gs://bucket_name/object_name`. Object versioning is not supported. See + # [Google Cloud Storage Request + # URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. + # @!attribute [rw] image_uri + # @return [::String] + # The URI of the source image. Can be either: + # + # 1. A Google Cloud Storage URI of the form + # `gs://bucket_name/object_name`. Object versioning is not supported. See + # [Google Cloud Storage Request + # URIs](https://cloud.google.com/storage/docs/reference-uris) for more + # info. + # + # 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from + # HTTP/HTTPS URLs, Google cannot guarantee that the request will be + # completed. Your request may fail if the specified host denies the + # request (e.g. due to request throttling or DOS prevention), or if Google + # throttles requests to the site for abuse prevention. You should not + # depend on externally-hosted images for production applications. + # + # When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes + # precedence. + class ImageSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Client image to perform Google Cloud Vision API tasks over. + # @!attribute [rw] content + # @return [::String] + # Image content, represented as a stream of bytes. + # Note: As with all `bytes` fields, protobuffers use a pure binary + # representation, whereas JSON representations use base64. + # + # Currently, this field only works for BatchAnnotateImages requests. It does + # not work for AsyncBatchAnnotateImages requests. + # @!attribute [rw] source + # @return [::Google::Cloud::Vision::V1::ImageSource] + # Google Cloud Storage image location, or publicly-accessible image + # URL. If both `content` and `source` are provided for an image, `content` + # takes precedence and is used to perform the image annotation request. + class Image + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A face annotation object contains the results of face detection. + # @!attribute [rw] bounding_poly + # @return [::Google::Cloud::Vision::V1::BoundingPoly] + # The bounding polygon around the face. The coordinates of the bounding box + # are in the original image's scale. + # The bounding box is computed to "frame" the face in accordance with human + # expectations. It is based on the landmarker results. + # Note that one or more x and/or y coordinates may not be generated in the + # `BoundingPoly` (the polygon will be unbounded) if only a partial face + # appears in the image to be annotated. + # @!attribute [rw] fd_bounding_poly + # @return [::Google::Cloud::Vision::V1::BoundingPoly] + # The `fd_bounding_poly` bounding polygon is tighter than the + # `boundingPoly`, and encloses only the skin part of the face. Typically, it + # is used to eliminate the face from any image analysis that detects the + # "amount of skin" visible in an image. It is not based on the + # landmarker results, only on the initial face detection, hence + # the fd (face detection) prefix. + # @!attribute [rw] landmarks + # @return [::Array<::Google::Cloud::Vision::V1::FaceAnnotation::Landmark>] + # Detected face landmarks. + # @!attribute [rw] roll_angle + # @return [::Float] + # Roll angle, which indicates the amount of clockwise/anti-clockwise rotation + # of the face relative to the image vertical about the axis perpendicular to + # the face. Range [-180,180]. + # @!attribute [rw] pan_angle + # @return [::Float] + # Yaw angle, which indicates the leftward/rightward angle that the face is + # pointing relative to the vertical plane perpendicular to the image. Range + # [-180,180]. + # @!attribute [rw] tilt_angle + # @return [::Float] + # Pitch angle, which indicates the upwards/downwards angle that the face is + # pointing relative to the image's horizontal plane. Range [-180,180]. + # @!attribute [rw] detection_confidence + # @return [::Float] + # Detection confidence. Range [0, 1]. + # @!attribute [rw] landmarking_confidence + # @return [::Float] + # Face landmarking confidence. Range [0, 1]. + # @!attribute [rw] joy_likelihood + # @return [::Google::Cloud::Vision::V1::Likelihood] + # Joy likelihood. + # @!attribute [rw] sorrow_likelihood + # @return [::Google::Cloud::Vision::V1::Likelihood] + # Sorrow likelihood. + # @!attribute [rw] anger_likelihood + # @return [::Google::Cloud::Vision::V1::Likelihood] + # Anger likelihood. + # @!attribute [rw] surprise_likelihood + # @return [::Google::Cloud::Vision::V1::Likelihood] + # Surprise likelihood. + # @!attribute [rw] under_exposed_likelihood + # @return [::Google::Cloud::Vision::V1::Likelihood] + # Under-exposed likelihood. + # @!attribute [rw] blurred_likelihood + # @return [::Google::Cloud::Vision::V1::Likelihood] + # Blurred likelihood. + # @!attribute [rw] headwear_likelihood + # @return [::Google::Cloud::Vision::V1::Likelihood] + # Headwear likelihood. + class FaceAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A face-specific landmark (for example, a face feature). + # @!attribute [rw] type + # @return [::Google::Cloud::Vision::V1::FaceAnnotation::Landmark::Type] + # Face landmark type. + # @!attribute [rw] position + # @return [::Google::Cloud::Vision::V1::Position] + # Face landmark position. + class Landmark + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Face landmark (feature) type. + # Left and right are defined from the vantage of the viewer of the image + # without considering mirror projections typical of photos. So, `LEFT_EYE`, + # typically, is the person's right eye. + module Type + # Unknown face landmark detected. Should not be filled. + UNKNOWN_LANDMARK = 0 + + # Left eye. + LEFT_EYE = 1 + + # Right eye. + RIGHT_EYE = 2 + + # Left of left eyebrow. + LEFT_OF_LEFT_EYEBROW = 3 + + # Right of left eyebrow. + RIGHT_OF_LEFT_EYEBROW = 4 + + # Left of right eyebrow. + LEFT_OF_RIGHT_EYEBROW = 5 + + # Right of right eyebrow. + RIGHT_OF_RIGHT_EYEBROW = 6 + + # Midpoint between eyes. + MIDPOINT_BETWEEN_EYES = 7 + + # Nose tip. + NOSE_TIP = 8 + + # Upper lip. + UPPER_LIP = 9 + + # Lower lip. + LOWER_LIP = 10 + + # Mouth left. + MOUTH_LEFT = 11 + + # Mouth right. + MOUTH_RIGHT = 12 + + # Mouth center. + MOUTH_CENTER = 13 + + # Nose, bottom right. + NOSE_BOTTOM_RIGHT = 14 + + # Nose, bottom left. + NOSE_BOTTOM_LEFT = 15 + + # Nose, bottom center. + NOSE_BOTTOM_CENTER = 16 + + # Left eye, top boundary. + LEFT_EYE_TOP_BOUNDARY = 17 + + # Left eye, right corner. + LEFT_EYE_RIGHT_CORNER = 18 + + # Left eye, bottom boundary. + LEFT_EYE_BOTTOM_BOUNDARY = 19 + + # Left eye, left corner. + LEFT_EYE_LEFT_CORNER = 20 + + # Right eye, top boundary. + RIGHT_EYE_TOP_BOUNDARY = 21 + + # Right eye, right corner. + RIGHT_EYE_RIGHT_CORNER = 22 + + # Right eye, bottom boundary. + RIGHT_EYE_BOTTOM_BOUNDARY = 23 + + # Right eye, left corner. + RIGHT_EYE_LEFT_CORNER = 24 + + # Left eyebrow, upper midpoint. + LEFT_EYEBROW_UPPER_MIDPOINT = 25 + + # Right eyebrow, upper midpoint. + RIGHT_EYEBROW_UPPER_MIDPOINT = 26 + + # Left ear tragion. + LEFT_EAR_TRAGION = 27 + + # Right ear tragion. + RIGHT_EAR_TRAGION = 28 + + # Left eye pupil. + LEFT_EYE_PUPIL = 29 + + # Right eye pupil. + RIGHT_EYE_PUPIL = 30 + + # Forehead glabella. + FOREHEAD_GLABELLA = 31 + + # Chin gnathion. + CHIN_GNATHION = 32 + + # Chin left gonion. + CHIN_LEFT_GONION = 33 + + # Chin right gonion. + CHIN_RIGHT_GONION = 34 + + # Left cheek center. + LEFT_CHEEK_CENTER = 35 + + # Right cheek center. + RIGHT_CHEEK_CENTER = 36 + end + end + end + + # Detected entity location information. + # @!attribute [rw] lat_lng + # @return [::Google::Type::LatLng] + # lat/long location coordinates. + class LocationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A `Property` consists of a user-supplied name/value pair. + # @!attribute [rw] name + # @return [::String] + # Name of the property. + # @!attribute [rw] value + # @return [::String] + # Value of the property. + # @!attribute [rw] uint64_value + # @return [::Integer] + # Value of numeric properties. + class Property + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Set of detected entity features. + # @!attribute [rw] mid + # @return [::String] + # Opaque entity ID. Some IDs may be available in + # [Google Knowledge Graph Search + # API](https://developers.google.com/knowledge-graph/). + # @!attribute [rw] locale + # @return [::String] + # The language code for the locale in which the entity textual + # `description` is expressed. + # @!attribute [rw] description + # @return [::String] + # Entity textual description, expressed in its `locale` language. + # @!attribute [rw] score + # @return [::Float] + # Overall score of the result. Range [0, 1]. + # @!attribute [rw] confidence + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Float] + # **Deprecated. Use `score` instead.** + # The accuracy of the entity detection in an image. + # For example, for an image in which the "Eiffel Tower" entity is detected, + # this field represents the confidence that there is a tower in the query + # image. Range [0, 1]. + # @!attribute [rw] topicality + # @return [::Float] + # The relevancy of the ICA (Image Content Annotation) label to the + # image. For example, the relevancy of "tower" is likely higher to an image + # containing the detected "Eiffel Tower" than to an image containing a + # detected distant towering building, even though the confidence that + # there is a tower in each image may be the same. Range [0, 1]. + # @!attribute [rw] bounding_poly + # @return [::Google::Cloud::Vision::V1::BoundingPoly] + # Image region to which this entity belongs. Not produced + # for `LABEL_DETECTION` features. + # @!attribute [rw] locations + # @return [::Array<::Google::Cloud::Vision::V1::LocationInfo>] + # The location information for the detected entity. Multiple + # `LocationInfo` elements can be present because one location may + # indicate the location of the scene in the image, and another location + # may indicate the location of the place where the image was taken. + # Location information is usually present for landmarks. + # @!attribute [rw] properties + # @return [::Array<::Google::Cloud::Vision::V1::Property>] + # Some entities may have optional user-supplied `Property` (name/value) + # fields, such a score or string that qualifies the entity. + class EntityAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Set of detected objects with bounding boxes. + # @!attribute [rw] mid + # @return [::String] + # Object ID that should align with EntityAnnotation mid. + # @!attribute [rw] language_code + # @return [::String] + # The BCP-47 language code, such as "en-US" or "sr-Latn". For more + # information, see + # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + # @!attribute [rw] name + # @return [::String] + # Object name, expressed in its `language_code` language. + # @!attribute [rw] score + # @return [::Float] + # Score of the result. Range [0, 1]. + # @!attribute [rw] bounding_poly + # @return [::Google::Cloud::Vision::V1::BoundingPoly] + # Image region to which this object belongs. This must be populated. + class LocalizedObjectAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Set of features pertaining to the image, computed by computer vision + # methods over safe-search verticals (for example, adult, spoof, medical, + # violence). + # @!attribute [rw] adult + # @return [::Google::Cloud::Vision::V1::Likelihood] + # Represents the adult content likelihood for the image. Adult content may + # contain elements such as nudity, pornographic images or cartoons, or + # sexual activities. + # @!attribute [rw] spoof + # @return [::Google::Cloud::Vision::V1::Likelihood] + # Spoof likelihood. The likelihood that an modification + # was made to the image's canonical version to make it appear + # funny or offensive. + # @!attribute [rw] medical + # @return [::Google::Cloud::Vision::V1::Likelihood] + # Likelihood that this is a medical image. + # @!attribute [rw] violence + # @return [::Google::Cloud::Vision::V1::Likelihood] + # Likelihood that this image contains violent content. Violent content may + # include death, serious harm, or injury to individuals or groups of + # individuals. + # @!attribute [rw] racy + # @return [::Google::Cloud::Vision::V1::Likelihood] + # Likelihood that the request image contains racy content. Racy content may + # include (but is not limited to) skimpy or sheer clothing, strategically + # covered nudity, lewd or provocative poses, or close-ups of sensitive + # body areas. + class SafeSearchAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Rectangle determined by min and max `LatLng` pairs. + # @!attribute [rw] min_lat_lng + # @return [::Google::Type::LatLng] + # Min lat/long pair. + # @!attribute [rw] max_lat_lng + # @return [::Google::Type::LatLng] + # Max lat/long pair. + class LatLongRect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Color information consists of RGB channels, score, and the fraction of + # the image that the color occupies in the image. + # @!attribute [rw] color + # @return [::Google::Type::Color] + # RGB components of the color. + # @!attribute [rw] score + # @return [::Float] + # Image-specific score for this color. Value in range [0, 1]. + # @!attribute [rw] pixel_fraction + # @return [::Float] + # The fraction of pixels the color occupies in the image. + # Value in range [0, 1]. + class ColorInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Set of dominant colors and their corresponding scores. + # @!attribute [rw] colors + # @return [::Array<::Google::Cloud::Vision::V1::ColorInfo>] + # RGB color values with their score and pixel fraction. + class DominantColorsAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Stores image properties, such as dominant colors. + # @!attribute [rw] dominant_colors + # @return [::Google::Cloud::Vision::V1::DominantColorsAnnotation] + # If present, dominant colors completed successfully. + class ImageProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Single crop hint that is used to generate a new crop when serving an image. + # @!attribute [rw] bounding_poly + # @return [::Google::Cloud::Vision::V1::BoundingPoly] + # The bounding polygon for the crop region. The coordinates of the bounding + # box are in the original image's scale. + # @!attribute [rw] confidence + # @return [::Float] + # Confidence of this being a salient region. Range [0, 1]. + # @!attribute [rw] importance_fraction + # @return [::Float] + # Fraction of importance of this salient region with respect to the original + # image. + class CropHint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Set of crop hints that are used to generate new crops when serving images. + # @!attribute [rw] crop_hints + # @return [::Array<::Google::Cloud::Vision::V1::CropHint>] + # Crop hint results. + class CropHintsAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Parameters for crop hints annotation request. + # @!attribute [rw] aspect_ratios + # @return [::Array<::Float>] + # Aspect ratios in floats, representing the ratio of the width to the height + # of the image. For example, if the desired aspect ratio is 4/3, the + # corresponding float value should be 1.33333. If not specified, the + # best possible crop is returned. The number of provided aspect ratios is + # limited to a maximum of 16; any aspect ratios provided after the 16th are + # ignored. + class CropHintsParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Parameters for web detection request. + # @!attribute [rw] include_geo_results + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Boolean] + # This field has no effect on results. + class WebDetectionParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Parameters for text detections. This is used to control TEXT_DETECTION and + # DOCUMENT_TEXT_DETECTION features. + # @!attribute [rw] enable_text_detection_confidence_score + # @return [::Boolean] + # By default, Cloud Vision API only includes confidence score for + # DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence + # score for TEXT_DETECTION as well. + # @!attribute [rw] advanced_ocr_options + # @return [::Array<::String>] + # A list of advanced OCR options to further fine-tune OCR behavior. + # Current valid values are: + # + # - `legacy_layout`: a heuristics layout detection algorithm, which serves as + # an alternative to the current ML-based layout detection algorithm. + # Customers can choose the best suitable layout algorithm based on their + # situation. + class TextDetectionParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Image context and/or feature-specific parameters. + # @!attribute [rw] lat_long_rect + # @return [::Google::Cloud::Vision::V1::LatLongRect] + # Not used. + # @!attribute [rw] language_hints + # @return [::Array<::String>] + # List of languages to use for TEXT_DETECTION. In most cases, an empty value + # yields the best results since it enables automatic language detection. For + # languages based on the Latin alphabet, setting `language_hints` is not + # needed. In rare cases, when the language of the text in the image is known, + # setting a hint will help get better results (although it will be a + # significant hindrance if the hint is wrong). Text detection returns an + # error if one or more of the specified languages is not one of the + # [supported languages](https://cloud.google.com/vision/docs/languages). + # @!attribute [rw] crop_hints_params + # @return [::Google::Cloud::Vision::V1::CropHintsParams] + # Parameters for crop hints annotation request. + # @!attribute [rw] product_search_params + # @return [::Google::Cloud::Vision::V1::ProductSearchParams] + # Parameters for product search. + # @!attribute [rw] web_detection_params + # @return [::Google::Cloud::Vision::V1::WebDetectionParams] + # Parameters for web detection. + # @!attribute [rw] text_detection_params + # @return [::Google::Cloud::Vision::V1::TextDetectionParams] + # Parameters for text detection and document text detection. + class ImageContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for performing Google Cloud Vision API tasks over a user-provided + # image, with user-requested features, and with context information. + # @!attribute [rw] image + # @return [::Google::Cloud::Vision::V1::Image] + # The image to be processed. + # @!attribute [rw] features + # @return [::Array<::Google::Cloud::Vision::V1::Feature>] + # Requested features. + # @!attribute [rw] image_context + # @return [::Google::Cloud::Vision::V1::ImageContext] + # Additional context that may accompany the image. + class AnnotateImageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # If an image was produced from a file (e.g. a PDF), this message gives + # information about the source of that image. + # @!attribute [rw] uri + # @return [::String] + # The URI of the file used to produce the image. + # @!attribute [rw] page_number + # @return [::Integer] + # If the file was a PDF or TIFF, this field gives the page number within + # the file used to produce the image. + class ImageAnnotationContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response to an image annotation request. + # @!attribute [rw] face_annotations + # @return [::Array<::Google::Cloud::Vision::V1::FaceAnnotation>] + # If present, face detection has completed successfully. + # @!attribute [rw] landmark_annotations + # @return [::Array<::Google::Cloud::Vision::V1::EntityAnnotation>] + # If present, landmark detection has completed successfully. + # @!attribute [rw] logo_annotations + # @return [::Array<::Google::Cloud::Vision::V1::EntityAnnotation>] + # If present, logo detection has completed successfully. + # @!attribute [rw] label_annotations + # @return [::Array<::Google::Cloud::Vision::V1::EntityAnnotation>] + # If present, label detection has completed successfully. + # @!attribute [rw] localized_object_annotations + # @return [::Array<::Google::Cloud::Vision::V1::LocalizedObjectAnnotation>] + # If present, localized object detection has completed successfully. + # This will be sorted descending by confidence score. + # @!attribute [rw] text_annotations + # @return [::Array<::Google::Cloud::Vision::V1::EntityAnnotation>] + # If present, text (OCR) detection has completed successfully. + # @!attribute [rw] full_text_annotation + # @return [::Google::Cloud::Vision::V1::TextAnnotation] + # If present, text (OCR) detection or document (OCR) text detection has + # completed successfully. + # This annotation provides the structural hierarchy for the OCR detected + # text. + # @!attribute [rw] safe_search_annotation + # @return [::Google::Cloud::Vision::V1::SafeSearchAnnotation] + # If present, safe-search annotation has completed successfully. + # @!attribute [rw] image_properties_annotation + # @return [::Google::Cloud::Vision::V1::ImageProperties] + # If present, image properties were extracted successfully. + # @!attribute [rw] crop_hints_annotation + # @return [::Google::Cloud::Vision::V1::CropHintsAnnotation] + # If present, crop hints have completed successfully. + # @!attribute [rw] web_detection + # @return [::Google::Cloud::Vision::V1::WebDetection] + # If present, web detection has completed successfully. + # @!attribute [rw] product_search_results + # @return [::Google::Cloud::Vision::V1::ProductSearchResults] + # If present, product search has completed successfully. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # If set, represents the error message for the operation. + # Note that filled-in image annotations are guaranteed to be + # correct, even when `error` is set. + # @!attribute [rw] context + # @return [::Google::Cloud::Vision::V1::ImageAnnotationContext] + # If present, contextual information is needed to understand where this image + # comes from. + class AnnotateImageResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Multiple image annotation requests are batched into a single service call. + # @!attribute [rw] requests + # @return [::Array<::Google::Cloud::Vision::V1::AnnotateImageRequest>] + # Required. Individual image annotation requests for this batch. + # @!attribute [rw] parent + # @return [::String] + # Optional. Target project and location to make a call. + # + # Format: `projects/{project-id}/locations/{location-id}`. + # + # If no parent is specified, a region will be chosen automatically. + # + # Supported location-ids: + # `us`: USA country only, + # `asia`: East asia areas, like Japan, Taiwan, + # `eu`: The European Union. + # + # Example: `projects/project-A/locations/eu`. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. + class BatchAnnotateImagesRequest + 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 + + # Response to a batch image annotation request. + # @!attribute [rw] responses + # @return [::Array<::Google::Cloud::Vision::V1::AnnotateImageResponse>] + # Individual responses to image annotation requests within the batch. + class BatchAnnotateImagesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to annotate one single file, e.g. a PDF, TIFF or GIF file. + # @!attribute [rw] input_config + # @return [::Google::Cloud::Vision::V1::InputConfig] + # Required. Information about the input file. + # @!attribute [rw] features + # @return [::Array<::Google::Cloud::Vision::V1::Feature>] + # Required. Requested features. + # @!attribute [rw] image_context + # @return [::Google::Cloud::Vision::V1::ImageContext] + # Additional context that may accompany the image(s) in the file. + # @!attribute [rw] pages + # @return [::Array<::Integer>] + # Pages of the file to perform image annotation. + # + # Pages starts from 1, we assume the first page of the file is page 1. + # At most 5 pages are supported per request. Pages can be negative. + # + # Page 1 means the first page. + # Page 2 means the second page. + # Page -1 means the last page. + # Page -2 means the second to the last page. + # + # If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + # + # If this field is empty, by default the service performs image annotation + # for the first 5 pages of the file. + class AnnotateFileRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response to a single file annotation request. A file may contain one or more + # images, which individually have their own responses. + # @!attribute [rw] input_config + # @return [::Google::Cloud::Vision::V1::InputConfig] + # Information about the file for which this response is generated. + # @!attribute [rw] responses + # @return [::Array<::Google::Cloud::Vision::V1::AnnotateImageResponse>] + # Individual responses to images found within the file. This field will be + # empty if the `error` field is set. + # @!attribute [rw] total_pages + # @return [::Integer] + # This field gives the total number of pages in the file. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # If set, represents the error message for the failed request. The + # `responses` field will not be set in this case. + class AnnotateFileResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A list of requests to annotate files using the BatchAnnotateFiles API. + # @!attribute [rw] requests + # @return [::Array<::Google::Cloud::Vision::V1::AnnotateFileRequest>] + # Required. The list of file annotation requests. Right now we support only + # one AnnotateFileRequest in BatchAnnotateFilesRequest. + # @!attribute [rw] parent + # @return [::String] + # Optional. Target project and location to make a call. + # + # Format: `projects/{project-id}/locations/{location-id}`. + # + # If no parent is specified, a region will be chosen automatically. + # + # Supported location-ids: + # `us`: USA country only, + # `asia`: East asia areas, like Japan, Taiwan, + # `eu`: The European Union. + # + # Example: `projects/project-A/locations/eu`. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. + class BatchAnnotateFilesRequest + 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 list of file annotation responses. + # @!attribute [rw] responses + # @return [::Array<::Google::Cloud::Vision::V1::AnnotateFileResponse>] + # The list of file annotation responses, each response corresponding to each + # AnnotateFileRequest in BatchAnnotateFilesRequest. + class BatchAnnotateFilesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An offline file annotation request. + # @!attribute [rw] input_config + # @return [::Google::Cloud::Vision::V1::InputConfig] + # Required. Information about the input file. + # @!attribute [rw] features + # @return [::Array<::Google::Cloud::Vision::V1::Feature>] + # Required. Requested features. + # @!attribute [rw] image_context + # @return [::Google::Cloud::Vision::V1::ImageContext] + # Additional context that may accompany the image(s) in the file. + # @!attribute [rw] output_config + # @return [::Google::Cloud::Vision::V1::OutputConfig] + # Required. The desired output location and metadata (e.g. format). + class AsyncAnnotateFileRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for a single offline file annotation request. + # @!attribute [rw] output_config + # @return [::Google::Cloud::Vision::V1::OutputConfig] + # The output location and metadata from AsyncAnnotateFileRequest. + class AsyncAnnotateFileResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for async image annotation for a list of images. + # @!attribute [rw] requests + # @return [::Array<::Google::Cloud::Vision::V1::AnnotateImageRequest>] + # Required. Individual image annotation requests for this batch. + # @!attribute [rw] output_config + # @return [::Google::Cloud::Vision::V1::OutputConfig] + # Required. The desired output location and metadata (e.g. format). + # @!attribute [rw] parent + # @return [::String] + # Optional. Target project and location to make a call. + # + # Format: `projects/{project-id}/locations/{location-id}`. + # + # If no parent is specified, a region will be chosen automatically. + # + # Supported location-ids: + # `us`: USA country only, + # `asia`: East asia areas, like Japan, Taiwan, + # `eu`: The European Union. + # + # Example: `projects/project-A/locations/eu`. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. + class AsyncBatchAnnotateImagesRequest + 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 + + # Response to an async batch image annotation request. + # @!attribute [rw] output_config + # @return [::Google::Cloud::Vision::V1::OutputConfig] + # The output location and metadata from AsyncBatchAnnotateImagesRequest. + class AsyncBatchAnnotateImagesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Multiple async file annotation requests are batched into a single service + # call. + # @!attribute [rw] requests + # @return [::Array<::Google::Cloud::Vision::V1::AsyncAnnotateFileRequest>] + # Required. Individual async file annotation requests for this batch. + # @!attribute [rw] parent + # @return [::String] + # Optional. Target project and location to make a call. + # + # Format: `projects/{project-id}/locations/{location-id}`. + # + # If no parent is specified, a region will be chosen automatically. + # + # Supported location-ids: + # `us`: USA country only, + # `asia`: East asia areas, like Japan, Taiwan, + # `eu`: The European Union. + # + # Example: `projects/project-A/locations/eu`. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints), can only contain lowercase letters, numeric + # characters, underscores and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. + class AsyncBatchAnnotateFilesRequest + 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 + + # Response to an async batch file annotation request. + # @!attribute [rw] responses + # @return [::Array<::Google::Cloud::Vision::V1::AsyncAnnotateFileResponse>] + # The list of file annotation responses, one for each request in + # AsyncBatchAnnotateFilesRequest. + class AsyncBatchAnnotateFilesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The desired input location and metadata. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::Vision::V1::GcsSource] + # The Google Cloud Storage location to read the input from. + # @!attribute [rw] content + # @return [::String] + # File content, represented as a stream of bytes. + # Note: As with all `bytes` fields, protobuffers use a pure binary + # representation, whereas JSON representations use base64. + # + # Currently, this field only works for BatchAnnotateFiles requests. It does + # not work for AsyncBatchAnnotateFiles requests. + # @!attribute [rw] mime_type + # @return [::String] + # The type of the file. Currently only "application/pdf", "image/tiff" and + # "image/gif" are supported. Wildcards are not supported. + class InputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The desired output location and metadata. + # @!attribute [rw] gcs_destination + # @return [::Google::Cloud::Vision::V1::GcsDestination] + # The Google Cloud Storage location to write the output(s) to. + # @!attribute [rw] batch_size + # @return [::Integer] + # The max number of response protos to put into each output JSON file on + # Google Cloud Storage. + # The valid range is [1, 100]. If not specified, the default value is 20. + # + # For example, for one pdf file with 100 pages, 100 response protos will + # be generated. If `batch_size` = 20, then 5 json files each + # containing 20 response protos will be written under the prefix + # `gcs_destination`.`uri`. + # + # Currently, batch_size only applies to GcsDestination, with potential future + # support for other output configurations. + class OutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The Google Cloud Storage location where the input will be read from. + # @!attribute [rw] uri + # @return [::String] + # Google Cloud Storage URI for the input file. This must only be a + # Google Cloud Storage object. Wildcards are not currently supported. + class GcsSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The Google Cloud Storage location where the output will be written to. + # @!attribute [rw] uri + # @return [::String] + # Google Cloud Storage URI prefix where the results will be stored. Results + # will be in JSON format and preceded by its corresponding input URI prefix. + # This field can either represent a gcs file prefix or gcs directory. In + # either case, the uri should be unique because in order to get all of the + # output files, you will need to do a wildcard gcs search on the uri prefix + # you provide. + # + # Examples: + # + # * File Prefix: gs://bucket-name/here/filenameprefix The output files + # will be created in gs://bucket-name/here/ and the names of the + # output files will begin with "filenameprefix". + # + # * Directory Prefix: gs://bucket-name/some/location/ The output files + # will be created in gs://bucket-name/some/location/ and the names of the + # output files could be anything because there was no filename prefix + # specified. + # + # If multiple outputs, each response is still AnnotateFileResponse, each of + # which contains some subset of the full list of AnnotateImageResponse. + # Multiple outputs can happen if, for example, the output JSON is too large + # and overflows into multiple sharded files. + class GcsDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains metadata for the BatchAnnotateImages operation. + # @!attribute [rw] state + # @return [::Google::Cloud::Vision::V1::OperationMetadata::State] + # Current state of the batch operation. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time when the batch request was received. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time when the operation result was last updated. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Batch operation states. + module State + # Invalid. + STATE_UNSPECIFIED = 0 + + # Request is received. + CREATED = 1 + + # Request is actively being processed. + RUNNING = 2 + + # The batch processing is done. + DONE = 3 + + # The batch processing was cancelled. + CANCELLED = 4 + end + end + + # A bucketized representation of likelihood, which is intended to give clients + # highly stable results across model upgrades. + module Likelihood + # Unknown likelihood. + UNKNOWN = 0 + + # It is very unlikely. + VERY_UNLIKELY = 1 + + # It is unlikely. + UNLIKELY = 2 + + # It is possible. + POSSIBLE = 3 + + # It is likely. + LIKELY = 4 + + # It is very likely. + VERY_LIKELY = 5 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/product_search.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/product_search.rb new file mode 100644 index 000000000000..318b05a5cd70 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/product_search.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 Cloud + module Vision + module V1 + # Parameters for a product search request. + # @!attribute [rw] bounding_poly + # @return [::Google::Cloud::Vision::V1::BoundingPoly] + # The bounding polygon around the area of interest in the image. + # If it is not specified, system discretion will be applied. + # @!attribute [rw] product_set + # @return [::String] + # The resource name of a {::Google::Cloud::Vision::V1::ProductSet ProductSet} to + # be searched for similar images. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + # @!attribute [rw] product_categories + # @return [::Array<::String>] + # The list of product categories to search in. Currently, we only consider + # the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", + # "packagedgoods-v1", or "general-v1" should be specified. The legacy + # categories "homegoods", "apparel", and "toys" are still supported but will + # be deprecated. For new products, please use "homegoods-v2", "apparel-v2", + # or "toys-v2" for better product search accuracy. It is recommended to + # migrate existing products to these categories as well. + # @!attribute [rw] filter + # @return [::String] + # The filtering expression. This can be used to restrict search results based + # on Product labels. We currently support an AND of OR of key-value + # expressions, where each expression within an OR must have the same key. An + # '=' should be used to connect the key and value. + # + # For example, "(color = red OR color = blue) AND brand = Google" is + # acceptable, but "(color = red OR brand = Google)" is not acceptable. + # "color: red" is not acceptable because it uses a ':' instead of an '='. + class ProductSearchParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Results for a product search request. + # @!attribute [rw] index_time + # @return [::Google::Protobuf::Timestamp] + # Timestamp of the index which provided these results. Products added to the + # product set and products removed from the product set after this time are + # not reflected in the current results. + # @!attribute [rw] results + # @return [::Array<::Google::Cloud::Vision::V1::ProductSearchResults::Result>] + # List of results, one for each product match. + # @!attribute [rw] product_grouped_results + # @return [::Array<::Google::Cloud::Vision::V1::ProductSearchResults::GroupedResult>] + # List of results grouped by products detected in the query image. Each entry + # corresponds to one bounding polygon in the query image, and contains the + # matching products specific to that region. There may be duplicate product + # matches in the union of all the per-product results. + class ProductSearchResults + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information about a product. + # @!attribute [rw] product + # @return [::Google::Cloud::Vision::V1::Product] + # The Product. + # @!attribute [rw] score + # @return [::Float] + # A confidence level on the match, ranging from 0 (no confidence) to + # 1 (full confidence). + # @!attribute [rw] image + # @return [::String] + # The resource name of the image from the product that is the closest match + # to the query. + class Result + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Prediction for what the object in the bounding box is. + # @!attribute [rw] mid + # @return [::String] + # Object ID that should align with EntityAnnotation mid. + # @!attribute [rw] language_code + # @return [::String] + # The BCP-47 language code, such as "en-US" or "sr-Latn". For more + # information, see + # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + # @!attribute [rw] name + # @return [::String] + # Object name, expressed in its `language_code` language. + # @!attribute [rw] score + # @return [::Float] + # Score of the result. Range [0, 1]. + class ObjectAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about the products similar to a single product in a query + # image. + # @!attribute [rw] bounding_poly + # @return [::Google::Cloud::Vision::V1::BoundingPoly] + # The bounding polygon around the product detected in the query image. + # @!attribute [rw] results + # @return [::Array<::Google::Cloud::Vision::V1::ProductSearchResults::Result>] + # List of results, one for each product match. + # @!attribute [rw] object_annotations + # @return [::Array<::Google::Cloud::Vision::V1::ProductSearchResults::ObjectAnnotation>] + # List of generic predictions for the object in the bounding box. + class GroupedResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/product_search_service.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/product_search_service.rb new file mode 100644 index 000000000000..eda363febf12 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/product_search_service.rb @@ -0,0 +1,678 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Vision + module V1 + # A Product contains ReferenceImages. + # @!attribute [rw] name + # @return [::String] + # The resource name of the product. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + # + # This field is ignored when creating a product. + # @!attribute [rw] display_name + # @return [::String] + # The user-provided name for this Product. Must not be empty. Must be at most + # 4096 characters long. + # @!attribute [rw] description + # @return [::String] + # User-provided metadata to be stored with this product. Must be at most 4096 + # characters long. + # @!attribute [rw] product_category + # @return [::String] + # Immutable. The category for the product identified by the reference image. + # This should be one of "homegoods-v2", "apparel-v2", "toys-v2", + # "packagedgoods-v1" or "general-v1". The legacy categories "homegoods", + # "apparel", and "toys" are still supported, but these should not be used for + # new products. + # @!attribute [rw] product_labels + # @return [::Array<::Google::Cloud::Vision::V1::Product::KeyValue>] + # Key-value pairs that can be attached to a product. At query time, + # constraints can be specified based on the product_labels. + # + # Note that integer values can be provided as strings, e.g. "1199". Only + # strings with integer values can match a range-based restriction which is + # to be supported soon. + # + # Multiple values can be assigned to the same key. One product may have up to + # 500 product_labels. + # + # Notice that the total number of distinct product_labels over all products + # in one ProductSet cannot exceed 1M, otherwise the product search pipeline + # will refuse to work for that ProductSet. + class Product + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A product label represented as a key-value pair. + # @!attribute [rw] key + # @return [::String] + # The key of the label attached to the product. Cannot be empty and cannot + # exceed 128 bytes. + # @!attribute [rw] value + # @return [::String] + # The value of the label attached to the product. Cannot be empty and + # cannot exceed 128 bytes. + class KeyValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A ProductSet contains Products. A ProductSet can contain a maximum of 1 + # million reference images. If the limit is exceeded, periodic indexing will + # fail. + # @!attribute [rw] name + # @return [::String] + # The resource name of the ProductSet. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + # + # This field is ignored when creating a ProductSet. + # @!attribute [rw] display_name + # @return [::String] + # The user-provided name for this ProductSet. Must not be empty. Must be at + # most 4096 characters long. + # @!attribute [r] index_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this ProductSet was last indexed. Query + # results will reflect all updates before this time. If this ProductSet has + # never been indexed, this timestamp is the default value + # "1970-01-01T00:00:00Z". + # + # This field is ignored when creating a ProductSet. + # @!attribute [r] index_error + # @return [::Google::Rpc::Status] + # Output only. If there was an error with indexing the product set, the field + # is populated. + # + # This field is ignored when creating a ProductSet. + class ProductSet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A `ReferenceImage` represents a product image and its associated metadata, + # such as bounding boxes. + # @!attribute [rw] name + # @return [::String] + # The resource name of the reference image. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + # + # This field is ignored when creating a reference image. + # @!attribute [rw] uri + # @return [::String] + # Required. The Google Cloud Storage URI of the reference image. + # + # The URI must start with `gs://`. + # @!attribute [rw] bounding_polys + # @return [::Array<::Google::Cloud::Vision::V1::BoundingPoly>] + # Optional. Bounding polygons around the areas of interest in the reference + # image. If this field is empty, the system will try to detect regions of + # interest. At most 10 bounding polygons will be used. + # + # The provided shape is converted into a non-rotated rectangle. Once + # converted, the small edge of the rectangle must be greater than or equal + # to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 + # is not). + class ReferenceImage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `CreateProduct` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project in which the Product should be created. + # + # Format is + # `projects/PROJECT_ID/locations/LOC_ID`. + # @!attribute [rw] product + # @return [::Google::Cloud::Vision::V1::Product] + # Required. The product to create. + # @!attribute [rw] product_id + # @return [::String] + # A user-supplied resource id for this Product. If set, the server will + # attempt to use this value as the resource id. If it is already in use, an + # error is returned with code ALREADY_EXISTS. Must be at most 128 characters + # long. It cannot contain the character `/`. + class CreateProductRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListProducts` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project OR ProductSet from which Products should be listed. + # + # Format: + # `projects/PROJECT_ID/locations/LOC_ID` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return. Default 10, maximum 100. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token returned from a previous List request, if any. + class ListProductsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListProducts` method. + # @!attribute [rw] products + # @return [::Array<::Google::Cloud::Vision::V1::Product>] + # List of products. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListProductsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetProduct` method. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the Product to get. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + class GetProductRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateProduct` method. + # @!attribute [rw] product + # @return [::Google::Cloud::Vision::V1::Product] + # Required. The Product resource which replaces the one on the server. + # product.name is immutable. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The {::Google::Protobuf::FieldMask FieldMask} that specifies which fields + # to update. + # If update_mask isn't specified, all mutable fields are to be updated. + # Valid mask paths include `product_labels`, `display_name`, and + # `description`. + class UpdateProductRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteProduct` method. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of product to delete. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + class DeleteProductRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `CreateProductSet` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project in which the ProductSet should be created. + # + # Format is `projects/PROJECT_ID/locations/LOC_ID`. + # @!attribute [rw] product_set + # @return [::Google::Cloud::Vision::V1::ProductSet] + # Required. The ProductSet to create. + # @!attribute [rw] product_set_id + # @return [::String] + # A user-supplied resource id for this ProductSet. If set, the server will + # attempt to use this value as the resource id. If it is already in use, an + # error is returned with code ALREADY_EXISTS. Must be at most 128 characters + # long. It cannot contain the character `/`. + class CreateProductSetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListProductSets` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project from which ProductSets should be listed. + # + # Format is `projects/PROJECT_ID/locations/LOC_ID`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return. Default 10, maximum 100. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token returned from a previous List request, if any. + class ListProductSetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListProductSets` method. + # @!attribute [rw] product_sets + # @return [::Array<::Google::Cloud::Vision::V1::ProductSet>] + # List of ProductSets. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListProductSetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetProductSet` method. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the ProductSet to get. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + class GetProductSetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `UpdateProductSet` method. + # @!attribute [rw] product_set + # @return [::Google::Cloud::Vision::V1::ProductSet] + # Required. The ProductSet resource which replaces the one on the server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The {::Google::Protobuf::FieldMask FieldMask} that specifies which fields to + # update. + # If update_mask isn't specified, all mutable fields are to be updated. + # Valid mask path is `display_name`. + class UpdateProductSetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteProductSet` method. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the ProductSet to delete. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + class DeleteProductSetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `CreateReferenceImage` method. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the product in which to create the reference + # image. + # + # Format is + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + # @!attribute [rw] reference_image + # @return [::Google::Cloud::Vision::V1::ReferenceImage] + # Required. The reference image to create. + # If an image ID is specified, it is ignored. + # @!attribute [rw] reference_image_id + # @return [::String] + # A user-supplied resource id for the ReferenceImage to be added. If set, + # the server will attempt to use this value as the resource id. If it is + # already in use, an error is returned with code ALREADY_EXISTS. Must be at + # most 128 characters long. It cannot contain the character `/`. + class CreateReferenceImageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListReferenceImages` method. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the product containing the reference images. + # + # Format is + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return. Default 10, maximum 100. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results to be returned. This is the value + # of `nextPageToken` returned in a previous reference image list request. + # + # Defaults to the first page if not specified. + class ListReferenceImagesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListReferenceImages` method. + # @!attribute [rw] reference_images + # @return [::Array<::Google::Cloud::Vision::V1::ReferenceImage>] + # The list of reference images. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return. Default 10, maximum 100. + # @!attribute [rw] next_page_token + # @return [::String] + # The next_page_token returned from a previous List request, if any. + class ListReferenceImagesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetReferenceImage` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the ReferenceImage to get. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + class GetReferenceImageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteReferenceImage` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the reference image to delete. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` + class DeleteReferenceImageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `AddProductToProductSet` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name for the ProductSet to modify. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + # @!attribute [rw] product + # @return [::String] + # Required. The resource name for the Product to be added to this ProductSet. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + class AddProductToProductSetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `RemoveProductFromProductSet` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name for the ProductSet to modify. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + # @!attribute [rw] product + # @return [::String] + # Required. The resource name for the Product to be removed from this + # ProductSet. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + class RemoveProductFromProductSetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListProductsInProductSet` method. + # @!attribute [rw] name + # @return [::String] + # Required. The ProductSet resource for which to retrieve Products. + # + # Format is: + # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return. Default 10, maximum 100. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token returned from a previous List request, if any. + class ListProductsInProductSetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListProductsInProductSet` method. + # @!attribute [rw] products + # @return [::Array<::Google::Cloud::Vision::V1::Product>] + # The list of Products. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListProductsInProductSetResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The Google Cloud Storage location for a csv file which preserves a list of + # ImportProductSetRequests in each line. + # @!attribute [rw] csv_file_uri + # @return [::String] + # The Google Cloud Storage URI of the input csv file. + # + # The URI must start with `gs://`. + # + # The format of the input csv file should be one image per line. + # In each line, there are 8 columns. + # + # 1. image-uri + # 2. image-id + # 3. product-set-id + # 4. product-id + # 5. product-category + # 6. product-display-name + # 7. labels + # 8. bounding-poly + # + # The `image-uri`, `product-set-id`, `product-id`, and `product-category` + # columns are required. All other columns are optional. + # + # If the `ProductSet` or `Product` specified by the `product-set-id` and + # `product-id` values does not exist, then the system will create a new + # `ProductSet` or `Product` for the image. In this case, the + # `product-display-name` column refers to + # {::Google::Cloud::Vision::V1::Product#display_name display_name}, the + # `product-category` column refers to + # {::Google::Cloud::Vision::V1::Product#product_category product_category}, and + # the `labels` column refers to + # {::Google::Cloud::Vision::V1::Product#product_labels product_labels}. + # + # The `image-id` column is optional but must be unique if provided. If it is + # empty, the system will automatically assign a unique id to the image. + # + # The `product-display-name` column is optional. If it is empty, the system + # sets the {::Google::Cloud::Vision::V1::Product#display_name display_name} field + # for the product to a space (" "). You can update the `display_name` later + # by using the API. + # + # If a `Product` with the specified `product-id` already exists, then the + # system ignores the `product-display-name`, `product-category`, and `labels` + # columns. + # + # The `labels` column (optional) is a line containing a list of + # comma-separated key-value pairs, in the following format: + # + # "key_1=value_1,key_2=value_2,...,key_n=value_n" + # + # The `bounding-poly` column (optional) identifies one region of + # interest from the image in the same manner as `CreateReferenceImage`. If + # you do not specify the `bounding-poly` column, then the system will try to + # detect regions of interest automatically. + # + # At most one `bounding-poly` column is allowed per line. If the image + # contains multiple regions of interest, add a line to the CSV file that + # includes the same product information, and the `bounding-poly` values for + # each region of interest. + # + # The `bounding-poly` column must contain an even number of comma-separated + # numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use + # non-negative integers for absolute bounding polygons, and float values + # in [0, 1] for normalized bounding polygons. + # + # The system will resize the image if the image resolution is too + # large to process (larger than 20MP). + class ImportProductSetsGcsSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The input content for the `ImportProductSets` method. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::Vision::V1::ImportProductSetsGcsSource] + # The Google Cloud Storage location for a csv file which preserves a list + # of ImportProductSetRequests in each line. + class ImportProductSetsInputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ImportProductSets` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project in which the ProductSets should be imported. + # + # Format is `projects/PROJECT_ID/locations/LOC_ID`. + # @!attribute [rw] input_config + # @return [::Google::Cloud::Vision::V1::ImportProductSetsInputConfig] + # Required. The input content for the list of requests. + class ImportProductSetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ImportProductSets` method. + # + # This message is returned by the + # google.longrunning.Operations.GetOperation + # method in the returned + # {::Google::Longrunning::Operation#response google.longrunning.Operation.response} + # field. + # @!attribute [rw] reference_images + # @return [::Array<::Google::Cloud::Vision::V1::ReferenceImage>] + # The list of reference_images that are imported successfully. + # @!attribute [rw] statuses + # @return [::Array<::Google::Rpc::Status>] + # The rpc status for each ImportProductSet request, including both successes + # and errors. + # + # The number of statuses here matches the number of lines in the csv file, + # and statuses[i] stores the success or failure status of processing the i-th + # line of the csv, starting from line 0. + class ImportProductSetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for the batch operations such as the current state. + # + # This is included in the `metadata` field of the `Operation` returned by the + # `GetOperation` call of the `google::longrunning::Operations` service. + # @!attribute [rw] state + # @return [::Google::Cloud::Vision::V1::BatchOperationMetadata::State] + # The current state of the batch operation. + # @!attribute [rw] submit_time + # @return [::Google::Protobuf::Timestamp] + # The time when the batch request was submitted to the server. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time when the batch request is finished and + # {::Google::Longrunning::Operation#done google.longrunning.Operation.done} is + # set to true. + class BatchOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enumerates the possible states that the batch request can be in. + module State + # Invalid. + STATE_UNSPECIFIED = 0 + + # Request is actively being processed. + PROCESSING = 1 + + # The request is done and at least one item has been successfully + # processed. + SUCCESSFUL = 2 + + # The request is done and no item has been successfully processed. + FAILED = 3 + + # The request is done after the longrunning.Operations.CancelOperation has + # been called by the user. Any records that were processed before the + # cancel command are output as specified in the request. + CANCELLED = 4 + end + end + + # Config to control which ProductSet contains the Products to be deleted. + # @!attribute [rw] product_set_id + # @return [::String] + # The ProductSet that contains the Products to delete. If a Product is a + # member of product_set_id in addition to other ProductSets, the Product will + # still be deleted. + class ProductSetPurgeConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `PurgeProducts` method. + # @!attribute [rw] product_set_purge_config + # @return [::Google::Cloud::Vision::V1::ProductSetPurgeConfig] + # Specify which ProductSet contains the Products to be deleted. + # + # Note: The following fields are mutually exclusive: `product_set_purge_config`, `delete_orphan_products`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] delete_orphan_products + # @return [::Boolean] + # If delete_orphan_products is true, all Products that are not in any + # ProductSet will be deleted. + # + # Note: The following fields are mutually exclusive: `delete_orphan_products`, `product_set_purge_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location in which the Products should be deleted. + # + # Format is `projects/PROJECT_ID/locations/LOC_ID`. + # @!attribute [rw] force + # @return [::Boolean] + # The default value is false. Override this value to true to actually perform + # the purge. + class PurgeProductsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/text_annotation.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/text_annotation.rb new file mode 100644 index 000000000000..19520c43fbb9 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/text_annotation.rb @@ -0,0 +1,286 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Vision + module V1 + # TextAnnotation contains a structured representation of OCR extracted text. + # The hierarchy of an OCR extracted text structure is like this: + # TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol + # Each structural component, starting from Page, may further have their own + # properties. Properties describe detected languages, breaks etc.. Please refer + # to the + # {::Google::Cloud::Vision::V1::TextAnnotation::TextProperty TextAnnotation.TextProperty} + # message definition below for more detail. + # @!attribute [rw] pages + # @return [::Array<::Google::Cloud::Vision::V1::Page>] + # List of pages detected by OCR. + # @!attribute [rw] text + # @return [::String] + # UTF-8 text detected on the pages. + class TextAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Detected language for a structural component. + # @!attribute [rw] language_code + # @return [::String] + # The BCP-47 language code, such as "en-US" or "sr-Latn". For more + # information, see + # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + # @!attribute [rw] confidence + # @return [::Float] + # Confidence of detected language. Range [0, 1]. + class DetectedLanguage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Detected start or end of a structural component. + # @!attribute [rw] type + # @return [::Google::Cloud::Vision::V1::TextAnnotation::DetectedBreak::BreakType] + # Detected break type. + # @!attribute [rw] is_prefix + # @return [::Boolean] + # True if break prepends the element. + class DetectedBreak + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum to denote the type of break found. New line, space etc. + module BreakType + # Unknown break label type. + UNKNOWN = 0 + + # Regular space. + SPACE = 1 + + # Sure space (very wide). + SURE_SPACE = 2 + + # Line-wrapping break. + EOL_SURE_SPACE = 3 + + # End-line hyphen that is not present in text; does not co-occur with + # `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`. + HYPHEN = 4 + + # Line break that ends a paragraph. + LINE_BREAK = 5 + end + end + + # Additional information detected on the structural component. + # @!attribute [rw] detected_languages + # @return [::Array<::Google::Cloud::Vision::V1::TextAnnotation::DetectedLanguage>] + # A list of detected languages together with confidence. + # @!attribute [rw] detected_break + # @return [::Google::Cloud::Vision::V1::TextAnnotation::DetectedBreak] + # Detected start or end of a text segment. + class TextProperty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Detected page from OCR. + # @!attribute [rw] property + # @return [::Google::Cloud::Vision::V1::TextAnnotation::TextProperty] + # Additional information detected on the page. + # @!attribute [rw] width + # @return [::Integer] + # Page width. For PDFs the unit is points. For images (including + # TIFFs) the unit is pixels. + # @!attribute [rw] height + # @return [::Integer] + # Page height. For PDFs the unit is points. For images (including + # TIFFs) the unit is pixels. + # @!attribute [rw] blocks + # @return [::Array<::Google::Cloud::Vision::V1::Block>] + # List of blocks of text, images etc on this page. + # @!attribute [rw] confidence + # @return [::Float] + # Confidence of the OCR results on the page. Range [0, 1]. + class Page + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Logical element on the page. + # @!attribute [rw] property + # @return [::Google::Cloud::Vision::V1::TextAnnotation::TextProperty] + # Additional information detected for the block. + # @!attribute [rw] bounding_box + # @return [::Google::Cloud::Vision::V1::BoundingPoly] + # The bounding box for the block. + # The vertices are in the order of top-left, top-right, bottom-right, + # bottom-left. When a rotation of the bounding box is detected the rotation + # is represented as around the top-left corner as defined when the text is + # read in the 'natural' orientation. + # For example: + # + # * when the text is horizontal it might look like: + # + # 0----1 + # | | + # 3----2 + # + # * when it's rotated 180 degrees around the top-left corner it becomes: + # + # 2----3 + # | | + # 1----0 + # + # and the vertex order will still be (0, 1, 2, 3). + # @!attribute [rw] paragraphs + # @return [::Array<::Google::Cloud::Vision::V1::Paragraph>] + # List of paragraphs in this block (if this blocks is of type text). + # @!attribute [rw] block_type + # @return [::Google::Cloud::Vision::V1::Block::BlockType] + # Detected block type (text, image etc) for this block. + # @!attribute [rw] confidence + # @return [::Float] + # Confidence of the OCR results on the block. Range [0, 1]. + class Block + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of a block (text, image etc) as identified by OCR. + module BlockType + # Unknown block type. + UNKNOWN = 0 + + # Regular text block. + TEXT = 1 + + # Table block. + TABLE = 2 + + # Image block. + PICTURE = 3 + + # Horizontal/vertical line box. + RULER = 4 + + # Barcode block. + BARCODE = 5 + end + end + + # Structural unit of text representing a number of words in certain order. + # @!attribute [rw] property + # @return [::Google::Cloud::Vision::V1::TextAnnotation::TextProperty] + # Additional information detected for the paragraph. + # @!attribute [rw] bounding_box + # @return [::Google::Cloud::Vision::V1::BoundingPoly] + # The bounding box for the paragraph. + # The vertices are in the order of top-left, top-right, bottom-right, + # bottom-left. When a rotation of the bounding box is detected the rotation + # is represented as around the top-left corner as defined when the text is + # read in the 'natural' orientation. + # For example: + # * when the text is horizontal it might look like: + # 0----1 + # | | + # 3----2 + # * when it's rotated 180 degrees around the top-left corner it becomes: + # 2----3 + # | | + # 1----0 + # and the vertex order will still be (0, 1, 2, 3). + # @!attribute [rw] words + # @return [::Array<::Google::Cloud::Vision::V1::Word>] + # List of all words in this paragraph. + # @!attribute [rw] confidence + # @return [::Float] + # Confidence of the OCR results for the paragraph. Range [0, 1]. + class Paragraph + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A word representation. + # @!attribute [rw] property + # @return [::Google::Cloud::Vision::V1::TextAnnotation::TextProperty] + # Additional information detected for the word. + # @!attribute [rw] bounding_box + # @return [::Google::Cloud::Vision::V1::BoundingPoly] + # The bounding box for the word. + # The vertices are in the order of top-left, top-right, bottom-right, + # bottom-left. When a rotation of the bounding box is detected the rotation + # is represented as around the top-left corner as defined when the text is + # read in the 'natural' orientation. + # For example: + # * when the text is horizontal it might look like: + # 0----1 + # | | + # 3----2 + # * when it's rotated 180 degrees around the top-left corner it becomes: + # 2----3 + # | | + # 1----0 + # and the vertex order will still be (0, 1, 2, 3). + # @!attribute [rw] symbols + # @return [::Array<::Google::Cloud::Vision::V1::Symbol>] + # List of symbols in the word. + # The order of the symbols follows the natural reading order. + # @!attribute [rw] confidence + # @return [::Float] + # Confidence of the OCR results for the word. Range [0, 1]. + class Word + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A single symbol representation. + # @!attribute [rw] property + # @return [::Google::Cloud::Vision::V1::TextAnnotation::TextProperty] + # Additional information detected for the symbol. + # @!attribute [rw] bounding_box + # @return [::Google::Cloud::Vision::V1::BoundingPoly] + # The bounding box for the symbol. + # The vertices are in the order of top-left, top-right, bottom-right, + # bottom-left. When a rotation of the bounding box is detected the rotation + # is represented as around the top-left corner as defined when the text is + # read in the 'natural' orientation. + # For example: + # * when the text is horizontal it might look like: + # 0----1 + # | | + # 3----2 + # * when it's rotated 180 degrees around the top-left corner it becomes: + # 2----3 + # | | + # 1----0 + # and the vertex order will still be (0, 1, 2, 3). + # @!attribute [rw] text + # @return [::String] + # The actual UTF-8 representation of the symbol. + # @!attribute [rw] confidence + # @return [::Float] + # Confidence of the OCR results for the symbol. Range [0, 1]. + class Symbol + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/web_detection.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/web_detection.rb new file mode 100644 index 000000000000..ec63a93612b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/web_detection.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 Cloud + module Vision + module V1 + # Relevant information for the image from the Internet. + # @!attribute [rw] web_entities + # @return [::Array<::Google::Cloud::Vision::V1::WebDetection::WebEntity>] + # Deduced entities from similar images on the Internet. + # @!attribute [rw] full_matching_images + # @return [::Array<::Google::Cloud::Vision::V1::WebDetection::WebImage>] + # Fully matching images from the Internet. + # Can include resized copies of the query image. + # @!attribute [rw] partial_matching_images + # @return [::Array<::Google::Cloud::Vision::V1::WebDetection::WebImage>] + # Partial matching images from the Internet. + # Those images are similar enough to share some key-point features. For + # example an original image will likely have partial matching for its crops. + # @!attribute [rw] pages_with_matching_images + # @return [::Array<::Google::Cloud::Vision::V1::WebDetection::WebPage>] + # Web pages containing the matching images from the Internet. + # @!attribute [rw] visually_similar_images + # @return [::Array<::Google::Cloud::Vision::V1::WebDetection::WebImage>] + # The visually similar image results. + # @!attribute [rw] best_guess_labels + # @return [::Array<::Google::Cloud::Vision::V1::WebDetection::WebLabel>] + # The service's best guess as to the topic of the request image. + # Inferred from similar images on the open web. + class WebDetection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Entity deduced from similar images on the Internet. + # @!attribute [rw] entity_id + # @return [::String] + # Opaque entity ID. + # @!attribute [rw] score + # @return [::Float] + # Overall relevancy score for the entity. + # Not normalized and not comparable across different image queries. + # @!attribute [rw] description + # @return [::String] + # Canonical description of the entity, in English. + class WebEntity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for online images. + # @!attribute [rw] url + # @return [::String] + # The result image URL. + # @!attribute [rw] score + # @return [::Float] + # (Deprecated) Overall relevancy score for the image. + class WebImage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for web pages. + # @!attribute [rw] url + # @return [::String] + # The result web page URL. + # @!attribute [rw] score + # @return [::Float] + # (Deprecated) Overall relevancy score for the web page. + # @!attribute [rw] page_title + # @return [::String] + # Title for the web page, may contain HTML markups. + # @!attribute [rw] full_matching_images + # @return [::Array<::Google::Cloud::Vision::V1::WebDetection::WebImage>] + # Fully matching images on the page. + # Can include resized copies of the query image. + # @!attribute [rw] partial_matching_images + # @return [::Array<::Google::Cloud::Vision::V1::WebDetection::WebImage>] + # Partial matching images on the page. + # Those images are similar enough to share some key-point features. For + # example an original image will likely have partial matching for its + # crops. + class WebPage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Label to provide extra metadata for the web detection. + # @!attribute [rw] label + # @return [::String] + # Label for extra metadata. + # @!attribute [rw] language_code + # @return [::String] + # The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". + # For more information, see + # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + class WebLabel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-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-vision-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-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-vision-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-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-vision-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-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-vision-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-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-vision-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-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-vision-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..9a7c0269fa42 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/wrappers.rb @@ -0,0 +1,148 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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`. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!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-vision-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-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-vision-v1/proto_docs/google/type/color.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/type/color.rb new file mode 100644 index 000000000000..246dafcb7710 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/type/color.rb @@ -0,0 +1,173 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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 color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness. For example, the fields of this representation + # can be trivially provided to the constructor of `java.awt.Color` in Java; it + # can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` + # method in iOS; and, with just a little work, it can be easily formatted into + # a CSS `rgba()` string in JavaScript. + # + # This reference page doesn't carry information about the absolute color + # space + # that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, + # DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color + # space. + # + # When color equality needs to be decided, implementations, unless + # documented otherwise, treat two colors as equal if all their red, + # green, blue, and alpha values each differ by at most 1e-5. + # + # Example (Java): + # + # import com.google.type.Color; + # + # // ... + # public static java.awt.Color fromProto(Color protocolor) { + # float alpha = protocolor.hasAlpha() + # ? protocolor.getAlpha().getValue() + # : 1.0; + # + # return new java.awt.Color( + # protocolor.getRed(), + # protocolor.getGreen(), + # protocolor.getBlue(), + # alpha); + # } + # + # public static Color toProto(java.awt.Color color) { + # float red = (float) color.getRed(); + # float green = (float) color.getGreen(); + # float blue = (float) color.getBlue(); + # float denominator = 255.0; + # Color.Builder resultBuilder = + # Color + # .newBuilder() + # .setRed(red / denominator) + # .setGreen(green / denominator) + # .setBlue(blue / denominator); + # int alpha = color.getAlpha(); + # if (alpha != 255) { + # result.setAlpha( + # FloatValue + # .newBuilder() + # .setValue(((float) alpha) / denominator) + # .build()); + # } + # return resultBuilder.build(); + # } + # // ... + # + # Example (iOS / Obj-C): + # + # // ... + # static UIColor* fromProto(Color* protocolor) { + # float red = [protocolor red]; + # float green = [protocolor green]; + # float blue = [protocolor blue]; + # FloatValue* alpha_wrapper = [protocolor alpha]; + # float alpha = 1.0; + # if (alpha_wrapper != nil) { + # alpha = [alpha_wrapper value]; + # } + # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; + # } + # + # static Color* toProto(UIColor* color) { + # CGFloat red, green, blue, alpha; + # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { + # return nil; + # } + # Color* result = [[Color alloc] init]; + # [result setRed:red]; + # [result setGreen:green]; + # [result setBlue:blue]; + # if (alpha <= 0.9999) { + # [result setAlpha:floatWrapperWithValue(alpha)]; + # } + # [result autorelease]; + # return result; + # } + # // ... + # + # Example (JavaScript): + # + # // ... + # + # var protoToCssColor = function(rgb_color) { + # var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; + # var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); + # var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); + # + # if (!('alpha' in rgb_color)) { + # return rgbToCssColor(red, green, blue); + # } + # + # var alphaFrac = rgb_color.alpha.value || 0.0; + # var rgbParams = [red, green, blue].join(','); + # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); + # }; + # + # var rgbToCssColor = function(red, green, blue) { + # var rgbNumber = new Number((red << 16) | (green << 8) | blue); + # var hexString = rgbNumber.toString(16); + # var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; + # for (var i = 0; i < missingZeros; i++) { + # resultBuilder.push('0'); + # } + # resultBuilder.push(hexString); + # return resultBuilder.join(''); + # }; + # + # // ... + # @!attribute [rw] red + # @return [::Float] + # The amount of red in the color as a value in the interval [0, 1]. + # @!attribute [rw] green + # @return [::Float] + # The amount of green in the color as a value in the interval [0, 1]. + # @!attribute [rw] blue + # @return [::Float] + # The amount of blue in the color as a value in the interval [0, 1]. + # @!attribute [rw] alpha + # @return [::Google::Protobuf::FloatValue] + # The fraction of this color that should be applied to the pixel. That is, + # the final pixel color is defined by the equation: + # + # `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` + # + # This means that a value of 1.0 corresponds to a solid color, whereas + # a value of 0.0 corresponds to a completely transparent color. This + # uses a wrapper message rather than a simple float scalar so that it is + # possible to distinguish between a default value and the value being unset. + # If omitted, this color object is rendered as a solid color + # (as if the alpha value had been explicitly given a value of 1.0). + class Color + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/type/latlng.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/type/latlng.rb new file mode 100644 index 000000000000..c15e78a39a56 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-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-vision-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-vision-v1/snippets/Gemfile new file mode 100644 index 000000000000..f5b6677dd9b7 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-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-vision-v1", path: "../" +else + gem "google-cloud-vision-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-vision-v1/snippets/image_annotator/async_batch_annotate_files.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/async_batch_annotate_files.rb new file mode 100644 index 000000000000..e83f5c97d0fa --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/async_batch_annotate_files.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 vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync] +require "google/cloud/vision/v1" + +## +# Snippet for the async_batch_annotate_files call in the ImageAnnotator service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Vision::V1::ImageAnnotator::Client#async_batch_annotate_files. +# +def async_batch_annotate_files + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest.new + + # Call the async_batch_annotate_files method. + result = client.async_batch_annotate_files request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/async_batch_annotate_images.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/async_batch_annotate_images.rb new file mode 100644 index 000000000000..dfb3dc749753 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/async_batch_annotate_images.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 vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateImages_sync] +require "google/cloud/vision/v1" + +## +# Snippet for the async_batch_annotate_images call in the ImageAnnotator service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Vision::V1::ImageAnnotator::Client#async_batch_annotate_images. +# +def async_batch_annotate_images + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest.new + + # Call the async_batch_annotate_images method. + result = client.async_batch_annotate_images request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateImages_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/batch_annotate_files.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/batch_annotate_files.rb new file mode 100644 index 000000000000..5fea86a2cde0 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/batch_annotate_files.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 vision_v1_generated_ImageAnnotator_BatchAnnotateFiles_sync] +require "google/cloud/vision/v1" + +## +# Snippet for the batch_annotate_files call in the ImageAnnotator service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Vision::V1::ImageAnnotator::Client#batch_annotate_files. +# +def batch_annotate_files + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Vision::V1::BatchAnnotateFilesRequest.new + + # Call the batch_annotate_files method. + result = client.batch_annotate_files request + + # The returned object is of type Google::Cloud::Vision::V1::BatchAnnotateFilesResponse. + p result +end +# [END vision_v1_generated_ImageAnnotator_BatchAnnotateFiles_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/batch_annotate_images.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/batch_annotate_images.rb new file mode 100644 index 000000000000..0e012c922685 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/batch_annotate_images.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 vision_v1_generated_ImageAnnotator_BatchAnnotateImages_sync] +require "google/cloud/vision/v1" + +## +# Snippet for the batch_annotate_images call in the ImageAnnotator service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Vision::V1::ImageAnnotator::Client#batch_annotate_images. +# +def batch_annotate_images + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Vision::V1::BatchAnnotateImagesRequest.new + + # Call the batch_annotate_images method. + result = client.batch_annotate_images request + + # The returned object is of type Google::Cloud::Vision::V1::BatchAnnotateImagesResponse. + p result +end +# [END vision_v1_generated_ImageAnnotator_BatchAnnotateImages_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/add_product_to_product_set.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/add_product_to_product_set.rb new file mode 100644 index 000000000000..55681168a2ab --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/add_product_to_product_set.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 vision_v1_generated_ProductSearch_AddProductToProductSet_sync] +require "google/cloud/vision/v1" + +## +# Snippet for the add_product_to_product_set call in the ProductSearch service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Vision::V1::ProductSearch::Client#add_product_to_product_set. +# +def add_product_to_product_set + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Vision::V1::ProductSearch::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Vision::V1::AddProductToProductSetRequest.new + + # Call the add_product_to_product_set method. + result = client.add_product_to_product_set request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END vision_v1_generated_ProductSearch_AddProductToProductSet_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/create_product.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/create_product.rb new file mode 100644 index 000000000000..280ffae881fd --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/create_product.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START vision_v1_generated_ProductSearch_CreateProduct_sync] +require "google/cloud/vision/v1" + +## +# Snippet for the create_product call in the ProductSearch service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Vision::V1::ProductSearch::Client#create_product. +# +def create_product + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Vision::V1::ProductSearch::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Vision::V1::CreateProductRequest.new + + # Call the create_product method. + result = client.create_product request + + # The returned object is of type Google::Cloud::Vision::V1::Product. + p result +end +# [END vision_v1_generated_ProductSearch_CreateProduct_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/create_product_set.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/create_product_set.rb new file mode 100644 index 000000000000..e8cd77b37622 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/create_product_set.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 vision_v1_generated_ProductSearch_CreateProductSet_sync] +require "google/cloud/vision/v1" + +## +# Snippet for the create_product_set call in the ProductSearch service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Vision::V1::ProductSearch::Client#create_product_set. +# +def create_product_set + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Vision::V1::ProductSearch::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Vision::V1::CreateProductSetRequest.new + + # Call the create_product_set method. + result = client.create_product_set request + + # The returned object is of type Google::Cloud::Vision::V1::ProductSet. + p result +end +# [END vision_v1_generated_ProductSearch_CreateProductSet_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/create_reference_image.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/create_reference_image.rb new file mode 100644 index 000000000000..1c3bb7ec393a --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/create_reference_image.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 vision_v1_generated_ProductSearch_CreateReferenceImage_sync] +require "google/cloud/vision/v1" + +## +# Snippet for the create_reference_image call in the ProductSearch service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Vision::V1::ProductSearch::Client#create_reference_image. +# +def create_reference_image + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Vision::V1::ProductSearch::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Vision::V1::CreateReferenceImageRequest.new + + # Call the create_reference_image method. + result = client.create_reference_image request + + # The returned object is of type Google::Cloud::Vision::V1::ReferenceImage. + p result +end +# [END vision_v1_generated_ProductSearch_CreateReferenceImage_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/delete_product.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/delete_product.rb new file mode 100644 index 000000000000..50eace65ad2b --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/delete_product.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START vision_v1_generated_ProductSearch_DeleteProduct_sync] +require "google/cloud/vision/v1" + +## +# Snippet for the delete_product call in the ProductSearch service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Vision::V1::ProductSearch::Client#delete_product. +# +def delete_product + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Vision::V1::ProductSearch::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Vision::V1::DeleteProductRequest.new + + # Call the delete_product method. + result = client.delete_product request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END vision_v1_generated_ProductSearch_DeleteProduct_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/delete_product_set.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/delete_product_set.rb new file mode 100644 index 000000000000..e983c7e0da75 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/delete_product_set.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 vision_v1_generated_ProductSearch_DeleteProductSet_sync] +require "google/cloud/vision/v1" + +## +# Snippet for the delete_product_set call in the ProductSearch service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Vision::V1::ProductSearch::Client#delete_product_set. +# +def delete_product_set + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Vision::V1::ProductSearch::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Vision::V1::DeleteProductSetRequest.new + + # Call the delete_product_set method. + result = client.delete_product_set request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END vision_v1_generated_ProductSearch_DeleteProductSet_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/delete_reference_image.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/delete_reference_image.rb new file mode 100644 index 000000000000..7c10f44db0bf --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/delete_reference_image.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 vision_v1_generated_ProductSearch_DeleteReferenceImage_sync] +require "google/cloud/vision/v1" + +## +# Snippet for the delete_reference_image call in the ProductSearch service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Vision::V1::ProductSearch::Client#delete_reference_image. +# +def delete_reference_image + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Vision::V1::ProductSearch::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Vision::V1::DeleteReferenceImageRequest.new + + # Call the delete_reference_image method. + result = client.delete_reference_image request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END vision_v1_generated_ProductSearch_DeleteReferenceImage_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/get_product.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/get_product.rb new file mode 100644 index 000000000000..db06ed938335 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/get_product.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START vision_v1_generated_ProductSearch_GetProduct_sync] +require "google/cloud/vision/v1" + +## +# Snippet for the get_product call in the ProductSearch service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Vision::V1::ProductSearch::Client#get_product. +# +def get_product + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Vision::V1::ProductSearch::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Vision::V1::GetProductRequest.new + + # Call the get_product method. + result = client.get_product request + + # The returned object is of type Google::Cloud::Vision::V1::Product. + p result +end +# [END vision_v1_generated_ProductSearch_GetProduct_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/get_product_set.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/get_product_set.rb new file mode 100644 index 000000000000..bcc3fa9dc69d --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/get_product_set.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 vision_v1_generated_ProductSearch_GetProductSet_sync] +require "google/cloud/vision/v1" + +## +# Snippet for the get_product_set call in the ProductSearch service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Vision::V1::ProductSearch::Client#get_product_set. +# +def get_product_set + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Vision::V1::ProductSearch::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Vision::V1::GetProductSetRequest.new + + # Call the get_product_set method. + result = client.get_product_set request + + # The returned object is of type Google::Cloud::Vision::V1::ProductSet. + p result +end +# [END vision_v1_generated_ProductSearch_GetProductSet_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/get_reference_image.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/get_reference_image.rb new file mode 100644 index 000000000000..f62773c4cede --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/get_reference_image.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 vision_v1_generated_ProductSearch_GetReferenceImage_sync] +require "google/cloud/vision/v1" + +## +# Snippet for the get_reference_image call in the ProductSearch service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Vision::V1::ProductSearch::Client#get_reference_image. +# +def get_reference_image + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Vision::V1::ProductSearch::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Vision::V1::GetReferenceImageRequest.new + + # Call the get_reference_image method. + result = client.get_reference_image request + + # The returned object is of type Google::Cloud::Vision::V1::ReferenceImage. + p result +end +# [END vision_v1_generated_ProductSearch_GetReferenceImage_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/import_product_sets.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/import_product_sets.rb new file mode 100644 index 000000000000..4ae1def4b916 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/import_product_sets.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 vision_v1_generated_ProductSearch_ImportProductSets_sync] +require "google/cloud/vision/v1" + +## +# Snippet for the import_product_sets call in the ProductSearch service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Vision::V1::ProductSearch::Client#import_product_sets. +# +def import_product_sets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Vision::V1::ProductSearch::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Vision::V1::ImportProductSetsRequest.new + + # Call the import_product_sets method. + result = client.import_product_sets request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END vision_v1_generated_ProductSearch_ImportProductSets_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_product_sets.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_product_sets.rb new file mode 100644 index 000000000000..b8aafb61fb88 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_product_sets.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 vision_v1_generated_ProductSearch_ListProductSets_sync] +require "google/cloud/vision/v1" + +## +# Snippet for the list_product_sets call in the ProductSearch service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Vision::V1::ProductSearch::Client#list_product_sets. +# +def list_product_sets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Vision::V1::ProductSearch::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Vision::V1::ListProductSetsRequest.new + + # Call the list_product_sets method. + result = client.list_product_sets request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Vision::V1::ProductSet. + p item + end +end +# [END vision_v1_generated_ProductSearch_ListProductSets_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_products.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_products.rb new file mode 100644 index 000000000000..c87e2d162e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_products.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START vision_v1_generated_ProductSearch_ListProducts_sync] +require "google/cloud/vision/v1" + +## +# Snippet for the list_products call in the ProductSearch service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Vision::V1::ProductSearch::Client#list_products. +# +def list_products + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Vision::V1::ProductSearch::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Vision::V1::ListProductsRequest.new + + # Call the list_products method. + result = client.list_products request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Vision::V1::Product. + p item + end +end +# [END vision_v1_generated_ProductSearch_ListProducts_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_products_in_product_set.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_products_in_product_set.rb new file mode 100644 index 000000000000..4a002d8e80d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_products_in_product_set.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 vision_v1_generated_ProductSearch_ListProductsInProductSet_sync] +require "google/cloud/vision/v1" + +## +# Snippet for the list_products_in_product_set call in the ProductSearch service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Vision::V1::ProductSearch::Client#list_products_in_product_set. +# +def list_products_in_product_set + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Vision::V1::ProductSearch::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Vision::V1::ListProductsInProductSetRequest.new + + # Call the list_products_in_product_set method. + result = client.list_products_in_product_set request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Vision::V1::Product. + p item + end +end +# [END vision_v1_generated_ProductSearch_ListProductsInProductSet_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_reference_images.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_reference_images.rb new file mode 100644 index 000000000000..c82bb6635940 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_reference_images.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 vision_v1_generated_ProductSearch_ListReferenceImages_sync] +require "google/cloud/vision/v1" + +## +# Snippet for the list_reference_images call in the ProductSearch service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Vision::V1::ProductSearch::Client#list_reference_images. +# +def list_reference_images + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Vision::V1::ProductSearch::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Vision::V1::ListReferenceImagesRequest.new + + # Call the list_reference_images method. + result = client.list_reference_images request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Vision::V1::ReferenceImage. + p item + end +end +# [END vision_v1_generated_ProductSearch_ListReferenceImages_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/purge_products.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/purge_products.rb new file mode 100644 index 000000000000..a10e930054c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/purge_products.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 vision_v1_generated_ProductSearch_PurgeProducts_sync] +require "google/cloud/vision/v1" + +## +# Snippet for the purge_products call in the ProductSearch service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Vision::V1::ProductSearch::Client#purge_products. +# +def purge_products + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Vision::V1::ProductSearch::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Vision::V1::PurgeProductsRequest.new + + # Call the purge_products method. + result = client.purge_products request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END vision_v1_generated_ProductSearch_PurgeProducts_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/remove_product_from_product_set.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/remove_product_from_product_set.rb new file mode 100644 index 000000000000..349a813e5f75 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/remove_product_from_product_set.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 vision_v1_generated_ProductSearch_RemoveProductFromProductSet_sync] +require "google/cloud/vision/v1" + +## +# Snippet for the remove_product_from_product_set call in the ProductSearch service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Vision::V1::ProductSearch::Client#remove_product_from_product_set. +# +def remove_product_from_product_set + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Vision::V1::ProductSearch::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest.new + + # Call the remove_product_from_product_set method. + result = client.remove_product_from_product_set request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END vision_v1_generated_ProductSearch_RemoveProductFromProductSet_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/update_product.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/update_product.rb new file mode 100644 index 000000000000..3ae0104b30a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/update_product.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START vision_v1_generated_ProductSearch_UpdateProduct_sync] +require "google/cloud/vision/v1" + +## +# Snippet for the update_product call in the ProductSearch service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Vision::V1::ProductSearch::Client#update_product. +# +def update_product + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Vision::V1::ProductSearch::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Vision::V1::UpdateProductRequest.new + + # Call the update_product method. + result = client.update_product request + + # The returned object is of type Google::Cloud::Vision::V1::Product. + p result +end +# [END vision_v1_generated_ProductSearch_UpdateProduct_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/update_product_set.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/update_product_set.rb new file mode 100644 index 000000000000..5a3761a60dc6 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/update_product_set.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 vision_v1_generated_ProductSearch_UpdateProductSet_sync] +require "google/cloud/vision/v1" + +## +# Snippet for the update_product_set call in the ProductSearch service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Vision::V1::ProductSearch::Client#update_product_set. +# +def update_product_set + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Vision::V1::ProductSearch::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Vision::V1::UpdateProductSetRequest.new + + # Call the update_product_set method. + result = client.update_product_set request + + # The returned object is of type Google::Cloud::Vision::V1::ProductSet. + p result +end +# [END vision_v1_generated_ProductSearch_UpdateProductSet_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/snippet_metadata_google.cloud.vision.v1.json b/owl-bot-staging/google-cloud-vision-v1/snippets/snippet_metadata_google.cloud.vision.v1.json new file mode 100644 index 000000000000..f493bfb8fe4f --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/snippets/snippet_metadata_google.cloud.vision.v1.json @@ -0,0 +1,935 @@ +{ + "client_library": { + "name": "google-cloud-vision-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.vision.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "vision_v1_generated_ProductSearch_CreateProductSet_sync", + "title": "Snippet for the create_product_set call in the ProductSearch service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#create_product_set.", + "file": "product_search/create_product_set.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_product_set", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#create_product_set", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Vision::V1::CreateProductSetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Vision::V1::ProductSet", + "client": { + "short_name": "ProductSearch::Client", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" + }, + "method": { + "short_name": "CreateProductSet", + "full_name": "google.cloud.vision.v1.ProductSearch.CreateProductSet", + "service": { + "short_name": "ProductSearch", + "full_name": "google.cloud.vision.v1.ProductSearch" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "vision_v1_generated_ProductSearch_ListProductSets_sync", + "title": "Snippet for the list_product_sets call in the ProductSearch service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#list_product_sets.", + "file": "product_search/list_product_sets.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_product_sets", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#list_product_sets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Vision::V1::ListProductSetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Vision::V1::ListProductSetsResponse", + "client": { + "short_name": "ProductSearch::Client", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" + }, + "method": { + "short_name": "ListProductSets", + "full_name": "google.cloud.vision.v1.ProductSearch.ListProductSets", + "service": { + "short_name": "ProductSearch", + "full_name": "google.cloud.vision.v1.ProductSearch" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "vision_v1_generated_ProductSearch_GetProductSet_sync", + "title": "Snippet for the get_product_set call in the ProductSearch service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#get_product_set.", + "file": "product_search/get_product_set.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_product_set", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#get_product_set", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Vision::V1::GetProductSetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Vision::V1::ProductSet", + "client": { + "short_name": "ProductSearch::Client", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" + }, + "method": { + "short_name": "GetProductSet", + "full_name": "google.cloud.vision.v1.ProductSearch.GetProductSet", + "service": { + "short_name": "ProductSearch", + "full_name": "google.cloud.vision.v1.ProductSearch" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "vision_v1_generated_ProductSearch_UpdateProductSet_sync", + "title": "Snippet for the update_product_set call in the ProductSearch service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#update_product_set.", + "file": "product_search/update_product_set.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_product_set", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#update_product_set", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Vision::V1::UpdateProductSetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Vision::V1::ProductSet", + "client": { + "short_name": "ProductSearch::Client", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" + }, + "method": { + "short_name": "UpdateProductSet", + "full_name": "google.cloud.vision.v1.ProductSearch.UpdateProductSet", + "service": { + "short_name": "ProductSearch", + "full_name": "google.cloud.vision.v1.ProductSearch" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "vision_v1_generated_ProductSearch_DeleteProductSet_sync", + "title": "Snippet for the delete_product_set call in the ProductSearch service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#delete_product_set.", + "file": "product_search/delete_product_set.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_product_set", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#delete_product_set", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Vision::V1::DeleteProductSetRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ProductSearch::Client", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" + }, + "method": { + "short_name": "DeleteProductSet", + "full_name": "google.cloud.vision.v1.ProductSearch.DeleteProductSet", + "service": { + "short_name": "ProductSearch", + "full_name": "google.cloud.vision.v1.ProductSearch" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "vision_v1_generated_ProductSearch_CreateProduct_sync", + "title": "Snippet for the create_product call in the ProductSearch service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#create_product.", + "file": "product_search/create_product.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_product", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#create_product", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Vision::V1::CreateProductRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Vision::V1::Product", + "client": { + "short_name": "ProductSearch::Client", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" + }, + "method": { + "short_name": "CreateProduct", + "full_name": "google.cloud.vision.v1.ProductSearch.CreateProduct", + "service": { + "short_name": "ProductSearch", + "full_name": "google.cloud.vision.v1.ProductSearch" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "vision_v1_generated_ProductSearch_ListProducts_sync", + "title": "Snippet for the list_products call in the ProductSearch service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#list_products.", + "file": "product_search/list_products.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_products", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#list_products", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Vision::V1::ListProductsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Vision::V1::ListProductsResponse", + "client": { + "short_name": "ProductSearch::Client", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" + }, + "method": { + "short_name": "ListProducts", + "full_name": "google.cloud.vision.v1.ProductSearch.ListProducts", + "service": { + "short_name": "ProductSearch", + "full_name": "google.cloud.vision.v1.ProductSearch" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "vision_v1_generated_ProductSearch_GetProduct_sync", + "title": "Snippet for the get_product call in the ProductSearch service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#get_product.", + "file": "product_search/get_product.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_product", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#get_product", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Vision::V1::GetProductRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Vision::V1::Product", + "client": { + "short_name": "ProductSearch::Client", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" + }, + "method": { + "short_name": "GetProduct", + "full_name": "google.cloud.vision.v1.ProductSearch.GetProduct", + "service": { + "short_name": "ProductSearch", + "full_name": "google.cloud.vision.v1.ProductSearch" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "vision_v1_generated_ProductSearch_UpdateProduct_sync", + "title": "Snippet for the update_product call in the ProductSearch service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#update_product.", + "file": "product_search/update_product.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_product", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#update_product", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Vision::V1::UpdateProductRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Vision::V1::Product", + "client": { + "short_name": "ProductSearch::Client", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" + }, + "method": { + "short_name": "UpdateProduct", + "full_name": "google.cloud.vision.v1.ProductSearch.UpdateProduct", + "service": { + "short_name": "ProductSearch", + "full_name": "google.cloud.vision.v1.ProductSearch" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "vision_v1_generated_ProductSearch_DeleteProduct_sync", + "title": "Snippet for the delete_product call in the ProductSearch service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#delete_product.", + "file": "product_search/delete_product.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_product", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#delete_product", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Vision::V1::DeleteProductRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ProductSearch::Client", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" + }, + "method": { + "short_name": "DeleteProduct", + "full_name": "google.cloud.vision.v1.ProductSearch.DeleteProduct", + "service": { + "short_name": "ProductSearch", + "full_name": "google.cloud.vision.v1.ProductSearch" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "vision_v1_generated_ProductSearch_CreateReferenceImage_sync", + "title": "Snippet for the create_reference_image call in the ProductSearch service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#create_reference_image.", + "file": "product_search/create_reference_image.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_reference_image", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#create_reference_image", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Vision::V1::CreateReferenceImageRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Vision::V1::ReferenceImage", + "client": { + "short_name": "ProductSearch::Client", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" + }, + "method": { + "short_name": "CreateReferenceImage", + "full_name": "google.cloud.vision.v1.ProductSearch.CreateReferenceImage", + "service": { + "short_name": "ProductSearch", + "full_name": "google.cloud.vision.v1.ProductSearch" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "vision_v1_generated_ProductSearch_DeleteReferenceImage_sync", + "title": "Snippet for the delete_reference_image call in the ProductSearch service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#delete_reference_image.", + "file": "product_search/delete_reference_image.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_reference_image", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#delete_reference_image", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Vision::V1::DeleteReferenceImageRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ProductSearch::Client", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" + }, + "method": { + "short_name": "DeleteReferenceImage", + "full_name": "google.cloud.vision.v1.ProductSearch.DeleteReferenceImage", + "service": { + "short_name": "ProductSearch", + "full_name": "google.cloud.vision.v1.ProductSearch" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "vision_v1_generated_ProductSearch_ListReferenceImages_sync", + "title": "Snippet for the list_reference_images call in the ProductSearch service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#list_reference_images.", + "file": "product_search/list_reference_images.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_reference_images", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#list_reference_images", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Vision::V1::ListReferenceImagesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Vision::V1::ListReferenceImagesResponse", + "client": { + "short_name": "ProductSearch::Client", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" + }, + "method": { + "short_name": "ListReferenceImages", + "full_name": "google.cloud.vision.v1.ProductSearch.ListReferenceImages", + "service": { + "short_name": "ProductSearch", + "full_name": "google.cloud.vision.v1.ProductSearch" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "vision_v1_generated_ProductSearch_GetReferenceImage_sync", + "title": "Snippet for the get_reference_image call in the ProductSearch service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#get_reference_image.", + "file": "product_search/get_reference_image.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_reference_image", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#get_reference_image", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Vision::V1::GetReferenceImageRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Vision::V1::ReferenceImage", + "client": { + "short_name": "ProductSearch::Client", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" + }, + "method": { + "short_name": "GetReferenceImage", + "full_name": "google.cloud.vision.v1.ProductSearch.GetReferenceImage", + "service": { + "short_name": "ProductSearch", + "full_name": "google.cloud.vision.v1.ProductSearch" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "vision_v1_generated_ProductSearch_AddProductToProductSet_sync", + "title": "Snippet for the add_product_to_product_set call in the ProductSearch service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#add_product_to_product_set.", + "file": "product_search/add_product_to_product_set.rb", + "language": "RUBY", + "client_method": { + "short_name": "add_product_to_product_set", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#add_product_to_product_set", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Vision::V1::AddProductToProductSetRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ProductSearch::Client", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" + }, + "method": { + "short_name": "AddProductToProductSet", + "full_name": "google.cloud.vision.v1.ProductSearch.AddProductToProductSet", + "service": { + "short_name": "ProductSearch", + "full_name": "google.cloud.vision.v1.ProductSearch" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "vision_v1_generated_ProductSearch_RemoveProductFromProductSet_sync", + "title": "Snippet for the remove_product_from_product_set call in the ProductSearch service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#remove_product_from_product_set.", + "file": "product_search/remove_product_from_product_set.rb", + "language": "RUBY", + "client_method": { + "short_name": "remove_product_from_product_set", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#remove_product_from_product_set", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ProductSearch::Client", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" + }, + "method": { + "short_name": "RemoveProductFromProductSet", + "full_name": "google.cloud.vision.v1.ProductSearch.RemoveProductFromProductSet", + "service": { + "short_name": "ProductSearch", + "full_name": "google.cloud.vision.v1.ProductSearch" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "vision_v1_generated_ProductSearch_ListProductsInProductSet_sync", + "title": "Snippet for the list_products_in_product_set call in the ProductSearch service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#list_products_in_product_set.", + "file": "product_search/list_products_in_product_set.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_products_in_product_set", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#list_products_in_product_set", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Vision::V1::ListProductsInProductSetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Vision::V1::ListProductsInProductSetResponse", + "client": { + "short_name": "ProductSearch::Client", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" + }, + "method": { + "short_name": "ListProductsInProductSet", + "full_name": "google.cloud.vision.v1.ProductSearch.ListProductsInProductSet", + "service": { + "short_name": "ProductSearch", + "full_name": "google.cloud.vision.v1.ProductSearch" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "vision_v1_generated_ProductSearch_ImportProductSets_sync", + "title": "Snippet for the import_product_sets call in the ProductSearch service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#import_product_sets.", + "file": "product_search/import_product_sets.rb", + "language": "RUBY", + "client_method": { + "short_name": "import_product_sets", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#import_product_sets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Vision::V1::ImportProductSetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ProductSearch::Client", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" + }, + "method": { + "short_name": "ImportProductSets", + "full_name": "google.cloud.vision.v1.ProductSearch.ImportProductSets", + "service": { + "short_name": "ProductSearch", + "full_name": "google.cloud.vision.v1.ProductSearch" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "vision_v1_generated_ProductSearch_PurgeProducts_sync", + "title": "Snippet for the purge_products call in the ProductSearch service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#purge_products.", + "file": "product_search/purge_products.rb", + "language": "RUBY", + "client_method": { + "short_name": "purge_products", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#purge_products", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Vision::V1::PurgeProductsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ProductSearch::Client", + "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" + }, + "method": { + "short_name": "PurgeProducts", + "full_name": "google.cloud.vision.v1.ProductSearch.PurgeProducts", + "service": { + "short_name": "ProductSearch", + "full_name": "google.cloud.vision.v1.ProductSearch" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "vision_v1_generated_ImageAnnotator_BatchAnnotateImages_sync", + "title": "Snippet for the batch_annotate_images call in the ImageAnnotator service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ImageAnnotator::Client#batch_annotate_images.", + "file": "image_annotator/batch_annotate_images.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_annotate_images", + "full_name": "::Google::Cloud::Vision::V1::ImageAnnotator::Client#batch_annotate_images", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Vision::V1::BatchAnnotateImagesResponse", + "client": { + "short_name": "ImageAnnotator::Client", + "full_name": "::Google::Cloud::Vision::V1::ImageAnnotator::Client" + }, + "method": { + "short_name": "BatchAnnotateImages", + "full_name": "google.cloud.vision.v1.ImageAnnotator.BatchAnnotateImages", + "service": { + "short_name": "ImageAnnotator", + "full_name": "google.cloud.vision.v1.ImageAnnotator" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "vision_v1_generated_ImageAnnotator_BatchAnnotateFiles_sync", + "title": "Snippet for the batch_annotate_files call in the ImageAnnotator service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ImageAnnotator::Client#batch_annotate_files.", + "file": "image_annotator/batch_annotate_files.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_annotate_files", + "full_name": "::Google::Cloud::Vision::V1::ImageAnnotator::Client#batch_annotate_files", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Vision::V1::BatchAnnotateFilesResponse", + "client": { + "short_name": "ImageAnnotator::Client", + "full_name": "::Google::Cloud::Vision::V1::ImageAnnotator::Client" + }, + "method": { + "short_name": "BatchAnnotateFiles", + "full_name": "google.cloud.vision.v1.ImageAnnotator.BatchAnnotateFiles", + "service": { + "short_name": "ImageAnnotator", + "full_name": "google.cloud.vision.v1.ImageAnnotator" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateImages_sync", + "title": "Snippet for the async_batch_annotate_images call in the ImageAnnotator service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ImageAnnotator::Client#async_batch_annotate_images.", + "file": "image_annotator/async_batch_annotate_images.rb", + "language": "RUBY", + "client_method": { + "short_name": "async_batch_annotate_images", + "full_name": "::Google::Cloud::Vision::V1::ImageAnnotator::Client#async_batch_annotate_images", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ImageAnnotator::Client", + "full_name": "::Google::Cloud::Vision::V1::ImageAnnotator::Client" + }, + "method": { + "short_name": "AsyncBatchAnnotateImages", + "full_name": "google.cloud.vision.v1.ImageAnnotator.AsyncBatchAnnotateImages", + "service": { + "short_name": "ImageAnnotator", + "full_name": "google.cloud.vision.v1.ImageAnnotator" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync", + "title": "Snippet for the async_batch_annotate_files call in the ImageAnnotator service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ImageAnnotator::Client#async_batch_annotate_files.", + "file": "image_annotator/async_batch_annotate_files.rb", + "language": "RUBY", + "client_method": { + "short_name": "async_batch_annotate_files", + "full_name": "::Google::Cloud::Vision::V1::ImageAnnotator::Client#async_batch_annotate_files", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ImageAnnotator::Client", + "full_name": "::Google::Cloud::Vision::V1::ImageAnnotator::Client" + }, + "method": { + "short_name": "AsyncBatchAnnotateFiles", + "full_name": "google.cloud.vision.v1.ImageAnnotator.AsyncBatchAnnotateFiles", + "service": { + "short_name": "ImageAnnotator", + "full_name": "google.cloud.vision.v1.ImageAnnotator" + } + } + }, + "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-vision-v1/test/google/cloud/vision/v1/image_annotator_operations_test.rb b/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_operations_test.rb new file mode 100644 index 000000000000..7266d0f044cb --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_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/vision/v1/image_annotator_pb" +require "google/cloud/vision/v1/image_annotator_services_pb" +require "google/cloud/vision/v1/image_annotator" + +class ::Google::Cloud::Vision::V1::ImageAnnotator::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::Vision::V1::ImageAnnotator::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::Vision::V1::ImageAnnotator::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::Vision::V1::ImageAnnotator::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::Vision::V1::ImageAnnotator::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::Vision::V1::ImageAnnotator::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::Vision::V1::ImageAnnotator::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::Vision::V1::ImageAnnotator::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_paths_test.rb b/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_paths_test.rb new file mode 100644 index 000000000000..9ee050a26a01 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_paths_test.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 "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/vision/v1/image_annotator" + +class ::Google::Cloud::Vision::V1::ImageAnnotator::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_product_set_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Vision::V1::ImageAnnotator::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.product_set_path project: "value0", location: "value1", product_set: "value2" + assert_equal "projects/value0/locations/value1/productSets/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_rest_test.rb b/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_rest_test.rb new file mode 100644 index 000000000000..258d6f3249e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_rest_test.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! + +require "helper" +require "gapic/rest" +require "google/cloud/vision/v1/image_annotator_pb" +require "google/cloud/vision/v1/image_annotator/rest" + + +class ::Google::Cloud::Vision::V1::ImageAnnotator::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_batch_annotate_images + # Create test objects. + client_result = ::Google::Cloud::Vision::V1::BatchAnnotateImagesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + requests = [{}] + parent = "hello world" + labels = {} + + batch_annotate_images_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::ServiceStub.stub :transcode_batch_annotate_images_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_annotate_images_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.batch_annotate_images({ requests: requests, parent: parent, labels: labels }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.batch_annotate_images requests: requests, parent: parent, labels: labels do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.batch_annotate_images ::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest.new(requests: requests, parent: parent, labels: labels) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.batch_annotate_images({ requests: requests, parent: parent, labels: labels }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.batch_annotate_images(::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest.new(requests: requests, parent: parent, labels: labels), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_annotate_images_client_stub.call_count + end + end + end + + def test_batch_annotate_files + # Create test objects. + client_result = ::Google::Cloud::Vision::V1::BatchAnnotateFilesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + requests = [{}] + parent = "hello world" + labels = {} + + batch_annotate_files_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::ServiceStub.stub :transcode_batch_annotate_files_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_annotate_files_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.batch_annotate_files({ requests: requests, parent: parent, labels: labels }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.batch_annotate_files requests: requests, parent: parent, labels: labels do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.batch_annotate_files ::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest.new(requests: requests, parent: parent, labels: labels) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.batch_annotate_files({ requests: requests, parent: parent, labels: labels }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.batch_annotate_files(::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest.new(requests: requests, parent: parent, labels: labels), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_annotate_files_client_stub.call_count + end + end + end + + def test_async_batch_annotate_images + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + requests = [{}] + output_config = {} + parent = "hello world" + labels = {} + + async_batch_annotate_images_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::ServiceStub.stub :transcode_async_batch_annotate_images_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, async_batch_annotate_images_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.async_batch_annotate_images({ requests: requests, output_config: output_config, parent: parent, labels: labels }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.async_batch_annotate_images requests: requests, output_config: output_config, parent: parent, labels: labels do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.async_batch_annotate_images ::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest.new(requests: requests, output_config: output_config, parent: parent, labels: labels) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.async_batch_annotate_images({ requests: requests, output_config: output_config, parent: parent, labels: labels }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.async_batch_annotate_images(::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest.new(requests: requests, output_config: output_config, parent: parent, labels: labels), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, async_batch_annotate_images_client_stub.call_count + end + end + end + + def test_async_batch_annotate_files + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + requests = [{}] + parent = "hello world" + labels = {} + + async_batch_annotate_files_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::ServiceStub.stub :transcode_async_batch_annotate_files_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, async_batch_annotate_files_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.async_batch_annotate_files({ requests: requests, parent: parent, labels: labels }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.async_batch_annotate_files requests: requests, parent: parent, labels: labels do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.async_batch_annotate_files ::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest.new(requests: requests, parent: parent, labels: labels) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.async_batch_annotate_files({ requests: requests, parent: parent, labels: labels }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.async_batch_annotate_files(::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest.new(requests: requests, parent: parent, labels: labels), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, async_batch_annotate_files_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::Vision::V1::ImageAnnotator::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::Vision::V1::ImageAnnotator::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_test.rb b/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_test.rb new file mode 100644 index 000000000000..b85a5d03baff --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_test.rb @@ -0,0 +1,378 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/vision/v1/image_annotator_pb" +require "google/cloud/vision/v1/image_annotator" + +class ::Google::Cloud::Vision::V1::ImageAnnotator::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_batch_annotate_images + # Create GRPC objects. + grpc_response = ::Google::Cloud::Vision::V1::BatchAnnotateImagesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + requests = [{}] + parent = "hello world" + labels = {} + + batch_annotate_images_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_annotate_images, name + assert_kind_of ::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest, request + assert_kind_of ::Google::Cloud::Vision::V1::AnnotateImageRequest, request["requests"].first + assert_equal "hello world", request["parent"] + assert_equal({}, request["labels"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_annotate_images_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ImageAnnotator::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_annotate_images({ requests: requests, parent: parent, labels: labels }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.batch_annotate_images requests: requests, parent: parent, labels: labels do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.batch_annotate_images ::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest.new(requests: requests, parent: parent, labels: labels) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.batch_annotate_images({ requests: requests, parent: parent, 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_annotate_images(::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest.new(requests: requests, parent: parent, 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_annotate_images_client_stub.call_rpc_count + end + end + + def test_batch_annotate_files + # Create GRPC objects. + grpc_response = ::Google::Cloud::Vision::V1::BatchAnnotateFilesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + requests = [{}] + parent = "hello world" + labels = {} + + batch_annotate_files_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_annotate_files, name + assert_kind_of ::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest, request + assert_kind_of ::Google::Cloud::Vision::V1::AnnotateFileRequest, request["requests"].first + assert_equal "hello world", request["parent"] + assert_equal({}, request["labels"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_annotate_files_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ImageAnnotator::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_annotate_files({ requests: requests, parent: parent, labels: labels }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.batch_annotate_files requests: requests, parent: parent, labels: labels do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.batch_annotate_files ::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest.new(requests: requests, parent: parent, labels: labels) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.batch_annotate_files({ requests: requests, parent: parent, 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_annotate_files(::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest.new(requests: requests, parent: parent, 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_annotate_files_client_stub.call_rpc_count + end + end + + def test_async_batch_annotate_images + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + requests = [{}] + output_config = {} + parent = "hello world" + labels = {} + + async_batch_annotate_images_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :async_batch_annotate_images, name + assert_kind_of ::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest, request + assert_kind_of ::Google::Cloud::Vision::V1::AnnotateImageRequest, request["requests"].first + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Vision::V1::OutputConfig), request["output_config"] + assert_equal "hello world", request["parent"] + assert_equal({}, request["labels"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, async_batch_annotate_images_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ImageAnnotator::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.async_batch_annotate_images({ requests: requests, output_config: output_config, parent: parent, labels: labels }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.async_batch_annotate_images requests: requests, output_config: output_config, parent: parent, labels: labels do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.async_batch_annotate_images ::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest.new(requests: requests, output_config: output_config, parent: parent, labels: labels) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.async_batch_annotate_images({ requests: requests, output_config: output_config, parent: parent, labels: labels }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.async_batch_annotate_images(::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest.new(requests: requests, output_config: output_config, parent: parent, labels: labels), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, async_batch_annotate_images_client_stub.call_rpc_count + end + end + + def test_async_batch_annotate_files + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + requests = [{}] + parent = "hello world" + labels = {} + + async_batch_annotate_files_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :async_batch_annotate_files, name + assert_kind_of ::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest, request + assert_kind_of ::Google::Cloud::Vision::V1::AsyncAnnotateFileRequest, request["requests"].first + assert_equal "hello world", request["parent"] + assert_equal({}, request["labels"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, async_batch_annotate_files_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ImageAnnotator::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.async_batch_annotate_files({ requests: requests, parent: parent, labels: labels }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.async_batch_annotate_files requests: requests, parent: parent, labels: labels do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.async_batch_annotate_files ::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest.new(requests: requests, parent: parent, labels: labels) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.async_batch_annotate_files({ requests: requests, parent: parent, labels: labels }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.async_batch_annotate_files(::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest.new(requests: requests, parent: parent, labels: labels), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, async_batch_annotate_files_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::Vision::V1::ImageAnnotator::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::Vision::V1::ImageAnnotator::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::Vision::V1::ImageAnnotator::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Vision::V1::ImageAnnotator::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::Vision::V1::ImageAnnotator::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Vision::V1::ImageAnnotator::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_operations_test.rb b/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_operations_test.rb new file mode 100644 index 000000000000..b6544f82be91 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_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/vision/v1/product_search_service_pb" +require "google/cloud/vision/v1/product_search_service_services_pb" +require "google/cloud/vision/v1/product_search" + +class ::Google::Cloud::Vision::V1::ProductSearch::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::Vision::V1::ProductSearch::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::Vision::V1::ProductSearch::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::Vision::V1::ProductSearch::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::Vision::V1::ProductSearch::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::Vision::V1::ProductSearch::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::Vision::V1::ProductSearch::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::Vision::V1::ProductSearch::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_paths_test.rb b/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_paths_test.rb new file mode 100644 index 000000000000..d34aeda7c09e --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_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/vision/v1/product_search" + +class ::Google::Cloud::Vision::V1::ProductSearch::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_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::Vision::V1::ProductSearch::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_product_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.product_path project: "value0", location: "value1", product: "value2" + assert_equal "projects/value0/locations/value1/products/value2", path + end + end + + def test_product_set_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.product_set_path project: "value0", location: "value1", product_set: "value2" + assert_equal "projects/value0/locations/value1/productSets/value2", path + end + end + + def test_reference_image_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.reference_image_path project: "value0", location: "value1", product: "value2", reference_image: "value3" + assert_equal "projects/value0/locations/value1/products/value2/referenceImages/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_rest_test.rb b/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_rest_test.rb new file mode 100644 index 000000000000..5bcc71106cd9 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_rest_test.rb @@ -0,0 +1,1146 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/vision/v1/product_search_service_pb" +require "google/cloud/vision/v1/product_search/rest" + + +class ::Google::Cloud::Vision::V1::ProductSearch::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_product_set + # Create test objects. + client_result = ::Google::Cloud::Vision::V1::ProductSet.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + product_set = {} + product_set_id = "hello world" + + create_product_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_create_product_set_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_product_set_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_product_set({ parent: parent, product_set: product_set, product_set_id: product_set_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_product_set parent: parent, product_set: product_set, product_set_id: product_set_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_product_set ::Google::Cloud::Vision::V1::CreateProductSetRequest.new(parent: parent, product_set: product_set, product_set_id: product_set_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_product_set({ parent: parent, product_set: product_set, product_set_id: product_set_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_product_set(::Google::Cloud::Vision::V1::CreateProductSetRequest.new(parent: parent, product_set: product_set, product_set_id: product_set_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_product_set_client_stub.call_count + end + end + end + + def test_list_product_sets + # Create test objects. + client_result = ::Google::Cloud::Vision::V1::ListProductSetsResponse.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_product_sets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_list_product_sets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_product_sets_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_product_sets({ 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_product_sets 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_product_sets ::Google::Cloud::Vision::V1::ListProductSetsRequest.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_product_sets({ 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_product_sets(::Google::Cloud::Vision::V1::ListProductSetsRequest.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_product_sets_client_stub.call_count + end + end + end + + def test_get_product_set + # Create test objects. + client_result = ::Google::Cloud::Vision::V1::ProductSet.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_product_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_get_product_set_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_product_set_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_product_set({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_product_set name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_product_set ::Google::Cloud::Vision::V1::GetProductSetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_product_set({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_product_set(::Google::Cloud::Vision::V1::GetProductSetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_product_set_client_stub.call_count + end + end + end + + def test_update_product_set + # Create test objects. + client_result = ::Google::Cloud::Vision::V1::ProductSet.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + product_set = {} + update_mask = {} + + update_product_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_update_product_set_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_product_set_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_product_set({ product_set: product_set, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_product_set product_set: product_set, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_product_set ::Google::Cloud::Vision::V1::UpdateProductSetRequest.new(product_set: product_set, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_product_set({ product_set: product_set, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_product_set(::Google::Cloud::Vision::V1::UpdateProductSetRequest.new(product_set: product_set, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_product_set_client_stub.call_count + end + end + end + + def test_delete_product_set + # 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_product_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_delete_product_set_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_product_set_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_product_set({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_product_set name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_product_set ::Google::Cloud::Vision::V1::DeleteProductSetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_product_set({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_product_set(::Google::Cloud::Vision::V1::DeleteProductSetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_product_set_client_stub.call_count + end + end + end + + def test_create_product + # Create test objects. + client_result = ::Google::Cloud::Vision::V1::Product.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + product = {} + product_id = "hello world" + + create_product_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_create_product_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_product_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_product({ parent: parent, product: product, product_id: product_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_product parent: parent, product: product, product_id: product_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_product ::Google::Cloud::Vision::V1::CreateProductRequest.new(parent: parent, product: product, product_id: product_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_product({ parent: parent, product: product, product_id: product_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_product(::Google::Cloud::Vision::V1::CreateProductRequest.new(parent: parent, product: product, product_id: product_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_product_client_stub.call_count + end + end + end + + def test_list_products + # Create test objects. + client_result = ::Google::Cloud::Vision::V1::ListProductsResponse.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_products_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_list_products_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_products_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_products({ 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_products 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_products ::Google::Cloud::Vision::V1::ListProductsRequest.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_products({ 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_products(::Google::Cloud::Vision::V1::ListProductsRequest.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_products_client_stub.call_count + end + end + end + + def test_get_product + # Create test objects. + client_result = ::Google::Cloud::Vision::V1::Product.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_product_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_get_product_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_product_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_product({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_product name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_product ::Google::Cloud::Vision::V1::GetProductRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_product({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_product(::Google::Cloud::Vision::V1::GetProductRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_product_client_stub.call_count + end + end + end + + def test_update_product + # Create test objects. + client_result = ::Google::Cloud::Vision::V1::Product.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + product = {} + update_mask = {} + + update_product_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_update_product_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_product_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_product({ product: product, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_product product: product, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_product ::Google::Cloud::Vision::V1::UpdateProductRequest.new(product: product, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_product({ product: product, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_product(::Google::Cloud::Vision::V1::UpdateProductRequest.new(product: product, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_product_client_stub.call_count + end + end + end + + def test_delete_product + # 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_product_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_delete_product_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_product_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_product({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_product name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_product ::Google::Cloud::Vision::V1::DeleteProductRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_product({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_product(::Google::Cloud::Vision::V1::DeleteProductRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_product_client_stub.call_count + end + end + end + + def test_create_reference_image + # Create test objects. + client_result = ::Google::Cloud::Vision::V1::ReferenceImage.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + reference_image = {} + reference_image_id = "hello world" + + create_reference_image_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_create_reference_image_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_reference_image_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_reference_image({ parent: parent, reference_image: reference_image, reference_image_id: reference_image_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_reference_image parent: parent, reference_image: reference_image, reference_image_id: reference_image_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_reference_image ::Google::Cloud::Vision::V1::CreateReferenceImageRequest.new(parent: parent, reference_image: reference_image, reference_image_id: reference_image_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_reference_image({ parent: parent, reference_image: reference_image, reference_image_id: reference_image_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_reference_image(::Google::Cloud::Vision::V1::CreateReferenceImageRequest.new(parent: parent, reference_image: reference_image, reference_image_id: reference_image_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_reference_image_client_stub.call_count + end + end + end + + def test_delete_reference_image + # 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_reference_image_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_delete_reference_image_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_reference_image_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_reference_image({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_reference_image name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_reference_image ::Google::Cloud::Vision::V1::DeleteReferenceImageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_reference_image({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_reference_image(::Google::Cloud::Vision::V1::DeleteReferenceImageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_reference_image_client_stub.call_count + end + end + end + + def test_list_reference_images + # Create test objects. + client_result = ::Google::Cloud::Vision::V1::ListReferenceImagesResponse.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_reference_images_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_list_reference_images_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_reference_images_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_reference_images({ 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_reference_images 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_reference_images ::Google::Cloud::Vision::V1::ListReferenceImagesRequest.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_reference_images({ 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_reference_images(::Google::Cloud::Vision::V1::ListReferenceImagesRequest.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_reference_images_client_stub.call_count + end + end + end + + def test_get_reference_image + # Create test objects. + client_result = ::Google::Cloud::Vision::V1::ReferenceImage.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_reference_image_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_get_reference_image_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_reference_image_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_reference_image({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_reference_image name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_reference_image ::Google::Cloud::Vision::V1::GetReferenceImageRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_reference_image({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_reference_image(::Google::Cloud::Vision::V1::GetReferenceImageRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_reference_image_client_stub.call_count + end + end + end + + def test_add_product_to_product_set + # 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" + product = "hello world" + + add_product_to_product_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_add_product_to_product_set_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, add_product_to_product_set_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.add_product_to_product_set({ name: name, product: product }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.add_product_to_product_set name: name, product: product do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.add_product_to_product_set ::Google::Cloud::Vision::V1::AddProductToProductSetRequest.new(name: name, product: product) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.add_product_to_product_set({ name: name, product: product }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.add_product_to_product_set(::Google::Cloud::Vision::V1::AddProductToProductSetRequest.new(name: name, product: product), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, add_product_to_product_set_client_stub.call_count + end + end + end + + def test_remove_product_from_product_set + # 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" + product = "hello world" + + remove_product_from_product_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_remove_product_from_product_set_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, remove_product_from_product_set_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.remove_product_from_product_set({ name: name, product: product }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.remove_product_from_product_set name: name, product: product do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.remove_product_from_product_set ::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest.new(name: name, product: product) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.remove_product_from_product_set({ name: name, product: product }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.remove_product_from_product_set(::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest.new(name: name, product: product), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, remove_product_from_product_set_client_stub.call_count + end + end + end + + def test_list_products_in_product_set + # Create test objects. + client_result = ::Google::Cloud::Vision::V1::ListProductsInProductSetResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + page_size = 42 + page_token = "hello world" + + list_products_in_product_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_list_products_in_product_set_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_products_in_product_set_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_products_in_product_set({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_products_in_product_set name: name, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_products_in_product_set ::Google::Cloud::Vision::V1::ListProductsInProductSetRequest.new(name: name, 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_products_in_product_set({ name: name, 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_products_in_product_set(::Google::Cloud::Vision::V1::ListProductsInProductSetRequest.new(name: name, 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_products_in_product_set_client_stub.call_count + end + end + end + + def test_import_product_sets + # Create test objects. + 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" + input_config = {} + + import_product_sets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_import_product_sets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, import_product_sets_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.import_product_sets({ parent: parent, input_config: input_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.import_product_sets parent: parent, input_config: input_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.import_product_sets ::Google::Cloud::Vision::V1::ImportProductSetsRequest.new(parent: parent, input_config: input_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.import_product_sets({ parent: parent, input_config: input_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.import_product_sets(::Google::Cloud::Vision::V1::ImportProductSetsRequest.new(parent: parent, input_config: input_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, import_product_sets_client_stub.call_count + end + end + end + + def test_purge_products + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + product_set_purge_config = {} + parent = "hello world" + force = true + + purge_products_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_purge_products_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, purge_products_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.purge_products({ product_set_purge_config: product_set_purge_config, parent: parent, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.purge_products product_set_purge_config: product_set_purge_config, parent: parent, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.purge_products ::Google::Cloud::Vision::V1::PurgeProductsRequest.new(product_set_purge_config: product_set_purge_config, parent: parent, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.purge_products({ product_set_purge_config: product_set_purge_config, parent: parent, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.purge_products(::Google::Cloud::Vision::V1::PurgeProductsRequest.new(product_set_purge_config: product_set_purge_config, parent: parent, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, purge_products_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::Vision::V1::ProductSearch::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::Vision::V1::ProductSearch::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_test.rb b/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_test.rb new file mode 100644 index 000000000000..e661572993f5 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_test.rb @@ -0,0 +1,1293 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/vision/v1/product_search_service_pb" +require "google/cloud/vision/v1/product_search" + +class ::Google::Cloud::Vision::V1::ProductSearch::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_product_set + # Create GRPC objects. + grpc_response = ::Google::Cloud::Vision::V1::ProductSet.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + product_set = {} + product_set_id = "hello world" + + create_product_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_product_set, name + assert_kind_of ::Google::Cloud::Vision::V1::CreateProductSetRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Vision::V1::ProductSet), request["product_set"] + assert_equal "hello world", request["product_set_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_product_set_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_product_set({ parent: parent, product_set: product_set, product_set_id: product_set_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_product_set parent: parent, product_set: product_set, product_set_id: product_set_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_product_set ::Google::Cloud::Vision::V1::CreateProductSetRequest.new(parent: parent, product_set: product_set, product_set_id: product_set_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_product_set({ parent: parent, product_set: product_set, product_set_id: product_set_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_product_set(::Google::Cloud::Vision::V1::CreateProductSetRequest.new(parent: parent, product_set: product_set, product_set_id: product_set_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_product_set_client_stub.call_rpc_count + end + end + + def test_list_product_sets + # Create GRPC objects. + grpc_response = ::Google::Cloud::Vision::V1::ListProductSetsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_product_sets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_product_sets, name + assert_kind_of ::Google::Cloud::Vision::V1::ListProductSetsRequest, 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_product_sets_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_product_sets({ 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_product_sets 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_product_sets ::Google::Cloud::Vision::V1::ListProductSetsRequest.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_product_sets({ 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_product_sets(::Google::Cloud::Vision::V1::ListProductSetsRequest.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_product_sets_client_stub.call_rpc_count + end + end + + def test_get_product_set + # Create GRPC objects. + grpc_response = ::Google::Cloud::Vision::V1::ProductSet.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_product_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_product_set, name + assert_kind_of ::Google::Cloud::Vision::V1::GetProductSetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_product_set_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_product_set({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_product_set name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_product_set ::Google::Cloud::Vision::V1::GetProductSetRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_product_set({ 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_product_set(::Google::Cloud::Vision::V1::GetProductSetRequest.new(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_product_set_client_stub.call_rpc_count + end + end + + def test_update_product_set + # Create GRPC objects. + grpc_response = ::Google::Cloud::Vision::V1::ProductSet.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + product_set = {} + update_mask = {} + + update_product_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_product_set, name + assert_kind_of ::Google::Cloud::Vision::V1::UpdateProductSetRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Vision::V1::ProductSet), request["product_set"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_product_set_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_product_set({ product_set: product_set, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_product_set product_set: product_set, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_product_set ::Google::Cloud::Vision::V1::UpdateProductSetRequest.new(product_set: product_set, 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_product_set({ product_set: product_set, 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_product_set(::Google::Cloud::Vision::V1::UpdateProductSetRequest.new(product_set: product_set, 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_product_set_client_stub.call_rpc_count + end + end + + def test_delete_product_set + # 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_product_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_product_set, name + assert_kind_of ::Google::Cloud::Vision::V1::DeleteProductSetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_product_set_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_product_set({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_product_set name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_product_set ::Google::Cloud::Vision::V1::DeleteProductSetRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_product_set({ 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_product_set(::Google::Cloud::Vision::V1::DeleteProductSetRequest.new(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_product_set_client_stub.call_rpc_count + end + end + + def test_create_product + # Create GRPC objects. + grpc_response = ::Google::Cloud::Vision::V1::Product.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + product = {} + product_id = "hello world" + + create_product_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_product, name + assert_kind_of ::Google::Cloud::Vision::V1::CreateProductRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Vision::V1::Product), request["product"] + assert_equal "hello world", request["product_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_product_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_product({ parent: parent, product: product, product_id: product_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_product parent: parent, product: product, product_id: product_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_product ::Google::Cloud::Vision::V1::CreateProductRequest.new(parent: parent, product: product, product_id: product_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_product({ parent: parent, product: product, product_id: product_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_product(::Google::Cloud::Vision::V1::CreateProductRequest.new(parent: parent, product: product, product_id: product_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_product_client_stub.call_rpc_count + end + end + + def test_list_products + # Create GRPC objects. + grpc_response = ::Google::Cloud::Vision::V1::ListProductsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_products_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_products, name + assert_kind_of ::Google::Cloud::Vision::V1::ListProductsRequest, 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_products_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_products({ 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_products 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_products ::Google::Cloud::Vision::V1::ListProductsRequest.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_products({ 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_products(::Google::Cloud::Vision::V1::ListProductsRequest.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_products_client_stub.call_rpc_count + end + end + + def test_get_product + # Create GRPC objects. + grpc_response = ::Google::Cloud::Vision::V1::Product.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_product_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_product, name + assert_kind_of ::Google::Cloud::Vision::V1::GetProductRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_product_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_product({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_product name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_product ::Google::Cloud::Vision::V1::GetProductRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_product({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_product(::Google::Cloud::Vision::V1::GetProductRequest.new(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_product_client_stub.call_rpc_count + end + end + + def test_update_product + # Create GRPC objects. + grpc_response = ::Google::Cloud::Vision::V1::Product.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + product = {} + update_mask = {} + + update_product_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_product, name + assert_kind_of ::Google::Cloud::Vision::V1::UpdateProductRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Vision::V1::Product), request["product"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_product_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_product({ product: product, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_product product: product, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_product ::Google::Cloud::Vision::V1::UpdateProductRequest.new(product: product, 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_product({ product: product, 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_product(::Google::Cloud::Vision::V1::UpdateProductRequest.new(product: product, 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_product_client_stub.call_rpc_count + end + end + + def test_delete_product + # 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_product_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_product, name + assert_kind_of ::Google::Cloud::Vision::V1::DeleteProductRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_product_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_product({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_product name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_product ::Google::Cloud::Vision::V1::DeleteProductRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_product({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_product(::Google::Cloud::Vision::V1::DeleteProductRequest.new(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_product_client_stub.call_rpc_count + end + end + + def test_create_reference_image + # Create GRPC objects. + grpc_response = ::Google::Cloud::Vision::V1::ReferenceImage.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + reference_image = {} + reference_image_id = "hello world" + + create_reference_image_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_reference_image, name + assert_kind_of ::Google::Cloud::Vision::V1::CreateReferenceImageRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Vision::V1::ReferenceImage), request["reference_image"] + assert_equal "hello world", request["reference_image_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_reference_image_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_reference_image({ parent: parent, reference_image: reference_image, reference_image_id: reference_image_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_reference_image parent: parent, reference_image: reference_image, reference_image_id: reference_image_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_reference_image ::Google::Cloud::Vision::V1::CreateReferenceImageRequest.new(parent: parent, reference_image: reference_image, reference_image_id: reference_image_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_reference_image({ parent: parent, reference_image: reference_image, reference_image_id: reference_image_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_reference_image(::Google::Cloud::Vision::V1::CreateReferenceImageRequest.new(parent: parent, reference_image: reference_image, reference_image_id: reference_image_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_reference_image_client_stub.call_rpc_count + end + end + + def test_delete_reference_image + # 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_reference_image_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_reference_image, name + assert_kind_of ::Google::Cloud::Vision::V1::DeleteReferenceImageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_reference_image_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_reference_image({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_reference_image name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_reference_image ::Google::Cloud::Vision::V1::DeleteReferenceImageRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_reference_image({ 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_reference_image(::Google::Cloud::Vision::V1::DeleteReferenceImageRequest.new(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_reference_image_client_stub.call_rpc_count + end + end + + def test_list_reference_images + # Create GRPC objects. + grpc_response = ::Google::Cloud::Vision::V1::ListReferenceImagesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_reference_images_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_reference_images, name + assert_kind_of ::Google::Cloud::Vision::V1::ListReferenceImagesRequest, 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_reference_images_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_reference_images({ 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_reference_images 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_reference_images ::Google::Cloud::Vision::V1::ListReferenceImagesRequest.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_reference_images({ 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_reference_images(::Google::Cloud::Vision::V1::ListReferenceImagesRequest.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_reference_images_client_stub.call_rpc_count + end + end + + def test_get_reference_image + # Create GRPC objects. + grpc_response = ::Google::Cloud::Vision::V1::ReferenceImage.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_reference_image_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_reference_image, name + assert_kind_of ::Google::Cloud::Vision::V1::GetReferenceImageRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_reference_image_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_reference_image({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_reference_image name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_reference_image ::Google::Cloud::Vision::V1::GetReferenceImageRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_reference_image({ 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_reference_image(::Google::Cloud::Vision::V1::GetReferenceImageRequest.new(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_reference_image_client_stub.call_rpc_count + end + end + + def test_add_product_to_product_set + # 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" + product = "hello world" + + add_product_to_product_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :add_product_to_product_set, name + assert_kind_of ::Google::Cloud::Vision::V1::AddProductToProductSetRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["product"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, add_product_to_product_set_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.add_product_to_product_set({ name: name, product: product }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.add_product_to_product_set name: name, product: product do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.add_product_to_product_set ::Google::Cloud::Vision::V1::AddProductToProductSetRequest.new(name: name, product: product) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.add_product_to_product_set({ name: name, product: product }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.add_product_to_product_set(::Google::Cloud::Vision::V1::AddProductToProductSetRequest.new(name: name, product: product), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, add_product_to_product_set_client_stub.call_rpc_count + end + end + + def test_remove_product_from_product_set + # 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" + product = "hello world" + + remove_product_from_product_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :remove_product_from_product_set, name + assert_kind_of ::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["product"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, remove_product_from_product_set_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.remove_product_from_product_set({ name: name, product: product }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.remove_product_from_product_set name: name, product: product do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.remove_product_from_product_set ::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest.new(name: name, product: product) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.remove_product_from_product_set({ name: name, product: product }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.remove_product_from_product_set(::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest.new(name: name, product: product), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, remove_product_from_product_set_client_stub.call_rpc_count + end + end + + def test_list_products_in_product_set + # Create GRPC objects. + grpc_response = ::Google::Cloud::Vision::V1::ListProductsInProductSetResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + page_size = 42 + page_token = "hello world" + + list_products_in_product_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_products_in_product_set, name + assert_kind_of ::Google::Cloud::Vision::V1::ListProductsInProductSetRequest, request + assert_equal "hello world", request["name"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_products_in_product_set_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_products_in_product_set({ name: name, 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_products_in_product_set name: name, 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_products_in_product_set ::Google::Cloud::Vision::V1::ListProductsInProductSetRequest.new(name: name, 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_products_in_product_set({ name: name, 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_products_in_product_set(::Google::Cloud::Vision::V1::ListProductsInProductSetRequest.new(name: name, 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_products_in_product_set_client_stub.call_rpc_count + end + end + + def test_import_product_sets + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + input_config = {} + + import_product_sets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :import_product_sets, name + assert_kind_of ::Google::Cloud::Vision::V1::ImportProductSetsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Vision::V1::ImportProductSetsInputConfig), request["input_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, import_product_sets_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.import_product_sets({ parent: parent, input_config: input_config }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.import_product_sets parent: parent, input_config: input_config do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.import_product_sets ::Google::Cloud::Vision::V1::ImportProductSetsRequest.new(parent: parent, input_config: input_config) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.import_product_sets({ parent: parent, input_config: input_config }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.import_product_sets(::Google::Cloud::Vision::V1::ImportProductSetsRequest.new(parent: parent, input_config: input_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, import_product_sets_client_stub.call_rpc_count + end + end + + def test_purge_products + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + product_set_purge_config = {} + parent = "hello world" + force = true + + purge_products_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :purge_products, name + assert_kind_of ::Google::Cloud::Vision::V1::PurgeProductsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Vision::V1::ProductSetPurgeConfig), request["product_set_purge_config"] + assert_equal :product_set_purge_config, request.target + assert_equal "hello world", request["parent"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, purge_products_client_stub do + # Create client + client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.purge_products({ product_set_purge_config: product_set_purge_config, parent: parent, 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.purge_products product_set_purge_config: product_set_purge_config, parent: parent, 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.purge_products ::Google::Cloud::Vision::V1::PurgeProductsRequest.new(product_set_purge_config: product_set_purge_config, parent: parent, 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.purge_products({ product_set_purge_config: product_set_purge_config, parent: parent, 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.purge_products(::Google::Cloud::Vision::V1::PurgeProductsRequest.new(product_set_purge_config: product_set_purge_config, parent: parent, 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, purge_products_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::Vision::V1::ProductSearch::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::Vision::V1::ProductSearch::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::Vision::V1::ProductSearch::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Vision::V1::ProductSearch::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::Vision::V1::ProductSearch::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Vision::V1::ProductSearch::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-vision-v1/test/helper.rb b/owl-bot-staging/google-cloud-vision-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-vision-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" From 3cfa608add4d57cf3fd32cf1e450bab6a6996e8a Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 25 Mar 2026 21:25:10 +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 --- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../google-cloud-talent-v4beta1/.gitignore | 22 - .../.repo-metadata.json | 18 - .../google-cloud-talent-v4beta1/.rubocop.yml | 33 - .../google-cloud-talent-v4beta1/.toys.rb | 28 - .../google-cloud-talent-v4beta1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-talent-v4beta1/CHANGELOG.md | 2 - .../google-cloud-talent-v4beta1/Gemfile | 14 - .../google-cloud-talent-v4beta1/LICENSE.md | 201 - .../google-cloud-talent-v4beta1/README.md | 154 - .../google-cloud-talent-v4beta1/Rakefile | 169 - .../gapic_metadata.json | 164 - .../google-cloud-talent-v4beta1.gemspec | 28 - .../lib/google-cloud-talent-v4beta1.rb | 21 - .../lib/google/cloud/talent/v4beta1.rb | 49 - .../google/cloud/talent/v4beta1/batch_pb.rb | 20 - .../google/cloud/talent/v4beta1/common_pb.rb | 53 - .../google/cloud/talent/v4beta1/company_pb.rb | 26 - .../cloud/talent/v4beta1/company_service.rb | 55 - .../talent/v4beta1/company_service/client.rb | 920 ---- .../v4beta1/company_service/credentials.rb | 52 - .../talent/v4beta1/company_service/paths.rb | 105 - .../talent/v4beta1/company_service/rest.rb | 52 - .../v4beta1/company_service/rest/client.rb | 842 --- .../company_service/rest/service_stub.rb | 425 -- .../talent/v4beta1/company_service_pb.rb | 35 - .../v4beta1/company_service_services_pb.rb | 54 - .../google/cloud/talent/v4beta1/completion.rb | 55 - .../cloud/talent/v4beta1/completion/client.rb | 516 -- .../talent/v4beta1/completion/credentials.rb | 52 - .../cloud/talent/v4beta1/completion/paths.rb | 105 - .../cloud/talent/v4beta1/completion/rest.rb | 52 - .../talent/v4beta1/completion/rest/client.rb | 466 -- .../v4beta1/completion/rest/service_stub.rb | 149 - .../talent/v4beta1/completion_service_pb.rb | 31 - .../v4beta1/completion_service_services_pb.rb | 46 - .../google/cloud/talent/v4beta1/event_pb.rb | 26 - .../cloud/talent/v4beta1/event_service.rb | 55 - .../talent/v4beta1/event_service/client.rb | 489 -- .../v4beta1/event_service/credentials.rb | 52 - .../talent/v4beta1/event_service/paths.rb | 64 - .../talent/v4beta1/event_service/rest.rb | 52 - .../v4beta1/event_service/rest/client.rb | 439 -- .../event_service/rest/service_stub.rb | 151 - .../cloud/talent/v4beta1/event_service_pb.rb | 27 - .../v4beta1/event_service_services_pb.rb | 51 - .../google/cloud/talent/v4beta1/filters_pb.rb | 33 - .../cloud/talent/v4beta1/histogram_pb.rb | 22 - .../lib/google/cloud/talent/v4beta1/job_pb.rb | 29 - .../cloud/talent/v4beta1/job_service.rb | 56 - .../talent/v4beta1/job_service/client.rb | 2083 -------- .../talent/v4beta1/job_service/credentials.rb | 52 - .../talent/v4beta1/job_service/operations.rb | 841 --- .../cloud/talent/v4beta1/job_service/paths.rb | 146 - .../cloud/talent/v4beta1/job_service/rest.rb | 53 - .../talent/v4beta1/job_service/rest/client.rb | 1970 ------- .../v4beta1/job_service/rest/operations.rb | 925 ---- .../v4beta1/job_service/rest/service_stub.rb | 774 --- .../cloud/talent/v4beta1/job_service_pb.rb | 56 - .../talent/v4beta1/job_service_services_pb.rb | 90 - .../lib/google/cloud/talent/v4beta1/rest.rb | 41 - .../google/cloud/talent/v4beta1/tenant_pb.rb | 25 - .../cloud/talent/v4beta1/tenant_service.rb | 55 - .../talent/v4beta1/tenant_service/client.rb | 899 ---- .../v4beta1/tenant_service/credentials.rb | 52 - .../talent/v4beta1/tenant_service/paths.rb | 64 - .../talent/v4beta1/tenant_service/rest.rb | 52 - .../v4beta1/tenant_service/rest/client.rb | 821 --- .../tenant_service/rest/service_stub.rb | 388 -- .../cloud/talent/v4beta1/tenant_service_pb.rb | 35 - .../v4beta1/tenant_service_services_pb.rb | 53 - .../google/cloud/talent/v4beta1/version.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../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/talent/v4beta1/common.rb | 955 ---- .../google/cloud/talent/v4beta1/company.rb | 126 - .../cloud/talent/v4beta1/company_service.rb | 144 - .../talent/v4beta1/completion_service.rb | 154 - .../google/cloud/talent/v4beta1/event.rb | 188 - .../cloud/talent/v4beta1/event_service.rb | 43 - .../google/cloud/talent/v4beta1/filters.rb | 404 -- .../google/cloud/talent/v4beta1/histogram.rb | 74 - .../google/cloud/talent/v4beta1/job.rb | 389 -- .../cloud/talent/v4beta1/job_service.rb | 914 ---- .../google/cloud/talent/v4beta1/tenant.rb | 81 - .../cloud/talent/v4beta1/tenant_service.rb | 123 - .../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 | 148 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/latlng.rb | 38 - .../proto_docs/google/type/money.rb | 43 - .../proto_docs/google/type/postal_address.rb | 135 - .../proto_docs/google/type/timeofday.rb | 45 - .../snippets/Gemfile | 32 - .../company_service/create_company.rb | 47 - .../company_service/delete_company.rb | 47 - .../snippets/company_service/get_company.rb | 47 - .../company_service/list_companies.rb | 51 - .../company_service/update_company.rb | 47 - .../snippets/completion/complete_query.rb | 47 - .../event_service/create_client_event.rb | 47 - .../snippets/job_service/batch_create_jobs.rb | 54 - .../snippets/job_service/batch_delete_jobs.rb | 47 - .../snippets/job_service/batch_update_jobs.rb | 54 - .../snippets/job_service/create_job.rb | 47 - .../snippets/job_service/delete_job.rb | 47 - .../snippets/job_service/get_job.rb | 47 - .../snippets/job_service/list_jobs.rb | 51 - .../snippets/job_service/search_jobs.rb | 47 - .../job_service/search_jobs_for_alert.rb | 47 - .../snippets/job_service/update_job.rb | 47 - ..._metadata_google.cloud.talent.v4beta1.json | 895 ---- .../snippets/tenant_service/create_tenant.rb | 47 - .../snippets/tenant_service/delete_tenant.rb | 47 - .../snippets/tenant_service/get_tenant.rb | 47 - .../snippets/tenant_service/list_tenants.rb | 51 - .../snippets/tenant_service/update_tenant.rb | 47 - .../v4beta1/company_service_paths_test.rb | 82 - .../v4beta1/company_service_rest_test.rb | 374 -- .../talent/v4beta1/company_service_test.rb | 409 -- .../talent/v4beta1/completion_paths_test.rb | 82 - .../talent/v4beta1/completion_rest_test.rb | 159 - .../cloud/talent/v4beta1/completion_test.rb | 174 - .../v4beta1/event_service_paths_test.rb | 67 - .../talent/v4beta1/event_service_rest_test.rb | 154 - .../talent/v4beta1/event_service_test.rb | 164 - .../v4beta1/job_service_operations_test.rb | 400 -- .../talent/v4beta1/job_service_paths_test.rb | 97 - .../talent/v4beta1/job_service_rest_test.rb | 681 --- .../cloud/talent/v4beta1/job_service_test.rb | 797 --- .../v4beta1/tenant_service_paths_test.rb | 67 - .../v4beta1/tenant_service_rest_test.rb | 373 -- .../talent/v4beta1/tenant_service_test.rb | 407 -- .../test/helper.rb | 26 - .../google-cloud-tasks-v2/.gitignore | 22 - .../google-cloud-tasks-v2/.repo-metadata.json | 18 - .../google-cloud-tasks-v2/.rubocop.yml | 33 - .../google-cloud-tasks-v2/.toys.rb | 28 - .../google-cloud-tasks-v2/.yardopts | 12 - .../google-cloud-tasks-v2/AUTHENTICATION.md | 122 - .../google-cloud-tasks-v2/CHANGELOG.md | 2 - owl-bot-staging/google-cloud-tasks-v2/Gemfile | 14 - .../google-cloud-tasks-v2/LICENSE.md | 201 - .../google-cloud-tasks-v2/README.md | 154 - .../google-cloud-tasks-v2/Rakefile | 169 - .../google-cloud-tasks-v2/gapic_metadata.json | 98 - .../google-cloud-tasks-v2.gemspec | 30 - .../lib/google-cloud-tasks-v2.rb | 21 - .../lib/google/cloud/tasks/v2.rb | 45 - .../cloud/tasks/v2/bindings_override.rb | 75 - .../lib/google/cloud/tasks/v2/cloud_tasks.rb | 56 - .../cloud/tasks/v2/cloud_tasks/client.rb | 2259 -------- .../cloud/tasks/v2/cloud_tasks/credentials.rb | 51 - .../cloud/tasks/v2/cloud_tasks/paths.rb | 90 - .../google/cloud/tasks/v2/cloud_tasks/rest.rb | 54 - .../cloud/tasks/v2/cloud_tasks/rest/client.rb | 2112 -------- .../tasks/v2/cloud_tasks/rest/service_stub.rb | 1067 ---- .../google/cloud/tasks/v2/cloudtasks_pb.rb | 46 - .../cloud/tasks/v2/cloudtasks_services_pb.rb | 206 - .../lib/google/cloud/tasks/v2/queue_pb.rb | 30 - .../lib/google/cloud/tasks/v2/rest.rb | 38 - .../lib/google/cloud/tasks/v2/target_pb.rb | 28 - .../lib/google/cloud/tasks/v2/task_pb.rb | 29 - .../lib/google/cloud/tasks/v2/version.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../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/tasks/v2/cloudtasks.rb | 375 -- .../proto_docs/google/cloud/tasks/v2/queue.rb | 376 -- .../google/cloud/tasks/v2/target.rb | 466 -- .../proto_docs/google/cloud/tasks/v2/task.rb | 196 - .../proto_docs/google/iam/v1/iam_policy.rb | 87 - .../proto_docs/google/iam/v1/options.rb | 50 - .../proto_docs/google/iam/v1/policy.rb | 426 -- .../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 - .../google-cloud-tasks-v2/snippets/Gemfile | 32 - .../snippets/cloud_tasks/create_queue.rb | 47 - .../snippets/cloud_tasks/create_task.rb | 47 - .../snippets/cloud_tasks/delete_queue.rb | 47 - .../snippets/cloud_tasks/delete_task.rb | 47 - .../snippets/cloud_tasks/get_iam_policy.rb | 47 - .../snippets/cloud_tasks/get_queue.rb | 47 - .../snippets/cloud_tasks/get_task.rb | 47 - .../snippets/cloud_tasks/list_queues.rb | 51 - .../snippets/cloud_tasks/list_tasks.rb | 51 - .../snippets/cloud_tasks/pause_queue.rb | 47 - .../snippets/cloud_tasks/purge_queue.rb | 47 - .../snippets/cloud_tasks/resume_queue.rb | 47 - .../snippets/cloud_tasks/run_task.rb | 47 - .../snippets/cloud_tasks/set_iam_policy.rb | 47 - .../cloud_tasks/test_iam_permissions.rb | 47 - .../snippets/cloud_tasks/update_queue.rb | 47 - ...nippet_metadata_google.cloud.tasks.v2.json | 655 --- .../cloud/tasks/v2/cloud_tasks_paths_test.rb | 79 - .../cloud/tasks/v2/cloud_tasks_rest_test.rb | 979 ---- .../google/cloud/tasks/v2/cloud_tasks_test.rb | 1074 ---- .../google-cloud-tasks-v2/test/helper.rb | 26 - .../google-cloud-tasks-v2beta2/.gitignore | 22 - .../.repo-metadata.json | 18 - .../google-cloud-tasks-v2beta2/.rubocop.yml | 33 - .../google-cloud-tasks-v2beta2/.toys.rb | 28 - .../google-cloud-tasks-v2beta2/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-tasks-v2beta2/CHANGELOG.md | 2 - .../google-cloud-tasks-v2beta2/Gemfile | 14 - .../google-cloud-tasks-v2beta2/LICENSE.md | 201 - .../google-cloud-tasks-v2beta2/README.md | 154 - .../google-cloud-tasks-v2beta2/Rakefile | 169 - .../gapic_metadata.json | 123 - .../google-cloud-tasks-v2beta2.gemspec | 30 - .../lib/google-cloud-tasks-v2beta2.rb | 21 - .../lib/google/cloud/tasks/v2beta2.rb | 45 - .../cloud/tasks/v2beta2/bindings_override.rb | 75 - .../google/cloud/tasks/v2beta2/cloud_tasks.rb | 56 - .../cloud/tasks/v2beta2/cloud_tasks/client.rb | 2936 ----------- .../tasks/v2beta2/cloud_tasks/credentials.rb | 51 - .../cloud/tasks/v2beta2/cloud_tasks/paths.rb | 90 - .../cloud/tasks/v2beta2/cloud_tasks/rest.rb | 54 - .../tasks/v2beta2/cloud_tasks/rest/client.rb | 2667 ---------- .../v2beta2/cloud_tasks/rest/service_stub.rb | 1315 ----- .../cloud/tasks/v2beta2/cloudtasks_pb.rb | 55 - .../tasks/v2beta2/cloudtasks_services_pb.rb | 274 - .../cloud/tasks/v2beta2/old_target_pb.rb | 20 - .../google/cloud/tasks/v2beta2/queue_pb.rb | 31 - .../lib/google/cloud/tasks/v2beta2/rest.rb | 38 - .../google/cloud/tasks/v2beta2/target_pb.rb | 39 - .../lib/google/cloud/tasks/v2beta2/task_pb.rb | 29 - .../lib/google/cloud/tasks/v2beta2/version.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/httpbody.rb | 80 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../google/cloud/tasks/v2beta2/cloudtasks.rb | 608 --- .../google/cloud/tasks/v2beta2/queue.rb | 448 -- .../google/cloud/tasks/v2beta2/target.rb | 775 --- .../google/cloud/tasks/v2beta2/task.rb | 208 - .../proto_docs/google/iam/v1/iam_policy.rb | 87 - .../proto_docs/google/iam/v1/options.rb | 50 - .../proto_docs/google/iam/v1/policy.rb | 426 -- .../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 - .../snippets/cloud_tasks/acknowledge_task.rb | 47 - .../snippets/cloud_tasks/cancel_lease.rb | 47 - .../snippets/cloud_tasks/create_queue.rb | 47 - .../snippets/cloud_tasks/create_task.rb | 47 - .../snippets/cloud_tasks/delete_queue.rb | 47 - .../snippets/cloud_tasks/delete_task.rb | 47 - .../snippets/cloud_tasks/get_iam_policy.rb | 47 - .../snippets/cloud_tasks/get_queue.rb | 47 - .../snippets/cloud_tasks/get_task.rb | 47 - .../snippets/cloud_tasks/lease_tasks.rb | 47 - .../snippets/cloud_tasks/list_queues.rb | 51 - .../snippets/cloud_tasks/list_tasks.rb | 51 - .../snippets/cloud_tasks/pause_queue.rb | 47 - .../snippets/cloud_tasks/purge_queue.rb | 47 - .../snippets/cloud_tasks/renew_lease.rb | 47 - .../snippets/cloud_tasks/resume_queue.rb | 47 - .../snippets/cloud_tasks/run_task.rb | 47 - .../snippets/cloud_tasks/set_iam_policy.rb | 47 - .../cloud_tasks/test_iam_permissions.rb | 47 - .../snippets/cloud_tasks/update_queue.rb | 47 - .../snippets/cloud_tasks/upload_queue_yaml.rb | 47 - ...t_metadata_google.cloud.tasks.v2beta2.json | 855 --- .../tasks/v2beta2/cloud_tasks_paths_test.rb | 79 - .../tasks/v2beta2/cloud_tasks_rest_test.rb | 1207 ----- .../cloud/tasks/v2beta2/cloud_tasks_test.rb | 1391 ----- .../google-cloud-tasks-v2beta2/test/helper.rb | 26 - .../google-cloud-tasks-v2beta3/.gitignore | 22 - .../.repo-metadata.json | 18 - .../google-cloud-tasks-v2beta3/.rubocop.yml | 33 - .../google-cloud-tasks-v2beta3/.toys.rb | 28 - .../google-cloud-tasks-v2beta3/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-tasks-v2beta3/CHANGELOG.md | 2 - .../google-cloud-tasks-v2beta3/Gemfile | 14 - .../google-cloud-tasks-v2beta3/LICENSE.md | 201 - .../google-cloud-tasks-v2beta3/README.md | 154 - .../google-cloud-tasks-v2beta3/Rakefile | 169 - .../gapic_metadata.json | 98 - .../google-cloud-tasks-v2beta3.gemspec | 30 - .../lib/google-cloud-tasks-v2beta3.rb | 21 - .../lib/google/cloud/tasks/v2beta3.rb | 45 - .../cloud/tasks/v2beta3/bindings_override.rb | 75 - .../google/cloud/tasks/v2beta3/cloud_tasks.rb | 56 - .../cloud/tasks/v2beta3/cloud_tasks/client.rb | 2277 -------- .../tasks/v2beta3/cloud_tasks/credentials.rb | 51 - .../cloud/tasks/v2beta3/cloud_tasks/paths.rb | 90 - .../cloud/tasks/v2beta3/cloud_tasks/rest.rb | 54 - .../tasks/v2beta3/cloud_tasks/rest/client.rb | 2130 -------- .../v2beta3/cloud_tasks/rest/service_stub.rb | 1067 ---- .../cloud/tasks/v2beta3/cloudtasks_pb.rb | 46 - .../tasks/v2beta3/cloudtasks_services_pb.rb | 208 - .../google/cloud/tasks/v2beta3/queue_pb.rb | 33 - .../lib/google/cloud/tasks/v2beta3/rest.rb | 38 - .../google/cloud/tasks/v2beta3/target_pb.rb | 36 - .../lib/google/cloud/tasks/v2beta3/task_pb.rb | 29 - .../lib/google/cloud/tasks/v2beta3/version.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../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/tasks/v2beta3/cloudtasks.rb | 396 -- .../google/cloud/tasks/v2beta3/queue.rb | 462 -- .../google/cloud/tasks/v2beta3/target.rb | 728 --- .../google/cloud/tasks/v2beta3/task.rb | 213 - .../proto_docs/google/iam/v1/iam_policy.rb | 87 - .../proto_docs/google/iam/v1/options.rb | 50 - .../proto_docs/google/iam/v1/policy.rb | 426 -- .../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 - .../snippets/cloud_tasks/create_queue.rb | 47 - .../snippets/cloud_tasks/create_task.rb | 47 - .../snippets/cloud_tasks/delete_queue.rb | 47 - .../snippets/cloud_tasks/delete_task.rb | 47 - .../snippets/cloud_tasks/get_iam_policy.rb | 47 - .../snippets/cloud_tasks/get_queue.rb | 47 - .../snippets/cloud_tasks/get_task.rb | 47 - .../snippets/cloud_tasks/list_queues.rb | 51 - .../snippets/cloud_tasks/list_tasks.rb | 51 - .../snippets/cloud_tasks/pause_queue.rb | 47 - .../snippets/cloud_tasks/purge_queue.rb | 47 - .../snippets/cloud_tasks/resume_queue.rb | 47 - .../snippets/cloud_tasks/run_task.rb | 47 - .../snippets/cloud_tasks/set_iam_policy.rb | 47 - .../cloud_tasks/test_iam_permissions.rb | 47 - .../snippets/cloud_tasks/update_queue.rb | 47 - ...t_metadata_google.cloud.tasks.v2beta3.json | 655 --- .../tasks/v2beta3/cloud_tasks_paths_test.rb | 79 - .../tasks/v2beta3/cloud_tasks_rest_test.rb | 981 ---- .../cloud/tasks/v2beta3/cloud_tasks_test.rb | 1078 ---- .../google-cloud-tasks-v2beta3/test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../google-cloud-telco_automation-v1/.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-telco_automation-v1/Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 153 - .../google-cloud-telco_automation-v1/Rakefile | 169 - .../gapic_metadata.json | 198 - .../google-cloud-telco_automation-v1.gemspec | 29 - .../lib/google-cloud-telco_automation-v1.rb | 21 - .../lib/google/cloud/telco_automation/v1.rb | 45 - .../telco_automation/v1/bindings_override.rb | 75 - .../google/cloud/telco_automation/v1/rest.rb | 38 - .../telco_automation/v1/telco_automation.rb | 60 - .../v1/telco_automation/client.rb | 4039 --------------- .../v1/telco_automation/credentials.rb | 47 - .../v1/telco_automation/operations.rb | 841 --- .../v1/telco_automation/paths.rb | 172 - .../v1/telco_automation/rest.rb | 58 - .../v1/telco_automation/rest/client.rb | 3752 -------------- .../v1/telco_automation/rest/operations.rb | 925 ---- .../v1/telco_automation/rest/service_stub.rb | 2293 -------- .../cloud/telco_automation/v1/version.rb | 28 - .../telcoautomation/v1/telcoautomation_pb.rb | 108 - .../v1/telcoautomation_services_pb.rb | 126 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../telcoautomation/v1/telcoautomation.rb | 1551 ------ .../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 - .../snippets/Gemfile | 32 - ...adata_google.cloud.telcoautomation.v1.json | 1455 ------ .../telco_automation/apply_deployment.rb | 47 - .../apply_hydrated_deployment.rb | 47 - .../telco_automation/approve_blueprint.rb | 47 - .../compute_deployment_status.rb | 47 - .../telco_automation/create_blueprint.rb | 47 - .../telco_automation/create_deployment.rb | 47 - .../telco_automation/create_edge_slm.rb | 54 - .../create_orchestration_cluster.rb | 54 - .../telco_automation/delete_blueprint.rb | 47 - .../telco_automation/delete_edge_slm.rb | 54 - .../delete_orchestration_cluster.rb | 54 - .../discard_blueprint_changes.rb | 47 - .../discard_deployment_changes.rb | 47 - .../telco_automation/get_blueprint.rb | 47 - .../telco_automation/get_deployment.rb | 47 - .../snippets/telco_automation/get_edge_slm.rb | 47 - .../get_hydrated_deployment.rb | 47 - .../get_orchestration_cluster.rb | 47 - .../telco_automation/get_public_blueprint.rb | 47 - .../list_blueprint_revisions.rb | 51 - .../telco_automation/list_blueprints.rb | 51 - .../list_deployment_revisions.rb | 51 - .../telco_automation/list_deployments.rb | 51 - .../telco_automation/list_edge_slms.rb | 51 - .../list_hydrated_deployments.rb | 51 - .../list_orchestration_clusters.rb | 51 - .../list_public_blueprints.rb | 51 - .../telco_automation/propose_blueprint.rb | 47 - .../telco_automation/reject_blueprint.rb | 47 - .../telco_automation/remove_deployment.rb | 47 - .../telco_automation/rollback_deployment.rb | 47 - .../search_blueprint_revisions.rb | 51 - .../search_deployment_revisions.rb | 51 - .../telco_automation/update_blueprint.rb | 47 - .../telco_automation/update_deployment.rb | 47 - .../update_hydrated_deployment.rb | 47 - .../v1/telco_automation_operations_test.rb | 400 -- .../v1/telco_automation_paths_test.rb | 127 - .../v1/telco_automation_rest_test.rb | 2089 -------- .../v1/telco_automation_test.rb | 2368 --------- .../test/helper.rb | 26 - .../google-cloud-text_to_speech-v1/.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../google-cloud-text_to_speech-v1/.toys.rb | 28 - .../google-cloud-text_to_speech-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-text_to_speech-v1/Gemfile | 14 - .../google-cloud-text_to_speech-v1/LICENSE.md | 201 - .../google-cloud-text_to_speech-v1/README.md | 154 - .../google-cloud-text_to_speech-v1/Rakefile | 169 - .../gapic_metadata.json | 47 - .../google-cloud-text_to_speech-v1.gemspec | 28 - .../lib/google-cloud-text_to_speech-v1.rb | 21 - .../lib/google/cloud/text_to_speech/v1.rb | 46 - .../google/cloud/text_to_speech/v1/rest.rb | 38 - .../cloud/text_to_speech/v1/text_to_speech.rb | 55 - .../v1/text_to_speech/client.rb | 655 --- .../v1/text_to_speech/credentials.rb | 51 - .../text_to_speech/v1/text_to_speech/paths.rb | 52 - .../text_to_speech/v1/text_to_speech/rest.rb | 52 - .../v1/text_to_speech/rest/client.rb | 528 -- .../v1/text_to_speech/rest/service_stub.rb | 200 - .../text_to_speech_long_audio_synthesize.rb | 56 - .../client.rb | 510 -- .../credentials.rb | 51 - .../operations.rb | 841 --- .../paths.rb | 52 - .../rest.rb | 53 - .../rest/client.rb | 460 -- .../rest/operations.rb | 925 ---- .../rest/service_stub.rb | 143 - .../google/cloud/text_to_speech/v1/version.rb | 28 - .../cloud/texttospeech/v1/cloud_tts_lrs_pb.rb | 30 - .../v1/cloud_tts_lrs_services_pb.rb | 45 - .../cloud/texttospeech/v1/cloud_tts_pb.rb | 51 - .../texttospeech/v1/cloud_tts_services_pb.rb | 51 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../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/texttospeech/v1/cloud_tts.rb | 583 --- .../cloud/texttospeech/v1/cloud_tts_lrs.rb | 73 - .../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/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - ...metadata_google.cloud.texttospeech.v1.json | 175 - .../snippets/text_to_speech/list_voices.rb | 47 - .../text_to_speech/streaming_synthesize.rb | 56 - .../text_to_speech/synthesize_speech.rb | 47 - .../synthesize_long_audio.rb | 54 - ...h_long_audio_synthesize_operations_test.rb | 400 -- ...speech_long_audio_synthesize_paths_test.rb | 55 - ..._speech_long_audio_synthesize_rest_test.rb | 157 - ...xt_to_speech_long_audio_synthesize_test.rb | 189 - .../v1/text_to_speech_paths_test.rb | 55 - .../v1/text_to_speech_rest_test.rb | 210 - .../text_to_speech/v1/text_to_speech_test.rb | 316 -- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 47 - ...oogle-cloud-text_to_speech-v1beta1.gemspec | 28 - .../google-cloud-text_to_speech-v1beta1.rb | 21 - .../google/cloud/text_to_speech/v1beta1.rb | 46 - .../cloud/text_to_speech/v1beta1/rest.rb | 38 - .../text_to_speech/v1beta1/text_to_speech.rb | 55 - .../v1beta1/text_to_speech/client.rb | 657 --- .../v1beta1/text_to_speech/credentials.rb | 51 - .../v1beta1/text_to_speech/paths.rb | 52 - .../v1beta1/text_to_speech/rest.rb | 52 - .../v1beta1/text_to_speech/rest/client.rb | 530 -- .../text_to_speech/rest/service_stub.rb | 200 - .../text_to_speech_long_audio_synthesize.rb | 56 - .../client.rb | 510 -- .../credentials.rb | 51 - .../operations.rb | 841 --- .../paths.rb | 52 - .../rest.rb | 53 - .../rest/client.rb | 460 -- .../rest/operations.rb | 925 ---- .../rest/service_stub.rb | 143 - .../cloud/text_to_speech/v1beta1/version.rb | 28 - .../texttospeech/v1beta1/cloud_tts_lrs_pb.rb | 30 - .../v1beta1/cloud_tts_lrs_services_pb.rb | 45 - .../texttospeech/v1beta1/cloud_tts_pb.rb | 53 - .../v1beta1/cloud_tts_services_pb.rb | 51 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../cloud/texttospeech/v1beta1/cloud_tts.rb | 618 --- .../texttospeech/v1beta1/cloud_tts_lrs.rb | 73 - .../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/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - ...ata_google.cloud.texttospeech.v1beta1.json | 175 - .../snippets/text_to_speech/list_voices.rb | 47 - .../text_to_speech/streaming_synthesize.rb | 56 - .../text_to_speech/synthesize_speech.rb | 47 - .../synthesize_long_audio.rb | 54 - ...h_long_audio_synthesize_operations_test.rb | 400 -- ...speech_long_audio_synthesize_paths_test.rb | 55 - ..._speech_long_audio_synthesize_rest_test.rb | 157 - ...xt_to_speech_long_audio_synthesize_test.rb | 189 - .../v1beta1/text_to_speech_paths_test.rb | 55 - .../v1beta1/text_to_speech_rest_test.rb | 211 - .../v1beta1/text_to_speech_test.rb | 318 -- .../test/helper.rb | 26 - .../google-cloud-tpu-v1/.gitignore | 22 - .../google-cloud-tpu-v1/.repo-metadata.json | 18 - .../google-cloud-tpu-v1/.rubocop.yml | 33 - owl-bot-staging/google-cloud-tpu-v1/.toys.rb | 28 - owl-bot-staging/google-cloud-tpu-v1/.yardopts | 12 - .../google-cloud-tpu-v1/AUTHENTICATION.md | 122 - .../google-cloud-tpu-v1/CHANGELOG.md | 2 - owl-bot-staging/google-cloud-tpu-v1/Gemfile | 14 - .../google-cloud-tpu-v1/LICENSE.md | 201 - owl-bot-staging/google-cloud-tpu-v1/README.md | 154 - owl-bot-staging/google-cloud-tpu-v1/Rakefile | 169 - .../google-cloud-tpu-v1/gapic_metadata.json | 73 - .../google-cloud-tpu-v1.gemspec | 29 - .../lib/google-cloud-tpu-v1.rb | 21 - .../lib/google/cloud/tpu/v1.rb | 40 - .../lib/google/cloud/tpu/v1/cloud_tpu_pb.rb | 52 - .../cloud/tpu/v1/cloud_tpu_services_pb.rb | 67 - .../lib/google/cloud/tpu/v1/tpu.rb | 52 - .../lib/google/cloud/tpu/v1/tpu/client.rb | 1517 ------ .../google/cloud/tpu/v1/tpu/credentials.rb | 51 - .../lib/google/cloud/tpu/v1/tpu/operations.rb | 841 --- .../lib/google/cloud/tpu/v1/tpu/paths.rb | 107 - .../lib/google/cloud/tpu/v1/version.rb | 28 - .../google-cloud-tpu-v1/proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../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/tpu/v1/cloud_tpu.rb | 521 -- .../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/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../google-cloud-tpu-v1/snippets/Gemfile | 32 - .../snippet_metadata_google.cloud.tpu.v1.json | 455 -- .../snippets/tpu/create_node.rb | 54 - .../snippets/tpu/delete_node.rb | 54 - .../snippets/tpu/get_accelerator_type.rb | 47 - .../snippets/tpu/get_node.rb | 47 - .../snippets/tpu/get_tensor_flow_version.rb | 47 - .../snippets/tpu/list_accelerator_types.rb | 51 - .../snippets/tpu/list_nodes.rb | 51 - .../snippets/tpu/list_tensor_flow_versions.rb | 51 - .../snippets/tpu/reimage_node.rb | 54 - .../snippets/tpu/start_node.rb | 54 - .../snippets/tpu/stop_node.rb | 54 - .../cloud/tpu/v1/tpu_operations_test.rb | 400 -- .../google/cloud/tpu/v1/tpu_paths_test.rb | 91 - .../test/google/cloud/tpu/v1/tpu_test.rb | 822 --- .../google-cloud-tpu-v1/test/helper.rb | 26 - .../google-cloud-trace-v1/.gitignore | 22 - .../google-cloud-trace-v1/.repo-metadata.json | 18 - .../google-cloud-trace-v1/.rubocop.yml | 33 - .../google-cloud-trace-v1/.toys.rb | 28 - .../google-cloud-trace-v1/.yardopts | 12 - .../google-cloud-trace-v1/AUTHENTICATION.md | 122 - .../google-cloud-trace-v1/CHANGELOG.md | 2 - owl-bot-staging/google-cloud-trace-v1/Gemfile | 14 - .../google-cloud-trace-v1/LICENSE.md | 201 - .../google-cloud-trace-v1/README.md | 154 - .../google-cloud-trace-v1/Rakefile | 169 - .../google-cloud-trace-v1/gapic_metadata.json | 33 - .../google-cloud-trace-v1.gemspec | 28 - .../lib/google-cloud-trace-v1.rb | 21 - .../lib/google/cloud/trace/v1.rb | 45 - .../lib/google/cloud/trace/v1/rest.rb | 37 - .../google/cloud/trace/v1/trace_service.rb | 58 - .../cloud/trace/v1/trace_service/client.rb | 753 --- .../trace/v1/trace_service/credentials.rb | 53 - .../cloud/trace/v1/trace_service/rest.rb | 55 - .../trace/v1/trace_service/rest/client.rb | 686 --- .../v1/trace_service/rest/service_stub.rb | 266 - .../lib/google/cloud/trace/v1/version.rb | 28 - .../google/devtools/cloudtrace/v1/trace_pb.rb | 35 - .../cloudtrace/v1/trace_services_pb.rb | 57 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../google/devtools/cloudtrace/v1/trace.rb | 287 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../google-cloud-trace-v1/snippets/Gemfile | 32 - ...etadata_google.devtools.cloudtrace.v1.json | 135 - .../snippets/trace_service/get_trace.rb | 47 - .../snippets/trace_service/list_traces.rb | 51 - .../snippets/trace_service/patch_traces.rb | 47 - .../cloud/trace/v1/trace_service_rest_test.rb | 270 - .../cloud/trace/v1/trace_service_test.rb | 301 -- .../google-cloud-trace-v1/test/helper.rb | 26 - .../google-cloud-trace-v2/.gitignore | 22 - .../google-cloud-trace-v2/.repo-metadata.json | 18 - .../google-cloud-trace-v2/.rubocop.yml | 33 - .../google-cloud-trace-v2/.toys.rb | 28 - .../google-cloud-trace-v2/.yardopts | 12 - .../google-cloud-trace-v2/AUTHENTICATION.md | 122 - .../google-cloud-trace-v2/CHANGELOG.md | 2 - owl-bot-staging/google-cloud-trace-v2/Gemfile | 14 - .../google-cloud-trace-v2/LICENSE.md | 201 - .../google-cloud-trace-v2/README.md | 154 - .../google-cloud-trace-v2/Rakefile | 169 - .../google-cloud-trace-v2/gapic_metadata.json | 28 - .../google-cloud-trace-v2.gemspec | 28 - .../lib/google-cloud-trace-v2.rb | 21 - .../lib/google/cloud/trace/v2.rb | 45 - .../lib/google/cloud/trace/v2/rest.rb | 37 - .../google/cloud/trace/v2/trace_service.rb | 61 - .../cloud/trace/v2/trace_service/client.rb | 643 --- .../trace/v2/trace_service/credentials.rb | 52 - .../cloud/trace/v2/trace_service/paths.rb | 66 - .../cloud/trace/v2/trace_service/rest.rb | 58 - .../trace/v2/trace_service/rest/client.rb | 586 --- .../v2/trace_service/rest/service_stub.rb | 205 - .../lib/google/cloud/trace/v2/version.rb | 28 - .../google/devtools/cloudtrace/v2/trace_pb.rb | 43 - .../devtools/cloudtrace/v2/tracing_pb.rb | 28 - .../cloudtrace/v2/tracing_services_pb.rb | 54 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../google/devtools/cloudtrace/v2/trace.rb | 427 -- .../google/devtools/cloudtrace/v2/tracing.rb | 40 - .../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/timestamp.rb | 127 - .../proto_docs/google/protobuf/wrappers.rb | 148 - .../proto_docs/google/rpc/status.rb | 48 - .../google-cloud-trace-v2/snippets/Gemfile | 32 - ...etadata_google.devtools.cloudtrace.v2.json | 95 - .../trace_service/batch_write_spans.rb | 47 - .../snippets/trace_service/create_span.rb | 47 - .../trace/v2/trace_service_paths_test.rb | 67 - .../cloud/trace/v2/trace_service_rest_test.rb | 221 - .../cloud/trace/v2/trace_service_test.rb | 248 - .../google-cloud-trace-v2/test/helper.rb | 26 - .../google-cloud-translate-v3/.gitignore | 22 - .../.repo-metadata.json | 18 - .../google-cloud-translate-v3/.rubocop.yml | 33 - .../google-cloud-translate-v3/.toys.rb | 28 - .../google-cloud-translate-v3/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-translate-v3/CHANGELOG.md | 2 - .../google-cloud-translate-v3/Gemfile | 14 - .../google-cloud-translate-v3/LICENSE.md | 201 - .../google-cloud-translate-v3/README.md | 154 - .../google-cloud-translate-v3/Rakefile | 169 - .../gapic_metadata.json | 208 - .../google-cloud-translate-v3.gemspec | 30 - .../lib/google-cloud-translate-v3.rb | 21 - .../lib/google/cloud/translate/v3.rb | 45 - .../cloud/translate/v3/adaptive_mt_pb.rb | 48 - .../translate/v3/automl_translation_pb.rb | 54 - .../cloud/translate/v3/bindings_override.rb | 75 - .../google/cloud/translate/v3/common_pb.rb | 31 - .../lib/google/cloud/translate/v3/rest.rb | 38 - .../cloud/translate/v3/translation_service.rb | 56 - .../v3/translation_service/client.rb | 4614 ----------------- .../v3/translation_service/credentials.rb | 52 - .../v3/translation_service/operations.rb | 849 --- .../translate/v3/translation_service/paths.rb | 168 - .../translate/v3/translation_service/rest.rb | 54 - .../v3/translation_service/rest/client.rb | 4313 --------------- .../v3/translation_service/rest/operations.rb | 1093 ---- .../translation_service/rest/service_stub.rb | 2454 --------- .../translate/v3/translation_service_pb.rb | 88 - .../v3/translation_service_services_pb.rb | 141 - .../lib/google/cloud/translate/v3/version.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../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/translate/v3/adaptive_mt.rb | 405 -- .../cloud/translate/v3/automl_translation.rb | 487 -- .../google/cloud/translate/v3/common.rb | 143 - .../cloud/translate/v3/translation_service.rb | 1657 ------ .../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 - .../snippets/Gemfile | 32 - ..._metadata_google.cloud.translation.v3.json | 1535 ------ .../adaptive_mt_translate.rb | 47 - .../batch_translate_document.rb | 54 - .../batch_translate_text.rb | 54 - .../create_adaptive_mt_dataset.rb | 47 - .../translation_service/create_dataset.rb | 54 - .../translation_service/create_glossary.rb | 54 - .../create_glossary_entry.rb | 47 - .../translation_service/create_model.rb | 54 - .../delete_adaptive_mt_dataset.rb | 47 - .../delete_adaptive_mt_file.rb | 47 - .../translation_service/delete_dataset.rb | 54 - .../translation_service/delete_glossary.rb | 54 - .../delete_glossary_entry.rb | 47 - .../translation_service/delete_model.rb | 54 - .../translation_service/detect_language.rb | 47 - .../translation_service/export_data.rb | 54 - .../get_adaptive_mt_dataset.rb | 47 - .../get_adaptive_mt_file.rb | 47 - .../translation_service/get_dataset.rb | 47 - .../translation_service/get_glossary.rb | 47 - .../translation_service/get_glossary_entry.rb | 47 - .../snippets/translation_service/get_model.rb | 47 - .../get_supported_languages.rb | 47 - .../import_adaptive_mt_file.rb | 47 - .../translation_service/import_data.rb | 54 - .../list_adaptive_mt_datasets.rb | 51 - .../list_adaptive_mt_files.rb | 51 - .../list_adaptive_mt_sentences.rb | 51 - .../translation_service/list_datasets.rb | 51 - .../translation_service/list_examples.rb | 51 - .../translation_service/list_glossaries.rb | 51 - .../list_glossary_entries.rb | 51 - .../translation_service/list_models.rb | 51 - .../translation_service/romanize_text.rb | 47 - .../translation_service/translate_document.rb | 47 - .../translation_service/translate_text.rb | 47 - .../translation_service/update_glossary.rb | 54 - .../update_glossary_entry.rb | 47 - .../v3/translation_service_operations_test.rb | 400 -- .../v3/translation_service_paths_test.rb | 127 - .../v3/translation_service_rest_test.rb | 2228 -------- .../translate/v3/translation_service_test.rb | 2575 --------- .../google-cloud-translate-v3/test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-video-live_stream-v1/Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 188 - .../google-cloud-video-live_stream-v1.gemspec | 29 - .../lib/google-cloud-video-live_stream-v1.rb | 21 - .../lib/google/cloud/video/live_stream/v1.rb | 47 - .../video/live_stream/v1/bindings_override.rb | 77 - .../live_stream/v1/livestream_service.rb | 62 - .../v1/livestream_service/client.rb | 4350 ---------------- .../v1/livestream_service/credentials.rb | 49 - .../v1/livestream_service/operations.rb | 843 --- .../v1/livestream_service/paths.rb | 227 - .../live_stream/v1/livestream_service/rest.rb | 60 - .../v1/livestream_service/rest/client.rb | 4077 --------------- .../v1/livestream_service/rest/operations.rb | 927 ---- .../livestream_service/rest/service_stub.rb | 2172 -------- .../google/cloud/video/live_stream/v1/rest.rb | 40 - .../cloud/video/live_stream/v1/version.rb | 30 - .../cloud/video/livestream/v1/outputs_pb.rb | 52 - .../cloud/video/livestream/v1/resources_pb.rb | 91 - .../cloud/video/livestream/v1/service_pb.rb | 76 - .../livestream/v1/service_services_pb.rb | 123 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../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 - .../cloud/video/livestream/v1/outputs.rb | 788 --- .../cloud/video/livestream/v1/resources.rb | 1294 ----- .../cloud/video/livestream/v1/service.rb | 1032 ---- .../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 - .../snippets/Gemfile | 32 - .../livestream_service/create_asset.rb | 54 - .../livestream_service/create_channel.rb | 54 - .../livestream_service/create_clip.rb | 54 - .../livestream_service/create_dvr_session.rb | 54 - .../livestream_service/create_event.rb | 47 - .../livestream_service/create_input.rb | 54 - .../livestream_service/delete_asset.rb | 54 - .../livestream_service/delete_channel.rb | 54 - .../livestream_service/delete_clip.rb | 54 - .../livestream_service/delete_dvr_session.rb | 54 - .../livestream_service/delete_event.rb | 47 - .../livestream_service/delete_input.rb | 54 - .../snippets/livestream_service/get_asset.rb | 47 - .../livestream_service/get_channel.rb | 47 - .../snippets/livestream_service/get_clip.rb | 47 - .../livestream_service/get_dvr_session.rb | 47 - .../snippets/livestream_service/get_event.rb | 47 - .../snippets/livestream_service/get_input.rb | 47 - .../snippets/livestream_service/get_pool.rb | 47 - .../livestream_service/list_assets.rb | 51 - .../livestream_service/list_channels.rb | 51 - .../snippets/livestream_service/list_clips.rb | 51 - .../livestream_service/list_dvr_sessions.rb | 51 - .../livestream_service/list_events.rb | 51 - .../livestream_service/list_inputs.rb | 51 - .../livestream_service/preview_input.rb | 47 - .../livestream_service/start_channel.rb | 54 - .../livestream_service/start_distribution.rb | 54 - .../livestream_service/stop_channel.rb | 54 - .../livestream_service/stop_distribution.rb | 54 - .../livestream_service/update_channel.rb | 54 - .../livestream_service/update_dvr_session.rb | 54 - .../livestream_service/update_input.rb | 54 - .../livestream_service/update_pool.rb | 54 - ...data_google.cloud.video.livestream.v1.json | 1375 ----- .../v1/livestream_service_operations_test.rb | 400 -- .../v1/livestream_service_paths_test.rb | 163 - .../v1/livestream_service_rest_test.rb | 1998 ------- .../live_stream/v1/livestream_service_test.rb | 2336 --------- .../test/helper.rb | 26 - .../google-cloud-video-stitcher-v1/.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../google-cloud-video-stitcher-v1/.toys.rb | 28 - .../google-cloud-video-stitcher-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-video-stitcher-v1/Gemfile | 14 - .../google-cloud-video-stitcher-v1/LICENSE.md | 201 - .../google-cloud-video-stitcher-v1/README.md | 154 - .../google-cloud-video-stitcher-v1/Rakefile | 169 - .../gapic_metadata.json | 168 - .../google-cloud-video-stitcher-v1.gemspec | 28 - .../lib/google-cloud-video-stitcher-v1.rb | 21 - .../lib/google/cloud/video/stitcher/v1.rb | 42 - .../video/stitcher/v1/ad_tag_details_pb.rb | 31 - .../cloud/video/stitcher/v1/cdn_keys_pb.rb | 30 - .../cloud/video/stitcher/v1/companions_pb.rb | 30 - .../cloud/video/stitcher/v1/events_pb.rb | 27 - .../video/stitcher/v1/fetch_options_pb.rb | 23 - .../video/stitcher/v1/live_configs_pb.rb | 33 - .../cloud/video/stitcher/v1/sessions_pb.rb | 40 - .../cloud/video/stitcher/v1/slates_pb.rb | 27 - .../video/stitcher/v1/stitch_details_pb.rb | 29 - .../google/cloud/video/stitcher/v1/version.rb | 30 - .../stitcher/v1/video_stitcher_service.rb | 56 - .../v1/video_stitcher_service/client.rb | 3545 ------------- .../v1/video_stitcher_service/credentials.rb | 49 - .../v1/video_stitcher_service/operations.rb | 843 --- .../v1/video_stitcher_service/paths.rb | 229 - .../stitcher/v1/video_stitcher_service_pb.rb | 76 - .../v1/video_stitcher_service_services_pb.rb | 121 - .../cloud/video/stitcher/v1/vod_configs_pb.rb | 29 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../cloud/video/stitcher/v1/ad_tag_details.rb | 106 - .../cloud/video/stitcher/v1/cdn_keys.rb | 112 - .../cloud/video/stitcher/v1/companions.rb | 135 - .../google/cloud/video/stitcher/v1/events.rb | 141 - .../cloud/video/stitcher/v1/fetch_options.rb | 49 - .../cloud/video/stitcher/v1/live_configs.rb | 145 - .../cloud/video/stitcher/v1/sessions.rb | 285 - .../google/cloud/video/stitcher/v1/slates.rb | 58 - .../cloud/video/stitcher/v1/stitch_details.rb | 73 - .../stitcher/v1/video_stitcher_service.rb | 619 --- .../cloud/video/stitcher/v1/vod_configs.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/struct.rb | 108 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - ...tadata_google.cloud.video.stitcher.v1.json | 1215 ----- .../video_stitcher_service/create_cdn_key.rb | 54 - .../create_live_config.rb | 54 - .../create_live_session.rb | 47 - .../video_stitcher_service/create_slate.rb | 54 - .../create_vod_config.rb | 54 - .../create_vod_session.rb | 47 - .../video_stitcher_service/delete_cdn_key.rb | 54 - .../delete_live_config.rb | 54 - .../video_stitcher_service/delete_slate.rb | 54 - .../delete_vod_config.rb | 54 - .../video_stitcher_service/get_cdn_key.rb | 47 - .../get_live_ad_tag_detail.rb | 47 - .../video_stitcher_service/get_live_config.rb | 47 - .../get_live_session.rb | 47 - .../video_stitcher_service/get_slate.rb | 47 - .../get_vod_ad_tag_detail.rb | 47 - .../video_stitcher_service/get_vod_config.rb | 47 - .../video_stitcher_service/get_vod_session.rb | 47 - .../get_vod_stitch_detail.rb | 47 - .../video_stitcher_service/list_cdn_keys.rb | 51 - .../list_live_ad_tag_details.rb | 51 - .../list_live_configs.rb | 51 - .../video_stitcher_service/list_slates.rb | 51 - .../list_vod_ad_tag_details.rb | 51 - .../list_vod_configs.rb | 51 - .../list_vod_stitch_details.rb | 51 - .../video_stitcher_service/update_cdn_key.rb | 54 - .../update_live_config.rb | 54 - .../video_stitcher_service/update_slate.rb | 54 - .../update_vod_config.rb | 54 - .../video_stitcher_service_operations_test.rb | 400 -- .../v1/video_stitcher_service_paths_test.rb | 163 - .../v1/video_stitcher_service_test.rb | 2031 -------- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../google-cloud-video-transcoder-v1/.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-video-transcoder-v1/Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 154 - .../google-cloud-video-transcoder-v1/Rakefile | 169 - .../gapic_metadata.json | 58 - .../google-cloud-video-transcoder-v1.gemspec | 28 - .../lib/google-cloud-video-transcoder-v1.rb | 21 - .../lib/google/cloud/video/transcoder/v1.rb | 47 - .../cloud/video/transcoder/v1/resources_pb.rb | 94 - .../google/cloud/video/transcoder/v1/rest.rb | 39 - .../cloud/video/transcoder/v1/services_pb.rb | 39 - .../transcoder/v1/services_services_pb.rb | 66 - .../video/transcoder/v1/transcoder_service.rb | 62 - .../v1/transcoder_service/client.rb | 1211 ----- .../v1/transcoder_service/credentials.rb | 53 - .../transcoder/v1/transcoder_service/paths.rb | 90 - .../transcoder/v1/transcoder_service/rest.rb | 59 - .../v1/transcoder_service/rest/client.rb | 1112 ---- .../transcoder_service/rest/service_stub.rb | 573 -- .../cloud/video/transcoder/v1/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../cloud/video/transcoder/v1/resources.rb | 1763 ------- .../cloud/video/transcoder/v1/services.rb | 190 - .../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/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - ...data_google.cloud.video.transcoder.v1.json | 335 -- .../snippets/transcoder_service/create_job.rb | 47 - .../transcoder_service/create_job_template.rb | 47 - .../snippets/transcoder_service/delete_job.rb | 47 - .../transcoder_service/delete_job_template.rb | 47 - .../snippets/transcoder_service/get_job.rb | 47 - .../transcoder_service/get_job_template.rb | 47 - .../transcoder_service/list_job_templates.rb | 51 - .../snippets/transcoder_service/list_jobs.rb | 51 - .../v1/transcoder_service_paths_test.rb | 79 - .../v1/transcoder_service_rest_test.rb | 544 -- .../transcoder/v1/transcoder_service_test.rb | 604 --- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 153 - .../Rakefile | 169 - .../gapic_metadata.json | 23 - ...google-cloud-video_intelligence-v1.gemspec | 28 - .../lib/google-cloud-video_intelligence-v1.rb | 21 - .../lib/google/cloud/video_intelligence/v1.rb | 45 - .../cloud/video_intelligence/v1/rest.rb | 37 - .../cloud/video_intelligence/v1/version.rb | 28 - .../v1/video_intelligence_service.rb | 55 - .../v1/video_intelligence_service/client.rb | 526 -- .../video_intelligence_service/credentials.rb | 51 - .../video_intelligence_service/operations.rb | 841 --- .../v1/video_intelligence_service/rest.rb | 52 - .../video_intelligence_service/rest/client.rb | 484 -- .../rest/operations.rb | 946 ---- .../rest/service_stub.rb | 141 - .../v1/video_intelligence_pb.rb | 74 - .../v1/video_intelligence_services_pb.rb | 48 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../v1/video_intelligence.rb | 998 ---- .../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/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - ...ata_google.cloud.videointelligence.v1.json | 55 - .../annotate_video.rb | 54 - ...eo_intelligence_service_operations_test.rb | 400 -- .../video_intelligence_service_rest_test.rb | 158 - .../v1/video_intelligence_service_test.rb | 191 - .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 153 - .../Rakefile | 169 - .../gapic_metadata.json | 23 - ...e-cloud-video_intelligence-v1beta2.gemspec | 28 - ...google-cloud-video_intelligence-v1beta2.rb | 21 - .../cloud/video_intelligence/v1beta2.rb | 45 - .../cloud/video_intelligence/v1beta2/rest.rb | 37 - .../video_intelligence/v1beta2/version.rb | 28 - .../v1beta2/video_intelligence_service.rb | 55 - .../video_intelligence_service/client.rb | 525 -- .../video_intelligence_service/credentials.rb | 51 - .../video_intelligence_service/operations.rb | 841 --- .../video_intelligence_service/rest.rb | 52 - .../video_intelligence_service/rest/client.rb | 483 -- .../rest/operations.rb | 946 ---- .../rest/service_stub.rb | 141 - .../v1beta2/video_intelligence_pb.rb | 52 - .../v1beta2/video_intelligence_services_pb.rb | 49 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../v1beta2/video_intelligence.rb | 441 -- .../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/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - ...oogle.cloud.videointelligence.v1beta2.json | 55 - .../annotate_video.rb | 54 - ...eo_intelligence_service_operations_test.rb | 400 -- .../video_intelligence_service_rest_test.rb | 158 - .../video_intelligence_service_test.rb | 191 - .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 153 - .../Rakefile | 169 - .../gapic_metadata.json | 23 - ...cloud-video_intelligence-v1p1beta1.gemspec | 28 - ...ogle-cloud-video_intelligence-v1p1beta1.rb | 21 - .../cloud/video_intelligence/v1p1beta1.rb | 45 - .../video_intelligence/v1p1beta1/rest.rb | 37 - .../video_intelligence/v1p1beta1/version.rb | 28 - .../v1p1beta1/video_intelligence_service.rb | 55 - .../video_intelligence_service/client.rb | 525 -- .../video_intelligence_service/credentials.rb | 51 - .../video_intelligence_service/operations.rb | 841 --- .../video_intelligence_service/rest.rb | 52 - .../video_intelligence_service/rest/client.rb | 483 -- .../rest/operations.rb | 946 ---- .../rest/service_stub.rb | 141 - .../v1p1beta1/video_intelligence_pb.rb | 52 - .../video_intelligence_services_pb.rb | 49 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../v1p1beta1/video_intelligence.rb | 479 -- .../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/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - ...gle.cloud.videointelligence.v1p1beta1.json | 55 - .../annotate_video.rb | 54 - ...eo_intelligence_service_operations_test.rb | 400 -- .../video_intelligence_service_rest_test.rb | 158 - .../video_intelligence_service_test.rb | 191 - .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 153 - .../Rakefile | 169 - .../gapic_metadata.json | 23 - ...cloud-video_intelligence-v1p2beta1.gemspec | 28 - ...ogle-cloud-video_intelligence-v1p2beta1.rb | 21 - .../cloud/video_intelligence/v1p2beta1.rb | 45 - .../video_intelligence/v1p2beta1/rest.rb | 37 - .../video_intelligence/v1p2beta1/version.rb | 28 - .../v1p2beta1/video_intelligence_service.rb | 55 - .../video_intelligence_service/client.rb | 523 -- .../video_intelligence_service/credentials.rb | 51 - .../video_intelligence_service/operations.rb | 841 --- .../video_intelligence_service/rest.rb | 52 - .../video_intelligence_service/rest/client.rb | 481 -- .../rest/operations.rb | 946 ---- .../rest/service_stub.rb | 141 - .../v1p2beta1/video_intelligence_pb.rb | 56 - .../video_intelligence_services_pb.rb | 49 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../v1p2beta1/video_intelligence.rb | 534 -- .../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/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - ...gle.cloud.videointelligence.v1p2beta1.json | 55 - .../annotate_video.rb | 54 - ...eo_intelligence_service_operations_test.rb | 400 -- .../video_intelligence_service_rest_test.rb | 158 - .../video_intelligence_service_test.rb | 191 - .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 153 - .../Rakefile | 169 - .../gapic_metadata.json | 37 - ...cloud-video_intelligence-v1p3beta1.gemspec | 28 - ...ogle-cloud-video_intelligence-v1p3beta1.rb | 21 - .../cloud/video_intelligence/v1p3beta1.rb | 46 - .../video_intelligence/v1p3beta1/rest.rb | 37 - .../streaming_video_intelligence_service.rb | 48 - .../client.rb | 472 -- .../credentials.rb | 51 - .../video_intelligence/v1p3beta1/version.rb | 28 - .../v1p3beta1/video_intelligence_service.rb | 55 - .../video_intelligence_service/client.rb | 526 -- .../video_intelligence_service/credentials.rb | 51 - .../video_intelligence_service/operations.rb | 841 --- .../video_intelligence_service/rest.rb | 52 - .../video_intelligence_service/rest/client.rb | 484 -- .../rest/operations.rb | 925 ---- .../rest/service_stub.rb | 141 - .../v1p3beta1/video_intelligence_pb.rb | 88 - .../video_intelligence_services_pb.rb | 66 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../v1p3beta1/video_intelligence.rb | 1218 ----- .../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/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - ...gle.cloud.videointelligence.v1p3beta1.json | 95 - .../streaming_annotate_video.rb | 56 - .../annotate_video.rb | 54 - ...reaming_video_intelligence_service_test.rb | 193 - ...eo_intelligence_service_operations_test.rb | 400 -- .../video_intelligence_service_rest_test.rb | 158 - .../video_intelligence_service_test.rb | 191 - .../test/helper.rb | 26 - .../google-cloud-vision-v1/.gitignore | 22 - .../.repo-metadata.json | 18 - .../google-cloud-vision-v1/.rubocop.yml | 33 - .../google-cloud-vision-v1/.toys.rb | 28 - .../google-cloud-vision-v1/.yardopts | 12 - .../google-cloud-vision-v1/AUTHENTICATION.md | 122 - .../google-cloud-vision-v1/CHANGELOG.md | 2 - .../google-cloud-vision-v1/Gemfile | 14 - .../google-cloud-vision-v1/LICENSE.md | 201 - .../google-cloud-vision-v1/README.md | 154 - .../google-cloud-vision-v1/Rakefile | 169 - .../gapic_metadata.json | 142 - .../google-cloud-vision-v1.gemspec | 28 - .../lib/google-cloud-vision-v1.rb | 21 - .../lib/google/cloud/vision/v1.rb | 46 - .../lib/google/cloud/vision/v1/geometry_pb.rb | 24 - .../google/cloud/vision/v1/image_annotator.rb | 58 - .../cloud/vision/v1/image_annotator/client.rb | 874 ---- .../vision/v1/image_annotator/credentials.rb | 52 - .../vision/v1/image_annotator/operations.rb | 841 --- .../cloud/vision/v1/image_annotator/paths.rb | 52 - .../cloud/vision/v1/image_annotator/rest.rb | 55 - .../vision/v1/image_annotator/rest/client.rb | 835 --- .../v1/image_annotator/rest/operations.rb | 946 ---- .../v1/image_annotator/rest/service_stub.rb | 385 -- .../cloud/vision/v1/image_annotator_pb.rb | 77 - .../vision/v1/image_annotator_services_pb.rb | 72 - .../google/cloud/vision/v1/product_search.rb | 71 - .../cloud/vision/v1/product_search/client.rb | 2559 --------- .../vision/v1/product_search/credentials.rb | 52 - .../vision/v1/product_search/operations.rb | 841 --- .../cloud/vision/v1/product_search/paths.rb | 109 - .../cloud/vision/v1/product_search/rest.rb | 68 - .../vision/v1/product_search/rest/client.rb | 2383 --------- .../v1/product_search/rest/operations.rb | 946 ---- .../v1/product_search/rest/service_stub.rb | 1249 ----- .../cloud/vision/v1/product_search_pb.rb | 30 - .../vision/v1/product_search_service_pb.rb | 64 - .../v1/product_search_service_services_pb.rb | 233 - .../lib/google/cloud/vision/v1/rest.rb | 38 - .../cloud/vision/v1/text_annotation_pb.rb | 33 - .../lib/google/cloud/vision/v1/version.rb | 28 - .../cloud/vision/v1/web_detection_pb.rb | 25 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../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/vision/v1/geometry.rb | 82 - .../google/cloud/vision/v1/image_annotator.rb | 1126 ---- .../google/cloud/vision/v1/product_search.rb | 135 - .../cloud/vision/v1/product_search_service.rb | 678 --- .../google/cloud/vision/v1/text_annotation.rb | 286 - .../google/cloud/vision/v1/web_detection.rb | 121 - .../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 | 148 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/color.rb | 173 - .../proto_docs/google/type/latlng.rb | 38 - .../google-cloud-vision-v1/snippets/Gemfile | 32 - .../async_batch_annotate_files.rb | 54 - .../async_batch_annotate_images.rb | 54 - .../image_annotator/batch_annotate_files.rb | 47 - .../image_annotator/batch_annotate_images.rb | 47 - .../add_product_to_product_set.rb | 47 - .../snippets/product_search/create_product.rb | 47 - .../product_search/create_product_set.rb | 47 - .../product_search/create_reference_image.rb | 47 - .../snippets/product_search/delete_product.rb | 47 - .../product_search/delete_product_set.rb | 47 - .../product_search/delete_reference_image.rb | 47 - .../snippets/product_search/get_product.rb | 47 - .../product_search/get_product_set.rb | 47 - .../product_search/get_reference_image.rb | 47 - .../product_search/import_product_sets.rb | 54 - .../product_search/list_product_sets.rb | 51 - .../snippets/product_search/list_products.rb | 51 - .../list_products_in_product_set.rb | 51 - .../product_search/list_reference_images.rb | 51 - .../snippets/product_search/purge_products.rb | 54 - .../remove_product_from_product_set.rb | 47 - .../snippets/product_search/update_product.rb | 47 - .../product_search/update_product_set.rb | 47 - ...ippet_metadata_google.cloud.vision.v1.json | 935 ---- .../v1/image_annotator_operations_test.rb | 400 -- .../vision/v1/image_annotator_paths_test.rb | 55 - .../vision/v1/image_annotator_rest_test.rb | 324 -- .../cloud/vision/v1/image_annotator_test.rb | 378 -- .../v1/product_search_operations_test.rb | 400 -- .../vision/v1/product_search_paths_test.rb | 91 - .../vision/v1/product_search_rest_test.rb | 1146 ---- .../cloud/vision/v1/product_search_test.rb | 1293 ----- .../google-cloud-vision-v1/test/helper.rb | 26 - 1398 files changed, 2900 insertions(+), 284746 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/README.md delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/google-cloud-talent-v4beta1.gemspec delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google-cloud-talent-v4beta1.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/batch_pb.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/common_pb.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_pb.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/client.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/paths.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/rest.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_pb.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/filters_pb.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/histogram_pb.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_pb.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_pb.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/version.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/common.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/company.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/company_service.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/completion_service.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/event.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/event_service.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/filters.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/histogram.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/job.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/job_service.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/tenant.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/tenant_service.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/type/latlng.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/type/money.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/type/postal_address.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/type/timeofday.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/create_company.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/delete_company.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/get_company.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/list_companies.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/update_company.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/completion/complete_query.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/event_service/create_client_event.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/batch_create_jobs.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/batch_delete_jobs.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/batch_update_jobs.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/create_job.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/delete_job.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/get_job.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/list_jobs.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/search_jobs.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/search_jobs_for_alert.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/update_job.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/snippet_metadata_google.cloud.talent.v4beta1.json delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/create_tenant.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/delete_tenant.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/get_tenant.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/list_tenants.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/update_tenant.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/company_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/company_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/company_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/completion_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/completion_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/completion_test.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/event_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/event_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/event_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/tenant_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/tenant_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/tenant_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-talent-v4beta1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/.gitignore delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/.yardopts delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/Gemfile delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/README.md delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/Rakefile delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/google-cloud-tasks-v2.gemspec delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google-cloud-tasks-v2.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/client.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/paths.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/rest.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloudtasks_pb.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloudtasks_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/queue_pb.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/rest.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/target_pb.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/task_pb.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/version.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/cloudtasks.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/queue.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/target.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/task.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/create_queue.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/create_task.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/delete_queue.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/delete_task.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/get_queue.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/get_task.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/list_queues.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/list_tasks.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/pause_queue.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/purge_queue.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/resume_queue.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/run_task.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/update_queue.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/snippets/snippet_metadata_google.cloud.tasks.v2.json delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/test/google/cloud/tasks/v2/cloud_tasks_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/test/google/cloud/tasks/v2/cloud_tasks_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/test/google/cloud/tasks/v2/cloud_tasks_test.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/.gitignore delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/.yardopts delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/Gemfile delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/README.md delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/Rakefile delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/google-cloud-tasks-v2beta2.gemspec delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google-cloud-tasks-v2beta2.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/client.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/paths.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/rest.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloudtasks_pb.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloudtasks_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/old_target_pb.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/queue_pb.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/rest.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/target_pb.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/task_pb.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/version.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/httpbody.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/cloudtasks.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/queue.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/target.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/task.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/acknowledge_task.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/cancel_lease.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/create_queue.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/create_task.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/delete_queue.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/delete_task.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/get_queue.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/get_task.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/lease_tasks.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/list_queues.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/list_tasks.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/pause_queue.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/purge_queue.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/renew_lease.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/resume_queue.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/run_task.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/update_queue.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/upload_queue_yaml.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/snippets/snippet_metadata_google.cloud.tasks.v2beta2.json delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/test/google/cloud/tasks/v2beta2/cloud_tasks_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/test/google/cloud/tasks/v2beta2/cloud_tasks_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/test/google/cloud/tasks/v2beta2/cloud_tasks_test.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta2/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/.gitignore delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/.yardopts delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/Gemfile delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/README.md delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/Rakefile delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/google-cloud-tasks-v2beta3.gemspec delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google-cloud-tasks-v2beta3.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/client.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/paths.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/rest.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloudtasks_pb.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloudtasks_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/queue_pb.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/rest.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/target_pb.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/task_pb.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/version.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/cloudtasks.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/queue.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/target.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/task.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/create_queue.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/create_task.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/delete_queue.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/delete_task.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/get_queue.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/get_task.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/list_queues.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/list_tasks.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/pause_queue.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/purge_queue.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/resume_queue.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/run_task.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/update_queue.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/snippets/snippet_metadata_google.cloud.tasks.v2beta3.json delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/test/google/cloud/tasks/v2beta3/cloud_tasks_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/test/google/cloud/tasks/v2beta3/cloud_tasks_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/test/google/cloud/tasks/v2beta3/cloud_tasks_test.rb delete mode 100644 owl-bot-staging/google-cloud-tasks-v2beta3/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/google-cloud-telco_automation-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google-cloud-telco_automation-v1.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/client.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/operations.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/paths.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telcoautomation/v1/telcoautomation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telcoautomation/v1/telcoautomation_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/cloud/telcoautomation/v1/telcoautomation.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/snippet_metadata_google.cloud.telcoautomation.v1.json delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/apply_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/apply_hydrated_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/approve_blueprint.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/compute_deployment_status.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_blueprint.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_edge_slm.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_orchestration_cluster.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/delete_blueprint.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/delete_edge_slm.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/delete_orchestration_cluster.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/discard_blueprint_changes.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/discard_deployment_changes.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_blueprint.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_edge_slm.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_hydrated_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_orchestration_cluster.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_public_blueprint.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_blueprint_revisions.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_blueprints.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_deployment_revisions.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_deployments.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_edge_slms.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_hydrated_deployments.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_orchestration_clusters.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_public_blueprints.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/propose_blueprint.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/reject_blueprint.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/remove_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/rollback_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/search_blueprint_revisions.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/search_deployment_revisions.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/update_blueprint.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/update_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/update_hydrated_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_test.rb delete mode 100644 owl-bot-staging/google-cloud-telco_automation-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/google-cloud-text_to_speech-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google-cloud-text_to_speech-v1.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/client.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/paths.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/rest.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/client.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/operations.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/paths.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_lrs_pb.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_lrs_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_pb.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/cloud/texttospeech/v1/cloud_tts.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/cloud/texttospeech/v1/cloud_tts_lrs.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/snippets/snippet_metadata_google.cloud.texttospeech.v1.json delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech/list_voices.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech/streaming_synthesize.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech/synthesize_speech.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech_long_audio_synthesize/synthesize_long_audio.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_test.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_test.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/README.md delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/google-cloud-text_to_speech-v1beta1.gemspec delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google-cloud-text_to_speech-v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/client.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/paths.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/rest.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/client.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/operations.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/paths.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/version.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/texttospeech/v1beta1/cloud_tts_lrs_pb.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/texttospeech/v1beta1/cloud_tts_lrs_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/texttospeech/v1beta1/cloud_tts_pb.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/texttospeech/v1beta1/cloud_tts_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/cloud/texttospeech/v1beta1/cloud_tts.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/cloud/texttospeech/v1beta1/cloud_tts_lrs.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/snippet_metadata_google.cloud.texttospeech.v1beta1.json delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech/list_voices.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech/streaming_synthesize.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech/synthesize_speech.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech_long_audio_synthesize/synthesize_long_audio.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_test.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_test.rb delete mode 100644 owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/google-cloud-tpu-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/lib/google-cloud-tpu-v1.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/cloud_tpu_pb.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/cloud_tpu_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/client.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/operations.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/paths.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/cloud/tpu/v1/cloud_tpu.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/snippet_metadata_google.cloud.tpu.v1.json delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/create_node.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/delete_node.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/get_accelerator_type.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/get_node.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/get_tensor_flow_version.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/list_accelerator_types.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/list_nodes.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/list_tensor_flow_versions.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/reimage_node.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/start_node.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/stop_node.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/test/google/cloud/tpu/v1/tpu_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/test/google/cloud/tpu/v1/tpu_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/test/google/cloud/tpu/v1/tpu_test.rb delete mode 100644 owl-bot-staging/google-cloud-tpu-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-trace-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-trace-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-trace-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-trace-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-trace-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-trace-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-trace-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-trace-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-trace-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-trace-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-trace-v1/google-cloud-trace-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-trace-v1/lib/google-cloud-trace-v1.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/lib/google/devtools/cloudtrace/v1/trace_pb.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/lib/google/devtools/cloudtrace/v1/trace_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-trace-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/proto_docs/google/devtools/cloudtrace/v1/trace.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-trace-v1/snippets/snippet_metadata_google.devtools.cloudtrace.v1.json delete mode 100644 owl-bot-staging/google-cloud-trace-v1/snippets/trace_service/get_trace.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/snippets/trace_service/list_traces.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/snippets/trace_service/patch_traces.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/test/google/cloud/trace/v1/trace_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/test/google/cloud/trace/v1/trace_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/.gitignore delete mode 100644 owl-bot-staging/google-cloud-trace-v2/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-trace-v2/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-trace-v2/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/.yardopts delete mode 100644 owl-bot-staging/google-cloud-trace-v2/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-trace-v2/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-trace-v2/Gemfile delete mode 100644 owl-bot-staging/google-cloud-trace-v2/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-trace-v2/README.md delete mode 100644 owl-bot-staging/google-cloud-trace-v2/Rakefile delete mode 100644 owl-bot-staging/google-cloud-trace-v2/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-trace-v2/google-cloud-trace-v2.gemspec delete mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google-cloud-trace-v2.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/rest.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/version.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/devtools/cloudtrace/v2/trace_pb.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/devtools/cloudtrace/v2/tracing_pb.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/lib/google/devtools/cloudtrace/v2/tracing_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/google/devtools/cloudtrace/v2/trace.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/google/devtools/cloudtrace/v2/tracing.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-trace-v2/snippets/snippet_metadata_google.devtools.cloudtrace.v2.json delete mode 100644 owl-bot-staging/google-cloud-trace-v2/snippets/trace_service/batch_write_spans.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/snippets/trace_service/create_span.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/test/google/cloud/trace/v2/trace_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/test/google/cloud/trace/v2/trace_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/test/google/cloud/trace/v2/trace_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-trace-v2/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/.gitignore delete mode 100644 owl-bot-staging/google-cloud-translate-v3/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-translate-v3/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-translate-v3/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/.yardopts delete mode 100644 owl-bot-staging/google-cloud-translate-v3/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-translate-v3/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-translate-v3/Gemfile delete mode 100644 owl-bot-staging/google-cloud-translate-v3/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-translate-v3/README.md delete mode 100644 owl-bot-staging/google-cloud-translate-v3/Rakefile delete mode 100644 owl-bot-staging/google-cloud-translate-v3/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-translate-v3/google-cloud-translate-v3.gemspec delete mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google-cloud-translate-v3.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/adaptive_mt_pb.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/automl_translation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/common_pb.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/rest.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/version.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/adaptive_mt.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/automl_translation.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/common.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/translation_service.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/snippet_metadata_google.cloud.translation.v3.json delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/adaptive_mt_translate.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/batch_translate_document.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/batch_translate_text.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_adaptive_mt_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_glossary.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_glossary_entry.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_model.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_adaptive_mt_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_adaptive_mt_file.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_glossary.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_glossary_entry.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_model.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/detect_language.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/export_data.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_adaptive_mt_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_adaptive_mt_file.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_glossary.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_glossary_entry.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_model.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_supported_languages.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/import_adaptive_mt_file.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/import_data.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_adaptive_mt_datasets.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_adaptive_mt_files.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_adaptive_mt_sentences.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_datasets.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_examples.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_glossaries.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_glossary_entries.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_models.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/romanize_text.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/translate_document.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/translate_text.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/update_glossary.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/update_glossary_entry.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-translate-v3/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/google-cloud-video-live_stream-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google-cloud-video-live_stream-v1.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/outputs_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/resources_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/cloud/video/livestream/v1/outputs.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/cloud/video/livestream/v1/resources.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/cloud/video/livestream/v1/service.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/type/datetime.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_asset.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_channel.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_clip.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_dvr_session.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_event.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_input.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_asset.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_channel.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_clip.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_dvr_session.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_event.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_input.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_asset.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_channel.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_clip.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_dvr_session.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_event.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_input.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_pool.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_assets.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_channels.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_clips.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_dvr_sessions.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_events.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_inputs.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/preview_input.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/start_channel.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/start_distribution.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/stop_channel.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/stop_distribution.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_channel.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_dvr_session.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_input.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_pool.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/snippets/snippet_metadata_google.cloud.video.livestream.v1.json delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-video-live_stream-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/google-cloud-video-stitcher-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google-cloud-video-stitcher-v1.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/ad_tag_details_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/cdn_keys_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/companions_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/events_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/fetch_options_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/live_configs_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/sessions_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/slates_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/stitch_details_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/vod_configs_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/ad_tag_details.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/cdn_keys.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/companions.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/events.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/fetch_options.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/live_configs.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/sessions.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/slates.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/stitch_details.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/video_stitcher_service.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/vod_configs.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/snippet_metadata_google.cloud.video.stitcher.v1.json delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_cdn_key.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_live_config.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_live_session.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_slate.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_vod_config.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_vod_session.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_cdn_key.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_live_config.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_slate.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_vod_config.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_cdn_key.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_live_ad_tag_detail.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_live_config.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_live_session.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_slate.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_ad_tag_detail.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_config.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_session.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_stitch_detail.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_cdn_keys.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_live_ad_tag_details.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_live_configs.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_slates.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_vod_ad_tag_details.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_vod_configs.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_vod_stitch_details.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_cdn_key.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_live_config.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_slate.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_vod_config.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/test/google/cloud/video/stitcher/v1/video_stitcher_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/test/google/cloud/video/stitcher/v1/video_stitcher_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/test/google/cloud/video/stitcher/v1/video_stitcher_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-video-stitcher-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/google-cloud-video-transcoder-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google-cloud-video-transcoder-v1.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/resources_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/services_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/cloud/video/transcoder/v1/resources.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/cloud/video/transcoder/v1/services.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/snippets/snippet_metadata_google.cloud.video.transcoder.v1.json delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/create_job.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/create_job_template.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/delete_job.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/delete_job_template.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/get_job.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/get_job_template.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/list_job_templates.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/list_jobs.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/test/google/cloud/video/transcoder/v1/transcoder_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/test/google/cloud/video/transcoder/v1/transcoder_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/test/google/cloud/video/transcoder/v1/transcoder_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-video-transcoder-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/google-cloud-video_intelligence-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google-cloud-video_intelligence-v1.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/videointelligence/v1/video_intelligence_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/videointelligence/v1/video_intelligence_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/cloud/videointelligence/v1/video_intelligence.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/snippets/snippet_metadata_google.cloud.videointelligence.v1.json delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/snippets/video_intelligence_service/annotate_video.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/test/google/cloud/video_intelligence/v1/video_intelligence_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/test/google/cloud/video_intelligence/v1/video_intelligence_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/test/google/cloud/video_intelligence/v1/video_intelligence_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/.gitignore delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/.yardopts delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/Gemfile delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/README.md delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/Rakefile delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/google-cloud-video_intelligence-v1beta2.gemspec delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google-cloud-video_intelligence-v1beta2.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/rest.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/version.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/videointelligence/v1beta2/video_intelligence_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/videointelligence/v1beta2/video_intelligence_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/cloud/videointelligence/v1beta2/video_intelligence.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/snippets/snippet_metadata_google.cloud.videointelligence.v1beta2.json delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/snippets/video_intelligence_service/annotate_video.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/google/cloud/video_intelligence/v1beta2/video_intelligence_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/google/cloud/video_intelligence/v1beta2/video_intelligence_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/google/cloud/video_intelligence/v1beta2/video_intelligence_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/README.md delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/google-cloud-video_intelligence-v1p1beta1.gemspec delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google-cloud-video_intelligence-v1p1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/version.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/videointelligence/v1p1beta1/video_intelligence_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/videointelligence/v1p1beta1/video_intelligence_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/cloud/videointelligence/v1p1beta1/video_intelligence.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/snippets/snippet_metadata_google.cloud.videointelligence.v1p1beta1.json delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/snippets/video_intelligence_service/annotate_video.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/README.md delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/google-cloud-video_intelligence-v1p2beta1.gemspec delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google-cloud-video_intelligence-v1p2beta1.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/version.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/videointelligence/v1p2beta1/video_intelligence_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/videointelligence/v1p2beta1/video_intelligence_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/cloud/videointelligence/v1p2beta1/video_intelligence.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/snippets/snippet_metadata_google.cloud.videointelligence.v1p2beta1.json delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/snippets/video_intelligence_service/annotate_video.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/README.md delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/google-cloud-video_intelligence-v1p3beta1.gemspec delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google-cloud-video_intelligence-v1p3beta1.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/version.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/videointelligence/v1p3beta1/video_intelligence_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/videointelligence/v1p3beta1/video_intelligence_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/cloud/videointelligence/v1p3beta1/video_intelligence.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/snippet_metadata_google.cloud.videointelligence.v1p3beta1.json delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/streaming_video_intelligence_service/streaming_annotate_video.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/video_intelligence_service/annotate_video.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-vision-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-vision-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-vision-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-vision-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-vision-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-vision-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-vision-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-vision-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-vision-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-vision-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-vision-v1/google-cloud-vision-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google-cloud-vision-v1.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/geometry_pb.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/client.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/operations.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/paths.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator_pb.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/client.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/operations.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/paths.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search_pb.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/text_annotation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/web_detection_pb.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/geometry.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/image_annotator.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/product_search.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/product_search_service.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/text_annotation.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/web_detection.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/type/color.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/proto_docs/google/type/latlng.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/async_batch_annotate_files.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/async_batch_annotate_images.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/batch_annotate_files.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/batch_annotate_images.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/add_product_to_product_set.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/create_product.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/create_product_set.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/create_reference_image.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/delete_product.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/delete_product_set.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/delete_reference_image.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/get_product.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/get_product_set.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/get_reference_image.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/import_product_sets.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_product_sets.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_products.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_products_in_product_set.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_reference_images.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/purge_products.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/remove_product_from_product_set.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/update_product.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/product_search/update_product_set.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/snippets/snippet_metadata_google.cloud.vision.v1.json delete mode 100644 owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_test.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_test.rb delete mode 100644 owl-bot-staging/google-cloud-vision-v1/test/helper.rb diff --git a/google-cloud-talent-v4beta1/proto_docs/google/api/client.rb b/google-cloud-talent-v4beta1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-talent-v4beta1/proto_docs/google/api/client.rb +++ b/google-cloud-talent-v4beta1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... # @!attribute [rw] long_running # @return [::Google::Api::MethodSettings::LongRunning] # Describes settings to use for long-running operations when generating @@ -356,14 +373,14 @@ class RenamedServicesEntry # # Example of a YAML configuration:: # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes # @!attribute [rw] auto_populated_fields # @return [::Array<::String>] # List of top-level fields of the request message, that should be @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-tasks-v2/proto_docs/google/api/client.rb b/google-cloud-tasks-v2/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-tasks-v2/proto_docs/google/api/client.rb +++ b/google-cloud-tasks-v2/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... # @!attribute [rw] long_running # @return [::Google::Api::MethodSettings::LongRunning] # Describes settings to use for long-running operations when generating @@ -356,14 +373,14 @@ class RenamedServicesEntry # # Example of a YAML configuration:: # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes # @!attribute [rw] auto_populated_fields # @return [::Array<::String>] # List of top-level fields of the request message, that should be @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-tasks-v2beta2/proto_docs/google/api/client.rb b/google-cloud-tasks-v2beta2/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-tasks-v2beta2/proto_docs/google/api/client.rb +++ b/google-cloud-tasks-v2beta2/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... # @!attribute [rw] long_running # @return [::Google::Api::MethodSettings::LongRunning] # Describes settings to use for long-running operations when generating @@ -356,14 +373,14 @@ class RenamedServicesEntry # # Example of a YAML configuration:: # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes # @!attribute [rw] auto_populated_fields # @return [::Array<::String>] # List of top-level fields of the request message, that should be @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-tasks-v2beta3/proto_docs/google/api/client.rb b/google-cloud-tasks-v2beta3/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-tasks-v2beta3/proto_docs/google/api/client.rb +++ b/google-cloud-tasks-v2beta3/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... # @!attribute [rw] long_running # @return [::Google::Api::MethodSettings::LongRunning] # Describes settings to use for long-running operations when generating @@ -356,14 +373,14 @@ class RenamedServicesEntry # # Example of a YAML configuration:: # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes # @!attribute [rw] auto_populated_fields # @return [::Array<::String>] # List of top-level fields of the request message, that should be @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-telco_automation-v1/proto_docs/google/api/client.rb b/google-cloud-telco_automation-v1/proto_docs/google/api/client.rb index 44c6bee7f2e5..97193034f37c 100644 --- a/google-cloud-telco_automation-v1/proto_docs/google/api/client.rb +++ b/google-cloud-telco_automation-v1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... # @!attribute [rw] long_running # @return [::Google::Api::MethodSettings::LongRunning] # Describes settings to use for long-running operations when generating @@ -356,14 +373,14 @@ class RenamedServicesEntry # # Example of a YAML configuration:: # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes # @!attribute [rw] auto_populated_fields # @return [::Array<::String>] # List of top-level fields of the request message, that should be @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-text_to_speech-v1/proto_docs/google/api/client.rb b/google-cloud-text_to_speech-v1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-text_to_speech-v1/proto_docs/google/api/client.rb +++ b/google-cloud-text_to_speech-v1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... # @!attribute [rw] long_running # @return [::Google::Api::MethodSettings::LongRunning] # Describes settings to use for long-running operations when generating @@ -356,14 +373,14 @@ class RenamedServicesEntry # # Example of a YAML configuration:: # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes # @!attribute [rw] auto_populated_fields # @return [::Array<::String>] # List of top-level fields of the request message, that should be @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-text_to_speech-v1beta1/proto_docs/google/api/client.rb b/google-cloud-text_to_speech-v1beta1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-text_to_speech-v1beta1/proto_docs/google/api/client.rb +++ b/google-cloud-text_to_speech-v1beta1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... # @!attribute [rw] long_running # @return [::Google::Api::MethodSettings::LongRunning] # Describes settings to use for long-running operations when generating @@ -356,14 +373,14 @@ class RenamedServicesEntry # # Example of a YAML configuration:: # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes # @!attribute [rw] auto_populated_fields # @return [::Array<::String>] # List of top-level fields of the request message, that should be @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-tpu-v1/proto_docs/google/api/client.rb b/google-cloud-tpu-v1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-tpu-v1/proto_docs/google/api/client.rb +++ b/google-cloud-tpu-v1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... # @!attribute [rw] long_running # @return [::Google::Api::MethodSettings::LongRunning] # Describes settings to use for long-running operations when generating @@ -356,14 +373,14 @@ class RenamedServicesEntry # # Example of a YAML configuration:: # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes # @!attribute [rw] auto_populated_fields # @return [::Array<::String>] # List of top-level fields of the request message, that should be @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-trace-v1/proto_docs/google/api/client.rb b/google-cloud-trace-v1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-trace-v1/proto_docs/google/api/client.rb +++ b/google-cloud-trace-v1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... # @!attribute [rw] long_running # @return [::Google::Api::MethodSettings::LongRunning] # Describes settings to use for long-running operations when generating @@ -356,14 +373,14 @@ class RenamedServicesEntry # # Example of a YAML configuration:: # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes # @!attribute [rw] auto_populated_fields # @return [::Array<::String>] # List of top-level fields of the request message, that should be @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-trace-v2/proto_docs/google/api/client.rb b/google-cloud-trace-v2/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-trace-v2/proto_docs/google/api/client.rb +++ b/google-cloud-trace-v2/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... # @!attribute [rw] long_running # @return [::Google::Api::MethodSettings::LongRunning] # Describes settings to use for long-running operations when generating @@ -356,14 +373,14 @@ class RenamedServicesEntry # # Example of a YAML configuration:: # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes # @!attribute [rw] auto_populated_fields # @return [::Array<::String>] # List of top-level fields of the request message, that should be @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-translate-v3/proto_docs/google/api/client.rb b/google-cloud-translate-v3/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-translate-v3/proto_docs/google/api/client.rb +++ b/google-cloud-translate-v3/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... # @!attribute [rw] long_running # @return [::Google::Api::MethodSettings::LongRunning] # Describes settings to use for long-running operations when generating @@ -356,14 +373,14 @@ class RenamedServicesEntry # # Example of a YAML configuration:: # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes # @!attribute [rw] auto_populated_fields # @return [::Array<::String>] # List of top-level fields of the request message, that should be @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-video-live_stream-v1/proto_docs/google/api/client.rb b/google-cloud-video-live_stream-v1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-video-live_stream-v1/proto_docs/google/api/client.rb +++ b/google-cloud-video-live_stream-v1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... # @!attribute [rw] long_running # @return [::Google::Api::MethodSettings::LongRunning] # Describes settings to use for long-running operations when generating @@ -356,14 +373,14 @@ class RenamedServicesEntry # # Example of a YAML configuration:: # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes # @!attribute [rw] auto_populated_fields # @return [::Array<::String>] # List of top-level fields of the request message, that should be @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-video-stitcher-v1/proto_docs/google/api/client.rb b/google-cloud-video-stitcher-v1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-video-stitcher-v1/proto_docs/google/api/client.rb +++ b/google-cloud-video-stitcher-v1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... # @!attribute [rw] long_running # @return [::Google::Api::MethodSettings::LongRunning] # Describes settings to use for long-running operations when generating @@ -356,14 +373,14 @@ class RenamedServicesEntry # # Example of a YAML configuration:: # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes # @!attribute [rw] auto_populated_fields # @return [::Array<::String>] # List of top-level fields of the request message, that should be @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-video-transcoder-v1/proto_docs/google/api/client.rb b/google-cloud-video-transcoder-v1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-video-transcoder-v1/proto_docs/google/api/client.rb +++ b/google-cloud-video-transcoder-v1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... # @!attribute [rw] long_running # @return [::Google::Api::MethodSettings::LongRunning] # Describes settings to use for long-running operations when generating @@ -356,14 +373,14 @@ class RenamedServicesEntry # # Example of a YAML configuration:: # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes # @!attribute [rw] auto_populated_fields # @return [::Array<::String>] # List of top-level fields of the request message, that should be @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-video_intelligence-v1/proto_docs/google/api/client.rb b/google-cloud-video_intelligence-v1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-video_intelligence-v1/proto_docs/google/api/client.rb +++ b/google-cloud-video_intelligence-v1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... # @!attribute [rw] long_running # @return [::Google::Api::MethodSettings::LongRunning] # Describes settings to use for long-running operations when generating @@ -356,14 +373,14 @@ class RenamedServicesEntry # # Example of a YAML configuration:: # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes # @!attribute [rw] auto_populated_fields # @return [::Array<::String>] # List of top-level fields of the request message, that should be @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-video_intelligence-v1beta2/proto_docs/google/api/client.rb b/google-cloud-video_intelligence-v1beta2/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-video_intelligence-v1beta2/proto_docs/google/api/client.rb +++ b/google-cloud-video_intelligence-v1beta2/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... # @!attribute [rw] long_running # @return [::Google::Api::MethodSettings::LongRunning] # Describes settings to use for long-running operations when generating @@ -356,14 +373,14 @@ class RenamedServicesEntry # # Example of a YAML configuration:: # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes # @!attribute [rw] auto_populated_fields # @return [::Array<::String>] # List of top-level fields of the request message, that should be @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/api/client.rb b/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/api/client.rb +++ b/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... # @!attribute [rw] long_running # @return [::Google::Api::MethodSettings::LongRunning] # Describes settings to use for long-running operations when generating @@ -356,14 +373,14 @@ class RenamedServicesEntry # # Example of a YAML configuration:: # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes # @!attribute [rw] auto_populated_fields # @return [::Array<::String>] # List of top-level fields of the request message, that should be @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/api/client.rb b/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/api/client.rb +++ b/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... # @!attribute [rw] long_running # @return [::Google::Api::MethodSettings::LongRunning] # Describes settings to use for long-running operations when generating @@ -356,14 +373,14 @@ class RenamedServicesEntry # # Example of a YAML configuration:: # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes # @!attribute [rw] auto_populated_fields # @return [::Array<::String>] # List of top-level fields of the request message, that should be @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/api/client.rb b/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/api/client.rb +++ b/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... # @!attribute [rw] long_running # @return [::Google::Api::MethodSettings::LongRunning] # Describes settings to use for long-running operations when generating @@ -356,14 +373,14 @@ class RenamedServicesEntry # # Example of a YAML configuration:: # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes # @!attribute [rw] auto_populated_fields # @return [::Array<::String>] # List of top-level fields of the request message, that should be @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-vision-v1/proto_docs/google/api/client.rb b/google-cloud-vision-v1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-vision-v1/proto_docs/google/api/client.rb +++ b/google-cloud-vision-v1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... # @!attribute [rw] long_running # @return [::Google::Api::MethodSettings::LongRunning] # Describes settings to use for long-running operations when generating @@ -356,14 +373,14 @@ class RenamedServicesEntry # # Example of a YAML configuration:: # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes # @!attribute [rw] auto_populated_fields # @return [::Array<::String>] # List of top-level fields of the request message, that should be @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/.gitignore b/owl-bot-staging/google-cloud-talent-v4beta1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/.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-talent-v4beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-talent-v4beta1/.repo-metadata.json deleted file mode 100644 index 64fc84b59ea7..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "jobs.googleapis.com", - "api_shortname": "jobs", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-talent-v4beta1/latest", - "distribution_name": "google-cloud-talent-v4beta1", - "is_cloud": true, - "language": "ruby", - "name": "jobs", - "name_pretty": "Cloud Talent Solution V4beta1 API", - "product_documentation": "https://cloud.google.com/solutions/talent-solution", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Transform your job search and candidate matching capabilities with Cloud Talent Solution, designed to support enterprise talent acquisition technology and evolve with your growing needs. This AI solution includes features such as Job Search and Profile Search to provide candidates and employers with an enhanced talent acquisition experience. Note that google-cloud-talent-v4beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-talent instead. See the readme for more details.", - "ruby-cloud-env-prefix": "TALENT", - "ruby-cloud-product-url": "https://cloud.google.com/solutions/talent-solution", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/.rubocop.yml b/owl-bot-staging/google-cloud-talent-v4beta1/.rubocop.yml deleted file mode 100644 index 8fe2d7ec9ecd..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-talent-v4beta1.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-talent-v4beta1.rb" diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/.toys.rb b/owl-bot-staging/google-cloud-talent-v4beta1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/.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-talent-v4beta1/.yardopts b/owl-bot-staging/google-cloud-talent-v4beta1/.yardopts deleted file mode 100644 index 72b9d2c72c9c..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Talent Solution V4beta1 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-talent-v4beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-talent-v4beta1/AUTHENTICATION.md deleted file mode 100644 index 26b135cba9b3..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-talent-v4beta1 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-talent-v4beta1 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/talent/v4beta1" - -client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/talent/v4beta1" - -::Google::Cloud::Talent::V4beta1::CompanyService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Talent::V4beta1::CompanyService::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-talent-v4beta1 -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/talent/v4beta1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Talent::V4beta1::CompanyService::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-talent-v4beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-talent-v4beta1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/Gemfile b/owl-bot-staging/google-cloud-talent-v4beta1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/LICENSE.md b/owl-bot-staging/google-cloud-talent-v4beta1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/README.md b/owl-bot-staging/google-cloud-talent-v4beta1/README.md deleted file mode 100644 index 5a72cfcb8d08..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Talent Solution V4beta1 API - -Cloud Talent Solution provides the capability to create, read, update, and delete job postings, as well as search jobs based on keywords and filters. - -Transform your job search and candidate matching capabilities with Cloud Talent Solution, designed to support enterprise talent acquisition technology and evolve with your growing needs. This AI solution includes features such as Job Search and Profile Search to provide candidates and employers with an enhanced talent acquisition experience. - -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 Talent Solution V4beta1 API. Most users should consider using -the main client gem, -[google-cloud-talent](https://rubygems.org/gems/google-cloud-talent). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-talent-v4beta1 -``` - -## 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/jobs.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/talent/v4beta1" - -client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new -request = ::Google::Cloud::Talent::V4beta1::CreateCompanyRequest.new # (request fields as keyword arguments...) -response = client.create_company request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-talent-v4beta1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/solutions/talent-solution) -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/talent/v4beta1" -require "logger" - -client = ::Google::Cloud::Talent::V4beta1::CompanyService::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-talent`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-talent-v4beta1`. -_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-talent`. -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-talent-v4beta1`. - -### 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-talent-v4beta1/Rakefile b/owl-bot-staging/google-cloud-talent-v4beta1/Rakefile deleted file mode 100644 index fa2bfbd46707..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["TALENT_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["TALENT_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["TALENT_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 TALENT_TEST_PROJECT=test123 TALENT_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/talent/v4beta1/company_service/credentials" - ::Google::Cloud::Talent::V4beta1::CompanyService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["TALENT_PROJECT"] = project - ENV["TALENT_TEST_PROJECT"] = project - ENV["TALENT_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-talent-v4beta1 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-talent-v4beta1 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-talent-v4beta1 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-talent-v4beta1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-talent-v4beta1" - header "google-cloud-talent-v4beta1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-talent-v4beta1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-talent-v4beta1 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-talent-v4beta1 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-talent-v4beta1 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-talent-v4beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-talent-v4beta1/gapic_metadata.json deleted file mode 100644 index 91c70fb53d53..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/gapic_metadata.json +++ /dev/null @@ -1,164 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.talent.v4beta1", - "libraryPackage": "::Google::Cloud::Talent::V4beta1", - "services": { - "CompanyService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Talent::V4beta1::CompanyService::Client", - "rpcs": { - "CreateCompany": { - "methods": [ - "create_company" - ] - }, - "GetCompany": { - "methods": [ - "get_company" - ] - }, - "UpdateCompany": { - "methods": [ - "update_company" - ] - }, - "DeleteCompany": { - "methods": [ - "delete_company" - ] - }, - "ListCompanies": { - "methods": [ - "list_companies" - ] - } - } - } - } - }, - "Completion": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Talent::V4beta1::Completion::Client", - "rpcs": { - "CompleteQuery": { - "methods": [ - "complete_query" - ] - } - } - } - } - }, - "EventService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Talent::V4beta1::EventService::Client", - "rpcs": { - "CreateClientEvent": { - "methods": [ - "create_client_event" - ] - } - } - } - } - }, - "JobService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Talent::V4beta1::JobService::Client", - "rpcs": { - "CreateJob": { - "methods": [ - "create_job" - ] - }, - "BatchCreateJobs": { - "methods": [ - "batch_create_jobs" - ] - }, - "GetJob": { - "methods": [ - "get_job" - ] - }, - "UpdateJob": { - "methods": [ - "update_job" - ] - }, - "BatchUpdateJobs": { - "methods": [ - "batch_update_jobs" - ] - }, - "DeleteJob": { - "methods": [ - "delete_job" - ] - }, - "BatchDeleteJobs": { - "methods": [ - "batch_delete_jobs" - ] - }, - "ListJobs": { - "methods": [ - "list_jobs" - ] - }, - "SearchJobs": { - "methods": [ - "search_jobs" - ] - }, - "SearchJobsForAlert": { - "methods": [ - "search_jobs_for_alert" - ] - } - } - } - } - }, - "TenantService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Talent::V4beta1::TenantService::Client", - "rpcs": { - "CreateTenant": { - "methods": [ - "create_tenant" - ] - }, - "GetTenant": { - "methods": [ - "get_tenant" - ] - }, - "UpdateTenant": { - "methods": [ - "update_tenant" - ] - }, - "DeleteTenant": { - "methods": [ - "delete_tenant" - ] - }, - "ListTenants": { - "methods": [ - "list_tenants" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/google-cloud-talent-v4beta1.gemspec b/owl-bot-staging/google-cloud-talent-v4beta1/google-cloud-talent-v4beta1.gemspec deleted file mode 100644 index 9a1086bd8796..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/google-cloud-talent-v4beta1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/talent/v4beta1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-talent-v4beta1" - gem.version = Google::Cloud::Talent::V4beta1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Transform your job search and candidate matching capabilities with Cloud Talent Solution, designed to support enterprise talent acquisition technology and evolve with your growing needs. This AI solution includes features such as Job Search and Profile Search to provide candidates and employers with an enhanced talent acquisition experience. Note that google-cloud-talent-v4beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-talent instead. See the readme for more details." - gem.summary = "Cloud Talent Solution provides the capability to create, read, update, and delete job postings, as well as search jobs based on keywords and filters." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google-cloud-talent-v4beta1.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google-cloud-talent-v4beta1.rb deleted file mode 100644 index 53968619b7a8..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google-cloud-talent-v4beta1.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/talent/v4beta1" diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1.rb deleted file mode 100644 index 52a7a7baa5bd..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/talent/v4beta1/company_service" -require "google/cloud/talent/v4beta1/completion" -require "google/cloud/talent/v4beta1/event_service" -require "google/cloud/talent/v4beta1/job_service" -require "google/cloud/talent/v4beta1/tenant_service" -require "google/cloud/talent/v4beta1/version" - -module Google - module Cloud - module Talent - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/talent/v4beta1" - # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/talent/v4beta1" - # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new - # - module V4beta1 - end - end - end -end - -helper_path = ::File.join __dir__, "v4beta1", "_helpers.rb" -require "google/cloud/talent/v4beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/batch_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/batch_pb.rb deleted file mode 100644 index ca865c4b1ff8..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/batch_pb.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/talent/v4beta1/batch.proto - -require 'google/protobuf' - - -descriptor_data = "\n\'google/cloud/talent/v4beta1/batch.proto\x12\x1bgoogle.cloud.talent.v4beta1Bn\n\x1f\x63om.google.cloud.talent.v4beta1B\nBatchProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Talent - module V4beta1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/common_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/common_pb.rb deleted file mode 100644 index 960540b73407..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/common_pb.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/talent/v4beta1/common.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' -require 'google/type/latlng_pb' -require 'google/type/money_pb' -require 'google/type/postal_address_pb' - - -descriptor_data = "\n(google/cloud/talent/v4beta1/common.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x18google/type/latlng.proto\x1a\x17google/type/money.proto\x1a google/type/postal_address.proto\"n\n\x0eTimestampRange\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\"\xb7\x03\n\x08Location\x12I\n\rlocation_type\x18\x01 \x01(\x0e\x32\x32.google.cloud.talent.v4beta1.Location.LocationType\x12\x32\n\x0epostal_address\x18\x02 \x01(\x0b\x32\x1a.google.type.PostalAddress\x12$\n\x07lat_lng\x18\x03 \x01(\x0b\x32\x13.google.type.LatLng\x12\x14\n\x0cradius_miles\x18\x04 \x01(\x01\"\xef\x01\n\x0cLocationType\x12\x1d\n\x19LOCATION_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43OUNTRY\x10\x01\x12\x17\n\x13\x41\x44MINISTRATIVE_AREA\x10\x02\x12\x1b\n\x17SUB_ADMINISTRATIVE_AREA\x10\x03\x12\x0c\n\x08LOCALITY\x10\x04\x12\x0f\n\x0bPOSTAL_CODE\x10\x05\x12\x10\n\x0cSUB_LOCALITY\x10\x06\x12\x12\n\x0eSUB_LOCALITY_1\x10\x07\x12\x12\n\x0eSUB_LOCALITY_2\x10\x08\x12\x10\n\x0cNEIGHBORHOOD\x10\t\x12\x12\n\x0eSTREET_ADDRESS\x10\n\"\x9f\x01\n\x0fRequestMetadata\x12\x0e\n\x06\x64omain\x18\x01 \x01(\t\x12\x12\n\nsession_id\x18\x02 \x01(\t\x12\x0f\n\x07user_id\x18\x03 \x01(\t\x12\x19\n\x11\x61llow_missing_ids\x18\x04 \x01(\x08\x12<\n\x0b\x64\x65vice_info\x18\x05 \x01(\x0b\x32\'.google.cloud.talent.v4beta1.DeviceInfo\"&\n\x10ResponseMetadata\x12\x12\n\nrequest_id\x18\x01 \x01(\t\"\xcf\x01\n\nDeviceInfo\x12G\n\x0b\x64\x65vice_type\x18\x01 \x01(\x0e\x32\x32.google.cloud.talent.v4beta1.DeviceInfo.DeviceType\x12\n\n\x02id\x18\x02 \x01(\t\"l\n\nDeviceType\x12\x1b\n\x17\x44\x45VICE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03WEB\x10\x01\x12\x0e\n\nMOBILE_WEB\x10\x02\x12\x0b\n\x07\x41NDROID\x10\x03\x12\x07\n\x03IOS\x10\x04\x12\x07\n\x03\x42OT\x10\x05\x12\t\n\x05OTHER\x10\x06\"m\n\x0f\x43ustomAttribute\x12\x15\n\rstring_values\x18\x01 \x03(\t\x12\x13\n\x0blong_values\x18\x02 \x03(\x03\x12\x12\n\nfilterable\x18\x03 \x01(\x08\x12\x1a\n\x12keyword_searchable\x18\x04 \x01(\x08\"W\n\x12SpellingCorrection\x12\x11\n\tcorrected\x18\x01 \x01(\x08\x12\x16\n\x0e\x63orrected_text\x18\x02 \x01(\t\x12\x16\n\x0e\x63orrected_html\x18\x03 \x01(\t\"\xa6\t\n\x10\x43ompensationInfo\x12P\n\x07\x65ntries\x18\x01 \x03(\x0b\x32?.google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry\x12p\n\"annualized_base_compensation_range\x18\x02 \x01(\x0b\x32?.google.cloud.talent.v4beta1.CompensationInfo.CompensationRangeB\x03\xe0\x41\x03\x12q\n#annualized_total_compensation_range\x18\x03 \x01(\x0b\x32?.google.cloud.talent.v4beta1.CompensationInfo.CompensationRangeB\x03\xe0\x41\x03\x1a\x92\x03\n\x11\x43ompensationEntry\x12L\n\x04type\x18\x01 \x01(\x0e\x32>.google.cloud.talent.v4beta1.CompensationInfo.CompensationType\x12L\n\x04unit\x18\x02 \x01(\x0e\x32>.google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit\x12$\n\x06\x61mount\x18\x03 \x01(\x0b\x32\x12.google.type.MoneyH\x00\x12P\n\x05range\x18\x04 \x01(\x0b\x32?.google.cloud.talent.v4beta1.CompensationInfo.CompensationRangeH\x00\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x12=\n\x17\x65xpected_units_per_year\x18\x06 \x01(\x0b\x32\x1c.google.protobuf.DoubleValueB\x15\n\x13\x63ompensation_amount\x1ao\n\x11\x43ompensationRange\x12,\n\x10max_compensation\x18\x02 \x01(\x0b\x32\x12.google.type.Money\x12,\n\x10min_compensation\x18\x01 \x01(\x0b\x32\x12.google.type.Money\"\xb5\x01\n\x10\x43ompensationType\x12!\n\x1d\x43OMPENSATION_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x42\x41SE\x10\x01\x12\t\n\x05\x42ONUS\x10\x02\x12\x11\n\rSIGNING_BONUS\x10\x03\x12\n\n\x06\x45QUITY\x10\x04\x12\x12\n\x0ePROFIT_SHARING\x10\x05\x12\x0f\n\x0b\x43OMMISSIONS\x10\x06\x12\x08\n\x04TIPS\x10\x07\x12\x1b\n\x17OTHER_COMPENSATION_TYPE\x10\x08\"\x9c\x01\n\x10\x43ompensationUnit\x12!\n\x1d\x43OMPENSATION_UNIT_UNSPECIFIED\x10\x00\x12\n\n\x06HOURLY\x10\x01\x12\t\n\x05\x44\x41ILY\x10\x02\x12\n\n\x06WEEKLY\x10\x03\x12\x0b\n\x07MONTHLY\x10\x04\x12\n\n\x06YEARLY\x10\x05\x12\x0c\n\x08ONE_TIME\x10\x06\x12\x1b\n\x17OTHER_COMPENSATION_UNIT\x10\x07\"\xcc\x03\n\x16\x42\x61tchOperationMetadata\x12H\n\x05state\x18\x01 \x01(\x0e\x32\x39.google.cloud.talent.v4beta1.BatchOperationMetadata.State\x12\x19\n\x11state_description\x18\x02 \x01(\t\x12\x15\n\rsuccess_count\x18\x03 \x01(\x05\x12\x15\n\rfailure_count\x18\x04 \x01(\x05\x12\x13\n\x0btotal_count\x18\x05 \x01(\x05\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"z\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cINITIALIZING\x10\x01\x12\x0e\n\nPROCESSING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0e\n\nCANCELLING\x10\x05\x12\r\n\tCANCELLED\x10\x06*y\n\x0b\x43ompanySize\x12\x1c\n\x18\x43OMPANY_SIZE_UNSPECIFIED\x10\x00\x12\x08\n\x04MINI\x10\x01\x12\t\n\x05SMALL\x10\x02\x12\x0b\n\x07SMEDIUM\x10\x03\x12\n\n\x06MEDIUM\x10\x04\x12\x07\n\x03\x42IG\x10\x05\x12\n\n\x06\x42IGGER\x10\x06\x12\t\n\x05GIANT\x10\x07*\xe2\x01\n\nJobBenefit\x12\x1b\n\x17JOB_BENEFIT_UNSPECIFIED\x10\x00\x12\x0e\n\nCHILD_CARE\x10\x01\x12\n\n\x06\x44\x45NTAL\x10\x02\x12\x14\n\x10\x44OMESTIC_PARTNER\x10\x03\x12\x12\n\x0e\x46LEXIBLE_HOURS\x10\x04\x12\x0b\n\x07MEDICAL\x10\x05\x12\x12\n\x0eLIFE_INSURANCE\x10\x06\x12\x12\n\x0ePARENTAL_LEAVE\x10\x07\x12\x13\n\x0fRETIREMENT_PLAN\x10\x08\x12\r\n\tSICK_DAYS\x10\t\x12\x0c\n\x08VACATION\x10\n\x12\n\n\x06VISION\x10\x0b*\x8e\x02\n\nDegreeType\x12\x1b\n\x17\x44\x45GREE_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11PRIMARY_EDUCATION\x10\x01\x12\x1d\n\x19LOWER_SECONDARY_EDUCATION\x10\x02\x12\x1d\n\x19UPPER_SECONDARY_EDUCATION\x10\x03\x12\x1c\n\x18\x41\x44ULT_REMEDIAL_EDUCATION\x10\x04\x12\x1c\n\x18\x41SSOCIATES_OR_EQUIVALENT\x10\x05\x12\x1b\n\x17\x42\x41\x43HELORS_OR_EQUIVALENT\x10\x06\x12\x19\n\x15MASTERS_OR_EQUIVALENT\x10\x07\x12\x1a\n\x16\x44OCTORAL_OR_EQUIVALENT\x10\x08*\xdc\x01\n\x0e\x45mploymentType\x12\x1f\n\x1b\x45MPLOYMENT_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tFULL_TIME\x10\x01\x12\r\n\tPART_TIME\x10\x02\x12\x0e\n\nCONTRACTOR\x10\x03\x12\x14\n\x10\x43ONTRACT_TO_HIRE\x10\x04\x12\r\n\tTEMPORARY\x10\x05\x12\n\n\x06INTERN\x10\x06\x12\r\n\tVOLUNTEER\x10\x07\x12\x0c\n\x08PER_DIEM\x10\x08\x12\x12\n\x0e\x46LY_IN_FLY_OUT\x10\t\x12\x19\n\x15OTHER_EMPLOYMENT_TYPE\x10\n*q\n\x08JobLevel\x12\x19\n\x15JOB_LEVEL_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x45NTRY_LEVEL\x10\x01\x12\x0f\n\x0b\x45XPERIENCED\x10\x02\x12\x0b\n\x07MANAGER\x10\x03\x12\x0c\n\x08\x44IRECTOR\x10\x04\x12\r\n\tEXECUTIVE\x10\x05*\xba\x06\n\x0bJobCategory\x12\x1c\n\x18JOB_CATEGORY_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x41\x43\x43OUNTING_AND_FINANCE\x10\x01\x12\x1d\n\x19\x41\x44MINISTRATIVE_AND_OFFICE\x10\x02\x12\x1d\n\x19\x41\x44VERTISING_AND_MARKETING\x10\x03\x12\x0f\n\x0b\x41NIMAL_CARE\x10\x04\x12\x1a\n\x16\x41RT_FASHION_AND_DESIGN\x10\x05\x12\x17\n\x13\x42USINESS_OPERATIONS\x10\x06\x12\x1b\n\x17\x43LEANING_AND_FACILITIES\x10\x07\x12\x13\n\x0f\x43OMPUTER_AND_IT\x10\x08\x12\x10\n\x0c\x43ONSTRUCTION\x10\t\x12\x14\n\x10\x43USTOMER_SERVICE\x10\n\x12\r\n\tEDUCATION\x10\x0b\x12\x1c\n\x18\x45NTERTAINMENT_AND_TRAVEL\x10\x0c\x12\x18\n\x14\x46\x41RMING_AND_OUTDOORS\x10\r\x12\x0e\n\nHEALTHCARE\x10\x0e\x12\x13\n\x0fHUMAN_RESOURCES\x10\x0f\x12\'\n#INSTALLATION_MAINTENANCE_AND_REPAIR\x10\x10\x12\t\n\x05LEGAL\x10\x11\x12\x0e\n\nMANAGEMENT\x10\x12\x12\x1f\n\x1bMANUFACTURING_AND_WAREHOUSE\x10\x13\x12$\n MEDIA_COMMUNICATIONS_AND_WRITING\x10\x14\x12\x16\n\x12OIL_GAS_AND_MINING\x10\x15\x12\x1e\n\x1aPERSONAL_CARE_AND_SERVICES\x10\x16\x12\x17\n\x13PROTECTIVE_SERVICES\x10\x17\x12\x0f\n\x0bREAL_ESTATE\x10\x18\x12\x1e\n\x1aRESTAURANT_AND_HOSPITALITY\x10\x19\x12\x14\n\x10SALES_AND_RETAIL\x10\x1a\x12\x1b\n\x17SCIENCE_AND_ENGINEERING\x10\x1b\x12\"\n\x1eSOCIAL_SERVICES_AND_NON_PROFIT\x10\x1c\x12!\n\x1dSPORTS_FITNESS_AND_RECREATION\x10\x1d\x12 \n\x1cTRANSPORTATION_AND_LOGISTICS\x10\x1e*e\n\rPostingRegion\x12\x1e\n\x1aPOSTING_REGION_UNSPECIFIED\x10\x00\x12\x17\n\x13\x41\x44MINISTRATIVE_AREA\x10\x01\x12\n\n\x06NATION\x10\x02\x12\x0f\n\x0bTELECOMMUTE\x10\x03*n\n\nVisibility\x12\x1a\n\x16VISIBILITY_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x41\x43\x43OUNT_ONLY\x10\x01\x12\x16\n\x12SHARED_WITH_GOOGLE\x10\x02\x12\x16\n\x12SHARED_WITH_PUBLIC\x10\x03\x1a\x02\x18\x01*q\n\x10HtmlSanitization\x12!\n\x1dHTML_SANITIZATION_UNSPECIFIED\x10\x00\x12\x1e\n\x1aHTML_SANITIZATION_DISABLED\x10\x01\x12\x1a\n\x16SIMPLE_FORMATTING_ONLY\x10\x02*c\n\rCommuteMethod\x12\x1e\n\x1a\x43OMMUTE_METHOD_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44RIVING\x10\x01\x12\x0b\n\x07TRANSIT\x10\x02\x12\x0b\n\x07WALKING\x10\x03\x12\x0b\n\x07\x43YCLING\x10\x04\x42o\n\x1f\x63om.google.cloud.talent.v4beta1B\x0b\x43ommonProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Talent - module V4beta1 - TimestampRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.TimestampRange").msgclass - Location = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Location").msgclass - Location::LocationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Location.LocationType").enummodule - RequestMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.RequestMetadata").msgclass - ResponseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.ResponseMetadata").msgclass - DeviceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.DeviceInfo").msgclass - DeviceInfo::DeviceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.DeviceInfo.DeviceType").enummodule - CustomAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CustomAttribute").msgclass - SpellingCorrection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.SpellingCorrection").msgclass - CompensationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompensationInfo").msgclass - CompensationInfo::CompensationEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry").msgclass - CompensationInfo::CompensationRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompensationInfo.CompensationRange").msgclass - CompensationInfo::CompensationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompensationInfo.CompensationType").enummodule - CompensationInfo::CompensationUnit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit").enummodule - BatchOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.BatchOperationMetadata").msgclass - BatchOperationMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.BatchOperationMetadata.State").enummodule - CompanySize = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompanySize").enummodule - JobBenefit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.JobBenefit").enummodule - DegreeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.DegreeType").enummodule - EmploymentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.EmploymentType").enummodule - JobLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.JobLevel").enummodule - JobCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.JobCategory").enummodule - PostingRegion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.PostingRegion").enummodule - Visibility = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Visibility").enummodule - HtmlSanitization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.HtmlSanitization").enummodule - CommuteMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CommuteMethod").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_pb.rb deleted file mode 100644 index 8ba3ad3f3e98..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/talent/v4beta1/company.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/talent/v4beta1/common_pb' - - -descriptor_data = "\n)google/cloud/talent/v4beta1/company.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/talent/v4beta1/common.proto\"\x80\x05\n\x07\x43ompany\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x65xternal_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x04size\x18\x04 \x01(\x0e\x32(.google.cloud.talent.v4beta1.CompanySize\x12\x1c\n\x14headquarters_address\x18\x05 \x01(\t\x12\x15\n\rhiring_agency\x18\x06 \x01(\x08\x12\x10\n\x08\x65\x65o_text\x18\x07 \x01(\t\x12\x13\n\x0bwebsite_uri\x18\x08 \x01(\t\x12\x17\n\x0f\x63\x61reer_site_uri\x18\t \x01(\t\x12\x11\n\timage_uri\x18\n \x01(\t\x12\x34\n(keyword_searchable_job_custom_attributes\x18\x0b \x03(\tB\x02\x18\x01\x12K\n\x0c\x64\x65rived_info\x18\x0c \x01(\x0b\x32\x30.google.cloud.talent.v4beta1.Company.DerivedInfoB\x03\xe0\x41\x03\x12\x16\n\tsuspended\x18\r \x01(\x08\x42\x03\xe0\x41\x03\x1aS\n\x0b\x44\x65rivedInfo\x12\x44\n\x15headquarters_location\x18\x01 \x01(\x0b\x32%.google.cloud.talent.v4beta1.Location:\x81\x01\xea\x41~\n\x1bjobs.googleapis.com/Company\x12\x37projects/{project}/tenants/{tenant}/companies/{company}\x12&projects/{project}/companies/{company}Bx\n\x1f\x63om.google.cloud.talent.v4beta1B\x14\x43ompanyResourceProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Talent - module V4beta1 - Company = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Company").msgclass - Company::DerivedInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Company.DerivedInfo").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service.rb deleted file mode 100644 index 4478c38d82e3..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service.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/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/talent/v4beta1/version" - -require "google/cloud/talent/v4beta1/company_service/credentials" -require "google/cloud/talent/v4beta1/company_service/paths" -require "google/cloud/talent/v4beta1/company_service/client" -require "google/cloud/talent/v4beta1/company_service/rest" - -module Google - module Cloud - module Talent - module V4beta1 - ## - # A service that handles company management, including CRUD and enumeration. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/talent/v4beta1/company_service" - # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/talent/v4beta1/company_service/rest" - # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new - # - module CompanyService - end - end - end - end -end - -helper_path = ::File.join __dir__, "company_service", "helpers.rb" -require "google/cloud/talent/v4beta1/company_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/client.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/client.rb deleted file mode 100644 index 9763c82b34b0..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/client.rb +++ /dev/null @@ -1,920 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/talent/v4beta1/company_service_pb" - -module Google - module Cloud - module Talent - module V4beta1 - module CompanyService - ## - # Client for the CompanyService service. - # - # A service that handles company management, including CRUD and enumeration. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :company_service_stub - - ## - # Configure the CompanyService Client class. - # - # See {::Google::Cloud::Talent::V4beta1::CompanyService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CompanyService clients - # ::Google::Cloud::Talent::V4beta1::CompanyService::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", "Talent", "V4beta1"] - 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_company.timeout = 30.0 - - default_config.rpcs.get_company.timeout = 30.0 - default_config.rpcs.get_company.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_company.timeout = 30.0 - - default_config.rpcs.delete_company.timeout = 30.0 - default_config.rpcs.delete_company.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_companies.timeout = 30.0 - default_config.rpcs.list_companies.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CompanyService 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::Talent::V4beta1::CompanyService::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 - @company_service_stub.universe_domain - end - - ## - # Create a new CompanyService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CompanyService 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/talent/v4beta1/company_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 - - @company_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Talent::V4beta1::CompanyService::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 - ) - - @company_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 - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @company_service_stub.logger - end - - # Service calls - - ## - # Creates a new company entity. - # - # @overload create_company(request, options = nil) - # Pass arguments to `create_company` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::CreateCompanyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::CreateCompanyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_company(parent: nil, company: nil) - # Pass arguments to `create_company` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the tenant under which the company is created. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, - # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant - # is created, for example, "projects/foo". - # @param company [::Google::Cloud::Talent::V4beta1::Company, ::Hash] - # Required. The company to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Talent::V4beta1::Company] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Talent::V4beta1::Company] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::CompanyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::CreateCompanyRequest.new - # - # # Call the create_company method. - # result = client.create_company request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::Company. - # p result - # - def create_company request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::CreateCompanyRequest - - # Converts hash and nil to 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_company.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_company.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_company.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @company_service_stub.call_rpc :create_company, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves specified company. - # - # @overload get_company(request, options = nil) - # Pass arguments to `get_company` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::GetCompanyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::GetCompanyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_company(name: nil) - # Pass arguments to `get_company` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the company to be retrieved. - # - # The format is - # "projects/\\{project_id}/tenants/\\{tenant_id}/companies/\\{company_id}", for - # example, "projects/api-test-project/tenants/foo/companies/bar". - # - # If tenant id is unspecified, the default tenant is used, for - # example, "projects/api-test-project/companies/bar". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Talent::V4beta1::Company] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Talent::V4beta1::Company] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::CompanyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::GetCompanyRequest.new - # - # # Call the get_company method. - # result = client.get_company request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::Company. - # p result - # - def get_company request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::GetCompanyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_company.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_company.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_company.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @company_service_stub.call_rpc :get_company, request, 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 specified company. - # - # @overload update_company(request, options = nil) - # Pass arguments to `update_company` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_company(company: nil, update_mask: nil) - # Pass arguments to `update_company` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param company [::Google::Cloud::Talent::V4beta1::Company, ::Hash] - # Required. The company resource to replace the current resource in the - # system. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Strongly recommended for the best service experience. - # - # If - # {::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest#update_mask update_mask} - # is provided, only the specified fields in - # {::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest#company company} are - # updated. Otherwise all the fields are updated. - # - # A field mask to specify the company fields to be updated. Only - # top level fields of {::Google::Cloud::Talent::V4beta1::Company Company} are - # supported. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Talent::V4beta1::Company] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Talent::V4beta1::Company] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::CompanyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::UpdateCompanyRequest.new - # - # # Call the update_company method. - # result = client.update_company request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::Company. - # p result - # - def update_company request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest - - # Converts hash and nil to 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_company.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.company&.name - header_params["company.name"] = request.company.name - end - - request_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_company.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_company.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @company_service_stub.call_rpc :update_company, request, 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 specified company. - # Prerequisite: The company has no jobs associated with it. - # - # @overload delete_company(request, options = nil) - # Pass arguments to `delete_company` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_company(name: nil) - # Pass arguments to `delete_company` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the company to be deleted. - # - # The format is - # "projects/\\{project_id}/tenants/\\{tenant_id}/companies/\\{company_id}", for - # example, "projects/foo/tenants/bar/companies/baz". - # - # If tenant id is unspecified, the default tenant is used, for - # example, "projects/foo/companies/bar". - # - # @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/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::CompanyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::DeleteCompanyRequest.new - # - # # Call the delete_company method. - # result = client.delete_company request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_company request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest - - # Converts hash and nil to 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_company.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_company.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_company.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @company_service_stub.call_rpc :delete_company, request, 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 companies associated with the project. - # - # @overload list_companies(request, options = nil) - # Pass arguments to `list_companies` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::ListCompaniesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::ListCompaniesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_companies(parent: nil, page_token: nil, page_size: nil, require_open_jobs: nil) - # Pass arguments to `list_companies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the tenant under which the company is created. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, - # "projects/foo/tenant/bar". - # - # If tenant id is unspecified, the default tenant will be used, for - # example, "projects/foo". - # @param page_token [::String] - # The starting indicator from which to return results. - # @param page_size [::Integer] - # The maximum number of companies to be returned, at most 100. - # Default is 100 if a non-positive number is provided. - # @param require_open_jobs [::Boolean] - # Set to true if the companies requested must have open jobs. - # - # Defaults to false. - # - # If true, at most - # {::Google::Cloud::Talent::V4beta1::ListCompaniesRequest#page_size page_size} of - # companies are fetched, among which only those with open jobs are returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Company>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Company>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::CompanyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::ListCompaniesRequest.new - # - # # Call the list_companies method. - # result = client.list_companies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Talent::V4beta1::Company. - # p item - # end - # - def list_companies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::ListCompaniesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_companies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_companies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_companies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @company_service_stub.call_rpc :list_companies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @company_service_stub, :list_companies, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CompanyService API. - # - # This class represents the configuration for CompanyService, - # 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::Talent::V4beta1::CompanyService::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_company to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Talent::V4beta1::CompanyService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_company.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_company.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::Talent::V4beta1::CompanyService::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 = "jobs.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 CompanyService 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_company` - # @return [::Gapic::Config::Method] - # - attr_reader :create_company - ## - # RPC-specific configuration for `get_company` - # @return [::Gapic::Config::Method] - # - attr_reader :get_company - ## - # RPC-specific configuration for `update_company` - # @return [::Gapic::Config::Method] - # - attr_reader :update_company - ## - # RPC-specific configuration for `delete_company` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_company - ## - # RPC-specific configuration for `list_companies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_companies - - # @private - def initialize parent_rpcs = nil - create_company_config = parent_rpcs.create_company if parent_rpcs.respond_to? :create_company - @create_company = ::Gapic::Config::Method.new create_company_config - get_company_config = parent_rpcs.get_company if parent_rpcs.respond_to? :get_company - @get_company = ::Gapic::Config::Method.new get_company_config - update_company_config = parent_rpcs.update_company if parent_rpcs.respond_to? :update_company - @update_company = ::Gapic::Config::Method.new update_company_config - delete_company_config = parent_rpcs.delete_company if parent_rpcs.respond_to? :delete_company - @delete_company = ::Gapic::Config::Method.new delete_company_config - list_companies_config = parent_rpcs.list_companies if parent_rpcs.respond_to? :list_companies - @list_companies = ::Gapic::Config::Method.new list_companies_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/credentials.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/credentials.rb deleted file mode 100644 index 9856588eab54..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/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 Talent - module V4beta1 - module CompanyService - # Credentials for the CompanyService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/jobs" - ] - self.env_vars = [ - "TALENT_CREDENTIALS", - "TALENT_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "TALENT_CREDENTIALS_JSON", - "TALENT_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-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/paths.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/paths.rb deleted file mode 100644 index dee2daa131de..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/paths.rb +++ /dev/null @@ -1,105 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Talent - module V4beta1 - module CompanyService - # Path helper methods for the CompanyService API. - module Paths - ## - # Create a fully-qualified Company resource string. - # - # @overload company_path(project:, tenant:, company:) - # The resource will be in the following format: - # - # `projects/{project}/tenants/{tenant}/companies/{company}` - # - # @param project [String] - # @param tenant [String] - # @param company [String] - # - # @overload company_path(project:, company:) - # The resource will be in the following format: - # - # `projects/{project}/companies/{company}` - # - # @param project [String] - # @param company [String] - # - # @return [::String] - def company_path **args - resources = { - "company:project:tenant" => (proc do |project:, tenant:, company:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "tenant cannot contain /" if tenant.to_s.include? "/" - - "projects/#{project}/tenants/#{tenant}/companies/#{company}" - end), - "company:project" => (proc do |project:, company:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/companies/#{company}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - 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 Tenant resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/tenants/{tenant}` - # - # @param project [String] - # @param tenant [String] - # - # @return [::String] - def tenant_path project:, tenant: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/tenants/#{tenant}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/rest.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/rest.rb deleted file mode 100644 index e0bde75185ad..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/rest.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 "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/talent/v4beta1/version" - -require "google/cloud/talent/v4beta1/company_service/credentials" -require "google/cloud/talent/v4beta1/company_service/paths" -require "google/cloud/talent/v4beta1/company_service/rest/client" - -module Google - module Cloud - module Talent - module V4beta1 - ## - # A service that handles company management, including CRUD and enumeration. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/talent/v4beta1/company_service/rest" - # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new - # - module CompanyService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/talent/v4beta1/company_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/rest/client.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/rest/client.rb deleted file mode 100644 index df00c372ce9f..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/rest/client.rb +++ /dev/null @@ -1,842 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/talent/v4beta1/company_service_pb" -require "google/cloud/talent/v4beta1/company_service/rest/service_stub" - -module Google - module Cloud - module Talent - module V4beta1 - module CompanyService - module Rest - ## - # REST client for the CompanyService service. - # - # A service that handles company management, including CRUD and enumeration. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :company_service_stub - - ## - # Configure the CompanyService Client class. - # - # See {::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CompanyService clients - # ::Google::Cloud::Talent::V4beta1::CompanyService::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", "Talent", "V4beta1"] - 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_company.timeout = 30.0 - - default_config.rpcs.get_company.timeout = 30.0 - default_config.rpcs.get_company.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_company.timeout = 30.0 - - default_config.rpcs.delete_company.timeout = 30.0 - default_config.rpcs.delete_company.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_companies.timeout = 30.0 - default_config.rpcs.list_companies.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CompanyService 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::Talent::V4beta1::CompanyService::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 - @company_service_stub.universe_domain - end - - ## - # Create a new CompanyService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CompanyService 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 - - @company_service_stub = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @company_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 - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @company_service_stub.logger - end - - # Service calls - - ## - # Creates a new company entity. - # - # @overload create_company(request, options = nil) - # Pass arguments to `create_company` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::CreateCompanyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::CreateCompanyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_company(parent: nil, company: nil) - # Pass arguments to `create_company` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the tenant under which the company is created. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, - # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant - # is created, for example, "projects/foo". - # @param company [::Google::Cloud::Talent::V4beta1::Company, ::Hash] - # Required. The company to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::Company] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::Company] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::CreateCompanyRequest.new - # - # # Call the create_company method. - # result = client.create_company request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::Company. - # p result - # - def create_company request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::CreateCompanyRequest - - # Converts hash and nil to an 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_company.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_company.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_company.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @company_service_stub.create_company request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves specified company. - # - # @overload get_company(request, options = nil) - # Pass arguments to `get_company` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::GetCompanyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::GetCompanyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_company(name: nil) - # Pass arguments to `get_company` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the company to be retrieved. - # - # The format is - # "projects/\\{project_id}/tenants/\\{tenant_id}/companies/\\{company_id}", for - # example, "projects/api-test-project/tenants/foo/companies/bar". - # - # If tenant id is unspecified, the default tenant is used, for - # example, "projects/api-test-project/companies/bar". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::Company] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::Company] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::GetCompanyRequest.new - # - # # Call the get_company method. - # result = client.get_company request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::Company. - # p result - # - def get_company request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::GetCompanyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_company.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_company.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_company.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @company_service_stub.get_company request, 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 specified company. - # - # @overload update_company(request, options = nil) - # Pass arguments to `update_company` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_company(company: nil, update_mask: nil) - # Pass arguments to `update_company` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param company [::Google::Cloud::Talent::V4beta1::Company, ::Hash] - # Required. The company resource to replace the current resource in the - # system. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Strongly recommended for the best service experience. - # - # If - # {::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest#update_mask update_mask} - # is provided, only the specified fields in - # {::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest#company company} are - # updated. Otherwise all the fields are updated. - # - # A field mask to specify the company fields to be updated. Only - # top level fields of {::Google::Cloud::Talent::V4beta1::Company Company} are - # supported. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::Company] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::Company] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::UpdateCompanyRequest.new - # - # # Call the update_company method. - # result = client.update_company request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::Company. - # p result - # - def update_company request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest - - # Converts hash and nil to an 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_company.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_company.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_company.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @company_service_stub.update_company request, 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 specified company. - # Prerequisite: The company has no jobs associated with it. - # - # @overload delete_company(request, options = nil) - # Pass arguments to `delete_company` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_company(name: nil) - # Pass arguments to `delete_company` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the company to be deleted. - # - # The format is - # "projects/\\{project_id}/tenants/\\{tenant_id}/companies/\\{company_id}", for - # example, "projects/foo/tenants/bar/companies/baz". - # - # If tenant id is unspecified, the default tenant is used, for - # example, "projects/foo/companies/bar". - # @yield [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/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::DeleteCompanyRequest.new - # - # # Call the delete_company method. - # result = client.delete_company request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_company request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest - - # Converts hash and nil to an 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_company.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_company.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_company.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @company_service_stub.delete_company request, 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 companies associated with the project. - # - # @overload list_companies(request, options = nil) - # Pass arguments to `list_companies` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::ListCompaniesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::ListCompaniesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_companies(parent: nil, page_token: nil, page_size: nil, require_open_jobs: nil) - # Pass arguments to `list_companies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the tenant under which the company is created. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, - # "projects/foo/tenant/bar". - # - # If tenant id is unspecified, the default tenant will be used, for - # example, "projects/foo". - # @param page_token [::String] - # The starting indicator from which to return results. - # @param page_size [::Integer] - # The maximum number of companies to be returned, at most 100. - # Default is 100 if a non-positive number is provided. - # @param require_open_jobs [::Boolean] - # Set to true if the companies requested must have open jobs. - # - # Defaults to false. - # - # If true, at most - # {::Google::Cloud::Talent::V4beta1::ListCompaniesRequest#page_size page_size} of - # companies are fetched, among which only those with open jobs are returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Company>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Company>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::ListCompaniesRequest.new - # - # # Call the list_companies method. - # result = client.list_companies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Talent::V4beta1::Company. - # p item - # end - # - def list_companies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::ListCompaniesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_companies.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_companies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_companies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @company_service_stub.list_companies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @company_service_stub, :list_companies, "companies", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CompanyService REST API. - # - # This class represents the configuration for CompanyService 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::Talent::V4beta1::CompanyService::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_company to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_company.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_company.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 = "jobs.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 CompanyService 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_company` - # @return [::Gapic::Config::Method] - # - attr_reader :create_company - ## - # RPC-specific configuration for `get_company` - # @return [::Gapic::Config::Method] - # - attr_reader :get_company - ## - # RPC-specific configuration for `update_company` - # @return [::Gapic::Config::Method] - # - attr_reader :update_company - ## - # RPC-specific configuration for `delete_company` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_company - ## - # RPC-specific configuration for `list_companies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_companies - - # @private - def initialize parent_rpcs = nil - create_company_config = parent_rpcs.create_company if parent_rpcs.respond_to? :create_company - @create_company = ::Gapic::Config::Method.new create_company_config - get_company_config = parent_rpcs.get_company if parent_rpcs.respond_to? :get_company - @get_company = ::Gapic::Config::Method.new get_company_config - update_company_config = parent_rpcs.update_company if parent_rpcs.respond_to? :update_company - @update_company = ::Gapic::Config::Method.new update_company_config - delete_company_config = parent_rpcs.delete_company if parent_rpcs.respond_to? :delete_company - @delete_company = ::Gapic::Config::Method.new delete_company_config - list_companies_config = parent_rpcs.list_companies if parent_rpcs.respond_to? :list_companies - @list_companies = ::Gapic::Config::Method.new list_companies_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/rest/service_stub.rb deleted file mode 100644 index 34eb591b219f..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service/rest/service_stub.rb +++ /dev/null @@ -1,425 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/talent/v4beta1/company_service_pb" - -module Google - module Cloud - module Talent - module V4beta1 - module CompanyService - module Rest - ## - # REST service stub for the CompanyService 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_company REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::CreateCompanyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::Company] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::Company] - # A result object deserialized from the server's reply - def create_company request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_company_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_company", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Talent::V4beta1::Company.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_company REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::GetCompanyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::Company] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::Company] - # A result object deserialized from the server's reply - def get_company request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_company_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_company", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Talent::V4beta1::Company.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_company REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::Company] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::Company] - # A result object deserialized from the server's reply - def update_company request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_company_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_company", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Talent::V4beta1::Company.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_company REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_company request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_company_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_company", - 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 list_companies REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::ListCompaniesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::ListCompaniesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::ListCompaniesResponse] - # A result object deserialized from the server's reply - def list_companies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_companies_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_companies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Talent::V4beta1::ListCompaniesResponse.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_company REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::CreateCompanyRequest] - # 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_company_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v4beta1/{parent}/companies", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v4beta1/{parent}/companies", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_company REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::GetCompanyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_company_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v4beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/tenants/[^/]+/companies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v4beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/companies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_company REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest] - # 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_company_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v4beta1/{company.name}", - body: "*", - matches: [ - ["company.name", %r{^projects/[^/]+/tenants/[^/]+/companies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v4beta1/{company.name}", - body: "*", - matches: [ - ["company.name", %r{^projects/[^/]+/companies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_company REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest] - # 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_company_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v4beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/tenants/[^/]+/companies/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v4beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/companies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_companies REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::ListCompaniesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_companies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v4beta1/{parent}/companies", - matches: [ - ["parent", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v4beta1/{parent}/companies", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service_pb.rb deleted file mode 100644 index 155b3127c68a..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/talent/v4beta1/company_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/talent/v4beta1/common_pb' -require 'google/cloud/talent/v4beta1/company_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n1google/cloud/talent/v4beta1/company_service.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/talent/v4beta1/common.proto\x1a)google/cloud/talent/v4beta1/company.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x87\x01\n\x14\x43reateCompanyRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1bjobs.googleapis.com/Company\x12:\n\x07\x63ompany\x18\x02 \x01(\x0b\x32$.google.cloud.talent.v4beta1.CompanyB\x03\xe0\x41\x02\"F\n\x11GetCompanyRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bjobs.googleapis.com/Company\"\x83\x01\n\x14UpdateCompanyRequest\x12:\n\x07\x63ompany\x18\x01 \x01(\x0b\x32$.google.cloud.talent.v4beta1.CompanyB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"I\n\x14\x44\x65leteCompanyRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bjobs.googleapis.com/Company\"\x8d\x01\n\x14ListCompaniesRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1bjobs.googleapis.com/Company\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x19\n\x11require_open_jobs\x18\x04 \x01(\x08\"\xaa\x01\n\x15ListCompaniesResponse\x12\x37\n\tcompanies\x18\x01 \x03(\x0b\x32$.google.cloud.talent.v4beta1.Company\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12?\n\x08metadata\x18\x03 \x01(\x0b\x32-.google.cloud.talent.v4beta1.ResponseMetadata2\xd2\t\n\x0e\x43ompanyService\x12\xe3\x01\n\rCreateCompany\x12\x31.google.cloud.talent.v4beta1.CreateCompanyRequest\x1a$.google.cloud.talent.v4beta1.Company\"y\xda\x41\x0eparent,company\x82\xd3\xe4\x93\x02\x62\"0/v4beta1/{parent=projects/*/tenants/*}/companies:\x01*Z+\"&/v4beta1/{parent=projects/*}/companies:\x01*\x12\xcd\x01\n\nGetCompany\x12..google.cloud.talent.v4beta1.GetCompanyRequest\x1a$.google.cloud.talent.v4beta1.Company\"i\xda\x41\x04name\x82\xd3\xe4\x93\x02\\\x12\x30/v4beta1/{name=projects/*/tenants/*/companies/*}Z(\x12&/v4beta1/{name=projects/*/companies/*}\x12\xed\x01\n\rUpdateCompany\x12\x31.google.cloud.talent.v4beta1.UpdateCompanyRequest\x1a$.google.cloud.talent.v4beta1.Company\"\x82\x01\xda\x41\x07\x63ompany\x82\xd3\xe4\x93\x02r28/v4beta1/{company.name=projects/*/tenants/*/companies/*}:\x01*Z32./v4beta1/{company.name=projects/*/companies/*}:\x01*\x12\xc5\x01\n\rDeleteCompany\x12\x31.google.cloud.talent.v4beta1.DeleteCompanyRequest\x1a\x16.google.protobuf.Empty\"i\xda\x41\x04name\x82\xd3\xe4\x93\x02\\*0/v4beta1/{name=projects/*/tenants/*/companies/*}Z(*&/v4beta1/{name=projects/*/companies/*}\x12\xe3\x01\n\rListCompanies\x12\x31.google.cloud.talent.v4beta1.ListCompaniesRequest\x1a\x32.google.cloud.talent.v4beta1.ListCompaniesResponse\"k\xda\x41\x06parent\x82\xd3\xe4\x93\x02\\\x12\x30/v4beta1/{parent=projects/*/tenants/*}/companiesZ(\x12&/v4beta1/{parent=projects/*}/companies\x1al\xca\x41\x13jobs.googleapis.com\xd2\x41Shttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobsBw\n\x1f\x63om.google.cloud.talent.v4beta1B\x13\x43ompanyServiceProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Talent - module V4beta1 - CreateCompanyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CreateCompanyRequest").msgclass - GetCompanyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.GetCompanyRequest").msgclass - UpdateCompanyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.UpdateCompanyRequest").msgclass - DeleteCompanyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.DeleteCompanyRequest").msgclass - ListCompaniesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.ListCompaniesRequest").msgclass - ListCompaniesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.ListCompaniesResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service_services_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service_services_pb.rb deleted file mode 100644 index 1ca2bca7f790..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/company_service_services_pb.rb +++ /dev/null @@ -1,54 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/talent/v4beta1/company_service.proto for package 'google.cloud.talent.v4beta1' -# 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/talent/v4beta1/company_service_pb' - -module Google - module Cloud - module Talent - module V4beta1 - module CompanyService - # A service that handles company management, including CRUD and enumeration. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.talent.v4beta1.CompanyService' - - # Creates a new company entity. - rpc :CreateCompany, ::Google::Cloud::Talent::V4beta1::CreateCompanyRequest, ::Google::Cloud::Talent::V4beta1::Company - # Retrieves specified company. - rpc :GetCompany, ::Google::Cloud::Talent::V4beta1::GetCompanyRequest, ::Google::Cloud::Talent::V4beta1::Company - # Updates specified company. - rpc :UpdateCompany, ::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest, ::Google::Cloud::Talent::V4beta1::Company - # Deletes specified company. - # Prerequisite: The company has no jobs associated with it. - rpc :DeleteCompany, ::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest, ::Google::Protobuf::Empty - # Lists all companies associated with the project. - rpc :ListCompanies, ::Google::Cloud::Talent::V4beta1::ListCompaniesRequest, ::Google::Cloud::Talent::V4beta1::ListCompaniesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion.rb deleted file mode 100644 index 962a8cd878ed..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion.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/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/talent/v4beta1/version" - -require "google/cloud/talent/v4beta1/completion/credentials" -require "google/cloud/talent/v4beta1/completion/paths" -require "google/cloud/talent/v4beta1/completion/client" -require "google/cloud/talent/v4beta1/completion/rest" - -module Google - module Cloud - module Talent - module V4beta1 - ## - # A service handles auto completion. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/talent/v4beta1/completion" - # client = ::Google::Cloud::Talent::V4beta1::Completion::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/talent/v4beta1/completion/rest" - # client = ::Google::Cloud::Talent::V4beta1::Completion::Rest::Client.new - # - module Completion - end - end - end - end -end - -helper_path = ::File.join __dir__, "completion", "helpers.rb" -require "google/cloud/talent/v4beta1/completion/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/client.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/client.rb deleted file mode 100644 index 8823298d5537..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/client.rb +++ /dev/null @@ -1,516 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/talent/v4beta1/completion_service_pb" - -module Google - module Cloud - module Talent - module V4beta1 - module Completion - ## - # Client for the Completion service. - # - # A service handles auto completion. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :completion_stub - - ## - # Configure the Completion Client class. - # - # See {::Google::Cloud::Talent::V4beta1::Completion::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Completion clients - # ::Google::Cloud::Talent::V4beta1::Completion::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", "Talent", "V4beta1"] - 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.complete_query.timeout = 30.0 - default_config.rpcs.complete_query.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Completion 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::Talent::V4beta1::Completion::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 - @completion_stub.universe_domain - end - - ## - # Create a new Completion client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Talent::V4beta1::Completion::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Talent::V4beta1::Completion::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Completion 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/talent/v4beta1/completion_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 - - @completion_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Talent::V4beta1::Completion::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 - ) - - @completion_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 - @completion_stub.logger - end - - # Service calls - - ## - # Completes the specified prefix with keyword suggestions. - # Intended for use by a job search auto-complete search box. - # - # @overload complete_query(request, options = nil) - # Pass arguments to `complete_query` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::CompleteQueryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload complete_query(parent: nil, query: nil, language_codes: nil, page_size: nil, company: nil, scope: nil, type: nil) - # Pass arguments to `complete_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. Resource name of tenant the completion is performed within. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, - # "projects/foo/tenant/bar". - # - # If tenant id is unspecified, the default tenant is used, for - # example, "projects/foo". - # @param query [::String] - # Required. The query used to generate suggestions. - # - # The maximum number of allowed characters is 255. - # @param language_codes [::Array<::String>] - # The list of languages of the query. This is - # the BCP-47 language code, such as "en-US" or "sr-Latn". - # For more information, see - # [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). - # - # The maximum number of allowed characters is 255. - # @param page_size [::Integer] - # Required. Completion result count. - # - # The maximum allowed page size is 10. - # @param company [::String] - # If provided, restricts completion to specified company. - # - # The format is - # "projects/\\{project_id}/tenants/\\{tenant_id}/companies/\\{company_id}", for - # example, "projects/foo/tenants/bar/companies/baz". - # - # If tenant id is unspecified, the default tenant is used, for - # example, "projects/foo". - # @param scope [::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionScope] - # The scope of the completion. The defaults is - # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionScope::PUBLIC CompletionScope.PUBLIC}. - # @param type [::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType] - # The completion topic. The default is - # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType::COMBINED CompletionType.COMBINED}. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Talent::V4beta1::CompleteQueryResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Talent::V4beta1::CompleteQueryResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::Completion::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::CompleteQueryRequest.new - # - # # Call the complete_query method. - # result = client.complete_query request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::CompleteQueryResponse. - # p result - # - def complete_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::CompleteQueryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.complete_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::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.complete_query.timeout, - metadata: metadata, - retry_policy: @config.rpcs.complete_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @completion_stub.call_rpc :complete_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 - - ## - # Configuration class for the Completion API. - # - # This class represents the configuration for Completion, - # 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::Talent::V4beta1::Completion::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 - # # complete_query to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Talent::V4beta1::Completion::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.complete_query.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Talent::V4beta1::Completion::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.complete_query.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::Talent::V4beta1::Completion::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 = "jobs.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 Completion 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 `complete_query` - # @return [::Gapic::Config::Method] - # - attr_reader :complete_query - - # @private - def initialize parent_rpcs = nil - complete_query_config = parent_rpcs.complete_query if parent_rpcs.respond_to? :complete_query - @complete_query = ::Gapic::Config::Method.new complete_query_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/credentials.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/credentials.rb deleted file mode 100644 index 1ad8d592642a..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/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 Talent - module V4beta1 - module Completion - # Credentials for the Completion API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/jobs" - ] - self.env_vars = [ - "TALENT_CREDENTIALS", - "TALENT_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "TALENT_CREDENTIALS_JSON", - "TALENT_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-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/paths.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/paths.rb deleted file mode 100644 index 119c1f449fff..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/paths.rb +++ /dev/null @@ -1,105 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Talent - module V4beta1 - module Completion - # Path helper methods for the Completion API. - module Paths - ## - # Create a fully-qualified Company resource string. - # - # @overload company_path(project:, tenant:, company:) - # The resource will be in the following format: - # - # `projects/{project}/tenants/{tenant}/companies/{company}` - # - # @param project [String] - # @param tenant [String] - # @param company [String] - # - # @overload company_path(project:, company:) - # The resource will be in the following format: - # - # `projects/{project}/companies/{company}` - # - # @param project [String] - # @param company [String] - # - # @return [::String] - def company_path **args - resources = { - "company:project:tenant" => (proc do |project:, tenant:, company:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "tenant cannot contain /" if tenant.to_s.include? "/" - - "projects/#{project}/tenants/#{tenant}/companies/#{company}" - end), - "company:project" => (proc do |project:, company:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/companies/#{company}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - 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 Tenant resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/tenants/{tenant}` - # - # @param project [String] - # @param tenant [String] - # - # @return [::String] - def tenant_path project:, tenant: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/tenants/#{tenant}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/rest.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/rest.rb deleted file mode 100644 index d14c1d1d8a77..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/rest.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 "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/talent/v4beta1/version" - -require "google/cloud/talent/v4beta1/completion/credentials" -require "google/cloud/talent/v4beta1/completion/paths" -require "google/cloud/talent/v4beta1/completion/rest/client" - -module Google - module Cloud - module Talent - module V4beta1 - ## - # A service handles auto completion. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/talent/v4beta1/completion/rest" - # client = ::Google::Cloud::Talent::V4beta1::Completion::Rest::Client.new - # - module Completion - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/talent/v4beta1/completion/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/rest/client.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/rest/client.rb deleted file mode 100644 index 88bd8c435600..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/rest/client.rb +++ /dev/null @@ -1,466 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/talent/v4beta1/completion_service_pb" -require "google/cloud/talent/v4beta1/completion/rest/service_stub" - -module Google - module Cloud - module Talent - module V4beta1 - module Completion - module Rest - ## - # REST client for the Completion service. - # - # A service handles auto completion. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :completion_stub - - ## - # Configure the Completion Client class. - # - # See {::Google::Cloud::Talent::V4beta1::Completion::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Completion clients - # ::Google::Cloud::Talent::V4beta1::Completion::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", "Talent", "V4beta1"] - 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.complete_query.timeout = 30.0 - default_config.rpcs.complete_query.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Completion 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::Talent::V4beta1::Completion::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 - @completion_stub.universe_domain - end - - ## - # Create a new Completion REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Talent::V4beta1::Completion::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Talent::V4beta1::Completion::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Completion 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 - - @completion_stub = ::Google::Cloud::Talent::V4beta1::Completion::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @completion_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 - @completion_stub.logger - end - - # Service calls - - ## - # Completes the specified prefix with keyword suggestions. - # Intended for use by a job search auto-complete search box. - # - # @overload complete_query(request, options = nil) - # Pass arguments to `complete_query` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::CompleteQueryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload complete_query(parent: nil, query: nil, language_codes: nil, page_size: nil, company: nil, scope: nil, type: nil) - # Pass arguments to `complete_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. Resource name of tenant the completion is performed within. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, - # "projects/foo/tenant/bar". - # - # If tenant id is unspecified, the default tenant is used, for - # example, "projects/foo". - # @param query [::String] - # Required. The query used to generate suggestions. - # - # The maximum number of allowed characters is 255. - # @param language_codes [::Array<::String>] - # The list of languages of the query. This is - # the BCP-47 language code, such as "en-US" or "sr-Latn". - # For more information, see - # [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). - # - # The maximum number of allowed characters is 255. - # @param page_size [::Integer] - # Required. Completion result count. - # - # The maximum allowed page size is 10. - # @param company [::String] - # If provided, restricts completion to specified company. - # - # The format is - # "projects/\\{project_id}/tenants/\\{tenant_id}/companies/\\{company_id}", for - # example, "projects/foo/tenants/bar/companies/baz". - # - # If tenant id is unspecified, the default tenant is used, for - # example, "projects/foo". - # @param scope [::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionScope] - # The scope of the completion. The defaults is - # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionScope::PUBLIC CompletionScope.PUBLIC}. - # @param type [::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType] - # The completion topic. The default is - # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType::COMBINED CompletionType.COMBINED}. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::CompleteQueryResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::CompleteQueryResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::Completion::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::CompleteQueryRequest.new - # - # # Call the complete_query method. - # result = client.complete_query request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::CompleteQueryResponse. - # p result - # - def complete_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::CompleteQueryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.complete_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::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.complete_query.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.complete_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @completion_stub.complete_query request, 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 Completion REST API. - # - # This class represents the configuration for Completion 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::Talent::V4beta1::Completion::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 - # # complete_query to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Talent::V4beta1::Completion::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.complete_query.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Talent::V4beta1::Completion::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.complete_query.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 = "jobs.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 Completion 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 `complete_query` - # @return [::Gapic::Config::Method] - # - attr_reader :complete_query - - # @private - def initialize parent_rpcs = nil - complete_query_config = parent_rpcs.complete_query if parent_rpcs.respond_to? :complete_query - @complete_query = ::Gapic::Config::Method.new complete_query_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/rest/service_stub.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/rest/service_stub.rb deleted file mode 100644 index c6c52bc71a69..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion/rest/service_stub.rb +++ /dev/null @@ -1,149 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/talent/v4beta1/completion_service_pb" - -module Google - module Cloud - module Talent - module V4beta1 - module Completion - module Rest - ## - # REST service stub for the Completion 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 complete_query REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::CompleteQueryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::CompleteQueryResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::CompleteQueryResponse] - # A result object deserialized from the server's reply - def complete_query request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_complete_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: "complete_query", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Talent::V4beta1::CompleteQueryResponse.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 complete_query REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::CompleteQueryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_complete_query_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v4beta1/{parent}:complete", - matches: [ - ["parent", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v4beta1/{parent}:complete", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion_service_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion_service_pb.rb deleted file mode 100644 index 1c9866a22bbd..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion_service_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/talent/v4beta1/completion_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/talent/v4beta1/common_pb' - - -descriptor_data = "\n4google/cloud/talent/v4beta1/completion_service.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/talent/v4beta1/common.proto\"\x93\x04\n\x14\x43ompleteQueryRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1bjobs.googleapis.com/Company\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x0elanguage_codes\x18\x03 \x03(\t\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x31\n\x07\x63ompany\x18\x05 \x01(\tB \xfa\x41\x1d\n\x1bjobs.googleapis.com/Company\x12P\n\x05scope\x18\x06 \x01(\x0e\x32\x41.google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionScope\x12N\n\x04type\x18\x07 \x01(\x0e\x32@.google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType\"K\n\x0f\x43ompletionScope\x12 \n\x1c\x43OMPLETION_SCOPE_UNSPECIFIED\x10\x00\x12\n\n\x06TENANT\x10\x01\x12\n\n\x06PUBLIC\x10\x02\"`\n\x0e\x43ompletionType\x12\x1f\n\x1b\x43OMPLETION_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tJOB_TITLE\x10\x01\x12\x10\n\x0c\x43OMPANY_NAME\x10\x02\x12\x0c\n\x08\x43OMBINED\x10\x03\"\xc5\x02\n\x15\x43ompleteQueryResponse\x12_\n\x12\x63ompletion_results\x18\x01 \x03(\x0b\x32\x43.google.cloud.talent.v4beta1.CompleteQueryResponse.CompletionResult\x12?\n\x08metadata\x18\x02 \x01(\x0b\x32-.google.cloud.talent.v4beta1.ResponseMetadata\x1a\x89\x01\n\x10\x43ompletionResult\x12\x12\n\nsuggestion\x18\x01 \x01(\t\x12N\n\x04type\x18\x02 \x01(\x0e\x32@.google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType\x12\x11\n\timage_uri\x18\x03 \x01(\t2\xd5\x02\n\nCompletion\x12\xd8\x01\n\rCompleteQuery\x12\x31.google.cloud.talent.v4beta1.CompleteQueryRequest\x1a\x32.google.cloud.talent.v4beta1.CompleteQueryResponse\"`\x82\xd3\xe4\x93\x02Z\x12//v4beta1/{parent=projects/*/tenants/*}:completeZ\'\x12%/v4beta1/{parent=projects/*}:complete\x1al\xca\x41\x13jobs.googleapis.com\xd2\x41Shttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobsBz\n\x1f\x63om.google.cloud.talent.v4beta1B\x16\x43ompletionServiceProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Talent - module V4beta1 - CompleteQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompleteQueryRequest").msgclass - CompleteQueryRequest::CompletionScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionScope").enummodule - CompleteQueryRequest::CompletionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType").enummodule - CompleteQueryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompleteQueryResponse").msgclass - CompleteQueryResponse::CompletionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompleteQueryResponse.CompletionResult").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion_service_services_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion_service_services_pb.rb deleted file mode 100644 index cb146eb364f4..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/completion_service_services_pb.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/talent/v4beta1/completion_service.proto for package 'google.cloud.talent.v4beta1' -# 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/talent/v4beta1/completion_service_pb' - -module Google - module Cloud - module Talent - module V4beta1 - module Completion - # A service handles auto completion. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.talent.v4beta1.Completion' - - # Completes the specified prefix with keyword suggestions. - # Intended for use by a job search auto-complete search box. - rpc :CompleteQuery, ::Google::Cloud::Talent::V4beta1::CompleteQueryRequest, ::Google::Cloud::Talent::V4beta1::CompleteQueryResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_pb.rb deleted file mode 100644 index 55262042826c..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/talent/v4beta1/event.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n\'google/cloud/talent/v4beta1/event.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x01\n\x0b\x43lientEvent\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\x15\n\x08\x65vent_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12:\n\tjob_event\x18\x05 \x01(\x0b\x32%.google.cloud.talent.v4beta1.JobEventH\x00\x12\x13\n\x0b\x65vent_notes\x18\t \x01(\tB\x07\n\x05\x65vent\"\xf6\x03\n\x08JobEvent\x12\x45\n\x04type\x18\x01 \x01(\x0e\x32\x32.google.cloud.talent.v4beta1.JobEvent.JobEventTypeB\x03\xe0\x41\x02\x12\x11\n\x04jobs\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12\x0f\n\x07profile\x18\x03 \x01(\t\"\xfe\x02\n\x0cJobEventType\x12\x1e\n\x1aJOB_EVENT_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nIMPRESSION\x10\x01\x12\x08\n\x04VIEW\x10\x02\x12\x11\n\rVIEW_REDIRECT\x10\x03\x12\x15\n\x11\x41PPLICATION_START\x10\x04\x12\x16\n\x12\x41PPLICATION_FINISH\x10\x05\x12 \n\x1c\x41PPLICATION_QUICK_SUBMISSION\x10\x06\x12\x18\n\x14\x41PPLICATION_REDIRECT\x10\x07\x12!\n\x1d\x41PPLICATION_START_FROM_SEARCH\x10\x08\x12$\n APPLICATION_REDIRECT_FROM_SEARCH\x10\t\x12\x1e\n\x1a\x41PPLICATION_COMPANY_SUBMIT\x10\n\x12\x0c\n\x08\x42OOKMARK\x10\x0b\x12\x10\n\x0cNOTIFICATION\x10\x0c\x12\t\n\x05HIRED\x10\r\x12\x0b\n\x07SENT_CV\x10\x0e\x12\x15\n\x11INTERVIEW_GRANTED\x10\x0f\x42n\n\x1f\x63om.google.cloud.talent.v4beta1B\nEventProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Talent - module V4beta1 - ClientEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.ClientEvent").msgclass - JobEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.JobEvent").msgclass - JobEvent::JobEventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.JobEvent.JobEventType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service.rb deleted file mode 100644 index b3704c176961..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service.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/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/talent/v4beta1/version" - -require "google/cloud/talent/v4beta1/event_service/credentials" -require "google/cloud/talent/v4beta1/event_service/paths" -require "google/cloud/talent/v4beta1/event_service/client" -require "google/cloud/talent/v4beta1/event_service/rest" - -module Google - module Cloud - module Talent - module V4beta1 - ## - # A service handles client event report. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/talent/v4beta1/event_service" - # client = ::Google::Cloud::Talent::V4beta1::EventService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/talent/v4beta1/event_service/rest" - # client = ::Google::Cloud::Talent::V4beta1::EventService::Rest::Client.new - # - module EventService - end - end - end - end -end - -helper_path = ::File.join __dir__, "event_service", "helpers.rb" -require "google/cloud/talent/v4beta1/event_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/client.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/client.rb deleted file mode 100644 index d94cdcbc9010..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/client.rb +++ /dev/null @@ -1,489 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/talent/v4beta1/event_service_pb" - -module Google - module Cloud - module Talent - module V4beta1 - module EventService - ## - # Client for the EventService service. - # - # A service handles client event report. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :event_service_stub - - ## - # Configure the EventService Client class. - # - # See {::Google::Cloud::Talent::V4beta1::EventService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all EventService clients - # ::Google::Cloud::Talent::V4beta1::EventService::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", "Talent", "V4beta1"] - 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_client_event.timeout = 30.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the EventService 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::Talent::V4beta1::EventService::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 - @event_service_stub.universe_domain - end - - ## - # Create a new EventService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Talent::V4beta1::EventService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Talent::V4beta1::EventService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the EventService 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/talent/v4beta1/event_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 - - @event_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Talent::V4beta1::EventService::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 - ) - - @event_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 - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @event_service_stub.logger - end - - # Service calls - - ## - # Report events issued when end user interacts with customer's application - # that uses Cloud Talent Solution. You may inspect the created events in - # [self service - # tools](https://console.cloud.google.com/talent-solution/overview). - # [Learn - # more](https://cloud.google.com/talent-solution/docs/management-tools) - # about self service tools. - # - # @overload create_client_event(request, options = nil) - # Pass arguments to `create_client_event` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::CreateClientEventRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::CreateClientEventRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_client_event(parent: nil, client_event: nil) - # Pass arguments to `create_client_event` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the tenant under which the event is created. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, - # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant - # is created, for example, "projects/foo". - # @param client_event [::Google::Cloud::Talent::V4beta1::ClientEvent, ::Hash] - # Required. Events issued when end user interacts with customer's application - # that uses Cloud Talent Solution. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Talent::V4beta1::ClientEvent] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Talent::V4beta1::ClientEvent] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::EventService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::CreateClientEventRequest.new - # - # # Call the create_client_event method. - # result = client.create_client_event request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::ClientEvent. - # p result - # - def create_client_event request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::CreateClientEventRequest - - # Converts hash and nil to 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_client_event.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_client_event.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_client_event.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @event_service_stub.call_rpc :create_client_event, request, 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 EventService API. - # - # This class represents the configuration for EventService, - # 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::Talent::V4beta1::EventService::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_client_event to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Talent::V4beta1::EventService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_client_event.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Talent::V4beta1::EventService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_client_event.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::Talent::V4beta1::EventService::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 = "jobs.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 EventService 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_client_event` - # @return [::Gapic::Config::Method] - # - attr_reader :create_client_event - - # @private - def initialize parent_rpcs = nil - create_client_event_config = parent_rpcs.create_client_event if parent_rpcs.respond_to? :create_client_event - @create_client_event = ::Gapic::Config::Method.new create_client_event_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/credentials.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/credentials.rb deleted file mode 100644 index 052cdab2a579..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/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 Talent - module V4beta1 - module EventService - # Credentials for the EventService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/jobs" - ] - self.env_vars = [ - "TALENT_CREDENTIALS", - "TALENT_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "TALENT_CREDENTIALS_JSON", - "TALENT_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-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/paths.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/paths.rb deleted file mode 100644 index a4194eda5367..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/paths.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 Talent - module V4beta1 - module EventService - # Path helper methods for the EventService API. - module Paths - ## - # 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 Tenant resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/tenants/{tenant}` - # - # @param project [String] - # @param tenant [String] - # - # @return [::String] - def tenant_path project:, tenant: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/tenants/#{tenant}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/rest.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/rest.rb deleted file mode 100644 index 5239cc30ff54..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/rest.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 "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/talent/v4beta1/version" - -require "google/cloud/talent/v4beta1/event_service/credentials" -require "google/cloud/talent/v4beta1/event_service/paths" -require "google/cloud/talent/v4beta1/event_service/rest/client" - -module Google - module Cloud - module Talent - module V4beta1 - ## - # A service handles client event report. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/talent/v4beta1/event_service/rest" - # client = ::Google::Cloud::Talent::V4beta1::EventService::Rest::Client.new - # - module EventService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/talent/v4beta1/event_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/rest/client.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/rest/client.rb deleted file mode 100644 index ceb888dfea87..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/rest/client.rb +++ /dev/null @@ -1,439 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/talent/v4beta1/event_service_pb" -require "google/cloud/talent/v4beta1/event_service/rest/service_stub" - -module Google - module Cloud - module Talent - module V4beta1 - module EventService - module Rest - ## - # REST client for the EventService service. - # - # A service handles client event report. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :event_service_stub - - ## - # Configure the EventService Client class. - # - # See {::Google::Cloud::Talent::V4beta1::EventService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all EventService clients - # ::Google::Cloud::Talent::V4beta1::EventService::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", "Talent", "V4beta1"] - 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_client_event.timeout = 30.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the EventService 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::Talent::V4beta1::EventService::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 - @event_service_stub.universe_domain - end - - ## - # Create a new EventService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Talent::V4beta1::EventService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Talent::V4beta1::EventService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the EventService 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 - - @event_service_stub = ::Google::Cloud::Talent::V4beta1::EventService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @event_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 - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @event_service_stub.logger - end - - # Service calls - - ## - # Report events issued when end user interacts with customer's application - # that uses Cloud Talent Solution. You may inspect the created events in - # [self service - # tools](https://console.cloud.google.com/talent-solution/overview). - # [Learn - # more](https://cloud.google.com/talent-solution/docs/management-tools) - # about self service tools. - # - # @overload create_client_event(request, options = nil) - # Pass arguments to `create_client_event` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::CreateClientEventRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::CreateClientEventRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_client_event(parent: nil, client_event: nil) - # Pass arguments to `create_client_event` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the tenant under which the event is created. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, - # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant - # is created, for example, "projects/foo". - # @param client_event [::Google::Cloud::Talent::V4beta1::ClientEvent, ::Hash] - # Required. Events issued when end user interacts with customer's application - # that uses Cloud Talent Solution. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::ClientEvent] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::ClientEvent] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::EventService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::CreateClientEventRequest.new - # - # # Call the create_client_event method. - # result = client.create_client_event request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::ClientEvent. - # p result - # - def create_client_event request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::CreateClientEventRequest - - # Converts hash and nil to an 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_client_event.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_client_event.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_client_event.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @event_service_stub.create_client_event request, 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 EventService REST API. - # - # This class represents the configuration for EventService 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::Talent::V4beta1::EventService::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_client_event to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Talent::V4beta1::EventService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_client_event.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Talent::V4beta1::EventService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_client_event.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 = "jobs.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 EventService 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_client_event` - # @return [::Gapic::Config::Method] - # - attr_reader :create_client_event - - # @private - def initialize parent_rpcs = nil - create_client_event_config = parent_rpcs.create_client_event if parent_rpcs.respond_to? :create_client_event - @create_client_event = ::Gapic::Config::Method.new create_client_event_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/rest/service_stub.rb deleted file mode 100644 index 0cc940fc633c..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service/rest/service_stub.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 "google/cloud/talent/v4beta1/event_service_pb" - -module Google - module Cloud - module Talent - module V4beta1 - module EventService - module Rest - ## - # REST service stub for the EventService 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_client_event REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::CreateClientEventRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::ClientEvent] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::ClientEvent] - # A result object deserialized from the server's reply - def create_client_event request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_client_event_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_client_event", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Talent::V4beta1::ClientEvent.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_client_event REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::CreateClientEventRequest] - # 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_client_event_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v4beta1/{parent}/clientEvents", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v4beta1/{parent}/clientEvents", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service_pb.rb deleted file mode 100644 index 0ff69657c530..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/talent/v4beta1/event_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/talent/v4beta1/event_pb' - - -descriptor_data = "\n/google/cloud/talent/v4beta1/event_service.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\'google/cloud/talent/v4beta1/event.proto\"\x94\x01\n\x18\x43reateClientEventRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1bjobs.googleapis.com/Company\x12\x43\n\x0c\x63lient_event\x18\x02 \x01(\x0b\x32(.google.cloud.talent.v4beta1.ClientEventB\x03\xe0\x41\x02\x32\xfa\x02\n\x0c\x45ventService\x12\xfb\x01\n\x11\x43reateClientEvent\x12\x35.google.cloud.talent.v4beta1.CreateClientEventRequest\x1a(.google.cloud.talent.v4beta1.ClientEvent\"\x84\x01\xda\x41\x13parent,client_event\x82\xd3\xe4\x93\x02h\"3/v4beta1/{parent=projects/*/tenants/*}/clientEvents:\x01*Z.\")/v4beta1/{parent=projects/*}/clientEvents:\x01*\x1al\xca\x41\x13jobs.googleapis.com\xd2\x41Shttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobsBu\n\x1f\x63om.google.cloud.talent.v4beta1B\x11\x45ventServiceProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Talent - module V4beta1 - CreateClientEventRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CreateClientEventRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service_services_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service_services_pb.rb deleted file mode 100644 index d4e95cc457ad..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/event_service_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/talent/v4beta1/event_service.proto for package 'google.cloud.talent.v4beta1' -# 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/talent/v4beta1/event_service_pb' - -module Google - module Cloud - module Talent - module V4beta1 - module EventService - # A service handles client event report. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.talent.v4beta1.EventService' - - # Report events issued when end user interacts with customer's application - # that uses Cloud Talent Solution. You may inspect the created events in - # [self service - # tools](https://console.cloud.google.com/talent-solution/overview). - # [Learn - # more](https://cloud.google.com/talent-solution/docs/management-tools) - # about self service tools. - rpc :CreateClientEvent, ::Google::Cloud::Talent::V4beta1::CreateClientEventRequest, ::Google::Cloud::Talent::V4beta1::ClientEvent - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/filters_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/filters_pb.rb deleted file mode 100644 index d3a12e891611..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/filters_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/talent/v4beta1/filters.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/cloud/talent/v4beta1/common_pb' -require 'google/protobuf/duration_pb' -require 'google/type/latlng_pb' -require 'google/type/timeofday_pb' - - -descriptor_data = "\n)google/cloud/talent/v4beta1/filters.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a(google/cloud/talent/v4beta1/common.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x18google/type/latlng.proto\x1a\x1bgoogle/type/timeofday.proto\"\x80\x05\n\x08JobQuery\x12\r\n\x05query\x18\x01 \x01(\t\x12\x1b\n\x13query_language_code\x18\x0e \x01(\t\x12\x11\n\tcompanies\x18\x02 \x03(\t\x12\x45\n\x10location_filters\x18\x03 \x03(\x0b\x32+.google.cloud.talent.v4beta1.LocationFilter\x12@\n\x0ejob_categories\x18\x04 \x03(\x0e\x32(.google.cloud.talent.v4beta1.JobCategory\x12\x42\n\x0e\x63ommute_filter\x18\x05 \x01(\x0b\x32*.google.cloud.talent.v4beta1.CommuteFilter\x12\x1d\n\x15\x63ompany_display_names\x18\x06 \x03(\t\x12L\n\x13\x63ompensation_filter\x18\x07 \x01(\x0b\x32/.google.cloud.talent.v4beta1.CompensationFilter\x12\x1f\n\x17\x63ustom_attribute_filter\x18\x08 \x01(\t\x12\x1b\n\x13\x64isable_spell_check\x18\t \x01(\x08\x12\x45\n\x10\x65mployment_types\x18\n \x03(\x0e\x32+.google.cloud.talent.v4beta1.EmploymentType\x12\x16\n\x0elanguage_codes\x18\x0b \x03(\t\x12G\n\x12publish_time_range\x18\x0c \x01(\x0b\x32+.google.cloud.talent.v4beta1.TimestampRange\x12\x15\n\rexcluded_jobs\x18\r \x03(\t\"\x83\x03\n\x0eLocationFilter\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12$\n\x07lat_lng\x18\x03 \x01(\x0b\x32\x13.google.type.LatLng\x12\x19\n\x11\x64istance_in_miles\x18\x04 \x01(\x01\x12\x61\n\x16telecommute_preference\x18\x05 \x01(\x0e\x32\x41.google.cloud.talent.v4beta1.LocationFilter.TelecommutePreference\x12\x0f\n\x07negated\x18\x06 \x01(\x08\"\x95\x01\n\x15TelecommutePreference\x12&\n\"TELECOMMUTE_PREFERENCE_UNSPECIFIED\x10\x00\x12\x1c\n\x14TELECOMMUTE_EXCLUDED\x10\x01\x1a\x02\x08\x01\x12\x17\n\x13TELECOMMUTE_ALLOWED\x10\x02\x12\x1d\n\x19TELECOMMUTE_JOBS_EXCLUDED\x10\x03\"\xca\x03\n\x12\x43ompensationFilter\x12M\n\x04type\x18\x01 \x01(\x0e\x32:.google.cloud.talent.v4beta1.CompensationFilter.FilterTypeB\x03\xe0\x41\x02\x12R\n\x05units\x18\x02 \x03(\x0e\x32>.google.cloud.talent.v4beta1.CompensationInfo.CompensationUnitB\x03\xe0\x41\x02\x12N\n\x05range\x18\x03 \x01(\x0b\x32?.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange\x12\x38\n0include_jobs_with_unspecified_compensation_range\x18\x04 \x01(\x08\"\x86\x01\n\nFilterType\x12\x1b\n\x17\x46ILTER_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tUNIT_ONLY\x10\x01\x12\x13\n\x0fUNIT_AND_AMOUNT\x10\x02\x12\x1a\n\x16\x41NNUALIZED_BASE_AMOUNT\x10\x03\x12\x1b\n\x17\x41NNUALIZED_TOTAL_AMOUNT\x10\x04\"\xcb\x03\n\rCommuteFilter\x12G\n\x0e\x63ommute_method\x18\x01 \x01(\x0e\x32*.google.cloud.talent.v4beta1.CommuteMethodB\x03\xe0\x41\x02\x12\x33\n\x11start_coordinates\x18\x02 \x01(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x02\x12\x37\n\x0ftravel_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12!\n\x19\x61llow_imprecise_addresses\x18\x04 \x01(\x08\x12N\n\x0croad_traffic\x18\x05 \x01(\x0e\x32\x36.google.cloud.talent.v4beta1.CommuteFilter.RoadTrafficH\x00\x12\x30\n\x0e\x64\x65parture_time\x18\x06 \x01(\x0b\x32\x16.google.type.TimeOfDayH\x00\"L\n\x0bRoadTraffic\x12\x1c\n\x18ROAD_TRAFFIC_UNSPECIFIED\x10\x00\x12\x10\n\x0cTRAFFIC_FREE\x10\x01\x12\r\n\tBUSY_HOUR\x10\x02\x42\x10\n\x0etraffic_optionBp\n\x1f\x63om.google.cloud.talent.v4beta1B\x0c\x46iltersProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Talent - module V4beta1 - JobQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.JobQuery").msgclass - LocationFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.LocationFilter").msgclass - LocationFilter::TelecommutePreference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.LocationFilter.TelecommutePreference").enummodule - CompensationFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompensationFilter").msgclass - CompensationFilter::FilterType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompensationFilter.FilterType").enummodule - CommuteFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CommuteFilter").msgclass - CommuteFilter::RoadTraffic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CommuteFilter.RoadTraffic").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/histogram_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/histogram_pb.rb deleted file mode 100644 index 6539f05661bc..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/histogram_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/talent/v4beta1/histogram.proto - -require 'google/protobuf' - - -descriptor_data = "\n+google/cloud/talent/v4beta1/histogram.proto\x12\x1bgoogle.cloud.talent.v4beta1\")\n\x0eHistogramQuery\x12\x17\n\x0fhistogram_query\x18\x01 \x01(\t\"\xb6\x01\n\x14HistogramQueryResult\x12\x17\n\x0fhistogram_query\x18\x01 \x01(\t\x12S\n\thistogram\x18\x02 \x03(\x0b\x32@.google.cloud.talent.v4beta1.HistogramQueryResult.HistogramEntry\x1a\x30\n\x0eHistogramEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\x42r\n\x1f\x63om.google.cloud.talent.v4beta1B\x0eHistogramProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Talent - module V4beta1 - HistogramQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.HistogramQuery").msgclass - HistogramQueryResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.HistogramQueryResult").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_pb.rb deleted file mode 100644 index 4245302f71cf..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/talent/v4beta1/job.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/talent/v4beta1/common_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n%google/cloud/talent/v4beta1/job.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/talent/v4beta1/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe0\x0f\n\x03Job\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x07\x63ompany\x18\x02 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bjobs.googleapis.com/Company\x12\x1b\n\x0erequisition_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05title\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\taddresses\x18\x06 \x03(\t\x12J\n\x10\x61pplication_info\x18\x07 \x01(\x0b\x32\x30.google.cloud.talent.v4beta1.Job.ApplicationInfo\x12=\n\x0cjob_benefits\x18\x08 \x03(\x0e\x32\'.google.cloud.talent.v4beta1.JobBenefit\x12H\n\x11\x63ompensation_info\x18\t \x01(\x0b\x32-.google.cloud.talent.v4beta1.CompensationInfo\x12Q\n\x11\x63ustom_attributes\x18\n \x03(\x0b\x32\x36.google.cloud.talent.v4beta1.Job.CustomAttributesEntry\x12=\n\x0c\x64\x65gree_types\x18\x0b \x03(\x0e\x32\'.google.cloud.talent.v4beta1.DegreeType\x12\x12\n\ndepartment\x18\x0c \x01(\t\x12\x45\n\x10\x65mployment_types\x18\r \x03(\x0e\x32+.google.cloud.talent.v4beta1.EmploymentType\x12\x12\n\nincentives\x18\x0e \x01(\t\x12\x15\n\rlanguage_code\x18\x0f \x01(\t\x12\x38\n\tjob_level\x18\x10 \x01(\x0e\x32%.google.cloud.talent.v4beta1.JobLevel\x12\x17\n\x0fpromotion_value\x18\x11 \x01(\x05\x12\x16\n\x0equalifications\x18\x12 \x01(\t\x12\x18\n\x10responsibilities\x18\x13 \x01(\t\x12\x42\n\x0eposting_region\x18\x14 \x01(\x0e\x32*.google.cloud.talent.v4beta1.PostingRegion\x12?\n\nvisibility\x18\x15 \x01(\x0e\x32\'.google.cloud.talent.v4beta1.VisibilityB\x02\x18\x01\x12\x32\n\x0ejob_start_time\x18\x16 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cjob_end_time\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14posting_publish_time\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x13posting_expire_time\x18\x19 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12<\n\x13posting_create_time\x18\x1a \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x13posting_update_time\x18\x1b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12!\n\x14\x63ompany_display_name\x18\x1c \x01(\tB\x03\xe0\x41\x03\x12G\n\x0c\x64\x65rived_info\x18\x1d \x01(\x0b\x32,.google.cloud.talent.v4beta1.Job.DerivedInfoB\x03\xe0\x41\x03\x12N\n\x12processing_options\x18\x1e \x01(\x0b\x32\x32.google.cloud.talent.v4beta1.Job.ProcessingOptions\x1a\x44\n\x0f\x41pplicationInfo\x12\x0e\n\x06\x65mails\x18\x01 \x03(\t\x12\x13\n\x0binstruction\x18\x02 \x01(\t\x12\x0c\n\x04uris\x18\x03 \x03(\t\x1a\x89\x01\n\x0b\x44\x65rivedInfo\x12\x38\n\tlocations\x18\x01 \x03(\x0b\x32%.google.cloud.talent.v4beta1.Location\x12@\n\x0ejob_categories\x18\x03 \x03(\x0e\x32(.google.cloud.talent.v4beta1.JobCategory\x1a\x88\x01\n\x11ProcessingOptions\x12)\n!disable_street_address_resolution\x18\x01 \x01(\x08\x12H\n\x11html_sanitization\x18\x02 \x01(\x0e\x32-.google.cloud.talent.v4beta1.HtmlSanitization\x1a\x65\n\x15\x43ustomAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12;\n\x05value\x18\x02 \x01(\x0b\x32,.google.cloud.talent.v4beta1.CustomAttribute:\x02\x38\x01:k\xea\x41h\n\x17jobs.googleapis.com/Job\x12.projects/{project}/tenants/{tenant}/jobs/{job}\x12\x1dprojects/{project}/jobs/{job}Bt\n\x1f\x63om.google.cloud.talent.v4beta1B\x10JobResourceProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Talent - module V4beta1 - Job = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Job").msgclass - Job::ApplicationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Job.ApplicationInfo").msgclass - Job::DerivedInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Job.DerivedInfo").msgclass - Job::ProcessingOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Job.ProcessingOptions").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service.rb deleted file mode 100644 index e0b6ed615036..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_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/talent/v4beta1/version" - -require "google/cloud/talent/v4beta1/job_service/credentials" -require "google/cloud/talent/v4beta1/job_service/paths" -require "google/cloud/talent/v4beta1/job_service/operations" -require "google/cloud/talent/v4beta1/job_service/client" -require "google/cloud/talent/v4beta1/job_service/rest" - -module Google - module Cloud - module Talent - module V4beta1 - ## - # A service handles job management, including job CRUD, enumeration and search. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/talent/v4beta1/job_service" - # client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/talent/v4beta1/job_service/rest" - # client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new - # - module JobService - end - end - end - end -end - -helper_path = ::File.join __dir__, "job_service", "helpers.rb" -require "google/cloud/talent/v4beta1/job_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/client.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/client.rb deleted file mode 100644 index 184abd491294..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/client.rb +++ /dev/null @@ -1,2083 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/talent/v4beta1/job_service_pb" - -module Google - module Cloud - module Talent - module V4beta1 - module JobService - ## - # Client for the JobService service. - # - # A service handles job management, including job CRUD, enumeration and search. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :job_service_stub - - ## - # Configure the JobService Client class. - # - # See {::Google::Cloud::Talent::V4beta1::JobService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all JobService clients - # ::Google::Cloud::Talent::V4beta1::JobService::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", "Talent", "V4beta1"] - 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_job.timeout = 30.0 - - default_config.rpcs.batch_create_jobs.timeout = 30.0 - - default_config.rpcs.get_job.timeout = 30.0 - default_config.rpcs.get_job.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_job.timeout = 30.0 - - default_config.rpcs.batch_update_jobs.timeout = 30.0 - - default_config.rpcs.delete_job.timeout = 30.0 - default_config.rpcs.delete_job.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.batch_delete_jobs.timeout = 30.0 - - default_config.rpcs.list_jobs.timeout = 30.0 - default_config.rpcs.list_jobs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.search_jobs.timeout = 30.0 - - default_config.rpcs.search_jobs_for_alert.timeout = 30.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the JobService 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::Talent::V4beta1::JobService::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 - @job_service_stub.universe_domain - end - - ## - # Create a new JobService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the JobService 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/talent/v4beta1/job_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 - - @job_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Talent::V4beta1::JobService::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 - ) - - @job_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 - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Talent::V4beta1::JobService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @job_service_stub.logger - end - - # Service calls - - ## - # Creates a new job. - # - # Typically, the job becomes searchable within 10 seconds, but it may take - # up to 5 minutes. - # - # @overload create_job(request, options = nil) - # Pass arguments to `create_job` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::CreateJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::CreateJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_job(parent: nil, job: nil) - # Pass arguments to `create_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the tenant under which the job is created. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, - # "projects/foo/tenant/bar". If tenant id is unspecified a default tenant - # is created. For example, "projects/foo". - # @param job [::Google::Cloud::Talent::V4beta1::Job, ::Hash] - # Required. The Job to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Talent::V4beta1::Job] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Talent::V4beta1::Job] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::JobService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::CreateJobRequest.new - # - # # Call the create_job method. - # result = client.create_job request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::Job. - # p result - # - def create_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::CreateJobRequest - - # Converts hash and nil to 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_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @job_service_stub.call_rpc :create_job, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Begins executing a batch create jobs operation. - # - # @overload batch_create_jobs(request, options = nil) - # Pass arguments to `batch_create_jobs` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_create_jobs(parent: nil, jobs: nil) - # Pass arguments to `batch_create_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the tenant under which the job is created. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, - # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant - # is created. For example, "projects/foo". - # @param jobs [::Array<::Google::Cloud::Talent::V4beta1::Job, ::Hash>] - # Required. The jobs 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/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::JobService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest.new - # - # # Call the batch_create_jobs method. - # result = client.batch_create_jobs request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def batch_create_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest - - # Converts hash and nil to 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_create_jobs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_create_jobs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_create_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @job_service_stub.call_rpc :batch_create_jobs, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: 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 specified job, whose status is OPEN or recently EXPIRED - # within the last 90 days. - # - # @overload get_job(request, options = nil) - # Pass arguments to `get_job` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::GetJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::GetJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_job(name: nil) - # Pass arguments to `get_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the job to retrieve. - # - # The format is - # "projects/\\{project_id}/tenants/\\{tenant_id}/jobs/\\{job_id}". For - # example, "projects/foo/tenants/bar/jobs/baz". - # - # If tenant id is unspecified, the default tenant is used. For - # example, "projects/foo/jobs/bar". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Talent::V4beta1::Job] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Talent::V4beta1::Job] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::JobService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::GetJobRequest.new - # - # # Call the get_job method. - # result = client.get_job request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::Job. - # p result - # - def get_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::GetJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @job_service_stub.call_rpc :get_job, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates specified job. - # - # Typically, updated contents become visible in search results within 10 - # seconds, but it may take up to 5 minutes. - # - # @overload update_job(request, options = nil) - # Pass arguments to `update_job` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::UpdateJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::UpdateJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_job(job: nil, update_mask: nil) - # Pass arguments to `update_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param job [::Google::Cloud::Talent::V4beta1::Job, ::Hash] - # Required. The Job to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Strongly recommended for the best service experience. - # - # If {::Google::Cloud::Talent::V4beta1::UpdateJobRequest#update_mask update_mask} - # is provided, only the specified fields in - # {::Google::Cloud::Talent::V4beta1::UpdateJobRequest#job job} are updated. - # Otherwise all the fields are updated. - # - # A field mask to restrict the fields that are updated. Only - # top level fields of {::Google::Cloud::Talent::V4beta1::Job Job} are supported. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Talent::V4beta1::Job] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Talent::V4beta1::Job] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::JobService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::UpdateJobRequest.new - # - # # Call the update_job method. - # result = client.update_job request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::Job. - # p result - # - def update_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::UpdateJobRequest - - # Converts hash and nil to 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_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.job&.name - header_params["job.name"] = request.job.name - end - - request_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_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @job_service_stub.call_rpc :update_job, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Begins executing a batch update jobs operation. - # - # @overload batch_update_jobs(request, options = nil) - # Pass arguments to `batch_update_jobs` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_update_jobs(parent: nil, jobs: nil, update_mask: nil) - # Pass arguments to `batch_update_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the tenant under which the job is created. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, - # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant - # is created. For example, "projects/foo". - # @param jobs [::Array<::Google::Cloud::Talent::V4beta1::Job, ::Hash>] - # Required. The jobs to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Strongly recommended for the best service experience. Be aware that it will - # also increase latency when checking the status of a batch operation. - # - # If - # {::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest#update_mask update_mask} - # is provided, only the specified fields in - # {::Google::Cloud::Talent::V4beta1::Job Job} are updated. Otherwise all the - # fields are updated. - # - # A field mask to restrict the fields that are updated. Only - # top level fields of {::Google::Cloud::Talent::V4beta1::Job Job} are supported. - # - # If - # {::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest#update_mask update_mask} - # is provided, The {::Google::Cloud::Talent::V4beta1::Job Job} inside - # {::Google::Cloud::Talent::V4beta1::JobOperationResult::JobResult JobResult} - # will only contains fields that is updated, plus the Id of the Job. - # Otherwise, {::Google::Cloud::Talent::V4beta1::Job Job} will include all fields, - # which can yield a very large response. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::JobService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest.new - # - # # Call the batch_update_jobs method. - # result = client.batch_update_jobs request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def batch_update_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest - - # Converts hash and nil to 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_update_jobs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_update_jobs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_update_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @job_service_stub.call_rpc :batch_update_jobs, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 the specified job. - # - # Typically, the job becomes unsearchable within 10 seconds, but it may take - # up to 5 minutes. - # - # @overload delete_job(request, options = nil) - # Pass arguments to `delete_job` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::DeleteJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::DeleteJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_job(name: nil) - # Pass arguments to `delete_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the job to be deleted. - # - # The format is - # "projects/\\{project_id}/tenants/\\{tenant_id}/jobs/\\{job_id}". For - # example, "projects/foo/tenants/bar/jobs/baz". - # - # If tenant id is unspecified, the default tenant is used. For - # example, "projects/foo/jobs/bar". - # - # @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/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::JobService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::DeleteJobRequest.new - # - # # Call the delete_job method. - # result = client.delete_job request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::DeleteJobRequest - - # Converts hash and nil to 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_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @job_service_stub.call_rpc :delete_job, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a list of {::Google::Cloud::Talent::V4beta1::Job Job}s by filter. - # - # @overload batch_delete_jobs(request, options = nil) - # Pass arguments to `batch_delete_jobs` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_delete_jobs(parent: nil, filter: nil) - # Pass arguments to `batch_delete_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the tenant under which the job is created. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, - # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant - # is created. For example, "projects/foo". - # @param filter [::String] - # Required. The filter string specifies the jobs to be deleted. - # - # Supported operator: =, AND - # - # The fields eligible for filtering are: - # - # * `companyName` (Required) - # * `requisitionId` (Required) - # - # Sample Query: companyName = "projects/foo/companies/bar" AND - # requisitionId = "req-1" - # - # @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/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::JobService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest.new - # - # # Call the batch_delete_jobs method. - # result = client.batch_delete_jobs request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def batch_delete_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest - - # Converts hash and nil to 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_delete_jobs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_delete_jobs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_delete_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @job_service_stub.call_rpc :batch_delete_jobs, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists jobs by filter. - # - # @overload list_jobs(request, options = nil) - # Pass arguments to `list_jobs` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::ListJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::ListJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_jobs(parent: nil, filter: nil, page_token: nil, page_size: nil, job_view: nil) - # Pass arguments to `list_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the tenant under which the job is created. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, - # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant - # is created. For example, "projects/foo". - # @param filter [::String] - # Required. The filter string specifies the jobs to be enumerated. - # - # Supported operator: =, AND - # - # The fields eligible for filtering are: - # - # * `companyName` - # * `requisitionId` - # * `status` Available values: OPEN, EXPIRED, ALL. Defaults to - # OPEN if no value is specified. - # - # At least one of `companyName` and `requisitionId` must present or an - # INVALID_ARGUMENT error is thrown. - # - # Sample Query: - # - # * companyName = "projects/foo/tenants/bar/companies/baz" - # * companyName = "projects/foo/tenants/bar/companies/baz" AND - # requisitionId = "req-1" - # * companyName = "projects/foo/tenants/bar/companies/baz" AND - # status = "EXPIRED" - # * requisitionId = "req-1" - # * requisitionId = "req-1" AND status = "EXPIRED" - # @param page_token [::String] - # The starting point of a query result. - # @param page_size [::Integer] - # The maximum number of jobs to be returned per page of results. - # - # If {::Google::Cloud::Talent::V4beta1::ListJobsRequest#job_view job_view} is set - # to - # {::Google::Cloud::Talent::V4beta1::JobView::JOB_VIEW_ID_ONLY JobView.JOB_VIEW_ID_ONLY}, - # the maximum allowed page size is 1000. Otherwise, the maximum allowed page - # size is 100. - # - # Default is 100 if empty or a number < 1 is specified. - # @param job_view [::Google::Cloud::Talent::V4beta1::JobView] - # The desired job attributes returned for jobs in the - # search response. Defaults to - # {::Google::Cloud::Talent::V4beta1::JobView::JOB_VIEW_FULL JobView.JOB_VIEW_FULL} - # if no value is specified. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Job>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Job>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::JobService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::ListJobsRequest.new - # - # # Call the list_jobs method. - # result = client.list_jobs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Talent::V4beta1::Job. - # p item - # end - # - def list_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::ListJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_jobs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_jobs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @job_service_stub.call_rpc :list_jobs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @job_service_stub, :list_jobs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Searches for jobs using the provided - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest SearchJobsRequest}. - # - # This call constrains the - # {::Google::Cloud::Talent::V4beta1::Job#visibility visibility} of jobs present in - # the database, and only returns jobs that the caller has permission to - # search against. - # - # @overload search_jobs(request, options = nil) - # Pass arguments to `search_jobs` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::SearchJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload search_jobs(parent: nil, search_mode: nil, request_metadata: nil, job_query: nil, enable_broadening: nil, require_precise_result_size: nil, histogram_queries: nil, job_view: nil, offset: nil, page_size: nil, page_token: nil, order_by: nil, diversification_level: nil, custom_ranking_info: nil, disable_keyword_match: nil, keyword_match_mode: nil, relevance_threshold: nil) - # Pass arguments to `search_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the tenant to search within. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, - # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant - # is created. For example, "projects/foo". - # @param search_mode [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::SearchMode] - # Mode of a search. - # - # Defaults to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::SearchMode::JOB_SEARCH SearchMode.JOB_SEARCH}. - # @param request_metadata [::Google::Cloud::Talent::V4beta1::RequestMetadata, ::Hash] - # Required. The meta information collected about the job searcher, used to - # improve the search quality of the service. The identifiers (such as - # `user_id`) are provided by users, and must be unique and consistent. - # @param job_query [::Google::Cloud::Talent::V4beta1::JobQuery, ::Hash] - # Query used to search against jobs, such as keyword, location filters, etc. - # @param enable_broadening [::Boolean] - # Controls whether to broaden the search when it produces sparse results. - # Broadened queries append results to the end of the matching results - # list. - # - # Defaults to false. - # @param require_precise_result_size [::Boolean] - # This field is deprecated. - # @param histogram_queries [::Array<::Google::Cloud::Talent::V4beta1::HistogramQuery, ::Hash>] - # An expression specifies a histogram request against matching jobs. - # - # Expression syntax is an aggregation function call with histogram facets and - # other options. - # - # Available aggregation function calls are: - # * `count(string_histogram_facet)`: Count the number of matching entities, - # for each distinct attribute value. - # * `count(numeric_histogram_facet, list of buckets)`: Count the number of - # matching entities within each bucket. - # - # A maximum of 200 histogram buckets are supported. - # - # Data types: - # - # * Histogram facet: facet names with format `[a-zA-Z][a-zA-Z0-9_]+`. - # * String: string like "any string with backslash escape for quote(\")." - # * Number: whole number and floating point number like 10, -1 and -0.01. - # * List: list of elements with comma(,) separator surrounded by square - # brackets, for example, [1, 2, 3] and ["one", "two", "three"]. - # - # Built-in constants: - # - # * MIN (minimum number similar to java Double.MIN_VALUE) - # * MAX (maximum number similar to java Double.MAX_VALUE) - # - # Built-in functions: - # - # * bucket(start, end[, label]): bucket built-in function creates a bucket - # with range of [start, end). Note that the end is exclusive, for example, - # bucket(1, MAX, "positive number") or bucket(1, 10). - # - # Job histogram facets: - # - # * company_display_name: histogram by - # {::Google::Cloud::Talent::V4beta1::Job#company_display_name Job.company_display_name}. - # * employment_type: histogram by - # {::Google::Cloud::Talent::V4beta1::Job#employment_types Job.employment_types}, - # for example, - # "FULL_TIME", "PART_TIME". - # * company_size (DEPRECATED): histogram by - # {::Google::Cloud::Talent::V4beta1::CompanySize CompanySize}, for example, - # "SMALL", "MEDIUM", "BIG". - # * publish_time_in_day: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} - # in days. - # Must specify list of numeric buckets in spec. - # * publish_time_in_month: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} - # in months. - # Must specify list of numeric buckets in spec. - # * publish_time_in_year: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} - # in years. - # Must specify list of numeric buckets in spec. - # * degree_types: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#degree_types Job.degree_types}, for - # example, - # "Bachelors", "Masters". - # * job_level: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#job_level Job.job_level}, for example, - # "Entry - # Level". - # * country: histogram by the country code of jobs, for example, "US", "FR". - # * admin1: histogram by the admin1 code of jobs, which is a global - # placeholder referring to the state, province, or the particular term a - # country uses to define the geographic structure below the country level, - # for example, "CA", "IL". - # * city: histogram by a combination of the "city name, admin1 code". For - # example, "Mountain View, CA", "New York, NY". - # * admin1_country: histogram by a combination of the "admin1 code, country", - # for example, "CA, US", "IL, US". - # * city_coordinate: histogram by the city center's GPS coordinates (latitude - # and longitude), for example, 37.4038522,-122.0987765. Since the - # coordinates of a city center can change, customers may need to refresh - # them periodically. - # * locale: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}, for - # example, "en-US", - # "fr-FR". - # * language: histogram by the language subtag of the - # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}, - # for example, "en", "fr". - # * category: histogram by the - # {::Google::Cloud::Talent::V4beta1::JobCategory JobCategory}, for example, - # "COMPUTER_AND_IT", "HEALTHCARE". - # * base_compensation_unit: histogram by the - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationUnit CompensationInfo.CompensationUnit} - # of base salary, for example, "WEEKLY", "MONTHLY". - # * base_compensation: histogram by the base salary. Must specify list of - # numeric buckets to group results by. - # * annualized_base_compensation: histogram by the base annualized salary. - # Must specify list of numeric buckets to group results by. - # * annualized_total_compensation: histogram by the total annualized salary. - # Must specify list of numeric buckets to group results by. - # * string_custom_attribute: histogram by string - # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes}. - # Values can be accessed via square bracket notations like - # string_custom_attribute["key1"]. - # * numeric_custom_attribute: histogram by numeric - # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes}. - # Values can be accessed via square bracket notations like - # numeric_custom_attribute["key1"]. Must specify list of numeric buckets to - # group results by. - # - # Example expressions: - # - # * `count(admin1)` - # * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000), - # bucket(100000, MAX)])` - # * `count(string_custom_attribute["some-string-custom-attribute"])` - # * `count(numeric_custom_attribute["some-numeric-custom-attribute"], - # [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])` - # @param job_view [::Google::Cloud::Talent::V4beta1::JobView] - # The desired job attributes returned for jobs in the search response. - # Defaults to - # {::Google::Cloud::Talent::V4beta1::JobView::JOB_VIEW_SMALL JobView.JOB_VIEW_SMALL} - # if no value is specified. - # @param offset [::Integer] - # An integer that specifies the current offset (that is, starting result - # location, amongst the jobs deemed by the API as relevant) in search - # results. This field is only considered if - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#page_token page_token} is - # unset. - # - # The maximum allowed value is 5000. Otherwise an error is thrown. - # - # For example, 0 means to return results starting from the first matching - # job, and 10 means to return from the 11th job. This can be used for - # pagination, (for example, pageSize = 10 and offset = 10 means to return - # from the second page). - # @param page_size [::Integer] - # A limit on the number of jobs returned in the search results. - # Increasing this value above the default value of 10 can increase search - # response time. The value can be between 1 and 100. - # @param page_token [::String] - # The token specifying the current offset within - # search results. See - # {::Google::Cloud::Talent::V4beta1::SearchJobsResponse#next_page_token SearchJobsResponse.next_page_token} - # for an explanation of how to obtain the next set of query results. - # @param order_by [::String] - # The criteria determining how search results are sorted. Default is - # `"relevance desc"`. - # - # Supported options are: - # - # * `"relevance desc"`: By relevance descending, as determined by the API - # algorithms. Relevance thresholding of query results is only available - # with this ordering. - # * `"posting_publish_time desc"`: By - # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} - # descending. - # * `"posting_update_time desc"`: By - # {::Google::Cloud::Talent::V4beta1::Job#posting_update_time Job.posting_update_time} - # descending. - # * `"title"`: By {::Google::Cloud::Talent::V4beta1::Job#title Job.title} - # ascending. - # * `"title desc"`: By {::Google::Cloud::Talent::V4beta1::Job#title Job.title} - # descending. - # * `"annualized_base_compensation"`: By job's - # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_base_compensation_range CompensationInfo.annualized_base_compensation_range} - # ascending. Jobs whose annualized base compensation is unspecified are put - # at the end of search results. - # * `"annualized_base_compensation desc"`: By job's - # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_base_compensation_range CompensationInfo.annualized_base_compensation_range} - # descending. Jobs whose annualized base compensation is unspecified are - # put at the end of search results. - # * `"annualized_total_compensation"`: By job's - # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_total_compensation_range CompensationInfo.annualized_total_compensation_range} - # ascending. Jobs whose annualized base compensation is unspecified are put - # at the end of search results. - # * `"annualized_total_compensation desc"`: By job's - # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_total_compensation_range CompensationInfo.annualized_total_compensation_range} - # descending. Jobs whose annualized base compensation is unspecified are - # put at the end of search results. - # * `"custom_ranking desc"`: By the relevance score adjusted to the - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#ranking_expression SearchJobsRequest.CustomRankingInfo.ranking_expression} - # with weight factor assigned by - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#importance_level SearchJobsRequest.CustomRankingInfo.importance_level} - # in descending order. - # * Location sorting: Use the special syntax to order jobs by distance:
- # `"distance_from('Hawaii')"`: Order by distance from Hawaii.
- # `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.
- # `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by - # multiple locations. See details below.
- # `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by - # multiple locations. See details below.
- # The string can have a maximum of 256 characters. When multiple distance - # centers are provided, a job that is close to any of the distance centers - # would have a high rank. When a job has multiple locations, the job - # location closest to one of the distance centers will be used. Jobs that - # don't have locations will be ranked at the bottom. Distance is calculated - # with a precision of 11.3 meters (37.4 feet). Diversification strategy is - # still applied unless explicitly disabled in - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#diversification_level diversification_level}. - # @param diversification_level [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::DiversificationLevel] - # Controls whether highly similar jobs are returned next to each other in - # the search results. Jobs are identified as highly similar based on - # their titles, job categories, and locations. Highly similar results are - # clustered so that only one representative job of the cluster is - # displayed to the job seeker higher up in the results, with the other jobs - # being displayed lower down in the results. - # - # Defaults to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::DiversificationLevel::SIMPLE DiversificationLevel.SIMPLE} - # if no value is specified. - # @param custom_ranking_info [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo, ::Hash] - # Controls over how job documents get ranked on top of existing relevance - # score (determined by API algorithm). - # @param disable_keyword_match [::Boolean] - # This field is deprecated. Please use - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#keyword_match_mode SearchJobsRequest.keyword_match_mode} - # going forward. - # - # To migrate, disable_keyword_match set to false maps to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_ALL KeywordMatchMode.KEYWORD_MATCH_ALL}, - # and disable_keyword_match set to true maps to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_DISABLED KeywordMatchMode.KEYWORD_MATCH_DISABLED}. - # If - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#keyword_match_mode SearchJobsRequest.keyword_match_mode} - # is set, this field is ignored. - # - # Controls whether to disable exact keyword match on - # {::Google::Cloud::Talent::V4beta1::Job#title Job.title}, - # {::Google::Cloud::Talent::V4beta1::Job#description Job.description}, - # {::Google::Cloud::Talent::V4beta1::Job#company_display_name Job.company_display_name}, - # {::Google::Cloud::Talent::V4beta1::Job#addresses Job.addresses}, - # {::Google::Cloud::Talent::V4beta1::Job#qualifications Job.qualifications}. When - # disable keyword match is turned off, a keyword match returns jobs that do - # not match given category filters when there are matching keywords. For - # example, for the query "program manager," a result is returned even if the - # job posting has the title "software developer," which doesn't fall into - # "program manager" ontology, but does have "program manager" appearing in - # its description. - # - # For queries like "cloud" that don't contain title or - # location specific ontology, jobs with "cloud" keyword matches are returned - # regardless of this flag's value. - # - # Use - # {::Google::Cloud::Talent::V4beta1::Company#keyword_searchable_job_custom_attributes Company.keyword_searchable_job_custom_attributes} - # if company-specific globally matched custom field/attribute string values - # are needed. Enabling keyword match improves recall of subsequent search - # requests. - # - # Defaults to false. - # @param keyword_match_mode [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode] - # Controls what keyword match options to use. - # - # Defaults to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_ALL KeywordMatchMode.KEYWORD_MATCH_ALL} - # if no value is specified. - # @param relevance_threshold [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::RelevanceThreshold] - # Optional. The relevance threshold of the search results. - # - # Default to Google defined threshold, leveraging a balance of - # precision and recall to deliver both highly accurate results and - # comprehensive coverage of relevant information. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Talent::V4beta1::SearchJobsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Talent::V4beta1::SearchJobsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::JobService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::SearchJobsRequest.new - # - # # Call the search_jobs method. - # result = client.search_jobs request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::SearchJobsResponse. - # p result - # - def search_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::SearchJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.search_jobs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_jobs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @job_service_stub.call_rpc :search_jobs, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Searches for jobs using the provided - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest SearchJobsRequest}. - # - # This API call is intended for the use case of targeting passive job - # seekers (for example, job seekers who have signed up to receive email - # alerts about potential job opportunities), and has different algorithmic - # adjustments that are targeted to passive job seekers. - # - # This call constrains the - # {::Google::Cloud::Talent::V4beta1::Job#visibility visibility} of jobs present in - # the database, and only returns jobs the caller has permission to search - # against. - # - # @overload search_jobs_for_alert(request, options = nil) - # Pass arguments to `search_jobs_for_alert` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::SearchJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload search_jobs_for_alert(parent: nil, search_mode: nil, request_metadata: nil, job_query: nil, enable_broadening: nil, require_precise_result_size: nil, histogram_queries: nil, job_view: nil, offset: nil, page_size: nil, page_token: nil, order_by: nil, diversification_level: nil, custom_ranking_info: nil, disable_keyword_match: nil, keyword_match_mode: nil, relevance_threshold: nil) - # Pass arguments to `search_jobs_for_alert` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the tenant to search within. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, - # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant - # is created. For example, "projects/foo". - # @param search_mode [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::SearchMode] - # Mode of a search. - # - # Defaults to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::SearchMode::JOB_SEARCH SearchMode.JOB_SEARCH}. - # @param request_metadata [::Google::Cloud::Talent::V4beta1::RequestMetadata, ::Hash] - # Required. The meta information collected about the job searcher, used to - # improve the search quality of the service. The identifiers (such as - # `user_id`) are provided by users, and must be unique and consistent. - # @param job_query [::Google::Cloud::Talent::V4beta1::JobQuery, ::Hash] - # Query used to search against jobs, such as keyword, location filters, etc. - # @param enable_broadening [::Boolean] - # Controls whether to broaden the search when it produces sparse results. - # Broadened queries append results to the end of the matching results - # list. - # - # Defaults to false. - # @param require_precise_result_size [::Boolean] - # This field is deprecated. - # @param histogram_queries [::Array<::Google::Cloud::Talent::V4beta1::HistogramQuery, ::Hash>] - # An expression specifies a histogram request against matching jobs. - # - # Expression syntax is an aggregation function call with histogram facets and - # other options. - # - # Available aggregation function calls are: - # * `count(string_histogram_facet)`: Count the number of matching entities, - # for each distinct attribute value. - # * `count(numeric_histogram_facet, list of buckets)`: Count the number of - # matching entities within each bucket. - # - # A maximum of 200 histogram buckets are supported. - # - # Data types: - # - # * Histogram facet: facet names with format `[a-zA-Z][a-zA-Z0-9_]+`. - # * String: string like "any string with backslash escape for quote(\")." - # * Number: whole number and floating point number like 10, -1 and -0.01. - # * List: list of elements with comma(,) separator surrounded by square - # brackets, for example, [1, 2, 3] and ["one", "two", "three"]. - # - # Built-in constants: - # - # * MIN (minimum number similar to java Double.MIN_VALUE) - # * MAX (maximum number similar to java Double.MAX_VALUE) - # - # Built-in functions: - # - # * bucket(start, end[, label]): bucket built-in function creates a bucket - # with range of [start, end). Note that the end is exclusive, for example, - # bucket(1, MAX, "positive number") or bucket(1, 10). - # - # Job histogram facets: - # - # * company_display_name: histogram by - # {::Google::Cloud::Talent::V4beta1::Job#company_display_name Job.company_display_name}. - # * employment_type: histogram by - # {::Google::Cloud::Talent::V4beta1::Job#employment_types Job.employment_types}, - # for example, - # "FULL_TIME", "PART_TIME". - # * company_size (DEPRECATED): histogram by - # {::Google::Cloud::Talent::V4beta1::CompanySize CompanySize}, for example, - # "SMALL", "MEDIUM", "BIG". - # * publish_time_in_day: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} - # in days. - # Must specify list of numeric buckets in spec. - # * publish_time_in_month: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} - # in months. - # Must specify list of numeric buckets in spec. - # * publish_time_in_year: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} - # in years. - # Must specify list of numeric buckets in spec. - # * degree_types: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#degree_types Job.degree_types}, for - # example, - # "Bachelors", "Masters". - # * job_level: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#job_level Job.job_level}, for example, - # "Entry - # Level". - # * country: histogram by the country code of jobs, for example, "US", "FR". - # * admin1: histogram by the admin1 code of jobs, which is a global - # placeholder referring to the state, province, or the particular term a - # country uses to define the geographic structure below the country level, - # for example, "CA", "IL". - # * city: histogram by a combination of the "city name, admin1 code". For - # example, "Mountain View, CA", "New York, NY". - # * admin1_country: histogram by a combination of the "admin1 code, country", - # for example, "CA, US", "IL, US". - # * city_coordinate: histogram by the city center's GPS coordinates (latitude - # and longitude), for example, 37.4038522,-122.0987765. Since the - # coordinates of a city center can change, customers may need to refresh - # them periodically. - # * locale: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}, for - # example, "en-US", - # "fr-FR". - # * language: histogram by the language subtag of the - # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}, - # for example, "en", "fr". - # * category: histogram by the - # {::Google::Cloud::Talent::V4beta1::JobCategory JobCategory}, for example, - # "COMPUTER_AND_IT", "HEALTHCARE". - # * base_compensation_unit: histogram by the - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationUnit CompensationInfo.CompensationUnit} - # of base salary, for example, "WEEKLY", "MONTHLY". - # * base_compensation: histogram by the base salary. Must specify list of - # numeric buckets to group results by. - # * annualized_base_compensation: histogram by the base annualized salary. - # Must specify list of numeric buckets to group results by. - # * annualized_total_compensation: histogram by the total annualized salary. - # Must specify list of numeric buckets to group results by. - # * string_custom_attribute: histogram by string - # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes}. - # Values can be accessed via square bracket notations like - # string_custom_attribute["key1"]. - # * numeric_custom_attribute: histogram by numeric - # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes}. - # Values can be accessed via square bracket notations like - # numeric_custom_attribute["key1"]. Must specify list of numeric buckets to - # group results by. - # - # Example expressions: - # - # * `count(admin1)` - # * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000), - # bucket(100000, MAX)])` - # * `count(string_custom_attribute["some-string-custom-attribute"])` - # * `count(numeric_custom_attribute["some-numeric-custom-attribute"], - # [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])` - # @param job_view [::Google::Cloud::Talent::V4beta1::JobView] - # The desired job attributes returned for jobs in the search response. - # Defaults to - # {::Google::Cloud::Talent::V4beta1::JobView::JOB_VIEW_SMALL JobView.JOB_VIEW_SMALL} - # if no value is specified. - # @param offset [::Integer] - # An integer that specifies the current offset (that is, starting result - # location, amongst the jobs deemed by the API as relevant) in search - # results. This field is only considered if - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#page_token page_token} is - # unset. - # - # The maximum allowed value is 5000. Otherwise an error is thrown. - # - # For example, 0 means to return results starting from the first matching - # job, and 10 means to return from the 11th job. This can be used for - # pagination, (for example, pageSize = 10 and offset = 10 means to return - # from the second page). - # @param page_size [::Integer] - # A limit on the number of jobs returned in the search results. - # Increasing this value above the default value of 10 can increase search - # response time. The value can be between 1 and 100. - # @param page_token [::String] - # The token specifying the current offset within - # search results. See - # {::Google::Cloud::Talent::V4beta1::SearchJobsResponse#next_page_token SearchJobsResponse.next_page_token} - # for an explanation of how to obtain the next set of query results. - # @param order_by [::String] - # The criteria determining how search results are sorted. Default is - # `"relevance desc"`. - # - # Supported options are: - # - # * `"relevance desc"`: By relevance descending, as determined by the API - # algorithms. Relevance thresholding of query results is only available - # with this ordering. - # * `"posting_publish_time desc"`: By - # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} - # descending. - # * `"posting_update_time desc"`: By - # {::Google::Cloud::Talent::V4beta1::Job#posting_update_time Job.posting_update_time} - # descending. - # * `"title"`: By {::Google::Cloud::Talent::V4beta1::Job#title Job.title} - # ascending. - # * `"title desc"`: By {::Google::Cloud::Talent::V4beta1::Job#title Job.title} - # descending. - # * `"annualized_base_compensation"`: By job's - # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_base_compensation_range CompensationInfo.annualized_base_compensation_range} - # ascending. Jobs whose annualized base compensation is unspecified are put - # at the end of search results. - # * `"annualized_base_compensation desc"`: By job's - # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_base_compensation_range CompensationInfo.annualized_base_compensation_range} - # descending. Jobs whose annualized base compensation is unspecified are - # put at the end of search results. - # * `"annualized_total_compensation"`: By job's - # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_total_compensation_range CompensationInfo.annualized_total_compensation_range} - # ascending. Jobs whose annualized base compensation is unspecified are put - # at the end of search results. - # * `"annualized_total_compensation desc"`: By job's - # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_total_compensation_range CompensationInfo.annualized_total_compensation_range} - # descending. Jobs whose annualized base compensation is unspecified are - # put at the end of search results. - # * `"custom_ranking desc"`: By the relevance score adjusted to the - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#ranking_expression SearchJobsRequest.CustomRankingInfo.ranking_expression} - # with weight factor assigned by - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#importance_level SearchJobsRequest.CustomRankingInfo.importance_level} - # in descending order. - # * Location sorting: Use the special syntax to order jobs by distance:
- # `"distance_from('Hawaii')"`: Order by distance from Hawaii.
- # `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.
- # `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by - # multiple locations. See details below.
- # `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by - # multiple locations. See details below.
- # The string can have a maximum of 256 characters. When multiple distance - # centers are provided, a job that is close to any of the distance centers - # would have a high rank. When a job has multiple locations, the job - # location closest to one of the distance centers will be used. Jobs that - # don't have locations will be ranked at the bottom. Distance is calculated - # with a precision of 11.3 meters (37.4 feet). Diversification strategy is - # still applied unless explicitly disabled in - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#diversification_level diversification_level}. - # @param diversification_level [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::DiversificationLevel] - # Controls whether highly similar jobs are returned next to each other in - # the search results. Jobs are identified as highly similar based on - # their titles, job categories, and locations. Highly similar results are - # clustered so that only one representative job of the cluster is - # displayed to the job seeker higher up in the results, with the other jobs - # being displayed lower down in the results. - # - # Defaults to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::DiversificationLevel::SIMPLE DiversificationLevel.SIMPLE} - # if no value is specified. - # @param custom_ranking_info [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo, ::Hash] - # Controls over how job documents get ranked on top of existing relevance - # score (determined by API algorithm). - # @param disable_keyword_match [::Boolean] - # This field is deprecated. Please use - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#keyword_match_mode SearchJobsRequest.keyword_match_mode} - # going forward. - # - # To migrate, disable_keyword_match set to false maps to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_ALL KeywordMatchMode.KEYWORD_MATCH_ALL}, - # and disable_keyword_match set to true maps to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_DISABLED KeywordMatchMode.KEYWORD_MATCH_DISABLED}. - # If - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#keyword_match_mode SearchJobsRequest.keyword_match_mode} - # is set, this field is ignored. - # - # Controls whether to disable exact keyword match on - # {::Google::Cloud::Talent::V4beta1::Job#title Job.title}, - # {::Google::Cloud::Talent::V4beta1::Job#description Job.description}, - # {::Google::Cloud::Talent::V4beta1::Job#company_display_name Job.company_display_name}, - # {::Google::Cloud::Talent::V4beta1::Job#addresses Job.addresses}, - # {::Google::Cloud::Talent::V4beta1::Job#qualifications Job.qualifications}. When - # disable keyword match is turned off, a keyword match returns jobs that do - # not match given category filters when there are matching keywords. For - # example, for the query "program manager," a result is returned even if the - # job posting has the title "software developer," which doesn't fall into - # "program manager" ontology, but does have "program manager" appearing in - # its description. - # - # For queries like "cloud" that don't contain title or - # location specific ontology, jobs with "cloud" keyword matches are returned - # regardless of this flag's value. - # - # Use - # {::Google::Cloud::Talent::V4beta1::Company#keyword_searchable_job_custom_attributes Company.keyword_searchable_job_custom_attributes} - # if company-specific globally matched custom field/attribute string values - # are needed. Enabling keyword match improves recall of subsequent search - # requests. - # - # Defaults to false. - # @param keyword_match_mode [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode] - # Controls what keyword match options to use. - # - # Defaults to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_ALL KeywordMatchMode.KEYWORD_MATCH_ALL} - # if no value is specified. - # @param relevance_threshold [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::RelevanceThreshold] - # Optional. The relevance threshold of the search results. - # - # Default to Google defined threshold, leveraging a balance of - # precision and recall to deliver both highly accurate results and - # comprehensive coverage of relevant information. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Talent::V4beta1::SearchJobsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Talent::V4beta1::SearchJobsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::JobService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::SearchJobsRequest.new - # - # # Call the search_jobs_for_alert method. - # result = client.search_jobs_for_alert request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::SearchJobsResponse. - # p result - # - def search_jobs_for_alert request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::SearchJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.search_jobs_for_alert.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_jobs_for_alert.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_jobs_for_alert.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @job_service_stub.call_rpc :search_jobs_for_alert, request, 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 JobService API. - # - # This class represents the configuration for JobService, - # 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::Talent::V4beta1::JobService::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_job to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Talent::V4beta1::JobService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_job.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_job.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::Talent::V4beta1::JobService::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 = "jobs.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 JobService 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_job` - # @return [::Gapic::Config::Method] - # - attr_reader :create_job - ## - # RPC-specific configuration for `batch_create_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_create_jobs - ## - # RPC-specific configuration for `get_job` - # @return [::Gapic::Config::Method] - # - attr_reader :get_job - ## - # RPC-specific configuration for `update_job` - # @return [::Gapic::Config::Method] - # - attr_reader :update_job - ## - # RPC-specific configuration for `batch_update_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_update_jobs - ## - # RPC-specific configuration for `delete_job` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_job - ## - # RPC-specific configuration for `batch_delete_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_delete_jobs - ## - # RPC-specific configuration for `list_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_jobs - ## - # RPC-specific configuration for `search_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :search_jobs - ## - # RPC-specific configuration for `search_jobs_for_alert` - # @return [::Gapic::Config::Method] - # - attr_reader :search_jobs_for_alert - - # @private - def initialize parent_rpcs = nil - create_job_config = parent_rpcs.create_job if parent_rpcs.respond_to? :create_job - @create_job = ::Gapic::Config::Method.new create_job_config - batch_create_jobs_config = parent_rpcs.batch_create_jobs if parent_rpcs.respond_to? :batch_create_jobs - @batch_create_jobs = ::Gapic::Config::Method.new batch_create_jobs_config - get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job - @get_job = ::Gapic::Config::Method.new get_job_config - update_job_config = parent_rpcs.update_job if parent_rpcs.respond_to? :update_job - @update_job = ::Gapic::Config::Method.new update_job_config - batch_update_jobs_config = parent_rpcs.batch_update_jobs if parent_rpcs.respond_to? :batch_update_jobs - @batch_update_jobs = ::Gapic::Config::Method.new batch_update_jobs_config - delete_job_config = parent_rpcs.delete_job if parent_rpcs.respond_to? :delete_job - @delete_job = ::Gapic::Config::Method.new delete_job_config - batch_delete_jobs_config = parent_rpcs.batch_delete_jobs if parent_rpcs.respond_to? :batch_delete_jobs - @batch_delete_jobs = ::Gapic::Config::Method.new batch_delete_jobs_config - list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs - @list_jobs = ::Gapic::Config::Method.new list_jobs_config - search_jobs_config = parent_rpcs.search_jobs if parent_rpcs.respond_to? :search_jobs - @search_jobs = ::Gapic::Config::Method.new search_jobs_config - search_jobs_for_alert_config = parent_rpcs.search_jobs_for_alert if parent_rpcs.respond_to? :search_jobs_for_alert - @search_jobs_for_alert = ::Gapic::Config::Method.new search_jobs_for_alert_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/credentials.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/credentials.rb deleted file mode 100644 index b63aa1a22303..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/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 Talent - module V4beta1 - module JobService - # Credentials for the JobService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/jobs" - ] - self.env_vars = [ - "TALENT_CREDENTIALS", - "TALENT_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "TALENT_CREDENTIALS_JSON", - "TALENT_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-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/operations.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/operations.rb deleted file mode 100644 index ccad6093971e..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_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 Talent - module V4beta1 - module JobService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the JobService 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 JobService 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::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Talent::V4beta1::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 = "jobs.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-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/paths.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/paths.rb deleted file mode 100644 index 71e690c1552a..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/paths.rb +++ /dev/null @@ -1,146 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Talent - module V4beta1 - module JobService - # Path helper methods for the JobService API. - module Paths - ## - # Create a fully-qualified Company resource string. - # - # @overload company_path(project:, tenant:, company:) - # The resource will be in the following format: - # - # `projects/{project}/tenants/{tenant}/companies/{company}` - # - # @param project [String] - # @param tenant [String] - # @param company [String] - # - # @overload company_path(project:, company:) - # The resource will be in the following format: - # - # `projects/{project}/companies/{company}` - # - # @param project [String] - # @param company [String] - # - # @return [::String] - def company_path **args - resources = { - "company:project:tenant" => (proc do |project:, tenant:, company:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "tenant cannot contain /" if tenant.to_s.include? "/" - - "projects/#{project}/tenants/#{tenant}/companies/#{company}" - end), - "company:project" => (proc do |project:, company:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/companies/#{company}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Job resource string. - # - # @overload job_path(project:, tenant:, job:) - # The resource will be in the following format: - # - # `projects/{project}/tenants/{tenant}/jobs/{job}` - # - # @param project [String] - # @param tenant [String] - # @param job [String] - # - # @overload job_path(project:, job:) - # The resource will be in the following format: - # - # `projects/{project}/jobs/{job}` - # - # @param project [String] - # @param job [String] - # - # @return [::String] - def job_path **args - resources = { - "job:project:tenant" => (proc do |project:, tenant:, job:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "tenant cannot contain /" if tenant.to_s.include? "/" - - "projects/#{project}/tenants/#{tenant}/jobs/#{job}" - end), - "job:project" => (proc do |project:, job:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/jobs/#{job}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - 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 Tenant resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/tenants/{tenant}` - # - # @param project [String] - # @param tenant [String] - # - # @return [::String] - def tenant_path project:, tenant: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/tenants/#{tenant}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest.rb deleted file mode 100644 index f2f14e59264e..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest.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 "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/talent/v4beta1/version" - -require "google/cloud/talent/v4beta1/job_service/credentials" -require "google/cloud/talent/v4beta1/job_service/paths" -require "google/cloud/talent/v4beta1/job_service/rest/operations" -require "google/cloud/talent/v4beta1/job_service/rest/client" - -module Google - module Cloud - module Talent - module V4beta1 - ## - # A service handles job management, including job CRUD, enumeration and search. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/talent/v4beta1/job_service/rest" - # client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new - # - module JobService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/talent/v4beta1/job_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest/client.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest/client.rb deleted file mode 100644 index 3c6fdb997cbc..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest/client.rb +++ /dev/null @@ -1,1970 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/talent/v4beta1/job_service_pb" -require "google/cloud/talent/v4beta1/job_service/rest/service_stub" - -module Google - module Cloud - module Talent - module V4beta1 - module JobService - module Rest - ## - # REST client for the JobService service. - # - # A service handles job management, including job CRUD, enumeration and search. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :job_service_stub - - ## - # Configure the JobService Client class. - # - # See {::Google::Cloud::Talent::V4beta1::JobService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all JobService clients - # ::Google::Cloud::Talent::V4beta1::JobService::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", "Talent", "V4beta1"] - 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_job.timeout = 30.0 - - default_config.rpcs.batch_create_jobs.timeout = 30.0 - - default_config.rpcs.get_job.timeout = 30.0 - default_config.rpcs.get_job.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_job.timeout = 30.0 - - default_config.rpcs.batch_update_jobs.timeout = 30.0 - - default_config.rpcs.delete_job.timeout = 30.0 - default_config.rpcs.delete_job.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.batch_delete_jobs.timeout = 30.0 - - default_config.rpcs.list_jobs.timeout = 30.0 - default_config.rpcs.list_jobs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.search_jobs.timeout = 30.0 - - default_config.rpcs.search_jobs_for_alert.timeout = 30.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the JobService 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::Talent::V4beta1::JobService::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 - @job_service_stub.universe_domain - end - - ## - # Create a new JobService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the JobService 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::Talent::V4beta1::JobService::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 - - @job_service_stub = ::Google::Cloud::Talent::V4beta1::JobService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @job_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 - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Talent::V4beta1::JobService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @job_service_stub.logger - end - - # Service calls - - ## - # Creates a new job. - # - # Typically, the job becomes searchable within 10 seconds, but it may take - # up to 5 minutes. - # - # @overload create_job(request, options = nil) - # Pass arguments to `create_job` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::CreateJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::CreateJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_job(parent: nil, job: nil) - # Pass arguments to `create_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the tenant under which the job is created. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, - # "projects/foo/tenant/bar". If tenant id is unspecified a default tenant - # is created. For example, "projects/foo". - # @param job [::Google::Cloud::Talent::V4beta1::Job, ::Hash] - # Required. The Job to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::Job] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::Job] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::CreateJobRequest.new - # - # # Call the create_job method. - # result = client.create_job request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::Job. - # p result - # - def create_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::CreateJobRequest - - # Converts hash and nil to an 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_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @job_service_stub.create_job request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Begins executing a batch create jobs operation. - # - # @overload batch_create_jobs(request, options = nil) - # Pass arguments to `batch_create_jobs` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_create_jobs(parent: nil, jobs: nil) - # Pass arguments to `batch_create_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the tenant under which the job is created. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, - # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant - # is created. For example, "projects/foo". - # @param jobs [::Array<::Google::Cloud::Talent::V4beta1::Job, ::Hash>] - # Required. The jobs 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/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest.new - # - # # Call the batch_create_jobs method. - # result = client.batch_create_jobs request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def batch_create_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest - - # Converts hash and nil to an 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_create_jobs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_create_jobs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_create_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @job_service_stub.batch_create_jobs request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 specified job, whose status is OPEN or recently EXPIRED - # within the last 90 days. - # - # @overload get_job(request, options = nil) - # Pass arguments to `get_job` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::GetJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::GetJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_job(name: nil) - # Pass arguments to `get_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the job to retrieve. - # - # The format is - # "projects/\\{project_id}/tenants/\\{tenant_id}/jobs/\\{job_id}". For - # example, "projects/foo/tenants/bar/jobs/baz". - # - # If tenant id is unspecified, the default tenant is used. For - # example, "projects/foo/jobs/bar". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::Job] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::Job] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::GetJobRequest.new - # - # # Call the get_job method. - # result = client.get_job request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::Job. - # p result - # - def get_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::GetJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @job_service_stub.get_job request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates specified job. - # - # Typically, updated contents become visible in search results within 10 - # seconds, but it may take up to 5 minutes. - # - # @overload update_job(request, options = nil) - # Pass arguments to `update_job` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::UpdateJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::UpdateJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_job(job: nil, update_mask: nil) - # Pass arguments to `update_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param job [::Google::Cloud::Talent::V4beta1::Job, ::Hash] - # Required. The Job to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Strongly recommended for the best service experience. - # - # If {::Google::Cloud::Talent::V4beta1::UpdateJobRequest#update_mask update_mask} - # is provided, only the specified fields in - # {::Google::Cloud::Talent::V4beta1::UpdateJobRequest#job job} are updated. - # Otherwise all the fields are updated. - # - # A field mask to restrict the fields that are updated. Only - # top level fields of {::Google::Cloud::Talent::V4beta1::Job Job} are supported. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::Job] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::Job] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::UpdateJobRequest.new - # - # # Call the update_job method. - # result = client.update_job request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::Job. - # p result - # - def update_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::UpdateJobRequest - - # Converts hash and nil to an 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_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @job_service_stub.update_job request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Begins executing a batch update jobs operation. - # - # @overload batch_update_jobs(request, options = nil) - # Pass arguments to `batch_update_jobs` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_update_jobs(parent: nil, jobs: nil, update_mask: nil) - # Pass arguments to `batch_update_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the tenant under which the job is created. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, - # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant - # is created. For example, "projects/foo". - # @param jobs [::Array<::Google::Cloud::Talent::V4beta1::Job, ::Hash>] - # Required. The jobs to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Strongly recommended for the best service experience. Be aware that it will - # also increase latency when checking the status of a batch operation. - # - # If - # {::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest#update_mask update_mask} - # is provided, only the specified fields in - # {::Google::Cloud::Talent::V4beta1::Job Job} are updated. Otherwise all the - # fields are updated. - # - # A field mask to restrict the fields that are updated. Only - # top level fields of {::Google::Cloud::Talent::V4beta1::Job Job} are supported. - # - # If - # {::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest#update_mask update_mask} - # is provided, The {::Google::Cloud::Talent::V4beta1::Job Job} inside - # {::Google::Cloud::Talent::V4beta1::JobOperationResult::JobResult JobResult} - # will only contains fields that is updated, plus the Id of the Job. - # Otherwise, {::Google::Cloud::Talent::V4beta1::Job Job} will include all fields, - # which can yield a very large response. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest.new - # - # # Call the batch_update_jobs method. - # result = client.batch_update_jobs request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def batch_update_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest - - # Converts hash and nil to an 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_update_jobs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_update_jobs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_update_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @job_service_stub.batch_update_jobs request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 the specified job. - # - # Typically, the job becomes unsearchable within 10 seconds, but it may take - # up to 5 minutes. - # - # @overload delete_job(request, options = nil) - # Pass arguments to `delete_job` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::DeleteJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::DeleteJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_job(name: nil) - # Pass arguments to `delete_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the job to be deleted. - # - # The format is - # "projects/\\{project_id}/tenants/\\{tenant_id}/jobs/\\{job_id}". For - # example, "projects/foo/tenants/bar/jobs/baz". - # - # If tenant id is unspecified, the default tenant is used. For - # example, "projects/foo/jobs/bar". - # @yield [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/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::DeleteJobRequest.new - # - # # Call the delete_job method. - # result = client.delete_job request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::DeleteJobRequest - - # Converts hash and nil to an 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_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @job_service_stub.delete_job request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a list of {::Google::Cloud::Talent::V4beta1::Job Job}s by filter. - # - # @overload batch_delete_jobs(request, options = nil) - # Pass arguments to `batch_delete_jobs` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_delete_jobs(parent: nil, filter: nil) - # Pass arguments to `batch_delete_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the tenant under which the job is created. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, - # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant - # is created. For example, "projects/foo". - # @param filter [::String] - # Required. The filter string specifies the jobs to be deleted. - # - # Supported operator: =, AND - # - # The fields eligible for filtering are: - # - # * `companyName` (Required) - # * `requisitionId` (Required) - # - # Sample Query: companyName = "projects/foo/companies/bar" AND - # requisitionId = "req-1" - # @yield [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/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest.new - # - # # Call the batch_delete_jobs method. - # result = client.batch_delete_jobs request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def batch_delete_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest - - # Converts hash and nil to an 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_delete_jobs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_delete_jobs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_delete_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @job_service_stub.batch_delete_jobs request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists jobs by filter. - # - # @overload list_jobs(request, options = nil) - # Pass arguments to `list_jobs` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::ListJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::ListJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_jobs(parent: nil, filter: nil, page_token: nil, page_size: nil, job_view: nil) - # Pass arguments to `list_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the tenant under which the job is created. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, - # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant - # is created. For example, "projects/foo". - # @param filter [::String] - # Required. The filter string specifies the jobs to be enumerated. - # - # Supported operator: =, AND - # - # The fields eligible for filtering are: - # - # * `companyName` - # * `requisitionId` - # * `status` Available values: OPEN, EXPIRED, ALL. Defaults to - # OPEN if no value is specified. - # - # At least one of `companyName` and `requisitionId` must present or an - # INVALID_ARGUMENT error is thrown. - # - # Sample Query: - # - # * companyName = "projects/foo/tenants/bar/companies/baz" - # * companyName = "projects/foo/tenants/bar/companies/baz" AND - # requisitionId = "req-1" - # * companyName = "projects/foo/tenants/bar/companies/baz" AND - # status = "EXPIRED" - # * requisitionId = "req-1" - # * requisitionId = "req-1" AND status = "EXPIRED" - # @param page_token [::String] - # The starting point of a query result. - # @param page_size [::Integer] - # The maximum number of jobs to be returned per page of results. - # - # If {::Google::Cloud::Talent::V4beta1::ListJobsRequest#job_view job_view} is set - # to - # {::Google::Cloud::Talent::V4beta1::JobView::JOB_VIEW_ID_ONLY JobView.JOB_VIEW_ID_ONLY}, - # the maximum allowed page size is 1000. Otherwise, the maximum allowed page - # size is 100. - # - # Default is 100 if empty or a number < 1 is specified. - # @param job_view [::Google::Cloud::Talent::V4beta1::JobView] - # The desired job attributes returned for jobs in the - # search response. Defaults to - # {::Google::Cloud::Talent::V4beta1::JobView::JOB_VIEW_FULL JobView.JOB_VIEW_FULL} - # if no value is specified. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Job>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Job>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::ListJobsRequest.new - # - # # Call the list_jobs method. - # result = client.list_jobs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Talent::V4beta1::Job. - # p item - # end - # - def list_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::ListJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_jobs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_jobs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @job_service_stub.list_jobs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @job_service_stub, :list_jobs, "jobs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Searches for jobs using the provided - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest SearchJobsRequest}. - # - # This call constrains the - # {::Google::Cloud::Talent::V4beta1::Job#visibility visibility} of jobs present in - # the database, and only returns jobs that the caller has permission to - # search against. - # - # @overload search_jobs(request, options = nil) - # Pass arguments to `search_jobs` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::SearchJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload search_jobs(parent: nil, search_mode: nil, request_metadata: nil, job_query: nil, enable_broadening: nil, require_precise_result_size: nil, histogram_queries: nil, job_view: nil, offset: nil, page_size: nil, page_token: nil, order_by: nil, diversification_level: nil, custom_ranking_info: nil, disable_keyword_match: nil, keyword_match_mode: nil, relevance_threshold: nil) - # Pass arguments to `search_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the tenant to search within. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, - # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant - # is created. For example, "projects/foo". - # @param search_mode [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::SearchMode] - # Mode of a search. - # - # Defaults to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::SearchMode::JOB_SEARCH SearchMode.JOB_SEARCH}. - # @param request_metadata [::Google::Cloud::Talent::V4beta1::RequestMetadata, ::Hash] - # Required. The meta information collected about the job searcher, used to - # improve the search quality of the service. The identifiers (such as - # `user_id`) are provided by users, and must be unique and consistent. - # @param job_query [::Google::Cloud::Talent::V4beta1::JobQuery, ::Hash] - # Query used to search against jobs, such as keyword, location filters, etc. - # @param enable_broadening [::Boolean] - # Controls whether to broaden the search when it produces sparse results. - # Broadened queries append results to the end of the matching results - # list. - # - # Defaults to false. - # @param require_precise_result_size [::Boolean] - # This field is deprecated. - # @param histogram_queries [::Array<::Google::Cloud::Talent::V4beta1::HistogramQuery, ::Hash>] - # An expression specifies a histogram request against matching jobs. - # - # Expression syntax is an aggregation function call with histogram facets and - # other options. - # - # Available aggregation function calls are: - # * `count(string_histogram_facet)`: Count the number of matching entities, - # for each distinct attribute value. - # * `count(numeric_histogram_facet, list of buckets)`: Count the number of - # matching entities within each bucket. - # - # A maximum of 200 histogram buckets are supported. - # - # Data types: - # - # * Histogram facet: facet names with format `[a-zA-Z][a-zA-Z0-9_]+`. - # * String: string like "any string with backslash escape for quote(\")." - # * Number: whole number and floating point number like 10, -1 and -0.01. - # * List: list of elements with comma(,) separator surrounded by square - # brackets, for example, [1, 2, 3] and ["one", "two", "three"]. - # - # Built-in constants: - # - # * MIN (minimum number similar to java Double.MIN_VALUE) - # * MAX (maximum number similar to java Double.MAX_VALUE) - # - # Built-in functions: - # - # * bucket(start, end[, label]): bucket built-in function creates a bucket - # with range of [start, end). Note that the end is exclusive, for example, - # bucket(1, MAX, "positive number") or bucket(1, 10). - # - # Job histogram facets: - # - # * company_display_name: histogram by - # {::Google::Cloud::Talent::V4beta1::Job#company_display_name Job.company_display_name}. - # * employment_type: histogram by - # {::Google::Cloud::Talent::V4beta1::Job#employment_types Job.employment_types}, - # for example, - # "FULL_TIME", "PART_TIME". - # * company_size (DEPRECATED): histogram by - # {::Google::Cloud::Talent::V4beta1::CompanySize CompanySize}, for example, - # "SMALL", "MEDIUM", "BIG". - # * publish_time_in_day: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} - # in days. - # Must specify list of numeric buckets in spec. - # * publish_time_in_month: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} - # in months. - # Must specify list of numeric buckets in spec. - # * publish_time_in_year: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} - # in years. - # Must specify list of numeric buckets in spec. - # * degree_types: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#degree_types Job.degree_types}, for - # example, - # "Bachelors", "Masters". - # * job_level: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#job_level Job.job_level}, for example, - # "Entry - # Level". - # * country: histogram by the country code of jobs, for example, "US", "FR". - # * admin1: histogram by the admin1 code of jobs, which is a global - # placeholder referring to the state, province, or the particular term a - # country uses to define the geographic structure below the country level, - # for example, "CA", "IL". - # * city: histogram by a combination of the "city name, admin1 code". For - # example, "Mountain View, CA", "New York, NY". - # * admin1_country: histogram by a combination of the "admin1 code, country", - # for example, "CA, US", "IL, US". - # * city_coordinate: histogram by the city center's GPS coordinates (latitude - # and longitude), for example, 37.4038522,-122.0987765. Since the - # coordinates of a city center can change, customers may need to refresh - # them periodically. - # * locale: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}, for - # example, "en-US", - # "fr-FR". - # * language: histogram by the language subtag of the - # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}, - # for example, "en", "fr". - # * category: histogram by the - # {::Google::Cloud::Talent::V4beta1::JobCategory JobCategory}, for example, - # "COMPUTER_AND_IT", "HEALTHCARE". - # * base_compensation_unit: histogram by the - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationUnit CompensationInfo.CompensationUnit} - # of base salary, for example, "WEEKLY", "MONTHLY". - # * base_compensation: histogram by the base salary. Must specify list of - # numeric buckets to group results by. - # * annualized_base_compensation: histogram by the base annualized salary. - # Must specify list of numeric buckets to group results by. - # * annualized_total_compensation: histogram by the total annualized salary. - # Must specify list of numeric buckets to group results by. - # * string_custom_attribute: histogram by string - # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes}. - # Values can be accessed via square bracket notations like - # string_custom_attribute["key1"]. - # * numeric_custom_attribute: histogram by numeric - # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes}. - # Values can be accessed via square bracket notations like - # numeric_custom_attribute["key1"]. Must specify list of numeric buckets to - # group results by. - # - # Example expressions: - # - # * `count(admin1)` - # * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000), - # bucket(100000, MAX)])` - # * `count(string_custom_attribute["some-string-custom-attribute"])` - # * `count(numeric_custom_attribute["some-numeric-custom-attribute"], - # [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])` - # @param job_view [::Google::Cloud::Talent::V4beta1::JobView] - # The desired job attributes returned for jobs in the search response. - # Defaults to - # {::Google::Cloud::Talent::V4beta1::JobView::JOB_VIEW_SMALL JobView.JOB_VIEW_SMALL} - # if no value is specified. - # @param offset [::Integer] - # An integer that specifies the current offset (that is, starting result - # location, amongst the jobs deemed by the API as relevant) in search - # results. This field is only considered if - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#page_token page_token} is - # unset. - # - # The maximum allowed value is 5000. Otherwise an error is thrown. - # - # For example, 0 means to return results starting from the first matching - # job, and 10 means to return from the 11th job. This can be used for - # pagination, (for example, pageSize = 10 and offset = 10 means to return - # from the second page). - # @param page_size [::Integer] - # A limit on the number of jobs returned in the search results. - # Increasing this value above the default value of 10 can increase search - # response time. The value can be between 1 and 100. - # @param page_token [::String] - # The token specifying the current offset within - # search results. See - # {::Google::Cloud::Talent::V4beta1::SearchJobsResponse#next_page_token SearchJobsResponse.next_page_token} - # for an explanation of how to obtain the next set of query results. - # @param order_by [::String] - # The criteria determining how search results are sorted. Default is - # `"relevance desc"`. - # - # Supported options are: - # - # * `"relevance desc"`: By relevance descending, as determined by the API - # algorithms. Relevance thresholding of query results is only available - # with this ordering. - # * `"posting_publish_time desc"`: By - # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} - # descending. - # * `"posting_update_time desc"`: By - # {::Google::Cloud::Talent::V4beta1::Job#posting_update_time Job.posting_update_time} - # descending. - # * `"title"`: By {::Google::Cloud::Talent::V4beta1::Job#title Job.title} - # ascending. - # * `"title desc"`: By {::Google::Cloud::Talent::V4beta1::Job#title Job.title} - # descending. - # * `"annualized_base_compensation"`: By job's - # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_base_compensation_range CompensationInfo.annualized_base_compensation_range} - # ascending. Jobs whose annualized base compensation is unspecified are put - # at the end of search results. - # * `"annualized_base_compensation desc"`: By job's - # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_base_compensation_range CompensationInfo.annualized_base_compensation_range} - # descending. Jobs whose annualized base compensation is unspecified are - # put at the end of search results. - # * `"annualized_total_compensation"`: By job's - # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_total_compensation_range CompensationInfo.annualized_total_compensation_range} - # ascending. Jobs whose annualized base compensation is unspecified are put - # at the end of search results. - # * `"annualized_total_compensation desc"`: By job's - # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_total_compensation_range CompensationInfo.annualized_total_compensation_range} - # descending. Jobs whose annualized base compensation is unspecified are - # put at the end of search results. - # * `"custom_ranking desc"`: By the relevance score adjusted to the - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#ranking_expression SearchJobsRequest.CustomRankingInfo.ranking_expression} - # with weight factor assigned by - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#importance_level SearchJobsRequest.CustomRankingInfo.importance_level} - # in descending order. - # * Location sorting: Use the special syntax to order jobs by distance:
- # `"distance_from('Hawaii')"`: Order by distance from Hawaii.
- # `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.
- # `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by - # multiple locations. See details below.
- # `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by - # multiple locations. See details below.
- # The string can have a maximum of 256 characters. When multiple distance - # centers are provided, a job that is close to any of the distance centers - # would have a high rank. When a job has multiple locations, the job - # location closest to one of the distance centers will be used. Jobs that - # don't have locations will be ranked at the bottom. Distance is calculated - # with a precision of 11.3 meters (37.4 feet). Diversification strategy is - # still applied unless explicitly disabled in - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#diversification_level diversification_level}. - # @param diversification_level [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::DiversificationLevel] - # Controls whether highly similar jobs are returned next to each other in - # the search results. Jobs are identified as highly similar based on - # their titles, job categories, and locations. Highly similar results are - # clustered so that only one representative job of the cluster is - # displayed to the job seeker higher up in the results, with the other jobs - # being displayed lower down in the results. - # - # Defaults to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::DiversificationLevel::SIMPLE DiversificationLevel.SIMPLE} - # if no value is specified. - # @param custom_ranking_info [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo, ::Hash] - # Controls over how job documents get ranked on top of existing relevance - # score (determined by API algorithm). - # @param disable_keyword_match [::Boolean] - # This field is deprecated. Please use - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#keyword_match_mode SearchJobsRequest.keyword_match_mode} - # going forward. - # - # To migrate, disable_keyword_match set to false maps to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_ALL KeywordMatchMode.KEYWORD_MATCH_ALL}, - # and disable_keyword_match set to true maps to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_DISABLED KeywordMatchMode.KEYWORD_MATCH_DISABLED}. - # If - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#keyword_match_mode SearchJobsRequest.keyword_match_mode} - # is set, this field is ignored. - # - # Controls whether to disable exact keyword match on - # {::Google::Cloud::Talent::V4beta1::Job#title Job.title}, - # {::Google::Cloud::Talent::V4beta1::Job#description Job.description}, - # {::Google::Cloud::Talent::V4beta1::Job#company_display_name Job.company_display_name}, - # {::Google::Cloud::Talent::V4beta1::Job#addresses Job.addresses}, - # {::Google::Cloud::Talent::V4beta1::Job#qualifications Job.qualifications}. When - # disable keyword match is turned off, a keyword match returns jobs that do - # not match given category filters when there are matching keywords. For - # example, for the query "program manager," a result is returned even if the - # job posting has the title "software developer," which doesn't fall into - # "program manager" ontology, but does have "program manager" appearing in - # its description. - # - # For queries like "cloud" that don't contain title or - # location specific ontology, jobs with "cloud" keyword matches are returned - # regardless of this flag's value. - # - # Use - # {::Google::Cloud::Talent::V4beta1::Company#keyword_searchable_job_custom_attributes Company.keyword_searchable_job_custom_attributes} - # if company-specific globally matched custom field/attribute string values - # are needed. Enabling keyword match improves recall of subsequent search - # requests. - # - # Defaults to false. - # @param keyword_match_mode [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode] - # Controls what keyword match options to use. - # - # Defaults to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_ALL KeywordMatchMode.KEYWORD_MATCH_ALL} - # if no value is specified. - # @param relevance_threshold [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::RelevanceThreshold] - # Optional. The relevance threshold of the search results. - # - # Default to Google defined threshold, leveraging a balance of - # precision and recall to deliver both highly accurate results and - # comprehensive coverage of relevant information. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::SearchJobsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::SearchJobsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::SearchJobsRequest.new - # - # # Call the search_jobs method. - # result = client.search_jobs request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::SearchJobsResponse. - # p result - # - def search_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::SearchJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.search_jobs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.search_jobs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @job_service_stub.search_jobs request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Searches for jobs using the provided - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest SearchJobsRequest}. - # - # This API call is intended for the use case of targeting passive job - # seekers (for example, job seekers who have signed up to receive email - # alerts about potential job opportunities), and has different algorithmic - # adjustments that are targeted to passive job seekers. - # - # This call constrains the - # {::Google::Cloud::Talent::V4beta1::Job#visibility visibility} of jobs present in - # the database, and only returns jobs the caller has permission to search - # against. - # - # @overload search_jobs_for_alert(request, options = nil) - # Pass arguments to `search_jobs_for_alert` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::SearchJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload search_jobs_for_alert(parent: nil, search_mode: nil, request_metadata: nil, job_query: nil, enable_broadening: nil, require_precise_result_size: nil, histogram_queries: nil, job_view: nil, offset: nil, page_size: nil, page_token: nil, order_by: nil, diversification_level: nil, custom_ranking_info: nil, disable_keyword_match: nil, keyword_match_mode: nil, relevance_threshold: nil) - # Pass arguments to `search_jobs_for_alert` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the tenant to search within. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, - # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant - # is created. For example, "projects/foo". - # @param search_mode [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::SearchMode] - # Mode of a search. - # - # Defaults to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::SearchMode::JOB_SEARCH SearchMode.JOB_SEARCH}. - # @param request_metadata [::Google::Cloud::Talent::V4beta1::RequestMetadata, ::Hash] - # Required. The meta information collected about the job searcher, used to - # improve the search quality of the service. The identifiers (such as - # `user_id`) are provided by users, and must be unique and consistent. - # @param job_query [::Google::Cloud::Talent::V4beta1::JobQuery, ::Hash] - # Query used to search against jobs, such as keyword, location filters, etc. - # @param enable_broadening [::Boolean] - # Controls whether to broaden the search when it produces sparse results. - # Broadened queries append results to the end of the matching results - # list. - # - # Defaults to false. - # @param require_precise_result_size [::Boolean] - # This field is deprecated. - # @param histogram_queries [::Array<::Google::Cloud::Talent::V4beta1::HistogramQuery, ::Hash>] - # An expression specifies a histogram request against matching jobs. - # - # Expression syntax is an aggregation function call with histogram facets and - # other options. - # - # Available aggregation function calls are: - # * `count(string_histogram_facet)`: Count the number of matching entities, - # for each distinct attribute value. - # * `count(numeric_histogram_facet, list of buckets)`: Count the number of - # matching entities within each bucket. - # - # A maximum of 200 histogram buckets are supported. - # - # Data types: - # - # * Histogram facet: facet names with format `[a-zA-Z][a-zA-Z0-9_]+`. - # * String: string like "any string with backslash escape for quote(\")." - # * Number: whole number and floating point number like 10, -1 and -0.01. - # * List: list of elements with comma(,) separator surrounded by square - # brackets, for example, [1, 2, 3] and ["one", "two", "three"]. - # - # Built-in constants: - # - # * MIN (minimum number similar to java Double.MIN_VALUE) - # * MAX (maximum number similar to java Double.MAX_VALUE) - # - # Built-in functions: - # - # * bucket(start, end[, label]): bucket built-in function creates a bucket - # with range of [start, end). Note that the end is exclusive, for example, - # bucket(1, MAX, "positive number") or bucket(1, 10). - # - # Job histogram facets: - # - # * company_display_name: histogram by - # {::Google::Cloud::Talent::V4beta1::Job#company_display_name Job.company_display_name}. - # * employment_type: histogram by - # {::Google::Cloud::Talent::V4beta1::Job#employment_types Job.employment_types}, - # for example, - # "FULL_TIME", "PART_TIME". - # * company_size (DEPRECATED): histogram by - # {::Google::Cloud::Talent::V4beta1::CompanySize CompanySize}, for example, - # "SMALL", "MEDIUM", "BIG". - # * publish_time_in_day: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} - # in days. - # Must specify list of numeric buckets in spec. - # * publish_time_in_month: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} - # in months. - # Must specify list of numeric buckets in spec. - # * publish_time_in_year: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} - # in years. - # Must specify list of numeric buckets in spec. - # * degree_types: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#degree_types Job.degree_types}, for - # example, - # "Bachelors", "Masters". - # * job_level: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#job_level Job.job_level}, for example, - # "Entry - # Level". - # * country: histogram by the country code of jobs, for example, "US", "FR". - # * admin1: histogram by the admin1 code of jobs, which is a global - # placeholder referring to the state, province, or the particular term a - # country uses to define the geographic structure below the country level, - # for example, "CA", "IL". - # * city: histogram by a combination of the "city name, admin1 code". For - # example, "Mountain View, CA", "New York, NY". - # * admin1_country: histogram by a combination of the "admin1 code, country", - # for example, "CA, US", "IL, US". - # * city_coordinate: histogram by the city center's GPS coordinates (latitude - # and longitude), for example, 37.4038522,-122.0987765. Since the - # coordinates of a city center can change, customers may need to refresh - # them periodically. - # * locale: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}, for - # example, "en-US", - # "fr-FR". - # * language: histogram by the language subtag of the - # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}, - # for example, "en", "fr". - # * category: histogram by the - # {::Google::Cloud::Talent::V4beta1::JobCategory JobCategory}, for example, - # "COMPUTER_AND_IT", "HEALTHCARE". - # * base_compensation_unit: histogram by the - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationUnit CompensationInfo.CompensationUnit} - # of base salary, for example, "WEEKLY", "MONTHLY". - # * base_compensation: histogram by the base salary. Must specify list of - # numeric buckets to group results by. - # * annualized_base_compensation: histogram by the base annualized salary. - # Must specify list of numeric buckets to group results by. - # * annualized_total_compensation: histogram by the total annualized salary. - # Must specify list of numeric buckets to group results by. - # * string_custom_attribute: histogram by string - # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes}. - # Values can be accessed via square bracket notations like - # string_custom_attribute["key1"]. - # * numeric_custom_attribute: histogram by numeric - # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes}. - # Values can be accessed via square bracket notations like - # numeric_custom_attribute["key1"]. Must specify list of numeric buckets to - # group results by. - # - # Example expressions: - # - # * `count(admin1)` - # * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000), - # bucket(100000, MAX)])` - # * `count(string_custom_attribute["some-string-custom-attribute"])` - # * `count(numeric_custom_attribute["some-numeric-custom-attribute"], - # [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])` - # @param job_view [::Google::Cloud::Talent::V4beta1::JobView] - # The desired job attributes returned for jobs in the search response. - # Defaults to - # {::Google::Cloud::Talent::V4beta1::JobView::JOB_VIEW_SMALL JobView.JOB_VIEW_SMALL} - # if no value is specified. - # @param offset [::Integer] - # An integer that specifies the current offset (that is, starting result - # location, amongst the jobs deemed by the API as relevant) in search - # results. This field is only considered if - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#page_token page_token} is - # unset. - # - # The maximum allowed value is 5000. Otherwise an error is thrown. - # - # For example, 0 means to return results starting from the first matching - # job, and 10 means to return from the 11th job. This can be used for - # pagination, (for example, pageSize = 10 and offset = 10 means to return - # from the second page). - # @param page_size [::Integer] - # A limit on the number of jobs returned in the search results. - # Increasing this value above the default value of 10 can increase search - # response time. The value can be between 1 and 100. - # @param page_token [::String] - # The token specifying the current offset within - # search results. See - # {::Google::Cloud::Talent::V4beta1::SearchJobsResponse#next_page_token SearchJobsResponse.next_page_token} - # for an explanation of how to obtain the next set of query results. - # @param order_by [::String] - # The criteria determining how search results are sorted. Default is - # `"relevance desc"`. - # - # Supported options are: - # - # * `"relevance desc"`: By relevance descending, as determined by the API - # algorithms. Relevance thresholding of query results is only available - # with this ordering. - # * `"posting_publish_time desc"`: By - # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} - # descending. - # * `"posting_update_time desc"`: By - # {::Google::Cloud::Talent::V4beta1::Job#posting_update_time Job.posting_update_time} - # descending. - # * `"title"`: By {::Google::Cloud::Talent::V4beta1::Job#title Job.title} - # ascending. - # * `"title desc"`: By {::Google::Cloud::Talent::V4beta1::Job#title Job.title} - # descending. - # * `"annualized_base_compensation"`: By job's - # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_base_compensation_range CompensationInfo.annualized_base_compensation_range} - # ascending. Jobs whose annualized base compensation is unspecified are put - # at the end of search results. - # * `"annualized_base_compensation desc"`: By job's - # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_base_compensation_range CompensationInfo.annualized_base_compensation_range} - # descending. Jobs whose annualized base compensation is unspecified are - # put at the end of search results. - # * `"annualized_total_compensation"`: By job's - # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_total_compensation_range CompensationInfo.annualized_total_compensation_range} - # ascending. Jobs whose annualized base compensation is unspecified are put - # at the end of search results. - # * `"annualized_total_compensation desc"`: By job's - # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_total_compensation_range CompensationInfo.annualized_total_compensation_range} - # descending. Jobs whose annualized base compensation is unspecified are - # put at the end of search results. - # * `"custom_ranking desc"`: By the relevance score adjusted to the - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#ranking_expression SearchJobsRequest.CustomRankingInfo.ranking_expression} - # with weight factor assigned by - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#importance_level SearchJobsRequest.CustomRankingInfo.importance_level} - # in descending order. - # * Location sorting: Use the special syntax to order jobs by distance:
- # `"distance_from('Hawaii')"`: Order by distance from Hawaii.
- # `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.
- # `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by - # multiple locations. See details below.
- # `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by - # multiple locations. See details below.
- # The string can have a maximum of 256 characters. When multiple distance - # centers are provided, a job that is close to any of the distance centers - # would have a high rank. When a job has multiple locations, the job - # location closest to one of the distance centers will be used. Jobs that - # don't have locations will be ranked at the bottom. Distance is calculated - # with a precision of 11.3 meters (37.4 feet). Diversification strategy is - # still applied unless explicitly disabled in - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#diversification_level diversification_level}. - # @param diversification_level [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::DiversificationLevel] - # Controls whether highly similar jobs are returned next to each other in - # the search results. Jobs are identified as highly similar based on - # their titles, job categories, and locations. Highly similar results are - # clustered so that only one representative job of the cluster is - # displayed to the job seeker higher up in the results, with the other jobs - # being displayed lower down in the results. - # - # Defaults to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::DiversificationLevel::SIMPLE DiversificationLevel.SIMPLE} - # if no value is specified. - # @param custom_ranking_info [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo, ::Hash] - # Controls over how job documents get ranked on top of existing relevance - # score (determined by API algorithm). - # @param disable_keyword_match [::Boolean] - # This field is deprecated. Please use - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#keyword_match_mode SearchJobsRequest.keyword_match_mode} - # going forward. - # - # To migrate, disable_keyword_match set to false maps to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_ALL KeywordMatchMode.KEYWORD_MATCH_ALL}, - # and disable_keyword_match set to true maps to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_DISABLED KeywordMatchMode.KEYWORD_MATCH_DISABLED}. - # If - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#keyword_match_mode SearchJobsRequest.keyword_match_mode} - # is set, this field is ignored. - # - # Controls whether to disable exact keyword match on - # {::Google::Cloud::Talent::V4beta1::Job#title Job.title}, - # {::Google::Cloud::Talent::V4beta1::Job#description Job.description}, - # {::Google::Cloud::Talent::V4beta1::Job#company_display_name Job.company_display_name}, - # {::Google::Cloud::Talent::V4beta1::Job#addresses Job.addresses}, - # {::Google::Cloud::Talent::V4beta1::Job#qualifications Job.qualifications}. When - # disable keyword match is turned off, a keyword match returns jobs that do - # not match given category filters when there are matching keywords. For - # example, for the query "program manager," a result is returned even if the - # job posting has the title "software developer," which doesn't fall into - # "program manager" ontology, but does have "program manager" appearing in - # its description. - # - # For queries like "cloud" that don't contain title or - # location specific ontology, jobs with "cloud" keyword matches are returned - # regardless of this flag's value. - # - # Use - # {::Google::Cloud::Talent::V4beta1::Company#keyword_searchable_job_custom_attributes Company.keyword_searchable_job_custom_attributes} - # if company-specific globally matched custom field/attribute string values - # are needed. Enabling keyword match improves recall of subsequent search - # requests. - # - # Defaults to false. - # @param keyword_match_mode [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode] - # Controls what keyword match options to use. - # - # Defaults to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_ALL KeywordMatchMode.KEYWORD_MATCH_ALL} - # if no value is specified. - # @param relevance_threshold [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::RelevanceThreshold] - # Optional. The relevance threshold of the search results. - # - # Default to Google defined threshold, leveraging a balance of - # precision and recall to deliver both highly accurate results and - # comprehensive coverage of relevant information. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::SearchJobsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::SearchJobsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::SearchJobsRequest.new - # - # # Call the search_jobs_for_alert method. - # result = client.search_jobs_for_alert request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::SearchJobsResponse. - # p result - # - def search_jobs_for_alert request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::SearchJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.search_jobs_for_alert.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.search_jobs_for_alert.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_jobs_for_alert.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @job_service_stub.search_jobs_for_alert request, 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 JobService REST API. - # - # This class represents the configuration for JobService 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::Talent::V4beta1::JobService::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_job to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_job.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_job.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 = "jobs.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 JobService 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_job` - # @return [::Gapic::Config::Method] - # - attr_reader :create_job - ## - # RPC-specific configuration for `batch_create_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_create_jobs - ## - # RPC-specific configuration for `get_job` - # @return [::Gapic::Config::Method] - # - attr_reader :get_job - ## - # RPC-specific configuration for `update_job` - # @return [::Gapic::Config::Method] - # - attr_reader :update_job - ## - # RPC-specific configuration for `batch_update_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_update_jobs - ## - # RPC-specific configuration for `delete_job` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_job - ## - # RPC-specific configuration for `batch_delete_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_delete_jobs - ## - # RPC-specific configuration for `list_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_jobs - ## - # RPC-specific configuration for `search_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :search_jobs - ## - # RPC-specific configuration for `search_jobs_for_alert` - # @return [::Gapic::Config::Method] - # - attr_reader :search_jobs_for_alert - - # @private - def initialize parent_rpcs = nil - create_job_config = parent_rpcs.create_job if parent_rpcs.respond_to? :create_job - @create_job = ::Gapic::Config::Method.new create_job_config - batch_create_jobs_config = parent_rpcs.batch_create_jobs if parent_rpcs.respond_to? :batch_create_jobs - @batch_create_jobs = ::Gapic::Config::Method.new batch_create_jobs_config - get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job - @get_job = ::Gapic::Config::Method.new get_job_config - update_job_config = parent_rpcs.update_job if parent_rpcs.respond_to? :update_job - @update_job = ::Gapic::Config::Method.new update_job_config - batch_update_jobs_config = parent_rpcs.batch_update_jobs if parent_rpcs.respond_to? :batch_update_jobs - @batch_update_jobs = ::Gapic::Config::Method.new batch_update_jobs_config - delete_job_config = parent_rpcs.delete_job if parent_rpcs.respond_to? :delete_job - @delete_job = ::Gapic::Config::Method.new delete_job_config - batch_delete_jobs_config = parent_rpcs.batch_delete_jobs if parent_rpcs.respond_to? :batch_delete_jobs - @batch_delete_jobs = ::Gapic::Config::Method.new batch_delete_jobs_config - list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs - @list_jobs = ::Gapic::Config::Method.new list_jobs_config - search_jobs_config = parent_rpcs.search_jobs if parent_rpcs.respond_to? :search_jobs - @search_jobs = ::Gapic::Config::Method.new search_jobs_config - search_jobs_for_alert_config = parent_rpcs.search_jobs_for_alert if parent_rpcs.respond_to? :search_jobs_for_alert - @search_jobs_for_alert = ::Gapic::Config::Method.new search_jobs_for_alert_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest/operations.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest/operations.rb deleted file mode 100644 index c761a2506531..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_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 Talent - module V4beta1 - module JobService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the JobService 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 JobService 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::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "jobs.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}", - matches: [ - ["name", %r{^operations/?$}, 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: "/v4beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/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-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest/service_stub.rb deleted file mode 100644 index 34c521a34b94..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service/rest/service_stub.rb +++ /dev/null @@ -1,774 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/talent/v4beta1/job_service_pb" - -module Google - module Cloud - module Talent - module V4beta1 - module JobService - module Rest - ## - # REST service stub for the JobService 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_job REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::CreateJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::Job] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::Job] - # A result object deserialized from the server's reply - def create_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_job", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Talent::V4beta1::Job.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the batch_create_jobs REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def batch_create_jobs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_create_jobs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "batch_create_jobs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_job REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::GetJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::Job] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::Job] - # A result object deserialized from the server's reply - def get_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_job", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Talent::V4beta1::Job.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_job REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::UpdateJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::Job] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::Job] - # A result object deserialized from the server's reply - def update_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_job", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Talent::V4beta1::Job.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the batch_update_jobs REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def batch_update_jobs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_update_jobs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "batch_update_jobs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_job REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::DeleteJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_job", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the batch_delete_jobs REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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 batch_delete_jobs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_delete_jobs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "batch_delete_jobs", - 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 list_jobs REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::ListJobsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::ListJobsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::ListJobsResponse] - # A result object deserialized from the server's reply - def list_jobs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_jobs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_jobs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Talent::V4beta1::ListJobsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the search_jobs REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::SearchJobsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::SearchJobsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::SearchJobsResponse] - # A result object deserialized from the server's reply - def search_jobs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_jobs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "search_jobs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Talent::V4beta1::SearchJobsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the search_jobs_for_alert REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::SearchJobsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::SearchJobsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::SearchJobsResponse] - # A result object deserialized from the server's reply - def search_jobs_for_alert request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_jobs_for_alert_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "search_jobs_for_alert", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Talent::V4beta1::SearchJobsResponse.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_job REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::CreateJobRequest] - # 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_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v4beta1/{parent}/jobs", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v4beta1/{parent}/jobs", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_create_jobs REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest] - # 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_create_jobs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v4beta1/{parent}/jobs:batchCreate", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v4beta1/{parent}/jobs:batchCreate", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_job REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::GetJobRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v4beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/tenants/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v4beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_job REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::UpdateJobRequest] - # 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_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v4beta1/{job.name}", - body: "*", - matches: [ - ["job.name", %r{^projects/[^/]+/tenants/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v4beta1/{job.name}", - body: "*", - matches: [ - ["job.name", %r{^projects/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_update_jobs REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest] - # 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_update_jobs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v4beta1/{parent}/jobs:batchUpdate", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v4beta1/{parent}/jobs:batchUpdate", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_job REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::DeleteJobRequest] - # 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_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v4beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/tenants/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v4beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_delete_jobs REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest] - # 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_delete_jobs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v4beta1/{parent}/jobs:batchDelete", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v4beta1/{parent}/jobs:batchDelete", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_jobs REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::ListJobsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_jobs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v4beta1/{parent}/jobs", - matches: [ - ["parent", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v4beta1/{parent}/jobs", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_jobs REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::SearchJobsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_search_jobs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v4beta1/{parent}/jobs:search", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v4beta1/{parent}/jobs:search", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_jobs_for_alert REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::SearchJobsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_search_jobs_for_alert_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v4beta1/{parent}/jobs:searchForAlert", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v4beta1/{parent}/jobs:searchForAlert", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service_pb.rb deleted file mode 100644 index bcf55d37f5ad..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service_pb.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/talent/v4beta1/job_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/talent/v4beta1/common_pb' -require 'google/cloud/talent/v4beta1/filters_pb' -require 'google/cloud/talent/v4beta1/histogram_pb' -require 'google/cloud/talent/v4beta1/job_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n-google/cloud/talent/v4beta1/job_service.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/talent/v4beta1/common.proto\x1a)google/cloud/talent/v4beta1/filters.proto\x1a+google/cloud/talent/v4beta1/histogram.proto\x1a%google/cloud/talent/v4beta1/job.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"w\n\x10\x43reateJobRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17jobs.googleapis.com/Job\x12\x32\n\x03job\x18\x02 \x01(\x0b\x32 .google.cloud.talent.v4beta1.JobB\x03\xe0\x41\x02\">\n\rGetJobRequest\x12-\n\x04name\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\n\x17jobs.googleapis.com/Job\"w\n\x10UpdateJobRequest\x12\x32\n\x03job\x18\x01 \x01(\x0b\x32 .google.cloud.talent.v4beta1.JobB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"A\n\x10\x44\x65leteJobRequest\x12-\n\x04name\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\n\x17jobs.googleapis.com/Job\"^\n\x16\x42\x61tchDeleteJobsRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17jobs.googleapis.com/Job\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xb6\x01\n\x0fListJobsRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17jobs.googleapis.com/Job\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x36\n\x08job_view\x18\x05 \x01(\x0e\x32$.google.cloud.talent.v4beta1.JobView\"\x9c\x01\n\x10ListJobsResponse\x12.\n\x04jobs\x18\x01 \x03(\x0b\x32 .google.cloud.talent.v4beta1.Job\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12?\n\x08metadata\x18\x03 \x01(\x0b\x32-.google.cloud.talent.v4beta1.ResponseMetadata\"\x86\r\n\x11SearchJobsRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17jobs.googleapis.com/Job\x12N\n\x0bsearch_mode\x18\x02 \x01(\x0e\x32\x39.google.cloud.talent.v4beta1.SearchJobsRequest.SearchMode\x12K\n\x10request_metadata\x18\x03 \x01(\x0b\x32,.google.cloud.talent.v4beta1.RequestMetadataB\x03\xe0\x41\x02\x12\x38\n\tjob_query\x18\x04 \x01(\x0b\x32%.google.cloud.talent.v4beta1.JobQuery\x12\x19\n\x11\x65nable_broadening\x18\x05 \x01(\x08\x12\'\n\x1brequire_precise_result_size\x18\x06 \x01(\x08\x42\x02\x18\x01\x12\x46\n\x11histogram_queries\x18\x07 \x03(\x0b\x32+.google.cloud.talent.v4beta1.HistogramQuery\x12\x36\n\x08job_view\x18\x08 \x01(\x0e\x32$.google.cloud.talent.v4beta1.JobView\x12\x0e\n\x06offset\x18\t \x01(\x05\x12\x11\n\tpage_size\x18\n \x01(\x05\x12\x12\n\npage_token\x18\x0b \x01(\t\x12\x10\n\x08order_by\x18\x0c \x01(\t\x12\x62\n\x15\x64iversification_level\x18\r \x01(\x0e\x32\x43.google.cloud.talent.v4beta1.SearchJobsRequest.DiversificationLevel\x12]\n\x13\x63ustom_ranking_info\x18\x0e \x01(\x0b\x32@.google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo\x12\x1d\n\x15\x64isable_keyword_match\x18\x10 \x01(\x08\x12[\n\x12keyword_match_mode\x18\x12 \x01(\x0e\x32?.google.cloud.talent.v4beta1.SearchJobsRequest.KeywordMatchMode\x12\x63\n\x13relevance_threshold\x18\x13 \x01(\x0e\x32\x41.google.cloud.talent.v4beta1.SearchJobsRequest.RelevanceThresholdB\x03\xe0\x41\x01\x1a\x9a\x02\n\x11\x43ustomRankingInfo\x12o\n\x10importance_level\x18\x01 \x01(\x0e\x32P.google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo.ImportanceLevelB\x03\xe0\x41\x02\x12\x1f\n\x12ranking_expression\x18\x02 \x01(\tB\x03\xe0\x41\x02\"s\n\x0fImportanceLevel\x12 \n\x1cIMPORTANCE_LEVEL_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x07\n\x03LOW\x10\x02\x12\x08\n\x04MILD\x10\x03\x12\n\n\x06MEDIUM\x10\x04\x12\x08\n\x04HIGH\x10\x05\x12\x0b\n\x07\x45XTREME\x10\x06\"R\n\nSearchMode\x12\x1b\n\x17SEARCH_MODE_UNSPECIFIED\x10\x00\x12\x0e\n\nJOB_SEARCH\x10\x01\x12\x17\n\x13\x46\x45\x41TURED_JOB_SEARCH\x10\x02\"W\n\x14\x44iversificationLevel\x12%\n!DIVERSIFICATION_LEVEL_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\n\n\x06SIMPLE\x10\x02\"\x87\x01\n\x10KeywordMatchMode\x12\"\n\x1eKEYWORD_MATCH_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16KEYWORD_MATCH_DISABLED\x10\x01\x12\x15\n\x11KEYWORD_MATCH_ALL\x10\x02\x12\x1c\n\x18KEYWORD_MATCH_TITLE_ONLY\x10\x03\"d\n\x12RelevanceThreshold\x12#\n\x1fRELEVANCE_THRESHOLD_UNSPECIFIED\x10\x00\x12\n\n\x06LOWEST\x10\x01\x12\x07\n\x03LOW\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x08\n\x04HIGH\x10\x04\"\xd7\x06\n\x12SearchJobsResponse\x12R\n\rmatching_jobs\x18\x01 \x03(\x0b\x32;.google.cloud.talent.v4beta1.SearchJobsResponse.MatchingJob\x12R\n\x17histogram_query_results\x18\x02 \x03(\x0b\x32\x31.google.cloud.talent.v4beta1.HistogramQueryResult\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12?\n\x10location_filters\x18\x04 \x03(\x0b\x32%.google.cloud.talent.v4beta1.Location\x12\x1c\n\x14\x65stimated_total_size\x18\x05 \x01(\x05\x12\x12\n\ntotal_size\x18\x06 \x01(\x05\x12?\n\x08metadata\x18\x07 \x01(\x0b\x32-.google.cloud.talent.v4beta1.ResponseMetadata\x12\"\n\x1a\x62roadened_query_jobs_count\x18\x08 \x01(\x05\x12I\n\x10spell_correction\x18\t \x01(\x0b\x32/.google.cloud.talent.v4beta1.SpellingCorrection\x1a\xdc\x01\n\x0bMatchingJob\x12-\n\x03job\x18\x01 \x01(\x0b\x32 .google.cloud.talent.v4beta1.Job\x12\x13\n\x0bjob_summary\x18\x02 \x01(\t\x12\x19\n\x11job_title_snippet\x18\x03 \x01(\t\x12\x1b\n\x13search_text_snippet\x18\x04 \x01(\t\x12Q\n\x0c\x63ommute_info\x18\x05 \x01(\x0b\x32;.google.cloud.talent.v4beta1.SearchJobsResponse.CommuteInfo\x1a~\n\x0b\x43ommuteInfo\x12;\n\x0cjob_location\x18\x01 \x01(\x0b\x32%.google.cloud.talent.v4beta1.Location\x12\x32\n\x0ftravel_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"~\n\x16\x42\x61tchCreateJobsRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17jobs.googleapis.com/Job\x12\x33\n\x04jobs\x18\x02 \x03(\x0b\x32 .google.cloud.talent.v4beta1.JobB\x03\xe0\x41\x02\"\xaf\x01\n\x16\x42\x61tchUpdateJobsRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17jobs.googleapis.com/Job\x12\x33\n\x04jobs\x18\x02 \x03(\x0b\x32 .google.cloud.talent.v4beta1.JobB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xc4\x01\n\x12JobOperationResult\x12N\n\x0bjob_results\x18\x01 \x03(\x0b\x32\x39.google.cloud.talent.v4beta1.JobOperationResult.JobResult\x1a^\n\tJobResult\x12-\n\x03job\x18\x01 \x01(\x0b\x32 .google.cloud.talent.v4beta1.Job\x12\"\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status*v\n\x07JobView\x12\x18\n\x14JOB_VIEW_UNSPECIFIED\x10\x00\x12\x14\n\x10JOB_VIEW_ID_ONLY\x10\x01\x12\x14\n\x10JOB_VIEW_MINIMAL\x10\x02\x12\x12\n\x0eJOB_VIEW_SMALL\x10\x03\x12\x11\n\rJOB_VIEW_FULL\x10\x04\x32\xce\x12\n\nJobService\x12\xc9\x01\n\tCreateJob\x12-.google.cloud.talent.v4beta1.CreateJobRequest\x1a .google.cloud.talent.v4beta1.Job\"k\xda\x41\nparent,job\x82\xd3\xe4\x93\x02X\"+/v4beta1/{parent=projects/*/tenants/*}/jobs:\x01*Z&\"!/v4beta1/{parent=projects/*}/jobs:\x01*\x12\x9b\x02\n\x0f\x42\x61tchCreateJobs\x12\x33.google.cloud.talent.v4beta1.BatchCreateJobsRequest\x1a\x1d.google.longrunning.Operation\"\xb3\x01\xca\x41,\n\x12JobOperationResult\x12\x16\x42\x61tchOperationMetadata\xda\x41\x0bparent,jobs\x82\xd3\xe4\x93\x02p\"7/v4beta1/{parent=projects/*/tenants/*}/jobs:batchCreate:\x01*Z2\"-/v4beta1/{parent=projects/*}/jobs:batchCreate:\x01*\x12\xb7\x01\n\x06GetJob\x12*.google.cloud.talent.v4beta1.GetJobRequest\x1a .google.cloud.talent.v4beta1.Job\"_\xda\x41\x04name\x82\xd3\xe4\x93\x02R\x12+/v4beta1/{name=projects/*/tenants/*/jobs/*}Z#\x12!/v4beta1/{name=projects/*/jobs/*}\x12\xca\x01\n\tUpdateJob\x12-.google.cloud.talent.v4beta1.UpdateJobRequest\x1a .google.cloud.talent.v4beta1.Job\"l\xda\x41\x03job\x82\xd3\xe4\x93\x02`2//v4beta1/{job.name=projects/*/tenants/*/jobs/*}:\x01*Z*2%/v4beta1/{job.name=projects/*/jobs/*}:\x01*\x12\x9b\x02\n\x0f\x42\x61tchUpdateJobs\x12\x33.google.cloud.talent.v4beta1.BatchUpdateJobsRequest\x1a\x1d.google.longrunning.Operation\"\xb3\x01\xca\x41,\n\x12JobOperationResult\x12\x16\x42\x61tchOperationMetadata\xda\x41\x0bparent,jobs\x82\xd3\xe4\x93\x02p\"7/v4beta1/{parent=projects/*/tenants/*}/jobs:batchUpdate:\x01*Z2\"-/v4beta1/{parent=projects/*}/jobs:batchUpdate:\x01*\x12\xb3\x01\n\tDeleteJob\x12-.google.cloud.talent.v4beta1.DeleteJobRequest\x1a\x16.google.protobuf.Empty\"_\xda\x41\x04name\x82\xd3\xe4\x93\x02R*+/v4beta1/{name=projects/*/tenants/*/jobs/*}Z#*!/v4beta1/{name=projects/*/jobs/*}\x12\xe4\x01\n\x0f\x42\x61tchDeleteJobs\x12\x33.google.cloud.talent.v4beta1.BatchDeleteJobsRequest\x1a\x16.google.protobuf.Empty\"\x83\x01\xda\x41\rparent,filter\x82\xd3\xe4\x93\x02m\"7/v4beta1/{parent=projects/*/tenants/*}/jobs:batchDelete:\x01*Z/\"-/v4beta1/{parent=projects/*}/jobs:batchDelete\x12\xd1\x01\n\x08ListJobs\x12,.google.cloud.talent.v4beta1.ListJobsRequest\x1a-.google.cloud.talent.v4beta1.ListJobsResponse\"h\xda\x41\rparent,filter\x82\xd3\xe4\x93\x02R\x12+/v4beta1/{parent=projects/*/tenants/*}/jobsZ#\x12!/v4beta1/{parent=projects/*}/jobs\x12\xdb\x01\n\nSearchJobs\x12..google.cloud.talent.v4beta1.SearchJobsRequest\x1a/.google.cloud.talent.v4beta1.SearchJobsResponse\"l\x82\xd3\xe4\x93\x02\x66\"2/v4beta1/{parent=projects/*/tenants/*}/jobs:search:\x01*Z-\"(/v4beta1/{parent=projects/*}/jobs:search:\x01*\x12\xf3\x01\n\x12SearchJobsForAlert\x12..google.cloud.talent.v4beta1.SearchJobsRequest\x1a/.google.cloud.talent.v4beta1.SearchJobsResponse\"|\x82\xd3\xe4\x93\x02v\":/v4beta1/{parent=projects/*/tenants/*}/jobs:searchForAlert:\x01*Z5\"0/v4beta1/{parent=projects/*}/jobs:searchForAlert:\x01*\x1al\xca\x41\x13jobs.googleapis.com\xd2\x41Shttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobsBs\n\x1f\x63om.google.cloud.talent.v4beta1B\x0fJobServiceProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Talent - module V4beta1 - CreateJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CreateJobRequest").msgclass - GetJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.GetJobRequest").msgclass - UpdateJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.UpdateJobRequest").msgclass - DeleteJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.DeleteJobRequest").msgclass - BatchDeleteJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.BatchDeleteJobsRequest").msgclass - ListJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.ListJobsRequest").msgclass - ListJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.ListJobsResponse").msgclass - SearchJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.SearchJobsRequest").msgclass - SearchJobsRequest::CustomRankingInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo").msgclass - SearchJobsRequest::CustomRankingInfo::ImportanceLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo.ImportanceLevel").enummodule - SearchJobsRequest::SearchMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.SearchJobsRequest.SearchMode").enummodule - SearchJobsRequest::DiversificationLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.SearchJobsRequest.DiversificationLevel").enummodule - SearchJobsRequest::KeywordMatchMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.SearchJobsRequest.KeywordMatchMode").enummodule - SearchJobsRequest::RelevanceThreshold = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.SearchJobsRequest.RelevanceThreshold").enummodule - SearchJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.SearchJobsResponse").msgclass - SearchJobsResponse::MatchingJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.SearchJobsResponse.MatchingJob").msgclass - SearchJobsResponse::CommuteInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.SearchJobsResponse.CommuteInfo").msgclass - BatchCreateJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.BatchCreateJobsRequest").msgclass - BatchUpdateJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.BatchUpdateJobsRequest").msgclass - JobOperationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.JobOperationResult").msgclass - JobOperationResult::JobResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.JobOperationResult.JobResult").msgclass - JobView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.JobView").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service_services_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service_services_pb.rb deleted file mode 100644 index 27cb94167602..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/job_service_services_pb.rb +++ /dev/null @@ -1,90 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/talent/v4beta1/job_service.proto for package 'google.cloud.talent.v4beta1' -# 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/talent/v4beta1/job_service_pb' - -module Google - module Cloud - module Talent - module V4beta1 - module JobService - # A service handles job management, including job CRUD, enumeration and search. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.talent.v4beta1.JobService' - - # Creates a new job. - # - # Typically, the job becomes searchable within 10 seconds, but it may take - # up to 5 minutes. - rpc :CreateJob, ::Google::Cloud::Talent::V4beta1::CreateJobRequest, ::Google::Cloud::Talent::V4beta1::Job - # Begins executing a batch create jobs operation. - rpc :BatchCreateJobs, ::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest, ::Google::Longrunning::Operation - # Retrieves the specified job, whose status is OPEN or recently EXPIRED - # within the last 90 days. - rpc :GetJob, ::Google::Cloud::Talent::V4beta1::GetJobRequest, ::Google::Cloud::Talent::V4beta1::Job - # Updates specified job. - # - # Typically, updated contents become visible in search results within 10 - # seconds, but it may take up to 5 minutes. - rpc :UpdateJob, ::Google::Cloud::Talent::V4beta1::UpdateJobRequest, ::Google::Cloud::Talent::V4beta1::Job - # Begins executing a batch update jobs operation. - rpc :BatchUpdateJobs, ::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest, ::Google::Longrunning::Operation - # Deletes the specified job. - # - # Typically, the job becomes unsearchable within 10 seconds, but it may take - # up to 5 minutes. - rpc :DeleteJob, ::Google::Cloud::Talent::V4beta1::DeleteJobRequest, ::Google::Protobuf::Empty - # Deletes a list of [Job][google.cloud.talent.v4beta1.Job]s by filter. - rpc :BatchDeleteJobs, ::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest, ::Google::Protobuf::Empty - # Lists jobs by filter. - rpc :ListJobs, ::Google::Cloud::Talent::V4beta1::ListJobsRequest, ::Google::Cloud::Talent::V4beta1::ListJobsResponse - # Searches for jobs using the provided - # [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest]. - # - # This call constrains the - # [visibility][google.cloud.talent.v4beta1.Job.visibility] of jobs present in - # the database, and only returns jobs that the caller has permission to - # search against. - rpc :SearchJobs, ::Google::Cloud::Talent::V4beta1::SearchJobsRequest, ::Google::Cloud::Talent::V4beta1::SearchJobsResponse - # Searches for jobs using the provided - # [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest]. - # - # This API call is intended for the use case of targeting passive job - # seekers (for example, job seekers who have signed up to receive email - # alerts about potential job opportunities), and has different algorithmic - # adjustments that are targeted to passive job seekers. - # - # This call constrains the - # [visibility][google.cloud.talent.v4beta1.Job.visibility] of jobs present in - # the database, and only returns jobs the caller has permission to search - # against. - rpc :SearchJobsForAlert, ::Google::Cloud::Talent::V4beta1::SearchJobsRequest, ::Google::Cloud::Talent::V4beta1::SearchJobsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/rest.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/rest.rb deleted file mode 100644 index c4ff5205d5b6..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/rest.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! - -require "google/cloud/talent/v4beta1/company_service/rest" -require "google/cloud/talent/v4beta1/completion/rest" -require "google/cloud/talent/v4beta1/event_service/rest" -require "google/cloud/talent/v4beta1/job_service/rest" -require "google/cloud/talent/v4beta1/tenant_service/rest" -require "google/cloud/talent/v4beta1/version" - -module Google - module Cloud - module Talent - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/talent/v4beta1/rest" - # client = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new - # - module V4beta1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_pb.rb deleted file mode 100644 index e31d7d239794..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/talent/v4beta1/tenant.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n(google/cloud/talent/v4beta1/tenant.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc3\x02\n\x06Tenant\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0b\x65xternal_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\nusage_type\x18\x03 \x01(\x0e\x32\x31.google.cloud.talent.v4beta1.Tenant.DataUsageType\x12\x34\n,keyword_searchable_profile_custom_attributes\x18\x04 \x03(\t\"N\n\rDataUsageType\x12\x1f\n\x1b\x44\x41TA_USAGE_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nAGGREGATED\x10\x01\x12\x0c\n\x08ISOLATED\x10\x02:D\xea\x41\x41\n\x1ajobs.googleapis.com/Tenant\x12#projects/{project}/tenants/{tenant}Bw\n\x1f\x63om.google.cloud.talent.v4beta1B\x13TenantResourceProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Talent - module V4beta1 - Tenant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Tenant").msgclass - Tenant::DataUsageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Tenant.DataUsageType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service.rb deleted file mode 100644 index 5edb4c257b75..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service.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/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/talent/v4beta1/version" - -require "google/cloud/talent/v4beta1/tenant_service/credentials" -require "google/cloud/talent/v4beta1/tenant_service/paths" -require "google/cloud/talent/v4beta1/tenant_service/client" -require "google/cloud/talent/v4beta1/tenant_service/rest" - -module Google - module Cloud - module Talent - module V4beta1 - ## - # A service that handles tenant management, including CRUD and enumeration. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/talent/v4beta1/tenant_service" - # client = ::Google::Cloud::Talent::V4beta1::TenantService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/talent/v4beta1/tenant_service/rest" - # client = ::Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new - # - module TenantService - end - end - end - end -end - -helper_path = ::File.join __dir__, "tenant_service", "helpers.rb" -require "google/cloud/talent/v4beta1/tenant_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/client.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/client.rb deleted file mode 100644 index 49716d04c024..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/client.rb +++ /dev/null @@ -1,899 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/talent/v4beta1/tenant_service_pb" - -module Google - module Cloud - module Talent - module V4beta1 - module TenantService - ## - # Client for the TenantService service. - # - # A service that handles tenant management, including CRUD and enumeration. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :tenant_service_stub - - ## - # Configure the TenantService Client class. - # - # See {::Google::Cloud::Talent::V4beta1::TenantService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TenantService clients - # ::Google::Cloud::Talent::V4beta1::TenantService::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", "Talent", "V4beta1"] - 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_tenant.timeout = 30.0 - - default_config.rpcs.get_tenant.timeout = 30.0 - default_config.rpcs.get_tenant.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_tenant.timeout = 30.0 - - default_config.rpcs.delete_tenant.timeout = 30.0 - default_config.rpcs.delete_tenant.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_tenants.timeout = 30.0 - default_config.rpcs.list_tenants.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TenantService 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::Talent::V4beta1::TenantService::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 - @tenant_service_stub.universe_domain - end - - ## - # Create a new TenantService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Talent::V4beta1::TenantService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Talent::V4beta1::TenantService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TenantService 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/talent/v4beta1/tenant_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 - - @tenant_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Talent::V4beta1::TenantService::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 - ) - - @tenant_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 - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @tenant_service_stub.logger - end - - # Service calls - - ## - # Creates a new tenant entity. - # - # @overload create_tenant(request, options = nil) - # Pass arguments to `create_tenant` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::CreateTenantRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::CreateTenantRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_tenant(parent: nil, tenant: nil) - # Pass arguments to `create_tenant` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the project under which the tenant is created. - # - # The format is "projects/\\{project_id}", for example, - # "projects/foo". - # @param tenant [::Google::Cloud::Talent::V4beta1::Tenant, ::Hash] - # Required. The tenant to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Talent::V4beta1::Tenant] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Talent::V4beta1::Tenant] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::TenantService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::CreateTenantRequest.new - # - # # Call the create_tenant method. - # result = client.create_tenant request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::Tenant. - # p result - # - def create_tenant request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::CreateTenantRequest - - # Converts hash and nil to 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_tenant.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_tenant.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_tenant.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tenant_service_stub.call_rpc :create_tenant, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves specified tenant. - # - # @overload get_tenant(request, options = nil) - # Pass arguments to `get_tenant` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::GetTenantRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::GetTenantRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_tenant(name: nil) - # Pass arguments to `get_tenant` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the tenant to be retrieved. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, - # "projects/foo/tenants/bar". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Talent::V4beta1::Tenant] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Talent::V4beta1::Tenant] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::TenantService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::GetTenantRequest.new - # - # # Call the get_tenant method. - # result = client.get_tenant request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::Tenant. - # p result - # - def get_tenant request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::GetTenantRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_tenant.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_tenant.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_tenant.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tenant_service_stub.call_rpc :get_tenant, request, 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 specified tenant. - # - # @overload update_tenant(request, options = nil) - # Pass arguments to `update_tenant` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::UpdateTenantRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::UpdateTenantRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_tenant(tenant: nil, update_mask: nil) - # Pass arguments to `update_tenant` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param tenant [::Google::Cloud::Talent::V4beta1::Tenant, ::Hash] - # Required. The tenant resource to replace the current resource in the - # system. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Strongly recommended for the best service experience. - # - # If - # {::Google::Cloud::Talent::V4beta1::UpdateTenantRequest#update_mask update_mask} - # is provided, only the specified fields in - # {::Google::Cloud::Talent::V4beta1::UpdateTenantRequest#tenant tenant} are - # updated. Otherwise all the fields are updated. - # - # A field mask to specify the tenant fields to be updated. Only - # top level fields of {::Google::Cloud::Talent::V4beta1::Tenant Tenant} are - # supported. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Talent::V4beta1::Tenant] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Talent::V4beta1::Tenant] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::TenantService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::UpdateTenantRequest.new - # - # # Call the update_tenant method. - # result = client.update_tenant request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::Tenant. - # p result - # - def update_tenant request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::UpdateTenantRequest - - # Converts hash and nil to 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_tenant.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.tenant&.name - header_params["tenant.name"] = request.tenant.name - end - - request_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_tenant.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_tenant.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tenant_service_stub.call_rpc :update_tenant, request, 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 specified tenant. - # - # @overload delete_tenant(request, options = nil) - # Pass arguments to `delete_tenant` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::DeleteTenantRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::DeleteTenantRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_tenant(name: nil) - # Pass arguments to `delete_tenant` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the tenant to be deleted. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, - # "projects/foo/tenants/bar". - # - # @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/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::TenantService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::DeleteTenantRequest.new - # - # # Call the delete_tenant method. - # result = client.delete_tenant request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_tenant request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::DeleteTenantRequest - - # Converts hash and nil to 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_tenant.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_tenant.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_tenant.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tenant_service_stub.call_rpc :delete_tenant, request, 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 tenants associated with the project. - # - # @overload list_tenants(request, options = nil) - # Pass arguments to `list_tenants` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::ListTenantsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::ListTenantsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_tenants(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_tenants` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the project under which the tenant is created. - # - # The format is "projects/\\{project_id}", for example, - # "projects/foo". - # @param page_token [::String] - # The starting indicator from which to return results. - # @param page_size [::Integer] - # The maximum number of tenants to be returned, at most 100. - # Default is 100 if a non-positive number is provided. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Tenant>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Tenant>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::TenantService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::ListTenantsRequest.new - # - # # Call the list_tenants method. - # result = client.list_tenants request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Talent::V4beta1::Tenant. - # p item - # end - # - def list_tenants request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::ListTenantsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_tenants.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_tenants.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_tenants.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tenant_service_stub.call_rpc :list_tenants, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @tenant_service_stub, :list_tenants, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the TenantService API. - # - # This class represents the configuration for TenantService, - # 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::Talent::V4beta1::TenantService::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_tenant to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Talent::V4beta1::TenantService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_tenant.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Talent::V4beta1::TenantService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_tenant.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::Talent::V4beta1::TenantService::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 = "jobs.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 TenantService 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_tenant` - # @return [::Gapic::Config::Method] - # - attr_reader :create_tenant - ## - # RPC-specific configuration for `get_tenant` - # @return [::Gapic::Config::Method] - # - attr_reader :get_tenant - ## - # RPC-specific configuration for `update_tenant` - # @return [::Gapic::Config::Method] - # - attr_reader :update_tenant - ## - # RPC-specific configuration for `delete_tenant` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_tenant - ## - # RPC-specific configuration for `list_tenants` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tenants - - # @private - def initialize parent_rpcs = nil - create_tenant_config = parent_rpcs.create_tenant if parent_rpcs.respond_to? :create_tenant - @create_tenant = ::Gapic::Config::Method.new create_tenant_config - get_tenant_config = parent_rpcs.get_tenant if parent_rpcs.respond_to? :get_tenant - @get_tenant = ::Gapic::Config::Method.new get_tenant_config - update_tenant_config = parent_rpcs.update_tenant if parent_rpcs.respond_to? :update_tenant - @update_tenant = ::Gapic::Config::Method.new update_tenant_config - delete_tenant_config = parent_rpcs.delete_tenant if parent_rpcs.respond_to? :delete_tenant - @delete_tenant = ::Gapic::Config::Method.new delete_tenant_config - list_tenants_config = parent_rpcs.list_tenants if parent_rpcs.respond_to? :list_tenants - @list_tenants = ::Gapic::Config::Method.new list_tenants_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/credentials.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/credentials.rb deleted file mode 100644 index 7d5457070044..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/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 Talent - module V4beta1 - module TenantService - # Credentials for the TenantService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/jobs" - ] - self.env_vars = [ - "TALENT_CREDENTIALS", - "TALENT_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "TALENT_CREDENTIALS_JSON", - "TALENT_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-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/paths.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/paths.rb deleted file mode 100644 index 8e720c2b714d..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/paths.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 Talent - module V4beta1 - module TenantService - # Path helper methods for the TenantService API. - module Paths - ## - # 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 Tenant resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/tenants/{tenant}` - # - # @param project [String] - # @param tenant [String] - # - # @return [::String] - def tenant_path project:, tenant: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/tenants/#{tenant}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/rest.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/rest.rb deleted file mode 100644 index 7171b337cbab..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/rest.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 "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/talent/v4beta1/version" - -require "google/cloud/talent/v4beta1/tenant_service/credentials" -require "google/cloud/talent/v4beta1/tenant_service/paths" -require "google/cloud/talent/v4beta1/tenant_service/rest/client" - -module Google - module Cloud - module Talent - module V4beta1 - ## - # A service that handles tenant management, including CRUD and enumeration. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/talent/v4beta1/tenant_service/rest" - # client = ::Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new - # - module TenantService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/talent/v4beta1/tenant_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/rest/client.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/rest/client.rb deleted file mode 100644 index be540584dba9..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/rest/client.rb +++ /dev/null @@ -1,821 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/talent/v4beta1/tenant_service_pb" -require "google/cloud/talent/v4beta1/tenant_service/rest/service_stub" - -module Google - module Cloud - module Talent - module V4beta1 - module TenantService - module Rest - ## - # REST client for the TenantService service. - # - # A service that handles tenant management, including CRUD and enumeration. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :tenant_service_stub - - ## - # Configure the TenantService Client class. - # - # See {::Google::Cloud::Talent::V4beta1::TenantService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TenantService clients - # ::Google::Cloud::Talent::V4beta1::TenantService::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", "Talent", "V4beta1"] - 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_tenant.timeout = 30.0 - - default_config.rpcs.get_tenant.timeout = 30.0 - default_config.rpcs.get_tenant.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_tenant.timeout = 30.0 - - default_config.rpcs.delete_tenant.timeout = 30.0 - default_config.rpcs.delete_tenant.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_tenants.timeout = 30.0 - default_config.rpcs.list_tenants.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TenantService 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::Talent::V4beta1::TenantService::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 - @tenant_service_stub.universe_domain - end - - ## - # Create a new TenantService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TenantService 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 - - @tenant_service_stub = ::Google::Cloud::Talent::V4beta1::TenantService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @tenant_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 - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @tenant_service_stub.logger - end - - # Service calls - - ## - # Creates a new tenant entity. - # - # @overload create_tenant(request, options = nil) - # Pass arguments to `create_tenant` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::CreateTenantRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::CreateTenantRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_tenant(parent: nil, tenant: nil) - # Pass arguments to `create_tenant` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the project under which the tenant is created. - # - # The format is "projects/\\{project_id}", for example, - # "projects/foo". - # @param tenant [::Google::Cloud::Talent::V4beta1::Tenant, ::Hash] - # Required. The tenant to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::Tenant] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::Tenant] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::CreateTenantRequest.new - # - # # Call the create_tenant method. - # result = client.create_tenant request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::Tenant. - # p result - # - def create_tenant request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::CreateTenantRequest - - # Converts hash and nil to an 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_tenant.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_tenant.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_tenant.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tenant_service_stub.create_tenant request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves specified tenant. - # - # @overload get_tenant(request, options = nil) - # Pass arguments to `get_tenant` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::GetTenantRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::GetTenantRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_tenant(name: nil) - # Pass arguments to `get_tenant` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the tenant to be retrieved. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, - # "projects/foo/tenants/bar". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::Tenant] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::Tenant] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::GetTenantRequest.new - # - # # Call the get_tenant method. - # result = client.get_tenant request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::Tenant. - # p result - # - def get_tenant request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::GetTenantRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_tenant.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_tenant.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_tenant.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tenant_service_stub.get_tenant request, 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 specified tenant. - # - # @overload update_tenant(request, options = nil) - # Pass arguments to `update_tenant` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::UpdateTenantRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::UpdateTenantRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_tenant(tenant: nil, update_mask: nil) - # Pass arguments to `update_tenant` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param tenant [::Google::Cloud::Talent::V4beta1::Tenant, ::Hash] - # Required. The tenant resource to replace the current resource in the - # system. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Strongly recommended for the best service experience. - # - # If - # {::Google::Cloud::Talent::V4beta1::UpdateTenantRequest#update_mask update_mask} - # is provided, only the specified fields in - # {::Google::Cloud::Talent::V4beta1::UpdateTenantRequest#tenant tenant} are - # updated. Otherwise all the fields are updated. - # - # A field mask to specify the tenant fields to be updated. Only - # top level fields of {::Google::Cloud::Talent::V4beta1::Tenant Tenant} are - # supported. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::Tenant] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::Tenant] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::UpdateTenantRequest.new - # - # # Call the update_tenant method. - # result = client.update_tenant request - # - # # The returned object is of type Google::Cloud::Talent::V4beta1::Tenant. - # p result - # - def update_tenant request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::UpdateTenantRequest - - # Converts hash and nil to an 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_tenant.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_tenant.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_tenant.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tenant_service_stub.update_tenant request, 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 specified tenant. - # - # @overload delete_tenant(request, options = nil) - # Pass arguments to `delete_tenant` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::DeleteTenantRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::DeleteTenantRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_tenant(name: nil) - # Pass arguments to `delete_tenant` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the tenant to be deleted. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, - # "projects/foo/tenants/bar". - # @yield [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/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::DeleteTenantRequest.new - # - # # Call the delete_tenant method. - # result = client.delete_tenant request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_tenant request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::DeleteTenantRequest - - # Converts hash and nil to an 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_tenant.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_tenant.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_tenant.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tenant_service_stub.delete_tenant request, 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 tenants associated with the project. - # - # @overload list_tenants(request, options = nil) - # Pass arguments to `list_tenants` via a request object, either of type - # {::Google::Cloud::Talent::V4beta1::ListTenantsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Talent::V4beta1::ListTenantsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_tenants(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_tenants` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the project under which the tenant is created. - # - # The format is "projects/\\{project_id}", for example, - # "projects/foo". - # @param page_token [::String] - # The starting indicator from which to return results. - # @param page_size [::Integer] - # The maximum number of tenants to be returned, at most 100. - # Default is 100 if a non-positive number is provided. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Tenant>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Tenant>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/talent/v4beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Talent::V4beta1::ListTenantsRequest.new - # - # # Call the list_tenants method. - # result = client.list_tenants request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Talent::V4beta1::Tenant. - # p item - # end - # - def list_tenants request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::ListTenantsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_tenants.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_tenants.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_tenants.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tenant_service_stub.list_tenants request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @tenant_service_stub, :list_tenants, "tenants", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the TenantService REST API. - # - # This class represents the configuration for TenantService 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::Talent::V4beta1::TenantService::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_tenant to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_tenant.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_tenant.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 = "jobs.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 TenantService 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_tenant` - # @return [::Gapic::Config::Method] - # - attr_reader :create_tenant - ## - # RPC-specific configuration for `get_tenant` - # @return [::Gapic::Config::Method] - # - attr_reader :get_tenant - ## - # RPC-specific configuration for `update_tenant` - # @return [::Gapic::Config::Method] - # - attr_reader :update_tenant - ## - # RPC-specific configuration for `delete_tenant` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_tenant - ## - # RPC-specific configuration for `list_tenants` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tenants - - # @private - def initialize parent_rpcs = nil - create_tenant_config = parent_rpcs.create_tenant if parent_rpcs.respond_to? :create_tenant - @create_tenant = ::Gapic::Config::Method.new create_tenant_config - get_tenant_config = parent_rpcs.get_tenant if parent_rpcs.respond_to? :get_tenant - @get_tenant = ::Gapic::Config::Method.new get_tenant_config - update_tenant_config = parent_rpcs.update_tenant if parent_rpcs.respond_to? :update_tenant - @update_tenant = ::Gapic::Config::Method.new update_tenant_config - delete_tenant_config = parent_rpcs.delete_tenant if parent_rpcs.respond_to? :delete_tenant - @delete_tenant = ::Gapic::Config::Method.new delete_tenant_config - list_tenants_config = parent_rpcs.list_tenants if parent_rpcs.respond_to? :list_tenants - @list_tenants = ::Gapic::Config::Method.new list_tenants_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/rest/service_stub.rb deleted file mode 100644 index 8c0daaca6a92..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service/rest/service_stub.rb +++ /dev/null @@ -1,388 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/talent/v4beta1/tenant_service_pb" - -module Google - module Cloud - module Talent - module V4beta1 - module TenantService - module Rest - ## - # REST service stub for the TenantService 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_tenant REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::CreateTenantRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::Tenant] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::Tenant] - # A result object deserialized from the server's reply - def create_tenant request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_tenant_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_tenant", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Talent::V4beta1::Tenant.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_tenant REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::GetTenantRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::Tenant] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::Tenant] - # A result object deserialized from the server's reply - def get_tenant request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_tenant_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_tenant", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Talent::V4beta1::Tenant.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_tenant REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::UpdateTenantRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::Tenant] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::Tenant] - # A result object deserialized from the server's reply - def update_tenant request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_tenant_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_tenant", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Talent::V4beta1::Tenant.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_tenant REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::DeleteTenantRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_tenant request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_tenant_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_tenant", - 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 list_tenants REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::ListTenantsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Talent::V4beta1::ListTenantsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Talent::V4beta1::ListTenantsResponse] - # A result object deserialized from the server's reply - def list_tenants request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_tenants_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_tenants", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Talent::V4beta1::ListTenantsResponse.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_tenant REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::CreateTenantRequest] - # 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_tenant_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v4beta1/{parent}/tenants", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_tenant REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::GetTenantRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_tenant_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v4beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_tenant REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::UpdateTenantRequest] - # 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_tenant_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v4beta1/{tenant.name}", - body: "*", - matches: [ - ["tenant.name", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_tenant REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::DeleteTenantRequest] - # 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_tenant_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v4beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/tenants/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_tenants REST call - # - # @param request_pb [::Google::Cloud::Talent::V4beta1::ListTenantsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_tenants_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v4beta1/{parent}/tenants", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service_pb.rb deleted file mode 100644 index 93cd521880c0..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/talent/v4beta1/tenant_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/talent/v4beta1/common_pb' -require 'google/cloud/talent/v4beta1/tenant_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n0google/cloud/talent/v4beta1/tenant_service.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/talent/v4beta1/common.proto\x1a(google/cloud/talent/v4beta1/tenant.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x94\x01\n\x13\x43reateTenantRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x38\n\x06tenant\x18\x02 \x01(\x0b\x32#.google.cloud.talent.v4beta1.TenantB\x03\xe0\x41\x02\"D\n\x10GetTenantRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1ajobs.googleapis.com/Tenant\"\x80\x01\n\x13UpdateTenantRequest\x12\x38\n\x06tenant\x18\x01 \x01(\x0b\x32#.google.cloud.talent.v4beta1.TenantB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"G\n\x13\x44\x65leteTenantRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1ajobs.googleapis.com/Tenant\"\x80\x01\n\x12ListTenantsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\xa5\x01\n\x13ListTenantsResponse\x12\x34\n\x07tenants\x18\x01 \x03(\x0b\x32#.google.cloud.talent.v4beta1.Tenant\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12?\n\x08metadata\x18\x03 \x01(\x0b\x32-.google.cloud.talent.v4beta1.ResponseMetadata2\xa0\x07\n\rTenantService\x12\xa6\x01\n\x0c\x43reateTenant\x12\x30.google.cloud.talent.v4beta1.CreateTenantRequest\x1a#.google.cloud.talent.v4beta1.Tenant\"?\xda\x41\rparent,tenant\x82\xd3\xe4\x93\x02)\"$/v4beta1/{parent=projects/*}/tenants:\x01*\x12\x94\x01\n\tGetTenant\x12-.google.cloud.talent.v4beta1.GetTenantRequest\x1a#.google.cloud.talent.v4beta1.Tenant\"3\xda\x41\x04name\x82\xd3\xe4\x93\x02&\x12$/v4beta1/{name=projects/*/tenants/*}\x12\xa6\x01\n\x0cUpdateTenant\x12\x30.google.cloud.talent.v4beta1.UpdateTenantRequest\x1a#.google.cloud.talent.v4beta1.Tenant\"?\xda\x41\x06tenant\x82\xd3\xe4\x93\x02\x30\x32+/v4beta1/{tenant.name=projects/*/tenants/*}:\x01*\x12\x8d\x01\n\x0c\x44\x65leteTenant\x12\x30.google.cloud.talent.v4beta1.DeleteTenantRequest\x1a\x16.google.protobuf.Empty\"3\xda\x41\x04name\x82\xd3\xe4\x93\x02&*$/v4beta1/{name=projects/*/tenants/*}\x12\xa7\x01\n\x0bListTenants\x12/.google.cloud.talent.v4beta1.ListTenantsRequest\x1a\x30.google.cloud.talent.v4beta1.ListTenantsResponse\"5\xda\x41\x06parent\x82\xd3\xe4\x93\x02&\x12$/v4beta1/{parent=projects/*}/tenants\x1al\xca\x41\x13jobs.googleapis.com\xd2\x41Shttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobsBv\n\x1f\x63om.google.cloud.talent.v4beta1B\x12TenantServiceProtoP\x01Z7cloud.google.com/go/talent/apiv4beta1/talentpb;talentpb\xa2\x02\x03\x43TSb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Talent - module V4beta1 - CreateTenantRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CreateTenantRequest").msgclass - GetTenantRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.GetTenantRequest").msgclass - UpdateTenantRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.UpdateTenantRequest").msgclass - DeleteTenantRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.DeleteTenantRequest").msgclass - ListTenantsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.ListTenantsRequest").msgclass - ListTenantsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.ListTenantsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service_services_pb.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service_services_pb.rb deleted file mode 100644 index 39df63566326..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/tenant_service_services_pb.rb +++ /dev/null @@ -1,53 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/talent/v4beta1/tenant_service.proto for package 'google.cloud.talent.v4beta1' -# 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/talent/v4beta1/tenant_service_pb' - -module Google - module Cloud - module Talent - module V4beta1 - module TenantService - # A service that handles tenant management, including CRUD and enumeration. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.talent.v4beta1.TenantService' - - # Creates a new tenant entity. - rpc :CreateTenant, ::Google::Cloud::Talent::V4beta1::CreateTenantRequest, ::Google::Cloud::Talent::V4beta1::Tenant - # Retrieves specified tenant. - rpc :GetTenant, ::Google::Cloud::Talent::V4beta1::GetTenantRequest, ::Google::Cloud::Talent::V4beta1::Tenant - # Updates specified tenant. - rpc :UpdateTenant, ::Google::Cloud::Talent::V4beta1::UpdateTenantRequest, ::Google::Cloud::Talent::V4beta1::Tenant - # Deletes specified tenant. - rpc :DeleteTenant, ::Google::Cloud::Talent::V4beta1::DeleteTenantRequest, ::Google::Protobuf::Empty - # Lists all tenants associated with the project. - rpc :ListTenants, ::Google::Cloud::Talent::V4beta1::ListTenantsRequest, ::Google::Cloud::Talent::V4beta1::ListTenantsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/version.rb b/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/version.rb deleted file mode 100644 index aacd2f027ae5..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/lib/google/cloud/talent/v4beta1/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 Talent - module V4beta1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/README.md deleted file mode 100644 index 287a6b375f8f..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Talent Solution V4beta1 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-talent-v4beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # 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. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - # - # Example: - # - # 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 - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # 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 - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # 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 - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/common.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/common.rb deleted file mode 100644 index cea1d3a59a72..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/common.rb +++ /dev/null @@ -1,955 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Talent - module V4beta1 - # Message representing a period of time between two timestamps. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Begin of the period (inclusive). - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # End of the period (exclusive). - class TimestampRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A resource that represents a location with full geographic information. - # @!attribute [rw] location_type - # @return [::Google::Cloud::Talent::V4beta1::Location::LocationType] - # The type of a location, which corresponds to the address lines field of - # {::Google::Type::PostalAddress google.type.PostalAddress}. For example, - # "Downtown, Atlanta, GA, USA" has a type of - # {::Google::Cloud::Talent::V4beta1::Location::LocationType::NEIGHBORHOOD LocationType.NEIGHBORHOOD}, - # and "Kansas City, KS, USA" has a type of - # {::Google::Cloud::Talent::V4beta1::Location::LocationType::LOCALITY LocationType.LOCALITY}. - # @!attribute [rw] postal_address - # @return [::Google::Type::PostalAddress] - # Postal address of the location that includes human readable information, - # such as postal delivery and payments addresses. Given a postal address, - # a postal service can deliver items to a premises, P.O. Box, or other - # delivery location. - # @!attribute [rw] lat_lng - # @return [::Google::Type::LatLng] - # An object representing a latitude/longitude pair. - # @!attribute [rw] radius_miles - # @return [::Float] - # Radius in miles of the job location. This value is derived from the - # location bounding box in which a circle with the specified radius - # centered from {::Google::Type::LatLng google.type.LatLng} covers the area - # associated with the job location. For example, currently, "Mountain View, - # CA, USA" has a radius of 6.17 miles. - class Location - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An enum which represents the type of a location. - module LocationType - # Default value if the type isn't specified. - LOCATION_TYPE_UNSPECIFIED = 0 - - # A country level location. - COUNTRY = 1 - - # A state or equivalent level location. - ADMINISTRATIVE_AREA = 2 - - # A county or equivalent level location. - SUB_ADMINISTRATIVE_AREA = 3 - - # A city or equivalent level location. - LOCALITY = 4 - - # A postal code level location. - POSTAL_CODE = 5 - - # A sublocality is a subdivision of a locality, for example a city borough, - # ward, or arrondissement. Sublocalities are usually recognized by a local - # political authority. For example, Manhattan and Brooklyn are recognized - # as boroughs by the City of New York, and are therefore modeled as - # sublocalities. - SUB_LOCALITY = 6 - - # A district or equivalent level location. - SUB_LOCALITY_1 = 7 - - # A smaller district or equivalent level display. - SUB_LOCALITY_2 = 8 - - # A neighborhood level location. - NEIGHBORHOOD = 9 - - # A street address level location. - STREET_ADDRESS = 10 - end - end - - # Meta information related to the job searcher or entity - # conducting the job search. This information is used to improve the - # performance of the service. - # @!attribute [rw] domain - # @return [::String] - # Required if - # {::Google::Cloud::Talent::V4beta1::RequestMetadata#allow_missing_ids allow_missing_ids} - # is unset or `false`. - # - # The client-defined scope or source of the service call, which typically - # is the domain on - # which the service has been implemented and is currently being run. - # - # For example, if the service is being run by client Foo, Inc., on - # job board www.foo.com and career site www.bar.com, then this field is - # set to "foo.com" for use on the job board, and "bar.com" for use on the - # career site. - # - # Note that any improvements to the model for a particular tenant site rely - # on this field being set correctly to a unique domain. - # - # The maximum number of allowed characters is 255. - # @!attribute [rw] session_id - # @return [::String] - # Required if - # {::Google::Cloud::Talent::V4beta1::RequestMetadata#allow_missing_ids allow_missing_ids} - # is unset or `false`. - # - # A unique session identification string. A session is defined as the - # duration of an end user's interaction with the service over a certain - # period. - # Obfuscate this field for privacy concerns before - # providing it to the service. - # - # Note that any improvements to the model for a particular tenant site rely - # on this field being set correctly to a unique session ID. - # - # The maximum number of allowed characters is 255. - # @!attribute [rw] user_id - # @return [::String] - # Required if - # {::Google::Cloud::Talent::V4beta1::RequestMetadata#allow_missing_ids allow_missing_ids} - # is unset or `false`. - # - # A unique user identification string, as determined by the client. - # To have the strongest positive impact on search quality - # make sure the client-level is unique. - # Obfuscate this field for privacy concerns before - # providing it to the service. - # - # Note that any improvements to the model for a particular tenant site rely - # on this field being set correctly to a unique user ID. - # - # The maximum number of allowed characters is 255. - # @!attribute [rw] allow_missing_ids - # @return [::Boolean] - # Only set when any of - # {::Google::Cloud::Talent::V4beta1::RequestMetadata#domain domain}, - # {::Google::Cloud::Talent::V4beta1::RequestMetadata#session_id session_id} and - # {::Google::Cloud::Talent::V4beta1::RequestMetadata#user_id user_id} isn't - # available for some reason. It is highly recommended not to set this field - # and provide accurate - # {::Google::Cloud::Talent::V4beta1::RequestMetadata#domain domain}, - # {::Google::Cloud::Talent::V4beta1::RequestMetadata#session_id session_id} and - # {::Google::Cloud::Talent::V4beta1::RequestMetadata#user_id user_id} for the best - # service experience. - # @!attribute [rw] device_info - # @return [::Google::Cloud::Talent::V4beta1::DeviceInfo] - # The type of device used by the job seeker at the time of the call to the - # service. - class RequestMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Additional information returned to client, such as debugging information. - # @!attribute [rw] request_id - # @return [::String] - # A unique id associated with this call. - # This id is logged for tracking purposes. - class ResponseMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Device information collected from the job seeker, candidate, or - # other entity conducting the job search. Providing this information improves - # the quality of the search results across devices. - # @!attribute [rw] device_type - # @return [::Google::Cloud::Talent::V4beta1::DeviceInfo::DeviceType] - # Type of the device. - # @!attribute [rw] id - # @return [::String] - # A device-specific ID. The ID must be a unique identifier that - # distinguishes the device from other devices. - class DeviceInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An enumeration describing an API access portal and exposure mechanism. - module DeviceType - # The device type isn't specified. - DEVICE_TYPE_UNSPECIFIED = 0 - - # A desktop web browser, such as, Chrome, Firefox, Safari, or Internet - # Explorer) - WEB = 1 - - # A mobile device web browser, such as a phone or tablet with a Chrome - # browser. - MOBILE_WEB = 2 - - # An Android device native application. - ANDROID = 3 - - # An iOS device native application. - IOS = 4 - - # A bot, as opposed to a device operated by human beings, such as a web - # crawler. - BOT = 5 - - # Other devices types. - OTHER = 6 - end - end - - # Custom attribute values that are either filterable or non-filterable. - # @!attribute [rw] string_values - # @return [::Array<::String>] - # Exactly one of - # {::Google::Cloud::Talent::V4beta1::CustomAttribute#string_values string_values} - # or {::Google::Cloud::Talent::V4beta1::CustomAttribute#long_values long_values} - # must be specified. - # - # This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or - # `CASE_INSENSITIVE_MATCH`) search. - # For filterable `string_value`s, a maximum total number of 200 values - # is allowed, with each `string_value` has a byte size of no more than - # 500B. For unfilterable `string_values`, the maximum total byte size of - # unfilterable `string_values` is 50KB. - # - # Empty string isn't allowed. - # @!attribute [rw] long_values - # @return [::Array<::Integer>] - # Exactly one of - # {::Google::Cloud::Talent::V4beta1::CustomAttribute#string_values string_values} - # or {::Google::Cloud::Talent::V4beta1::CustomAttribute#long_values long_values} - # must be specified. - # - # This field is used to perform number range search. - # (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`. - # - # Currently at most 1 - # {::Google::Cloud::Talent::V4beta1::CustomAttribute#long_values long_values} is - # supported. - # @!attribute [rw] filterable - # @return [::Boolean] - # If the `filterable` flag is true, the custom field values may be used for - # custom attribute filters - # {::Google::Cloud::Talent::V4beta1::JobQuery#custom_attribute_filter JobQuery.custom_attribute_filter}. - # If false, these values may not be used for custom attribute filters. - # - # Default is false. - # @!attribute [rw] keyword_searchable - # @return [::Boolean] - # If the `keyword_searchable` flag is true, the keywords in custom fields are - # searchable by keyword match. - # If false, the values are not searchable by keyword match. - # - # Default is false. - class CustomAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Spell check result. - # @!attribute [rw] corrected - # @return [::Boolean] - # Indicates if the query was corrected by the spell checker. - # @!attribute [rw] corrected_text - # @return [::String] - # Correction output consisting of the corrected keyword string. - # @!attribute [rw] corrected_html - # @return [::String] - # Corrected output with html tags to highlight the corrected words. - # Corrected words are called out with the "..." html tags. - # - # For example, the user input query is "software enginear", where the second - # word, "enginear," is incorrect. It should be "engineer". When spelling - # correction is enabled, this value is - # "software engineer". - class SpellingCorrection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Job compensation details. - # @!attribute [rw] entries - # @return [::Array<::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry>] - # Job compensation information. - # - # At most one entry can be of type - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationType::BASE CompensationInfo.CompensationType.BASE}, - # which is referred as **base compensation entry** for the job. - # @!attribute [r] annualized_base_compensation_range - # @return [::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationRange] - # Output only. Annualized base compensation range. Computed as base - # compensation entry's - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#amount CompensationEntry.amount} - # times - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#expected_units_per_year CompensationEntry.expected_units_per_year}. - # - # See - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry CompensationEntry} - # for explanation on compensation annualization. - # @!attribute [r] annualized_total_compensation_range - # @return [::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationRange] - # Output only. Annualized total compensation range. Computed as all - # compensation entries' - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#amount CompensationEntry.amount} - # times - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#expected_units_per_year CompensationEntry.expected_units_per_year}. - # - # See - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry CompensationEntry} - # for explanation on compensation annualization. - class CompensationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A compensation entry that represents one component of compensation, such - # as base pay, bonus, or other compensation type. - # - # Annualization: One compensation entry can be annualized if - # - it contains valid - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#amount amount} - # or - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#range range}. - # - and its - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#expected_units_per_year expected_units_per_year} - # is set or can be derived. Its annualized range is determined as - # ({::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#amount amount} - # or - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#range range}) - # times - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#expected_units_per_year expected_units_per_year}. - # @!attribute [rw] type - # @return [::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationType] - # Compensation type. - # - # Default is - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationType::COMPENSATION_TYPE_UNSPECIFIED CompensationType.COMPENSATION_TYPE_UNSPECIFIED}. - # @!attribute [rw] unit - # @return [::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationUnit] - # Frequency of the specified amount. - # - # Default is - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationUnit::COMPENSATION_UNIT_UNSPECIFIED CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED}. - # @!attribute [rw] amount - # @return [::Google::Type::Money] - # Compensation amount. - # - # Note: The following fields are mutually exclusive: `amount`, `range`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] range - # @return [::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationRange] - # Compensation range. - # - # Note: The following fields are mutually exclusive: `range`, `amount`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] description - # @return [::String] - # Compensation description. For example, could - # indicate equity terms or provide additional context to an estimated - # bonus. - # @!attribute [rw] expected_units_per_year - # @return [::Google::Protobuf::DoubleValue] - # Expected number of units paid each year. If not specified, when - # {::Google::Cloud::Talent::V4beta1::Job#employment_types Job.employment_types} - # is FULLTIME, a default value is inferred based on - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#unit unit}. - # Default values: - # - HOURLY: 2080 - # - DAILY: 260 - # - WEEKLY: 52 - # - MONTHLY: 12 - # - ANNUAL: 1 - class CompensationEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Compensation range. - # @!attribute [rw] max_compensation - # @return [::Google::Type::Money] - # The maximum amount of compensation. If left empty, the value is set - # to a maximal compensation value and the currency code is set to - # match the {::Google::Type::Money#currency_code currency code} of - # min_compensation. - # @!attribute [rw] min_compensation - # @return [::Google::Type::Money] - # The minimum amount of compensation. If left empty, the value is set - # to zero and the currency code is set to match the - # {::Google::Type::Money#currency_code currency code} of max_compensation. - class CompensationRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of compensation. - # - # For compensation amounts specified in non-monetary amounts, - # describe the compensation scheme in the - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#description CompensationEntry.description}. - # - # For example, tipping format is described in - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#description CompensationEntry.description} - # (for example, "expect 15-20% tips based on customer bill.") and an estimate - # of the tips provided in - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#amount CompensationEntry.amount} - # or - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#range CompensationEntry.range} - # ($10 per hour). - # - # For example, equity is described in - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#description CompensationEntry.description} - # (for example, "1% - 2% equity vesting over 4 years, 1 year cliff") and - # value estimated in - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#amount CompensationEntry.amount} - # or - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#range CompensationEntry.range}. - # If no value estimate is possible, units are - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationUnit::COMPENSATION_UNIT_UNSPECIFIED CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED} - # and then further clarified in - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry#description CompensationEntry.description} - # field. - module CompensationType - # Default value. - COMPENSATION_TYPE_UNSPECIFIED = 0 - - # Base compensation: Refers to the fixed amount of money paid to an - # employee by an employer in return for work performed. Base compensation - # does not include benefits, bonuses or any other potential compensation - # from an employer. - BASE = 1 - - # Bonus. - BONUS = 2 - - # Signing bonus. - SIGNING_BONUS = 3 - - # Equity. - EQUITY = 4 - - # Profit sharing. - PROFIT_SHARING = 5 - - # Commission. - COMMISSIONS = 6 - - # Tips. - TIPS = 7 - - # Other compensation type. - OTHER_COMPENSATION_TYPE = 8 - end - - # Pay frequency. - module CompensationUnit - # Default value. - COMPENSATION_UNIT_UNSPECIFIED = 0 - - # Hourly. - HOURLY = 1 - - # Daily. - DAILY = 2 - - # Weekly - WEEKLY = 3 - - # Monthly. - MONTHLY = 4 - - # Yearly. - YEARLY = 5 - - # One time. - ONE_TIME = 6 - - # Other compensation units. - OTHER_COMPENSATION_UNIT = 7 - end - end - - # Metadata used for long running operations returned by CTS batch APIs. - # It's used to replace - # {::Google::Longrunning::Operation#metadata google.longrunning.Operation.metadata}. - # @!attribute [rw] state - # @return [::Google::Cloud::Talent::V4beta1::BatchOperationMetadata::State] - # The state of a long running operation. - # @!attribute [rw] state_description - # @return [::String] - # More detailed information about operation state. - # @!attribute [rw] success_count - # @return [::Integer] - # Count of successful item(s) inside an operation. - # @!attribute [rw] failure_count - # @return [::Integer] - # Count of failed item(s) inside an operation. - # @!attribute [rw] total_count - # @return [::Integer] - # Count of total item(s) inside an operation. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time when the batch operation is created. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time when the batch operation status is updated. The metadata and the - # {::Google::Cloud::Talent::V4beta1::BatchOperationMetadata#update_time update_time} - # is refreshed every minute otherwise cached data is returned. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time when the batch operation is finished and - # {::Google::Longrunning::Operation#done google.longrunning.Operation.done} is - # set to `true`. - class BatchOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - module State - # Default value. - STATE_UNSPECIFIED = 0 - - # The batch operation is being prepared for processing. - INITIALIZING = 1 - - # The batch operation is actively being processed. - PROCESSING = 2 - - # The batch operation is processed, and at least one item has been - # successfully processed. - SUCCEEDED = 3 - - # The batch operation is done and no item has been successfully processed. - FAILED = 4 - - # The batch operation is in the process of cancelling after - # google.longrunning.Operations.CancelOperation - # is called. - CANCELLING = 5 - - # The batch operation is done after - # google.longrunning.Operations.CancelOperation - # is called. Any items processed before cancelling are returned in the - # response. - CANCELLED = 6 - end - end - - # An enum that represents the size of the company. - module CompanySize - # Default value if the size isn't specified. - COMPANY_SIZE_UNSPECIFIED = 0 - - # The company has less than 50 employees. - MINI = 1 - - # The company has between 50 and 99 employees. - SMALL = 2 - - # The company has between 100 and 499 employees. - SMEDIUM = 3 - - # The company has between 500 and 999 employees. - MEDIUM = 4 - - # The company has between 1,000 and 4,999 employees. - BIG = 5 - - # The company has between 5,000 and 9,999 employees. - BIGGER = 6 - - # The company has 10,000 or more employees. - GIANT = 7 - end - - # An enum that represents employee benefits included with the job. - module JobBenefit - # Default value if the type isn't specified. - JOB_BENEFIT_UNSPECIFIED = 0 - - # The job includes access to programs that support child care, such - # as daycare. - CHILD_CARE = 1 - - # The job includes dental services covered by a dental - # insurance plan. - DENTAL = 2 - - # The job offers specific benefits to domestic partners. - DOMESTIC_PARTNER = 3 - - # The job allows for a flexible work schedule. - FLEXIBLE_HOURS = 4 - - # The job includes health services covered by a medical insurance plan. - MEDICAL = 5 - - # The job includes a life insurance plan provided by the employer or - # available for purchase by the employee. - LIFE_INSURANCE = 6 - - # The job allows for a leave of absence to a parent to care for a newborn - # child. - PARENTAL_LEAVE = 7 - - # The job includes a workplace retirement plan provided by the - # employer or available for purchase by the employee. - RETIREMENT_PLAN = 8 - - # The job allows for paid time off due to illness. - SICK_DAYS = 9 - - # The job includes paid time off for vacation. - VACATION = 10 - - # The job includes vision services covered by a vision - # insurance plan. - VISION = 11 - end - - # Educational degree level defined in International Standard Classification - # of Education (ISCED). - module DegreeType - # Default value. Represents no degree, or early childhood education. - # Maps to ISCED code 0. - # Ex) Kindergarten - DEGREE_TYPE_UNSPECIFIED = 0 - - # Primary education which is typically the first stage of compulsory - # education. ISCED code 1. - # Ex) Elementary school - PRIMARY_EDUCATION = 1 - - # Lower secondary education; First stage of secondary education building on - # primary education, typically with a more subject-oriented curriculum. - # ISCED code 2. - # Ex) Middle school - LOWER_SECONDARY_EDUCATION = 2 - - # Middle education; Second/final stage of secondary education preparing for - # tertiary education and/or providing skills relevant to employment. - # Usually with an increased range of subject options and streams. ISCED - # code 3. - # Ex) High school - UPPER_SECONDARY_EDUCATION = 3 - - # Adult Remedial Education; Programmes providing learning experiences that - # build on secondary education and prepare for labour market entry and/or - # tertiary education. The content is broader than secondary but not as - # complex as tertiary education. ISCED code 4. - ADULT_REMEDIAL_EDUCATION = 4 - - # Associate's or equivalent; Short first tertiary programmes that are - # typically practically-based, occupationally-specific and prepare for - # labour market entry. These programmes may also provide a pathway to other - # tertiary programmes. ISCED code 5. - ASSOCIATES_OR_EQUIVALENT = 5 - - # Bachelor's or equivalent; Programmes designed to provide intermediate - # academic and/or professional knowledge, skills and competencies leading - # to a first tertiary degree or equivalent qualification. ISCED code 6. - BACHELORS_OR_EQUIVALENT = 6 - - # Master's or equivalent; Programmes designed to provide advanced academic - # and/or professional knowledge, skills and competencies leading to a - # second tertiary degree or equivalent qualification. ISCED code 7. - MASTERS_OR_EQUIVALENT = 7 - - # Doctoral or equivalent; Programmes designed primarily to lead to an - # advanced research qualification, usually concluding with the submission - # and defense of a substantive dissertation of publishable quality based on - # original research. ISCED code 8. - DOCTORAL_OR_EQUIVALENT = 8 - end - - # An enum that represents the employment type of a job. - module EmploymentType - # The default value if the employment type isn't specified. - EMPLOYMENT_TYPE_UNSPECIFIED = 0 - - # The job requires working a number of hours that constitute full - # time employment, typically 40 or more hours per week. - FULL_TIME = 1 - - # The job entails working fewer hours than a full time job, - # typically less than 40 hours a week. - PART_TIME = 2 - - # The job is offered as a contracted, as opposed to a salaried employee, - # position. - CONTRACTOR = 3 - - # The job is offered as a contracted position with the understanding - # that it's converted into a full-time position at the end of the - # contract. Jobs of this type are also returned by a search for - # {::Google::Cloud::Talent::V4beta1::EmploymentType::CONTRACTOR EmploymentType.CONTRACTOR} - # jobs. - CONTRACT_TO_HIRE = 4 - - # The job is offered as a temporary employment opportunity, usually - # a short-term engagement. - TEMPORARY = 5 - - # The job is a fixed-term opportunity for students or entry-level job - # seekers to obtain on-the-job training, typically offered as a summer - # position. - INTERN = 6 - - # The is an opportunity for an individual to volunteer, where there's no - # expectation of compensation for the provided services. - VOLUNTEER = 7 - - # The job requires an employee to work on an as-needed basis with a - # flexible schedule. - PER_DIEM = 8 - - # The job involves employing people in remote areas and flying them - # temporarily to the work site instead of relocating employees and their - # families permanently. - FLY_IN_FLY_OUT = 9 - - # The job does not fit any of the other listed types. - OTHER_EMPLOYMENT_TYPE = 10 - end - - # An enum that represents the required experience level required for the job. - module JobLevel - # The default value if the level isn't specified. - JOB_LEVEL_UNSPECIFIED = 0 - - # Entry-level individual contributors, typically with less than 2 years of - # experience in a similar role. Includes interns. - ENTRY_LEVEL = 1 - - # Experienced individual contributors, typically with 2+ years of - # experience in a similar role. - EXPERIENCED = 2 - - # Entry- to mid-level managers responsible for managing a team of people. - MANAGER = 3 - - # Senior-level managers responsible for managing teams of managers. - DIRECTOR = 4 - - # Executive-level managers and above, including C-level positions. - EXECUTIVE = 5 - end - - # An enum that represents the categorization or primary focus of specific - # role. This value is different than the "industry" associated with a role, - # which is related to the categorization of the company listing the job. - module JobCategory - # The default value if the category isn't specified. - JOB_CATEGORY_UNSPECIFIED = 0 - - # An accounting and finance job, such as an Accountant. - ACCOUNTING_AND_FINANCE = 1 - - # An administrative and office job, such as an Administrative Assistant. - ADMINISTRATIVE_AND_OFFICE = 2 - - # An advertising and marketing job, such as Marketing Manager. - ADVERTISING_AND_MARKETING = 3 - - # An animal care job, such as Veterinarian. - ANIMAL_CARE = 4 - - # An art, fashion, or design job, such as Designer. - ART_FASHION_AND_DESIGN = 5 - - # A business operations job, such as Business Operations Manager. - BUSINESS_OPERATIONS = 6 - - # A cleaning and facilities job, such as Custodial Staff. - CLEANING_AND_FACILITIES = 7 - - # A computer and IT job, such as Systems Administrator. - COMPUTER_AND_IT = 8 - - # A construction job, such as General Laborer. - CONSTRUCTION = 9 - - # A customer service job, such s Cashier. - CUSTOMER_SERVICE = 10 - - # An education job, such as School Teacher. - EDUCATION = 11 - - # An entertainment and travel job, such as Flight Attendant. - ENTERTAINMENT_AND_TRAVEL = 12 - - # A farming or outdoor job, such as Park Ranger. - FARMING_AND_OUTDOORS = 13 - - # A healthcare job, such as Registered Nurse. - HEALTHCARE = 14 - - # A human resources job, such as Human Resources Director. - HUMAN_RESOURCES = 15 - - # An installation, maintenance, or repair job, such as Electrician. - INSTALLATION_MAINTENANCE_AND_REPAIR = 16 - - # A legal job, such as Law Clerk. - LEGAL = 17 - - # A management job, often used in conjunction with another category, - # such as Store Manager. - MANAGEMENT = 18 - - # A manufacturing or warehouse job, such as Assembly Technician. - MANUFACTURING_AND_WAREHOUSE = 19 - - # A media, communications, or writing job, such as Media Relations. - MEDIA_COMMUNICATIONS_AND_WRITING = 20 - - # An oil, gas or mining job, such as Offshore Driller. - OIL_GAS_AND_MINING = 21 - - # A personal care and services job, such as Hair Stylist. - PERSONAL_CARE_AND_SERVICES = 22 - - # A protective services job, such as Security Guard. - PROTECTIVE_SERVICES = 23 - - # A real estate job, such as Buyer's Agent. - REAL_ESTATE = 24 - - # A restaurant and hospitality job, such as Restaurant Server. - RESTAURANT_AND_HOSPITALITY = 25 - - # A sales and/or retail job, such Sales Associate. - SALES_AND_RETAIL = 26 - - # A science and engineering job, such as Lab Technician. - SCIENCE_AND_ENGINEERING = 27 - - # A social services or non-profit job, such as Case Worker. - SOCIAL_SERVICES_AND_NON_PROFIT = 28 - - # A sports, fitness, or recreation job, such as Personal Trainer. - SPORTS_FITNESS_AND_RECREATION = 29 - - # A transportation or logistics job, such as Truck Driver. - TRANSPORTATION_AND_LOGISTICS = 30 - end - - # An enum that represents the job posting region. In most cases, job postings - # don't need to specify a region. If a region is given, jobs are - # eligible for searches in the specified region. - module PostingRegion - # If the region is unspecified, the job is only returned if it - # matches the {::Google::Cloud::Talent::V4beta1::LocationFilter LocationFilter}. - POSTING_REGION_UNSPECIFIED = 0 - - # In addition to exact location matching, job posting is returned when the - # {::Google::Cloud::Talent::V4beta1::LocationFilter LocationFilter} in the search - # query is in the same administrative area as the returned job posting. For - # example, if a `ADMINISTRATIVE_AREA` job is posted in "CA, USA", it's - # returned if {::Google::Cloud::Talent::V4beta1::LocationFilter LocationFilter} - # has "Mountain View". - # - # Administrative area refers to top-level administrative subdivision of this - # country. For example, US state, IT region, UK constituent nation and - # JP prefecture. - ADMINISTRATIVE_AREA = 1 - - # In addition to exact location matching, job is returned when - # {::Google::Cloud::Talent::V4beta1::LocationFilter LocationFilter} in search - # query is in the same country as this job. For example, if a `NATION_WIDE` - # job is posted in "USA", it's returned if - # {::Google::Cloud::Talent::V4beta1::LocationFilter LocationFilter} has 'Mountain - # View'. - NATION = 2 - - # Job allows employees to work remotely (telecommute). - # If locations are provided with this value, the job is - # considered as having a location, but telecommuting is allowed. - TELECOMMUTE = 3 - end - - # Deprecated. All resources are only visible to the owner. - # - # An enum that represents who has view access to the resource. - # @deprecated This enum is deprecated and may be removed in the next major version update. - module Visibility - # Default value. - VISIBILITY_UNSPECIFIED = 0 - - # The resource is only visible to the GCP account who owns it. - ACCOUNT_ONLY = 1 - - # The resource is visible to the owner and may be visible to other - # applications and processes at Google. - SHARED_WITH_GOOGLE = 2 - - # The resource is visible to the owner and may be visible to all other API - # clients. - SHARED_WITH_PUBLIC = 3 - end - - # Option for HTML content sanitization on user input fields, for example, job - # description. By setting this option, user can determine whether and how - # sanitization is performed on these fields. - module HtmlSanitization - # Default value. - HTML_SANITIZATION_UNSPECIFIED = 0 - - # Disables sanitization on HTML input. - HTML_SANITIZATION_DISABLED = 1 - - # Sanitizes HTML input, only accepts bold, italic, ordered list, and - # unordered list markup tags. - SIMPLE_FORMATTING_ONLY = 2 - end - - # Method for commute. - module CommuteMethod - # Commute method isn't specified. - COMMUTE_METHOD_UNSPECIFIED = 0 - - # Commute time is calculated based on driving time. - DRIVING = 1 - - # Commute time is calculated based on public transit including bus, metro, - # subway, and so on. - TRANSIT = 2 - - # Commute time is calculated based on walking time. - WALKING = 3 - - # Commute time is calculated based on biking time. - CYCLING = 4 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/company.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/company.rb deleted file mode 100644 index d6890a73d259..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/company.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 Talent - module V4beta1 - # A Company resource represents a company in the service. A company is the - # entity that owns job postings, that is, the hiring entity responsible for - # employing applicants for the job position. - # @!attribute [rw] name - # @return [::String] - # Required during company update. - # - # The resource name for a company. This is generated by the service when a - # company is created. - # - # The format is - # "projects/\\{project_id}/tenants/\\{tenant_id}/companies/\\{company_id}", for - # example, "projects/foo/tenants/bar/companies/baz". - # - # If tenant id is unspecified, the default tenant is used. For - # example, "projects/foo/companies/bar". - # @!attribute [rw] display_name - # @return [::String] - # Required. The display name of the company, for example, "Google LLC". - # @!attribute [rw] external_id - # @return [::String] - # Required. Client side company identifier, used to uniquely identify the - # company. - # - # The maximum number of allowed characters is 255. - # @!attribute [rw] size - # @return [::Google::Cloud::Talent::V4beta1::CompanySize] - # The employer's company size. - # @!attribute [rw] headquarters_address - # @return [::String] - # The street address of the company's main headquarters, which may be - # different from the job location. The service attempts - # to geolocate the provided address, and populates a more specific - # location wherever possible in - # {::Google::Cloud::Talent::V4beta1::Company::DerivedInfo#headquarters_location DerivedInfo.headquarters_location}. - # @!attribute [rw] hiring_agency - # @return [::Boolean] - # Set to true if it is the hiring agency that post jobs for other - # employers. - # - # Defaults to false if not provided. - # @!attribute [rw] eeo_text - # @return [::String] - # Equal Employment Opportunity legal disclaimer text to be - # associated with all jobs, and typically to be displayed in all - # roles. - # - # The maximum number of allowed characters is 500. - # @!attribute [rw] website_uri - # @return [::String] - # The URI representing the company's primary web site or home page, - # for example, "https://www.google.com". - # - # The maximum number of allowed characters is 255. - # @!attribute [rw] career_site_uri - # @return [::String] - # The URI to employer's career site or careers page on the employer's web - # site, for example, "https://careers.google.com". - # @!attribute [rw] image_uri - # @return [::String] - # A URI that hosts the employer's company logo. - # @!attribute [rw] keyword_searchable_job_custom_attributes - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Array<::String>] - # This field is deprecated. Please set the searchability of the custom - # attribute in the - # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes} - # going forward. - # - # A list of keys of filterable - # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes}, - # whose corresponding `string_values` are used in keyword searches. Jobs with - # `string_values` under these specified field keys are returned if any - # of the values match the search keyword. Custom field values with - # parenthesis, brackets and special symbols are not searchable as-is, - # and those keyword queries must be surrounded by quotes. - # @!attribute [r] derived_info - # @return [::Google::Cloud::Talent::V4beta1::Company::DerivedInfo] - # Output only. Derived details about the company. - # @!attribute [r] suspended - # @return [::Boolean] - # Output only. Indicates whether a company is flagged to be suspended from - # public availability by the service when job content appears suspicious, - # abusive, or spammy. - class Company - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Derived details about the company. - # @!attribute [rw] headquarters_location - # @return [::Google::Cloud::Talent::V4beta1::Location] - # A structured headquarters location of the company, resolved from - # {::Google::Cloud::Talent::V4beta1::Company#headquarters_address Company.headquarters_address} - # if provided. - class DerivedInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/company_service.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/company_service.rb deleted file mode 100644 index d4047c822aef..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/company_service.rb +++ /dev/null @@ -1,144 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Talent - module V4beta1 - # The Request of the CreateCompany method. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the tenant under which the company is created. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, - # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant - # is created, for example, "projects/foo". - # @!attribute [rw] company - # @return [::Google::Cloud::Talent::V4beta1::Company] - # Required. The company to be created. - class CreateCompanyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for getting a company by name. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the company to be retrieved. - # - # The format is - # "projects/\\{project_id}/tenants/\\{tenant_id}/companies/\\{company_id}", for - # example, "projects/api-test-project/tenants/foo/companies/bar". - # - # If tenant id is unspecified, the default tenant is used, for - # example, "projects/api-test-project/companies/bar". - class GetCompanyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for updating a specified company. - # @!attribute [rw] company - # @return [::Google::Cloud::Talent::V4beta1::Company] - # Required. The company resource to replace the current resource in the - # system. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Strongly recommended for the best service experience. - # - # If - # {::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest#update_mask update_mask} - # is provided, only the specified fields in - # {::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest#company company} are - # updated. Otherwise all the fields are updated. - # - # A field mask to specify the company fields to be updated. Only - # top level fields of {::Google::Cloud::Talent::V4beta1::Company Company} are - # supported. - class UpdateCompanyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to delete a company. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the company to be deleted. - # - # The format is - # "projects/\\{project_id}/tenants/\\{tenant_id}/companies/\\{company_id}", for - # example, "projects/foo/tenants/bar/companies/baz". - # - # If tenant id is unspecified, the default tenant is used, for - # example, "projects/foo/companies/bar". - class DeleteCompanyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List companies for which the client has ACL visibility. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the tenant under which the company is created. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, - # "projects/foo/tenant/bar". - # - # If tenant id is unspecified, the default tenant will be used, for - # example, "projects/foo". - # @!attribute [rw] page_token - # @return [::String] - # The starting indicator from which to return results. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of companies to be returned, at most 100. - # Default is 100 if a non-positive number is provided. - # @!attribute [rw] require_open_jobs - # @return [::Boolean] - # Set to true if the companies requested must have open jobs. - # - # Defaults to false. - # - # If true, at most - # {::Google::Cloud::Talent::V4beta1::ListCompaniesRequest#page_size page_size} of - # companies are fetched, among which only those with open jobs are returned. - class ListCompaniesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The List companies response object. - # @!attribute [rw] companies - # @return [::Array<::Google::Cloud::Talent::V4beta1::Company>] - # Companies for the current client. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. - # @!attribute [rw] metadata - # @return [::Google::Cloud::Talent::V4beta1::ResponseMetadata] - # Additional information for the API invocation, such as the request - # tracking id. - class ListCompaniesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/completion_service.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/completion_service.rb deleted file mode 100644 index dea145e5da33..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/completion_service.rb +++ /dev/null @@ -1,154 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Talent - module V4beta1 - # Auto-complete parameters. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of tenant the completion is performed within. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, - # "projects/foo/tenant/bar". - # - # If tenant id is unspecified, the default tenant is used, for - # example, "projects/foo". - # @!attribute [rw] query - # @return [::String] - # Required. The query used to generate suggestions. - # - # The maximum number of allowed characters is 255. - # @!attribute [rw] language_codes - # @return [::Array<::String>] - # The list of languages of the query. This is - # the BCP-47 language code, such as "en-US" or "sr-Latn". - # For more information, see - # [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). - # - # The maximum number of allowed characters is 255. - # @!attribute [rw] page_size - # @return [::Integer] - # Required. Completion result count. - # - # The maximum allowed page size is 10. - # @!attribute [rw] company - # @return [::String] - # If provided, restricts completion to specified company. - # - # The format is - # "projects/\\{project_id}/tenants/\\{tenant_id}/companies/\\{company_id}", for - # example, "projects/foo/tenants/bar/companies/baz". - # - # If tenant id is unspecified, the default tenant is used, for - # example, "projects/foo". - # @!attribute [rw] scope - # @return [::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionScope] - # The scope of the completion. The defaults is - # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionScope::PUBLIC CompletionScope.PUBLIC}. - # @!attribute [rw] type - # @return [::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType] - # The completion topic. The default is - # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType::COMBINED CompletionType.COMBINED}. - class CompleteQueryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum to specify the scope of completion. - module CompletionScope - # Default value. - COMPLETION_SCOPE_UNSPECIFIED = 0 - - # Suggestions are based only on the data provided by the client. - TENANT = 1 - - # Suggestions are based on all jobs data in the system that's visible to - # the client - PUBLIC = 2 - end - - # Enum to specify auto-completion topics. - module CompletionType - # Default value. - COMPLETION_TYPE_UNSPECIFIED = 0 - - # Suggest job titles for jobs autocomplete. - # - # For - # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType::JOB_TITLE CompletionType.JOB_TITLE} - # type, only open jobs with the same - # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest#language_codes language_codes} - # are returned. - JOB_TITLE = 1 - - # Suggest company names for jobs autocomplete. - # - # For - # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType::COMPANY_NAME CompletionType.COMPANY_NAME} - # type, only companies having open jobs with the same - # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest#language_codes language_codes} - # are returned. - COMPANY_NAME = 2 - - # Suggest both job titles and company names for jobs autocomplete. - # - # For - # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType::COMBINED CompletionType.COMBINED} - # type, only open jobs with the same - # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest#language_codes language_codes} - # or companies having open jobs with the same - # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest#language_codes language_codes} - # are returned. - COMBINED = 3 - end - end - - # Response of auto-complete query. - # @!attribute [rw] completion_results - # @return [::Array<::Google::Cloud::Talent::V4beta1::CompleteQueryResponse::CompletionResult>] - # Results of the matching job/company candidates. - # @!attribute [rw] metadata - # @return [::Google::Cloud::Talent::V4beta1::ResponseMetadata] - # Additional information for the API invocation, such as the request - # tracking id. - class CompleteQueryResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Resource that represents completion results. - # @!attribute [rw] suggestion - # @return [::String] - # The suggestion for the query. - # @!attribute [rw] type - # @return [::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType] - # The completion topic. - # @!attribute [rw] image_uri - # @return [::String] - # The URI of the company image for - # {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType::COMPANY_NAME COMPANY_NAME}. - class CompletionResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/event.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/event.rb deleted file mode 100644 index c38408da15b3..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/event.rb +++ /dev/null @@ -1,188 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Talent - module V4beta1 - # An event issued when an end user interacts with the application that - # implements Cloud Talent Solution. Providing this information improves the - # quality of results for the API clients, enabling the - # service to perform optimally. The number of events sent must be consistent - # with other calls, such as job searches, issued to the service by the client. - # @!attribute [rw] request_id - # @return [::String] - # Strongly recommended for the best service experience. - # - # A unique ID generated in the API responses. It can be found in - # {::Google::Cloud::Talent::V4beta1::ResponseMetadata#request_id ResponseMetadata.request_id}. - # @!attribute [rw] event_id - # @return [::String] - # Required. A unique identifier, generated by the client application. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Required. The timestamp of the event. - # @!attribute [rw] job_event - # @return [::Google::Cloud::Talent::V4beta1::JobEvent] - # An event issued when a job seeker interacts with the application that - # implements Cloud Talent Solution. - # @!attribute [rw] event_notes - # @return [::String] - # Notes about the event provided by recruiters or other users, for example, - # feedback on why a profile was bookmarked. - class ClientEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An event issued when a job seeker interacts with the application that - # implements Cloud Talent Solution. - # @!attribute [rw] type - # @return [::Google::Cloud::Talent::V4beta1::JobEvent::JobEventType] - # Required. The type of the event (see - # {::Google::Cloud::Talent::V4beta1::JobEvent::JobEventType JobEventType}). - # @!attribute [rw] jobs - # @return [::Array<::String>] - # Required. The [job name(s)][google.cloud.talent.v4beta1.Job.name] - # associated with this event. For example, if this is an - # {::Google::Cloud::Talent::V4beta1::JobEvent::JobEventType::IMPRESSION impression} - # event, this field contains the identifiers of all jobs shown to the job - # seeker. If this was a - # {::Google::Cloud::Talent::V4beta1::JobEvent::JobEventType::VIEW view} event, this - # field contains the identifier of the viewed job. - # - # The format is - # "projects/\\{project_id}/tenants/\\{tenant_id}/jobs/\\{job_id}", for - # example, "projects/foo/tenants/bar/jobs/baz". - # @!attribute [rw] profile - # @return [::String] - # The [profile name][google.cloud.talent.v4beta1.Profile.name] associated - # with this client event. - # - # The format is - # "projects/\\{project_id}/tenants/\\{tenant_id}/profiles/\\{profile_id}", - # for example, "projects/foo/tenants/bar/profiles/baz". - class JobEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An enumeration of an event attributed to the behavior of the end user, - # such as a job seeker. - module JobEventType - # The event is unspecified by other provided values. - JOB_EVENT_TYPE_UNSPECIFIED = 0 - - # The job seeker or other entity interacting with the service has - # had a job rendered in their view, such as in a list of search results in - # a compressed or clipped format. This event is typically associated with - # the viewing of a jobs list on a single page by a job seeker. - IMPRESSION = 1 - - # The job seeker, or other entity interacting with the service, has - # viewed the details of a job, including the full description. This - # event doesn't apply to the viewing a snippet of a job appearing as a - # part of the job search results. Viewing a snippet is associated with an - # {::Google::Cloud::Talent::V4beta1::JobEvent::JobEventType::IMPRESSION impression}). - VIEW = 2 - - # The job seeker or other entity interacting with the service - # performed an action to view a job and was redirected to a different - # website for job. - VIEW_REDIRECT = 3 - - # The job seeker or other entity interacting with the service - # began the process or demonstrated the intention of applying for a job. - APPLICATION_START = 4 - - # The job seeker or other entity interacting with the service - # submitted an application for a job. - APPLICATION_FINISH = 5 - - # The job seeker or other entity interacting with the service - # submitted an application for a job with a single click without - # entering information. If a job seeker performs this action, send only - # this event to the service. Do not also send - # {::Google::Cloud::Talent::V4beta1::JobEvent::JobEventType::APPLICATION_START JobEventType.APPLICATION_START} - # or - # {::Google::Cloud::Talent::V4beta1::JobEvent::JobEventType::APPLICATION_FINISH JobEventType.APPLICATION_FINISH} - # events. - APPLICATION_QUICK_SUBMISSION = 6 - - # The job seeker or other entity interacting with the service - # performed an action to apply to a job and was redirected to a different - # website to complete the application. - APPLICATION_REDIRECT = 7 - - # The job seeker or other entity interacting with the service began the - # process or demonstrated the intention of applying for a job from the - # search results page without viewing the details of the job posting. - # If sending this event, JobEventType.VIEW event shouldn't be sent. - APPLICATION_START_FROM_SEARCH = 8 - - # The job seeker, or other entity interacting with the service, performs an - # action with a single click from the search results page to apply to a job - # (without viewing the details of the job posting), and is redirected - # to a different website to complete the application. If a candidate - # performs this action, send only this event to the service. Do not also - # send - # {::Google::Cloud::Talent::V4beta1::JobEvent::JobEventType::APPLICATION_START JobEventType.APPLICATION_START}, - # {::Google::Cloud::Talent::V4beta1::JobEvent::JobEventType::APPLICATION_FINISH JobEventType.APPLICATION_FINISH} - # or - # {::Google::Cloud::Talent::V4beta1::JobEvent::JobEventType::VIEW JobEventType.VIEW} - # events. - APPLICATION_REDIRECT_FROM_SEARCH = 9 - - # This event should be used when a company submits an application - # on behalf of a job seeker. This event is intended for use by staffing - # agencies attempting to place candidates. - APPLICATION_COMPANY_SUBMIT = 10 - - # The job seeker or other entity interacting with the service demonstrated - # an interest in a job by bookmarking or saving it. - BOOKMARK = 11 - - # The job seeker or other entity interacting with the service was - # sent a notification, such as an email alert or device notification, - # containing one or more jobs listings generated by the service. - NOTIFICATION = 12 - - # The job seeker or other entity interacting with the service was - # employed by the hiring entity (employer). Send this event - # only if the job seeker was hired through an application that was - # initiated by a search conducted through the Cloud Talent Solution - # service. - HIRED = 13 - - # A recruiter or staffing agency submitted an application on behalf of the - # candidate after interacting with the service to identify a suitable job - # posting. - SENT_CV = 14 - - # The entity interacting with the service (for example, the job seeker), - # was granted an initial interview by the hiring entity (employer). This - # event should only be sent if the job seeker was granted an interview as - # part of an application that was initiated by a search conducted through / - # recommendation provided by the Cloud Talent Solution service. - INTERVIEW_GRANTED = 15 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/event_service.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/event_service.rb deleted file mode 100644 index 4423eac5eaf4..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/event_service.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Talent - module V4beta1 - # The report event request. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the tenant under which the event is created. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, - # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant - # is created, for example, "projects/foo". - # @!attribute [rw] client_event - # @return [::Google::Cloud::Talent::V4beta1::ClientEvent] - # Required. Events issued when end user interacts with customer's application - # that uses Cloud Talent Solution. - class CreateClientEventRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/filters.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/filters.rb deleted file mode 100644 index 70809323a188..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/filters.rb +++ /dev/null @@ -1,404 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Talent - module V4beta1 - # The query required to perform a search query. - # @!attribute [rw] query - # @return [::String] - # The query string that matches against the job title, description, and - # location fields. - # - # The maximum number of allowed characters is 255. - # @!attribute [rw] query_language_code - # @return [::String] - # The language code of {::Google::Cloud::Talent::V4beta1::JobQuery#query query}. - # For example, "en-US". This field helps to better interpret the query. - # - # If a value isn't specified, the query language code is automatically - # detected, which may not be accurate. - # - # Language code should be in BCP-47 format, such as "en-US" or "sr-Latn". - # For more information, see - # [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). - # @!attribute [rw] companies - # @return [::Array<::String>] - # This filter specifies the company entities to search against. - # - # If a value isn't specified, jobs are searched for against all - # companies. - # - # If multiple values are specified, jobs are searched against the - # companies specified. - # - # The format is - # "projects/\\{project_id}/tenants/\\{tenant_id}/companies/\\{company_id}". For - # example, "projects/foo/tenants/bar/companies/baz". - # - # If tenant id is unspecified, the default tenant is used. For - # example, "projects/foo/companies/bar". - # - # At most 20 company filters are allowed. - # @!attribute [rw] location_filters - # @return [::Array<::Google::Cloud::Talent::V4beta1::LocationFilter>] - # The location filter specifies geo-regions containing the jobs to - # search against. See - # {::Google::Cloud::Talent::V4beta1::LocationFilter LocationFilter} for more - # information. - # - # If a location value isn't specified, jobs fitting the other search - # criteria are retrieved regardless of where they're located. - # - # If multiple values are specified, jobs are retrieved from any of the - # specified locations. If different values are specified for the - # {::Google::Cloud::Talent::V4beta1::LocationFilter#distance_in_miles LocationFilter.distance_in_miles} - # parameter, the maximum provided distance is used for all locations. - # - # At most 5 location filters are allowed. - # @!attribute [rw] job_categories - # @return [::Array<::Google::Cloud::Talent::V4beta1::JobCategory>] - # The category filter specifies the categories of jobs to search against. - # See {::Google::Cloud::Talent::V4beta1::JobCategory JobCategory} for more - # information. - # - # If a value isn't specified, jobs from any category are searched against. - # - # If multiple values are specified, jobs from any of the specified - # categories are searched against. - # @!attribute [rw] commute_filter - # @return [::Google::Cloud::Talent::V4beta1::CommuteFilter] - # Allows filtering jobs by commute time with different travel methods (for - # example, driving or public transit). - # - # Note: This only works when you specify a - # {::Google::Cloud::Talent::V4beta1::CommuteMethod CommuteMethod}. In this case, - # {::Google::Cloud::Talent::V4beta1::JobQuery#location_filters location_filters} - # is ignored. - # - # Currently we don't support sorting by commute time. - # @!attribute [rw] company_display_names - # @return [::Array<::String>] - # This filter specifies the company - # {::Google::Cloud::Talent::V4beta1::Company#display_name Company.display_name} of - # the jobs to search against. The company name must match the value exactly. - # - # Alternatively, the value being searched for can be wrapped in different - # match operators. - # `SUBSTRING_MATCH([value])` - # The company name must contain a case insensitive substring match of the - # value. Using this function may increase latency. - # - # Sample Value: `SUBSTRING_MATCH(google)` - # - # `MULTI_WORD_TOKEN_MATCH([value])` - # The value will be treated as a multi word token and the company name must - # contain a case insensitive match of the value. Using this function may - # increase latency. - # - # Sample Value: `MULTI_WORD_TOKEN_MATCH(google)` - # - # If a value isn't specified, jobs within the search results are - # associated with any company. - # - # If multiple values are specified, jobs within the search results may be - # associated with any of the specified companies. - # - # At most 20 company display name filters are allowed. - # @!attribute [rw] compensation_filter - # @return [::Google::Cloud::Talent::V4beta1::CompensationFilter] - # This search filter is applied only to - # {::Google::Cloud::Talent::V4beta1::Job#compensation_info Job.compensation_info}. - # For example, if the filter is specified as "Hourly job with per-hour - # compensation > $15", only jobs meeting these criteria are searched. If a - # filter isn't defined, all open jobs are searched. - # @!attribute [rw] custom_attribute_filter - # @return [::String] - # This filter specifies a structured syntax to match against the - # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes} - # marked as `filterable`. - # - # The syntax for this expression is a subset of SQL syntax. - # - # Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the - # left of the operator is a custom field key and the right of the operator - # is a number or a quoted string. You must escape backslash (\\) and - # quote (\") characters. - # - # Supported functions are `LOWER([field_name])` to - # perform a case insensitive match and `EMPTY([field_name])` to filter on the - # existence of a key. - # - # Boolean expressions (AND/OR/NOT) are supported up to 3 levels of - # nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100 - # comparisons or functions are allowed in the expression. The expression - # must be < 10000 bytes in length. - # - # Sample Query: - # `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND - # driving_years > 10` - # @!attribute [rw] disable_spell_check - # @return [::Boolean] - # This flag controls the spell-check feature. If false, the - # service attempts to correct a misspelled query, - # for example, "enginee" is corrected to "engineer". - # - # Defaults to false: a spell check is performed. - # @!attribute [rw] employment_types - # @return [::Array<::Google::Cloud::Talent::V4beta1::EmploymentType>] - # The employment type filter specifies the employment type of jobs to - # search against, such as - # {::Google::Cloud::Talent::V4beta1::EmploymentType::FULL_TIME EmploymentType.FULL_TIME}. - # - # If a value isn't specified, jobs in the search results includes any - # employment type. - # - # If multiple values are specified, jobs in the search results include - # any of the specified employment types. - # @!attribute [rw] language_codes - # @return [::Array<::String>] - # This filter specifies the locale of jobs to search against, - # for example, "en-US". - # - # If a value isn't specified, the search results can contain jobs in any - # locale. - # - # - # Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn". - # For more information, see - # [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). - # - # At most 10 language code filters are allowed. - # @!attribute [rw] publish_time_range - # @return [::Google::Cloud::Talent::V4beta1::TimestampRange] - # Jobs published within a range specified by this filter are searched - # against. - # @!attribute [rw] excluded_jobs - # @return [::Array<::String>] - # This filter specifies a list of job names to be excluded during search. - # - # At most 400 excluded job names are allowed. - class JobQuery - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Geographic region of the search. - # @!attribute [rw] address - # @return [::String] - # The address name, such as "Mountain View" or "Bay Area". - # @!attribute [rw] region_code - # @return [::String] - # CLDR region code of the country/region. This field may be used in two ways: - # - # 1) If telecommute preference is not set, this field is used address - # ambiguity of the user-input address. For example, "Liverpool" may refer to - # "Liverpool, NY, US" or "Liverpool, UK". This region code biases the - # address resolution toward a specific country or territory. If this field is - # not set, address resolution is biased toward the United States by default. - # - # 2) If telecommute preference is set to TELECOMMUTE_ALLOWED, the - # telecommute location filter will be limited to the region specified in this - # field. If this field is not set, the telecommute job locations will not be - # - # See - # https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/territory_information.html - # for details. Example: "CH" for Switzerland. - # @!attribute [rw] lat_lng - # @return [::Google::Type::LatLng] - # The latitude and longitude of the geographic center to search from. This - # field is ignored if `address` is provided. - # @!attribute [rw] distance_in_miles - # @return [::Float] - # The distance_in_miles is applied when the location being searched for is - # identified as a city or smaller. This field is ignored if the location - # being searched for is a state or larger. - # @!attribute [rw] telecommute_preference - # @return [::Google::Cloud::Talent::V4beta1::LocationFilter::TelecommutePreference] - # Allows the client to return jobs without a - # set location, specifically, telecommuting jobs (telecommuting is considered - # by the service as a special location). - # {::Google::Cloud::Talent::V4beta1::Job#posting_region Job.posting_region} - # indicates if a job permits telecommuting. If this field is set to - # {::Google::Cloud::Talent::V4beta1::LocationFilter::TelecommutePreference::TELECOMMUTE_ALLOWED TelecommutePreference.TELECOMMUTE_ALLOWED}, - # telecommuting jobs are searched, and - # {::Google::Cloud::Talent::V4beta1::LocationFilter#address address} and - # {::Google::Cloud::Talent::V4beta1::LocationFilter#lat_lng lat_lng} are ignored. - # If not set or set to - # {::Google::Cloud::Talent::V4beta1::LocationFilter::TelecommutePreference::TELECOMMUTE_EXCLUDED TelecommutePreference.TELECOMMUTE_EXCLUDED}, - # the telecommute status of the jobs is ignored. Jobs that have - # {::Google::Cloud::Talent::V4beta1::PostingRegion::TELECOMMUTE PostingRegion.TELECOMMUTE} - # and have additional - # {::Google::Cloud::Talent::V4beta1::Job#addresses Job.addresses} may still be - # matched based on other location filters using - # {::Google::Cloud::Talent::V4beta1::LocationFilter#address address} or - # [latlng][]. - # - # This filter can be used by itself to search exclusively for telecommuting - # jobs, or it can be combined with another location - # filter to search for a combination of job locations, - # such as "Mountain View" or "telecommuting" jobs. However, when used in - # combination with other location filters, telecommuting jobs can be - # treated as less relevant than other jobs in the search response. - # - # This field is only used for job search requests. - # @!attribute [rw] negated - # @return [::Boolean] - # Whether to apply negation to the filter so profiles matching the filter - # are excluded. - class LocationFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specify whether to include telecommute jobs. - module TelecommutePreference - # Default value if the telecommute preference isn't specified. - TELECOMMUTE_PREFERENCE_UNSPECIFIED = 0 - - # Deprecated: Ignore telecommute status of jobs. Use - # TELECOMMUTE_JOBS_EXCLUDED if want to exclude telecommute jobs. - TELECOMMUTE_EXCLUDED = 1 - - # Allow telecommute jobs. - TELECOMMUTE_ALLOWED = 2 - - # Exclude telecommute jobs. - TELECOMMUTE_JOBS_EXCLUDED = 3 - end - end - - # Filter on job compensation type and amount. - # @!attribute [rw] type - # @return [::Google::Cloud::Talent::V4beta1::CompensationFilter::FilterType] - # Required. Type of filter. - # @!attribute [rw] units - # @return [::Array<::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationUnit>] - # Required. Specify desired `base compensation entry's` - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationUnit CompensationInfo.CompensationUnit}. - # @!attribute [rw] range - # @return [::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationRange] - # Compensation range. - # @!attribute [rw] include_jobs_with_unspecified_compensation_range - # @return [::Boolean] - # If set to true, jobs with unspecified compensation range fields are - # included. - class CompensationFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specify the type of filtering. - module FilterType - # Filter type unspecified. Position holder, INVALID, should never be used. - FILTER_TYPE_UNSPECIFIED = 0 - - # Filter by `base compensation entry's` unit. A job is a match if and - # only if the job contains a base CompensationEntry and the base - # CompensationEntry's unit matches provided - # {::Google::Cloud::Talent::V4beta1::CompensationFilter#units units}. Populate - # one or more - # {::Google::Cloud::Talent::V4beta1::CompensationFilter#units units}. - # - # See - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry CompensationInfo.CompensationEntry} - # for definition of base compensation entry. - UNIT_ONLY = 1 - - # Filter by `base compensation entry's` unit and amount / range. A job - # is a match if and only if the job contains a base CompensationEntry, and - # the base entry's unit matches provided - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationUnit CompensationUnit} - # and amount or range overlaps with provided - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationRange CompensationRange}. - # - # See - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationEntry CompensationInfo.CompensationEntry} - # for definition of base compensation entry. - # - # Set exactly one - # {::Google::Cloud::Talent::V4beta1::CompensationFilter#units units} and - # populate {::Google::Cloud::Talent::V4beta1::CompensationFilter#range range}. - UNIT_AND_AMOUNT = 2 - - # Filter by annualized base compensation amount and `base compensation - # entry's` unit. Populate - # {::Google::Cloud::Talent::V4beta1::CompensationFilter#range range} and zero or - # more {::Google::Cloud::Talent::V4beta1::CompensationFilter#units units}. - ANNUALIZED_BASE_AMOUNT = 3 - - # Filter by annualized total compensation amount and `base compensation - # entry's` unit . Populate - # {::Google::Cloud::Talent::V4beta1::CompensationFilter#range range} and zero or - # more {::Google::Cloud::Talent::V4beta1::CompensationFilter#units units}. - ANNUALIZED_TOTAL_AMOUNT = 4 - end - end - - # Parameters needed for commute search. - # @!attribute [rw] commute_method - # @return [::Google::Cloud::Talent::V4beta1::CommuteMethod] - # Required. The method of transportation to calculate the commute time for. - # @!attribute [rw] start_coordinates - # @return [::Google::Type::LatLng] - # Required. The latitude and longitude of the location to calculate the - # commute time from. - # @!attribute [rw] travel_duration - # @return [::Google::Protobuf::Duration] - # Required. The maximum travel time in seconds. The maximum allowed value is - # `3600s` (one hour). Format is `123s`. - # @!attribute [rw] allow_imprecise_addresses - # @return [::Boolean] - # If `true`, jobs without street level addresses may also be returned. - # For city level addresses, the city center is used. For state and coarser - # level addresses, text matching is used. - # If this field is set to `false` or isn't specified, only jobs that include - # street level addresses will be returned by commute search. - # @!attribute [rw] road_traffic - # @return [::Google::Cloud::Talent::V4beta1::CommuteFilter::RoadTraffic] - # Specifies the traffic density to use when calculating commute time. - # - # Note: The following fields are mutually exclusive: `road_traffic`, `departure_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] departure_time - # @return [::Google::Type::TimeOfDay] - # The departure time used to calculate traffic impact, represented as - # {::Google::Type::TimeOfDay google.type.TimeOfDay} in local time zone. - # - # Currently traffic model is restricted to hour level resolution. - # - # Note: The following fields are mutually exclusive: `departure_time`, `road_traffic`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class CommuteFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The traffic density to use when calculating commute time. - module RoadTraffic - # Road traffic situation isn't specified. - ROAD_TRAFFIC_UNSPECIFIED = 0 - - # Optimal commute time without considering any traffic impact. - TRAFFIC_FREE = 1 - - # Commute time calculation takes in account the peak traffic impact. - BUSY_HOUR = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/histogram.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/histogram.rb deleted file mode 100644 index 1762ad476d9f..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/histogram.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! - - -module Google - module Cloud - module Talent - module V4beta1 - # The histogram request. - # @!attribute [rw] histogram_query - # @return [::String] - # An expression specifies a histogram request against matching resources - # (for example, jobs, profiles) for searches. - # - # See - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#histogram_queries SearchJobsRequest.histogram_queries} - # and - # [SearchProfilesRequest.histogram_queries][google.cloud.talent.v4beta1.SearchProfilesRequest.histogram_queries] - # for details about syntax. - class HistogramQuery - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Histogram result that matches - # {::Google::Cloud::Talent::V4beta1::HistogramQuery HistogramQuery} specified in - # searches. - # @!attribute [rw] histogram_query - # @return [::String] - # Requested histogram expression. - # @!attribute [rw] histogram - # @return [::Google::Protobuf::Map{::String => ::Integer}] - # A map from the values of the facet associated with distinct values to the - # number of matching entries with corresponding value. - # - # The key format is: - # - # * (for string histogram) string values stored in the field. - # * (for named numeric bucket) name specified in `bucket()` function, like - # for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`. - # * (for anonymous numeric bucket) range formatted as `-`, for - # example, `0-1000`, `MIN-0`, and `0-MAX`. - class HistogramQueryResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Integer] - class HistogramEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/job.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/job.rb deleted file mode 100644 index 9790455fe3f4..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/job.rb +++ /dev/null @@ -1,389 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Talent - module V4beta1 - # A Job resource represents a job posting (also referred to as a "job listing" - # or "job requisition"). A job belongs to a - # {::Google::Cloud::Talent::V4beta1::Company Company}, which is the hiring entity - # responsible for the job. - # @!attribute [rw] name - # @return [::String] - # Required during job update. - # - # The resource name for the job. This is generated by the service when a - # job is created. - # - # The format is - # "projects/\\{project_id}/tenants/\\{tenant_id}/jobs/\\{job_id}". For - # example, "projects/foo/tenants/bar/jobs/baz". - # - # If tenant id is unspecified, the default tenant is used. For - # example, "projects/foo/jobs/bar". - # - # Use of this field in job queries and API calls is preferred over the use of - # {::Google::Cloud::Talent::V4beta1::Job#requisition_id requisition_id} since this - # value is unique. - # @!attribute [rw] company - # @return [::String] - # Required. The resource name of the company listing the job. - # - # The format is - # "projects/\\{project_id}/tenants/\\{tenant_id}/companies/\\{company_id}". For - # example, "projects/foo/tenants/bar/companies/baz". - # - # If tenant id is unspecified, the default tenant is used. For - # example, "projects/foo/companies/bar". - # @!attribute [rw] requisition_id - # @return [::String] - # Required. The requisition ID, also referred to as the posting ID, is - # assigned by the client to identify a job. This field is intended to be used - # by clients for client identification and tracking of postings. A job isn't - # allowed to be created if there is another job with the same - # {::Google::Cloud::Talent::V4beta1::Job#name company}, - # {::Google::Cloud::Talent::V4beta1::Job#language_code language_code} and - # {::Google::Cloud::Talent::V4beta1::Job#requisition_id requisition_id}. - # - # The maximum number of allowed characters is 255. - # @!attribute [rw] title - # @return [::String] - # Required. The title of the job, such as "Software Engineer" - # - # The maximum number of allowed characters is 500. - # @!attribute [rw] description - # @return [::String] - # Required. The description of the job, which typically includes a - # multi-paragraph description of the company and related information. - # Separate fields are provided on the job object for - # {::Google::Cloud::Talent::V4beta1::Job#responsibilities responsibilities}, - # {::Google::Cloud::Talent::V4beta1::Job#qualifications qualifications}, and other - # job characteristics. Use of these separate job fields is recommended. - # - # This field accepts and sanitizes HTML input, and also accepts - # bold, italic, ordered list, and unordered list markup tags. - # - # The maximum number of allowed characters is 100,000. - # @!attribute [rw] addresses - # @return [::Array<::String>] - # Strongly recommended for the best service experience. - # - # Location(s) where the employer is looking to hire for this job posting. - # - # Specifying the full street address(es) of the hiring location enables - # better API results, especially job searches by commute time. - # - # At most 50 locations are allowed for best search performance. If a job has - # more locations, it is suggested to split it into multiple jobs with unique - # {::Google::Cloud::Talent::V4beta1::Job#requisition_id requisition_id}s (e.g. - # 'ReqA' becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the - # same {::Google::Cloud::Talent::V4beta1::Job#company company}, - # {::Google::Cloud::Talent::V4beta1::Job#language_code language_code} and - # {::Google::Cloud::Talent::V4beta1::Job#requisition_id requisition_id} are not - # allowed. If the original - # {::Google::Cloud::Talent::V4beta1::Job#requisition_id requisition_id} must be - # preserved, a custom field should be used for storage. It is also suggested - # to group the locations that close to each other in the same job for better - # search experience. - # - # The maximum number of allowed characters is 500. - # @!attribute [rw] application_info - # @return [::Google::Cloud::Talent::V4beta1::Job::ApplicationInfo] - # Job application information. - # @!attribute [rw] job_benefits - # @return [::Array<::Google::Cloud::Talent::V4beta1::JobBenefit>] - # The benefits included with the job. - # @!attribute [rw] compensation_info - # @return [::Google::Cloud::Talent::V4beta1::CompensationInfo] - # Job compensation information (a.k.a. "pay rate") i.e., the compensation - # that will paid to the employee. - # @!attribute [rw] custom_attributes - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Talent::V4beta1::CustomAttribute}] - # A map of fields to hold both filterable and non-filterable custom job - # attributes that are not covered by the provided structured fields. - # - # The keys of the map are strings up to 64 bytes and must match the - # pattern: `[a-zA-Z][a-zA-Z0-9_]*`. For example, key0LikeThis or - # KEY_1_LIKE_THIS. - # - # At most 100 filterable and at most 100 unfilterable keys are supported. - # For filterable `string_values`, across all keys at most 200 values are - # allowed, with each string no more than 255 characters. For unfilterable - # `string_values`, the maximum total size of `string_values` across all keys - # is 50KB. - # @!attribute [rw] degree_types - # @return [::Array<::Google::Cloud::Talent::V4beta1::DegreeType>] - # The desired education degrees for the job, such as Bachelors, Masters. - # @!attribute [rw] department - # @return [::String] - # The department or functional area within the company with the open - # position. - # - # The maximum number of allowed characters is 255. - # @!attribute [rw] employment_types - # @return [::Array<::Google::Cloud::Talent::V4beta1::EmploymentType>] - # The employment type(s) of a job, for example, - # {::Google::Cloud::Talent::V4beta1::EmploymentType::FULL_TIME full time} or - # {::Google::Cloud::Talent::V4beta1::EmploymentType::PART_TIME part time}. - # @!attribute [rw] incentives - # @return [::String] - # A description of bonus, commission, and other compensation - # incentives associated with the job not including salary or pay. - # - # The maximum number of allowed characters is 10,000. - # @!attribute [rw] language_code - # @return [::String] - # The language of the posting. This field is distinct from - # any requirements for fluency that are associated with the job. - # - # Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn". - # For more information, see - # [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47){: - # class="external" target="_blank" }. - # - # If this field is unspecified and - # {::Google::Cloud::Talent::V4beta1::Job#description Job.description} is present, - # detected language code based on - # {::Google::Cloud::Talent::V4beta1::Job#description Job.description} is assigned, - # otherwise defaults to 'en_US'. - # @!attribute [rw] job_level - # @return [::Google::Cloud::Talent::V4beta1::JobLevel] - # The experience level associated with the job, such as "Entry Level". - # @!attribute [rw] promotion_value - # @return [::Integer] - # A promotion value of the job, as determined by the client. - # The value determines the sort order of the jobs returned when searching for - # jobs using the featured jobs search call, with higher promotional values - # being returned first and ties being resolved by relevance sort. Only the - # jobs with a promotionValue >0 are returned in a FEATURED_JOB_SEARCH. - # - # Default value is 0, and negative values are treated as 0. - # @!attribute [rw] qualifications - # @return [::String] - # A description of the qualifications required to perform the - # job. The use of this field is recommended - # as an alternative to using the more general - # {::Google::Cloud::Talent::V4beta1::Job#description description} field. - # - # This field accepts and sanitizes HTML input, and also accepts - # bold, italic, ordered list, and unordered list markup tags. - # - # The maximum number of allowed characters is 10,000. - # @!attribute [rw] responsibilities - # @return [::String] - # A description of job responsibilities. The use of this field is - # recommended as an alternative to using the more general - # {::Google::Cloud::Talent::V4beta1::Job#description description} field. - # - # This field accepts and sanitizes HTML input, and also accepts - # bold, italic, ordered list, and unordered list markup tags. - # - # The maximum number of allowed characters is 10,000. - # @!attribute [rw] posting_region - # @return [::Google::Cloud::Talent::V4beta1::PostingRegion] - # The job {::Google::Cloud::Talent::V4beta1::PostingRegion PostingRegion} (for - # example, state, country) throughout which the job is available. If this - # field is set, a - # {::Google::Cloud::Talent::V4beta1::LocationFilter LocationFilter} in a search - # query within the job region finds this job posting if an exact location - # match isn't specified. If this field is set to - # {::Google::Cloud::Talent::V4beta1::PostingRegion::NATION PostingRegion.NATION} or - # {::Google::Cloud::Talent::V4beta1::PostingRegion::ADMINISTRATIVE_AREA PostingRegion.ADMINISTRATIVE_AREA}, - # setting job {::Google::Cloud::Talent::V4beta1::Job#addresses Job.addresses} to - # the same location level as this field is strongly recommended. - # @!attribute [rw] visibility - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Talent::V4beta1::Visibility] - # Deprecated. The job is only visible to the owner. - # - # The visibility of the job. - # - # Defaults to - # {::Google::Cloud::Talent::V4beta1::Visibility::ACCOUNT_ONLY Visibility.ACCOUNT_ONLY} - # if not specified. - # @!attribute [rw] job_start_time - # @return [::Google::Protobuf::Timestamp] - # The start timestamp of the job in UTC time zone. Typically this field - # is used for contracting engagements. Invalid timestamps are ignored. - # @!attribute [rw] job_end_time - # @return [::Google::Protobuf::Timestamp] - # The end timestamp of the job. Typically this field is used for contracting - # engagements. Invalid timestamps are ignored. - # @!attribute [rw] posting_publish_time - # @return [::Google::Protobuf::Timestamp] - # The timestamp this job posting was most recently published. The default - # value is the time the request arrives at the server. Invalid timestamps are - # ignored. - # @!attribute [rw] posting_expire_time - # @return [::Google::Protobuf::Timestamp] - # Strongly recommended for the best service experience. - # - # The expiration timestamp of the job. After this timestamp, the - # job is marked as expired, and it no longer appears in search results. The - # expired job can't be listed by the - # {::Google::Cloud::Talent::V4beta1::JobService::Client#list_jobs ListJobs} API, but it can - # be retrieved with the - # {::Google::Cloud::Talent::V4beta1::JobService::Client#get_job GetJob} API or updated with - # the {::Google::Cloud::Talent::V4beta1::JobService::Client#update_job UpdateJob} API or - # deleted with the - # {::Google::Cloud::Talent::V4beta1::JobService::Client#delete_job DeleteJob} API. An - # expired job can be updated and opened again by using a future expiration - # timestamp. Updating an expired job fails if there is another existing open - # job with same {::Google::Cloud::Talent::V4beta1::Job#company company}, - # {::Google::Cloud::Talent::V4beta1::Job#language_code language_code} and - # {::Google::Cloud::Talent::V4beta1::Job#requisition_id requisition_id}. - # - # The expired jobs are retained in our system for 90 days. However, the - # overall expired job count cannot exceed 3 times the maximum number of - # open jobs over previous 7 days. If this threshold is exceeded, - # expired jobs are cleaned out in order of earliest expire time. - # Expired jobs are no longer accessible after they are cleaned - # out. - # - # Invalid timestamps are ignored, and treated as expire time not provided. - # - # If the timestamp is before the instant request is made, the job - # is treated as expired immediately on creation. This kind of job can - # not be updated. And when creating a job with past timestamp, the - # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time posting_publish_time} - # must be set before - # {::Google::Cloud::Talent::V4beta1::Job#posting_expire_time posting_expire_time}. - # The purpose of this feature is to allow other objects, such as - # [Application][google.cloud.talent.v4beta1.Application], to refer a job that - # didn't exist in the system prior to becoming expired. If you want to modify - # a job that was expired on creation, delete it and create a new one. - # - # If this value isn't provided at the time of job creation or is invalid, - # the job posting expires after 30 days from the job's creation time. For - # example, if the job was created on 2017/01/01 13:00AM UTC with an - # unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC. - # - # If this value isn't provided on job update, it depends on the field masks - # set by - # {::Google::Cloud::Talent::V4beta1::UpdateJobRequest#update_mask UpdateJobRequest.update_mask}. - # If the field masks include - # {::Google::Cloud::Talent::V4beta1::Job#job_end_time job_end_time}, or the masks - # are empty meaning that every field is updated, the job posting expires - # after 30 days from the job's last update time. Otherwise the expiration - # date isn't updated. - # @!attribute [r] posting_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this job posting was created. - # @!attribute [r] posting_update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this job posting was last updated. - # @!attribute [r] company_display_name - # @return [::String] - # Output only. Display name of the company listing the job. - # @!attribute [r] derived_info - # @return [::Google::Cloud::Talent::V4beta1::Job::DerivedInfo] - # Output only. Derived details about the job posting. - # @!attribute [rw] processing_options - # @return [::Google::Cloud::Talent::V4beta1::Job::ProcessingOptions] - # Options for job processing. - class Job - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Application related details of a job posting. - # @!attribute [rw] emails - # @return [::Array<::String>] - # Use this field to specify email address(es) to which resumes or - # applications can be sent. - # - # The maximum number of allowed characters for each entry is 255. - # @!attribute [rw] instruction - # @return [::String] - # Use this field to provide instructions, such as "Mail your application - # to ...", that a candidate can follow to apply for the job. - # - # This field accepts and sanitizes HTML input, and also accepts - # bold, italic, ordered list, and unordered list markup tags. - # - # The maximum number of allowed characters is 3,000. - # @!attribute [rw] uris - # @return [::Array<::String>] - # Use this URI field to direct an applicant to a website, for example to - # link to an online application form. - # - # The maximum number of allowed characters for each entry is 2,000. - class ApplicationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Derived details about the job posting. - # @!attribute [rw] locations - # @return [::Array<::Google::Cloud::Talent::V4beta1::Location>] - # Structured locations of the job, resolved from - # {::Google::Cloud::Talent::V4beta1::Job#addresses Job.addresses}. - # - # {::Google::Cloud::Talent::V4beta1::Job::DerivedInfo#locations locations} are - # exactly matched to - # {::Google::Cloud::Talent::V4beta1::Job#addresses Job.addresses} in the same - # order. - # @!attribute [rw] job_categories - # @return [::Array<::Google::Cloud::Talent::V4beta1::JobCategory>] - # Job categories derived from - # {::Google::Cloud::Talent::V4beta1::Job#title Job.title} and - # {::Google::Cloud::Talent::V4beta1::Job#description Job.description}. - class DerivedInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Options for job processing. - # @!attribute [rw] disable_street_address_resolution - # @return [::Boolean] - # If set to `true`, the service does not attempt to resolve a - # more precise address for the job. - # @!attribute [rw] html_sanitization - # @return [::Google::Cloud::Talent::V4beta1::HtmlSanitization] - # Option for job HTML content sanitization. Applied fields are: - # - # * description - # * applicationInfo.instruction - # * incentives - # * qualifications - # * responsibilities - # - # HTML tags in these fields may be stripped if sanitiazation isn't - # disabled. - # - # Defaults to - # {::Google::Cloud::Talent::V4beta1::HtmlSanitization::SIMPLE_FORMATTING_ONLY HtmlSanitization.SIMPLE_FORMATTING_ONLY}. - class ProcessingOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Talent::V4beta1::CustomAttribute] - class CustomAttributesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/job_service.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/job_service.rb deleted file mode 100644 index 82110737d6ce..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/job_service.rb +++ /dev/null @@ -1,914 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Talent - module V4beta1 - # Create job request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the tenant under which the job is created. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, - # "projects/foo/tenant/bar". If tenant id is unspecified a default tenant - # is created. For example, "projects/foo". - # @!attribute [rw] job - # @return [::Google::Cloud::Talent::V4beta1::Job] - # Required. The Job to be created. - class CreateJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get job request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the job to retrieve. - # - # The format is - # "projects/\\{project_id}/tenants/\\{tenant_id}/jobs/\\{job_id}". For - # example, "projects/foo/tenants/bar/jobs/baz". - # - # If tenant id is unspecified, the default tenant is used. For - # example, "projects/foo/jobs/bar". - class GetJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update job request. - # @!attribute [rw] job - # @return [::Google::Cloud::Talent::V4beta1::Job] - # Required. The Job to be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Strongly recommended for the best service experience. - # - # If {::Google::Cloud::Talent::V4beta1::UpdateJobRequest#update_mask update_mask} - # is provided, only the specified fields in - # {::Google::Cloud::Talent::V4beta1::UpdateJobRequest#job job} are updated. - # Otherwise all the fields are updated. - # - # A field mask to restrict the fields that are updated. Only - # top level fields of {::Google::Cloud::Talent::V4beta1::Job Job} are supported. - class UpdateJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete job request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the job to be deleted. - # - # The format is - # "projects/\\{project_id}/tenants/\\{tenant_id}/jobs/\\{job_id}". For - # example, "projects/foo/tenants/bar/jobs/baz". - # - # If tenant id is unspecified, the default tenant is used. For - # example, "projects/foo/jobs/bar". - class DeleteJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Batch delete jobs request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the tenant under which the job is created. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, - # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant - # is created. For example, "projects/foo". - # @!attribute [rw] filter - # @return [::String] - # Required. The filter string specifies the jobs to be deleted. - # - # Supported operator: =, AND - # - # The fields eligible for filtering are: - # - # * `companyName` (Required) - # * `requisitionId` (Required) - # - # Sample Query: companyName = "projects/foo/companies/bar" AND - # requisitionId = "req-1" - class BatchDeleteJobsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List jobs request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the tenant under which the job is created. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, - # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant - # is created. For example, "projects/foo". - # @!attribute [rw] filter - # @return [::String] - # Required. The filter string specifies the jobs to be enumerated. - # - # Supported operator: =, AND - # - # The fields eligible for filtering are: - # - # * `companyName` - # * `requisitionId` - # * `status` Available values: OPEN, EXPIRED, ALL. Defaults to - # OPEN if no value is specified. - # - # At least one of `companyName` and `requisitionId` must present or an - # INVALID_ARGUMENT error is thrown. - # - # Sample Query: - # - # * companyName = "projects/foo/tenants/bar/companies/baz" - # * companyName = "projects/foo/tenants/bar/companies/baz" AND - # requisitionId = "req-1" - # * companyName = "projects/foo/tenants/bar/companies/baz" AND - # status = "EXPIRED" - # * requisitionId = "req-1" - # * requisitionId = "req-1" AND status = "EXPIRED" - # @!attribute [rw] page_token - # @return [::String] - # The starting point of a query result. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of jobs to be returned per page of results. - # - # If {::Google::Cloud::Talent::V4beta1::ListJobsRequest#job_view job_view} is set - # to - # {::Google::Cloud::Talent::V4beta1::JobView::JOB_VIEW_ID_ONLY JobView.JOB_VIEW_ID_ONLY}, - # the maximum allowed page size is 1000. Otherwise, the maximum allowed page - # size is 100. - # - # Default is 100 if empty or a number < 1 is specified. - # @!attribute [rw] job_view - # @return [::Google::Cloud::Talent::V4beta1::JobView] - # The desired job attributes returned for jobs in the - # search response. Defaults to - # {::Google::Cloud::Talent::V4beta1::JobView::JOB_VIEW_FULL JobView.JOB_VIEW_FULL} - # if no value is specified. - class ListJobsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List jobs response. - # @!attribute [rw] jobs - # @return [::Array<::Google::Cloud::Talent::V4beta1::Job>] - # The Jobs for a given company. - # - # The maximum number of items returned is based on the limit field - # provided in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. - # @!attribute [rw] metadata - # @return [::Google::Cloud::Talent::V4beta1::ResponseMetadata] - # Additional information for the API invocation, such as the request - # tracking id. - class ListJobsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The Request body of the `SearchJobs` call. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the tenant to search within. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, - # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant - # is created. For example, "projects/foo". - # @!attribute [rw] search_mode - # @return [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::SearchMode] - # Mode of a search. - # - # Defaults to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::SearchMode::JOB_SEARCH SearchMode.JOB_SEARCH}. - # @!attribute [rw] request_metadata - # @return [::Google::Cloud::Talent::V4beta1::RequestMetadata] - # Required. The meta information collected about the job searcher, used to - # improve the search quality of the service. The identifiers (such as - # `user_id`) are provided by users, and must be unique and consistent. - # @!attribute [rw] job_query - # @return [::Google::Cloud::Talent::V4beta1::JobQuery] - # Query used to search against jobs, such as keyword, location filters, etc. - # @!attribute [rw] enable_broadening - # @return [::Boolean] - # Controls whether to broaden the search when it produces sparse results. - # Broadened queries append results to the end of the matching results - # list. - # - # Defaults to false. - # @!attribute [rw] require_precise_result_size - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # This field is deprecated. - # @!attribute [rw] histogram_queries - # @return [::Array<::Google::Cloud::Talent::V4beta1::HistogramQuery>] - # An expression specifies a histogram request against matching jobs. - # - # Expression syntax is an aggregation function call with histogram facets and - # other options. - # - # Available aggregation function calls are: - # * `count(string_histogram_facet)`: Count the number of matching entities, - # for each distinct attribute value. - # * `count(numeric_histogram_facet, list of buckets)`: Count the number of - # matching entities within each bucket. - # - # A maximum of 200 histogram buckets are supported. - # - # Data types: - # - # * Histogram facet: facet names with format `[a-zA-Z][a-zA-Z0-9_]+`. - # * String: string like "any string with backslash escape for quote(\")." - # * Number: whole number and floating point number like 10, -1 and -0.01. - # * List: list of elements with comma(,) separator surrounded by square - # brackets, for example, [1, 2, 3] and ["one", "two", "three"]. - # - # Built-in constants: - # - # * MIN (minimum number similar to java Double.MIN_VALUE) - # * MAX (maximum number similar to java Double.MAX_VALUE) - # - # Built-in functions: - # - # * bucket(start, end[, label]): bucket built-in function creates a bucket - # with range of [start, end). Note that the end is exclusive, for example, - # bucket(1, MAX, "positive number") or bucket(1, 10). - # - # Job histogram facets: - # - # * company_display_name: histogram by - # {::Google::Cloud::Talent::V4beta1::Job#company_display_name Job.company_display_name}. - # * employment_type: histogram by - # {::Google::Cloud::Talent::V4beta1::Job#employment_types Job.employment_types}, - # for example, - # "FULL_TIME", "PART_TIME". - # * company_size (DEPRECATED): histogram by - # {::Google::Cloud::Talent::V4beta1::CompanySize CompanySize}, for example, - # "SMALL", "MEDIUM", "BIG". - # * publish_time_in_day: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} - # in days. - # Must specify list of numeric buckets in spec. - # * publish_time_in_month: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} - # in months. - # Must specify list of numeric buckets in spec. - # * publish_time_in_year: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} - # in years. - # Must specify list of numeric buckets in spec. - # * degree_types: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#degree_types Job.degree_types}, for - # example, - # "Bachelors", "Masters". - # * job_level: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#job_level Job.job_level}, for example, - # "Entry - # Level". - # * country: histogram by the country code of jobs, for example, "US", "FR". - # * admin1: histogram by the admin1 code of jobs, which is a global - # placeholder referring to the state, province, or the particular term a - # country uses to define the geographic structure below the country level, - # for example, "CA", "IL". - # * city: histogram by a combination of the "city name, admin1 code". For - # example, "Mountain View, CA", "New York, NY". - # * admin1_country: histogram by a combination of the "admin1 code, country", - # for example, "CA, US", "IL, US". - # * city_coordinate: histogram by the city center's GPS coordinates (latitude - # and longitude), for example, 37.4038522,-122.0987765. Since the - # coordinates of a city center can change, customers may need to refresh - # them periodically. - # * locale: histogram by the - # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}, for - # example, "en-US", - # "fr-FR". - # * language: histogram by the language subtag of the - # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}, - # for example, "en", "fr". - # * category: histogram by the - # {::Google::Cloud::Talent::V4beta1::JobCategory JobCategory}, for example, - # "COMPUTER_AND_IT", "HEALTHCARE". - # * base_compensation_unit: histogram by the - # {::Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationUnit CompensationInfo.CompensationUnit} - # of base salary, for example, "WEEKLY", "MONTHLY". - # * base_compensation: histogram by the base salary. Must specify list of - # numeric buckets to group results by. - # * annualized_base_compensation: histogram by the base annualized salary. - # Must specify list of numeric buckets to group results by. - # * annualized_total_compensation: histogram by the total annualized salary. - # Must specify list of numeric buckets to group results by. - # * string_custom_attribute: histogram by string - # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes}. - # Values can be accessed via square bracket notations like - # string_custom_attribute["key1"]. - # * numeric_custom_attribute: histogram by numeric - # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes}. - # Values can be accessed via square bracket notations like - # numeric_custom_attribute["key1"]. Must specify list of numeric buckets to - # group results by. - # - # Example expressions: - # - # * `count(admin1)` - # * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000), - # bucket(100000, MAX)])` - # * `count(string_custom_attribute["some-string-custom-attribute"])` - # * `count(numeric_custom_attribute["some-numeric-custom-attribute"], - # [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])` - # @!attribute [rw] job_view - # @return [::Google::Cloud::Talent::V4beta1::JobView] - # The desired job attributes returned for jobs in the search response. - # Defaults to - # {::Google::Cloud::Talent::V4beta1::JobView::JOB_VIEW_SMALL JobView.JOB_VIEW_SMALL} - # if no value is specified. - # @!attribute [rw] offset - # @return [::Integer] - # An integer that specifies the current offset (that is, starting result - # location, amongst the jobs deemed by the API as relevant) in search - # results. This field is only considered if - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#page_token page_token} is - # unset. - # - # The maximum allowed value is 5000. Otherwise an error is thrown. - # - # For example, 0 means to return results starting from the first matching - # job, and 10 means to return from the 11th job. This can be used for - # pagination, (for example, pageSize = 10 and offset = 10 means to return - # from the second page). - # @!attribute [rw] page_size - # @return [::Integer] - # A limit on the number of jobs returned in the search results. - # Increasing this value above the default value of 10 can increase search - # response time. The value can be between 1 and 100. - # @!attribute [rw] page_token - # @return [::String] - # The token specifying the current offset within - # search results. See - # {::Google::Cloud::Talent::V4beta1::SearchJobsResponse#next_page_token SearchJobsResponse.next_page_token} - # for an explanation of how to obtain the next set of query results. - # @!attribute [rw] order_by - # @return [::String] - # The criteria determining how search results are sorted. Default is - # `"relevance desc"`. - # - # Supported options are: - # - # * `"relevance desc"`: By relevance descending, as determined by the API - # algorithms. Relevance thresholding of query results is only available - # with this ordering. - # * `"posting_publish_time desc"`: By - # {::Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job.posting_publish_time} - # descending. - # * `"posting_update_time desc"`: By - # {::Google::Cloud::Talent::V4beta1::Job#posting_update_time Job.posting_update_time} - # descending. - # * `"title"`: By {::Google::Cloud::Talent::V4beta1::Job#title Job.title} - # ascending. - # * `"title desc"`: By {::Google::Cloud::Talent::V4beta1::Job#title Job.title} - # descending. - # * `"annualized_base_compensation"`: By job's - # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_base_compensation_range CompensationInfo.annualized_base_compensation_range} - # ascending. Jobs whose annualized base compensation is unspecified are put - # at the end of search results. - # * `"annualized_base_compensation desc"`: By job's - # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_base_compensation_range CompensationInfo.annualized_base_compensation_range} - # descending. Jobs whose annualized base compensation is unspecified are - # put at the end of search results. - # * `"annualized_total_compensation"`: By job's - # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_total_compensation_range CompensationInfo.annualized_total_compensation_range} - # ascending. Jobs whose annualized base compensation is unspecified are put - # at the end of search results. - # * `"annualized_total_compensation desc"`: By job's - # {::Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_total_compensation_range CompensationInfo.annualized_total_compensation_range} - # descending. Jobs whose annualized base compensation is unspecified are - # put at the end of search results. - # * `"custom_ranking desc"`: By the relevance score adjusted to the - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#ranking_expression SearchJobsRequest.CustomRankingInfo.ranking_expression} - # with weight factor assigned by - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#importance_level SearchJobsRequest.CustomRankingInfo.importance_level} - # in descending order. - # * Location sorting: Use the special syntax to order jobs by distance:
- # `"distance_from('Hawaii')"`: Order by distance from Hawaii.
- # `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.
- # `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by - # multiple locations. See details below.
- # `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by - # multiple locations. See details below.
- # The string can have a maximum of 256 characters. When multiple distance - # centers are provided, a job that is close to any of the distance centers - # would have a high rank. When a job has multiple locations, the job - # location closest to one of the distance centers will be used. Jobs that - # don't have locations will be ranked at the bottom. Distance is calculated - # with a precision of 11.3 meters (37.4 feet). Diversification strategy is - # still applied unless explicitly disabled in - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#diversification_level diversification_level}. - # @!attribute [rw] diversification_level - # @return [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::DiversificationLevel] - # Controls whether highly similar jobs are returned next to each other in - # the search results. Jobs are identified as highly similar based on - # their titles, job categories, and locations. Highly similar results are - # clustered so that only one representative job of the cluster is - # displayed to the job seeker higher up in the results, with the other jobs - # being displayed lower down in the results. - # - # Defaults to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::DiversificationLevel::SIMPLE DiversificationLevel.SIMPLE} - # if no value is specified. - # @!attribute [rw] custom_ranking_info - # @return [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo] - # Controls over how job documents get ranked on top of existing relevance - # score (determined by API algorithm). - # @!attribute [rw] disable_keyword_match - # @return [::Boolean] - # This field is deprecated. Please use - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#keyword_match_mode SearchJobsRequest.keyword_match_mode} - # going forward. - # - # To migrate, disable_keyword_match set to false maps to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_ALL KeywordMatchMode.KEYWORD_MATCH_ALL}, - # and disable_keyword_match set to true maps to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_DISABLED KeywordMatchMode.KEYWORD_MATCH_DISABLED}. - # If - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#keyword_match_mode SearchJobsRequest.keyword_match_mode} - # is set, this field is ignored. - # - # Controls whether to disable exact keyword match on - # {::Google::Cloud::Talent::V4beta1::Job#title Job.title}, - # {::Google::Cloud::Talent::V4beta1::Job#description Job.description}, - # {::Google::Cloud::Talent::V4beta1::Job#company_display_name Job.company_display_name}, - # {::Google::Cloud::Talent::V4beta1::Job#addresses Job.addresses}, - # {::Google::Cloud::Talent::V4beta1::Job#qualifications Job.qualifications}. When - # disable keyword match is turned off, a keyword match returns jobs that do - # not match given category filters when there are matching keywords. For - # example, for the query "program manager," a result is returned even if the - # job posting has the title "software developer," which doesn't fall into - # "program manager" ontology, but does have "program manager" appearing in - # its description. - # - # For queries like "cloud" that don't contain title or - # location specific ontology, jobs with "cloud" keyword matches are returned - # regardless of this flag's value. - # - # Use - # {::Google::Cloud::Talent::V4beta1::Company#keyword_searchable_job_custom_attributes Company.keyword_searchable_job_custom_attributes} - # if company-specific globally matched custom field/attribute string values - # are needed. Enabling keyword match improves recall of subsequent search - # requests. - # - # Defaults to false. - # @!attribute [rw] keyword_match_mode - # @return [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode] - # Controls what keyword match options to use. - # - # Defaults to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_ALL KeywordMatchMode.KEYWORD_MATCH_ALL} - # if no value is specified. - # @!attribute [rw] relevance_threshold - # @return [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::RelevanceThreshold] - # Optional. The relevance threshold of the search results. - # - # Default to Google defined threshold, leveraging a balance of - # precision and recall to deliver both highly accurate results and - # comprehensive coverage of relevant information. - class SearchJobsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Custom ranking information for - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest SearchJobsRequest}. - # @!attribute [rw] importance_level - # @return [::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo::ImportanceLevel] - # Required. Controls over how important the score of - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#ranking_expression CustomRankingInfo.ranking_expression} - # gets applied to job's final ranking position. - # - # An error is thrown if not specified. - # @!attribute [rw] ranking_expression - # @return [::String] - # Required. Controls over how job documents get ranked on top of existing - # relevance score (determined by API algorithm). A combination of the - # ranking expression and relevance score is used to determine job's final - # ranking position. - # - # The syntax for this expression is a subset of Google SQL syntax. - # - # Supported operators are: +, -, *, /, where the left and right side of - # the operator is either a numeric - # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes} - # key, integer/double value or an expression that can be evaluated to a - # number. - # - # Parenthesis are supported to adjust calculation precedence. The - # expression must be < 200 characters in length. - # - # The expression is considered invalid for a job if the expression - # references custom attributes that are not populated on the job or if the - # expression results in a divide by zero. If an expression is invalid for a - # job, that job is demoted to the end of the results. - # - # Sample ranking expression - # (year + 25) * 0.25 - (freshness / 0.5) - class CustomRankingInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The importance level for - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#ranking_expression CustomRankingInfo.ranking_expression}. - module ImportanceLevel - # Default value if the importance level isn't specified. - IMPORTANCE_LEVEL_UNSPECIFIED = 0 - - # The given ranking expression is of None importance, existing relevance - # score (determined by API algorithm) dominates job's final ranking - # position. - NONE = 1 - - # The given ranking expression is of Low importance in terms of job's - # final ranking position compared to existing relevance - # score (determined by API algorithm). - LOW = 2 - - # The given ranking expression is of Mild importance in terms of job's - # final ranking position compared to existing relevance - # score (determined by API algorithm). - MILD = 3 - - # The given ranking expression is of Medium importance in terms of job's - # final ranking position compared to existing relevance - # score (determined by API algorithm). - MEDIUM = 4 - - # The given ranking expression is of High importance in terms of job's - # final ranking position compared to existing relevance - # score (determined by API algorithm). - HIGH = 5 - - # The given ranking expression is of Extreme importance, and dominates - # job's final ranking position with existing relevance - # score (determined by API algorithm) ignored. - EXTREME = 6 - end - end - - # A string-represented enumeration of the job search mode. The service - # operate differently for different modes of service. - module SearchMode - # The mode of the search method isn't specified. The default search - # behavior is identical to JOB_SEARCH search behavior. - SEARCH_MODE_UNSPECIFIED = 0 - - # The job search matches against all jobs, and featured jobs - # (jobs with promotionValue > 0) are not specially handled. - JOB_SEARCH = 1 - - # The job search matches only against featured jobs (jobs with a - # promotionValue > 0). This method doesn't return any jobs having a - # promotionValue <= 0. The search results order is determined by the - # promotionValue (jobs with a higher promotionValue are returned higher up - # in the search results), with relevance being used as a tiebreaker. - FEATURED_JOB_SEARCH = 2 - end - - # Controls whether highly similar jobs are returned next to each other in - # the search results. Jobs are identified as highly similar based on - # their titles, job categories, and locations. Highly similar results are - # clustered so that only one representative job of the cluster is - # displayed to the job seeker higher up in the results, with the other jobs - # being displayed lower down in the results. - module DiversificationLevel - # The diversification level isn't specified. - DIVERSIFICATION_LEVEL_UNSPECIFIED = 0 - - # Disables diversification. Jobs that would normally be pushed to the last - # page would not have their positions altered. This may result in highly - # similar jobs appearing in sequence in the search results. - DISABLED = 1 - - # Default diversifying behavior. The result list is ordered so that - # highly similar results are pushed to the end of the last page of search - # results. If you are using pageToken to page through the result set, - # latency might be lower but we can't guarantee that all results are - # returned. If you are using page offset, latency might be higher but all - # results are returned. - SIMPLE = 2 - end - - # Controls what keyword matching behavior the search has. When keyword - # matching is enabled, a keyword match returns jobs that may not match given - # category filters when there are matching keywords. For example, for the - # query "program manager" with KeywordMatchMode set to KEYWORD_MATCH_ALL, a - # job posting with the title "software developer," which doesn't fall into - # "program manager" ontology, and "program manager" appearing in its - # description will be surfaced. - # - # For queries like "cloud" that don't contain title or - # location specific ontology, jobs with "cloud" keyword matches are returned - # regardless of this enum's value. - # - # Use - # {::Google::Cloud::Talent::V4beta1::Company#keyword_searchable_job_custom_attributes Company.keyword_searchable_job_custom_attributes} - # if company-specific globally matched custom field/attribute string values - # are needed. Enabling keyword match improves recall of subsequent search - # requests. - module KeywordMatchMode - # The keyword match option isn't specified. Defaults to - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest::KeywordMatchMode::KEYWORD_MATCH_ALL KeywordMatchMode.KEYWORD_MATCH_ALL} - # behavior. - KEYWORD_MATCH_MODE_UNSPECIFIED = 0 - - # Disables keyword matching. - KEYWORD_MATCH_DISABLED = 1 - - # Enable keyword matching over - # {::Google::Cloud::Talent::V4beta1::Job#title Job.title}, - # {::Google::Cloud::Talent::V4beta1::Job#description Job.description}, - # {::Google::Cloud::Talent::V4beta1::Job#company_display_name Job.company_display_name}, - # {::Google::Cloud::Talent::V4beta1::Job#addresses Job.addresses}, - # {::Google::Cloud::Talent::V4beta1::Job#qualifications Job.qualifications}, and - # keyword searchable - # {::Google::Cloud::Talent::V4beta1::Job#custom_attributes Job.custom_attributes} - # fields. - KEYWORD_MATCH_ALL = 2 - - # Only enable keyword matching over - # {::Google::Cloud::Talent::V4beta1::Job#title Job.title}. - KEYWORD_MATCH_TITLE_ONLY = 3 - end - - # The relevance threshold of the search results. The higher relevance - # threshold is, the higher relevant results are shown and the less number of - # results are returned. - module RelevanceThreshold - # Default value. In this case, server behavior defaults to Google defined - # threshold. - RELEVANCE_THRESHOLD_UNSPECIFIED = 0 - - # Lowest relevance threshold. - LOWEST = 1 - - # Low relevance threshold. - LOW = 2 - - # Medium relevance threshold. - MEDIUM = 3 - - # High relevance threshold. - HIGH = 4 - end - end - - # Response for SearchJob method. - # @!attribute [rw] matching_jobs - # @return [::Array<::Google::Cloud::Talent::V4beta1::SearchJobsResponse::MatchingJob>] - # The Job entities that match the specified - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest SearchJobsRequest}. - # @!attribute [rw] histogram_query_results - # @return [::Array<::Google::Cloud::Talent::V4beta1::HistogramQueryResult>] - # The histogram results that match with specified - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest#histogram_queries SearchJobsRequest.histogram_queries}. - # @!attribute [rw] next_page_token - # @return [::String] - # The token that specifies the starting position of the next page of results. - # This field is empty if there are no more results. - # @!attribute [rw] location_filters - # @return [::Array<::Google::Cloud::Talent::V4beta1::Location>] - # The location filters that the service applied to the specified query. If - # any filters are lat-lng based, the - # {::Google::Cloud::Talent::V4beta1::Location#location_type Location.location_type} - # is - # {::Google::Cloud::Talent::V4beta1::Location::LocationType::LOCATION_TYPE_UNSPECIFIED Location.LocationType.LOCATION_TYPE_UNSPECIFIED}. - # @!attribute [rw] estimated_total_size - # @return [::Integer] - # An estimation of the number of jobs that match the specified query. - # - # This number isn't guaranteed to be accurate. For accurate results, - # see - # {::Google::Cloud::Talent::V4beta1::SearchJobsResponse#total_size SearchJobsResponse.total_size}. - # @!attribute [rw] total_size - # @return [::Integer] - # The precise result count with limit 100,000. - # @!attribute [rw] metadata - # @return [::Google::Cloud::Talent::V4beta1::ResponseMetadata] - # Additional information for the API invocation, such as the request - # tracking id. - # @!attribute [rw] broadened_query_jobs_count - # @return [::Integer] - # If query broadening is enabled, we may append additional results from the - # broadened query. This number indicates how many of the jobs returned in the - # jobs field are from the broadened query. These results are always at the - # end of the jobs list. In particular, a value of 0, or if the field isn't - # set, all the jobs in the jobs list are from the original - # (without broadening) query. If this field is non-zero, subsequent requests - # with offset after this result set should contain all broadened results. - # @!attribute [rw] spell_correction - # @return [::Google::Cloud::Talent::V4beta1::SpellingCorrection] - # The spell checking result, and correction. - class SearchJobsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Job entry with metadata inside - # {::Google::Cloud::Talent::V4beta1::SearchJobsResponse SearchJobsResponse}. - # @!attribute [rw] job - # @return [::Google::Cloud::Talent::V4beta1::Job] - # Job resource that matches the specified - # {::Google::Cloud::Talent::V4beta1::SearchJobsRequest SearchJobsRequest}. - # @!attribute [rw] job_summary - # @return [::String] - # A summary of the job with core information that's displayed on the search - # results listing page. - # @!attribute [rw] job_title_snippet - # @return [::String] - # Contains snippets of text from the - # {::Google::Cloud::Talent::V4beta1::Job#title Job.title} field most closely - # matching a search query's keywords, if available. The matching query - # keywords are enclosed in HTML bold tags. - # @!attribute [rw] search_text_snippet - # @return [::String] - # Contains snippets of text from the - # {::Google::Cloud::Talent::V4beta1::Job#description Job.description} and - # similar fields that most closely match a search query's keywords, if - # available. All HTML tags in the original fields are stripped when - # returned in this field, and matching query keywords are enclosed in HTML - # bold tags. - # @!attribute [rw] commute_info - # @return [::Google::Cloud::Talent::V4beta1::SearchJobsResponse::CommuteInfo] - # Commute information which is generated based on specified - # {::Google::Cloud::Talent::V4beta1::CommuteFilter CommuteFilter}. - class MatchingJob - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Commute details related to this job. - # @!attribute [rw] job_location - # @return [::Google::Cloud::Talent::V4beta1::Location] - # Location used as the destination in the commute calculation. - # @!attribute [rw] travel_duration - # @return [::Google::Protobuf::Duration] - # The number of seconds required to travel to the job location from the - # query location. A duration of 0 seconds indicates that the job isn't - # reachable within the requested duration, but was returned as part of an - # expanded query. - class CommuteInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request to create a batch of jobs. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the tenant under which the job is created. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, - # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant - # is created. For example, "projects/foo". - # @!attribute [rw] jobs - # @return [::Array<::Google::Cloud::Talent::V4beta1::Job>] - # Required. The jobs to be created. - class BatchCreateJobsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to update a batch of jobs. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the tenant under which the job is created. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example, - # "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant - # is created. For example, "projects/foo". - # @!attribute [rw] jobs - # @return [::Array<::Google::Cloud::Talent::V4beta1::Job>] - # Required. The jobs to be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Strongly recommended for the best service experience. Be aware that it will - # also increase latency when checking the status of a batch operation. - # - # If - # {::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest#update_mask update_mask} - # is provided, only the specified fields in - # {::Google::Cloud::Talent::V4beta1::Job Job} are updated. Otherwise all the - # fields are updated. - # - # A field mask to restrict the fields that are updated. Only - # top level fields of {::Google::Cloud::Talent::V4beta1::Job Job} are supported. - # - # If - # {::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest#update_mask update_mask} - # is provided, The {::Google::Cloud::Talent::V4beta1::Job Job} inside - # {::Google::Cloud::Talent::V4beta1::JobOperationResult::JobResult JobResult} - # will only contains fields that is updated, plus the Id of the Job. - # Otherwise, {::Google::Cloud::Talent::V4beta1::Job Job} will include all fields, - # which can yield a very large response. - class BatchUpdateJobsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The result of - # {::Google::Cloud::Talent::V4beta1::JobService::Client#batch_create_jobs JobService.BatchCreateJobs} - # or - # {::Google::Cloud::Talent::V4beta1::JobService::Client#batch_update_jobs JobService.BatchUpdateJobs} - # APIs. It's used to replace - # {::Google::Longrunning::Operation#response google.longrunning.Operation.response} - # in case of success. - # @!attribute [rw] job_results - # @return [::Array<::Google::Cloud::Talent::V4beta1::JobOperationResult::JobResult>] - # List of job mutation results from a batch mutate operation. It can change - # until operation status is FINISHED, FAILED or CANCELLED. - class JobOperationResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Mutation result of a job. - # @!attribute [rw] job - # @return [::Google::Cloud::Talent::V4beta1::Job] - # Here {::Google::Cloud::Talent::V4beta1::Job Job} only contains basic - # information including {::Google::Cloud::Talent::V4beta1::Job#name name}, - # {::Google::Cloud::Talent::V4beta1::Job#company company}, - # {::Google::Cloud::Talent::V4beta1::Job#language_code language_code} and - # {::Google::Cloud::Talent::V4beta1::Job#requisition_id requisition_id}, use - # getJob method to retrieve detailed information of the created/updated - # job. - # @!attribute [rw] status - # @return [::Google::Rpc::Status] - # The status of the job processed. This field is populated if the - # processing of the - # {::Google::Cloud::Talent::V4beta1::JobOperationResult::JobResult#job job} - # fails. - class JobResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # An enum that specifies the job attributes that are returned in the - # {::Google::Cloud::Talent::V4beta1::SearchJobsResponse::MatchingJob#job MatchingJob.job} - # or {::Google::Cloud::Talent::V4beta1::ListJobsResponse#jobs ListJobsResponse.jobs} - # fields. - module JobView - # Default value. - JOB_VIEW_UNSPECIFIED = 0 - - # A ID only view of job, with following attributes: - # {::Google::Cloud::Talent::V4beta1::Job#name Job.name}, - # {::Google::Cloud::Talent::V4beta1::Job#requisition_id Job.requisition_id}, - # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}. - JOB_VIEW_ID_ONLY = 1 - - # A minimal view of the job, with the following attributes: - # {::Google::Cloud::Talent::V4beta1::Job#name Job.name}, - # {::Google::Cloud::Talent::V4beta1::Job#requisition_id Job.requisition_id}, - # {::Google::Cloud::Talent::V4beta1::Job#title Job.title}, - # {::Google::Cloud::Talent::V4beta1::Job#company Job.company}, - # {::Google::Cloud::Talent::V4beta1::Job::DerivedInfo#locations Job.DerivedInfo.locations}, - # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}. - JOB_VIEW_MINIMAL = 2 - - # A small view of the job, with the following attributes in the search - # results: {::Google::Cloud::Talent::V4beta1::Job#name Job.name}, - # {::Google::Cloud::Talent::V4beta1::Job#requisition_id Job.requisition_id}, - # {::Google::Cloud::Talent::V4beta1::Job#title Job.title}, - # {::Google::Cloud::Talent::V4beta1::Job#company Job.company}, - # {::Google::Cloud::Talent::V4beta1::Job::DerivedInfo#locations Job.DerivedInfo.locations}, - # {::Google::Cloud::Talent::V4beta1::Job#visibility Job.visibility}, - # {::Google::Cloud::Talent::V4beta1::Job#language_code Job.language_code}, - # {::Google::Cloud::Talent::V4beta1::Job#description Job.description}. - JOB_VIEW_SMALL = 3 - - # All available attributes are included in the search results. - JOB_VIEW_FULL = 4 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/tenant.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/tenant.rb deleted file mode 100644 index 753ca78ba193..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/tenant.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! - - -module Google - module Cloud - module Talent - module V4beta1 - # A Tenant resource represents a tenant in the service. A tenant is a group or - # entity that shares common access with specific privileges for resources like - # profiles. Customer may create multiple tenants to provide data isolation for - # different groups. - # @!attribute [rw] name - # @return [::String] - # Required during tenant update. - # - # The resource name for a tenant. This is generated by the service when a - # tenant is created. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, - # "projects/foo/tenants/bar". - # @!attribute [rw] external_id - # @return [::String] - # Required. Client side tenant identifier, used to uniquely identify the - # tenant. - # - # The maximum number of allowed characters is 255. - # @!attribute [rw] usage_type - # @return [::Google::Cloud::Talent::V4beta1::Tenant::DataUsageType] - # Indicates whether data owned by this tenant may be used to provide product - # improvements across other tenants. - # - # Defaults behavior is - # {::Google::Cloud::Talent::V4beta1::Tenant::DataUsageType::ISOLATED DataUsageType.ISOLATED} - # if it's unset. - # @!attribute [rw] keyword_searchable_profile_custom_attributes - # @return [::Array<::String>] - # A list of keys of filterable - # [Profile.custom_attributes][google.cloud.talent.v4beta1.Profile.custom_attributes], - # whose corresponding `string_values` are used in keyword searches. Profiles - # with `string_values` under these specified field keys are returned if any - # of the values match the search keyword. Custom field values with - # parenthesis, brackets and special symbols are not searchable as-is, - # and must be surrounded by quotes. - class Tenant - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum that represents how user data owned by the tenant is used. - module DataUsageType - # Default value. - DATA_USAGE_TYPE_UNSPECIFIED = 0 - - # Data owned by this tenant is used to improve search/recommendation - # quality across tenants. - AGGREGATED = 1 - - # Data owned by this tenant is used to improve search/recommendation - # quality for this tenant only. - ISOLATED = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/tenant_service.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/tenant_service.rb deleted file mode 100644 index 25d9ffc34d5c..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/cloud/talent/v4beta1/tenant_service.rb +++ /dev/null @@ -1,123 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Talent - module V4beta1 - # The Request of the CreateTenant method. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the project under which the tenant is created. - # - # The format is "projects/\\{project_id}", for example, - # "projects/foo". - # @!attribute [rw] tenant - # @return [::Google::Cloud::Talent::V4beta1::Tenant] - # Required. The tenant to be created. - class CreateTenantRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for getting a tenant by name. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the tenant to be retrieved. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, - # "projects/foo/tenants/bar". - class GetTenantRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for updating a specified tenant. - # @!attribute [rw] tenant - # @return [::Google::Cloud::Talent::V4beta1::Tenant] - # Required. The tenant resource to replace the current resource in the - # system. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Strongly recommended for the best service experience. - # - # If - # {::Google::Cloud::Talent::V4beta1::UpdateTenantRequest#update_mask update_mask} - # is provided, only the specified fields in - # {::Google::Cloud::Talent::V4beta1::UpdateTenantRequest#tenant tenant} are - # updated. Otherwise all the fields are updated. - # - # A field mask to specify the tenant fields to be updated. Only - # top level fields of {::Google::Cloud::Talent::V4beta1::Tenant Tenant} are - # supported. - class UpdateTenantRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to delete a tenant. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the tenant to be deleted. - # - # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example, - # "projects/foo/tenants/bar". - class DeleteTenantRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List tenants for which the client has ACL visibility. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the project under which the tenant is created. - # - # The format is "projects/\\{project_id}", for example, - # "projects/foo". - # @!attribute [rw] page_token - # @return [::String] - # The starting indicator from which to return results. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of tenants to be returned, at most 100. - # Default is 100 if a non-positive number is provided. - class ListTenantsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The List tenants response object. - # @!attribute [rw] tenants - # @return [::Array<::Google::Cloud::Talent::V4beta1::Tenant>] - # Tenants for the current client. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. - # @!attribute [rw] metadata - # @return [::Google::Cloud::Talent::V4beta1::ResponseMetadata] - # Additional information for the API invocation, such as the request - # tracking id. - class ListTenantsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,148 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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`. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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-talent-v4beta1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/proto_docs/google/type/latlng.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/type/latlng.rb deleted file mode 100644 index c15e78a39a56..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/proto_docs/google/type/money.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/type/money.rb deleted file mode 100644 index 56a32eee300d..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/type/money.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 an amount of money with its currency type. - # @!attribute [rw] currency_code - # @return [::String] - # The three-letter currency code defined in ISO 4217. - # @!attribute [rw] units - # @return [::Integer] - # The whole units of the amount. - # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. - # @!attribute [rw] nanos - # @return [::Integer] - # Number of nano (10^-9) units of the amount. - # The value must be between -999,999,999 and +999,999,999 inclusive. - # If `units` is positive, `nanos` must be positive or zero. - # If `units` is zero, `nanos` can be positive, zero, or negative. - # If `units` is negative, `nanos` must be negative or zero. - # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. - class Money - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/type/postal_address.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/type/postal_address.rb deleted file mode 100644 index 9cd0c16495dd..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/proto_docs/google/type/timeofday.rb b/owl-bot-staging/google-cloud-talent-v4beta1/proto_docs/google/type/timeofday.rb deleted file mode 100644 index 8372dad8beb8..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/Gemfile deleted file mode 100644 index 4f040c286bc0..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/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-talent-v4beta1", path: "../" -else - gem "google-cloud-talent-v4beta1" -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-talent-v4beta1/snippets/company_service/create_company.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/create_company.rb deleted file mode 100644 index 6b8b2dacf42b..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/create_company.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 jobs_v4beta1_generated_CompanyService_CreateCompany_sync] -require "google/cloud/talent/v4beta1" - -## -# Snippet for the create_company call in the CompanyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Talent::V4beta1::CompanyService::Client#create_company. -# -def create_company - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Talent::V4beta1::CompanyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Talent::V4beta1::CreateCompanyRequest.new - - # Call the create_company method. - result = client.create_company request - - # The returned object is of type Google::Cloud::Talent::V4beta1::Company. - p result -end -# [END jobs_v4beta1_generated_CompanyService_CreateCompany_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/delete_company.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/delete_company.rb deleted file mode 100644 index e48c9d498ed6..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/delete_company.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 jobs_v4beta1_generated_CompanyService_DeleteCompany_sync] -require "google/cloud/talent/v4beta1" - -## -# Snippet for the delete_company call in the CompanyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Talent::V4beta1::CompanyService::Client#delete_company. -# -def delete_company - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Talent::V4beta1::CompanyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Talent::V4beta1::DeleteCompanyRequest.new - - # Call the delete_company method. - result = client.delete_company request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END jobs_v4beta1_generated_CompanyService_DeleteCompany_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/get_company.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/get_company.rb deleted file mode 100644 index 3e959944036d..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/get_company.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 jobs_v4beta1_generated_CompanyService_GetCompany_sync] -require "google/cloud/talent/v4beta1" - -## -# Snippet for the get_company call in the CompanyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Talent::V4beta1::CompanyService::Client#get_company. -# -def get_company - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Talent::V4beta1::CompanyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Talent::V4beta1::GetCompanyRequest.new - - # Call the get_company method. - result = client.get_company request - - # The returned object is of type Google::Cloud::Talent::V4beta1::Company. - p result -end -# [END jobs_v4beta1_generated_CompanyService_GetCompany_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/list_companies.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/list_companies.rb deleted file mode 100644 index b54cf08a88ea..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/list_companies.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 jobs_v4beta1_generated_CompanyService_ListCompanies_sync] -require "google/cloud/talent/v4beta1" - -## -# Snippet for the list_companies call in the CompanyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Talent::V4beta1::CompanyService::Client#list_companies. -# -def list_companies - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Talent::V4beta1::CompanyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Talent::V4beta1::ListCompaniesRequest.new - - # Call the list_companies method. - result = client.list_companies request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Talent::V4beta1::Company. - p item - end -end -# [END jobs_v4beta1_generated_CompanyService_ListCompanies_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/update_company.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/update_company.rb deleted file mode 100644 index 76f7dfb2fd71..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/company_service/update_company.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 jobs_v4beta1_generated_CompanyService_UpdateCompany_sync] -require "google/cloud/talent/v4beta1" - -## -# Snippet for the update_company call in the CompanyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Talent::V4beta1::CompanyService::Client#update_company. -# -def update_company - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Talent::V4beta1::CompanyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Talent::V4beta1::UpdateCompanyRequest.new - - # Call the update_company method. - result = client.update_company request - - # The returned object is of type Google::Cloud::Talent::V4beta1::Company. - p result -end -# [END jobs_v4beta1_generated_CompanyService_UpdateCompany_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/completion/complete_query.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/completion/complete_query.rb deleted file mode 100644 index 115a3726dcbb..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/completion/complete_query.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 jobs_v4beta1_generated_Completion_CompleteQuery_sync] -require "google/cloud/talent/v4beta1" - -## -# Snippet for the complete_query call in the Completion service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Talent::V4beta1::Completion::Client#complete_query. -# -def complete_query - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Talent::V4beta1::Completion::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Talent::V4beta1::CompleteQueryRequest.new - - # Call the complete_query method. - result = client.complete_query request - - # The returned object is of type Google::Cloud::Talent::V4beta1::CompleteQueryResponse. - p result -end -# [END jobs_v4beta1_generated_Completion_CompleteQuery_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/event_service/create_client_event.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/event_service/create_client_event.rb deleted file mode 100644 index 8bb1b5d44021..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/event_service/create_client_event.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 jobs_v4beta1_generated_EventService_CreateClientEvent_sync] -require "google/cloud/talent/v4beta1" - -## -# Snippet for the create_client_event call in the EventService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Talent::V4beta1::EventService::Client#create_client_event. -# -def create_client_event - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Talent::V4beta1::EventService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Talent::V4beta1::CreateClientEventRequest.new - - # Call the create_client_event method. - result = client.create_client_event request - - # The returned object is of type Google::Cloud::Talent::V4beta1::ClientEvent. - p result -end -# [END jobs_v4beta1_generated_EventService_CreateClientEvent_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/batch_create_jobs.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/batch_create_jobs.rb deleted file mode 100644 index 52410b1d37e0..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/batch_create_jobs.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 jobs_v4beta1_generated_JobService_BatchCreateJobs_sync] -require "google/cloud/talent/v4beta1" - -## -# Snippet for the batch_create_jobs call in the JobService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Talent::V4beta1::JobService::Client#batch_create_jobs. -# -def batch_create_jobs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Talent::V4beta1::JobService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest.new - - # Call the batch_create_jobs method. - result = client.batch_create_jobs request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END jobs_v4beta1_generated_JobService_BatchCreateJobs_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/batch_delete_jobs.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/batch_delete_jobs.rb deleted file mode 100644 index f3027a6f9bab..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/batch_delete_jobs.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 jobs_v4beta1_generated_JobService_BatchDeleteJobs_sync] -require "google/cloud/talent/v4beta1" - -## -# Snippet for the batch_delete_jobs call in the JobService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Talent::V4beta1::JobService::Client#batch_delete_jobs. -# -def batch_delete_jobs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Talent::V4beta1::JobService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest.new - - # Call the batch_delete_jobs method. - result = client.batch_delete_jobs request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END jobs_v4beta1_generated_JobService_BatchDeleteJobs_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/batch_update_jobs.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/batch_update_jobs.rb deleted file mode 100644 index 705897a8a222..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/batch_update_jobs.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 jobs_v4beta1_generated_JobService_BatchUpdateJobs_sync] -require "google/cloud/talent/v4beta1" - -## -# Snippet for the batch_update_jobs call in the JobService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Talent::V4beta1::JobService::Client#batch_update_jobs. -# -def batch_update_jobs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Talent::V4beta1::JobService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest.new - - # Call the batch_update_jobs method. - result = client.batch_update_jobs request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END jobs_v4beta1_generated_JobService_BatchUpdateJobs_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/create_job.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/create_job.rb deleted file mode 100644 index 2bc55828df04..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/create_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START jobs_v4beta1_generated_JobService_CreateJob_sync] -require "google/cloud/talent/v4beta1" - -## -# Snippet for the create_job call in the JobService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Talent::V4beta1::JobService::Client#create_job. -# -def create_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Talent::V4beta1::JobService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Talent::V4beta1::CreateJobRequest.new - - # Call the create_job method. - result = client.create_job request - - # The returned object is of type Google::Cloud::Talent::V4beta1::Job. - p result -end -# [END jobs_v4beta1_generated_JobService_CreateJob_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/delete_job.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/delete_job.rb deleted file mode 100644 index 3ae4c08f0537..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/delete_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START jobs_v4beta1_generated_JobService_DeleteJob_sync] -require "google/cloud/talent/v4beta1" - -## -# Snippet for the delete_job call in the JobService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Talent::V4beta1::JobService::Client#delete_job. -# -def delete_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Talent::V4beta1::JobService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Talent::V4beta1::DeleteJobRequest.new - - # Call the delete_job method. - result = client.delete_job request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END jobs_v4beta1_generated_JobService_DeleteJob_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/get_job.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/get_job.rb deleted file mode 100644 index 5791d265581b..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/get_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START jobs_v4beta1_generated_JobService_GetJob_sync] -require "google/cloud/talent/v4beta1" - -## -# Snippet for the get_job call in the JobService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Talent::V4beta1::JobService::Client#get_job. -# -def get_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Talent::V4beta1::JobService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Talent::V4beta1::GetJobRequest.new - - # Call the get_job method. - result = client.get_job request - - # The returned object is of type Google::Cloud::Talent::V4beta1::Job. - p result -end -# [END jobs_v4beta1_generated_JobService_GetJob_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/list_jobs.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/list_jobs.rb deleted file mode 100644 index 3f3c15a1a8a3..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/list_jobs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START jobs_v4beta1_generated_JobService_ListJobs_sync] -require "google/cloud/talent/v4beta1" - -## -# Snippet for the list_jobs call in the JobService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Talent::V4beta1::JobService::Client#list_jobs. -# -def list_jobs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Talent::V4beta1::JobService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Talent::V4beta1::ListJobsRequest.new - - # Call the list_jobs method. - result = client.list_jobs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Talent::V4beta1::Job. - p item - end -end -# [END jobs_v4beta1_generated_JobService_ListJobs_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/search_jobs.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/search_jobs.rb deleted file mode 100644 index fa31d7955f21..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/search_jobs.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 jobs_v4beta1_generated_JobService_SearchJobs_sync] -require "google/cloud/talent/v4beta1" - -## -# Snippet for the search_jobs call in the JobService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Talent::V4beta1::JobService::Client#search_jobs. -# -def search_jobs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Talent::V4beta1::JobService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Talent::V4beta1::SearchJobsRequest.new - - # Call the search_jobs method. - result = client.search_jobs request - - # The returned object is of type Google::Cloud::Talent::V4beta1::SearchJobsResponse. - p result -end -# [END jobs_v4beta1_generated_JobService_SearchJobs_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/search_jobs_for_alert.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/search_jobs_for_alert.rb deleted file mode 100644 index 1407454f27d0..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/search_jobs_for_alert.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 jobs_v4beta1_generated_JobService_SearchJobsForAlert_sync] -require "google/cloud/talent/v4beta1" - -## -# Snippet for the search_jobs_for_alert call in the JobService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Talent::V4beta1::JobService::Client#search_jobs_for_alert. -# -def search_jobs_for_alert - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Talent::V4beta1::JobService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Talent::V4beta1::SearchJobsRequest.new - - # Call the search_jobs_for_alert method. - result = client.search_jobs_for_alert request - - # The returned object is of type Google::Cloud::Talent::V4beta1::SearchJobsResponse. - p result -end -# [END jobs_v4beta1_generated_JobService_SearchJobsForAlert_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/update_job.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/update_job.rb deleted file mode 100644 index 4e67dd7eb051..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/job_service/update_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START jobs_v4beta1_generated_JobService_UpdateJob_sync] -require "google/cloud/talent/v4beta1" - -## -# Snippet for the update_job call in the JobService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Talent::V4beta1::JobService::Client#update_job. -# -def update_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Talent::V4beta1::JobService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Talent::V4beta1::UpdateJobRequest.new - - # Call the update_job method. - result = client.update_job request - - # The returned object is of type Google::Cloud::Talent::V4beta1::Job. - p result -end -# [END jobs_v4beta1_generated_JobService_UpdateJob_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/snippet_metadata_google.cloud.talent.v4beta1.json b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/snippet_metadata_google.cloud.talent.v4beta1.json deleted file mode 100644 index d2cdb2a5f735..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/snippet_metadata_google.cloud.talent.v4beta1.json +++ /dev/null @@ -1,895 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-talent-v4beta1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.talent.v4beta1", - "version": "v4beta1" - } - ] - }, - "snippets": [ - { - "region_tag": "jobs_v4beta1_generated_CompanyService_CreateCompany_sync", - "title": "Snippet for the create_company call in the CompanyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::CompanyService::Client#create_company.", - "file": "company_service/create_company.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_company", - "full_name": "::Google::Cloud::Talent::V4beta1::CompanyService::Client#create_company", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Talent::V4beta1::CreateCompanyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Talent::V4beta1::Company", - "client": { - "short_name": "CompanyService::Client", - "full_name": "::Google::Cloud::Talent::V4beta1::CompanyService::Client" - }, - "method": { - "short_name": "CreateCompany", - "full_name": "google.cloud.talent.v4beta1.CompanyService.CreateCompany", - "service": { - "short_name": "CompanyService", - "full_name": "google.cloud.talent.v4beta1.CompanyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "jobs_v4beta1_generated_CompanyService_GetCompany_sync", - "title": "Snippet for the get_company call in the CompanyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::CompanyService::Client#get_company.", - "file": "company_service/get_company.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_company", - "full_name": "::Google::Cloud::Talent::V4beta1::CompanyService::Client#get_company", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Talent::V4beta1::GetCompanyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Talent::V4beta1::Company", - "client": { - "short_name": "CompanyService::Client", - "full_name": "::Google::Cloud::Talent::V4beta1::CompanyService::Client" - }, - "method": { - "short_name": "GetCompany", - "full_name": "google.cloud.talent.v4beta1.CompanyService.GetCompany", - "service": { - "short_name": "CompanyService", - "full_name": "google.cloud.talent.v4beta1.CompanyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "jobs_v4beta1_generated_CompanyService_UpdateCompany_sync", - "title": "Snippet for the update_company call in the CompanyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::CompanyService::Client#update_company.", - "file": "company_service/update_company.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_company", - "full_name": "::Google::Cloud::Talent::V4beta1::CompanyService::Client#update_company", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Talent::V4beta1::Company", - "client": { - "short_name": "CompanyService::Client", - "full_name": "::Google::Cloud::Talent::V4beta1::CompanyService::Client" - }, - "method": { - "short_name": "UpdateCompany", - "full_name": "google.cloud.talent.v4beta1.CompanyService.UpdateCompany", - "service": { - "short_name": "CompanyService", - "full_name": "google.cloud.talent.v4beta1.CompanyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "jobs_v4beta1_generated_CompanyService_DeleteCompany_sync", - "title": "Snippet for the delete_company call in the CompanyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::CompanyService::Client#delete_company.", - "file": "company_service/delete_company.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_company", - "full_name": "::Google::Cloud::Talent::V4beta1::CompanyService::Client#delete_company", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "CompanyService::Client", - "full_name": "::Google::Cloud::Talent::V4beta1::CompanyService::Client" - }, - "method": { - "short_name": "DeleteCompany", - "full_name": "google.cloud.talent.v4beta1.CompanyService.DeleteCompany", - "service": { - "short_name": "CompanyService", - "full_name": "google.cloud.talent.v4beta1.CompanyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "jobs_v4beta1_generated_CompanyService_ListCompanies_sync", - "title": "Snippet for the list_companies call in the CompanyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::CompanyService::Client#list_companies.", - "file": "company_service/list_companies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_companies", - "full_name": "::Google::Cloud::Talent::V4beta1::CompanyService::Client#list_companies", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Talent::V4beta1::ListCompaniesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Talent::V4beta1::ListCompaniesResponse", - "client": { - "short_name": "CompanyService::Client", - "full_name": "::Google::Cloud::Talent::V4beta1::CompanyService::Client" - }, - "method": { - "short_name": "ListCompanies", - "full_name": "google.cloud.talent.v4beta1.CompanyService.ListCompanies", - "service": { - "short_name": "CompanyService", - "full_name": "google.cloud.talent.v4beta1.CompanyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "jobs_v4beta1_generated_Completion_CompleteQuery_sync", - "title": "Snippet for the complete_query call in the Completion service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::Completion::Client#complete_query.", - "file": "completion/complete_query.rb", - "language": "RUBY", - "client_method": { - "short_name": "complete_query", - "full_name": "::Google::Cloud::Talent::V4beta1::Completion::Client#complete_query", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Talent::V4beta1::CompleteQueryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Talent::V4beta1::CompleteQueryResponse", - "client": { - "short_name": "Completion::Client", - "full_name": "::Google::Cloud::Talent::V4beta1::Completion::Client" - }, - "method": { - "short_name": "CompleteQuery", - "full_name": "google.cloud.talent.v4beta1.Completion.CompleteQuery", - "service": { - "short_name": "Completion", - "full_name": "google.cloud.talent.v4beta1.Completion" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "jobs_v4beta1_generated_EventService_CreateClientEvent_sync", - "title": "Snippet for the create_client_event call in the EventService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::EventService::Client#create_client_event.", - "file": "event_service/create_client_event.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_client_event", - "full_name": "::Google::Cloud::Talent::V4beta1::EventService::Client#create_client_event", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Talent::V4beta1::CreateClientEventRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Talent::V4beta1::ClientEvent", - "client": { - "short_name": "EventService::Client", - "full_name": "::Google::Cloud::Talent::V4beta1::EventService::Client" - }, - "method": { - "short_name": "CreateClientEvent", - "full_name": "google.cloud.talent.v4beta1.EventService.CreateClientEvent", - "service": { - "short_name": "EventService", - "full_name": "google.cloud.talent.v4beta1.EventService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "jobs_v4beta1_generated_JobService_CreateJob_sync", - "title": "Snippet for the create_job call in the JobService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::JobService::Client#create_job.", - "file": "job_service/create_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_job", - "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client#create_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Talent::V4beta1::CreateJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Talent::V4beta1::Job", - "client": { - "short_name": "JobService::Client", - "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client" - }, - "method": { - "short_name": "CreateJob", - "full_name": "google.cloud.talent.v4beta1.JobService.CreateJob", - "service": { - "short_name": "JobService", - "full_name": "google.cloud.talent.v4beta1.JobService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "jobs_v4beta1_generated_JobService_BatchCreateJobs_sync", - "title": "Snippet for the batch_create_jobs call in the JobService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::JobService::Client#batch_create_jobs.", - "file": "job_service/batch_create_jobs.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_create_jobs", - "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client#batch_create_jobs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "JobService::Client", - "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client" - }, - "method": { - "short_name": "BatchCreateJobs", - "full_name": "google.cloud.talent.v4beta1.JobService.BatchCreateJobs", - "service": { - "short_name": "JobService", - "full_name": "google.cloud.talent.v4beta1.JobService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "jobs_v4beta1_generated_JobService_GetJob_sync", - "title": "Snippet for the get_job call in the JobService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::JobService::Client#get_job.", - "file": "job_service/get_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_job", - "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client#get_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Talent::V4beta1::GetJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Talent::V4beta1::Job", - "client": { - "short_name": "JobService::Client", - "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client" - }, - "method": { - "short_name": "GetJob", - "full_name": "google.cloud.talent.v4beta1.JobService.GetJob", - "service": { - "short_name": "JobService", - "full_name": "google.cloud.talent.v4beta1.JobService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "jobs_v4beta1_generated_JobService_UpdateJob_sync", - "title": "Snippet for the update_job call in the JobService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::JobService::Client#update_job.", - "file": "job_service/update_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_job", - "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client#update_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Talent::V4beta1::UpdateJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Talent::V4beta1::Job", - "client": { - "short_name": "JobService::Client", - "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client" - }, - "method": { - "short_name": "UpdateJob", - "full_name": "google.cloud.talent.v4beta1.JobService.UpdateJob", - "service": { - "short_name": "JobService", - "full_name": "google.cloud.talent.v4beta1.JobService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "jobs_v4beta1_generated_JobService_BatchUpdateJobs_sync", - "title": "Snippet for the batch_update_jobs call in the JobService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::JobService::Client#batch_update_jobs.", - "file": "job_service/batch_update_jobs.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_update_jobs", - "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client#batch_update_jobs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "JobService::Client", - "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client" - }, - "method": { - "short_name": "BatchUpdateJobs", - "full_name": "google.cloud.talent.v4beta1.JobService.BatchUpdateJobs", - "service": { - "short_name": "JobService", - "full_name": "google.cloud.talent.v4beta1.JobService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "jobs_v4beta1_generated_JobService_DeleteJob_sync", - "title": "Snippet for the delete_job call in the JobService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::JobService::Client#delete_job.", - "file": "job_service/delete_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_job", - "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client#delete_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Talent::V4beta1::DeleteJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "JobService::Client", - "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client" - }, - "method": { - "short_name": "DeleteJob", - "full_name": "google.cloud.talent.v4beta1.JobService.DeleteJob", - "service": { - "short_name": "JobService", - "full_name": "google.cloud.talent.v4beta1.JobService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "jobs_v4beta1_generated_JobService_BatchDeleteJobs_sync", - "title": "Snippet for the batch_delete_jobs call in the JobService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::JobService::Client#batch_delete_jobs.", - "file": "job_service/batch_delete_jobs.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_delete_jobs", - "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client#batch_delete_jobs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "JobService::Client", - "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client" - }, - "method": { - "short_name": "BatchDeleteJobs", - "full_name": "google.cloud.talent.v4beta1.JobService.BatchDeleteJobs", - "service": { - "short_name": "JobService", - "full_name": "google.cloud.talent.v4beta1.JobService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "jobs_v4beta1_generated_JobService_ListJobs_sync", - "title": "Snippet for the list_jobs call in the JobService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::JobService::Client#list_jobs.", - "file": "job_service/list_jobs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_jobs", - "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client#list_jobs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Talent::V4beta1::ListJobsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Talent::V4beta1::ListJobsResponse", - "client": { - "short_name": "JobService::Client", - "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client" - }, - "method": { - "short_name": "ListJobs", - "full_name": "google.cloud.talent.v4beta1.JobService.ListJobs", - "service": { - "short_name": "JobService", - "full_name": "google.cloud.talent.v4beta1.JobService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "jobs_v4beta1_generated_JobService_SearchJobs_sync", - "title": "Snippet for the search_jobs call in the JobService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::JobService::Client#search_jobs.", - "file": "job_service/search_jobs.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_jobs", - "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client#search_jobs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Talent::V4beta1::SearchJobsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Talent::V4beta1::SearchJobsResponse", - "client": { - "short_name": "JobService::Client", - "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client" - }, - "method": { - "short_name": "SearchJobs", - "full_name": "google.cloud.talent.v4beta1.JobService.SearchJobs", - "service": { - "short_name": "JobService", - "full_name": "google.cloud.talent.v4beta1.JobService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "jobs_v4beta1_generated_JobService_SearchJobsForAlert_sync", - "title": "Snippet for the search_jobs_for_alert call in the JobService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::JobService::Client#search_jobs_for_alert.", - "file": "job_service/search_jobs_for_alert.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_jobs_for_alert", - "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client#search_jobs_for_alert", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Talent::V4beta1::SearchJobsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Talent::V4beta1::SearchJobsResponse", - "client": { - "short_name": "JobService::Client", - "full_name": "::Google::Cloud::Talent::V4beta1::JobService::Client" - }, - "method": { - "short_name": "SearchJobsForAlert", - "full_name": "google.cloud.talent.v4beta1.JobService.SearchJobsForAlert", - "service": { - "short_name": "JobService", - "full_name": "google.cloud.talent.v4beta1.JobService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "jobs_v4beta1_generated_TenantService_CreateTenant_sync", - "title": "Snippet for the create_tenant call in the TenantService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::TenantService::Client#create_tenant.", - "file": "tenant_service/create_tenant.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_tenant", - "full_name": "::Google::Cloud::Talent::V4beta1::TenantService::Client#create_tenant", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Talent::V4beta1::CreateTenantRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Talent::V4beta1::Tenant", - "client": { - "short_name": "TenantService::Client", - "full_name": "::Google::Cloud::Talent::V4beta1::TenantService::Client" - }, - "method": { - "short_name": "CreateTenant", - "full_name": "google.cloud.talent.v4beta1.TenantService.CreateTenant", - "service": { - "short_name": "TenantService", - "full_name": "google.cloud.talent.v4beta1.TenantService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "jobs_v4beta1_generated_TenantService_GetTenant_sync", - "title": "Snippet for the get_tenant call in the TenantService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::TenantService::Client#get_tenant.", - "file": "tenant_service/get_tenant.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_tenant", - "full_name": "::Google::Cloud::Talent::V4beta1::TenantService::Client#get_tenant", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Talent::V4beta1::GetTenantRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Talent::V4beta1::Tenant", - "client": { - "short_name": "TenantService::Client", - "full_name": "::Google::Cloud::Talent::V4beta1::TenantService::Client" - }, - "method": { - "short_name": "GetTenant", - "full_name": "google.cloud.talent.v4beta1.TenantService.GetTenant", - "service": { - "short_name": "TenantService", - "full_name": "google.cloud.talent.v4beta1.TenantService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "jobs_v4beta1_generated_TenantService_UpdateTenant_sync", - "title": "Snippet for the update_tenant call in the TenantService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::TenantService::Client#update_tenant.", - "file": "tenant_service/update_tenant.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_tenant", - "full_name": "::Google::Cloud::Talent::V4beta1::TenantService::Client#update_tenant", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Talent::V4beta1::UpdateTenantRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Talent::V4beta1::Tenant", - "client": { - "short_name": "TenantService::Client", - "full_name": "::Google::Cloud::Talent::V4beta1::TenantService::Client" - }, - "method": { - "short_name": "UpdateTenant", - "full_name": "google.cloud.talent.v4beta1.TenantService.UpdateTenant", - "service": { - "short_name": "TenantService", - "full_name": "google.cloud.talent.v4beta1.TenantService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "jobs_v4beta1_generated_TenantService_DeleteTenant_sync", - "title": "Snippet for the delete_tenant call in the TenantService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::TenantService::Client#delete_tenant.", - "file": "tenant_service/delete_tenant.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_tenant", - "full_name": "::Google::Cloud::Talent::V4beta1::TenantService::Client#delete_tenant", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Talent::V4beta1::DeleteTenantRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "TenantService::Client", - "full_name": "::Google::Cloud::Talent::V4beta1::TenantService::Client" - }, - "method": { - "short_name": "DeleteTenant", - "full_name": "google.cloud.talent.v4beta1.TenantService.DeleteTenant", - "service": { - "short_name": "TenantService", - "full_name": "google.cloud.talent.v4beta1.TenantService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "jobs_v4beta1_generated_TenantService_ListTenants_sync", - "title": "Snippet for the list_tenants call in the TenantService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Talent::V4beta1::TenantService::Client#list_tenants.", - "file": "tenant_service/list_tenants.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_tenants", - "full_name": "::Google::Cloud::Talent::V4beta1::TenantService::Client#list_tenants", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Talent::V4beta1::ListTenantsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Talent::V4beta1::ListTenantsResponse", - "client": { - "short_name": "TenantService::Client", - "full_name": "::Google::Cloud::Talent::V4beta1::TenantService::Client" - }, - "method": { - "short_name": "ListTenants", - "full_name": "google.cloud.talent.v4beta1.TenantService.ListTenants", - "service": { - "short_name": "TenantService", - "full_name": "google.cloud.talent.v4beta1.TenantService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/create_tenant.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/create_tenant.rb deleted file mode 100644 index cfe7e22a91f5..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/create_tenant.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 jobs_v4beta1_generated_TenantService_CreateTenant_sync] -require "google/cloud/talent/v4beta1" - -## -# Snippet for the create_tenant call in the TenantService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Talent::V4beta1::TenantService::Client#create_tenant. -# -def create_tenant - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Talent::V4beta1::TenantService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Talent::V4beta1::CreateTenantRequest.new - - # Call the create_tenant method. - result = client.create_tenant request - - # The returned object is of type Google::Cloud::Talent::V4beta1::Tenant. - p result -end -# [END jobs_v4beta1_generated_TenantService_CreateTenant_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/delete_tenant.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/delete_tenant.rb deleted file mode 100644 index 33b7ae2f4b24..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/delete_tenant.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 jobs_v4beta1_generated_TenantService_DeleteTenant_sync] -require "google/cloud/talent/v4beta1" - -## -# Snippet for the delete_tenant call in the TenantService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Talent::V4beta1::TenantService::Client#delete_tenant. -# -def delete_tenant - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Talent::V4beta1::TenantService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Talent::V4beta1::DeleteTenantRequest.new - - # Call the delete_tenant method. - result = client.delete_tenant request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END jobs_v4beta1_generated_TenantService_DeleteTenant_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/get_tenant.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/get_tenant.rb deleted file mode 100644 index e4b463bf9e47..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/get_tenant.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 jobs_v4beta1_generated_TenantService_GetTenant_sync] -require "google/cloud/talent/v4beta1" - -## -# Snippet for the get_tenant call in the TenantService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Talent::V4beta1::TenantService::Client#get_tenant. -# -def get_tenant - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Talent::V4beta1::TenantService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Talent::V4beta1::GetTenantRequest.new - - # Call the get_tenant method. - result = client.get_tenant request - - # The returned object is of type Google::Cloud::Talent::V4beta1::Tenant. - p result -end -# [END jobs_v4beta1_generated_TenantService_GetTenant_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/list_tenants.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/list_tenants.rb deleted file mode 100644 index c79441100dcd..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/list_tenants.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 jobs_v4beta1_generated_TenantService_ListTenants_sync] -require "google/cloud/talent/v4beta1" - -## -# Snippet for the list_tenants call in the TenantService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Talent::V4beta1::TenantService::Client#list_tenants. -# -def list_tenants - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Talent::V4beta1::TenantService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Talent::V4beta1::ListTenantsRequest.new - - # Call the list_tenants method. - result = client.list_tenants request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Talent::V4beta1::Tenant. - p item - end -end -# [END jobs_v4beta1_generated_TenantService_ListTenants_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/update_tenant.rb b/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/update_tenant.rb deleted file mode 100644 index e2ec529755a4..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/snippets/tenant_service/update_tenant.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 jobs_v4beta1_generated_TenantService_UpdateTenant_sync] -require "google/cloud/talent/v4beta1" - -## -# Snippet for the update_tenant call in the TenantService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Talent::V4beta1::TenantService::Client#update_tenant. -# -def update_tenant - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Talent::V4beta1::TenantService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Talent::V4beta1::UpdateTenantRequest.new - - # Call the update_tenant method. - result = client.update_tenant request - - # The returned object is of type Google::Cloud::Talent::V4beta1::Tenant. - p result -end -# [END jobs_v4beta1_generated_TenantService_UpdateTenant_sync] diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/company_service_paths_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/company_service_paths_test.rb deleted file mode 100644 index df4661f2e50d..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/company_service_paths_test.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 "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/talent/v4beta1/company_service" - -class ::Google::Cloud::Talent::V4beta1::CompanyService::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_company_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.company_path project: "value0", tenant: "value1", company: "value2" - assert_equal "projects/value0/tenants/value1/companies/value2", path - - path = client.company_path project: "value0", company: "value1" - assert_equal "projects/value0/companies/value1", path - end - end - - def test_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end - - def test_tenant_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.tenant_path project: "value0", tenant: "value1" - assert_equal "projects/value0/tenants/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/company_service_rest_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/company_service_rest_test.rb deleted file mode 100644 index ffe14d2e9497..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/company_service_rest_test.rb +++ /dev/null @@ -1,374 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/talent/v4beta1/company_service_pb" -require "google/cloud/talent/v4beta1/company_service/rest" - - -class ::Google::Cloud::Talent::V4beta1::CompanyService::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_company - # Create test objects. - client_result = ::Google::Cloud::Talent::V4beta1::Company.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - company = {} - - create_company_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::ServiceStub.stub :transcode_create_company_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_company_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_company({ parent: parent, company: company }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_company parent: parent, company: company do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_company ::Google::Cloud::Talent::V4beta1::CreateCompanyRequest.new(parent: parent, company: company) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_company({ parent: parent, company: company }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_company(::Google::Cloud::Talent::V4beta1::CreateCompanyRequest.new(parent: parent, company: company), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_company_client_stub.call_count - end - end - end - - def test_get_company - # Create test objects. - client_result = ::Google::Cloud::Talent::V4beta1::Company.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_company_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::ServiceStub.stub :transcode_get_company_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_company_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_company({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_company name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_company ::Google::Cloud::Talent::V4beta1::GetCompanyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_company({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_company(::Google::Cloud::Talent::V4beta1::GetCompanyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_company_client_stub.call_count - end - end - end - - def test_update_company - # Create test objects. - client_result = ::Google::Cloud::Talent::V4beta1::Company.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - company = {} - update_mask = {} - - update_company_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::ServiceStub.stub :transcode_update_company_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_company_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_company({ company: company, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_company company: company, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_company ::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest.new(company: company, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_company({ company: company, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_company(::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest.new(company: company, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_company_client_stub.call_count - end - end - end - - def test_delete_company - # 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_company_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::ServiceStub.stub :transcode_delete_company_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_company_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_company({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_company name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_company ::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_company({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_company(::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_company_client_stub.call_count - end - end - end - - def test_list_companies - # Create test objects. - client_result = ::Google::Cloud::Talent::V4beta1::ListCompaniesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - require_open_jobs = true - - list_companies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::ServiceStub.stub :transcode_list_companies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_companies_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::CompanyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_companies({ parent: parent, page_token: page_token, page_size: page_size, require_open_jobs: require_open_jobs }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_companies parent: parent, page_token: page_token, page_size: page_size, require_open_jobs: require_open_jobs do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_companies ::Google::Cloud::Talent::V4beta1::ListCompaniesRequest.new(parent: parent, page_token: page_token, page_size: page_size, require_open_jobs: require_open_jobs) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_companies({ parent: parent, page_token: page_token, page_size: page_size, require_open_jobs: require_open_jobs }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_companies(::Google::Cloud::Talent::V4beta1::ListCompaniesRequest.new(parent: parent, page_token: page_token, page_size: page_size, require_open_jobs: require_open_jobs), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_companies_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::Talent::V4beta1::CompanyService::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::Talent::V4beta1::CompanyService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/company_service_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/company_service_test.rb deleted file mode 100644 index 326db3adc85c..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/company_service_test.rb +++ /dev/null @@ -1,409 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/talent/v4beta1/company_service_pb" -require "google/cloud/talent/v4beta1/company_service" - -class ::Google::Cloud::Talent::V4beta1::CompanyService::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_company - # Create GRPC objects. - grpc_response = ::Google::Cloud::Talent::V4beta1::Company.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - company = {} - - create_company_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_company, name - assert_kind_of ::Google::Cloud::Talent::V4beta1::CreateCompanyRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::Company), request["company"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_company_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_company({ parent: parent, company: company }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_company parent: parent, company: company do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_company ::Google::Cloud::Talent::V4beta1::CreateCompanyRequest.new(parent: parent, company: company) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_company({ parent: parent, company: company }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_company(::Google::Cloud::Talent::V4beta1::CreateCompanyRequest.new(parent: parent, company: company), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_company_client_stub.call_rpc_count - end - end - - def test_get_company - # Create GRPC objects. - grpc_response = ::Google::Cloud::Talent::V4beta1::Company.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_company_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_company, name - assert_kind_of ::Google::Cloud::Talent::V4beta1::GetCompanyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_company_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_company({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_company name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_company ::Google::Cloud::Talent::V4beta1::GetCompanyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_company({ 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_company(::Google::Cloud::Talent::V4beta1::GetCompanyRequest.new(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_company_client_stub.call_rpc_count - end - end - - def test_update_company - # Create GRPC objects. - grpc_response = ::Google::Cloud::Talent::V4beta1::Company.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - company = {} - update_mask = {} - - update_company_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_company, name - assert_kind_of ::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::Company), request["company"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_company_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_company({ company: company, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_company company: company, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_company ::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest.new(company: company, 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_company({ company: company, 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_company(::Google::Cloud::Talent::V4beta1::UpdateCompanyRequest.new(company: company, 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_company_client_stub.call_rpc_count - end - end - - def test_delete_company - # 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_company_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_company, name - assert_kind_of ::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_company_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_company({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_company name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_company ::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_company({ 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_company(::Google::Cloud::Talent::V4beta1::DeleteCompanyRequest.new(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_company_client_stub.call_rpc_count - end - end - - def test_list_companies - # Create GRPC objects. - grpc_response = ::Google::Cloud::Talent::V4beta1::ListCompaniesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_token = "hello world" - page_size = 42 - require_open_jobs = true - - list_companies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_companies, name - assert_kind_of ::Google::Cloud::Talent::V4beta1::ListCompaniesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - assert_equal true, request["require_open_jobs"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_companies_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::CompanyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_companies({ parent: parent, page_token: page_token, page_size: page_size, require_open_jobs: require_open_jobs }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_companies parent: parent, page_token: page_token, page_size: page_size, require_open_jobs: require_open_jobs do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_companies ::Google::Cloud::Talent::V4beta1::ListCompaniesRequest.new(parent: parent, page_token: page_token, page_size: page_size, require_open_jobs: require_open_jobs) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_companies({ parent: parent, page_token: page_token, page_size: page_size, require_open_jobs: require_open_jobs }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_companies(::Google::Cloud::Talent::V4beta1::ListCompaniesRequest.new(parent: parent, page_token: page_token, page_size: page_size, require_open_jobs: require_open_jobs), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_companies_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::Talent::V4beta1::CompanyService::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::Talent::V4beta1::CompanyService::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::Talent::V4beta1::CompanyService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Talent::V4beta1::CompanyService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/completion_paths_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/completion_paths_test.rb deleted file mode 100644 index 79274afedf5b..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/completion_paths_test.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 "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/talent/v4beta1/completion" - -class ::Google::Cloud::Talent::V4beta1::Completion::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_company_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Talent::V4beta1::Completion::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.company_path project: "value0", tenant: "value1", company: "value2" - assert_equal "projects/value0/tenants/value1/companies/value2", path - - path = client.company_path project: "value0", company: "value1" - assert_equal "projects/value0/companies/value1", path - end - end - - def test_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Talent::V4beta1::Completion::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end - - def test_tenant_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Talent::V4beta1::Completion::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.tenant_path project: "value0", tenant: "value1" - assert_equal "projects/value0/tenants/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/completion_rest_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/completion_rest_test.rb deleted file mode 100644 index 805eb4d0755b..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/completion_rest_test.rb +++ /dev/null @@ -1,159 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/talent/v4beta1/completion_service_pb" -require "google/cloud/talent/v4beta1/completion/rest" - - -class ::Google::Cloud::Talent::V4beta1::Completion::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_complete_query - # Create test objects. - client_result = ::Google::Cloud::Talent::V4beta1::CompleteQueryResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - query = "hello world" - language_codes = ["hello world"] - page_size = 42 - company = "hello world" - scope = :COMPLETION_SCOPE_UNSPECIFIED - type = :COMPLETION_TYPE_UNSPECIFIED - - complete_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::Talent::V4beta1::Completion::Rest::ServiceStub.stub :transcode_complete_query_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, complete_query_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::Completion::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.complete_query({ parent: parent, query: query, language_codes: language_codes, page_size: page_size, company: company, scope: scope, type: type }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.complete_query parent: parent, query: query, language_codes: language_codes, page_size: page_size, company: company, scope: scope, type: type do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.complete_query ::Google::Cloud::Talent::V4beta1::CompleteQueryRequest.new(parent: parent, query: query, language_codes: language_codes, page_size: page_size, company: company, scope: scope, type: type) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.complete_query({ parent: parent, query: query, language_codes: language_codes, page_size: page_size, company: company, scope: scope, type: type }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.complete_query(::Google::Cloud::Talent::V4beta1::CompleteQueryRequest.new(parent: parent, query: query, language_codes: language_codes, page_size: page_size, company: company, scope: scope, type: type), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, complete_query_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::Talent::V4beta1::Completion::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::Talent::V4beta1::Completion::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/completion_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/completion_test.rb deleted file mode 100644 index 7c545fda4a14..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/completion_test.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 "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/talent/v4beta1/completion_service_pb" -require "google/cloud/talent/v4beta1/completion" - -class ::Google::Cloud::Talent::V4beta1::Completion::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_complete_query - # Create GRPC objects. - grpc_response = ::Google::Cloud::Talent::V4beta1::CompleteQueryResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - query = "hello world" - language_codes = ["hello world"] - page_size = 42 - company = "hello world" - scope = :COMPLETION_SCOPE_UNSPECIFIED - type = :COMPLETION_TYPE_UNSPECIFIED - - complete_query_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :complete_query, name - assert_kind_of ::Google::Cloud::Talent::V4beta1::CompleteQueryRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["query"] - assert_equal ["hello world"], request["language_codes"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["company"] - assert_equal :COMPLETION_SCOPE_UNSPECIFIED, request["scope"] - assert_equal :COMPLETION_TYPE_UNSPECIFIED, request["type"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, complete_query_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::Completion::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.complete_query({ parent: parent, query: query, language_codes: language_codes, page_size: page_size, company: company, scope: scope, type: type }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.complete_query parent: parent, query: query, language_codes: language_codes, page_size: page_size, company: company, scope: scope, type: type do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.complete_query ::Google::Cloud::Talent::V4beta1::CompleteQueryRequest.new(parent: parent, query: query, language_codes: language_codes, page_size: page_size, company: company, scope: scope, type: type) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.complete_query({ parent: parent, query: query, language_codes: language_codes, page_size: page_size, company: company, scope: scope, type: type }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.complete_query(::Google::Cloud::Talent::V4beta1::CompleteQueryRequest.new(parent: parent, query: query, language_codes: language_codes, page_size: page_size, company: company, scope: scope, type: type), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, complete_query_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::Talent::V4beta1::Completion::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::Talent::V4beta1::Completion::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::Talent::V4beta1::Completion::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Talent::V4beta1::Completion::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/event_service_paths_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/event_service_paths_test.rb deleted file mode 100644 index 62494d741f26..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/event_service_paths_test.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/talent/v4beta1/event_service" - -class ::Google::Cloud::Talent::V4beta1::EventService::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_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::Talent::V4beta1::EventService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end - - def test_tenant_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Talent::V4beta1::EventService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.tenant_path project: "value0", tenant: "value1" - assert_equal "projects/value0/tenants/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/event_service_rest_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/event_service_rest_test.rb deleted file mode 100644 index 367e17cac38c..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/event_service_rest_test.rb +++ /dev/null @@ -1,154 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/talent/v4beta1/event_service_pb" -require "google/cloud/talent/v4beta1/event_service/rest" - - -class ::Google::Cloud::Talent::V4beta1::EventService::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_client_event - # Create test objects. - client_result = ::Google::Cloud::Talent::V4beta1::ClientEvent.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - client_event = {} - - create_client_event_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Talent::V4beta1::EventService::Rest::ServiceStub.stub :transcode_create_client_event_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_client_event_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::EventService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_client_event({ parent: parent, client_event: client_event }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_client_event parent: parent, client_event: client_event do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_client_event ::Google::Cloud::Talent::V4beta1::CreateClientEventRequest.new(parent: parent, client_event: client_event) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_client_event({ parent: parent, client_event: client_event }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_client_event(::Google::Cloud::Talent::V4beta1::CreateClientEventRequest.new(parent: parent, client_event: client_event), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_client_event_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::Talent::V4beta1::EventService::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::Talent::V4beta1::EventService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/event_service_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/event_service_test.rb deleted file mode 100644 index 3c1fe220a445..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/event_service_test.rb +++ /dev/null @@ -1,164 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/talent/v4beta1/event_service_pb" -require "google/cloud/talent/v4beta1/event_service" - -class ::Google::Cloud::Talent::V4beta1::EventService::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_client_event - # Create GRPC objects. - grpc_response = ::Google::Cloud::Talent::V4beta1::ClientEvent.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - client_event = {} - - create_client_event_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_client_event, name - assert_kind_of ::Google::Cloud::Talent::V4beta1::CreateClientEventRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::ClientEvent), request["client_event"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_client_event_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::EventService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_client_event({ parent: parent, client_event: client_event }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_client_event parent: parent, client_event: client_event do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_client_event ::Google::Cloud::Talent::V4beta1::CreateClientEventRequest.new(parent: parent, client_event: client_event) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_client_event({ parent: parent, client_event: client_event }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_client_event(::Google::Cloud::Talent::V4beta1::CreateClientEventRequest.new(parent: parent, client_event: client_event), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_client_event_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::Talent::V4beta1::EventService::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::Talent::V4beta1::EventService::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::Talent::V4beta1::EventService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Talent::V4beta1::EventService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_operations_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_operations_test.rb deleted file mode 100644 index c9ea942034fd..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_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/talent/v4beta1/job_service_pb" -require "google/cloud/talent/v4beta1/job_service_services_pb" -require "google/cloud/talent/v4beta1/job_service" - -class ::Google::Cloud::Talent::V4beta1::JobService::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::Talent::V4beta1::JobService::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::Talent::V4beta1::JobService::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::Talent::V4beta1::JobService::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::Talent::V4beta1::JobService::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::Talent::V4beta1::JobService::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::Talent::V4beta1::JobService::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::Talent::V4beta1::JobService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_paths_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_paths_test.rb deleted file mode 100644 index 6905c8128013..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_paths_test.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 "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/talent/v4beta1/job_service" - -class ::Google::Cloud::Talent::V4beta1::JobService::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_company_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.company_path project: "value0", tenant: "value1", company: "value2" - assert_equal "projects/value0/tenants/value1/companies/value2", path - - path = client.company_path project: "value0", company: "value1" - assert_equal "projects/value0/companies/value1", path - end - end - - def test_job_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.job_path project: "value0", tenant: "value1", job: "value2" - assert_equal "projects/value0/tenants/value1/jobs/value2", path - - path = client.job_path project: "value0", job: "value1" - assert_equal "projects/value0/jobs/value1", path - end - end - - def test_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end - - def test_tenant_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.tenant_path project: "value0", tenant: "value1" - assert_equal "projects/value0/tenants/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_rest_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_rest_test.rb deleted file mode 100644 index b5233fe24bbf..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_rest_test.rb +++ /dev/null @@ -1,681 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/talent/v4beta1/job_service_pb" -require "google/cloud/talent/v4beta1/job_service/rest" - - -class ::Google::Cloud::Talent::V4beta1::JobService::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_job - # Create test objects. - client_result = ::Google::Cloud::Talent::V4beta1::Job.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - job = {} - - create_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Talent::V4beta1::JobService::Rest::ServiceStub.stub :transcode_create_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_job_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_job({ parent: parent, job: job }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_job parent: parent, job: job do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_job ::Google::Cloud::Talent::V4beta1::CreateJobRequest.new(parent: parent, job: job) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_job({ parent: parent, job: job }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_job(::Google::Cloud::Talent::V4beta1::CreateJobRequest.new(parent: parent, job: job), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_job_client_stub.call_count - end - end - end - - def test_batch_create_jobs - # Create test objects. - 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" - jobs = [{}] - - batch_create_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Talent::V4beta1::JobService::Rest::ServiceStub.stub :transcode_batch_create_jobs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_create_jobs_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.batch_create_jobs({ parent: parent, jobs: jobs }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.batch_create_jobs parent: parent, jobs: jobs do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.batch_create_jobs ::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest.new(parent: parent, jobs: jobs) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.batch_create_jobs({ parent: parent, jobs: jobs }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.batch_create_jobs(::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest.new(parent: parent, jobs: jobs), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_create_jobs_client_stub.call_count - end - end - end - - def test_get_job - # Create test objects. - client_result = ::Google::Cloud::Talent::V4beta1::Job.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Talent::V4beta1::JobService::Rest::ServiceStub.stub :transcode_get_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_job_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_job({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_job name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_job ::Google::Cloud::Talent::V4beta1::GetJobRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_job({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_job(::Google::Cloud::Talent::V4beta1::GetJobRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_job_client_stub.call_count - end - end - end - - def test_update_job - # Create test objects. - client_result = ::Google::Cloud::Talent::V4beta1::Job.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - job = {} - update_mask = {} - - update_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Talent::V4beta1::JobService::Rest::ServiceStub.stub :transcode_update_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_job_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_job({ job: job, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_job job: job, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_job ::Google::Cloud::Talent::V4beta1::UpdateJobRequest.new(job: job, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_job({ job: job, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_job(::Google::Cloud::Talent::V4beta1::UpdateJobRequest.new(job: job, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_job_client_stub.call_count - end - end - end - - def test_batch_update_jobs - # Create test objects. - 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" - jobs = [{}] - update_mask = {} - - batch_update_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Talent::V4beta1::JobService::Rest::ServiceStub.stub :transcode_batch_update_jobs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_update_jobs_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.batch_update_jobs({ parent: parent, jobs: jobs, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.batch_update_jobs parent: parent, jobs: jobs, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.batch_update_jobs ::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest.new(parent: parent, jobs: jobs, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.batch_update_jobs({ parent: parent, jobs: jobs, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.batch_update_jobs(::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest.new(parent: parent, jobs: jobs, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_update_jobs_client_stub.call_count - end - end - end - - def test_delete_job - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Talent::V4beta1::JobService::Rest::ServiceStub.stub :transcode_delete_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_job_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_job({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_job name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_job ::Google::Cloud::Talent::V4beta1::DeleteJobRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_job({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_job(::Google::Cloud::Talent::V4beta1::DeleteJobRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_job_client_stub.call_count - end - end - end - - def test_batch_delete_jobs - # 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. - parent = "hello world" - filter = "hello world" - - batch_delete_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Talent::V4beta1::JobService::Rest::ServiceStub.stub :transcode_batch_delete_jobs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_delete_jobs_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.batch_delete_jobs({ parent: parent, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.batch_delete_jobs parent: parent, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.batch_delete_jobs ::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest.new(parent: parent, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.batch_delete_jobs({ parent: parent, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.batch_delete_jobs(::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest.new(parent: parent, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_delete_jobs_client_stub.call_count - end - end - end - - def test_list_jobs - # Create test objects. - client_result = ::Google::Cloud::Talent::V4beta1::ListJobsResponse.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_token = "hello world" - page_size = 42 - job_view = :JOB_VIEW_UNSPECIFIED - - list_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Talent::V4beta1::JobService::Rest::ServiceStub.stub :transcode_list_jobs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_jobs_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_jobs({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, job_view: job_view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_jobs parent: parent, filter: filter, page_token: page_token, page_size: page_size, job_view: job_view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_jobs ::Google::Cloud::Talent::V4beta1::ListJobsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, job_view: job_view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_jobs({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, job_view: job_view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_jobs(::Google::Cloud::Talent::V4beta1::ListJobsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, job_view: job_view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_jobs_client_stub.call_count - end - end - end - - def test_search_jobs - # Create test objects. - client_result = ::Google::Cloud::Talent::V4beta1::SearchJobsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - search_mode = :SEARCH_MODE_UNSPECIFIED - request_metadata = {} - job_query = {} - enable_broadening = true - require_precise_result_size = true - histogram_queries = [{}] - job_view = :JOB_VIEW_UNSPECIFIED - offset = 42 - page_size = 42 - page_token = "hello world" - order_by = "hello world" - diversification_level = :DIVERSIFICATION_LEVEL_UNSPECIFIED - custom_ranking_info = {} - disable_keyword_match = true - keyword_match_mode = :KEYWORD_MATCH_MODE_UNSPECIFIED - relevance_threshold = :RELEVANCE_THRESHOLD_UNSPECIFIED - - search_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Talent::V4beta1::JobService::Rest::ServiceStub.stub :transcode_search_jobs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_jobs_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.search_jobs({ parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.search_jobs parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.search_jobs ::Google::Cloud::Talent::V4beta1::SearchJobsRequest.new(parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.search_jobs({ parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.search_jobs(::Google::Cloud::Talent::V4beta1::SearchJobsRequest.new(parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_jobs_client_stub.call_count - end - end - end - - def test_search_jobs_for_alert - # Create test objects. - client_result = ::Google::Cloud::Talent::V4beta1::SearchJobsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - search_mode = :SEARCH_MODE_UNSPECIFIED - request_metadata = {} - job_query = {} - enable_broadening = true - require_precise_result_size = true - histogram_queries = [{}] - job_view = :JOB_VIEW_UNSPECIFIED - offset = 42 - page_size = 42 - page_token = "hello world" - order_by = "hello world" - diversification_level = :DIVERSIFICATION_LEVEL_UNSPECIFIED - custom_ranking_info = {} - disable_keyword_match = true - keyword_match_mode = :KEYWORD_MATCH_MODE_UNSPECIFIED - relevance_threshold = :RELEVANCE_THRESHOLD_UNSPECIFIED - - search_jobs_for_alert_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Talent::V4beta1::JobService::Rest::ServiceStub.stub :transcode_search_jobs_for_alert_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_jobs_for_alert_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::JobService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.search_jobs_for_alert({ parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.search_jobs_for_alert parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.search_jobs_for_alert ::Google::Cloud::Talent::V4beta1::SearchJobsRequest.new(parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.search_jobs_for_alert({ parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.search_jobs_for_alert(::Google::Cloud::Talent::V4beta1::SearchJobsRequest.new(parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_jobs_for_alert_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::Talent::V4beta1::JobService::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::Talent::V4beta1::JobService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_test.rb deleted file mode 100644 index 1ad88b2a3848..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/job_service_test.rb +++ /dev/null @@ -1,797 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/talent/v4beta1/job_service_pb" -require "google/cloud/talent/v4beta1/job_service" - -class ::Google::Cloud::Talent::V4beta1::JobService::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_job - # Create GRPC objects. - grpc_response = ::Google::Cloud::Talent::V4beta1::Job.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - job = {} - - create_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_job, name - assert_kind_of ::Google::Cloud::Talent::V4beta1::CreateJobRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::Job), request["job"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_job_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_job({ parent: parent, job: job }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_job parent: parent, job: job do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_job ::Google::Cloud::Talent::V4beta1::CreateJobRequest.new(parent: parent, job: job) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_job({ parent: parent, job: job }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_job(::Google::Cloud::Talent::V4beta1::CreateJobRequest.new(parent: parent, job: job), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_job_client_stub.call_rpc_count - end - end - - def test_batch_create_jobs - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - jobs = [{}] - - batch_create_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_create_jobs, name - assert_kind_of ::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Cloud::Talent::V4beta1::Job, request["jobs"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_create_jobs_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_create_jobs({ parent: parent, jobs: jobs }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.batch_create_jobs parent: parent, jobs: jobs do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.batch_create_jobs ::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest.new(parent: parent, jobs: jobs) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.batch_create_jobs({ parent: parent, jobs: jobs }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.batch_create_jobs(::Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest.new(parent: parent, jobs: jobs), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_create_jobs_client_stub.call_rpc_count - end - end - - def test_get_job - # Create GRPC objects. - grpc_response = ::Google::Cloud::Talent::V4beta1::Job.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_job, name - assert_kind_of ::Google::Cloud::Talent::V4beta1::GetJobRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_job_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_job({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_job name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_job ::Google::Cloud::Talent::V4beta1::GetJobRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_job({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_job(::Google::Cloud::Talent::V4beta1::GetJobRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_job_client_stub.call_rpc_count - end - end - - def test_update_job - # Create GRPC objects. - grpc_response = ::Google::Cloud::Talent::V4beta1::Job.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - job = {} - update_mask = {} - - update_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_job, name - assert_kind_of ::Google::Cloud::Talent::V4beta1::UpdateJobRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::Job), request["job"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_job_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_job({ job: job, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_job job: job, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_job ::Google::Cloud::Talent::V4beta1::UpdateJobRequest.new(job: job, 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_job({ job: job, 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_job(::Google::Cloud::Talent::V4beta1::UpdateJobRequest.new(job: job, 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_job_client_stub.call_rpc_count - end - end - - def test_batch_update_jobs - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - jobs = [{}] - update_mask = {} - - batch_update_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_update_jobs, name - assert_kind_of ::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Cloud::Talent::V4beta1::Job, request["jobs"].first - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_update_jobs_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_update_jobs({ parent: parent, jobs: jobs, 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.batch_update_jobs parent: parent, jobs: jobs, 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.batch_update_jobs ::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest.new(parent: parent, jobs: jobs, 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.batch_update_jobs({ parent: parent, jobs: jobs, 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.batch_update_jobs(::Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest.new(parent: parent, jobs: jobs, 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, batch_update_jobs_client_stub.call_rpc_count - end - end - - def test_delete_job - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_job, name - assert_kind_of ::Google::Cloud::Talent::V4beta1::DeleteJobRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_job_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_job({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_job name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_job ::Google::Cloud::Talent::V4beta1::DeleteJobRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_job({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_job(::Google::Cloud::Talent::V4beta1::DeleteJobRequest.new(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_job_client_stub.call_rpc_count - end - end - - def test_batch_delete_jobs - # 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. - parent = "hello world" - filter = "hello world" - - batch_delete_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_delete_jobs, name - assert_kind_of ::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_delete_jobs_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_delete_jobs({ parent: parent, filter: filter }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.batch_delete_jobs parent: parent, filter: filter do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.batch_delete_jobs ::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest.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.batch_delete_jobs({ 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.batch_delete_jobs(::Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest.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, batch_delete_jobs_client_stub.call_rpc_count - end - end - - def test_list_jobs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Talent::V4beta1::ListJobsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_token = "hello world" - page_size = 42 - job_view = :JOB_VIEW_UNSPECIFIED - - list_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_jobs, name - assert_kind_of ::Google::Cloud::Talent::V4beta1::ListJobsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - assert_equal :JOB_VIEW_UNSPECIFIED, request["job_view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_jobs_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_jobs({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, job_view: job_view }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_jobs parent: parent, filter: filter, page_token: page_token, page_size: page_size, job_view: job_view do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_jobs ::Google::Cloud::Talent::V4beta1::ListJobsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, job_view: job_view) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_jobs({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, job_view: job_view }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_jobs(::Google::Cloud::Talent::V4beta1::ListJobsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, job_view: job_view), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_jobs_client_stub.call_rpc_count - end - end - - def test_search_jobs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Talent::V4beta1::SearchJobsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - search_mode = :SEARCH_MODE_UNSPECIFIED - request_metadata = {} - job_query = {} - enable_broadening = true - require_precise_result_size = true - histogram_queries = [{}] - job_view = :JOB_VIEW_UNSPECIFIED - offset = 42 - page_size = 42 - page_token = "hello world" - order_by = "hello world" - diversification_level = :DIVERSIFICATION_LEVEL_UNSPECIFIED - custom_ranking_info = {} - disable_keyword_match = true - keyword_match_mode = :KEYWORD_MATCH_MODE_UNSPECIFIED - relevance_threshold = :RELEVANCE_THRESHOLD_UNSPECIFIED - - search_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_jobs, name - assert_kind_of ::Google::Cloud::Talent::V4beta1::SearchJobsRequest, request - assert_equal "hello world", request["parent"] - assert_equal :SEARCH_MODE_UNSPECIFIED, request["search_mode"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::RequestMetadata), request["request_metadata"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::JobQuery), request["job_query"] - assert_equal true, request["enable_broadening"] - assert_equal true, request["require_precise_result_size"] - assert_kind_of ::Google::Cloud::Talent::V4beta1::HistogramQuery, request["histogram_queries"].first - assert_equal :JOB_VIEW_UNSPECIFIED, request["job_view"] - assert_equal 42, request["offset"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["order_by"] - assert_equal :DIVERSIFICATION_LEVEL_UNSPECIFIED, request["diversification_level"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo), request["custom_ranking_info"] - assert_equal true, request["disable_keyword_match"] - assert_equal :KEYWORD_MATCH_MODE_UNSPECIFIED, request["keyword_match_mode"] - assert_equal :RELEVANCE_THRESHOLD_UNSPECIFIED, request["relevance_threshold"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_jobs_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.search_jobs({ parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.search_jobs parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.search_jobs ::Google::Cloud::Talent::V4beta1::SearchJobsRequest.new(parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.search_jobs({ parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.search_jobs(::Google::Cloud::Talent::V4beta1::SearchJobsRequest.new(parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_jobs_client_stub.call_rpc_count - end - end - - def test_search_jobs_for_alert - # Create GRPC objects. - grpc_response = ::Google::Cloud::Talent::V4beta1::SearchJobsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - search_mode = :SEARCH_MODE_UNSPECIFIED - request_metadata = {} - job_query = {} - enable_broadening = true - require_precise_result_size = true - histogram_queries = [{}] - job_view = :JOB_VIEW_UNSPECIFIED - offset = 42 - page_size = 42 - page_token = "hello world" - order_by = "hello world" - diversification_level = :DIVERSIFICATION_LEVEL_UNSPECIFIED - custom_ranking_info = {} - disable_keyword_match = true - keyword_match_mode = :KEYWORD_MATCH_MODE_UNSPECIFIED - relevance_threshold = :RELEVANCE_THRESHOLD_UNSPECIFIED - - search_jobs_for_alert_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_jobs_for_alert, name - assert_kind_of ::Google::Cloud::Talent::V4beta1::SearchJobsRequest, request - assert_equal "hello world", request["parent"] - assert_equal :SEARCH_MODE_UNSPECIFIED, request["search_mode"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::RequestMetadata), request["request_metadata"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::JobQuery), request["job_query"] - assert_equal true, request["enable_broadening"] - assert_equal true, request["require_precise_result_size"] - assert_kind_of ::Google::Cloud::Talent::V4beta1::HistogramQuery, request["histogram_queries"].first - assert_equal :JOB_VIEW_UNSPECIFIED, request["job_view"] - assert_equal 42, request["offset"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["order_by"] - assert_equal :DIVERSIFICATION_LEVEL_UNSPECIFIED, request["diversification_level"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo), request["custom_ranking_info"] - assert_equal true, request["disable_keyword_match"] - assert_equal :KEYWORD_MATCH_MODE_UNSPECIFIED, request["keyword_match_mode"] - assert_equal :RELEVANCE_THRESHOLD_UNSPECIFIED, request["relevance_threshold"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_jobs_for_alert_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::JobService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.search_jobs_for_alert({ parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.search_jobs_for_alert parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.search_jobs_for_alert ::Google::Cloud::Talent::V4beta1::SearchJobsRequest.new(parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.search_jobs_for_alert({ parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.search_jobs_for_alert(::Google::Cloud::Talent::V4beta1::SearchJobsRequest.new(parent: parent, search_mode: search_mode, request_metadata: request_metadata, job_query: job_query, enable_broadening: enable_broadening, require_precise_result_size: require_precise_result_size, histogram_queries: histogram_queries, job_view: job_view, offset: offset, page_size: page_size, page_token: page_token, order_by: order_by, diversification_level: diversification_level, custom_ranking_info: custom_ranking_info, disable_keyword_match: disable_keyword_match, keyword_match_mode: keyword_match_mode, relevance_threshold: relevance_threshold), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_jobs_for_alert_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::Talent::V4beta1::JobService::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::Talent::V4beta1::JobService::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::Talent::V4beta1::JobService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Talent::V4beta1::JobService::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::Talent::V4beta1::JobService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Talent::V4beta1::JobService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/tenant_service_paths_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/tenant_service_paths_test.rb deleted file mode 100644 index ca6ff0d05b1b..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/tenant_service_paths_test.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/talent/v4beta1/tenant_service" - -class ::Google::Cloud::Talent::V4beta1::TenantService::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_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::Talent::V4beta1::TenantService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end - - def test_tenant_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Talent::V4beta1::TenantService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.tenant_path project: "value0", tenant: "value1" - assert_equal "projects/value0/tenants/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/tenant_service_rest_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/tenant_service_rest_test.rb deleted file mode 100644 index e84949a6e6c6..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/tenant_service_rest_test.rb +++ /dev/null @@ -1,373 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/talent/v4beta1/tenant_service_pb" -require "google/cloud/talent/v4beta1/tenant_service/rest" - - -class ::Google::Cloud::Talent::V4beta1::TenantService::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_tenant - # Create test objects. - client_result = ::Google::Cloud::Talent::V4beta1::Tenant.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - tenant = {} - - create_tenant_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Talent::V4beta1::TenantService::Rest::ServiceStub.stub :transcode_create_tenant_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_tenant_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_tenant({ parent: parent, tenant: tenant }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_tenant parent: parent, tenant: tenant do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_tenant ::Google::Cloud::Talent::V4beta1::CreateTenantRequest.new(parent: parent, tenant: tenant) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_tenant({ parent: parent, tenant: tenant }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_tenant(::Google::Cloud::Talent::V4beta1::CreateTenantRequest.new(parent: parent, tenant: tenant), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_tenant_client_stub.call_count - end - end - end - - def test_get_tenant - # Create test objects. - client_result = ::Google::Cloud::Talent::V4beta1::Tenant.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_tenant_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Talent::V4beta1::TenantService::Rest::ServiceStub.stub :transcode_get_tenant_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_tenant_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_tenant({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_tenant name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_tenant ::Google::Cloud::Talent::V4beta1::GetTenantRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_tenant({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_tenant(::Google::Cloud::Talent::V4beta1::GetTenantRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_tenant_client_stub.call_count - end - end - end - - def test_update_tenant - # Create test objects. - client_result = ::Google::Cloud::Talent::V4beta1::Tenant.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - tenant = {} - update_mask = {} - - update_tenant_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Talent::V4beta1::TenantService::Rest::ServiceStub.stub :transcode_update_tenant_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_tenant_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_tenant({ tenant: tenant, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_tenant tenant: tenant, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_tenant ::Google::Cloud::Talent::V4beta1::UpdateTenantRequest.new(tenant: tenant, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_tenant({ tenant: tenant, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_tenant(::Google::Cloud::Talent::V4beta1::UpdateTenantRequest.new(tenant: tenant, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_tenant_client_stub.call_count - end - end - end - - def test_delete_tenant - # 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_tenant_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Talent::V4beta1::TenantService::Rest::ServiceStub.stub :transcode_delete_tenant_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_tenant_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_tenant({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_tenant name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_tenant ::Google::Cloud::Talent::V4beta1::DeleteTenantRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_tenant({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_tenant(::Google::Cloud::Talent::V4beta1::DeleteTenantRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_tenant_client_stub.call_count - end - end - end - - def test_list_tenants - # Create test objects. - client_result = ::Google::Cloud::Talent::V4beta1::ListTenantsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_tenants_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Talent::V4beta1::TenantService::Rest::ServiceStub.stub :transcode_list_tenants_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_tenants_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::TenantService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_tenants({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_tenants parent: parent, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_tenants ::Google::Cloud::Talent::V4beta1::ListTenantsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_tenants({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_tenants(::Google::Cloud::Talent::V4beta1::ListTenantsRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_tenants_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::Talent::V4beta1::TenantService::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::Talent::V4beta1::TenantService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/tenant_service_test.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/tenant_service_test.rb deleted file mode 100644 index a90e6bf14b95..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/test/google/cloud/talent/v4beta1/tenant_service_test.rb +++ /dev/null @@ -1,407 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/talent/v4beta1/tenant_service_pb" -require "google/cloud/talent/v4beta1/tenant_service" - -class ::Google::Cloud::Talent::V4beta1::TenantService::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_tenant - # Create GRPC objects. - grpc_response = ::Google::Cloud::Talent::V4beta1::Tenant.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - tenant = {} - - create_tenant_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_tenant, name - assert_kind_of ::Google::Cloud::Talent::V4beta1::CreateTenantRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::Tenant), request["tenant"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_tenant_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::TenantService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_tenant({ parent: parent, tenant: tenant }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_tenant parent: parent, tenant: tenant do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_tenant ::Google::Cloud::Talent::V4beta1::CreateTenantRequest.new(parent: parent, tenant: tenant) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_tenant({ parent: parent, tenant: tenant }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_tenant(::Google::Cloud::Talent::V4beta1::CreateTenantRequest.new(parent: parent, tenant: tenant), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_tenant_client_stub.call_rpc_count - end - end - - def test_get_tenant - # Create GRPC objects. - grpc_response = ::Google::Cloud::Talent::V4beta1::Tenant.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_tenant_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_tenant, name - assert_kind_of ::Google::Cloud::Talent::V4beta1::GetTenantRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_tenant_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::TenantService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_tenant({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_tenant name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_tenant ::Google::Cloud::Talent::V4beta1::GetTenantRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_tenant({ 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_tenant(::Google::Cloud::Talent::V4beta1::GetTenantRequest.new(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_tenant_client_stub.call_rpc_count - end - end - - def test_update_tenant - # Create GRPC objects. - grpc_response = ::Google::Cloud::Talent::V4beta1::Tenant.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - tenant = {} - update_mask = {} - - update_tenant_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_tenant, name - assert_kind_of ::Google::Cloud::Talent::V4beta1::UpdateTenantRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Talent::V4beta1::Tenant), request["tenant"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_tenant_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::TenantService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_tenant({ tenant: tenant, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_tenant tenant: tenant, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_tenant ::Google::Cloud::Talent::V4beta1::UpdateTenantRequest.new(tenant: tenant, 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_tenant({ tenant: tenant, 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_tenant(::Google::Cloud::Talent::V4beta1::UpdateTenantRequest.new(tenant: tenant, 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_tenant_client_stub.call_rpc_count - end - end - - def test_delete_tenant - # 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_tenant_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_tenant, name - assert_kind_of ::Google::Cloud::Talent::V4beta1::DeleteTenantRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_tenant_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::TenantService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_tenant({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_tenant name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_tenant ::Google::Cloud::Talent::V4beta1::DeleteTenantRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_tenant({ 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_tenant(::Google::Cloud::Talent::V4beta1::DeleteTenantRequest.new(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_tenant_client_stub.call_rpc_count - end - end - - def test_list_tenants - # Create GRPC objects. - grpc_response = ::Google::Cloud::Talent::V4beta1::ListTenantsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_token = "hello world" - page_size = 42 - - list_tenants_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_tenants, name - assert_kind_of ::Google::Cloud::Talent::V4beta1::ListTenantsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_tenants_client_stub do - # Create client - client = ::Google::Cloud::Talent::V4beta1::TenantService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_tenants({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_tenants parent: parent, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_tenants ::Google::Cloud::Talent::V4beta1::ListTenantsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_tenants({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_tenants(::Google::Cloud::Talent::V4beta1::ListTenantsRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_tenants_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::Talent::V4beta1::TenantService::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::Talent::V4beta1::TenantService::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::Talent::V4beta1::TenantService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Talent::V4beta1::TenantService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-talent-v4beta1/test/helper.rb b/owl-bot-staging/google-cloud-talent-v4beta1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-talent-v4beta1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-tasks-v2/.gitignore b/owl-bot-staging/google-cloud-tasks-v2/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-tasks-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-tasks-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-tasks-v2/.repo-metadata.json deleted file mode 100644 index 9f20ac72dea4..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "cloudtasks.googleapis.com", - "api_shortname": "cloudtasks", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2/latest", - "distribution_name": "google-cloud-tasks-v2", - "is_cloud": true, - "language": "ruby", - "name": "cloudtasks", - "name_pretty": "Cloud Tasks V2 API", - "product_documentation": "https://cloud.google.com/tasks", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Cloud Tasks is a fully managed service that allows you to manage the execution, dispatch and delivery of a large number of distributed tasks. You can asynchronously perform work outside of a user request. Your tasks can be executed on App Engine or any arbitrary HTTP endpoint. Note that google-cloud-tasks-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-tasks instead. See the readme for more details.", - "ruby-cloud-env-prefix": "TASKS", - "ruby-cloud-product-url": "https://cloud.google.com/tasks", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-tasks-v2/.rubocop.yml b/owl-bot-staging/google-cloud-tasks-v2/.rubocop.yml deleted file mode 100644 index c73aa9c3a62f..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-tasks-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-tasks-v2.rb" diff --git a/owl-bot-staging/google-cloud-tasks-v2/.toys.rb b/owl-bot-staging/google-cloud-tasks-v2/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-tasks-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-tasks-v2/.yardopts b/owl-bot-staging/google-cloud-tasks-v2/.yardopts deleted file mode 100644 index 61acd5d300ad..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Tasks 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-tasks-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-tasks-v2/AUTHENTICATION.md deleted file mode 100644 index 17282377935b..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-tasks-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-tasks-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/tasks/v2" - -client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/tasks/v2" - -::Google::Cloud::Tasks::V2::CloudTasks::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Tasks::V2::CloudTasks::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-tasks-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/tasks/v2" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Tasks::V2::CloudTasks::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-tasks-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-tasks-v2/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-tasks-v2/Gemfile b/owl-bot-staging/google-cloud-tasks-v2/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-tasks-v2/LICENSE.md b/owl-bot-staging/google-cloud-tasks-v2/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-tasks-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-tasks-v2/README.md b/owl-bot-staging/google-cloud-tasks-v2/README.md deleted file mode 100644 index 3acb58b85bcb..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Tasks V2 API - -Manages the execution of large numbers of distributed requests. - -Cloud Tasks is a fully managed service that allows you to manage the execution, dispatch and delivery of a large number of distributed tasks. You can asynchronously perform work outside of a user request. Your tasks can be executed on App Engine or any arbitrary HTTP endpoint. - -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 Tasks V2 API. Most users should consider using -the main client gem, -[google-cloud-tasks](https://rubygems.org/gems/google-cloud-tasks). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-tasks-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/cloudtasks.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/tasks/v2" - -client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new -request = ::Google::Cloud::Tasks::V2::ListQueuesRequest.new # (request fields as keyword arguments...) -response = client.list_queues request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/tasks) -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/tasks/v2" -require "logger" - -client = ::Google::Cloud::Tasks::V2::CloudTasks::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-tasks`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-tasks-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-tasks`. -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-tasks-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-tasks-v2/Rakefile b/owl-bot-staging/google-cloud-tasks-v2/Rakefile deleted file mode 100644 index 2339c75f47d5..000000000000 --- a/owl-bot-staging/google-cloud-tasks-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-tasks-v2 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["TASKS_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["TASKS_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["TASKS_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 TASKS_TEST_PROJECT=test123 TASKS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/tasks/v2/cloud_tasks/credentials" - ::Google::Cloud::Tasks::V2::CloudTasks::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["TASKS_PROJECT"] = project - ENV["TASKS_TEST_PROJECT"] = project - ENV["TASKS_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-tasks-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-tasks-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-tasks-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-tasks-v2 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-tasks-v2" - header "google-cloud-tasks-v2 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-tasks-v2 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-tasks-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-tasks-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-tasks-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-tasks-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-tasks-v2/gapic_metadata.json deleted file mode 100644 index 2f95f7bab9cd..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/gapic_metadata.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.tasks.v2", - "libraryPackage": "::Google::Cloud::Tasks::V2", - "services": { - "CloudTasks": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Tasks::V2::CloudTasks::Client", - "rpcs": { - "ListQueues": { - "methods": [ - "list_queues" - ] - }, - "GetQueue": { - "methods": [ - "get_queue" - ] - }, - "CreateQueue": { - "methods": [ - "create_queue" - ] - }, - "UpdateQueue": { - "methods": [ - "update_queue" - ] - }, - "DeleteQueue": { - "methods": [ - "delete_queue" - ] - }, - "PurgeQueue": { - "methods": [ - "purge_queue" - ] - }, - "PauseQueue": { - "methods": [ - "pause_queue" - ] - }, - "ResumeQueue": { - "methods": [ - "resume_queue" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - }, - "ListTasks": { - "methods": [ - "list_tasks" - ] - }, - "GetTask": { - "methods": [ - "get_task" - ] - }, - "CreateTask": { - "methods": [ - "create_task" - ] - }, - "DeleteTask": { - "methods": [ - "delete_task" - ] - }, - "RunTask": { - "methods": [ - "run_task" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-tasks-v2/google-cloud-tasks-v2.gemspec b/owl-bot-staging/google-cloud-tasks-v2/google-cloud-tasks-v2.gemspec deleted file mode 100644 index a53d67e47dc5..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/google-cloud-tasks-v2.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/tasks/v2/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-tasks-v2" - gem.version = Google::Cloud::Tasks::V2::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Cloud Tasks is a fully managed service that allows you to manage the execution, dispatch and delivery of a large number of distributed tasks. You can asynchronously perform work outside of a user request. Your tasks can be executed on App Engine or any arbitrary HTTP endpoint. Note that google-cloud-tasks-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-tasks instead. See the readme for more details." - gem.summary = "Manages the execution of large numbers of distributed requests." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google-cloud-tasks-v2.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google-cloud-tasks-v2.rb deleted file mode 100644 index c0bfa1f74ccc..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/lib/google-cloud-tasks-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/tasks/v2" diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2.rb deleted file mode 100644 index 28eb8e8f1dd1..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/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/tasks/v2/cloud_tasks" -require "google/cloud/tasks/v2/version" - -module Google - module Cloud - module Tasks - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/tasks/v2" - # client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/tasks/v2" - # client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new - # - module V2 - end - end - end -end - -helper_path = ::File.join __dir__, "v2", "_helpers.rb" -require "google/cloud/tasks/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/bindings_override.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/bindings_override.rb deleted file mode 100644 index 0d1044729505..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/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 Tasks - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/tasks/v2/rest" - # client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new - # - module V2 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Tasks"] - 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: "/v2/{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: "/v2/{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-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks.rb deleted file mode 100644 index 8cec3f1cb14f..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks.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/tasks/v2/version" - -require "google/cloud/tasks/v2/cloud_tasks/credentials" -require "google/cloud/tasks/v2/cloud_tasks/paths" -require "google/cloud/tasks/v2/cloud_tasks/client" -require "google/cloud/tasks/v2/cloud_tasks/rest" - -module Google - module Cloud - module Tasks - module V2 - ## - # Cloud Tasks allows developers to manage the execution of background - # work in their applications. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/tasks/v2/cloud_tasks" - # client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/tasks/v2/cloud_tasks/rest" - # client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new - # - module CloudTasks - end - end - end - end -end - -helper_path = ::File.join __dir__, "cloud_tasks", "helpers.rb" -require "google/cloud/tasks/v2/cloud_tasks/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/client.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/client.rb deleted file mode 100644 index ec1c5ab6a70a..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/client.rb +++ /dev/null @@ -1,2259 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/tasks/v2/cloudtasks_pb" -require "google/cloud/location" - -module Google - module Cloud - module Tasks - module V2 - module CloudTasks - ## - # Client for the CloudTasks service. - # - # Cloud Tasks allows developers to manage the execution of background - # work in their applications. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudtasks.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_tasks_stub - - ## - # Configure the CloudTasks Client class. - # - # See {::Google::Cloud::Tasks::V2::CloudTasks::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudTasks clients - # ::Google::Cloud::Tasks::V2::CloudTasks::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", "Tasks", "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.rpcs.list_queues.timeout = 20.0 - default_config.rpcs.list_queues.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_queue.timeout = 20.0 - default_config.rpcs.get_queue.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_queue.timeout = 20.0 - - default_config.rpcs.update_queue.timeout = 20.0 - - default_config.rpcs.delete_queue.timeout = 20.0 - default_config.rpcs.delete_queue.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.purge_queue.timeout = 20.0 - - default_config.rpcs.pause_queue.timeout = 20.0 - - default_config.rpcs.resume_queue.timeout = 20.0 - - default_config.rpcs.get_iam_policy.timeout = 20.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.set_iam_policy.timeout = 20.0 - - default_config.rpcs.test_iam_permissions.timeout = 20.0 - default_config.rpcs.test_iam_permissions.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_tasks.timeout = 20.0 - default_config.rpcs.list_tasks.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_task.timeout = 20.0 - default_config.rpcs.get_task.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_task.timeout = 20.0 - - default_config.rpcs.delete_task.timeout = 20.0 - default_config.rpcs.delete_task.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.run_task.timeout = 20.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudTasks 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::Tasks::V2::CloudTasks::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_tasks_stub.universe_domain - end - - ## - # Create a new CloudTasks client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudTasks 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/tasks/v2/cloudtasks_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 - - @cloud_tasks_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Tasks::V2::CloudTasks::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_tasks_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_tasks_stub.endpoint - config.universe_domain = @cloud_tasks_stub.universe_domain - config.logger = @cloud_tasks_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 - @cloud_tasks_stub.logger - end - - # Service calls - - ## - # Lists queues. - # - # Queues are returned in lexicographical order. - # - # @overload list_queues(request, options = nil) - # Pass arguments to `list_queues` via a request object, either of type - # {::Google::Cloud::Tasks::V2::ListQueuesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::ListQueuesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_queues(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_queues` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 name. - # For example: `projects/PROJECT_ID/locations/LOCATION_ID` - # @param filter [::String] - # `filter` can be used to specify a subset of queues. Any - # {::Google::Cloud::Tasks::V2::Queue Queue} field can be used as a filter and - # several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The - # filter syntax is the same as described in [Stackdriver's Advanced Logs - # Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - # - # Sample filter "state: PAUSED". - # - # Note that using filters might cause fewer queues than the - # requested page_size to be returned. - # @param page_size [::Integer] - # Requested page size. - # - # The maximum page size is 9800. If unspecified, the page size will - # be the maximum. Fewer queues than requested might be returned, - # even if more queues exist; use the - # {::Google::Cloud::Tasks::V2::ListQueuesResponse#next_page_token next_page_token} - # in the response to determine if more queues exist. - # @param page_token [::String] - # A token identifying the page of results to return. - # - # To request the first page results, page_token must be empty. To - # request the next page of results, page_token must be the value of - # {::Google::Cloud::Tasks::V2::ListQueuesResponse#next_page_token next_page_token} - # returned from the previous call to - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#list_queues ListQueues} method. It is an - # error to switch the value of the - # {::Google::Cloud::Tasks::V2::ListQueuesRequest#filter filter} while iterating - # through pages. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2::Queue>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2::Queue>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::ListQueuesRequest.new - # - # # Call the list_queues method. - # result = client.list_queues request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Tasks::V2::Queue. - # p item - # end - # - def list_queues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::ListQueuesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_queues.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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_queues.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_queues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :list_queues, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_tasks_stub, :list_queues, 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 queue. - # - # @overload get_queue(request, options = nil) - # Pass arguments to `get_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2::GetQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::GetQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_queue(name: nil) - # Pass arguments to `get_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the queue. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2::Queue] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2::Queue] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::GetQueueRequest.new - # - # # Call the get_queue method. - # result = client.get_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2::Queue. - # p result - # - def get_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::GetQueueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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_queue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :get_queue, request, 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 queue. - # - # Queues created with this method allow tasks to live for a maximum of 31 - # days. After a task is 31 days old, the task will be deleted regardless of - # whether it was dispatched or not. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - # - # @overload create_queue(request, options = nil) - # Pass arguments to `create_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2::CreateQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::CreateQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_queue(parent: nil, queue: nil) - # Pass arguments to `create_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 name in which the queue will be created. - # For example: `projects/PROJECT_ID/locations/LOCATION_ID` - # - # The list of allowed locations can be obtained by calling Cloud - # Tasks' implementation of - # [ListLocations][google.cloud.location.Locations.ListLocations]. - # @param queue [::Google::Cloud::Tasks::V2::Queue, ::Hash] - # Required. The queue to create. - # - # [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an - # existing queue. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2::Queue] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2::Queue] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::CreateQueueRequest.new - # - # # Call the create_queue method. - # result = client.create_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2::Queue. - # p result - # - def create_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::CreateQueueRequest - - # Converts hash and nil to 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_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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_queue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :create_queue, request, 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 queue. - # - # This method creates the queue if it does not exist and updates - # the queue if it does exist. - # - # Queues created with this method allow tasks to live for a maximum of 31 - # days. After a task is 31 days old, the task will be deleted regardless of - # whether it was dispatched or not. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - # - # @overload update_queue(request, options = nil) - # Pass arguments to `update_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2::UpdateQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::UpdateQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_queue(queue: nil, update_mask: nil) - # Pass arguments to `update_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param queue [::Google::Cloud::Tasks::V2::Queue, ::Hash] - # Required. The queue to create or update. - # - # The queue's {::Google::Cloud::Tasks::V2::Queue#name name} must be specified. - # - # Output only fields cannot be modified using UpdateQueue. - # Any value specified for an output only field will be ignored. - # The queue's {::Google::Cloud::Tasks::V2::Queue#name name} cannot be changed. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # A mask used to specify which fields of the queue are being updated. - # - # If empty, then all fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2::Queue] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2::Queue] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::UpdateQueueRequest.new - # - # # Call the update_queue method. - # result = client.update_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2::Queue. - # p result - # - def update_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::UpdateQueueRequest - - # Converts hash and nil to 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_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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.queue&.name - header_params["queue.name"] = request.queue.name - end - - request_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_queue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :update_queue, request, 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 queue. - # - # This command will delete the queue even if it has tasks in it. - # - # Note: If you delete a queue, a queue with the same name can't be created - # for 7 days. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - # - # @overload delete_queue(request, options = nil) - # Pass arguments to `delete_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2::DeleteQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::DeleteQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_queue(name: nil) - # Pass arguments to `delete_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::DeleteQueueRequest.new - # - # # Call the delete_queue method. - # result = client.delete_queue request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::DeleteQueueRequest - - # Converts hash and nil to 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_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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_queue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :delete_queue, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Purges a queue by deleting all of its tasks. - # - # All tasks created before this method is called are permanently deleted. - # - # Purge operations can take up to one minute to take effect. Tasks - # might be dispatched before the purge takes effect. A purge is irreversible. - # - # @overload purge_queue(request, options = nil) - # Pass arguments to `purge_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2::PurgeQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::PurgeQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload purge_queue(name: nil) - # Pass arguments to `purge_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2::Queue] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2::Queue] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::PurgeQueueRequest.new - # - # # Call the purge_queue method. - # result = client.purge_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2::Queue. - # p result - # - def purge_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::PurgeQueueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.purge_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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.purge_queue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.purge_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :purge_queue, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Pauses the queue. - # - # If a queue is paused then the system will stop dispatching tasks - # until the queue is resumed via - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#resume_queue ResumeQueue}. Tasks can - # still be added when the queue is paused. A queue is paused if its - # {::Google::Cloud::Tasks::V2::Queue#state state} is - # {::Google::Cloud::Tasks::V2::Queue::State::PAUSED PAUSED}. - # - # @overload pause_queue(request, options = nil) - # Pass arguments to `pause_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2::PauseQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::PauseQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload pause_queue(name: nil) - # Pass arguments to `pause_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2::Queue] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2::Queue] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::PauseQueueRequest.new - # - # # Call the pause_queue method. - # result = client.pause_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2::Queue. - # p result - # - def pause_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::PauseQueueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.pause_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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.pause_queue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.pause_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :pause_queue, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Resume a queue. - # - # This method resumes a queue after it has been - # {::Google::Cloud::Tasks::V2::Queue::State::PAUSED PAUSED} or - # {::Google::Cloud::Tasks::V2::Queue::State::DISABLED DISABLED}. The state of a - # queue is stored in the queue's {::Google::Cloud::Tasks::V2::Queue#state state}; - # after calling this method it will be set to - # {::Google::Cloud::Tasks::V2::Queue::State::RUNNING RUNNING}. - # - # WARNING: Resuming many high-QPS queues at the same time can - # lead to target overloading. If you are resuming high-QPS - # queues, follow the 500/50/5 pattern described in - # [Managing Cloud Tasks Scaling - # Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). - # - # @overload resume_queue(request, options = nil) - # Pass arguments to `resume_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2::ResumeQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::ResumeQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload resume_queue(name: nil) - # Pass arguments to `resume_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2::Queue] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2::Queue] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::ResumeQueueRequest.new - # - # # Call the resume_queue method. - # result = client.resume_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2::Queue. - # p result - # - def resume_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::ResumeQueueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.resume_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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.resume_queue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.resume_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :resume_queue, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy for a {::Google::Cloud::Tasks::V2::Queue Queue}. - # Returns an empty policy if the resource exists and does not have a policy - # set. - # - # Authorization requires the following - # [Google IAM](https://cloud.google.com/iam) permission on the specified - # resource parent: - # - # * `cloudtasks.queues.getIamPolicy` - # - # @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/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::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::Tasks::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.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_tasks_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy for a {::Google::Cloud::Tasks::V2::Queue Queue}. - # Replaces any existing policy. - # - # Note: The Cloud Console does not check queue-level IAM permissions yet. - # Project-level permissions are required to use the Cloud Console. - # - # Authorization requires the following - # [Google IAM](https://cloud.google.com/iam) permission on the specified - # resource parent: - # - # * `cloudtasks.queues.setIamPolicy` - # - # @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/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::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::Tasks::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.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_tasks_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns permissions that a caller has on a - # {::Google::Cloud::Tasks::V2::Queue Queue}. If the resource does not exist, this - # will return an empty set of permissions, not a - # [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. - # - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::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::Tasks::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.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_tasks_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 - - ## - # Lists the tasks in a queue. - # - # By default, only the {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC} view is - # retrieved due to performance considerations; - # {::Google::Cloud::Tasks::V2::ListTasksRequest#response_view response_view} - # controls the subset of information which is returned. - # - # The tasks may be returned in any order. The ordering may change at any - # time. - # - # @overload list_tasks(request, options = nil) - # Pass arguments to `list_tasks` via a request object, either of type - # {::Google::Cloud::Tasks::V2::ListTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::ListTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_tasks(parent: nil, response_view: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # @param response_view [::Google::Cloud::Tasks::V2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2::Task Task} will be returned. - # - # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; - # not all information is retrieved by default because some data, such as - # payloads, might be desirable to return only when needed because - # of its large size or because of the sensitivity of data that it - # contains. - # - # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires - # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - # permission on the {::Google::Cloud::Tasks::V2::Task Task} resource. - # @param page_size [::Integer] - # Maximum page size. - # - # Fewer tasks than requested might be returned, even if more tasks exist; use - # {::Google::Cloud::Tasks::V2::ListTasksResponse#next_page_token next_page_token} - # in the response to determine if more tasks exist. - # - # The maximum page size is 1000. If unspecified, the page size will be the - # maximum. - # @param page_token [::String] - # A token identifying the page of results to return. - # - # To request the first page results, page_token must be empty. To - # request the next page of results, page_token must be the value of - # {::Google::Cloud::Tasks::V2::ListTasksResponse#next_page_token next_page_token} - # returned from the previous call to - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#list_tasks ListTasks} method. - # - # The page token is valid for only 2 hours. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2::Task>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2::Task>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::ListTasksRequest.new - # - # # Call the list_tasks method. - # result = client.list_tasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Tasks::V2::Task. - # p item - # end - # - def list_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::ListTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_tasks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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_tasks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :list_tasks, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_tasks_stub, :list_tasks, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a task. - # - # @overload get_task(request, options = nil) - # Pass arguments to `get_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2::GetTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::GetTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_task(name: nil, response_view: nil) - # Pass arguments to `get_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @param response_view [::Google::Cloud::Tasks::V2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2::Task Task} will be returned. - # - # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; - # not all information is retrieved by default because some data, such as - # payloads, might be desirable to return only when needed because - # of its large size or because of the sensitivity of data that it - # contains. - # - # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires - # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - # permission on the {::Google::Cloud::Tasks::V2::Task Task} resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2::Task] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2::Task] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::GetTaskRequest.new - # - # # Call the get_task method. - # result = client.get_task request - # - # # The returned object is of type Google::Cloud::Tasks::V2::Task. - # p result - # - def get_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::GetTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :get_task, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a task and adds it to a queue. - # - # Tasks cannot be updated after creation; there is no UpdateTask command. - # - # * The maximum task size is 100KB. - # - # @overload create_task(request, options = nil) - # Pass arguments to `create_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2::CreateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::CreateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_task(parent: nil, task: nil, response_view: nil) - # Pass arguments to `create_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # - # The queue must already exist. - # @param task [::Google::Cloud::Tasks::V2::Task, ::Hash] - # Required. The task to add. - # - # Task names have the following format: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - # The user can optionally specify a task - # {::Google::Cloud::Tasks::V2::Task#name name}. If a name is not specified then - # the system will generate a random unique task id, which will be set in the - # task returned in the {::Google::Cloud::Tasks::V2::Task#name response}. - # - # If {::Google::Cloud::Tasks::V2::Task#schedule_time schedule_time} is not set or - # is in the past then Cloud Tasks will set it to the current time. - # - # Task De-duplication: - # - # Explicitly specifying a task ID enables task de-duplication. If - # a task's ID is identical to that of an existing task or a task - # that was deleted or executed recently then the call will fail - # with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. - # If the task's queue was created using Cloud Tasks, then another task with - # the same name can't be created for ~1hour after the original task was - # deleted or executed. If the task's queue was created using queue.yaml or - # queue.xml, then another task with the same name can't be created - # for ~9days after the original task was deleted or executed. - # - # Because there is an extra lookup cost to identify duplicate task - # names, these {::Google::Cloud::Tasks::V2::CloudTasks::Client#create_task CreateTask} - # calls have significantly increased latency. Using hashed strings for the - # task id or for the prefix of the task id is recommended. Choosing task ids - # that are sequential or have sequential prefixes, for example using a - # timestamp, causes an increase in latency and error rates in all - # task commands. The infrastructure relies on an approximately - # uniform distribution of task ids to store and serve tasks - # efficiently. - # @param response_view [::Google::Cloud::Tasks::V2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2::Task Task} will be returned. - # - # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; - # not all information is retrieved by default because some data, such as - # payloads, might be desirable to return only when needed because - # of its large size or because of the sensitivity of data that it - # contains. - # - # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires - # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - # permission on the {::Google::Cloud::Tasks::V2::Task Task} resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2::Task] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2::Task] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::CreateTaskRequest.new - # - # # Call the create_task method. - # result = client.create_task request - # - # # The returned object is of type Google::Cloud::Tasks::V2::Task. - # p result - # - def create_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::CreateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :create_task, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a task. - # - # A task can be deleted if it is scheduled or dispatched. A task - # cannot be deleted if it has executed successfully or permanently - # failed. - # - # @overload delete_task(request, options = nil) - # Pass arguments to `delete_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2::DeleteTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::DeleteTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_task(name: nil) - # Pass arguments to `delete_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::DeleteTaskRequest.new - # - # # Call the delete_task method. - # result = client.delete_task request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::DeleteTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :delete_task, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Forces a task to run now. - # - # When this method is called, Cloud Tasks will dispatch the task, even if - # the task is already running, the queue has reached its - # {::Google::Cloud::Tasks::V2::RateLimits RateLimits} or is - # {::Google::Cloud::Tasks::V2::Queue::State::PAUSED PAUSED}. - # - # This command is meant to be used for manual debugging. For - # example, {::Google::Cloud::Tasks::V2::CloudTasks::Client#run_task RunTask} can be used to - # retry a failed task after a fix has been made or to manually force a task - # to be dispatched now. - # - # The dispatched task is returned. That is, the task that is returned - # contains the [status][Task.status] after the task is dispatched but - # before the task is received by its target. - # - # If Cloud Tasks receives a successful response from the task's - # target, then the task will be deleted; otherwise the task's - # {::Google::Cloud::Tasks::V2::Task#schedule_time schedule_time} will be reset to - # the time that {::Google::Cloud::Tasks::V2::CloudTasks::Client#run_task RunTask} was - # called plus the retry delay specified in the queue's - # {::Google::Cloud::Tasks::V2::RetryConfig RetryConfig}. - # - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#run_task RunTask} returns - # [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a - # task that has already succeeded or permanently failed. - # - # @overload run_task(request, options = nil) - # Pass arguments to `run_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2::RunTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::RunTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload run_task(name: nil, response_view: nil) - # Pass arguments to `run_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @param response_view [::Google::Cloud::Tasks::V2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2::Task Task} will be returned. - # - # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; - # not all information is retrieved by default because some data, such as - # payloads, might be desirable to return only when needed because - # of its large size or because of the sensitivity of data that it - # contains. - # - # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires - # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - # permission on the {::Google::Cloud::Tasks::V2::Task Task} resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2::Task] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2::Task] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::RunTaskRequest.new - # - # # Call the run_task method. - # result = client.run_task request - # - # # The returned object is of type Google::Cloud::Tasks::V2::Task. - # p result - # - def run_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::RunTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.run_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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.run_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.run_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :run_task, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CloudTasks API. - # - # This class represents the configuration for CloudTasks, - # 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::Tasks::V2::CloudTasks::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_queues to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Tasks::V2::CloudTasks::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_queues.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_queues.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::Tasks::V2::CloudTasks::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 = "cloudtasks.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 CloudTasks 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_queues` - # @return [::Gapic::Config::Method] - # - attr_reader :list_queues - ## - # RPC-specific configuration for `get_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :get_queue - ## - # RPC-specific configuration for `create_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :create_queue - ## - # RPC-specific configuration for `update_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :update_queue - ## - # RPC-specific configuration for `delete_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_queue - ## - # RPC-specific configuration for `purge_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :purge_queue - ## - # RPC-specific configuration for `pause_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :pause_queue - ## - # RPC-specific configuration for `resume_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :resume_queue - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `list_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tasks - ## - # RPC-specific configuration for `get_task` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task - ## - # RPC-specific configuration for `create_task` - # @return [::Gapic::Config::Method] - # - attr_reader :create_task - ## - # RPC-specific configuration for `delete_task` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_task - ## - # RPC-specific configuration for `run_task` - # @return [::Gapic::Config::Method] - # - attr_reader :run_task - - # @private - def initialize parent_rpcs = nil - list_queues_config = parent_rpcs.list_queues if parent_rpcs.respond_to? :list_queues - @list_queues = ::Gapic::Config::Method.new list_queues_config - get_queue_config = parent_rpcs.get_queue if parent_rpcs.respond_to? :get_queue - @get_queue = ::Gapic::Config::Method.new get_queue_config - create_queue_config = parent_rpcs.create_queue if parent_rpcs.respond_to? :create_queue - @create_queue = ::Gapic::Config::Method.new create_queue_config - update_queue_config = parent_rpcs.update_queue if parent_rpcs.respond_to? :update_queue - @update_queue = ::Gapic::Config::Method.new update_queue_config - delete_queue_config = parent_rpcs.delete_queue if parent_rpcs.respond_to? :delete_queue - @delete_queue = ::Gapic::Config::Method.new delete_queue_config - purge_queue_config = parent_rpcs.purge_queue if parent_rpcs.respond_to? :purge_queue - @purge_queue = ::Gapic::Config::Method.new purge_queue_config - pause_queue_config = parent_rpcs.pause_queue if parent_rpcs.respond_to? :pause_queue - @pause_queue = ::Gapic::Config::Method.new pause_queue_config - resume_queue_config = parent_rpcs.resume_queue if parent_rpcs.respond_to? :resume_queue - @resume_queue = ::Gapic::Config::Method.new resume_queue_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks - @list_tasks = ::Gapic::Config::Method.new list_tasks_config - get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task - @get_task = ::Gapic::Config::Method.new get_task_config - create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task - @create_task = ::Gapic::Config::Method.new create_task_config - delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task - @delete_task = ::Gapic::Config::Method.new delete_task_config - run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task - @run_task = ::Gapic::Config::Method.new run_task_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/credentials.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/credentials.rb deleted file mode 100644 index f34da6642695..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/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 Tasks - module V2 - module CloudTasks - # Credentials for the CloudTasks API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "TASKS_CREDENTIALS", - "TASKS_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "TASKS_CREDENTIALS_JSON", - "TASKS_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-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/paths.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/paths.rb deleted file mode 100644 index 06a5c7d8a9b3..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/paths.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 Tasks - module V2 - module CloudTasks - # Path helper methods for the CloudTasks API. - module Paths - ## - # 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 Queue resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/queues/{queue}` - # - # @param project [String] - # @param location [String] - # @param queue [String] - # - # @return [::String] - def queue_path project:, location:, queue: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/queues/#{queue}" - end - - ## - # Create a fully-qualified Task resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/queues/{queue}/tasks/{task}` - # - # @param project [String] - # @param location [String] - # @param queue [String] - # @param task [String] - # - # @return [::String] - def task_path project:, location:, queue:, task: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "queue cannot contain /" if queue.to_s.include? "/" - - "projects/#{project}/locations/#{location}/queues/#{queue}/tasks/#{task}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/rest.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/rest.rb deleted file mode 100644 index a78a827e9ee6..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/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/tasks/v2/version" -require "google/cloud/tasks/v2/bindings_override" - -require "google/cloud/tasks/v2/cloud_tasks/credentials" -require "google/cloud/tasks/v2/cloud_tasks/paths" -require "google/cloud/tasks/v2/cloud_tasks/rest/client" - -module Google - module Cloud - module Tasks - module V2 - ## - # Cloud Tasks allows developers to manage the execution of background - # work in their applications. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/tasks/v2/cloud_tasks/rest" - # client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new - # - module CloudTasks - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/tasks/v2/cloud_tasks/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/rest/client.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/rest/client.rb deleted file mode 100644 index 3075391070f5..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/rest/client.rb +++ /dev/null @@ -1,2112 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/tasks/v2/cloudtasks_pb" -require "google/cloud/tasks/v2/cloud_tasks/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module Tasks - module V2 - module CloudTasks - module Rest - ## - # REST client for the CloudTasks service. - # - # Cloud Tasks allows developers to manage the execution of background - # work in their applications. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudtasks.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_tasks_stub - - ## - # Configure the CloudTasks Client class. - # - # See {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudTasks clients - # ::Google::Cloud::Tasks::V2::CloudTasks::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", "Tasks", "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.rpcs.list_queues.timeout = 20.0 - default_config.rpcs.list_queues.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_queue.timeout = 20.0 - default_config.rpcs.get_queue.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_queue.timeout = 20.0 - - default_config.rpcs.update_queue.timeout = 20.0 - - default_config.rpcs.delete_queue.timeout = 20.0 - default_config.rpcs.delete_queue.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.purge_queue.timeout = 20.0 - - default_config.rpcs.pause_queue.timeout = 20.0 - - default_config.rpcs.resume_queue.timeout = 20.0 - - default_config.rpcs.get_iam_policy.timeout = 20.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.set_iam_policy.timeout = 20.0 - - default_config.rpcs.test_iam_permissions.timeout = 20.0 - default_config.rpcs.test_iam_permissions.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_tasks.timeout = 20.0 - default_config.rpcs.list_tasks.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_task.timeout = 20.0 - default_config.rpcs.get_task.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_task.timeout = 20.0 - - default_config.rpcs.delete_task.timeout = 20.0 - default_config.rpcs.delete_task.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.run_task.timeout = 20.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudTasks 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::Tasks::V2::CloudTasks::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_tasks_stub.universe_domain - end - - ## - # Create a new CloudTasks REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudTasks 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 - - @cloud_tasks_stub = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @cloud_tasks_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_tasks_stub.endpoint - config.universe_domain = @cloud_tasks_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @cloud_tasks_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 - @cloud_tasks_stub.logger - end - - # Service calls - - ## - # Lists queues. - # - # Queues are returned in lexicographical order. - # - # @overload list_queues(request, options = nil) - # Pass arguments to `list_queues` via a request object, either of type - # {::Google::Cloud::Tasks::V2::ListQueuesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::ListQueuesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_queues(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_queues` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 name. - # For example: `projects/PROJECT_ID/locations/LOCATION_ID` - # @param filter [::String] - # `filter` can be used to specify a subset of queues. Any - # {::Google::Cloud::Tasks::V2::Queue Queue} field can be used as a filter and - # several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The - # filter syntax is the same as described in [Stackdriver's Advanced Logs - # Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - # - # Sample filter "state: PAUSED". - # - # Note that using filters might cause fewer queues than the - # requested page_size to be returned. - # @param page_size [::Integer] - # Requested page size. - # - # The maximum page size is 9800. If unspecified, the page size will - # be the maximum. Fewer queues than requested might be returned, - # even if more queues exist; use the - # {::Google::Cloud::Tasks::V2::ListQueuesResponse#next_page_token next_page_token} - # in the response to determine if more queues exist. - # @param page_token [::String] - # A token identifying the page of results to return. - # - # To request the first page results, page_token must be empty. To - # request the next page of results, page_token must be the value of - # {::Google::Cloud::Tasks::V2::ListQueuesResponse#next_page_token next_page_token} - # returned from the previous call to - # {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#list_queues ListQueues} method. It is an - # error to switch the value of the - # {::Google::Cloud::Tasks::V2::ListQueuesRequest#filter filter} while iterating - # through pages. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2::Queue>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2::Queue>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::ListQueuesRequest.new - # - # # Call the list_queues method. - # result = client.list_queues request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Tasks::V2::Queue. - # p item - # end - # - def list_queues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::ListQueuesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_queues.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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_queues.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_queues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.list_queues request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_tasks_stub, :list_queues, "queues", 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 queue. - # - # @overload get_queue(request, options = nil) - # Pass arguments to `get_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2::GetQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::GetQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_queue(name: nil) - # Pass arguments to `get_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the queue. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2::Queue] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::GetQueueRequest.new - # - # # Call the get_queue method. - # result = client.get_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2::Queue. - # p result - # - def get_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::GetQueueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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_queue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.get_queue request, 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 queue. - # - # Queues created with this method allow tasks to live for a maximum of 31 - # days. After a task is 31 days old, the task will be deleted regardless of - # whether it was dispatched or not. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - # - # @overload create_queue(request, options = nil) - # Pass arguments to `create_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2::CreateQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::CreateQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_queue(parent: nil, queue: nil) - # Pass arguments to `create_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 name in which the queue will be created. - # For example: `projects/PROJECT_ID/locations/LOCATION_ID` - # - # The list of allowed locations can be obtained by calling Cloud - # Tasks' implementation of - # [ListLocations][google.cloud.location.Locations.ListLocations]. - # @param queue [::Google::Cloud::Tasks::V2::Queue, ::Hash] - # Required. The queue to create. - # - # [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an - # existing queue. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2::Queue] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::CreateQueueRequest.new - # - # # Call the create_queue method. - # result = client.create_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2::Queue. - # p result - # - def create_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::CreateQueueRequest - - # Converts hash and nil to an 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_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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_queue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.create_queue request, 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 queue. - # - # This method creates the queue if it does not exist and updates - # the queue if it does exist. - # - # Queues created with this method allow tasks to live for a maximum of 31 - # days. After a task is 31 days old, the task will be deleted regardless of - # whether it was dispatched or not. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - # - # @overload update_queue(request, options = nil) - # Pass arguments to `update_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2::UpdateQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::UpdateQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_queue(queue: nil, update_mask: nil) - # Pass arguments to `update_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param queue [::Google::Cloud::Tasks::V2::Queue, ::Hash] - # Required. The queue to create or update. - # - # The queue's {::Google::Cloud::Tasks::V2::Queue#name name} must be specified. - # - # Output only fields cannot be modified using UpdateQueue. - # Any value specified for an output only field will be ignored. - # The queue's {::Google::Cloud::Tasks::V2::Queue#name name} cannot be changed. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # A mask used to specify which fields of the queue are being updated. - # - # If empty, then all fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2::Queue] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::UpdateQueueRequest.new - # - # # Call the update_queue method. - # result = client.update_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2::Queue. - # p result - # - def update_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::UpdateQueueRequest - - # Converts hash and nil to an 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_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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_queue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.update_queue request, 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 queue. - # - # This command will delete the queue even if it has tasks in it. - # - # Note: If you delete a queue, a queue with the same name can't be created - # for 7 days. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - # - # @overload delete_queue(request, options = nil) - # Pass arguments to `delete_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2::DeleteQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::DeleteQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_queue(name: nil) - # Pass arguments to `delete_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::DeleteQueueRequest.new - # - # # Call the delete_queue method. - # result = client.delete_queue request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::DeleteQueueRequest - - # Converts hash and nil to an 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_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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_queue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.delete_queue request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Purges a queue by deleting all of its tasks. - # - # All tasks created before this method is called are permanently deleted. - # - # Purge operations can take up to one minute to take effect. Tasks - # might be dispatched before the purge takes effect. A purge is irreversible. - # - # @overload purge_queue(request, options = nil) - # Pass arguments to `purge_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2::PurgeQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::PurgeQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload purge_queue(name: nil) - # Pass arguments to `purge_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2::Queue] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::PurgeQueueRequest.new - # - # # Call the purge_queue method. - # result = client.purge_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2::Queue. - # p result - # - def purge_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::PurgeQueueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.purge_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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.purge_queue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.purge_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.purge_queue request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Pauses the queue. - # - # If a queue is paused then the system will stop dispatching tasks - # until the queue is resumed via - # {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#resume_queue ResumeQueue}. Tasks can - # still be added when the queue is paused. A queue is paused if its - # {::Google::Cloud::Tasks::V2::Queue#state state} is - # {::Google::Cloud::Tasks::V2::Queue::State::PAUSED PAUSED}. - # - # @overload pause_queue(request, options = nil) - # Pass arguments to `pause_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2::PauseQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::PauseQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload pause_queue(name: nil) - # Pass arguments to `pause_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2::Queue] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::PauseQueueRequest.new - # - # # Call the pause_queue method. - # result = client.pause_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2::Queue. - # p result - # - def pause_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::PauseQueueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.pause_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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.pause_queue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.pause_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.pause_queue request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Resume a queue. - # - # This method resumes a queue after it has been - # {::Google::Cloud::Tasks::V2::Queue::State::PAUSED PAUSED} or - # {::Google::Cloud::Tasks::V2::Queue::State::DISABLED DISABLED}. The state of a - # queue is stored in the queue's {::Google::Cloud::Tasks::V2::Queue#state state}; - # after calling this method it will be set to - # {::Google::Cloud::Tasks::V2::Queue::State::RUNNING RUNNING}. - # - # WARNING: Resuming many high-QPS queues at the same time can - # lead to target overloading. If you are resuming high-QPS - # queues, follow the 500/50/5 pattern described in - # [Managing Cloud Tasks Scaling - # Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). - # - # @overload resume_queue(request, options = nil) - # Pass arguments to `resume_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2::ResumeQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::ResumeQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload resume_queue(name: nil) - # Pass arguments to `resume_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2::Queue] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::ResumeQueueRequest.new - # - # # Call the resume_queue method. - # result = client.resume_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2::Queue. - # p result - # - def resume_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::ResumeQueueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.resume_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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.resume_queue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.resume_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.resume_queue request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy for a {::Google::Cloud::Tasks::V2::Queue Queue}. - # Returns an empty policy if the resource exists and does not have a policy - # set. - # - # Authorization requires the following - # [Google IAM](https://cloud.google.com/iam) permission on the specified - # resource parent: - # - # * `cloudtasks.queues.getIamPolicy` - # - # @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/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::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::Tasks::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_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_tasks_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy for a {::Google::Cloud::Tasks::V2::Queue Queue}. - # Replaces any existing policy. - # - # Note: The Cloud Console does not check queue-level IAM permissions yet. - # Project-level permissions are required to use the Cloud Console. - # - # Authorization requires the following - # [Google IAM](https://cloud.google.com/iam) permission on the specified - # resource parent: - # - # * `cloudtasks.queues.setIamPolicy` - # - # @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/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::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::Tasks::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.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_tasks_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns permissions that a caller has on a - # {::Google::Cloud::Tasks::V2::Queue Queue}. If the resource does not exist, this - # will return an empty set of permissions, not a - # [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. - # - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::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::Tasks::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.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_tasks_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 - - ## - # Lists the tasks in a queue. - # - # By default, only the {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC} view is - # retrieved due to performance considerations; - # {::Google::Cloud::Tasks::V2::ListTasksRequest#response_view response_view} - # controls the subset of information which is returned. - # - # The tasks may be returned in any order. The ordering may change at any - # time. - # - # @overload list_tasks(request, options = nil) - # Pass arguments to `list_tasks` via a request object, either of type - # {::Google::Cloud::Tasks::V2::ListTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::ListTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_tasks(parent: nil, response_view: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # @param response_view [::Google::Cloud::Tasks::V2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2::Task Task} will be returned. - # - # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; - # not all information is retrieved by default because some data, such as - # payloads, might be desirable to return only when needed because - # of its large size or because of the sensitivity of data that it - # contains. - # - # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires - # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - # permission on the {::Google::Cloud::Tasks::V2::Task Task} resource. - # @param page_size [::Integer] - # Maximum page size. - # - # Fewer tasks than requested might be returned, even if more tasks exist; use - # {::Google::Cloud::Tasks::V2::ListTasksResponse#next_page_token next_page_token} - # in the response to determine if more tasks exist. - # - # The maximum page size is 1000. If unspecified, the page size will be the - # maximum. - # @param page_token [::String] - # A token identifying the page of results to return. - # - # To request the first page results, page_token must be empty. To - # request the next page of results, page_token must be the value of - # {::Google::Cloud::Tasks::V2::ListTasksResponse#next_page_token next_page_token} - # returned from the previous call to - # {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#list_tasks ListTasks} method. - # - # The page token is valid for only 2 hours. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2::Task>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2::Task>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::ListTasksRequest.new - # - # # Call the list_tasks method. - # result = client.list_tasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Tasks::V2::Task. - # p item - # end - # - def list_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::ListTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_tasks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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_tasks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.list_tasks request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_tasks_stub, :list_tasks, "tasks", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a task. - # - # @overload get_task(request, options = nil) - # Pass arguments to `get_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2::GetTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::GetTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_task(name: nil, response_view: nil) - # Pass arguments to `get_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @param response_view [::Google::Cloud::Tasks::V2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2::Task Task} will be returned. - # - # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; - # not all information is retrieved by default because some data, such as - # payloads, might be desirable to return only when needed because - # of its large size or because of the sensitivity of data that it - # contains. - # - # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires - # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - # permission on the {::Google::Cloud::Tasks::V2::Task Task} resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2::Task] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::GetTaskRequest.new - # - # # Call the get_task method. - # result = client.get_task request - # - # # The returned object is of type Google::Cloud::Tasks::V2::Task. - # p result - # - def get_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::GetTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.get_task request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a task and adds it to a queue. - # - # Tasks cannot be updated after creation; there is no UpdateTask command. - # - # * The maximum task size is 100KB. - # - # @overload create_task(request, options = nil) - # Pass arguments to `create_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2::CreateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::CreateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_task(parent: nil, task: nil, response_view: nil) - # Pass arguments to `create_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # - # The queue must already exist. - # @param task [::Google::Cloud::Tasks::V2::Task, ::Hash] - # Required. The task to add. - # - # Task names have the following format: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - # The user can optionally specify a task - # {::Google::Cloud::Tasks::V2::Task#name name}. If a name is not specified then - # the system will generate a random unique task id, which will be set in the - # task returned in the {::Google::Cloud::Tasks::V2::Task#name response}. - # - # If {::Google::Cloud::Tasks::V2::Task#schedule_time schedule_time} is not set or - # is in the past then Cloud Tasks will set it to the current time. - # - # Task De-duplication: - # - # Explicitly specifying a task ID enables task de-duplication. If - # a task's ID is identical to that of an existing task or a task - # that was deleted or executed recently then the call will fail - # with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. - # If the task's queue was created using Cloud Tasks, then another task with - # the same name can't be created for ~1hour after the original task was - # deleted or executed. If the task's queue was created using queue.yaml or - # queue.xml, then another task with the same name can't be created - # for ~9days after the original task was deleted or executed. - # - # Because there is an extra lookup cost to identify duplicate task - # names, these {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#create_task CreateTask} - # calls have significantly increased latency. Using hashed strings for the - # task id or for the prefix of the task id is recommended. Choosing task ids - # that are sequential or have sequential prefixes, for example using a - # timestamp, causes an increase in latency and error rates in all - # task commands. The infrastructure relies on an approximately - # uniform distribution of task ids to store and serve tasks - # efficiently. - # @param response_view [::Google::Cloud::Tasks::V2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2::Task Task} will be returned. - # - # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; - # not all information is retrieved by default because some data, such as - # payloads, might be desirable to return only when needed because - # of its large size or because of the sensitivity of data that it - # contains. - # - # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires - # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - # permission on the {::Google::Cloud::Tasks::V2::Task Task} resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2::Task] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::CreateTaskRequest.new - # - # # Call the create_task method. - # result = client.create_task request - # - # # The returned object is of type Google::Cloud::Tasks::V2::Task. - # p result - # - def create_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::CreateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.create_task request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a task. - # - # A task can be deleted if it is scheduled or dispatched. A task - # cannot be deleted if it has executed successfully or permanently - # failed. - # - # @overload delete_task(request, options = nil) - # Pass arguments to `delete_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2::DeleteTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::DeleteTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_task(name: nil) - # Pass arguments to `delete_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::DeleteTaskRequest.new - # - # # Call the delete_task method. - # result = client.delete_task request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::DeleteTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.delete_task request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Forces a task to run now. - # - # When this method is called, Cloud Tasks will dispatch the task, even if - # the task is already running, the queue has reached its - # {::Google::Cloud::Tasks::V2::RateLimits RateLimits} or is - # {::Google::Cloud::Tasks::V2::Queue::State::PAUSED PAUSED}. - # - # This command is meant to be used for manual debugging. For - # example, {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#run_task RunTask} can be used to - # retry a failed task after a fix has been made or to manually force a task - # to be dispatched now. - # - # The dispatched task is returned. That is, the task that is returned - # contains the [status][Task.status] after the task is dispatched but - # before the task is received by its target. - # - # If Cloud Tasks receives a successful response from the task's - # target, then the task will be deleted; otherwise the task's - # {::Google::Cloud::Tasks::V2::Task#schedule_time schedule_time} will be reset to - # the time that {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#run_task RunTask} was - # called plus the retry delay specified in the queue's - # {::Google::Cloud::Tasks::V2::RetryConfig RetryConfig}. - # - # {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#run_task RunTask} returns - # [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a - # task that has already succeeded or permanently failed. - # - # @overload run_task(request, options = nil) - # Pass arguments to `run_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2::RunTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2::RunTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload run_task(name: nil, response_view: nil) - # Pass arguments to `run_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @param response_view [::Google::Cloud::Tasks::V2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2::Task Task} will be returned. - # - # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; - # not all information is retrieved by default because some data, such as - # payloads, might be desirable to return only when needed because - # of its large size or because of the sensitivity of data that it - # contains. - # - # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires - # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - # permission on the {::Google::Cloud::Tasks::V2::Task Task} resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2::Task] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2::RunTaskRequest.new - # - # # Call the run_task method. - # result = client.run_task request - # - # # The returned object is of type Google::Cloud::Tasks::V2::Task. - # p result - # - def run_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2::RunTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.run_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::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.run_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.run_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.run_task request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CloudTasks REST API. - # - # This class represents the configuration for CloudTasks 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::Tasks::V2::CloudTasks::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_queues to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_queues.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_queues.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 = "cloudtasks.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 CloudTasks 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_queues` - # @return [::Gapic::Config::Method] - # - attr_reader :list_queues - ## - # RPC-specific configuration for `get_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :get_queue - ## - # RPC-specific configuration for `create_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :create_queue - ## - # RPC-specific configuration for `update_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :update_queue - ## - # RPC-specific configuration for `delete_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_queue - ## - # RPC-specific configuration for `purge_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :purge_queue - ## - # RPC-specific configuration for `pause_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :pause_queue - ## - # RPC-specific configuration for `resume_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :resume_queue - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `list_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tasks - ## - # RPC-specific configuration for `get_task` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task - ## - # RPC-specific configuration for `create_task` - # @return [::Gapic::Config::Method] - # - attr_reader :create_task - ## - # RPC-specific configuration for `delete_task` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_task - ## - # RPC-specific configuration for `run_task` - # @return [::Gapic::Config::Method] - # - attr_reader :run_task - - # @private - def initialize parent_rpcs = nil - list_queues_config = parent_rpcs.list_queues if parent_rpcs.respond_to? :list_queues - @list_queues = ::Gapic::Config::Method.new list_queues_config - get_queue_config = parent_rpcs.get_queue if parent_rpcs.respond_to? :get_queue - @get_queue = ::Gapic::Config::Method.new get_queue_config - create_queue_config = parent_rpcs.create_queue if parent_rpcs.respond_to? :create_queue - @create_queue = ::Gapic::Config::Method.new create_queue_config - update_queue_config = parent_rpcs.update_queue if parent_rpcs.respond_to? :update_queue - @update_queue = ::Gapic::Config::Method.new update_queue_config - delete_queue_config = parent_rpcs.delete_queue if parent_rpcs.respond_to? :delete_queue - @delete_queue = ::Gapic::Config::Method.new delete_queue_config - purge_queue_config = parent_rpcs.purge_queue if parent_rpcs.respond_to? :purge_queue - @purge_queue = ::Gapic::Config::Method.new purge_queue_config - pause_queue_config = parent_rpcs.pause_queue if parent_rpcs.respond_to? :pause_queue - @pause_queue = ::Gapic::Config::Method.new pause_queue_config - resume_queue_config = parent_rpcs.resume_queue if parent_rpcs.respond_to? :resume_queue - @resume_queue = ::Gapic::Config::Method.new resume_queue_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks - @list_tasks = ::Gapic::Config::Method.new list_tasks_config - get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task - @get_task = ::Gapic::Config::Method.new get_task_config - create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task - @create_task = ::Gapic::Config::Method.new create_task_config - delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task - @delete_task = ::Gapic::Config::Method.new delete_task_config - run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task - @run_task = ::Gapic::Config::Method.new run_task_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/rest/service_stub.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/rest/service_stub.rb deleted file mode 100644 index 1ca3b143b8ed..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloud_tasks/rest/service_stub.rb +++ /dev/null @@ -1,1067 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/tasks/v2/cloudtasks_pb" - -module Google - module Cloud - module Tasks - module V2 - module CloudTasks - module Rest - ## - # REST service stub for the CloudTasks 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_queues REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::ListQueuesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2::ListQueuesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2::ListQueuesResponse] - # A result object deserialized from the server's reply - def list_queues request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_queues_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_queues", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2::ListQueuesResponse.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_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::GetQueueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2::Queue] - # A result object deserialized from the server's reply - def get_queue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_queue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_queue", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2::Queue.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_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::CreateQueueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2::Queue] - # A result object deserialized from the server's reply - def create_queue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_queue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_queue", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2::Queue.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_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::UpdateQueueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2::Queue] - # A result object deserialized from the server's reply - def update_queue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_queue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_queue", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2::Queue.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_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::DeleteQueueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_queue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_queue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_queue", - 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 purge_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::PurgeQueueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2::Queue] - # A result object deserialized from the server's reply - def purge_queue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_purge_queue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "purge_queue", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2::Queue.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the pause_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::PauseQueueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2::Queue] - # A result object deserialized from the server's reply - def pause_queue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_pause_queue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "pause_queue", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2::Queue.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the resume_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::ResumeQueueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2::Queue] - # A result object deserialized from the server's reply - def resume_queue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_resume_queue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "resume_queue", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2::Queue.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_tasks REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::ListTasksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2::ListTasksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2::ListTasksResponse] - # A result object deserialized from the server's reply - def list_tasks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_tasks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_tasks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2::ListTasksResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::GetTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2::Task] - # A result object deserialized from the server's reply - def get_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2::Task.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::CreateTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2::Task] - # A result object deserialized from the server's reply - def create_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2::Task.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::DeleteTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::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_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::RunTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2::Task] - # A result object deserialized from the server's reply - def run_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_run_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "run_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2::Task.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_queues REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::ListQueuesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_queues_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/queues", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::GetQueueRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_queue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::CreateQueueRequest] - # 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_queue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/queues", - body: "queue", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::UpdateQueueRequest] - # 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_queue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{queue.name}", - body: "queue", - matches: [ - ["queue.name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::DeleteQueueRequest] - # 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_queue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the purge_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::PurgeQueueRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_purge_queue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:purge", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the pause_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::PauseQueueRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_pause_queue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:pause", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the resume_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::ResumeQueueRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_resume_queue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:resume", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, 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: :post, - uri_template: "/v2/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, 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: "/v2/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, 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: "/v2/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_tasks REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::ListTasksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_tasks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/tasks", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::GetTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::CreateTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/tasks", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::DeleteTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the run_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2::RunTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_run_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:run", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloudtasks_pb.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloudtasks_pb.rb deleted file mode 100644 index 99c9c50bb333..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloudtasks_pb.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/tasks/v2/cloudtasks.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/tasks/v2/queue_pb' -require 'google/cloud/tasks/v2/task_pb' -require 'google/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n&google/cloud/tasks/v2/cloudtasks.proto\x12\x15google.cloud.tasks.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a!google/cloud/tasks/v2/queue.proto\x1a google/cloud/tasks/v2/task.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x83\x01\n\x11ListQueuesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudtasks.googleapis.com/Queue\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\x12ListQueuesResponse\x12,\n\x06queues\x18\x01 \x03(\x0b\x32\x1c.google.cloud.tasks.v2.Queue\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"H\n\x0fGetQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"\x7f\n\x12\x43reateQueueRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudtasks.googleapis.com/Queue\x12\x30\n\x05queue\x18\x02 \x01(\x0b\x32\x1c.google.cloud.tasks.v2.QueueB\x03\xe0\x41\x02\"w\n\x12UpdateQueueRequest\x12\x30\n\x05queue\x18\x01 \x01(\x0b\x32\x1c.google.cloud.tasks.v2.QueueB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"K\n\x12\x44\x65leteQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"J\n\x11PurgeQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"J\n\x11PauseQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"K\n\x12ResumeQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"\xaa\x01\n\x10ListTasksRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x63loudtasks.googleapis.com/Task\x12\x37\n\rresponse_view\x18\x02 \x01(\x0e\x32 .google.cloud.tasks.v2.Task.View\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"X\n\x11ListTasksResponse\x12*\n\x05tasks\x18\x01 \x03(\x0b\x32\x1b.google.cloud.tasks.v2.Task\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x7f\n\x0eGetTaskRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudtasks.googleapis.com/Task\x12\x37\n\rresponse_view\x18\x02 \x01(\x0e\x32 .google.cloud.tasks.v2.Task.View\"\xb4\x01\n\x11\x43reateTaskRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x63loudtasks.googleapis.com/Task\x12.\n\x04task\x18\x02 \x01(\x0b\x32\x1b.google.cloud.tasks.v2.TaskB\x03\xe0\x41\x02\x12\x37\n\rresponse_view\x18\x03 \x01(\x0e\x32 .google.cloud.tasks.v2.Task.View\"I\n\x11\x44\x65leteTaskRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudtasks.googleapis.com/Task\"\x7f\n\x0eRunTaskRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudtasks.googleapis.com/Task\x12\x37\n\rresponse_view\x18\x02 \x01(\x0e\x32 .google.cloud.tasks.v2.Task.View2\xdd\x14\n\nCloudTasks\x12\x9e\x01\n\nListQueues\x12(.google.cloud.tasks.v2.ListQueuesRequest\x1a).google.cloud.tasks.v2.ListQueuesResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v2/{parent=projects/*/locations/*}/queues\x12\x8b\x01\n\x08GetQueue\x12&.google.cloud.tasks.v2.GetQueueRequest\x1a\x1c.google.cloud.tasks.v2.Queue\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v2/{name=projects/*/locations/*/queues/*}\x12\xa0\x01\n\x0b\x43reateQueue\x12).google.cloud.tasks.v2.CreateQueueRequest\x1a\x1c.google.cloud.tasks.v2.Queue\"H\xda\x41\x0cparent,queue\x82\xd3\xe4\x93\x02\x33\"*/v2/{parent=projects/*/locations/*}/queues:\x05queue\x12\xab\x01\n\x0bUpdateQueue\x12).google.cloud.tasks.v2.UpdateQueueRequest\x1a\x1c.google.cloud.tasks.v2.Queue\"S\xda\x41\x11queue,update_mask\x82\xd3\xe4\x93\x02\x39\x32\x30/v2/{queue.name=projects/*/locations/*/queues/*}:\x05queue\x12\x8b\x01\n\x0b\x44\x65leteQueue\x12).google.cloud.tasks.v2.DeleteQueueRequest\x1a\x16.google.protobuf.Empty\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v2/{name=projects/*/locations/*/queues/*}\x12\x98\x01\n\nPurgeQueue\x12(.google.cloud.tasks.v2.PurgeQueueRequest\x1a\x1c.google.cloud.tasks.v2.Queue\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\"0/v2/{name=projects/*/locations/*/queues/*}:purge:\x01*\x12\x98\x01\n\nPauseQueue\x12(.google.cloud.tasks.v2.PauseQueueRequest\x1a\x1c.google.cloud.tasks.v2.Queue\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\"0/v2/{name=projects/*/locations/*/queues/*}:pause:\x01*\x12\x9b\x01\n\x0bResumeQueue\x12).google.cloud.tasks.v2.ResumeQueueRequest\x1a\x1c.google.cloud.tasks.v2.Queue\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v2/{name=projects/*/locations/*/queues/*}:resume:\x01*\x12\x9c\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"Q\xda\x41\x08resource\x82\xd3\xe4\x93\x02@\";/v2/{resource=projects/*/locations/*/queues/*}:getIamPolicy:\x01*\x12\xa3\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"X\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02@\";/v2/{resource=projects/*/locations/*/queues/*}:setIamPolicy:\x01*\x12\xce\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"c\xda\x41\x14resource,permissions\x82\xd3\xe4\x93\x02\x46\"A/v2/{resource=projects/*/locations/*/queues/*}:testIamPermissions:\x01*\x12\xa3\x01\n\tListTasks\x12\'.google.cloud.tasks.v2.ListTasksRequest\x1a(.google.cloud.tasks.v2.ListTasksResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v2/{parent=projects/*/locations/*/queues/*}/tasks\x12\x90\x01\n\x07GetTask\x12%.google.cloud.tasks.v2.GetTaskRequest\x1a\x1b.google.cloud.tasks.v2.Task\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v2/{name=projects/*/locations/*/queues/*/tasks/*}\x12\xa0\x01\n\nCreateTask\x12(.google.cloud.tasks.v2.CreateTaskRequest\x1a\x1b.google.cloud.tasks.v2.Task\"K\xda\x41\x0bparent,task\x82\xd3\xe4\x93\x02\x37\"2/v2/{parent=projects/*/locations/*/queues/*}/tasks:\x01*\x12\x91\x01\n\nDeleteTask\x12(.google.cloud.tasks.v2.DeleteTaskRequest\x1a\x16.google.protobuf.Empty\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v2/{name=projects/*/locations/*/queues/*/tasks/*}\x12\x97\x01\n\x07RunTask\x12%.google.cloud.tasks.v2.RunTaskRequest\x1a\x1b.google.cloud.tasks.v2.Task\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\"6/v2/{name=projects/*/locations/*/queues/*/tasks/*}:run:\x01*\x1aM\xca\x41\x19\x63loudtasks.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBv\n\x19\x63om.google.cloud.tasks.v2B\x0f\x43loudTasksProtoP\x01Z>cloud.google.com/go/cloudtasks/apiv2/cloudtaskspb;cloudtaskspb\xa2\x02\x05TASKSb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Tasks - module V2 - ListQueuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.ListQueuesRequest").msgclass - ListQueuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.ListQueuesResponse").msgclass - GetQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.GetQueueRequest").msgclass - CreateQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.CreateQueueRequest").msgclass - UpdateQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.UpdateQueueRequest").msgclass - DeleteQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.DeleteQueueRequest").msgclass - PurgeQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.PurgeQueueRequest").msgclass - PauseQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.PauseQueueRequest").msgclass - ResumeQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.ResumeQueueRequest").msgclass - ListTasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.ListTasksRequest").msgclass - ListTasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.ListTasksResponse").msgclass - GetTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.GetTaskRequest").msgclass - CreateTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.CreateTaskRequest").msgclass - DeleteTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.DeleteTaskRequest").msgclass - RunTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.RunTaskRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloudtasks_services_pb.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloudtasks_services_pb.rb deleted file mode 100644 index cb4e06b079fc..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/cloudtasks_services_pb.rb +++ /dev/null @@ -1,206 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/tasks/v2/cloudtasks.proto for package 'google.cloud.tasks.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/tasks/v2/cloudtasks_pb' - -module Google - module Cloud - module Tasks - module V2 - module CloudTasks - # Cloud Tasks allows developers to manage the execution of background - # work in their applications. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.tasks.v2.CloudTasks' - - # Lists queues. - # - # Queues are returned in lexicographical order. - rpc :ListQueues, ::Google::Cloud::Tasks::V2::ListQueuesRequest, ::Google::Cloud::Tasks::V2::ListQueuesResponse - # Gets a queue. - rpc :GetQueue, ::Google::Cloud::Tasks::V2::GetQueueRequest, ::Google::Cloud::Tasks::V2::Queue - # Creates a queue. - # - # Queues created with this method allow tasks to live for a maximum of 31 - # days. After a task is 31 days old, the task will be deleted regardless of - # whether it was dispatched or not. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - rpc :CreateQueue, ::Google::Cloud::Tasks::V2::CreateQueueRequest, ::Google::Cloud::Tasks::V2::Queue - # Updates a queue. - # - # This method creates the queue if it does not exist and updates - # the queue if it does exist. - # - # Queues created with this method allow tasks to live for a maximum of 31 - # days. After a task is 31 days old, the task will be deleted regardless of - # whether it was dispatched or not. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - rpc :UpdateQueue, ::Google::Cloud::Tasks::V2::UpdateQueueRequest, ::Google::Cloud::Tasks::V2::Queue - # Deletes a queue. - # - # This command will delete the queue even if it has tasks in it. - # - # Note: If you delete a queue, a queue with the same name can't be created - # for 7 days. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - rpc :DeleteQueue, ::Google::Cloud::Tasks::V2::DeleteQueueRequest, ::Google::Protobuf::Empty - # Purges a queue by deleting all of its tasks. - # - # All tasks created before this method is called are permanently deleted. - # - # Purge operations can take up to one minute to take effect. Tasks - # might be dispatched before the purge takes effect. A purge is irreversible. - rpc :PurgeQueue, ::Google::Cloud::Tasks::V2::PurgeQueueRequest, ::Google::Cloud::Tasks::V2::Queue - # Pauses the queue. - # - # If a queue is paused then the system will stop dispatching tasks - # until the queue is resumed via - # [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. Tasks can - # still be added when the queue is paused. A queue is paused if its - # [state][google.cloud.tasks.v2.Queue.state] is - # [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. - rpc :PauseQueue, ::Google::Cloud::Tasks::V2::PauseQueueRequest, ::Google::Cloud::Tasks::V2::Queue - # Resume a queue. - # - # This method resumes a queue after it has been - # [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED] or - # [DISABLED][google.cloud.tasks.v2.Queue.State.DISABLED]. The state of a - # queue is stored in the queue's [state][google.cloud.tasks.v2.Queue.state]; - # after calling this method it will be set to - # [RUNNING][google.cloud.tasks.v2.Queue.State.RUNNING]. - # - # WARNING: Resuming many high-QPS queues at the same time can - # lead to target overloading. If you are resuming high-QPS - # queues, follow the 500/50/5 pattern described in - # [Managing Cloud Tasks Scaling - # Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). - rpc :ResumeQueue, ::Google::Cloud::Tasks::V2::ResumeQueueRequest, ::Google::Cloud::Tasks::V2::Queue - # Gets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. - # Returns an empty policy if the resource exists and does not have a policy - # set. - # - # Authorization requires the following - # [Google IAM](https://cloud.google.com/iam) permission on the specified - # resource parent: - # - # * `cloudtasks.queues.getIamPolicy` - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. - # Replaces any existing policy. - # - # Note: The Cloud Console does not check queue-level IAM permissions yet. - # Project-level permissions are required to use the Cloud Console. - # - # Authorization requires the following - # [Google IAM](https://cloud.google.com/iam) permission on the specified - # resource parent: - # - # * `cloudtasks.queues.setIamPolicy` - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Returns permissions that a caller has on a - # [Queue][google.cloud.tasks.v2.Queue]. If the resource does not exist, this - # will return an empty set of permissions, not a - # [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. - # - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - # Lists the tasks in a queue. - # - # By default, only the [BASIC][google.cloud.tasks.v2.Task.View.BASIC] view is - # retrieved due to performance considerations; - # [response_view][google.cloud.tasks.v2.ListTasksRequest.response_view] - # controls the subset of information which is returned. - # - # The tasks may be returned in any order. The ordering may change at any - # time. - rpc :ListTasks, ::Google::Cloud::Tasks::V2::ListTasksRequest, ::Google::Cloud::Tasks::V2::ListTasksResponse - # Gets a task. - rpc :GetTask, ::Google::Cloud::Tasks::V2::GetTaskRequest, ::Google::Cloud::Tasks::V2::Task - # Creates a task and adds it to a queue. - # - # Tasks cannot be updated after creation; there is no UpdateTask command. - # - # * The maximum task size is 100KB. - rpc :CreateTask, ::Google::Cloud::Tasks::V2::CreateTaskRequest, ::Google::Cloud::Tasks::V2::Task - # Deletes a task. - # - # A task can be deleted if it is scheduled or dispatched. A task - # cannot be deleted if it has executed successfully or permanently - # failed. - rpc :DeleteTask, ::Google::Cloud::Tasks::V2::DeleteTaskRequest, ::Google::Protobuf::Empty - # Forces a task to run now. - # - # When this method is called, Cloud Tasks will dispatch the task, even if - # the task is already running, the queue has reached its - # [RateLimits][google.cloud.tasks.v2.RateLimits] or is - # [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. - # - # This command is meant to be used for manual debugging. For - # example, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] can be used to - # retry a failed task after a fix has been made or to manually force a task - # to be dispatched now. - # - # The dispatched task is returned. That is, the task that is returned - # contains the [status][Task.status] after the task is dispatched but - # before the task is received by its target. - # - # If Cloud Tasks receives a successful response from the task's - # target, then the task will be deleted; otherwise the task's - # [schedule_time][google.cloud.tasks.v2.Task.schedule_time] will be reset to - # the time that [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] was - # called plus the retry delay specified in the queue's - # [RetryConfig][google.cloud.tasks.v2.RetryConfig]. - # - # [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] returns - # [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a - # task that has already succeeded or permanently failed. - rpc :RunTask, ::Google::Cloud::Tasks::V2::RunTaskRequest, ::Google::Cloud::Tasks::V2::Task - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/queue_pb.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/queue_pb.rb deleted file mode 100644 index c9d91a1c7647..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/queue_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/tasks/v2/queue.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/tasks/v2/target_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n!google/cloud/tasks/v2/queue.proto\x12\x15google.cloud.tasks.v2\x1a\x19google/api/resource.proto\x1a\"google/cloud/tasks/v2/target.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb2\x04\n\x05Queue\x12\x0c\n\x04name\x18\x01 \x01(\t\x12L\n\x1b\x61pp_engine_routing_override\x18\x02 \x01(\x0b\x32\'.google.cloud.tasks.v2.AppEngineRouting\x12\x36\n\x0brate_limits\x18\x03 \x01(\x0b\x32!.google.cloud.tasks.v2.RateLimits\x12\x38\n\x0cretry_config\x18\x04 \x01(\x0b\x32\".google.cloud.tasks.v2.RetryConfig\x12\x31\n\x05state\x18\x05 \x01(\x0e\x32\".google.cloud.tasks.v2.Queue.State\x12.\n\npurge_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12S\n\x1astackdriver_logging_config\x18\t \x01(\x0b\x32/.google.cloud.tasks.v2.StackdriverLoggingConfig\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\n\n\x06PAUSED\x10\x02\x12\x0c\n\x08\x44ISABLED\x10\x03:\\\xea\x41Y\n\x1f\x63loudtasks.googleapis.com/Queue\x12\x36projects/{project}/locations/{location}/queues/{queue}\"j\n\nRateLimits\x12!\n\x19max_dispatches_per_second\x18\x01 \x01(\x01\x12\x16\n\x0emax_burst_size\x18\x02 \x01(\x05\x12!\n\x19max_concurrent_dispatches\x18\x03 \x01(\x05\"\xd1\x01\n\x0bRetryConfig\x12\x14\n\x0cmax_attempts\x18\x01 \x01(\x05\x12\x35\n\x12max_retry_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\x0bmin_backoff\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\x0bmax_backoff\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\rmax_doublings\x18\x05 \x01(\x05\"2\n\x18StackdriverLoggingConfig\x12\x16\n\x0esampling_ratio\x18\x01 \x01(\x01\x42i\n\x19\x63om.google.cloud.tasks.v2B\nQueueProtoP\x01Z>cloud.google.com/go/cloudtasks/apiv2/cloudtaskspb;cloudtaskspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Tasks - module V2 - Queue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.Queue").msgclass - Queue::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.Queue.State").enummodule - RateLimits = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.RateLimits").msgclass - RetryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.RetryConfig").msgclass - StackdriverLoggingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.StackdriverLoggingConfig").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/rest.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/rest.rb deleted file mode 100644 index 4c702f14da87..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/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/tasks/v2/cloud_tasks/rest" -require "google/cloud/tasks/v2/bindings_override" -require "google/cloud/tasks/v2/version" - -module Google - module Cloud - module Tasks - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/tasks/v2/rest" - # client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new - # - module V2 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/target_pb.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/target_pb.rb deleted file mode 100644 index 61fde3cfe768..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/target_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/tasks/v2/target.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n\"google/cloud/tasks/v2/target.proto\x12\x15google.cloud.tasks.v2\x1a\x1fgoogle/api/field_behavior.proto\"\xe1\x02\n\x0bHttpRequest\x12\x10\n\x03url\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x0bhttp_method\x18\x02 \x01(\x0e\x32!.google.cloud.tasks.v2.HttpMethod\x12@\n\x07headers\x18\x03 \x03(\x0b\x32/.google.cloud.tasks.v2.HttpRequest.HeadersEntry\x12\x0c\n\x04\x62ody\x18\x04 \x01(\x0c\x12\x38\n\x0boauth_token\x18\x05 \x01(\x0b\x32!.google.cloud.tasks.v2.OAuthTokenH\x00\x12\x36\n\noidc_token\x18\x06 \x01(\x0b\x32 .google.cloud.tasks.v2.OidcTokenH\x00\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x16\n\x14\x61uthorization_header\"\xb2\x02\n\x14\x41ppEngineHttpRequest\x12\x36\n\x0bhttp_method\x18\x01 \x01(\x0e\x32!.google.cloud.tasks.v2.HttpMethod\x12\x43\n\x12\x61pp_engine_routing\x18\x02 \x01(\x0b\x32\'.google.cloud.tasks.v2.AppEngineRouting\x12\x14\n\x0crelative_uri\x18\x03 \x01(\t\x12I\n\x07headers\x18\x04 \x03(\x0b\x32\x38.google.cloud.tasks.v2.AppEngineHttpRequest.HeadersEntry\x12\x0c\n\x04\x62ody\x18\x05 \x01(\x0c\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"T\n\x10\x41ppEngineRouting\x12\x0f\n\x07service\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x10\n\x08instance\x18\x03 \x01(\t\x12\x0c\n\x04host\x18\x04 \x01(\t\":\n\nOAuthToken\x12\x1d\n\x15service_account_email\x18\x01 \x01(\t\x12\r\n\x05scope\x18\x02 \x01(\t\"<\n\tOidcToken\x12\x1d\n\x15service_account_email\x18\x01 \x01(\t\x12\x10\n\x08\x61udience\x18\x02 \x01(\t*s\n\nHttpMethod\x12\x1b\n\x17HTTP_METHOD_UNSPECIFIED\x10\x00\x12\x08\n\x04POST\x10\x01\x12\x07\n\x03GET\x10\x02\x12\x08\n\x04HEAD\x10\x03\x12\x07\n\x03PUT\x10\x04\x12\n\n\x06\x44\x45LETE\x10\x05\x12\t\n\x05PATCH\x10\x06\x12\x0b\n\x07OPTIONS\x10\x07\x42j\n\x19\x63om.google.cloud.tasks.v2B\x0bTargetProtoP\x01Z>cloud.google.com/go/cloudtasks/apiv2/cloudtaskspb;cloudtaskspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Tasks - module V2 - HttpRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.HttpRequest").msgclass - AppEngineHttpRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.AppEngineHttpRequest").msgclass - AppEngineRouting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.AppEngineRouting").msgclass - OAuthToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.OAuthToken").msgclass - OidcToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.OidcToken").msgclass - HttpMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.HttpMethod").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/task_pb.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/task_pb.rb deleted file mode 100644 index a9960364f8d5..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/task_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/tasks/v2/task.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/tasks/v2/target_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n google/cloud/tasks/v2/task.proto\x12\x15google.cloud.tasks.v2\x1a\x19google/api/resource.proto\x1a\"google/cloud/tasks/v2/target.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xb4\x05\n\x04Task\x12\x0c\n\x04name\x18\x01 \x01(\t\x12N\n\x17\x61pp_engine_http_request\x18\x02 \x01(\x0b\x32+.google.cloud.tasks.v2.AppEngineHttpRequestH\x00\x12:\n\x0chttp_request\x18\x03 \x01(\x0b\x32\".google.cloud.tasks.v2.HttpRequestH\x00\x12\x31\n\rschedule_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11\x64ispatch_deadline\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x16\n\x0e\x64ispatch_count\x18\x07 \x01(\x05\x12\x16\n\x0eresponse_count\x18\x08 \x01(\x05\x12\x35\n\rfirst_attempt\x18\t \x01(\x0b\x32\x1e.google.cloud.tasks.v2.Attempt\x12\x34\n\x0clast_attempt\x18\n \x01(\x0b\x32\x1e.google.cloud.tasks.v2.Attempt\x12.\n\x04view\x18\x0b \x01(\x0e\x32 .google.cloud.tasks.v2.Task.View\"1\n\x04View\x12\x14\n\x10VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02:h\xea\x41\x65\n\x1e\x63loudtasks.googleapis.com/Task\x12\x43projects/{project}/locations/{location}/queues/{queue}/tasks/{task}B\x0e\n\x0cmessage_type\"\xcf\x01\n\x07\x41ttempt\x12\x31\n\rschedule_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rdispatch_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rresponse_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12+\n\x0fresponse_status\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusBh\n\x19\x63om.google.cloud.tasks.v2B\tTaskProtoP\x01Z>cloud.google.com/go/cloudtasks/apiv2/cloudtaskspb;cloudtaskspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Tasks - module V2 - Task = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.Task").msgclass - Task::View = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.Task.View").enummodule - Attempt = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2.Attempt").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/version.rb b/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/v2/version.rb deleted file mode 100644 index f4f62b513076..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/lib/google/cloud/tasks/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 Tasks - module V2 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/README.md deleted file mode 100644 index 4412e67816f1..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Tasks 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-tasks-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # 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. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - # - # Example: - # - # 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 - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # 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 - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # 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 - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-tasks-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-tasks-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-tasks-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-tasks-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-tasks-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-tasks-v2/proto_docs/google/cloud/tasks/v2/cloudtasks.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/cloudtasks.rb deleted file mode 100644 index d756876962c9..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/cloudtasks.rb +++ /dev/null @@ -1,375 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Tasks - module V2 - # Request message for - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#list_queues ListQueues}. - # @!attribute [rw] parent - # @return [::String] - # Required. The location name. - # For example: `projects/PROJECT_ID/locations/LOCATION_ID` - # @!attribute [rw] filter - # @return [::String] - # `filter` can be used to specify a subset of queues. Any - # {::Google::Cloud::Tasks::V2::Queue Queue} field can be used as a filter and - # several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The - # filter syntax is the same as described in [Stackdriver's Advanced Logs - # Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - # - # Sample filter "state: PAUSED". - # - # Note that using filters might cause fewer queues than the - # requested page_size to be returned. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. - # - # The maximum page size is 9800. If unspecified, the page size will - # be the maximum. Fewer queues than requested might be returned, - # even if more queues exist; use the - # {::Google::Cloud::Tasks::V2::ListQueuesResponse#next_page_token next_page_token} - # in the response to determine if more queues exist. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying the page of results to return. - # - # To request the first page results, page_token must be empty. To - # request the next page of results, page_token must be the value of - # {::Google::Cloud::Tasks::V2::ListQueuesResponse#next_page_token next_page_token} - # returned from the previous call to - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#list_queues ListQueues} method. It is an - # error to switch the value of the - # {::Google::Cloud::Tasks::V2::ListQueuesRequest#filter filter} while iterating - # through pages. - class ListQueuesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#list_queues ListQueues}. - # @!attribute [rw] queues - # @return [::Array<::Google::Cloud::Tasks::V2::Queue>] - # The list of queues. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # - # To return the next page of results, call - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#list_queues ListQueues} with this value - # as the {::Google::Cloud::Tasks::V2::ListQueuesRequest#page_token page_token}. - # - # If the next_page_token is empty, there are no more results. - # - # The page token is valid for only 2 hours. - class ListQueuesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::Tasks::V2::CloudTasks::Client#get_queue GetQueue}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the queue. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - class GetQueueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#create_queue CreateQueue}. - # @!attribute [rw] parent - # @return [::String] - # Required. The location name in which the queue will be created. - # For example: `projects/PROJECT_ID/locations/LOCATION_ID` - # - # The list of allowed locations can be obtained by calling Cloud - # Tasks' implementation of - # [ListLocations][google.cloud.location.Locations.ListLocations]. - # @!attribute [rw] queue - # @return [::Google::Cloud::Tasks::V2::Queue] - # Required. The queue to create. - # - # [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an - # existing queue. - class CreateQueueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#update_queue UpdateQueue}. - # @!attribute [rw] queue - # @return [::Google::Cloud::Tasks::V2::Queue] - # Required. The queue to create or update. - # - # The queue's {::Google::Cloud::Tasks::V2::Queue#name name} must be specified. - # - # Output only fields cannot be modified using UpdateQueue. - # Any value specified for an output only field will be ignored. - # The queue's {::Google::Cloud::Tasks::V2::Queue#name name} cannot be changed. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # A mask used to specify which fields of the queue are being updated. - # - # If empty, then all fields will be updated. - class UpdateQueueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#delete_queue DeleteQueue}. - # @!attribute [rw] name - # @return [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - class DeleteQueueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#purge_queue PurgeQueue}. - # @!attribute [rw] name - # @return [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - class PurgeQueueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#pause_queue PauseQueue}. - # @!attribute [rw] name - # @return [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - class PauseQueueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#resume_queue ResumeQueue}. - # @!attribute [rw] name - # @return [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - class ResumeQueueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing tasks using - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#list_tasks ListTasks}. - # @!attribute [rw] parent - # @return [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # @!attribute [rw] response_view - # @return [::Google::Cloud::Tasks::V2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2::Task Task} will be returned. - # - # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; - # not all information is retrieved by default because some data, such as - # payloads, might be desirable to return only when needed because - # of its large size or because of the sensitivity of data that it - # contains. - # - # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires - # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - # permission on the {::Google::Cloud::Tasks::V2::Task Task} resource. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum page size. - # - # Fewer tasks than requested might be returned, even if more tasks exist; use - # {::Google::Cloud::Tasks::V2::ListTasksResponse#next_page_token next_page_token} - # in the response to determine if more tasks exist. - # - # The maximum page size is 1000. If unspecified, the page size will be the - # maximum. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying the page of results to return. - # - # To request the first page results, page_token must be empty. To - # request the next page of results, page_token must be the value of - # {::Google::Cloud::Tasks::V2::ListTasksResponse#next_page_token next_page_token} - # returned from the previous call to - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#list_tasks ListTasks} method. - # - # The page token is valid for only 2 hours. - class ListTasksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing tasks using - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#list_tasks ListTasks}. - # @!attribute [rw] tasks - # @return [::Array<::Google::Cloud::Tasks::V2::Task>] - # The list of tasks. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # - # To return the next page of results, call - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#list_tasks ListTasks} with this value as - # the {::Google::Cloud::Tasks::V2::ListTasksRequest#page_token page_token}. - # - # If the next_page_token is empty, there are no more results. - class ListTasksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a task using - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#get_task GetTask}. - # @!attribute [rw] name - # @return [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @!attribute [rw] response_view - # @return [::Google::Cloud::Tasks::V2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2::Task Task} will be returned. - # - # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; - # not all information is retrieved by default because some data, such as - # payloads, might be desirable to return only when needed because - # of its large size or because of the sensitivity of data that it - # contains. - # - # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires - # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - # permission on the {::Google::Cloud::Tasks::V2::Task Task} resource. - class GetTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#create_task CreateTask}. - # @!attribute [rw] parent - # @return [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # - # The queue must already exist. - # @!attribute [rw] task - # @return [::Google::Cloud::Tasks::V2::Task] - # Required. The task to add. - # - # Task names have the following format: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - # The user can optionally specify a task - # {::Google::Cloud::Tasks::V2::Task#name name}. If a name is not specified then - # the system will generate a random unique task id, which will be set in the - # task returned in the {::Google::Cloud::Tasks::V2::Task#name response}. - # - # If {::Google::Cloud::Tasks::V2::Task#schedule_time schedule_time} is not set or - # is in the past then Cloud Tasks will set it to the current time. - # - # Task De-duplication: - # - # Explicitly specifying a task ID enables task de-duplication. If - # a task's ID is identical to that of an existing task or a task - # that was deleted or executed recently then the call will fail - # with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. - # If the task's queue was created using Cloud Tasks, then another task with - # the same name can't be created for ~1hour after the original task was - # deleted or executed. If the task's queue was created using queue.yaml or - # queue.xml, then another task with the same name can't be created - # for ~9days after the original task was deleted or executed. - # - # Because there is an extra lookup cost to identify duplicate task - # names, these {::Google::Cloud::Tasks::V2::CloudTasks::Client#create_task CreateTask} - # calls have significantly increased latency. Using hashed strings for the - # task id or for the prefix of the task id is recommended. Choosing task ids - # that are sequential or have sequential prefixes, for example using a - # timestamp, causes an increase in latency and error rates in all - # task commands. The infrastructure relies on an approximately - # uniform distribution of task ids to store and serve tasks - # efficiently. - # @!attribute [rw] response_view - # @return [::Google::Cloud::Tasks::V2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2::Task Task} will be returned. - # - # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; - # not all information is retrieved by default because some data, such as - # payloads, might be desirable to return only when needed because - # of its large size or because of the sensitivity of data that it - # contains. - # - # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires - # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - # permission on the {::Google::Cloud::Tasks::V2::Task Task} resource. - class CreateTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting a task using - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#delete_task DeleteTask}. - # @!attribute [rw] name - # @return [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - class DeleteTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for forcing a task to run now using - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#run_task RunTask}. - # @!attribute [rw] name - # @return [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @!attribute [rw] response_view - # @return [::Google::Cloud::Tasks::V2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2::Task Task} will be returned. - # - # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; - # not all information is retrieved by default because some data, such as - # payloads, might be desirable to return only when needed because - # of its large size or because of the sensitivity of data that it - # contains. - # - # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires - # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - # permission on the {::Google::Cloud::Tasks::V2::Task Task} resource. - class RunTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/queue.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/queue.rb deleted file mode 100644 index 48b30becd0e3..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/queue.rb +++ /dev/null @@ -1,376 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Tasks - module V2 - # A queue is a container of related tasks. Queues are configured to manage - # how those tasks are dispatched. Configurable properties include rate limits, - # retry options, queue types, and others. - # @!attribute [rw] name - # @return [::String] - # Caller-specified and required in - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#create_queue CreateQueue}, after which it - # becomes output only. - # - # The queue name. - # - # The queue name must have the following format: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # - # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - # hyphens (-), colons (:), or periods (.). - # For more information, see - # [Identifying - # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - # * `LOCATION_ID` is the canonical ID for the queue's location. - # The list of available locations can be obtained by calling - # [ListLocations][google.cloud.location.Locations.ListLocations]. - # For more information, see https://cloud.google.com/about/locations/. - # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - # hyphens (-). The maximum length is 100 characters. - # @!attribute [rw] app_engine_routing_override - # @return [::Google::Cloud::Tasks::V2::AppEngineRouting] - # Overrides for - # [task-level - # app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. - # These settings apply only to - # {::Google::Cloud::Tasks::V2::AppEngineHttpRequest App Engine tasks} in this - # queue. {::Google::Cloud::Tasks::V2::HttpRequest Http tasks} are not affected. - # - # If set, `app_engine_routing_override` is used for all - # {::Google::Cloud::Tasks::V2::AppEngineHttpRequest App Engine tasks} in the - # queue, no matter what the setting is for the [task-level - # app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. - # @!attribute [rw] rate_limits - # @return [::Google::Cloud::Tasks::V2::RateLimits] - # Rate limits for task dispatches. - # - # {::Google::Cloud::Tasks::V2::Queue#rate_limits rate_limits} and - # {::Google::Cloud::Tasks::V2::Queue#retry_config retry_config} are related - # because they both control task attempts. However they control task attempts - # in different ways: - # - # * {::Google::Cloud::Tasks::V2::Queue#rate_limits rate_limits} controls the total - # rate of - # dispatches from a queue (i.e. all traffic dispatched from the - # queue, regardless of whether the dispatch is from a first - # attempt or a retry). - # * {::Google::Cloud::Tasks::V2::Queue#retry_config retry_config} controls what - # happens to - # particular a task after its first attempt fails. That is, - # {::Google::Cloud::Tasks::V2::Queue#retry_config retry_config} controls task - # retries (the second attempt, third attempt, etc). - # - # The queue's actual dispatch rate is the result of: - # - # * Number of tasks in the queue - # * User-specified throttling: - # {::Google::Cloud::Tasks::V2::Queue#rate_limits rate_limits}, - # {::Google::Cloud::Tasks::V2::Queue#retry_config retry_config}, and the - # [queue's state][google.cloud.tasks.v2.Queue.state]. - # * System throttling due to `429` (Too Many Requests) or `503` (Service - # Unavailable) responses from the worker, high error rates, or to smooth - # sudden large traffic spikes. - # @!attribute [rw] retry_config - # @return [::Google::Cloud::Tasks::V2::RetryConfig] - # Settings that determine the retry behavior. - # - # * For tasks created using Cloud Tasks: the queue-level retry settings - # apply to all tasks in the queue that were created using Cloud Tasks. - # Retry settings cannot be set on individual tasks. - # * For tasks created using the App Engine SDK: the queue-level retry - # settings apply to all tasks in the queue which do not have retry settings - # explicitly set on the task and were created by the App Engine SDK. See - # [App Engine - # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). - # @!attribute [rw] state - # @return [::Google::Cloud::Tasks::V2::Queue::State] - # Output only. The state of the queue. - # - # `state` can only be changed by calling - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#pause_queue PauseQueue}, - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#resume_queue ResumeQueue}, or uploading - # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#update_queue UpdateQueue} cannot be used - # to change `state`. - # @!attribute [rw] purge_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last time this queue was purged. - # - # All tasks that were {::Google::Cloud::Tasks::V2::Task#create_time created} - # before this time were purged. - # - # A queue can be purged using - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#purge_queue PurgeQueue}, the [App Engine - # Task Queue SDK, or the Cloud - # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). - # - # Purge time will be truncated to the nearest microsecond. Purge - # time will be unset if the queue has never been purged. - # @!attribute [rw] stackdriver_logging_config - # @return [::Google::Cloud::Tasks::V2::StackdriverLoggingConfig] - # Configuration options for writing logs to - # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this - # field is unset, then no logs are written. - class Queue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # State of the queue. - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # The queue is running. Tasks can be dispatched. - # - # If the queue was created using Cloud Tasks and the queue has - # had no activity (method calls or task dispatches) for 30 days, - # the queue may take a few minutes to re-activate. Some method - # calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and - # tasks may not be dispatched for a few minutes until the queue - # has been re-activated. - RUNNING = 1 - - # Tasks are paused by the user. If the queue is paused then Cloud - # Tasks will stop delivering tasks from it, but more tasks can - # still be added to it by the user. - PAUSED = 2 - - # The queue is disabled. - # - # A queue becomes `DISABLED` when - # [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) - # or - # [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) - # is uploaded which does not contain the queue. You cannot directly disable - # a queue. - # - # When a queue is disabled, tasks can still be added to a queue - # but the tasks are not dispatched. - # - # To permanently delete this queue and all of its tasks, call - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#delete_queue DeleteQueue}. - DISABLED = 3 - end - end - - # Rate limits. - # - # This message determines the maximum rate that tasks can be dispatched by a - # queue, regardless of whether the dispatch is a first task attempt or a retry. - # - # Note: The debugging command, - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#run_task RunTask}, will run a task even if - # the queue has reached its {::Google::Cloud::Tasks::V2::RateLimits RateLimits}. - # @!attribute [rw] max_dispatches_per_second - # @return [::Float] - # The maximum rate at which tasks are dispatched from this queue. - # - # If unspecified when the queue is created, Cloud Tasks will pick the - # default. - # - # * The maximum allowed value is 500. - # - # - # This field has the same meaning as - # [rate in - # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). - # @!attribute [rw] max_burst_size - # @return [::Integer] - # Output only. The max burst size. - # - # Max burst size limits how fast tasks in queue are processed when - # many tasks are in the queue and the rate is high. This field - # allows the queue to have a high rate so processing starts shortly - # after a task is enqueued, but still limits resource usage when - # many tasks are enqueued in a short period of time. - # - # The [token bucket](https://wikipedia.org/wiki/Token_Bucket) - # algorithm is used to control the rate of task dispatches. Each - # queue has a token bucket that holds tokens, up to the maximum - # specified by `max_burst_size`. Each time a task is dispatched, a - # token is removed from the bucket. Tasks will be dispatched until - # the queue's bucket runs out of tokens. The bucket will be - # continuously refilled with new tokens based on - # {::Google::Cloud::Tasks::V2::RateLimits#max_dispatches_per_second max_dispatches_per_second}. - # - # Cloud Tasks will pick the value of `max_burst_size` based on the - # value of - # {::Google::Cloud::Tasks::V2::RateLimits#max_dispatches_per_second max_dispatches_per_second}. - # - # For queues that were created or updated using - # `queue.yaml/xml`, `max_burst_size` is equal to - # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). - # Since `max_burst_size` is output only, if - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#update_queue UpdateQueue} is called on a - # queue created by `queue.yaml/xml`, `max_burst_size` will be reset based on - # the value of - # {::Google::Cloud::Tasks::V2::RateLimits#max_dispatches_per_second max_dispatches_per_second}, - # regardless of whether - # {::Google::Cloud::Tasks::V2::RateLimits#max_dispatches_per_second max_dispatches_per_second} - # is updated. - # @!attribute [rw] max_concurrent_dispatches - # @return [::Integer] - # The maximum number of concurrent tasks that Cloud Tasks allows - # to be dispatched for this queue. After this threshold has been - # reached, Cloud Tasks stops dispatching tasks until the number of - # concurrent requests decreases. - # - # If unspecified when the queue is created, Cloud Tasks will pick the - # default. - # - # - # The maximum allowed value is 5,000. - # - # - # This field has the same meaning as - # [max_concurrent_requests in - # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). - class RateLimits - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Retry config. - # - # These settings determine when a failed task attempt is retried. - # @!attribute [rw] max_attempts - # @return [::Integer] - # Number of attempts per task. - # - # Cloud Tasks will attempt the task `max_attempts` times (that is, if the - # first attempt fails, then there will be `max_attempts - 1` retries). Must - # be >= -1. - # - # If unspecified when the queue is created, Cloud Tasks will pick the - # default. - # - # -1 indicates unlimited attempts. - # - # This field has the same meaning as - # [task_retry_limit in - # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - # @!attribute [rw] max_retry_duration - # @return [::Google::Protobuf::Duration] - # If positive, `max_retry_duration` specifies the time limit for - # retrying a failed task, measured from when the task was first - # attempted. Once `max_retry_duration` time has passed *and* the - # task has been attempted - # {::Google::Cloud::Tasks::V2::RetryConfig#max_attempts max_attempts} times, no - # further attempts will be made and the task will be deleted. - # - # If zero, then the task age is unlimited. - # - # If unspecified when the queue is created, Cloud Tasks will pick the - # default. - # - # - # `max_retry_duration` will be truncated to the nearest second. - # - # This field has the same meaning as - # [task_age_limit in - # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - # @!attribute [rw] min_backoff - # @return [::Google::Protobuf::Duration] - # A task will be {::Google::Cloud::Tasks::V2::Task#schedule_time scheduled} for - # retry between {::Google::Cloud::Tasks::V2::RetryConfig#min_backoff min_backoff} - # and {::Google::Cloud::Tasks::V2::RetryConfig#max_backoff max_backoff} duration - # after it fails, if the queue's - # {::Google::Cloud::Tasks::V2::RetryConfig RetryConfig} specifies that the task - # should be retried. - # - # If unspecified when the queue is created, Cloud Tasks will pick the - # default. - # - # - # `min_backoff` will be truncated to the nearest second. - # - # This field has the same meaning as - # [min_backoff_seconds in - # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - # @!attribute [rw] max_backoff - # @return [::Google::Protobuf::Duration] - # A task will be {::Google::Cloud::Tasks::V2::Task#schedule_time scheduled} for - # retry between {::Google::Cloud::Tasks::V2::RetryConfig#min_backoff min_backoff} - # and {::Google::Cloud::Tasks::V2::RetryConfig#max_backoff max_backoff} duration - # after it fails, if the queue's - # {::Google::Cloud::Tasks::V2::RetryConfig RetryConfig} specifies that the task - # should be retried. - # - # If unspecified when the queue is created, Cloud Tasks will pick the - # default. - # - # - # `max_backoff` will be truncated to the nearest second. - # - # This field has the same meaning as - # [max_backoff_seconds in - # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - # @!attribute [rw] max_doublings - # @return [::Integer] - # The time between retries will double `max_doublings` times. - # - # A task's retry interval starts at - # {::Google::Cloud::Tasks::V2::RetryConfig#min_backoff min_backoff}, then doubles - # `max_doublings` times, then increases linearly, and finally - # retries at intervals of - # {::Google::Cloud::Tasks::V2::RetryConfig#max_backoff max_backoff} up to - # {::Google::Cloud::Tasks::V2::RetryConfig#max_attempts max_attempts} times. - # - # For example, if - # {::Google::Cloud::Tasks::V2::RetryConfig#min_backoff min_backoff} is 10s, - # {::Google::Cloud::Tasks::V2::RetryConfig#max_backoff max_backoff} is 300s, and - # `max_doublings` is 3, then the a task will first be retried in - # 10s. The retry interval will double three times, and then - # increase linearly by 2^3 * 10s. Finally, the task will retry at - # intervals of {::Google::Cloud::Tasks::V2::RetryConfig#max_backoff max_backoff} - # until the task has been attempted - # {::Google::Cloud::Tasks::V2::RetryConfig#max_attempts max_attempts} times. Thus, - # the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, .... - # - # If unspecified when the queue is created, Cloud Tasks will pick the - # default. - # - # - # This field has the same meaning as - # [max_doublings in - # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - class RetryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration options for writing logs to - # [Stackdriver Logging](https://cloud.google.com/logging/docs/). - # @!attribute [rw] sampling_ratio - # @return [::Float] - # Specifies the fraction of operations to write to - # [Stackdriver Logging](https://cloud.google.com/logging/docs/). - # This field may contain any value between 0.0 and 1.0, inclusive. - # 0.0 is the default and means that no operations are logged. - class StackdriverLoggingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/target.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/target.rb deleted file mode 100644 index fdee342780f8..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/target.rb +++ /dev/null @@ -1,466 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Tasks - module V2 - # HTTP request. - # - # The task will be pushed to the worker as an HTTP request. If the worker - # or the redirected worker acknowledges the task by returning a successful HTTP - # response code ([`200` - `299`]), the task will be removed from the queue. If - # any other HTTP response code is returned or no response is received, the - # task will be retried according to the following: - # - # * User-specified throttling: [retry - # configuration][google.cloud.tasks.v2.Queue.retry_config], - # {::Google::Cloud::Tasks::V2::Queue#rate_limits rate limits}, and the [queue's - # state][google.cloud.tasks.v2.Queue.state]. - # - # * System throttling: To prevent the worker from overloading, Cloud Tasks may - # temporarily reduce the queue's effective rate. User-specified settings - # will not be changed. - # - # System throttling happens because: - # - # * Cloud Tasks backs off on all errors. Normally the backoff specified in - # {::Google::Cloud::Tasks::V2::Queue#rate_limits rate limits} will be used. But - # if the worker returns `429` (Too Many Requests), `503` (Service - # Unavailable), or the rate of errors is high, Cloud Tasks will use a - # higher backoff rate. The retry specified in the `Retry-After` HTTP - # response header is considered. - # - # * To prevent traffic spikes and to smooth sudden increases in traffic, - # dispatches ramp up slowly when the queue is newly created or idle and - # if large numbers of tasks suddenly become available to dispatch (due to - # spikes in create task rates, the queue being unpaused, or many tasks - # that are scheduled at the same time). - # @!attribute [rw] url - # @return [::String] - # Required. The full url path that the request will be sent to. - # - # This string must begin with either "http://" or "https://". Some examples - # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will - # encode some characters for safety and compatibility. The maximum allowed - # URL length is 2083 characters after encoding. - # - # The `Location` header response from a redirect response [`300` - `399`] - # may be followed. The redirect is not counted as a separate attempt. - # @!attribute [rw] http_method - # @return [::Google::Cloud::Tasks::V2::HttpMethod] - # The HTTP method to use for the request. The default is POST. - # @!attribute [rw] headers - # @return [::Google::Protobuf::Map{::String => ::String}] - # HTTP request headers. - # - # This map contains the header field names and values. - # Headers can be set when the - # [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - # - # These headers represent a subset of the headers that will accompany the - # task's HTTP request. Some HTTP request headers will be ignored or replaced. - # - # A partial list of headers that will be ignored or replaced is: - # - # * Host: This will be computed by Cloud Tasks and derived from - # {::Google::Cloud::Tasks::V2::HttpRequest#url HttpRequest.url}. - # * Content-Length: This will be computed by Cloud Tasks. - # * User-Agent: This will be set to `"Google-Cloud-Tasks"`. - # * `X-Google-*`: Google use only. - # * `X-AppEngine-*`: Google use only. - # - # `Content-Type` won't be set by Cloud Tasks. You can explicitly set - # `Content-Type` to a media type when the - # [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - # For example, `Content-Type` can be set to `"application/octet-stream"` or - # `"application/json"`. - # - # Headers which can have multiple values (according to RFC2616) can be - # specified using comma-separated values. - # - # The size of the headers must be less than 80KB. - # @!attribute [rw] body - # @return [::String] - # HTTP request body. - # - # A request body is allowed only if the - # {::Google::Cloud::Tasks::V2::HttpRequest#http_method HTTP method} is POST, PUT, - # or PATCH. It is an error to set body on a task with an incompatible - # {::Google::Cloud::Tasks::V2::HttpMethod HttpMethod}. - # @!attribute [rw] oauth_token - # @return [::Google::Cloud::Tasks::V2::OAuthToken] - # 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`, `oidc_token`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] oidc_token - # @return [::Google::Cloud::Tasks::V2::OidcToken] - # If specified, an - # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) - # token will be generated and attached as an `Authorization` header in the - # HTTP request. - # - # This type of authorization can be used for many scenarios, including - # calling Cloud Run, or endpoints where you intend to validate the token - # yourself. - # - # Note: The following fields are mutually exclusive: `oidc_token`, `oauth_token`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class HttpRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class HeadersEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # App Engine HTTP request. - # - # The message defines the HTTP request that is sent to an App Engine app when - # the task is dispatched. - # - # Using {::Google::Cloud::Tasks::V2::AppEngineHttpRequest AppEngineHttpRequest} - # requires - # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) - # Google IAM permission for the project - # and the following scope: - # - # `https://www.googleapis.com/auth/cloud-platform` - # - # The task will be delivered to the App Engine app which belongs to the same - # project as the queue. For more information, see - # [How Requests are - # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) - # and how routing is affected by - # [dispatch - # files](https://cloud.google.com/appengine/docs/python/config/dispatchref). - # Traffic is encrypted during transport and never leaves Google datacenters. - # Because this traffic is carried over a communication mechanism internal to - # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS). - # The request to the handler, however, will appear to have used the HTTP - # protocol. - # - # The {::Google::Cloud::Tasks::V2::AppEngineRouting AppEngineRouting} used to - # construct the URL that the task is delivered to can be set at the queue-level - # or task-level: - # - # * If [app_engine_routing_override is set on the - # queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this value - # is used for all tasks in the queue, no matter what the setting is for the - # [task-level - # app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. - # - # - # The `url` that the task will be sent to is: - # - # * `url =` {::Google::Cloud::Tasks::V2::AppEngineRouting#host host} `+` - # {::Google::Cloud::Tasks::V2::AppEngineHttpRequest#relative_uri relative_uri} - # - # Tasks can be dispatched to secure app handlers, unsecure app handlers, and - # URIs restricted with - # [`login: - # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref). - # Because tasks are not run as any user, they cannot be dispatched to URIs - # restricted with - # [`login: - # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) - # Task dispatches also do not follow redirects. - # - # The task attempt has succeeded if the app's request handler returns an HTTP - # response code in the range [`200` - `299`]. The task attempt has failed if - # the app's handler returns a non-2xx response code or Cloud Tasks does - # not receive response before the - # {::Google::Cloud::Tasks::V2::Task#dispatch_deadline deadline}. Failed tasks will - # be retried according to the [retry - # configuration][google.cloud.tasks.v2.Queue.retry_config]. `503` (Service - # Unavailable) is considered an App Engine system error instead of an - # application error and will cause Cloud Tasks' traffic congestion control to - # temporarily throttle the queue's dispatches. Unlike other types of task - # targets, a `429` (Too Many Requests) response from an app handler does not - # cause traffic congestion control to throttle the queue. - # @!attribute [rw] http_method - # @return [::Google::Cloud::Tasks::V2::HttpMethod] - # The HTTP method to use for the request. The default is POST. - # - # The app's request handler for the task's target URL must be able to handle - # HTTP requests with this http_method, otherwise the task attempt fails with - # error code 405 (Method Not Allowed). See [Writing a push task request - # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - # and the App Engine documentation for your runtime on [How Requests are - # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). - # @!attribute [rw] app_engine_routing - # @return [::Google::Cloud::Tasks::V2::AppEngineRouting] - # Task-level setting for App Engine routing. - # - # * If [app_engine_routing_override is set on the - # queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this - # value is used for all tasks in the queue, no matter what the setting is - # for the [task-level - # app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. - # @!attribute [rw] relative_uri - # @return [::String] - # The relative URI. - # - # The relative URI must begin with "/" and must be a valid HTTP relative URI. - # It can contain a path and query string arguments. - # If the relative URI is empty, then the root path "/" will be used. - # No spaces are allowed, and the maximum length allowed is 2083 characters. - # @!attribute [rw] headers - # @return [::Google::Protobuf::Map{::String => ::String}] - # HTTP request headers. - # - # This map contains the header field names and values. - # Headers can be set when the - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#create_task task is created}. - # Repeated headers are not supported but a header value can contain commas. - # - # Cloud Tasks sets some headers to default values: - # - # * `User-Agent`: By default, this header is - # `"AppEngine-Google; (+http://code.google.com/appengine)"`. - # This header can be modified, but Cloud Tasks will append - # `"AppEngine-Google; (+http://code.google.com/appengine)"` to the - # modified `User-Agent`. - # - # If the task has a {::Google::Cloud::Tasks::V2::AppEngineHttpRequest#body body}, - # Cloud Tasks sets the following headers: - # - # * `Content-Type`: By default, the `Content-Type` header is set to - # `"application/octet-stream"`. The default can be overridden by explicitly - # setting `Content-Type` to a particular media type when the - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#create_task task is created}. - # For example, `Content-Type` can be set to `"application/json"`. - # * `Content-Length`: This is computed by Cloud Tasks. This value is - # output only. It cannot be changed. - # - # The headers below cannot be set or overridden: - # - # * `Host` - # * `X-Google-*` - # * `X-AppEngine-*` - # - # In addition, Cloud Tasks sets some headers when the task is dispatched, - # such as headers containing information about the task; see - # [request - # headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers). - # These headers are set only when the task is dispatched, so they are not - # visible when the task is returned in a Cloud Tasks response. - # - # Although there is no specific limit for the maximum number of headers or - # the size, there is a limit on the maximum size of the - # {::Google::Cloud::Tasks::V2::Task Task}. For more information, see the - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#create_task CreateTask} documentation. - # @!attribute [rw] body - # @return [::String] - # HTTP request body. - # - # A request body is allowed only if the HTTP method is POST or PUT. It is - # an error to set a body on a task with an incompatible - # {::Google::Cloud::Tasks::V2::HttpMethod HttpMethod}. - class AppEngineHttpRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class HeadersEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # App Engine Routing. - # - # Defines routing characteristics specific to App Engine - service, version, - # and instance. - # - # For more information about services, versions, and instances see - # [An Overview of App - # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), - # [Microservices Architecture on Google App - # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), - # [App Engine Standard request - # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), - # and [App Engine Flex request - # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). - # - # Using {::Google::Cloud::Tasks::V2::AppEngineRouting AppEngineRouting} requires - # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) - # Google IAM permission for the project - # and the following scope: - # - # `https://www.googleapis.com/auth/cloud-platform` - # @!attribute [rw] service - # @return [::String] - # App service. - # - # By default, the task is sent to the service which is the default - # service when the task is attempted. - # - # For some queues or tasks which were created using the App Engine - # Task Queue API, {::Google::Cloud::Tasks::V2::AppEngineRouting#host host} is not - # parsable into {::Google::Cloud::Tasks::V2::AppEngineRouting#service service}, - # {::Google::Cloud::Tasks::V2::AppEngineRouting#version version}, and - # {::Google::Cloud::Tasks::V2::AppEngineRouting#instance instance}. For example, - # some tasks which were created using the App Engine SDK use a custom domain - # name; custom domains are not parsed by Cloud Tasks. If - # {::Google::Cloud::Tasks::V2::AppEngineRouting#host host} is not parsable, then - # {::Google::Cloud::Tasks::V2::AppEngineRouting#service service}, - # {::Google::Cloud::Tasks::V2::AppEngineRouting#version version}, and - # {::Google::Cloud::Tasks::V2::AppEngineRouting#instance instance} are the empty - # string. - # @!attribute [rw] version - # @return [::String] - # App version. - # - # By default, the task is sent to the version which is the default - # version when the task is attempted. - # - # For some queues or tasks which were created using the App Engine - # Task Queue API, {::Google::Cloud::Tasks::V2::AppEngineRouting#host host} is not - # parsable into {::Google::Cloud::Tasks::V2::AppEngineRouting#service service}, - # {::Google::Cloud::Tasks::V2::AppEngineRouting#version version}, and - # {::Google::Cloud::Tasks::V2::AppEngineRouting#instance instance}. For example, - # some tasks which were created using the App Engine SDK use a custom domain - # name; custom domains are not parsed by Cloud Tasks. If - # {::Google::Cloud::Tasks::V2::AppEngineRouting#host host} is not parsable, then - # {::Google::Cloud::Tasks::V2::AppEngineRouting#service service}, - # {::Google::Cloud::Tasks::V2::AppEngineRouting#version version}, and - # {::Google::Cloud::Tasks::V2::AppEngineRouting#instance instance} are the empty - # string. - # @!attribute [rw] instance - # @return [::String] - # App instance. - # - # By default, the task is sent to an instance which is available when - # the task is attempted. - # - # Requests can only be sent to a specific instance if - # [manual scaling is used in App Engine - # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). - # App Engine Flex does not support instances. For more information, see - # [App Engine Standard request - # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) - # and [App Engine Flex request - # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). - # @!attribute [rw] host - # @return [::String] - # Output only. The host that the task is sent to. - # - # The host is constructed from the domain name of the app associated with - # the queue's project ID (for example .appspot.com), and the - # {::Google::Cloud::Tasks::V2::AppEngineRouting#service service}, - # {::Google::Cloud::Tasks::V2::AppEngineRouting#version version}, and - # {::Google::Cloud::Tasks::V2::AppEngineRouting#instance instance}. Tasks which - # were created using the App Engine SDK might have a custom domain name. - # - # For more information, see - # [How Requests are - # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). - class AppEngineRouting - 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_email - # @return [::String] - # [Service account email](https://cloud.google.com/iam/docs/service-accounts) - # to be used for generating OAuth token. - # The service account must be within the same project as the queue. The - # caller must have iam.serviceAccounts.actAs permission for the service - # account. - # @!attribute [rw] scope - # @return [::String] - # 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 - - # Contains information needed for generating an - # [OpenID Connect - # token](https://developers.google.com/identity/protocols/OpenIDConnect). - # This type of authorization can be used for many scenarios, including - # calling Cloud Run, or endpoints where you intend to validate the token - # yourself. - # @!attribute [rw] service_account_email - # @return [::String] - # [Service account email](https://cloud.google.com/iam/docs/service-accounts) - # to be used for generating OIDC token. - # The service account must be within the same project as the queue. The - # caller must have iam.serviceAccounts.actAs permission for the service - # account. - # @!attribute [rw] audience - # @return [::String] - # Audience to be used when generating OIDC token. If not specified, the URI - # specified in target will be used. - class OidcToken - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The HTTP method used to deliver the task. - module HttpMethod - # HTTP method unspecified - HTTP_METHOD_UNSPECIFIED = 0 - - # HTTP POST - POST = 1 - - # HTTP GET - GET = 2 - - # HTTP HEAD - HEAD = 3 - - # HTTP PUT - PUT = 4 - - # HTTP DELETE - DELETE = 5 - - # HTTP PATCH - PATCH = 6 - - # HTTP OPTIONS - OPTIONS = 7 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/task.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/task.rb deleted file mode 100644 index 9a48ee97aae1..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/cloud/tasks/v2/task.rb +++ /dev/null @@ -1,196 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Tasks - module V2 - # A unit of scheduled work. - # @!attribute [rw] name - # @return [::String] - # Optionally caller-specified in - # {::Google::Cloud::Tasks::V2::CloudTasks::Client#create_task CreateTask}. - # - # The task name. - # - # The task name must have the following format: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # - # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - # hyphens (-), colons (:), or periods (.). - # For more information, see - # [Identifying - # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - # * `LOCATION_ID` is the canonical ID for the task's location. - # The list of available locations can be obtained by calling - # [ListLocations][google.cloud.location.Locations.ListLocations]. - # For more information, see https://cloud.google.com/about/locations/. - # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - # hyphens (-). The maximum length is 100 characters. - # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), - # hyphens (-), or underscores (_). The maximum length is 500 characters. - # @!attribute [rw] app_engine_http_request - # @return [::Google::Cloud::Tasks::V2::AppEngineHttpRequest] - # HTTP request that is sent to the App Engine app handler. - # - # An App Engine task is a task that has - # {::Google::Cloud::Tasks::V2::AppEngineHttpRequest AppEngineHttpRequest} set. - # - # Note: The following fields are mutually exclusive: `app_engine_http_request`, `http_request`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] http_request - # @return [::Google::Cloud::Tasks::V2::HttpRequest] - # HTTP request that is sent to the worker. - # - # An HTTP task is a task that has - # {::Google::Cloud::Tasks::V2::HttpRequest HttpRequest} set. - # - # Note: The following fields are mutually exclusive: `http_request`, `app_engine_http_request`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] schedule_time - # @return [::Google::Protobuf::Timestamp] - # The time when the task is scheduled to be attempted or retried. - # - # `schedule_time` will be truncated to the nearest microsecond. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time that the task was created. - # - # `create_time` will be truncated to the nearest second. - # @!attribute [rw] dispatch_deadline - # @return [::Google::Protobuf::Duration] - # The deadline for requests sent to the worker. If the worker does not - # respond by this deadline then the request is cancelled and the attempt - # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the - # task according to the {::Google::Cloud::Tasks::V2::RetryConfig RetryConfig}. - # - # Note that when the request is cancelled, Cloud Tasks will stop listening - # for the response, but whether the worker stops processing depends on the - # worker. For example, if the worker is stuck, it may not react to cancelled - # requests. - # - # The default and maximum values depend on the type of request: - # - # * For {::Google::Cloud::Tasks::V2::HttpRequest HTTP tasks}, the default is 10 - # minutes. The deadline - # must be in the interval [15 seconds, 30 minutes]. - # - # * For {::Google::Cloud::Tasks::V2::AppEngineHttpRequest App Engine tasks}, 0 - # indicates that the - # request has the default deadline. The default deadline depends on the - # [scaling - # type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) - # of the service: 10 minutes for standard apps with automatic scaling, 24 - # hours for standard apps with manual and basic scaling, and 60 minutes for - # flex apps. If the request deadline is set, it must be in the interval [15 - # seconds, 24 hours 15 seconds]. Regardless of the task's - # `dispatch_deadline`, the app handler will not run for longer than than - # the service's timeout. We recommend setting the `dispatch_deadline` to - # at most a few seconds more than the app handler's timeout. For more - # information see - # [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). - # - # `dispatch_deadline` will be truncated to the nearest millisecond. The - # deadline is an approximate deadline. - # @!attribute [rw] dispatch_count - # @return [::Integer] - # Output only. The number of attempts dispatched. - # - # This count includes attempts which have been dispatched but haven't - # received a response. - # @!attribute [rw] response_count - # @return [::Integer] - # Output only. The number of attempts which have received a response. - # @!attribute [rw] first_attempt - # @return [::Google::Cloud::Tasks::V2::Attempt] - # Output only. The status of the task's first attempt. - # - # Only {::Google::Cloud::Tasks::V2::Attempt#dispatch_time dispatch_time} will be - # set. The other {::Google::Cloud::Tasks::V2::Attempt Attempt} information is not - # retained by Cloud Tasks. - # @!attribute [rw] last_attempt - # @return [::Google::Cloud::Tasks::V2::Attempt] - # Output only. The status of the task's last attempt. - # @!attribute [rw] view - # @return [::Google::Cloud::Tasks::V2::Task::View] - # Output only. The view specifies which subset of the - # {::Google::Cloud::Tasks::V2::Task Task} has been returned. - class Task - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The view specifies a subset of {::Google::Cloud::Tasks::V2::Task Task} data. - # - # When a task is returned in a response, not all - # information is retrieved by default because some data, such as - # payloads, might be desirable to return only when needed because - # of its large size or because of the sensitivity of data that it - # contains. - module View - # Unspecified. Defaults to BASIC. - VIEW_UNSPECIFIED = 0 - - # The basic view omits fields which can be large or can contain - # sensitive data. - # - # This view does not include the - # [body in - # AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest.body]. - # Bodies are desirable to return only when needed, because they - # can be large and because of the sensitivity of the data that you - # choose to store in it. - BASIC = 1 - - # All information is returned. - # - # Authorization for {::Google::Cloud::Tasks::V2::Task::View::FULL FULL} requires - # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - # permission on the {::Google::Cloud::Tasks::V2::Queue Queue} resource. - FULL = 2 - end - end - - # The status of a task attempt. - # @!attribute [rw] schedule_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time that this attempt was scheduled. - # - # `schedule_time` will be truncated to the nearest microsecond. - # @!attribute [rw] dispatch_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time that this attempt was dispatched. - # - # `dispatch_time` will be truncated to the nearest microsecond. - # @!attribute [rw] response_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time that this attempt response was received. - # - # `response_time` will be truncated to the nearest microsecond. - # @!attribute [rw] response_status - # @return [::Google::Rpc::Status] - # Output only. The response from the worker for this attempt. - # - # If `response_time` is unset, then the task has not been attempted or is - # currently running and the `response_status` field is meaningless. - class Attempt - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # 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"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::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). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/iam/v1/options.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! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-tasks-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-tasks-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-tasks-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-tasks-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-tasks-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-tasks-v2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-tasks-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-tasks-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-tasks-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-tasks-v2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-tasks-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-tasks-v2/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-tasks-v2/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-tasks-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-tasks-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-tasks-v2/snippets/Gemfile deleted file mode 100644 index 8480a57dc7a5..000000000000 --- a/owl-bot-staging/google-cloud-tasks-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-tasks-v2", path: "../" -else - gem "google-cloud-tasks-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-tasks-v2/snippets/cloud_tasks/create_queue.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/create_queue.rb deleted file mode 100644 index 89081d8d2d84..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/create_queue.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 cloudtasks_v2_generated_CloudTasks_CreateQueue_sync] -require "google/cloud/tasks/v2" - -## -# Snippet for the create_queue call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2::CloudTasks::Client#create_queue. -# -def create_queue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2::CreateQueueRequest.new - - # Call the create_queue method. - result = client.create_queue request - - # The returned object is of type Google::Cloud::Tasks::V2::Queue. - p result -end -# [END cloudtasks_v2_generated_CloudTasks_CreateQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/create_task.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/create_task.rb deleted file mode 100644 index a12a2894529a..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/create_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudtasks_v2_generated_CloudTasks_CreateTask_sync] -require "google/cloud/tasks/v2" - -## -# Snippet for the create_task call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2::CloudTasks::Client#create_task. -# -def create_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2::CreateTaskRequest.new - - # Call the create_task method. - result = client.create_task request - - # The returned object is of type Google::Cloud::Tasks::V2::Task. - p result -end -# [END cloudtasks_v2_generated_CloudTasks_CreateTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/delete_queue.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/delete_queue.rb deleted file mode 100644 index 8b80b0958c9b..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/delete_queue.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 cloudtasks_v2_generated_CloudTasks_DeleteQueue_sync] -require "google/cloud/tasks/v2" - -## -# Snippet for the delete_queue call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2::CloudTasks::Client#delete_queue. -# -def delete_queue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2::DeleteQueueRequest.new - - # Call the delete_queue method. - result = client.delete_queue request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END cloudtasks_v2_generated_CloudTasks_DeleteQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/delete_task.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/delete_task.rb deleted file mode 100644 index c1e9f301f9ab..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/delete_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudtasks_v2_generated_CloudTasks_DeleteTask_sync] -require "google/cloud/tasks/v2" - -## -# Snippet for the delete_task call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2::CloudTasks::Client#delete_task. -# -def delete_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2::DeleteTaskRequest.new - - # Call the delete_task method. - result = client.delete_task request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END cloudtasks_v2_generated_CloudTasks_DeleteTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/get_iam_policy.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/get_iam_policy.rb deleted file mode 100644 index 8fdd3c8d2cef..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/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 cloudtasks_v2_generated_CloudTasks_GetIamPolicy_sync] -require "google/cloud/tasks/v2" - -## -# Snippet for the get_iam_policy call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2::CloudTasks::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2::CloudTasks::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 cloudtasks_v2_generated_CloudTasks_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/get_queue.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/get_queue.rb deleted file mode 100644 index c62917b1cb5e..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/get_queue.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 cloudtasks_v2_generated_CloudTasks_GetQueue_sync] -require "google/cloud/tasks/v2" - -## -# Snippet for the get_queue call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2::CloudTasks::Client#get_queue. -# -def get_queue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2::GetQueueRequest.new - - # Call the get_queue method. - result = client.get_queue request - - # The returned object is of type Google::Cloud::Tasks::V2::Queue. - p result -end -# [END cloudtasks_v2_generated_CloudTasks_GetQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/get_task.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/get_task.rb deleted file mode 100644 index 64d71ad03392..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/get_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudtasks_v2_generated_CloudTasks_GetTask_sync] -require "google/cloud/tasks/v2" - -## -# Snippet for the get_task call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2::CloudTasks::Client#get_task. -# -def get_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2::GetTaskRequest.new - - # Call the get_task method. - result = client.get_task request - - # The returned object is of type Google::Cloud::Tasks::V2::Task. - p result -end -# [END cloudtasks_v2_generated_CloudTasks_GetTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/list_queues.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/list_queues.rb deleted file mode 100644 index 833568cefc39..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/list_queues.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 cloudtasks_v2_generated_CloudTasks_ListQueues_sync] -require "google/cloud/tasks/v2" - -## -# Snippet for the list_queues call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2::CloudTasks::Client#list_queues. -# -def list_queues - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2::ListQueuesRequest.new - - # Call the list_queues method. - result = client.list_queues request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Tasks::V2::Queue. - p item - end -end -# [END cloudtasks_v2_generated_CloudTasks_ListQueues_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/list_tasks.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/list_tasks.rb deleted file mode 100644 index be8504a93b6b..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/list_tasks.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudtasks_v2_generated_CloudTasks_ListTasks_sync] -require "google/cloud/tasks/v2" - -## -# Snippet for the list_tasks call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2::CloudTasks::Client#list_tasks. -# -def list_tasks - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2::ListTasksRequest.new - - # Call the list_tasks method. - result = client.list_tasks request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Tasks::V2::Task. - p item - end -end -# [END cloudtasks_v2_generated_CloudTasks_ListTasks_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/pause_queue.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/pause_queue.rb deleted file mode 100644 index 1f82a9e28be0..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/pause_queue.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 cloudtasks_v2_generated_CloudTasks_PauseQueue_sync] -require "google/cloud/tasks/v2" - -## -# Snippet for the pause_queue call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2::CloudTasks::Client#pause_queue. -# -def pause_queue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2::PauseQueueRequest.new - - # Call the pause_queue method. - result = client.pause_queue request - - # The returned object is of type Google::Cloud::Tasks::V2::Queue. - p result -end -# [END cloudtasks_v2_generated_CloudTasks_PauseQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/purge_queue.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/purge_queue.rb deleted file mode 100644 index cb87bbc3f976..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/purge_queue.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 cloudtasks_v2_generated_CloudTasks_PurgeQueue_sync] -require "google/cloud/tasks/v2" - -## -# Snippet for the purge_queue call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2::CloudTasks::Client#purge_queue. -# -def purge_queue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2::PurgeQueueRequest.new - - # Call the purge_queue method. - result = client.purge_queue request - - # The returned object is of type Google::Cloud::Tasks::V2::Queue. - p result -end -# [END cloudtasks_v2_generated_CloudTasks_PurgeQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/resume_queue.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/resume_queue.rb deleted file mode 100644 index 7f8d6bd94477..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/resume_queue.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 cloudtasks_v2_generated_CloudTasks_ResumeQueue_sync] -require "google/cloud/tasks/v2" - -## -# Snippet for the resume_queue call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2::CloudTasks::Client#resume_queue. -# -def resume_queue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2::ResumeQueueRequest.new - - # Call the resume_queue method. - result = client.resume_queue request - - # The returned object is of type Google::Cloud::Tasks::V2::Queue. - p result -end -# [END cloudtasks_v2_generated_CloudTasks_ResumeQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/run_task.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/run_task.rb deleted file mode 100644 index 08df0ddafb7e..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/run_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudtasks_v2_generated_CloudTasks_RunTask_sync] -require "google/cloud/tasks/v2" - -## -# Snippet for the run_task call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2::CloudTasks::Client#run_task. -# -def run_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2::RunTaskRequest.new - - # Call the run_task method. - result = client.run_task request - - # The returned object is of type Google::Cloud::Tasks::V2::Task. - p result -end -# [END cloudtasks_v2_generated_CloudTasks_RunTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/set_iam_policy.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/set_iam_policy.rb deleted file mode 100644 index 10fdebb1dcdc..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/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 cloudtasks_v2_generated_CloudTasks_SetIamPolicy_sync] -require "google/cloud/tasks/v2" - -## -# Snippet for the set_iam_policy call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2::CloudTasks::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2::CloudTasks::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 cloudtasks_v2_generated_CloudTasks_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/test_iam_permissions.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/test_iam_permissions.rb deleted file mode 100644 index abd84456c6c8..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/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 cloudtasks_v2_generated_CloudTasks_TestIamPermissions_sync] -require "google/cloud/tasks/v2" - -## -# Snippet for the test_iam_permissions call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2::CloudTasks::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2::CloudTasks::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 cloudtasks_v2_generated_CloudTasks_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/update_queue.rb b/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/update_queue.rb deleted file mode 100644 index 05400cd443bf..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/snippets/cloud_tasks/update_queue.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 cloudtasks_v2_generated_CloudTasks_UpdateQueue_sync] -require "google/cloud/tasks/v2" - -## -# Snippet for the update_queue call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2::CloudTasks::Client#update_queue. -# -def update_queue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2::UpdateQueueRequest.new - - # Call the update_queue method. - result = client.update_queue request - - # The returned object is of type Google::Cloud::Tasks::V2::Queue. - p result -end -# [END cloudtasks_v2_generated_CloudTasks_UpdateQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2/snippets/snippet_metadata_google.cloud.tasks.v2.json b/owl-bot-staging/google-cloud-tasks-v2/snippets/snippet_metadata_google.cloud.tasks.v2.json deleted file mode 100644 index 30392ec1961e..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/snippets/snippet_metadata_google.cloud.tasks.v2.json +++ /dev/null @@ -1,655 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-tasks-v2", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.tasks.v2", - "version": "v2" - } - ] - }, - "snippets": [ - { - "region_tag": "cloudtasks_v2_generated_CloudTasks_ListQueues_sync", - "title": "Snippet for the list_queues call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#list_queues.", - "file": "cloud_tasks/list_queues.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_queues", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#list_queues", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2::ListQueuesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2::ListQueuesResponse", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" - }, - "method": { - "short_name": "ListQueues", - "full_name": "google.cloud.tasks.v2.CloudTasks.ListQueues", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2_generated_CloudTasks_GetQueue_sync", - "title": "Snippet for the get_queue call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#get_queue.", - "file": "cloud_tasks/get_queue.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_queue", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#get_queue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2::GetQueueRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2::Queue", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" - }, - "method": { - "short_name": "GetQueue", - "full_name": "google.cloud.tasks.v2.CloudTasks.GetQueue", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2_generated_CloudTasks_CreateQueue_sync", - "title": "Snippet for the create_queue call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#create_queue.", - "file": "cloud_tasks/create_queue.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_queue", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#create_queue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2::CreateQueueRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2::Queue", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" - }, - "method": { - "short_name": "CreateQueue", - "full_name": "google.cloud.tasks.v2.CloudTasks.CreateQueue", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2_generated_CloudTasks_UpdateQueue_sync", - "title": "Snippet for the update_queue call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#update_queue.", - "file": "cloud_tasks/update_queue.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_queue", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#update_queue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2::UpdateQueueRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2::Queue", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" - }, - "method": { - "short_name": "UpdateQueue", - "full_name": "google.cloud.tasks.v2.CloudTasks.UpdateQueue", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2_generated_CloudTasks_DeleteQueue_sync", - "title": "Snippet for the delete_queue call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#delete_queue.", - "file": "cloud_tasks/delete_queue.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_queue", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#delete_queue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2::DeleteQueueRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" - }, - "method": { - "short_name": "DeleteQueue", - "full_name": "google.cloud.tasks.v2.CloudTasks.DeleteQueue", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2_generated_CloudTasks_PurgeQueue_sync", - "title": "Snippet for the purge_queue call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#purge_queue.", - "file": "cloud_tasks/purge_queue.rb", - "language": "RUBY", - "client_method": { - "short_name": "purge_queue", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#purge_queue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2::PurgeQueueRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2::Queue", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" - }, - "method": { - "short_name": "PurgeQueue", - "full_name": "google.cloud.tasks.v2.CloudTasks.PurgeQueue", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2_generated_CloudTasks_PauseQueue_sync", - "title": "Snippet for the pause_queue call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#pause_queue.", - "file": "cloud_tasks/pause_queue.rb", - "language": "RUBY", - "client_method": { - "short_name": "pause_queue", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#pause_queue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2::PauseQueueRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2::Queue", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" - }, - "method": { - "short_name": "PauseQueue", - "full_name": "google.cloud.tasks.v2.CloudTasks.PauseQueue", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2_generated_CloudTasks_ResumeQueue_sync", - "title": "Snippet for the resume_queue call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#resume_queue.", - "file": "cloud_tasks/resume_queue.rb", - "language": "RUBY", - "client_method": { - "short_name": "resume_queue", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#resume_queue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2::ResumeQueueRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2::Queue", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" - }, - "method": { - "short_name": "ResumeQueue", - "full_name": "google.cloud.tasks.v2.CloudTasks.ResumeQueue", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2_generated_CloudTasks_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#get_iam_policy.", - "file": "cloud_tasks/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.cloud.tasks.v2.CloudTasks.GetIamPolicy", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2_generated_CloudTasks_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#set_iam_policy.", - "file": "cloud_tasks/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.cloud.tasks.v2.CloudTasks.SetIamPolicy", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2_generated_CloudTasks_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#test_iam_permissions.", - "file": "cloud_tasks/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.cloud.tasks.v2.CloudTasks.TestIamPermissions", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2_generated_CloudTasks_ListTasks_sync", - "title": "Snippet for the list_tasks call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#list_tasks.", - "file": "cloud_tasks/list_tasks.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_tasks", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#list_tasks", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2::ListTasksRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2::ListTasksResponse", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" - }, - "method": { - "short_name": "ListTasks", - "full_name": "google.cloud.tasks.v2.CloudTasks.ListTasks", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2_generated_CloudTasks_GetTask_sync", - "title": "Snippet for the get_task call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#get_task.", - "file": "cloud_tasks/get_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_task", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#get_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2::GetTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2::Task", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" - }, - "method": { - "short_name": "GetTask", - "full_name": "google.cloud.tasks.v2.CloudTasks.GetTask", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2_generated_CloudTasks_CreateTask_sync", - "title": "Snippet for the create_task call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#create_task.", - "file": "cloud_tasks/create_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_task", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#create_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2::CreateTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2::Task", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" - }, - "method": { - "short_name": "CreateTask", - "full_name": "google.cloud.tasks.v2.CloudTasks.CreateTask", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2_generated_CloudTasks_DeleteTask_sync", - "title": "Snippet for the delete_task call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#delete_task.", - "file": "cloud_tasks/delete_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_task", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#delete_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2::DeleteTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" - }, - "method": { - "short_name": "DeleteTask", - "full_name": "google.cloud.tasks.v2.CloudTasks.DeleteTask", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2_generated_CloudTasks_RunTask_sync", - "title": "Snippet for the run_task call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2::CloudTasks::Client#run_task.", - "file": "cloud_tasks/run_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "run_task", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client#run_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2::RunTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2::Task", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2::CloudTasks::Client" - }, - "method": { - "short_name": "RunTask", - "full_name": "google.cloud.tasks.v2.CloudTasks.RunTask", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2.CloudTasks" - } - } - }, - "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-tasks-v2/test/google/cloud/tasks/v2/cloud_tasks_paths_test.rb b/owl-bot-staging/google-cloud-tasks-v2/test/google/cloud/tasks/v2/cloud_tasks_paths_test.rb deleted file mode 100644 index 345d9adc75f2..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/test/google/cloud/tasks/v2/cloud_tasks_paths_test.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/tasks/v2/cloud_tasks" - -class ::Google::Cloud::Tasks::V2::CloudTasks::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_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::Tasks::V2::CloudTasks::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_queue_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.queue_path project: "value0", location: "value1", queue: "value2" - assert_equal "projects/value0/locations/value1/queues/value2", path - end - end - - def test_task_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.task_path project: "value0", location: "value1", queue: "value2", task: "value3" - assert_equal "projects/value0/locations/value1/queues/value2/tasks/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2/test/google/cloud/tasks/v2/cloud_tasks_rest_test.rb b/owl-bot-staging/google-cloud-tasks-v2/test/google/cloud/tasks/v2/cloud_tasks_rest_test.rb deleted file mode 100644 index 5f59bf5f6de1..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/test/google/cloud/tasks/v2/cloud_tasks_rest_test.rb +++ /dev/null @@ -1,979 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/tasks/v2/cloudtasks_pb" -require "google/cloud/tasks/v2/cloud_tasks/rest" - - -class ::Google::Cloud::Tasks::V2::CloudTasks::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_queues - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2::ListQueuesResponse.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_queues_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_list_queues_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_queues_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_queues({ 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_queues 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_queues ::Google::Cloud::Tasks::V2::ListQueuesRequest.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_queues({ 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_queues(::Google::Cloud::Tasks::V2::ListQueuesRequest.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_queues_client_stub.call_count - end - end - end - - def test_get_queue - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2::Queue.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_get_queue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_queue({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_queue name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_queue ::Google::Cloud::Tasks::V2::GetQueueRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_queue({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_queue(::Google::Cloud::Tasks::V2::GetQueueRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_queue_client_stub.call_count - end - end - end - - def test_create_queue - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2::Queue.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - queue = {} - - create_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_create_queue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_queue({ parent: parent, queue: queue }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_queue parent: parent, queue: queue do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_queue ::Google::Cloud::Tasks::V2::CreateQueueRequest.new(parent: parent, queue: queue) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_queue({ parent: parent, queue: queue }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_queue(::Google::Cloud::Tasks::V2::CreateQueueRequest.new(parent: parent, queue: queue), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_queue_client_stub.call_count - end - end - end - - def test_update_queue - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2::Queue.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - queue = {} - update_mask = {} - - update_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_update_queue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_queue({ queue: queue, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_queue queue: queue, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_queue ::Google::Cloud::Tasks::V2::UpdateQueueRequest.new(queue: queue, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_queue({ queue: queue, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_queue(::Google::Cloud::Tasks::V2::UpdateQueueRequest.new(queue: queue, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_queue_client_stub.call_count - end - end - end - - def test_delete_queue - # 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_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_delete_queue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_queue({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_queue name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_queue ::Google::Cloud::Tasks::V2::DeleteQueueRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_queue({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_queue(::Google::Cloud::Tasks::V2::DeleteQueueRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_queue_client_stub.call_count - end - end - end - - def test_purge_queue - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2::Queue.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - purge_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_purge_queue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, purge_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.purge_queue({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.purge_queue name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.purge_queue ::Google::Cloud::Tasks::V2::PurgeQueueRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.purge_queue({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.purge_queue(::Google::Cloud::Tasks::V2::PurgeQueueRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, purge_queue_client_stub.call_count - end - end - end - - def test_pause_queue - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2::Queue.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - pause_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_pause_queue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, pause_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.pause_queue({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.pause_queue name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.pause_queue ::Google::Cloud::Tasks::V2::PauseQueueRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.pause_queue({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.pause_queue(::Google::Cloud::Tasks::V2::PauseQueueRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, pause_queue_client_stub.call_count - end - end - end - - def test_resume_queue - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2::Queue.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - resume_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_resume_queue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, resume_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.resume_queue({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.resume_queue name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.resume_queue ::Google::Cloud::Tasks::V2::ResumeQueueRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.resume_queue({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.resume_queue(::Google::Cloud::Tasks::V2::ResumeQueueRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, resume_queue_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::Tasks::V2::CloudTasks::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::Tasks::V2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_set_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2::CloudTasks::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::Tasks::V2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_count - end - end - end - - def test_test_iam_permissions - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2::CloudTasks::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::Tasks::V2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_count - end - end - end - - def test_list_tasks - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2::ListTasksResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - response_view = :VIEW_UNSPECIFIED - page_size = 42 - page_token = "hello world" - - list_tasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_list_tasks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_tasks_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_tasks({ parent: parent, response_view: response_view, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_tasks parent: parent, response_view: response_view, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_tasks ::Google::Cloud::Tasks::V2::ListTasksRequest.new(parent: parent, response_view: response_view, 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_tasks({ parent: parent, response_view: response_view, 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_tasks(::Google::Cloud::Tasks::V2::ListTasksRequest.new(parent: parent, response_view: response_view, 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_tasks_client_stub.call_count - end - end - end - - def test_get_task - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2::Task.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - response_view = :VIEW_UNSPECIFIED - - get_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_get_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_task({ name: name, response_view: response_view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_task name: name, response_view: response_view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_task ::Google::Cloud::Tasks::V2::GetTaskRequest.new(name: name, response_view: response_view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_task({ name: name, response_view: response_view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_task(::Google::Cloud::Tasks::V2::GetTaskRequest.new(name: name, response_view: response_view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_task_client_stub.call_count - end - end - end - - def test_create_task - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2::Task.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - task = {} - response_view = :VIEW_UNSPECIFIED - - create_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_create_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_task({ parent: parent, task: task, response_view: response_view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_task parent: parent, task: task, response_view: response_view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_task ::Google::Cloud::Tasks::V2::CreateTaskRequest.new(parent: parent, task: task, response_view: response_view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_task({ parent: parent, task: task, response_view: response_view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_task(::Google::Cloud::Tasks::V2::CreateTaskRequest.new(parent: parent, task: task, response_view: response_view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_task_client_stub.call_count - end - end - end - - def test_delete_task - # 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_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_delete_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_task({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_task name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_task ::Google::Cloud::Tasks::V2::DeleteTaskRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_task({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_task(::Google::Cloud::Tasks::V2::DeleteTaskRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_task_client_stub.call_count - end - end - end - - def test_run_task - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2::Task.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - response_view = :VIEW_UNSPECIFIED - - run_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.stub :transcode_run_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, run_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.run_task({ name: name, response_view: response_view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.run_task name: name, response_view: response_view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.run_task ::Google::Cloud::Tasks::V2::RunTaskRequest.new(name: name, response_view: response_view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.run_task({ name: name, response_view: response_view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.run_task(::Google::Cloud::Tasks::V2::RunTaskRequest.new(name: name, response_view: response_view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, run_task_client_stub.call_count - end - end - end - - def test_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::Tasks::V2::CloudTasks::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::Tasks::V2::CloudTasks::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2/test/google/cloud/tasks/v2/cloud_tasks_test.rb b/owl-bot-staging/google-cloud-tasks-v2/test/google/cloud/tasks/v2/cloud_tasks_test.rb deleted file mode 100644 index 7f5678b2ed04..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/test/google/cloud/tasks/v2/cloud_tasks_test.rb +++ /dev/null @@ -1,1074 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/tasks/v2/cloudtasks_pb" -require "google/cloud/tasks/v2/cloud_tasks" - -class ::Google::Cloud::Tasks::V2::CloudTasks::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_queues - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2::ListQueuesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_queues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_queues, name - assert_kind_of ::Google::Cloud::Tasks::V2::ListQueuesRequest, 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_queues_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_queues({ 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_queues 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_queues ::Google::Cloud::Tasks::V2::ListQueuesRequest.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_queues({ 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_queues(::Google::Cloud::Tasks::V2::ListQueuesRequest.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_queues_client_stub.call_rpc_count - end - end - - def test_get_queue - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2::Queue.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_queue, name - assert_kind_of ::Google::Cloud::Tasks::V2::GetQueueRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_queue({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_queue name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_queue ::Google::Cloud::Tasks::V2::GetQueueRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_queue({ 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_queue(::Google::Cloud::Tasks::V2::GetQueueRequest.new(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_queue_client_stub.call_rpc_count - end - end - - def test_create_queue - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2::Queue.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - queue = {} - - create_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_queue, name - assert_kind_of ::Google::Cloud::Tasks::V2::CreateQueueRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Tasks::V2::Queue), request["queue"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_queue({ parent: parent, queue: queue }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_queue parent: parent, queue: queue do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_queue ::Google::Cloud::Tasks::V2::CreateQueueRequest.new(parent: parent, queue: queue) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_queue({ parent: parent, queue: queue }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_queue(::Google::Cloud::Tasks::V2::CreateQueueRequest.new(parent: parent, queue: queue), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_queue_client_stub.call_rpc_count - end - end - - def test_update_queue - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2::Queue.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - queue = {} - update_mask = {} - - update_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_queue, name - assert_kind_of ::Google::Cloud::Tasks::V2::UpdateQueueRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Tasks::V2::Queue), request["queue"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_queue({ queue: queue, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_queue queue: queue, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_queue ::Google::Cloud::Tasks::V2::UpdateQueueRequest.new(queue: queue, 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_queue({ queue: queue, 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_queue(::Google::Cloud::Tasks::V2::UpdateQueueRequest.new(queue: queue, 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_queue_client_stub.call_rpc_count - end - end - - def test_delete_queue - # 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_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_queue, name - assert_kind_of ::Google::Cloud::Tasks::V2::DeleteQueueRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_queue({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_queue name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_queue ::Google::Cloud::Tasks::V2::DeleteQueueRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_queue({ 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_queue(::Google::Cloud::Tasks::V2::DeleteQueueRequest.new(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_queue_client_stub.call_rpc_count - end - end - - def test_purge_queue - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2::Queue.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - purge_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :purge_queue, name - assert_kind_of ::Google::Cloud::Tasks::V2::PurgeQueueRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, purge_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.purge_queue({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.purge_queue name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.purge_queue ::Google::Cloud::Tasks::V2::PurgeQueueRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.purge_queue({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.purge_queue(::Google::Cloud::Tasks::V2::PurgeQueueRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, purge_queue_client_stub.call_rpc_count - end - end - - def test_pause_queue - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2::Queue.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - pause_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :pause_queue, name - assert_kind_of ::Google::Cloud::Tasks::V2::PauseQueueRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, pause_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.pause_queue({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.pause_queue name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.pause_queue ::Google::Cloud::Tasks::V2::PauseQueueRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.pause_queue({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.pause_queue(::Google::Cloud::Tasks::V2::PauseQueueRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, pause_queue_client_stub.call_rpc_count - end - end - - def test_resume_queue - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2::Queue.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - resume_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :resume_queue, name - assert_kind_of ::Google::Cloud::Tasks::V2::ResumeQueueRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, resume_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.resume_queue({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.resume_queue name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.resume_queue ::Google::Cloud::Tasks::V2::ResumeQueueRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.resume_queue({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.resume_queue(::Google::Cloud::Tasks::V2::ResumeQueueRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, resume_queue_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::Tasks::V2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_rpc_count - end - end - - def test_test_iam_permissions - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_rpc_count - end - end - - def test_list_tasks - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2::ListTasksResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - response_view = :VIEW_UNSPECIFIED - page_size = 42 - page_token = "hello world" - - list_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_tasks, name - assert_kind_of ::Google::Cloud::Tasks::V2::ListTasksRequest, request - assert_equal "hello world", request["parent"] - assert_equal :VIEW_UNSPECIFIED, request["response_view"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_tasks_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_tasks({ parent: parent, response_view: response_view, 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_tasks parent: parent, response_view: response_view, 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_tasks ::Google::Cloud::Tasks::V2::ListTasksRequest.new(parent: parent, response_view: response_view, 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_tasks({ parent: parent, response_view: response_view, 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_tasks(::Google::Cloud::Tasks::V2::ListTasksRequest.new(parent: parent, response_view: response_view, 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_tasks_client_stub.call_rpc_count - end - end - - def test_get_task - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2::Task.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - response_view = :VIEW_UNSPECIFIED - - get_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_task, name - assert_kind_of ::Google::Cloud::Tasks::V2::GetTaskRequest, request - assert_equal "hello world", request["name"] - assert_equal :VIEW_UNSPECIFIED, request["response_view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_task({ name: name, response_view: response_view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_task name: name, response_view: response_view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_task ::Google::Cloud::Tasks::V2::GetTaskRequest.new(name: name, response_view: response_view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_task({ name: name, response_view: response_view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_task(::Google::Cloud::Tasks::V2::GetTaskRequest.new(name: name, response_view: response_view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_task_client_stub.call_rpc_count - end - end - - def test_create_task - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2::Task.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - task = {} - response_view = :VIEW_UNSPECIFIED - - create_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_task, name - assert_kind_of ::Google::Cloud::Tasks::V2::CreateTaskRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Tasks::V2::Task), request["task"] - assert_equal :VIEW_UNSPECIFIED, request["response_view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_task({ parent: parent, task: task, response_view: response_view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_task parent: parent, task: task, response_view: response_view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_task ::Google::Cloud::Tasks::V2::CreateTaskRequest.new(parent: parent, task: task, response_view: response_view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_task({ parent: parent, task: task, response_view: response_view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_task(::Google::Cloud::Tasks::V2::CreateTaskRequest.new(parent: parent, task: task, response_view: response_view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_task_client_stub.call_rpc_count - end - end - - def test_delete_task - # 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_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_task, name - assert_kind_of ::Google::Cloud::Tasks::V2::DeleteTaskRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_task({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_task name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_task ::Google::Cloud::Tasks::V2::DeleteTaskRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_task({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_task(::Google::Cloud::Tasks::V2::DeleteTaskRequest.new(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_task_client_stub.call_rpc_count - end - end - - def test_run_task - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2::Task.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - response_view = :VIEW_UNSPECIFIED - - run_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :run_task, name - assert_kind_of ::Google::Cloud::Tasks::V2::RunTaskRequest, request - assert_equal "hello world", request["name"] - assert_equal :VIEW_UNSPECIFIED, request["response_view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, run_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.run_task({ name: name, response_view: response_view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.run_task name: name, response_view: response_view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.run_task ::Google::Cloud::Tasks::V2::RunTaskRequest.new(name: name, response_view: response_view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.run_task({ name: name, response_view: response_view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.run_task(::Google::Cloud::Tasks::V2::RunTaskRequest.new(name: name, response_view: response_view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, run_task_client_stub.call_rpc_count - end - end - - def test_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::Tasks::V2::CloudTasks::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::Tasks::V2::CloudTasks::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::Tasks::V2::CloudTasks::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Tasks::V2::CloudTasks::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2/test/helper.rb b/owl-bot-staging/google-cloud-tasks-v2/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/.gitignore b/owl-bot-staging/google-cloud-tasks-v2beta2/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/.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-tasks-v2beta2/.repo-metadata.json b/owl-bot-staging/google-cloud-tasks-v2beta2/.repo-metadata.json deleted file mode 100644 index 7f0b625d0a63..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "cloudtasks.googleapis.com", - "api_shortname": "cloudtasks", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest", - "distribution_name": "google-cloud-tasks-v2beta2", - "is_cloud": true, - "language": "ruby", - "name": "cloudtasks", - "name_pretty": "Cloud Tasks V2beta2 API", - "product_documentation": "https://cloud.google.com/tasks", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Cloud Tasks is a fully managed service that allows you to manage the execution, dispatch and delivery of a large number of distributed tasks. You can asynchronously perform work outside of a user request. Your tasks can be executed on App Engine or any arbitrary HTTP endpoint. Note that google-cloud-tasks-v2beta2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-tasks instead. See the readme for more details.", - "ruby-cloud-env-prefix": "TASKS", - "ruby-cloud-product-url": "https://cloud.google.com/tasks", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/.rubocop.yml b/owl-bot-staging/google-cloud-tasks-v2beta2/.rubocop.yml deleted file mode 100644 index 21bca46e5821..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-tasks-v2beta2.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-tasks-v2beta2.rb" diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/.toys.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/.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-tasks-v2beta2/.yardopts b/owl-bot-staging/google-cloud-tasks-v2beta2/.yardopts deleted file mode 100644 index 2480630b8f94..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Tasks V2beta2 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-tasks-v2beta2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-tasks-v2beta2/AUTHENTICATION.md deleted file mode 100644 index 458865effa49..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-tasks-v2beta2 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-tasks-v2beta2 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/tasks/v2beta2" - -client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/tasks/v2beta2" - -::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::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-tasks-v2beta2 -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/tasks/v2beta2" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::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-tasks-v2beta2/CHANGELOG.md b/owl-bot-staging/google-cloud-tasks-v2beta2/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/Gemfile b/owl-bot-staging/google-cloud-tasks-v2beta2/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/LICENSE.md b/owl-bot-staging/google-cloud-tasks-v2beta2/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2/README.md b/owl-bot-staging/google-cloud-tasks-v2beta2/README.md deleted file mode 100644 index 7161ac774944..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Tasks V2beta2 API - -Manages the execution of large numbers of distributed requests. - -Cloud Tasks is a fully managed service that allows you to manage the execution, dispatch and delivery of a large number of distributed tasks. You can asynchronously perform work outside of a user request. Your tasks can be executed on App Engine or any arbitrary HTTP endpoint. - -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 Tasks V2beta2 API. Most users should consider using -the main client gem, -[google-cloud-tasks](https://rubygems.org/gems/google-cloud-tasks). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-tasks-v2beta2 -``` - -## 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/cloudtasks.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/tasks/v2beta2" - -client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new -request = ::Google::Cloud::Tasks::V2beta2::ListQueuesRequest.new # (request fields as keyword arguments...) -response = client.list_queues request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/tasks) -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/tasks/v2beta2" -require "logger" - -client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::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-tasks`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-tasks-v2beta2`. -_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-tasks`. -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-tasks-v2beta2`. - -### 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-tasks-v2beta2/Rakefile b/owl-bot-staging/google-cloud-tasks-v2beta2/Rakefile deleted file mode 100644 index 29d824a23b8e..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["TASKS_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["TASKS_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["TASKS_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 TASKS_TEST_PROJECT=test123 TASKS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/tasks/v2beta2/cloud_tasks/credentials" - ::Google::Cloud::Tasks::V2beta2::CloudTasks::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["TASKS_PROJECT"] = project - ENV["TASKS_TEST_PROJECT"] = project - ENV["TASKS_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-tasks-v2beta2 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-tasks-v2beta2 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-tasks-v2beta2 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-tasks-v2beta2 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-tasks-v2beta2" - header "google-cloud-tasks-v2beta2 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-tasks-v2beta2 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-tasks-v2beta2 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-tasks-v2beta2 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-tasks-v2beta2 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-tasks-v2beta2/gapic_metadata.json b/owl-bot-staging/google-cloud-tasks-v2beta2/gapic_metadata.json deleted file mode 100644 index 61fb01febb7c..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/gapic_metadata.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.tasks.v2beta2", - "libraryPackage": "::Google::Cloud::Tasks::V2beta2", - "services": { - "CloudTasks": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client", - "rpcs": { - "ListQueues": { - "methods": [ - "list_queues" - ] - }, - "GetQueue": { - "methods": [ - "get_queue" - ] - }, - "CreateQueue": { - "methods": [ - "create_queue" - ] - }, - "UpdateQueue": { - "methods": [ - "update_queue" - ] - }, - "DeleteQueue": { - "methods": [ - "delete_queue" - ] - }, - "PurgeQueue": { - "methods": [ - "purge_queue" - ] - }, - "PauseQueue": { - "methods": [ - "pause_queue" - ] - }, - "ResumeQueue": { - "methods": [ - "resume_queue" - ] - }, - "UploadQueueYaml": { - "methods": [ - "upload_queue_yaml" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - }, - "ListTasks": { - "methods": [ - "list_tasks" - ] - }, - "GetTask": { - "methods": [ - "get_task" - ] - }, - "CreateTask": { - "methods": [ - "create_task" - ] - }, - "DeleteTask": { - "methods": [ - "delete_task" - ] - }, - "LeaseTasks": { - "methods": [ - "lease_tasks" - ] - }, - "AcknowledgeTask": { - "methods": [ - "acknowledge_task" - ] - }, - "RenewLease": { - "methods": [ - "renew_lease" - ] - }, - "CancelLease": { - "methods": [ - "cancel_lease" - ] - }, - "RunTask": { - "methods": [ - "run_task" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/google-cloud-tasks-v2beta2.gemspec b/owl-bot-staging/google-cloud-tasks-v2beta2/google-cloud-tasks-v2beta2.gemspec deleted file mode 100644 index cf386b0a026d..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/google-cloud-tasks-v2beta2.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/tasks/v2beta2/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-tasks-v2beta2" - gem.version = Google::Cloud::Tasks::V2beta2::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Cloud Tasks is a fully managed service that allows you to manage the execution, dispatch and delivery of a large number of distributed tasks. You can asynchronously perform work outside of a user request. Your tasks can be executed on App Engine or any arbitrary HTTP endpoint. Note that google-cloud-tasks-v2beta2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-tasks instead. See the readme for more details." - gem.summary = "Manages the execution of large numbers of distributed requests." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google-cloud-tasks-v2beta2.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google-cloud-tasks-v2beta2.rb deleted file mode 100644 index 3679450055ab..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google-cloud-tasks-v2beta2.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/tasks/v2beta2" diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2.rb deleted file mode 100644 index 154f4c62635d..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2.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/tasks/v2beta2/cloud_tasks" -require "google/cloud/tasks/v2beta2/version" - -module Google - module Cloud - module Tasks - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/tasks/v2beta2" - # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/tasks/v2beta2" - # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new - # - module V2beta2 - end - end - end -end - -helper_path = ::File.join __dir__, "v2beta2", "_helpers.rb" -require "google/cloud/tasks/v2beta2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/bindings_override.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/bindings_override.rb deleted file mode 100644 index 2bf75edd4e89..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/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 Tasks - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/tasks/v2beta2/rest" - # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new - # - module V2beta2 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Tasks"] - 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: "/v2beta2/{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: "/v2beta2/{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-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks.rb deleted file mode 100644 index fb7fda664c77..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks.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/tasks/v2beta2/version" - -require "google/cloud/tasks/v2beta2/cloud_tasks/credentials" -require "google/cloud/tasks/v2beta2/cloud_tasks/paths" -require "google/cloud/tasks/v2beta2/cloud_tasks/client" -require "google/cloud/tasks/v2beta2/cloud_tasks/rest" - -module Google - module Cloud - module Tasks - module V2beta2 - ## - # Cloud Tasks allows developers to manage the execution of background - # work in their applications. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/tasks/v2beta2/cloud_tasks" - # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/tasks/v2beta2/cloud_tasks/rest" - # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new - # - module CloudTasks - end - end - end - end -end - -helper_path = ::File.join __dir__, "cloud_tasks", "helpers.rb" -require "google/cloud/tasks/v2beta2/cloud_tasks/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/client.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/client.rb deleted file mode 100644 index f69060cfe2e7..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/client.rb +++ /dev/null @@ -1,2936 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/tasks/v2beta2/cloudtasks_pb" -require "google/cloud/location" - -module Google - module Cloud - module Tasks - module V2beta2 - module CloudTasks - ## - # Client for the CloudTasks service. - # - # Cloud Tasks allows developers to manage the execution of background - # work in their applications. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudtasks.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_tasks_stub - - ## - # Configure the CloudTasks Client class. - # - # See {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudTasks clients - # ::Google::Cloud::Tasks::V2beta2::CloudTasks::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", "Tasks", "V2beta2"] - 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_queues.timeout = 20.0 - default_config.rpcs.list_queues.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_queue.timeout = 20.0 - default_config.rpcs.get_queue.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_queue.timeout = 20.0 - - default_config.rpcs.update_queue.timeout = 20.0 - - default_config.rpcs.delete_queue.timeout = 20.0 - default_config.rpcs.delete_queue.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.purge_queue.timeout = 20.0 - - default_config.rpcs.pause_queue.timeout = 20.0 - - default_config.rpcs.resume_queue.timeout = 20.0 - - default_config.rpcs.upload_queue_yaml.timeout = 20.0 - - default_config.rpcs.get_iam_policy.timeout = 20.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.set_iam_policy.timeout = 20.0 - - default_config.rpcs.test_iam_permissions.timeout = 20.0 - default_config.rpcs.test_iam_permissions.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_tasks.timeout = 20.0 - default_config.rpcs.list_tasks.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_task.timeout = 20.0 - default_config.rpcs.get_task.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_task.timeout = 20.0 - - default_config.rpcs.delete_task.timeout = 20.0 - default_config.rpcs.delete_task.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.lease_tasks.timeout = 20.0 - - default_config.rpcs.acknowledge_task.timeout = 20.0 - - default_config.rpcs.renew_lease.timeout = 20.0 - - default_config.rpcs.cancel_lease.timeout = 20.0 - - default_config.rpcs.run_task.timeout = 20.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudTasks 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::Tasks::V2beta2::CloudTasks::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_tasks_stub.universe_domain - end - - ## - # Create a new CloudTasks client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudTasks 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/tasks/v2beta2/cloudtasks_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 - - @cloud_tasks_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Tasks::V2beta2::CloudTasks::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_tasks_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_tasks_stub.endpoint - config.universe_domain = @cloud_tasks_stub.universe_domain - config.logger = @cloud_tasks_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 - @cloud_tasks_stub.logger - end - - # Service calls - - ## - # Lists queues. - # - # Queues are returned in lexicographical order. - # - # @overload list_queues(request, options = nil) - # Pass arguments to `list_queues` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::ListQueuesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::ListQueuesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_queues(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) - # Pass arguments to `list_queues` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 name. - # For example: `projects/PROJECT_ID/locations/LOCATION_ID` - # @param filter [::String] - # `filter` can be used to specify a subset of queues. Any - # {::Google::Cloud::Tasks::V2beta2::Queue Queue} field can be used as a filter and - # several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The - # filter syntax is the same as described in [Stackdriver's Advanced Logs - # Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - # - # Sample filter "app_engine_http_target: *". - # - # Note that using filters might cause fewer queues than the - # requested_page size to be returned. - # @param page_size [::Integer] - # Requested page size. - # - # The maximum page size is 9800. If unspecified, the page size will - # be the maximum. Fewer queues than requested might be returned, - # even if more queues exist; use the - # {::Google::Cloud::Tasks::V2beta2::ListQueuesResponse#next_page_token next_page_token} - # in the response to determine if more queues exist. - # @param page_token [::String] - # A token identifying the page of results to return. - # - # To request the first page results, page_token must be empty. To - # request the next page of results, page_token must be the value of - # {::Google::Cloud::Tasks::V2beta2::ListQueuesResponse#next_page_token next_page_token} - # returned from the previous call to - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_queues ListQueues} method. It - # is an error to switch the value of the - # {::Google::Cloud::Tasks::V2beta2::ListQueuesRequest#filter filter} while - # iterating through pages. - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Read mask is used for a more granular control over what the API - # returns. If the mask is not present all fields will be returned except - # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - # specified in the mask. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2beta2::Queue>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2beta2::Queue>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::ListQueuesRequest.new - # - # # Call the list_queues method. - # result = client.list_queues request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Tasks::V2beta2::Queue. - # p item - # end - # - def list_queues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::ListQueuesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_queues.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_queues.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_queues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :list_queues, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_tasks_stub, :list_queues, 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 queue. - # - # @overload get_queue(request, options = nil) - # Pass arguments to `get_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::GetQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::GetQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_queue(name: nil, read_mask: nil) - # Pass arguments to `get_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the queue. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Read mask is used for a more granular control over what the API - # returns. If the mask is not present all fields will be returned except - # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - # specified in the mask. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2beta2::Queue] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Queue] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::GetQueueRequest.new - # - # # Call the get_queue method. - # result = client.get_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. - # p result - # - def get_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::GetQueueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_queue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :get_queue, request, 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 queue. - # - # Queues created with this method allow tasks to live for a maximum of 31 - # days. After a task is 31 days old, the task will be deleted regardless of - # whether it was dispatched or not. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - # - # @overload create_queue(request, options = nil) - # Pass arguments to `create_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::CreateQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::CreateQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_queue(parent: nil, queue: nil) - # Pass arguments to `create_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 name in which the queue will be created. - # For example: `projects/PROJECT_ID/locations/LOCATION_ID` - # - # The list of allowed locations can be obtained by calling Cloud - # Tasks' implementation of - # [ListLocations][google.cloud.location.Locations.ListLocations]. - # @param queue [::Google::Cloud::Tasks::V2beta2::Queue, ::Hash] - # Required. The queue to create. - # - # [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as - # an existing queue. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2beta2::Queue] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Queue] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::CreateQueueRequest.new - # - # # Call the create_queue method. - # result = client.create_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. - # p result - # - def create_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::CreateQueueRequest - - # Converts hash and nil to 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_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_queue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :create_queue, request, 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 queue. - # - # This method creates the queue if it does not exist and updates - # the queue if it does exist. - # - # Queues created with this method allow tasks to live for a maximum of 31 - # days. After a task is 31 days old, the task will be deleted regardless of - # whether it was dispatched or not. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - # - # @overload update_queue(request, options = nil) - # Pass arguments to `update_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_queue(queue: nil, update_mask: nil) - # Pass arguments to `update_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param queue [::Google::Cloud::Tasks::V2beta2::Queue, ::Hash] - # Required. The queue to create or update. - # - # The queue's {::Google::Cloud::Tasks::V2beta2::Queue#name name} must be - # specified. - # - # Output only fields cannot be modified using UpdateQueue. - # Any value specified for an output only field will be ignored. - # The queue's {::Google::Cloud::Tasks::V2beta2::Queue#name name} cannot be - # changed. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # A mask used to specify which fields of the queue are being updated. - # - # If empty, then all fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2beta2::Queue] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Queue] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::UpdateQueueRequest.new - # - # # Call the update_queue method. - # result = client.update_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. - # p result - # - def update_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest - - # Converts hash and nil to 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_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.queue&.name - header_params["queue.name"] = request.queue.name - end - - request_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_queue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :update_queue, request, 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 queue. - # - # This command will delete the queue even if it has tasks in it. - # - # Note: If you delete a queue, a queue with the same name can't be created - # for 7 days. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - # - # @overload delete_queue(request, options = nil) - # Pass arguments to `delete_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_queue(name: nil) - # Pass arguments to `delete_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::DeleteQueueRequest.new - # - # # Call the delete_queue method. - # result = client.delete_queue request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest - - # Converts hash and nil to 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_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_queue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :delete_queue, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Purges a queue by deleting all of its tasks. - # - # All tasks created before this method is called are permanently deleted. - # - # Purge operations can take up to one minute to take effect. Tasks - # might be dispatched before the purge takes effect. A purge is irreversible. - # - # @overload purge_queue(request, options = nil) - # Pass arguments to `purge_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload purge_queue(name: nil) - # Pass arguments to `purge_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2beta2::Queue] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Queue] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::PurgeQueueRequest.new - # - # # Call the purge_queue method. - # result = client.purge_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. - # p result - # - def purge_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.purge_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.purge_queue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.purge_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :purge_queue, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Pauses the queue. - # - # If a queue is paused then the system will stop dispatching tasks - # until the queue is resumed via - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#resume_queue ResumeQueue}. Tasks can - # still be added when the queue is paused. A queue is paused if its - # {::Google::Cloud::Tasks::V2beta2::Queue#state state} is - # {::Google::Cloud::Tasks::V2beta2::Queue::State::PAUSED PAUSED}. - # - # @overload pause_queue(request, options = nil) - # Pass arguments to `pause_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::PauseQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::PauseQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload pause_queue(name: nil) - # Pass arguments to `pause_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2beta2::Queue] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Queue] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::PauseQueueRequest.new - # - # # Call the pause_queue method. - # result = client.pause_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. - # p result - # - def pause_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::PauseQueueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.pause_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.pause_queue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.pause_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :pause_queue, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Resume a queue. - # - # This method resumes a queue after it has been - # {::Google::Cloud::Tasks::V2beta2::Queue::State::PAUSED PAUSED} or - # {::Google::Cloud::Tasks::V2beta2::Queue::State::DISABLED DISABLED}. The state of a - # queue is stored in the queue's - # {::Google::Cloud::Tasks::V2beta2::Queue#state state}; after calling this method - # it will be set to - # {::Google::Cloud::Tasks::V2beta2::Queue::State::RUNNING RUNNING}. - # - # WARNING: Resuming many high-QPS queues at the same time can - # lead to target overloading. If you are resuming high-QPS - # queues, follow the 500/50/5 pattern described in - # [Managing Cloud Tasks Scaling - # Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). - # - # @overload resume_queue(request, options = nil) - # Pass arguments to `resume_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload resume_queue(name: nil) - # Pass arguments to `resume_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2beta2::Queue] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Queue] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::ResumeQueueRequest.new - # - # # Call the resume_queue method. - # result = client.resume_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. - # p result - # - def resume_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.resume_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.resume_queue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.resume_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :resume_queue, request, 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 queue list by uploading a queue.yaml file. - # - # The queue.yaml file is supplied in the request body as a YAML encoded - # string. This method was added to support gcloud clients versions before - # 322.0.0. New clients should use CreateQueue instead of this method. - # - # @overload upload_queue_yaml(request, options = nil) - # Pass arguments to `upload_queue_yaml` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::UploadQueueYamlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::UploadQueueYamlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload upload_queue_yaml(app_id: nil, http_body: nil) - # Pass arguments to `upload_queue_yaml` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param app_id [::String] - # Required. The App ID is supplied as an HTTP parameter. Unlike internal - # usage of App ID, it does not include a region prefix. Rather, the App ID - # represents the Project ID against which to make the request. - # @param http_body [::Google::Api::HttpBody, ::Hash] - # The http body contains the queue.yaml file which used to update queue lists - # - # @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/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::UploadQueueYamlRequest.new - # - # # Call the upload_queue_yaml method. - # result = client.upload_queue_yaml request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def upload_queue_yaml request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::UploadQueueYamlRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.upload_queue_yaml.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::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.upload_queue_yaml.timeout, - metadata: metadata, - retry_policy: @config.rpcs.upload_queue_yaml.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :upload_queue_yaml, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy for a - # {::Google::Cloud::Tasks::V2beta2::Queue Queue}. Returns an empty policy if the - # resource exists and does not have a policy set. - # - # Authorization requires the following - # [Google IAM](https://cloud.google.com/iam) permission on the specified - # resource parent: - # - # * `cloudtasks.queues.getIamPolicy` - # - # @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/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::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::Tasks::V2beta2::VERSION - metadata[:"x-goog-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_tasks_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy for a - # {::Google::Cloud::Tasks::V2beta2::Queue Queue}. Replaces any existing policy. - # - # Note: The Cloud Console does not check queue-level IAM permissions yet. - # Project-level permissions are required to use the Cloud Console. - # - # Authorization requires the following - # [Google IAM](https://cloud.google.com/iam) permission on the specified - # resource parent: - # - # * `cloudtasks.queues.setIamPolicy` - # - # @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/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::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::Tasks::V2beta2::VERSION - metadata[:"x-goog-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_tasks_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns permissions that a caller has on a - # {::Google::Cloud::Tasks::V2beta2::Queue Queue}. If the resource does not exist, - # this will return an empty set of permissions, not a - # [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. - # - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::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::Tasks::V2beta2::VERSION - metadata[:"x-goog-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_tasks_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 - - ## - # Lists the tasks in a queue. - # - # By default, only the {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC} - # view is retrieved due to performance considerations; - # {::Google::Cloud::Tasks::V2beta2::ListTasksRequest#response_view response_view} - # controls the subset of information which is returned. - # - # The tasks may be returned in any order. The ordering may change at any - # time. - # - # @overload list_tasks(request, options = nil) - # Pass arguments to `list_tasks` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::ListTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::ListTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_tasks(parent: nil, response_view: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. - # @param page_size [::Integer] - # Maximum page size. - # - # Fewer tasks than requested might be returned, even if more tasks exist; use - # {::Google::Cloud::Tasks::V2beta2::ListTasksResponse#next_page_token next_page_token} - # in the response to determine if more tasks exist. - # - # The maximum page size is 1000. If unspecified, the page size will be the - # maximum. - # @param page_token [::String] - # A token identifying the page of results to return. - # - # To request the first page results, page_token must be empty. To - # request the next page of results, page_token must be the value of - # {::Google::Cloud::Tasks::V2beta2::ListTasksResponse#next_page_token next_page_token} - # returned from the previous call to - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_tasks ListTasks} method. - # - # The page token is valid for only 2 hours. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2beta2::Task>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2beta2::Task>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::ListTasksRequest.new - # - # # Call the list_tasks method. - # result = client.list_tasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Tasks::V2beta2::Task. - # p item - # end - # - def list_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::ListTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_tasks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :list_tasks, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_tasks_stub, :list_tasks, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a task. - # - # @overload get_task(request, options = nil) - # Pass arguments to `get_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::GetTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::GetTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_task(name: nil, response_view: nil) - # Pass arguments to `get_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2beta2::Task] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Task] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::GetTaskRequest.new - # - # # Call the get_task method. - # result = client.get_task request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. - # p result - # - def get_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::GetTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :get_task, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a task and adds it to a queue. - # - # Tasks cannot be updated after creation; there is no UpdateTask command. - # - # * For {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget App Engine queues}, - # the maximum task size is - # 100KB. - # * For {::Google::Cloud::Tasks::V2beta2::PullTarget pull queues}, the maximum - # task size is 1MB. - # - # @overload create_task(request, options = nil) - # Pass arguments to `create_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::CreateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::CreateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_task(parent: nil, task: nil, response_view: nil) - # Pass arguments to `create_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # - # The queue must already exist. - # @param task [::Google::Cloud::Tasks::V2beta2::Task, ::Hash] - # Required. The task to add. - # - # Task names have the following format: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - # The user can optionally specify a task - # {::Google::Cloud::Tasks::V2beta2::Task#name name}. If a name is not specified - # then the system will generate a random unique task id, which will be set in - # the task returned in the {::Google::Cloud::Tasks::V2beta2::Task#name response}. - # - # If {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} is not - # set or is in the past then Cloud Tasks will set it to the current time. - # - # Task De-duplication: - # - # Explicitly specifying a task ID enables task de-duplication. If - # a task's ID is identical to that of an existing task or a task - # that was deleted or completed recently then the call will fail - # with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. - # If the task's queue was created using Cloud Tasks, then another task with - # the same name can't be created for ~1 hour after the original task was - # deleted or completed. If the task's queue was created using queue.yaml or - # queue.xml, then another task with the same name can't be created - # for ~9 days after the original task was deleted or completed. - # - # Because there is an extra lookup cost to identify duplicate task - # names, these {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task CreateTask} - # calls have significantly increased latency. Using hashed strings for the - # task id or for the prefix of the task id is recommended. Choosing task ids - # that are sequential or have sequential prefixes, for example using a - # timestamp, causes an increase in latency and error rates in all - # task commands. The infrastructure relies on an approximately - # uniform distribution of task ids to store and serve tasks - # efficiently. - # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2beta2::Task] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Task] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::CreateTaskRequest.new - # - # # Call the create_task method. - # result = client.create_task request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. - # p result - # - def create_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::CreateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :create_task, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a task. - # - # A task can be deleted if it is scheduled or dispatched. A task - # cannot be deleted if it has completed successfully or permanently - # failed. - # - # @overload delete_task(request, options = nil) - # Pass arguments to `delete_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_task(name: nil) - # Pass arguments to `delete_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::DeleteTaskRequest.new - # - # # Call the delete_task method. - # result = client.delete_task request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :delete_task, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Leases tasks from a pull queue for - # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#lease_duration lease_duration}. - # - # This method is invoked by the worker to obtain a lease. The - # worker must acknowledge the task via - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#acknowledge_task AcknowledgeTask} - # after they have performed the work associated with the task. - # - # The {::Google::Cloud::Tasks::V2beta2::PullMessage#payload payload} is intended - # to store data that the worker needs to perform the work associated with the - # task. To return the payloads in the - # {::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse response}, set - # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#response_view response_view} - # to {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL}. - # - # A maximum of 10 qps of - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} requests are - # allowed per queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] - # is returned when this limit is - # exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] - # is also returned when - # {::Google::Cloud::Tasks::V2beta2::RateLimits#max_tasks_dispatched_per_second max_tasks_dispatched_per_second} - # is exceeded. - # - # @overload lease_tasks(request, options = nil) - # Pass arguments to `lease_tasks` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload lease_tasks(parent: nil, max_tasks: nil, lease_duration: nil, response_view: nil, filter: nil) - # Pass arguments to `lease_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # @param max_tasks [::Integer] - # The maximum number of tasks to lease. - # - # The system will make a best effort to return as close to as - # `max_tasks` as possible. - # - # The largest that `max_tasks` can be is 1000. - # - # The maximum total size of a [lease tasks - # response][google.cloud.tasks.v2beta2.LeaseTasksResponse] is 32 MB. If the - # sum of all task sizes requested reaches this limit, fewer tasks than - # requested are returned. - # @param lease_duration [::Google::Protobuf::Duration, ::Hash] - # Required. The duration of the lease. - # - # Each task returned in the - # {::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse response} will have its - # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} set to the - # current time plus the `lease_duration`. The task is leased until its - # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}; thus, the - # task will not be returned to another - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} call before - # its {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}. - # - # - # After the worker has successfully finished the work associated - # with the task, the worker must call via - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#acknowledge_task AcknowledgeTask} - # before the {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}. - # Otherwise the task will be returned to a later - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} call so that - # another worker can retry it. - # - # The maximum lease duration is 1 week. - # `lease_duration` will be truncated to the nearest second. - # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. - # @param filter [::String] - # `filter` can be used to specify a subset of tasks to lease. - # - # When `filter` is set to `tag=` then the - # {::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse response} will contain only - # tasks whose {::Google::Cloud::Tasks::V2beta2::PullMessage#tag tag} is equal to - # ``. `` must be less than 500 characters. - # - # When `filter` is set to `tag_function=oldest_tag()`, only tasks which have - # the same tag as the task with the oldest - # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} will be - # returned. - # - # Grammar Syntax: - # - # * `filter = "tag=" tag | "tag_function=" function` - # - # * `tag = string` - # - # * `function = "oldest_tag()"` - # - # The `oldest_tag()` function returns tasks which have the same tag as the - # oldest task (ordered by schedule time). - # - # SDK compatibility: Although the SDK allows tags to be either - # string or - # [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), - # only UTF-8 encoded tags can be used in Cloud Tasks. Tag which - # aren't UTF-8 encoded can't be used in the - # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#filter filter} and the - # task's {::Google::Cloud::Tasks::V2beta2::PullMessage#tag tag} will be displayed - # as empty in Cloud Tasks. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::LeaseTasksRequest.new - # - # # Call the lease_tasks method. - # result = client.lease_tasks request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta2::LeaseTasksResponse. - # p result - # - def lease_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.lease_tasks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.lease_tasks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.lease_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :lease_tasks, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Acknowledges a pull task. - # - # The worker, that is, the entity that - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks leased} this task must - # call this method to indicate that the work associated with the task has - # finished. - # - # The worker must acknowledge a task within the - # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#lease_duration lease_duration} - # or the lease will expire and the task will become available to be leased - # again. After the task is acknowledged, it will not be returned - # by a later {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks}, - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#get_task GetTask}, or - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_tasks ListTasks}. - # - # @overload acknowledge_task(request, options = nil) - # Pass arguments to `acknowledge_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload acknowledge_task(name: nil, schedule_time: nil) - # Pass arguments to `acknowledge_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @param schedule_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. The task's current schedule time, available in the - # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} response or - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#renew_lease RenewLease} response. - # This restriction is to ensure that your worker currently holds the lease. - # - # @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/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest.new - # - # # Call the acknowledge_task method. - # result = client.acknowledge_task request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def acknowledge_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.acknowledge_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.acknowledge_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.acknowledge_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :acknowledge_task, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Renew the current lease of a pull task. - # - # The worker can use this method to extend the lease by a new - # duration, starting from now. The new task lease will be - # returned in the task's - # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}. - # - # @overload renew_lease(request, options = nil) - # Pass arguments to `renew_lease` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload renew_lease(name: nil, schedule_time: nil, lease_duration: nil, response_view: nil) - # Pass arguments to `renew_lease` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @param schedule_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. The task's current schedule time, available in the - # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} response or - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#renew_lease RenewLease} response. - # This restriction is to ensure that your worker currently holds the lease. - # @param lease_duration [::Google::Protobuf::Duration, ::Hash] - # Required. The desired new lease duration, starting from now. - # - # - # The maximum lease duration is 1 week. - # `lease_duration` will be truncated to the nearest second. - # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2beta2::Task] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Task] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::RenewLeaseRequest.new - # - # # Call the renew_lease method. - # result = client.renew_lease request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. - # p result - # - def renew_lease request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.renew_lease.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.renew_lease.timeout, - metadata: metadata, - retry_policy: @config.rpcs.renew_lease.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :renew_lease, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Cancel a pull task's lease. - # - # The worker can use this method to cancel a task's lease by - # setting its {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} - # to now. This will make the task available to be leased to the next caller - # of {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks}. - # - # @overload cancel_lease(request, options = nil) - # Pass arguments to `cancel_lease` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lease(name: nil, schedule_time: nil, response_view: nil) - # Pass arguments to `cancel_lease` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @param schedule_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. The task's current schedule time, available in the - # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} response or - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#renew_lease RenewLease} response. - # This restriction is to ensure that your worker currently holds the lease. - # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2beta2::Task] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Task] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::CancelLeaseRequest.new - # - # # Call the cancel_lease method. - # result = client.cancel_lease request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. - # p result - # - def cancel_lease request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest - - # Converts hash and nil to 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_lease.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_lease.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_lease.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :cancel_lease, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Forces a task to run now. - # - # When this method is called, Cloud Tasks will dispatch the task, even if - # the task is already running, the queue has reached its - # {::Google::Cloud::Tasks::V2beta2::RateLimits RateLimits} or is - # {::Google::Cloud::Tasks::V2beta2::Queue::State::PAUSED PAUSED}. - # - # This command is meant to be used for manual debugging. For - # example, {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#run_task RunTask} can be - # used to retry a failed task after a fix has been made or to manually force - # a task to be dispatched now. - # - # The dispatched task is returned. That is, the task that is returned - # contains the {::Google::Cloud::Tasks::V2beta2::Task#status status} after the - # task is dispatched but before the task is received by its target. - # - # If Cloud Tasks receives a successful response from the task's - # target, then the task will be deleted; otherwise the task's - # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} will be - # reset to the time that - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#run_task RunTask} was called plus - # the retry delay specified in the queue's - # {::Google::Cloud::Tasks::V2beta2::RetryConfig RetryConfig}. - # - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#run_task RunTask} returns - # [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a - # task that has already succeeded or permanently failed. - # - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#run_task RunTask} cannot be called - # on a {::Google::Cloud::Tasks::V2beta2::PullMessage pull task}. - # - # @overload run_task(request, options = nil) - # Pass arguments to `run_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::RunTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::RunTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload run_task(name: nil, response_view: nil) - # Pass arguments to `run_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2beta2::Task] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Task] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::RunTaskRequest.new - # - # # Call the run_task method. - # result = client.run_task request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. - # p result - # - def run_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::RunTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.run_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.run_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.run_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :run_task, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CloudTasks API. - # - # This class represents the configuration for CloudTasks, - # 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::Tasks::V2beta2::CloudTasks::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_queues to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_queues.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_queues.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::Tasks::V2beta2::CloudTasks::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 = "cloudtasks.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 CloudTasks 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_queues` - # @return [::Gapic::Config::Method] - # - attr_reader :list_queues - ## - # RPC-specific configuration for `get_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :get_queue - ## - # RPC-specific configuration for `create_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :create_queue - ## - # RPC-specific configuration for `update_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :update_queue - ## - # RPC-specific configuration for `delete_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_queue - ## - # RPC-specific configuration for `purge_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :purge_queue - ## - # RPC-specific configuration for `pause_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :pause_queue - ## - # RPC-specific configuration for `resume_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :resume_queue - ## - # RPC-specific configuration for `upload_queue_yaml` - # @return [::Gapic::Config::Method] - # - attr_reader :upload_queue_yaml - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `list_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tasks - ## - # RPC-specific configuration for `get_task` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task - ## - # RPC-specific configuration for `create_task` - # @return [::Gapic::Config::Method] - # - attr_reader :create_task - ## - # RPC-specific configuration for `delete_task` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_task - ## - # RPC-specific configuration for `lease_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :lease_tasks - ## - # RPC-specific configuration for `acknowledge_task` - # @return [::Gapic::Config::Method] - # - attr_reader :acknowledge_task - ## - # RPC-specific configuration for `renew_lease` - # @return [::Gapic::Config::Method] - # - attr_reader :renew_lease - ## - # RPC-specific configuration for `cancel_lease` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_lease - ## - # RPC-specific configuration for `run_task` - # @return [::Gapic::Config::Method] - # - attr_reader :run_task - - # @private - def initialize parent_rpcs = nil - list_queues_config = parent_rpcs.list_queues if parent_rpcs.respond_to? :list_queues - @list_queues = ::Gapic::Config::Method.new list_queues_config - get_queue_config = parent_rpcs.get_queue if parent_rpcs.respond_to? :get_queue - @get_queue = ::Gapic::Config::Method.new get_queue_config - create_queue_config = parent_rpcs.create_queue if parent_rpcs.respond_to? :create_queue - @create_queue = ::Gapic::Config::Method.new create_queue_config - update_queue_config = parent_rpcs.update_queue if parent_rpcs.respond_to? :update_queue - @update_queue = ::Gapic::Config::Method.new update_queue_config - delete_queue_config = parent_rpcs.delete_queue if parent_rpcs.respond_to? :delete_queue - @delete_queue = ::Gapic::Config::Method.new delete_queue_config - purge_queue_config = parent_rpcs.purge_queue if parent_rpcs.respond_to? :purge_queue - @purge_queue = ::Gapic::Config::Method.new purge_queue_config - pause_queue_config = parent_rpcs.pause_queue if parent_rpcs.respond_to? :pause_queue - @pause_queue = ::Gapic::Config::Method.new pause_queue_config - resume_queue_config = parent_rpcs.resume_queue if parent_rpcs.respond_to? :resume_queue - @resume_queue = ::Gapic::Config::Method.new resume_queue_config - upload_queue_yaml_config = parent_rpcs.upload_queue_yaml if parent_rpcs.respond_to? :upload_queue_yaml - @upload_queue_yaml = ::Gapic::Config::Method.new upload_queue_yaml_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks - @list_tasks = ::Gapic::Config::Method.new list_tasks_config - get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task - @get_task = ::Gapic::Config::Method.new get_task_config - create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task - @create_task = ::Gapic::Config::Method.new create_task_config - delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task - @delete_task = ::Gapic::Config::Method.new delete_task_config - lease_tasks_config = parent_rpcs.lease_tasks if parent_rpcs.respond_to? :lease_tasks - @lease_tasks = ::Gapic::Config::Method.new lease_tasks_config - acknowledge_task_config = parent_rpcs.acknowledge_task if parent_rpcs.respond_to? :acknowledge_task - @acknowledge_task = ::Gapic::Config::Method.new acknowledge_task_config - renew_lease_config = parent_rpcs.renew_lease if parent_rpcs.respond_to? :renew_lease - @renew_lease = ::Gapic::Config::Method.new renew_lease_config - cancel_lease_config = parent_rpcs.cancel_lease if parent_rpcs.respond_to? :cancel_lease - @cancel_lease = ::Gapic::Config::Method.new cancel_lease_config - run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task - @run_task = ::Gapic::Config::Method.new run_task_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/credentials.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/credentials.rb deleted file mode 100644 index 6851ba771f0a..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/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 Tasks - module V2beta2 - module CloudTasks - # Credentials for the CloudTasks API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "TASKS_CREDENTIALS", - "TASKS_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "TASKS_CREDENTIALS_JSON", - "TASKS_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-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/paths.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/paths.rb deleted file mode 100644 index aa8084ac1821..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/paths.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 Tasks - module V2beta2 - module CloudTasks - # Path helper methods for the CloudTasks API. - module Paths - ## - # 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 Queue resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/queues/{queue}` - # - # @param project [String] - # @param location [String] - # @param queue [String] - # - # @return [::String] - def queue_path project:, location:, queue: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/queues/#{queue}" - end - - ## - # Create a fully-qualified Task resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/queues/{queue}/tasks/{task}` - # - # @param project [String] - # @param location [String] - # @param queue [String] - # @param task [String] - # - # @return [::String] - def task_path project:, location:, queue:, task: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "queue cannot contain /" if queue.to_s.include? "/" - - "projects/#{project}/locations/#{location}/queues/#{queue}/tasks/#{task}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/rest.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/rest.rb deleted file mode 100644 index 0813806ca563..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/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/tasks/v2beta2/version" -require "google/cloud/tasks/v2beta2/bindings_override" - -require "google/cloud/tasks/v2beta2/cloud_tasks/credentials" -require "google/cloud/tasks/v2beta2/cloud_tasks/paths" -require "google/cloud/tasks/v2beta2/cloud_tasks/rest/client" - -module Google - module Cloud - module Tasks - module V2beta2 - ## - # Cloud Tasks allows developers to manage the execution of background - # work in their applications. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/tasks/v2beta2/cloud_tasks/rest" - # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new - # - module CloudTasks - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/tasks/v2beta2/cloud_tasks/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/rest/client.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/rest/client.rb deleted file mode 100644 index 559c626e3aed..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/rest/client.rb +++ /dev/null @@ -1,2667 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/tasks/v2beta2/cloudtasks_pb" -require "google/cloud/tasks/v2beta2/cloud_tasks/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module Tasks - module V2beta2 - module CloudTasks - module Rest - ## - # REST client for the CloudTasks service. - # - # Cloud Tasks allows developers to manage the execution of background - # work in their applications. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudtasks.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_tasks_stub - - ## - # Configure the CloudTasks Client class. - # - # See {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudTasks clients - # ::Google::Cloud::Tasks::V2beta2::CloudTasks::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", "Tasks", "V2beta2"] - 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_queues.timeout = 20.0 - default_config.rpcs.list_queues.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_queue.timeout = 20.0 - default_config.rpcs.get_queue.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_queue.timeout = 20.0 - - default_config.rpcs.update_queue.timeout = 20.0 - - default_config.rpcs.delete_queue.timeout = 20.0 - default_config.rpcs.delete_queue.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.purge_queue.timeout = 20.0 - - default_config.rpcs.pause_queue.timeout = 20.0 - - default_config.rpcs.resume_queue.timeout = 20.0 - - default_config.rpcs.get_iam_policy.timeout = 20.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.set_iam_policy.timeout = 20.0 - - default_config.rpcs.test_iam_permissions.timeout = 20.0 - default_config.rpcs.test_iam_permissions.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_tasks.timeout = 20.0 - default_config.rpcs.list_tasks.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_task.timeout = 20.0 - default_config.rpcs.get_task.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_task.timeout = 20.0 - - default_config.rpcs.delete_task.timeout = 20.0 - default_config.rpcs.delete_task.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.lease_tasks.timeout = 20.0 - - default_config.rpcs.acknowledge_task.timeout = 20.0 - - default_config.rpcs.renew_lease.timeout = 20.0 - - default_config.rpcs.cancel_lease.timeout = 20.0 - - default_config.rpcs.run_task.timeout = 20.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudTasks 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::Tasks::V2beta2::CloudTasks::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_tasks_stub.universe_domain - end - - ## - # Create a new CloudTasks REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudTasks 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 - - @cloud_tasks_stub = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @cloud_tasks_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_tasks_stub.endpoint - config.universe_domain = @cloud_tasks_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @cloud_tasks_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 - @cloud_tasks_stub.logger - end - - # Service calls - - ## - # Lists queues. - # - # Queues are returned in lexicographical order. - # - # @overload list_queues(request, options = nil) - # Pass arguments to `list_queues` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::ListQueuesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::ListQueuesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_queues(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) - # Pass arguments to `list_queues` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 name. - # For example: `projects/PROJECT_ID/locations/LOCATION_ID` - # @param filter [::String] - # `filter` can be used to specify a subset of queues. Any - # {::Google::Cloud::Tasks::V2beta2::Queue Queue} field can be used as a filter and - # several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The - # filter syntax is the same as described in [Stackdriver's Advanced Logs - # Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - # - # Sample filter "app_engine_http_target: *". - # - # Note that using filters might cause fewer queues than the - # requested_page size to be returned. - # @param page_size [::Integer] - # Requested page size. - # - # The maximum page size is 9800. If unspecified, the page size will - # be the maximum. Fewer queues than requested might be returned, - # even if more queues exist; use the - # {::Google::Cloud::Tasks::V2beta2::ListQueuesResponse#next_page_token next_page_token} - # in the response to determine if more queues exist. - # @param page_token [::String] - # A token identifying the page of results to return. - # - # To request the first page results, page_token must be empty. To - # request the next page of results, page_token must be the value of - # {::Google::Cloud::Tasks::V2beta2::ListQueuesResponse#next_page_token next_page_token} - # returned from the previous call to - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#list_queues ListQueues} method. It - # is an error to switch the value of the - # {::Google::Cloud::Tasks::V2beta2::ListQueuesRequest#filter filter} while - # iterating through pages. - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Read mask is used for a more granular control over what the API - # returns. If the mask is not present all fields will be returned except - # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - # specified in the mask. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2beta2::Queue>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2beta2::Queue>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::ListQueuesRequest.new - # - # # Call the list_queues method. - # result = client.list_queues request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Tasks::V2beta2::Queue. - # p item - # end - # - def list_queues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::ListQueuesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_queues.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_queues.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_queues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.list_queues request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_tasks_stub, :list_queues, "queues", 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 queue. - # - # @overload get_queue(request, options = nil) - # Pass arguments to `get_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::GetQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::GetQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_queue(name: nil, read_mask: nil) - # Pass arguments to `get_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the queue. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Read mask is used for a more granular control over what the API - # returns. If the mask is not present all fields will be returned except - # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - # specified in the mask. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Queue] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::GetQueueRequest.new - # - # # Call the get_queue method. - # result = client.get_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. - # p result - # - def get_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::GetQueueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_queue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.get_queue request, 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 queue. - # - # Queues created with this method allow tasks to live for a maximum of 31 - # days. After a task is 31 days old, the task will be deleted regardless of - # whether it was dispatched or not. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - # - # @overload create_queue(request, options = nil) - # Pass arguments to `create_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::CreateQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::CreateQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_queue(parent: nil, queue: nil) - # Pass arguments to `create_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 name in which the queue will be created. - # For example: `projects/PROJECT_ID/locations/LOCATION_ID` - # - # The list of allowed locations can be obtained by calling Cloud - # Tasks' implementation of - # [ListLocations][google.cloud.location.Locations.ListLocations]. - # @param queue [::Google::Cloud::Tasks::V2beta2::Queue, ::Hash] - # Required. The queue to create. - # - # [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as - # an existing queue. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Queue] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::CreateQueueRequest.new - # - # # Call the create_queue method. - # result = client.create_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. - # p result - # - def create_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::CreateQueueRequest - - # Converts hash and nil to an 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_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_queue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.create_queue request, 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 queue. - # - # This method creates the queue if it does not exist and updates - # the queue if it does exist. - # - # Queues created with this method allow tasks to live for a maximum of 31 - # days. After a task is 31 days old, the task will be deleted regardless of - # whether it was dispatched or not. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - # - # @overload update_queue(request, options = nil) - # Pass arguments to `update_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_queue(queue: nil, update_mask: nil) - # Pass arguments to `update_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param queue [::Google::Cloud::Tasks::V2beta2::Queue, ::Hash] - # Required. The queue to create or update. - # - # The queue's {::Google::Cloud::Tasks::V2beta2::Queue#name name} must be - # specified. - # - # Output only fields cannot be modified using UpdateQueue. - # Any value specified for an output only field will be ignored. - # The queue's {::Google::Cloud::Tasks::V2beta2::Queue#name name} cannot be - # changed. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # A mask used to specify which fields of the queue are being updated. - # - # If empty, then all fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Queue] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::UpdateQueueRequest.new - # - # # Call the update_queue method. - # result = client.update_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. - # p result - # - def update_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest - - # Converts hash and nil to an 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_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_queue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.update_queue request, 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 queue. - # - # This command will delete the queue even if it has tasks in it. - # - # Note: If you delete a queue, a queue with the same name can't be created - # for 7 days. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - # - # @overload delete_queue(request, options = nil) - # Pass arguments to `delete_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_queue(name: nil) - # Pass arguments to `delete_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::DeleteQueueRequest.new - # - # # Call the delete_queue method. - # result = client.delete_queue request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest - - # Converts hash and nil to an 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_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_queue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.delete_queue request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Purges a queue by deleting all of its tasks. - # - # All tasks created before this method is called are permanently deleted. - # - # Purge operations can take up to one minute to take effect. Tasks - # might be dispatched before the purge takes effect. A purge is irreversible. - # - # @overload purge_queue(request, options = nil) - # Pass arguments to `purge_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload purge_queue(name: nil) - # Pass arguments to `purge_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Queue] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::PurgeQueueRequest.new - # - # # Call the purge_queue method. - # result = client.purge_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. - # p result - # - def purge_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.purge_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.purge_queue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.purge_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.purge_queue request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Pauses the queue. - # - # If a queue is paused then the system will stop dispatching tasks - # until the queue is resumed via - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#resume_queue ResumeQueue}. Tasks can - # still be added when the queue is paused. A queue is paused if its - # {::Google::Cloud::Tasks::V2beta2::Queue#state state} is - # {::Google::Cloud::Tasks::V2beta2::Queue::State::PAUSED PAUSED}. - # - # @overload pause_queue(request, options = nil) - # Pass arguments to `pause_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::PauseQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::PauseQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload pause_queue(name: nil) - # Pass arguments to `pause_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Queue] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::PauseQueueRequest.new - # - # # Call the pause_queue method. - # result = client.pause_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. - # p result - # - def pause_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::PauseQueueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.pause_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.pause_queue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.pause_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.pause_queue request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Resume a queue. - # - # This method resumes a queue after it has been - # {::Google::Cloud::Tasks::V2beta2::Queue::State::PAUSED PAUSED} or - # {::Google::Cloud::Tasks::V2beta2::Queue::State::DISABLED DISABLED}. The state of a - # queue is stored in the queue's - # {::Google::Cloud::Tasks::V2beta2::Queue#state state}; after calling this method - # it will be set to - # {::Google::Cloud::Tasks::V2beta2::Queue::State::RUNNING RUNNING}. - # - # WARNING: Resuming many high-QPS queues at the same time can - # lead to target overloading. If you are resuming high-QPS - # queues, follow the 500/50/5 pattern described in - # [Managing Cloud Tasks Scaling - # Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). - # - # @overload resume_queue(request, options = nil) - # Pass arguments to `resume_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload resume_queue(name: nil) - # Pass arguments to `resume_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Queue] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::ResumeQueueRequest.new - # - # # Call the resume_queue method. - # result = client.resume_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. - # p result - # - def resume_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.resume_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.resume_queue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.resume_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.resume_queue request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy for a - # {::Google::Cloud::Tasks::V2beta2::Queue Queue}. Returns an empty policy if the - # resource exists and does not have a policy set. - # - # Authorization requires the following - # [Google IAM](https://cloud.google.com/iam) permission on the specified - # resource parent: - # - # * `cloudtasks.queues.getIamPolicy` - # - # @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/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::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::Tasks::V2beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_tasks_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy for a - # {::Google::Cloud::Tasks::V2beta2::Queue Queue}. Replaces any existing policy. - # - # Note: The Cloud Console does not check queue-level IAM permissions yet. - # Project-level permissions are required to use the Cloud Console. - # - # Authorization requires the following - # [Google IAM](https://cloud.google.com/iam) permission on the specified - # resource parent: - # - # * `cloudtasks.queues.setIamPolicy` - # - # @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/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::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::Tasks::V2beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_tasks_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns permissions that a caller has on a - # {::Google::Cloud::Tasks::V2beta2::Queue Queue}. If the resource does not exist, - # this will return an empty set of permissions, not a - # [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. - # - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::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::Tasks::V2beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_tasks_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 - - ## - # Lists the tasks in a queue. - # - # By default, only the {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC} - # view is retrieved due to performance considerations; - # {::Google::Cloud::Tasks::V2beta2::ListTasksRequest#response_view response_view} - # controls the subset of information which is returned. - # - # The tasks may be returned in any order. The ordering may change at any - # time. - # - # @overload list_tasks(request, options = nil) - # Pass arguments to `list_tasks` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::ListTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::ListTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_tasks(parent: nil, response_view: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. - # @param page_size [::Integer] - # Maximum page size. - # - # Fewer tasks than requested might be returned, even if more tasks exist; use - # {::Google::Cloud::Tasks::V2beta2::ListTasksResponse#next_page_token next_page_token} - # in the response to determine if more tasks exist. - # - # The maximum page size is 1000. If unspecified, the page size will be the - # maximum. - # @param page_token [::String] - # A token identifying the page of results to return. - # - # To request the first page results, page_token must be empty. To - # request the next page of results, page_token must be the value of - # {::Google::Cloud::Tasks::V2beta2::ListTasksResponse#next_page_token next_page_token} - # returned from the previous call to - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#list_tasks ListTasks} method. - # - # The page token is valid for only 2 hours. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2beta2::Task>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2beta2::Task>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::ListTasksRequest.new - # - # # Call the list_tasks method. - # result = client.list_tasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Tasks::V2beta2::Task. - # p item - # end - # - def list_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::ListTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_tasks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.list_tasks request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_tasks_stub, :list_tasks, "tasks", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a task. - # - # @overload get_task(request, options = nil) - # Pass arguments to `get_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::GetTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::GetTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_task(name: nil, response_view: nil) - # Pass arguments to `get_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Task] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::GetTaskRequest.new - # - # # Call the get_task method. - # result = client.get_task request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. - # p result - # - def get_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::GetTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.get_task request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a task and adds it to a queue. - # - # Tasks cannot be updated after creation; there is no UpdateTask command. - # - # * For {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget App Engine queues}, - # the maximum task size is - # 100KB. - # * For {::Google::Cloud::Tasks::V2beta2::PullTarget pull queues}, the maximum - # task size is 1MB. - # - # @overload create_task(request, options = nil) - # Pass arguments to `create_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::CreateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::CreateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_task(parent: nil, task: nil, response_view: nil) - # Pass arguments to `create_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # - # The queue must already exist. - # @param task [::Google::Cloud::Tasks::V2beta2::Task, ::Hash] - # Required. The task to add. - # - # Task names have the following format: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - # The user can optionally specify a task - # {::Google::Cloud::Tasks::V2beta2::Task#name name}. If a name is not specified - # then the system will generate a random unique task id, which will be set in - # the task returned in the {::Google::Cloud::Tasks::V2beta2::Task#name response}. - # - # If {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} is not - # set or is in the past then Cloud Tasks will set it to the current time. - # - # Task De-duplication: - # - # Explicitly specifying a task ID enables task de-duplication. If - # a task's ID is identical to that of an existing task or a task - # that was deleted or completed recently then the call will fail - # with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. - # If the task's queue was created using Cloud Tasks, then another task with - # the same name can't be created for ~1 hour after the original task was - # deleted or completed. If the task's queue was created using queue.yaml or - # queue.xml, then another task with the same name can't be created - # for ~9 days after the original task was deleted or completed. - # - # Because there is an extra lookup cost to identify duplicate task - # names, these {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#create_task CreateTask} - # calls have significantly increased latency. Using hashed strings for the - # task id or for the prefix of the task id is recommended. Choosing task ids - # that are sequential or have sequential prefixes, for example using a - # timestamp, causes an increase in latency and error rates in all - # task commands. The infrastructure relies on an approximately - # uniform distribution of task ids to store and serve tasks - # efficiently. - # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Task] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::CreateTaskRequest.new - # - # # Call the create_task method. - # result = client.create_task request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. - # p result - # - def create_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::CreateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.create_task request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a task. - # - # A task can be deleted if it is scheduled or dispatched. A task - # cannot be deleted if it has completed successfully or permanently - # failed. - # - # @overload delete_task(request, options = nil) - # Pass arguments to `delete_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_task(name: nil) - # Pass arguments to `delete_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::DeleteTaskRequest.new - # - # # Call the delete_task method. - # result = client.delete_task request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.delete_task request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Leases tasks from a pull queue for - # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#lease_duration lease_duration}. - # - # This method is invoked by the worker to obtain a lease. The - # worker must acknowledge the task via - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#acknowledge_task AcknowledgeTask} - # after they have performed the work associated with the task. - # - # The {::Google::Cloud::Tasks::V2beta2::PullMessage#payload payload} is intended - # to store data that the worker needs to perform the work associated with the - # task. To return the payloads in the - # {::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse response}, set - # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#response_view response_view} - # to {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL}. - # - # A maximum of 10 qps of - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#lease_tasks LeaseTasks} requests are - # allowed per queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] - # is returned when this limit is - # exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] - # is also returned when - # {::Google::Cloud::Tasks::V2beta2::RateLimits#max_tasks_dispatched_per_second max_tasks_dispatched_per_second} - # is exceeded. - # - # @overload lease_tasks(request, options = nil) - # Pass arguments to `lease_tasks` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload lease_tasks(parent: nil, max_tasks: nil, lease_duration: nil, response_view: nil, filter: nil) - # Pass arguments to `lease_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # @param max_tasks [::Integer] - # The maximum number of tasks to lease. - # - # The system will make a best effort to return as close to as - # `max_tasks` as possible. - # - # The largest that `max_tasks` can be is 1000. - # - # The maximum total size of a [lease tasks - # response][google.cloud.tasks.v2beta2.LeaseTasksResponse] is 32 MB. If the - # sum of all task sizes requested reaches this limit, fewer tasks than - # requested are returned. - # @param lease_duration [::Google::Protobuf::Duration, ::Hash] - # Required. The duration of the lease. - # - # Each task returned in the - # {::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse response} will have its - # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} set to the - # current time plus the `lease_duration`. The task is leased until its - # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}; thus, the - # task will not be returned to another - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#lease_tasks LeaseTasks} call before - # its {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}. - # - # - # After the worker has successfully finished the work associated - # with the task, the worker must call via - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#acknowledge_task AcknowledgeTask} - # before the {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}. - # Otherwise the task will be returned to a later - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#lease_tasks LeaseTasks} call so that - # another worker can retry it. - # - # The maximum lease duration is 1 week. - # `lease_duration` will be truncated to the nearest second. - # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. - # @param filter [::String] - # `filter` can be used to specify a subset of tasks to lease. - # - # When `filter` is set to `tag=` then the - # {::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse response} will contain only - # tasks whose {::Google::Cloud::Tasks::V2beta2::PullMessage#tag tag} is equal to - # ``. `` must be less than 500 characters. - # - # When `filter` is set to `tag_function=oldest_tag()`, only tasks which have - # the same tag as the task with the oldest - # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} will be - # returned. - # - # Grammar Syntax: - # - # * `filter = "tag=" tag | "tag_function=" function` - # - # * `tag = string` - # - # * `function = "oldest_tag()"` - # - # The `oldest_tag()` function returns tasks which have the same tag as the - # oldest task (ordered by schedule time). - # - # SDK compatibility: Although the SDK allows tags to be either - # string or - # [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), - # only UTF-8 encoded tags can be used in Cloud Tasks. Tag which - # aren't UTF-8 encoded can't be used in the - # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#filter filter} and the - # task's {::Google::Cloud::Tasks::V2beta2::PullMessage#tag tag} will be displayed - # as empty in Cloud Tasks. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::LeaseTasksRequest.new - # - # # Call the lease_tasks method. - # result = client.lease_tasks request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta2::LeaseTasksResponse. - # p result - # - def lease_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.lease_tasks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.lease_tasks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.lease_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.lease_tasks request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Acknowledges a pull task. - # - # The worker, that is, the entity that - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#lease_tasks leased} this task must - # call this method to indicate that the work associated with the task has - # finished. - # - # The worker must acknowledge a task within the - # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#lease_duration lease_duration} - # or the lease will expire and the task will become available to be leased - # again. After the task is acknowledged, it will not be returned - # by a later {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#lease_tasks LeaseTasks}, - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#get_task GetTask}, or - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#list_tasks ListTasks}. - # - # @overload acknowledge_task(request, options = nil) - # Pass arguments to `acknowledge_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload acknowledge_task(name: nil, schedule_time: nil) - # Pass arguments to `acknowledge_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @param schedule_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. The task's current schedule time, available in the - # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#lease_tasks LeaseTasks} response or - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#renew_lease RenewLease} response. - # This restriction is to ensure that your worker currently holds the lease. - # @yield [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/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest.new - # - # # Call the acknowledge_task method. - # result = client.acknowledge_task request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def acknowledge_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.acknowledge_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.acknowledge_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.acknowledge_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.acknowledge_task request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Renew the current lease of a pull task. - # - # The worker can use this method to extend the lease by a new - # duration, starting from now. The new task lease will be - # returned in the task's - # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}. - # - # @overload renew_lease(request, options = nil) - # Pass arguments to `renew_lease` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload renew_lease(name: nil, schedule_time: nil, lease_duration: nil, response_view: nil) - # Pass arguments to `renew_lease` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @param schedule_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. The task's current schedule time, available in the - # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#lease_tasks LeaseTasks} response or - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#renew_lease RenewLease} response. - # This restriction is to ensure that your worker currently holds the lease. - # @param lease_duration [::Google::Protobuf::Duration, ::Hash] - # Required. The desired new lease duration, starting from now. - # - # - # The maximum lease duration is 1 week. - # `lease_duration` will be truncated to the nearest second. - # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Task] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::RenewLeaseRequest.new - # - # # Call the renew_lease method. - # result = client.renew_lease request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. - # p result - # - def renew_lease request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.renew_lease.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.renew_lease.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.renew_lease.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.renew_lease request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Cancel a pull task's lease. - # - # The worker can use this method to cancel a task's lease by - # setting its {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} - # to now. This will make the task available to be leased to the next caller - # of {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#lease_tasks LeaseTasks}. - # - # @overload cancel_lease(request, options = nil) - # Pass arguments to `cancel_lease` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lease(name: nil, schedule_time: nil, response_view: nil) - # Pass arguments to `cancel_lease` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @param schedule_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. The task's current schedule time, available in the - # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#lease_tasks LeaseTasks} response or - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#renew_lease RenewLease} response. - # This restriction is to ensure that your worker currently holds the lease. - # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Task] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::CancelLeaseRequest.new - # - # # Call the cancel_lease method. - # result = client.cancel_lease request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. - # p result - # - def cancel_lease request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest - - # Converts hash and nil to an 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_lease.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_lease.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_lease.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.cancel_lease request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Forces a task to run now. - # - # When this method is called, Cloud Tasks will dispatch the task, even if - # the task is already running, the queue has reached its - # {::Google::Cloud::Tasks::V2beta2::RateLimits RateLimits} or is - # {::Google::Cloud::Tasks::V2beta2::Queue::State::PAUSED PAUSED}. - # - # This command is meant to be used for manual debugging. For - # example, {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#run_task RunTask} can be - # used to retry a failed task after a fix has been made or to manually force - # a task to be dispatched now. - # - # The dispatched task is returned. That is, the task that is returned - # contains the {::Google::Cloud::Tasks::V2beta2::Task#status status} after the - # task is dispatched but before the task is received by its target. - # - # If Cloud Tasks receives a successful response from the task's - # target, then the task will be deleted; otherwise the task's - # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} will be - # reset to the time that - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#run_task RunTask} was called plus - # the retry delay specified in the queue's - # {::Google::Cloud::Tasks::V2beta2::RetryConfig RetryConfig}. - # - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#run_task RunTask} returns - # [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a - # task that has already succeeded or permanently failed. - # - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client#run_task RunTask} cannot be called - # on a {::Google::Cloud::Tasks::V2beta2::PullMessage pull task}. - # - # @overload run_task(request, options = nil) - # Pass arguments to `run_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta2::RunTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta2::RunTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload run_task(name: nil, response_view: nil) - # Pass arguments to `run_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @param response_view [::Google::Cloud::Tasks::V2beta2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Task] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta2::RunTaskRequest.new - # - # # Call the run_task method. - # result = client.run_task request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. - # p result - # - def run_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta2::RunTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.run_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.run_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.run_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.run_task request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CloudTasks REST API. - # - # This class represents the configuration for CloudTasks 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::Tasks::V2beta2::CloudTasks::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_queues to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_queues.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_queues.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 = "cloudtasks.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 CloudTasks 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_queues` - # @return [::Gapic::Config::Method] - # - attr_reader :list_queues - ## - # RPC-specific configuration for `get_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :get_queue - ## - # RPC-specific configuration for `create_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :create_queue - ## - # RPC-specific configuration for `update_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :update_queue - ## - # RPC-specific configuration for `delete_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_queue - ## - # RPC-specific configuration for `purge_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :purge_queue - ## - # RPC-specific configuration for `pause_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :pause_queue - ## - # RPC-specific configuration for `resume_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :resume_queue - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `list_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tasks - ## - # RPC-specific configuration for `get_task` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task - ## - # RPC-specific configuration for `create_task` - # @return [::Gapic::Config::Method] - # - attr_reader :create_task - ## - # RPC-specific configuration for `delete_task` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_task - ## - # RPC-specific configuration for `lease_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :lease_tasks - ## - # RPC-specific configuration for `acknowledge_task` - # @return [::Gapic::Config::Method] - # - attr_reader :acknowledge_task - ## - # RPC-specific configuration for `renew_lease` - # @return [::Gapic::Config::Method] - # - attr_reader :renew_lease - ## - # RPC-specific configuration for `cancel_lease` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_lease - ## - # RPC-specific configuration for `run_task` - # @return [::Gapic::Config::Method] - # - attr_reader :run_task - - # @private - def initialize parent_rpcs = nil - list_queues_config = parent_rpcs.list_queues if parent_rpcs.respond_to? :list_queues - @list_queues = ::Gapic::Config::Method.new list_queues_config - get_queue_config = parent_rpcs.get_queue if parent_rpcs.respond_to? :get_queue - @get_queue = ::Gapic::Config::Method.new get_queue_config - create_queue_config = parent_rpcs.create_queue if parent_rpcs.respond_to? :create_queue - @create_queue = ::Gapic::Config::Method.new create_queue_config - update_queue_config = parent_rpcs.update_queue if parent_rpcs.respond_to? :update_queue - @update_queue = ::Gapic::Config::Method.new update_queue_config - delete_queue_config = parent_rpcs.delete_queue if parent_rpcs.respond_to? :delete_queue - @delete_queue = ::Gapic::Config::Method.new delete_queue_config - purge_queue_config = parent_rpcs.purge_queue if parent_rpcs.respond_to? :purge_queue - @purge_queue = ::Gapic::Config::Method.new purge_queue_config - pause_queue_config = parent_rpcs.pause_queue if parent_rpcs.respond_to? :pause_queue - @pause_queue = ::Gapic::Config::Method.new pause_queue_config - resume_queue_config = parent_rpcs.resume_queue if parent_rpcs.respond_to? :resume_queue - @resume_queue = ::Gapic::Config::Method.new resume_queue_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks - @list_tasks = ::Gapic::Config::Method.new list_tasks_config - get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task - @get_task = ::Gapic::Config::Method.new get_task_config - create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task - @create_task = ::Gapic::Config::Method.new create_task_config - delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task - @delete_task = ::Gapic::Config::Method.new delete_task_config - lease_tasks_config = parent_rpcs.lease_tasks if parent_rpcs.respond_to? :lease_tasks - @lease_tasks = ::Gapic::Config::Method.new lease_tasks_config - acknowledge_task_config = parent_rpcs.acknowledge_task if parent_rpcs.respond_to? :acknowledge_task - @acknowledge_task = ::Gapic::Config::Method.new acknowledge_task_config - renew_lease_config = parent_rpcs.renew_lease if parent_rpcs.respond_to? :renew_lease - @renew_lease = ::Gapic::Config::Method.new renew_lease_config - cancel_lease_config = parent_rpcs.cancel_lease if parent_rpcs.respond_to? :cancel_lease - @cancel_lease = ::Gapic::Config::Method.new cancel_lease_config - run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task - @run_task = ::Gapic::Config::Method.new run_task_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/rest/service_stub.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/rest/service_stub.rb deleted file mode 100644 index f7a7c052bb3f..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloud_tasks/rest/service_stub.rb +++ /dev/null @@ -1,1315 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/tasks/v2beta2/cloudtasks_pb" - -module Google - module Cloud - module Tasks - module V2beta2 - module CloudTasks - module Rest - ## - # REST service stub for the CloudTasks 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_queues REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::ListQueuesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::ListQueuesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::ListQueuesResponse] - # A result object deserialized from the server's reply - def list_queues request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_queues_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_queues", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2beta2::ListQueuesResponse.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_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::GetQueueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Queue] - # A result object deserialized from the server's reply - def get_queue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_queue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_queue", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2beta2::Queue.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_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::CreateQueueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Queue] - # A result object deserialized from the server's reply - def create_queue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_queue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_queue", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2beta2::Queue.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_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Queue] - # A result object deserialized from the server's reply - def update_queue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_queue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_queue", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2beta2::Queue.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_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_queue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_queue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_queue", - 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 purge_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Queue] - # A result object deserialized from the server's reply - def purge_queue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_purge_queue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "purge_queue", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2beta2::Queue.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the pause_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::PauseQueueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Queue] - # A result object deserialized from the server's reply - def pause_queue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_pause_queue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "pause_queue", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2beta2::Queue.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the resume_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Queue] - # A result object deserialized from the server's reply - def resume_queue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_resume_queue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "resume_queue", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2beta2::Queue.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_tasks REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::ListTasksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::ListTasksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::ListTasksResponse] - # A result object deserialized from the server's reply - def list_tasks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_tasks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_tasks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2beta2::ListTasksResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::GetTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Task] - # A result object deserialized from the server's reply - def get_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2beta2::Task.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::CreateTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Task] - # A result object deserialized from the server's reply - def create_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2beta2::Task.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::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 lease_tasks REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse] - # A result object deserialized from the server's reply - def lease_tasks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_lease_tasks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "lease_tasks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the acknowledge_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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 acknowledge_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_acknowledge_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "acknowledge_task", - 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 renew_lease REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Task] - # A result object deserialized from the server's reply - def renew_lease request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_renew_lease_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "renew_lease", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2beta2::Task.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_lease REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Task] - # A result object deserialized from the server's reply - def cancel_lease request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_cancel_lease_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_lease", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2beta2::Task.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the run_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::RunTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta2::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta2::Task] - # A result object deserialized from the server's reply - def run_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_run_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "run_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2beta2::Task.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_queues REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::ListQueuesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_queues_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2beta2/{parent}/queues", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::GetQueueRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_queue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::CreateQueueRequest] - # 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_queue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2beta2/{parent}/queues", - body: "queue", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest] - # 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_queue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2beta2/{queue.name}", - body: "queue", - matches: [ - ["queue.name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest] - # 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_queue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the purge_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_purge_queue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2beta2/{name}:purge", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the pause_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::PauseQueueRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_pause_queue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2beta2/{name}:pause", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the resume_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_resume_queue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2beta2/{name}:resume", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, 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: :post, - uri_template: "/v2beta2/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, 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: "/v2beta2/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, 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: "/v2beta2/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_tasks REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::ListTasksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_tasks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2beta2/{parent}/tasks", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::GetTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::CreateTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2beta2/{parent}/tasks", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the lease_tasks REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_lease_tasks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2beta2/{parent}/tasks:lease", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the acknowledge_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_acknowledge_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2beta2/{name}:acknowledge", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the renew_lease REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_renew_lease_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2beta2/{name}:renewLease", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_lease REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest] - # 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_lease_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2beta2/{name}:cancelLease", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the run_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta2::RunTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_run_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2beta2/{name}:run", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloudtasks_pb.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloudtasks_pb.rb deleted file mode 100644 index eaa41069c36a..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloudtasks_pb.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/tasks/v2beta2/cloudtasks.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/httpbody_pb' -require 'google/api/resource_pb' -require 'google/cloud/tasks/v2beta2/queue_pb' -require 'google/cloud/tasks/v2beta2/task_pb' -require 'google/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_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/tasks/v2beta2/cloudtasks.proto\x12\x1agoogle.cloud.tasks.v2beta2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/httpbody.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/tasks/v2beta2/queue.proto\x1a%google/cloud/tasks/v2beta2/task.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb7\x01\n\x11ListQueuesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudtasks.googleapis.com/Queue\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\x12\x32\n\tread_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"`\n\x12ListQueuesResponse\x12\x31\n\x06queues\x18\x01 \x03(\x0b\x32!.google.cloud.tasks.v2beta2.Queue\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"|\n\x0fGetQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\x12\x32\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x84\x01\n\x12\x43reateQueueRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudtasks.googleapis.com/Queue\x12\x35\n\x05queue\x18\x02 \x01(\x0b\x32!.google.cloud.tasks.v2beta2.QueueB\x03\xe0\x41\x02\"|\n\x12UpdateQueueRequest\x12\x35\n\x05queue\x18\x01 \x01(\x0b\x32!.google.cloud.tasks.v2beta2.QueueB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"K\n\x12\x44\x65leteQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"J\n\x11PurgeQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"J\n\x11PauseQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"K\n\x12ResumeQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"i\n\x16UploadQueueYamlRequest\x12\x13\n\x06\x61pp_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12,\n\thttp_body\x18\x02 \x01(\x0b\x32\x14.google.api.HttpBodyH\x00\x88\x01\x01\x42\x0c\n\n_http_body\"\xaf\x01\n\x10ListTasksRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x63loudtasks.googleapis.com/Task\x12<\n\rresponse_view\x18\x02 \x01(\x0e\x32%.google.cloud.tasks.v2beta2.Task.View\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x05 \x01(\t\"]\n\x11ListTasksResponse\x12/\n\x05tasks\x18\x01 \x03(\x0b\x32 .google.cloud.tasks.v2beta2.Task\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x84\x01\n\x0eGetTaskRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudtasks.googleapis.com/Task\x12<\n\rresponse_view\x18\x02 \x01(\x0e\x32%.google.cloud.tasks.v2beta2.Task.View\"\xbe\x01\n\x11\x43reateTaskRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x63loudtasks.googleapis.com/Task\x12\x33\n\x04task\x18\x02 \x01(\x0b\x32 .google.cloud.tasks.v2beta2.TaskB\x03\xe0\x41\x02\x12<\n\rresponse_view\x18\x03 \x01(\x0e\x32%.google.cloud.tasks.v2beta2.Task.View\"I\n\x11\x44\x65leteTaskRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudtasks.googleapis.com/Task\"\xe4\x01\n\x11LeaseTasksRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x63loudtasks.googleapis.com/Task\x12\x11\n\tmax_tasks\x18\x02 \x01(\x05\x12\x36\n\x0elease_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12<\n\rresponse_view\x18\x04 \x01(\x0e\x32%.google.cloud.tasks.v2beta2.Task.View\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"E\n\x12LeaseTasksResponse\x12/\n\x05tasks\x18\x01 \x03(\x0b\x32 .google.cloud.tasks.v2beta2.Task\"\x86\x01\n\x16\x41\x63knowledgeTaskRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudtasks.googleapis.com/Task\x12\x36\n\rschedule_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"\xf7\x01\n\x11RenewLeaseRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudtasks.googleapis.com/Task\x12\x36\n\rschedule_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x36\n\x0elease_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12<\n\rresponse_view\x18\x04 \x01(\x0e\x32%.google.cloud.tasks.v2beta2.Task.View\"\xc0\x01\n\x12\x43\x61ncelLeaseRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudtasks.googleapis.com/Task\x12\x36\n\rschedule_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12<\n\rresponse_view\x18\x03 \x01(\x0e\x32%.google.cloud.tasks.v2beta2.Task.View\"\x84\x01\n\x0eRunTaskRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudtasks.googleapis.com/Task\x12<\n\rresponse_view\x18\x02 \x01(\x0e\x32%.google.cloud.tasks.v2beta2.Task.View2\xb5\x1d\n\nCloudTasks\x12\xad\x01\n\nListQueues\x12-.google.cloud.tasks.v2beta2.ListQueuesRequest\x1a..google.cloud.tasks.v2beta2.ListQueuesResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v2beta2/{parent=projects/*/locations/*}/queues\x12\x9a\x01\n\x08GetQueue\x12+.google.cloud.tasks.v2beta2.GetQueueRequest\x1a!.google.cloud.tasks.v2beta2.Queue\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v2beta2/{name=projects/*/locations/*/queues/*}\x12\xaf\x01\n\x0b\x43reateQueue\x12..google.cloud.tasks.v2beta2.CreateQueueRequest\x1a!.google.cloud.tasks.v2beta2.Queue\"M\xda\x41\x0cparent,queue\x82\xd3\xe4\x93\x02\x38\"//v2beta2/{parent=projects/*/locations/*}/queues:\x05queue\x12\xba\x01\n\x0bUpdateQueue\x12..google.cloud.tasks.v2beta2.UpdateQueueRequest\x1a!.google.cloud.tasks.v2beta2.Queue\"X\xda\x41\x11queue,update_mask\x82\xd3\xe4\x93\x02>25/v2beta2/{queue.name=projects/*/locations/*/queues/*}:\x05queue\x12\x95\x01\n\x0b\x44\x65leteQueue\x12..google.cloud.tasks.v2beta2.DeleteQueueRequest\x1a\x16.google.protobuf.Empty\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v2beta2/{name=projects/*/locations/*/queues/*}\x12\xa7\x01\n\nPurgeQueue\x12-.google.cloud.tasks.v2beta2.PurgeQueueRequest\x1a!.google.cloud.tasks.v2beta2.Queue\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/v2beta2/{name=projects/*/locations/*/queues/*}:purge:\x01*\x12\xa7\x01\n\nPauseQueue\x12-.google.cloud.tasks.v2beta2.PauseQueueRequest\x1a!.google.cloud.tasks.v2beta2.Queue\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/v2beta2/{name=projects/*/locations/*/queues/*}:pause:\x01*\x12\xaa\x01\n\x0bResumeQueue\x12..google.cloud.tasks.v2beta2.ResumeQueueRequest\x1a!.google.cloud.tasks.v2beta2.Queue\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\"6/v2beta2/{name=projects/*/locations/*/queues/*}:resume:\x01*\x12_\n\x0fUploadQueueYaml\x12\x32.google.cloud.tasks.v2beta2.UploadQueueYamlRequest\x1a\x16.google.protobuf.Empty\"\x00\x12\xa1\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"V\xda\x41\x08resource\x82\xd3\xe4\x93\x02\x45\"@/v2beta2/{resource=projects/*/locations/*/queues/*}:getIamPolicy:\x01*\x12\xa8\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"]\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02\x45\"@/v2beta2/{resource=projects/*/locations/*/queues/*}:setIamPolicy:\x01*\x12\xd3\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"h\xda\x41\x14resource,permissions\x82\xd3\xe4\x93\x02K\"F/v2beta2/{resource=projects/*/locations/*/queues/*}:testIamPermissions:\x01*\x12\xb2\x01\n\tListTasks\x12,.google.cloud.tasks.v2beta2.ListTasksRequest\x1a-.google.cloud.tasks.v2beta2.ListTasksResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v2beta2/{parent=projects/*/locations/*/queues/*}/tasks\x12\x9f\x01\n\x07GetTask\x12*.google.cloud.tasks.v2beta2.GetTaskRequest\x1a .google.cloud.tasks.v2beta2.Task\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}\x12\xaf\x01\n\nCreateTask\x12-.google.cloud.tasks.v2beta2.CreateTaskRequest\x1a .google.cloud.tasks.v2beta2.Task\"P\xda\x41\x0bparent,task\x82\xd3\xe4\x93\x02<\"7/v2beta2/{parent=projects/*/locations/*/queues/*}/tasks:\x01*\x12\x9b\x01\n\nDeleteTask\x12-.google.cloud.tasks.v2beta2.DeleteTaskRequest\x1a\x16.google.protobuf.Empty\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}\x12\xcd\x01\n\nLeaseTasks\x12-.google.cloud.tasks.v2beta2.LeaseTasksRequest\x1a..google.cloud.tasks.v2beta2.LeaseTasksResponse\"`\xda\x41\x15parent,lease_duration\x82\xd3\xe4\x93\x02\x42\"=/v2beta2/{parent=projects/*/locations/*/queues/*}/tasks:lease:\x01*\x12\xc2\x01\n\x0f\x41\x63knowledgeTask\x12\x32.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest\x1a\x16.google.protobuf.Empty\"c\xda\x41\x12name,schedule_time\x82\xd3\xe4\x93\x02H\"C/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:acknowledge:\x01*\x12\xd0\x01\n\nRenewLease\x12-.google.cloud.tasks.v2beta2.RenewLeaseRequest\x1a .google.cloud.tasks.v2beta2.Task\"q\xda\x41!name,schedule_time,lease_duration\x82\xd3\xe4\x93\x02G\"B/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:renewLease:\x01*\x12\xc4\x01\n\x0b\x43\x61ncelLease\x12..google.cloud.tasks.v2beta2.CancelLeaseRequest\x1a .google.cloud.tasks.v2beta2.Task\"c\xda\x41\x12name,schedule_time\x82\xd3\xe4\x93\x02H\"C/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:cancelLease:\x01*\x12\xa6\x01\n\x07RunTask\x12*.google.cloud.tasks.v2beta2.RunTaskRequest\x1a .google.cloud.tasks.v2beta2.Task\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\";/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:run:\x01*\x1aM\xca\x41\x19\x63loudtasks.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd0\x01\n\x1e\x63om.google.cloud.tasks.v2beta2B\x0f\x43loudTasksProtoP\x01ZCcloud.google.com/go/cloudtasks/apiv2beta2/cloudtaskspb;cloudtaskspb\xa2\x02\x05TASKS\xea\x41M\n\"cloudtasks.googleapis.com/Location\x12\'projects/{project}/locations/{location}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Tasks - module V2beta2 - ListQueuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.ListQueuesRequest").msgclass - ListQueuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.ListQueuesResponse").msgclass - GetQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.GetQueueRequest").msgclass - CreateQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.CreateQueueRequest").msgclass - UpdateQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.UpdateQueueRequest").msgclass - DeleteQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.DeleteQueueRequest").msgclass - PurgeQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.PurgeQueueRequest").msgclass - PauseQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.PauseQueueRequest").msgclass - ResumeQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.ResumeQueueRequest").msgclass - UploadQueueYamlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.UploadQueueYamlRequest").msgclass - ListTasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.ListTasksRequest").msgclass - ListTasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.ListTasksResponse").msgclass - GetTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.GetTaskRequest").msgclass - CreateTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.CreateTaskRequest").msgclass - DeleteTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.DeleteTaskRequest").msgclass - LeaseTasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.LeaseTasksRequest").msgclass - LeaseTasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.LeaseTasksResponse").msgclass - AcknowledgeTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.AcknowledgeTaskRequest").msgclass - RenewLeaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.RenewLeaseRequest").msgclass - CancelLeaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.CancelLeaseRequest").msgclass - RunTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.RunTaskRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloudtasks_services_pb.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloudtasks_services_pb.rb deleted file mode 100644 index a80defa38d7a..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/cloudtasks_services_pb.rb +++ /dev/null @@ -1,274 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/tasks/v2beta2/cloudtasks.proto for package 'google.cloud.tasks.v2beta2' -# 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/tasks/v2beta2/cloudtasks_pb' - -module Google - module Cloud - module Tasks - module V2beta2 - module CloudTasks - # Cloud Tasks allows developers to manage the execution of background - # work in their applications. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.tasks.v2beta2.CloudTasks' - - # Lists queues. - # - # Queues are returned in lexicographical order. - rpc :ListQueues, ::Google::Cloud::Tasks::V2beta2::ListQueuesRequest, ::Google::Cloud::Tasks::V2beta2::ListQueuesResponse - # Gets a queue. - rpc :GetQueue, ::Google::Cloud::Tasks::V2beta2::GetQueueRequest, ::Google::Cloud::Tasks::V2beta2::Queue - # Creates a queue. - # - # Queues created with this method allow tasks to live for a maximum of 31 - # days. After a task is 31 days old, the task will be deleted regardless of - # whether it was dispatched or not. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - rpc :CreateQueue, ::Google::Cloud::Tasks::V2beta2::CreateQueueRequest, ::Google::Cloud::Tasks::V2beta2::Queue - # Updates a queue. - # - # This method creates the queue if it does not exist and updates - # the queue if it does exist. - # - # Queues created with this method allow tasks to live for a maximum of 31 - # days. After a task is 31 days old, the task will be deleted regardless of - # whether it was dispatched or not. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - rpc :UpdateQueue, ::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest, ::Google::Cloud::Tasks::V2beta2::Queue - # Deletes a queue. - # - # This command will delete the queue even if it has tasks in it. - # - # Note: If you delete a queue, a queue with the same name can't be created - # for 7 days. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - rpc :DeleteQueue, ::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest, ::Google::Protobuf::Empty - # Purges a queue by deleting all of its tasks. - # - # All tasks created before this method is called are permanently deleted. - # - # Purge operations can take up to one minute to take effect. Tasks - # might be dispatched before the purge takes effect. A purge is irreversible. - rpc :PurgeQueue, ::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest, ::Google::Cloud::Tasks::V2beta2::Queue - # Pauses the queue. - # - # If a queue is paused then the system will stop dispatching tasks - # until the queue is resumed via - # [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can - # still be added when the queue is paused. A queue is paused if its - # [state][google.cloud.tasks.v2beta2.Queue.state] is - # [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. - rpc :PauseQueue, ::Google::Cloud::Tasks::V2beta2::PauseQueueRequest, ::Google::Cloud::Tasks::V2beta2::Queue - # Resume a queue. - # - # This method resumes a queue after it has been - # [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED] or - # [DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a - # queue is stored in the queue's - # [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method - # it will be set to - # [RUNNING][google.cloud.tasks.v2beta2.Queue.State.RUNNING]. - # - # WARNING: Resuming many high-QPS queues at the same time can - # lead to target overloading. If you are resuming high-QPS - # queues, follow the 500/50/5 pattern described in - # [Managing Cloud Tasks Scaling - # Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). - rpc :ResumeQueue, ::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest, ::Google::Cloud::Tasks::V2beta2::Queue - # Update queue list by uploading a queue.yaml file. - # - # The queue.yaml file is supplied in the request body as a YAML encoded - # string. This method was added to support gcloud clients versions before - # 322.0.0. New clients should use CreateQueue instead of this method. - rpc :UploadQueueYaml, ::Google::Cloud::Tasks::V2beta2::UploadQueueYamlRequest, ::Google::Protobuf::Empty - # Gets the access control policy for a - # [Queue][google.cloud.tasks.v2beta2.Queue]. Returns an empty policy if the - # resource exists and does not have a policy set. - # - # Authorization requires the following - # [Google IAM](https://cloud.google.com/iam) permission on the specified - # resource parent: - # - # * `cloudtasks.queues.getIamPolicy` - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Sets the access control policy for a - # [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any existing policy. - # - # Note: The Cloud Console does not check queue-level IAM permissions yet. - # Project-level permissions are required to use the Cloud Console. - # - # Authorization requires the following - # [Google IAM](https://cloud.google.com/iam) permission on the specified - # resource parent: - # - # * `cloudtasks.queues.setIamPolicy` - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Returns permissions that a caller has on a - # [Queue][google.cloud.tasks.v2beta2.Queue]. If the resource does not exist, - # this will return an empty set of permissions, not a - # [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. - # - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - # Lists the tasks in a queue. - # - # By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] - # view is retrieved due to performance considerations; - # [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] - # controls the subset of information which is returned. - # - # The tasks may be returned in any order. The ordering may change at any - # time. - rpc :ListTasks, ::Google::Cloud::Tasks::V2beta2::ListTasksRequest, ::Google::Cloud::Tasks::V2beta2::ListTasksResponse - # Gets a task. - rpc :GetTask, ::Google::Cloud::Tasks::V2beta2::GetTaskRequest, ::Google::Cloud::Tasks::V2beta2::Task - # Creates a task and adds it to a queue. - # - # Tasks cannot be updated after creation; there is no UpdateTask command. - # - # * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], - # the maximum task size is - # 100KB. - # * For [pull queues][google.cloud.tasks.v2beta2.PullTarget], the maximum - # task size is 1MB. - rpc :CreateTask, ::Google::Cloud::Tasks::V2beta2::CreateTaskRequest, ::Google::Cloud::Tasks::V2beta2::Task - # Deletes a task. - # - # A task can be deleted if it is scheduled or dispatched. A task - # cannot be deleted if it has completed successfully or permanently - # failed. - rpc :DeleteTask, ::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest, ::Google::Protobuf::Empty - # Leases tasks from a pull queue for - # [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. - # - # This method is invoked by the worker to obtain a lease. The - # worker must acknowledge the task via - # [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] - # after they have performed the work associated with the task. - # - # The [payload][google.cloud.tasks.v2beta2.PullMessage.payload] is intended - # to store data that the worker needs to perform the work associated with the - # task. To return the payloads in the - # [response][google.cloud.tasks.v2beta2.LeaseTasksResponse], set - # [response_view][google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view] - # to [FULL][google.cloud.tasks.v2beta2.Task.View.FULL]. - # - # A maximum of 10 qps of - # [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] requests are - # allowed per queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] - # is returned when this limit is - # exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] - # is also returned when - # [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second] - # is exceeded. - rpc :LeaseTasks, ::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest, ::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse - # Acknowledges a pull task. - # - # The worker, that is, the entity that - # [leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must - # call this method to indicate that the work associated with the task has - # finished. - # - # The worker must acknowledge a task within the - # [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] - # or the lease will expire and the task will become available to be leased - # again. After the task is acknowledged, it will not be returned - # by a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks], - # [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or - # [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. - rpc :AcknowledgeTask, ::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest, ::Google::Protobuf::Empty - # Renew the current lease of a pull task. - # - # The worker can use this method to extend the lease by a new - # duration, starting from now. The new task lease will be - # returned in the task's - # [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. - rpc :RenewLease, ::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest, ::Google::Cloud::Tasks::V2beta2::Task - # Cancel a pull task's lease. - # - # The worker can use this method to cancel a task's lease by - # setting its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] - # to now. This will make the task available to be leased to the next caller - # of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. - rpc :CancelLease, ::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest, ::Google::Cloud::Tasks::V2beta2::Task - # Forces a task to run now. - # - # When this method is called, Cloud Tasks will dispatch the task, even if - # the task is already running, the queue has reached its - # [RateLimits][google.cloud.tasks.v2beta2.RateLimits] or is - # [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. - # - # This command is meant to be used for manual debugging. For - # example, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] can be - # used to retry a failed task after a fix has been made or to manually force - # a task to be dispatched now. - # - # The dispatched task is returned. That is, the task that is returned - # contains the [status][google.cloud.tasks.v2beta2.Task.status] after the - # task is dispatched but before the task is received by its target. - # - # If Cloud Tasks receives a successful response from the task's - # target, then the task will be deleted; otherwise the task's - # [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be - # reset to the time that - # [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was called plus - # the retry delay specified in the queue's - # [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig]. - # - # [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] returns - # [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a - # task that has already succeeded or permanently failed. - # - # [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called - # on a [pull task][google.cloud.tasks.v2beta2.PullMessage]. - rpc :RunTask, ::Google::Cloud::Tasks::V2beta2::RunTaskRequest, ::Google::Cloud::Tasks::V2beta2::Task - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/old_target_pb.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/old_target_pb.rb deleted file mode 100644 index ab3a3b82b28c..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/old_target_pb.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/tasks/v2beta2/old_target.proto - -require 'google/protobuf' - - -descriptor_data = "\n+google/cloud/tasks/v2beta2/old_target.proto\x12\x1agoogle.cloud.tasks.v2beta2Bw\n\x1e\x63om.google.cloud.tasks.v2beta2B\x0eOldTargetProtoP\x01ZCcloud.google.com/go/cloudtasks/apiv2beta2/cloudtaskspb;cloudtaskspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Tasks - module V2beta2 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/queue_pb.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/queue_pb.rb deleted file mode 100644 index f6e32f4bc0f6..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/queue_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/tasks/v2beta2/queue.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/tasks/v2beta2/target_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n&google/cloud/tasks/v2beta2/queue.proto\x12\x1agoogle.cloud.tasks.v2beta2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\'google/cloud/tasks/v2beta2/target.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x99\x06\n\x05Queue\x12\x0c\n\x04name\x18\x01 \x01(\t\x12Q\n\x16\x61pp_engine_http_target\x18\x03 \x01(\x0b\x32/.google.cloud.tasks.v2beta2.AppEngineHttpTargetH\x00\x12=\n\x0bpull_target\x18\x04 \x01(\x0b\x32&.google.cloud.tasks.v2beta2.PullTargetH\x00\x12=\n\x0bhttp_target\x18\x11 \x01(\x0b\x32&.google.cloud.tasks.v2beta2.HttpTargetH\x00\x12;\n\x0brate_limits\x18\x05 \x01(\x0b\x32&.google.cloud.tasks.v2beta2.RateLimits\x12=\n\x0cretry_config\x18\x06 \x01(\x0b\x32\'.google.cloud.tasks.v2beta2.RetryConfig\x12\x36\n\x05state\x18\x07 \x01(\x0e\x32\'.google.cloud.tasks.v2beta2.Queue.State\x12.\n\npurge_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12+\n\x08task_ttl\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x30\n\rtombstone_ttl\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12:\n\x05stats\x18\x10 \x01(\x0b\x32&.google.cloud.tasks.v2beta2.QueueStatsB\x03\xe0\x41\x03\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\n\n\x06PAUSED\x10\x02\x12\x0c\n\x08\x44ISABLED\x10\x03:\\\xea\x41Y\n\x1f\x63loudtasks.googleapis.com/Queue\x12\x36projects/{project}/locations/{location}/queues/{queue}B\r\n\x0btarget_type\"k\n\nRateLimits\x12\'\n\x1fmax_tasks_dispatched_per_second\x18\x01 \x01(\x01\x12\x16\n\x0emax_burst_size\x18\x02 \x01(\x05\x12\x1c\n\x14max_concurrent_tasks\x18\x03 \x01(\x05\"\x81\x02\n\x0bRetryConfig\x12\x16\n\x0cmax_attempts\x18\x01 \x01(\x05H\x00\x12\x1c\n\x12unlimited_attempts\x18\x02 \x01(\x08H\x00\x12\x35\n\x12max_retry_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\x0bmin_backoff\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\x0bmax_backoff\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\rmax_doublings\x18\x06 \x01(\x05\x42\x0e\n\x0cnum_attempts\"\xe8\x01\n\nQueueStats\x12\x18\n\x0btasks_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x46\n\x1doldest_estimated_arrival_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\'\n\x1a\x65xecuted_last_minute_count\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12(\n\x1b\x63oncurrent_dispatches_count\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12%\n\x18\x65\x66\x66\x65\x63tive_execution_rate\x18\x05 \x01(\x01\x42\x03\xe0\x41\x03\x42s\n\x1e\x63om.google.cloud.tasks.v2beta2B\nQueueProtoP\x01ZCcloud.google.com/go/cloudtasks/apiv2beta2/cloudtaskspb;cloudtaskspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Tasks - module V2beta2 - Queue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.Queue").msgclass - Queue::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.Queue.State").enummodule - RateLimits = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.RateLimits").msgclass - RetryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.RetryConfig").msgclass - QueueStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.QueueStats").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/rest.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/rest.rb deleted file mode 100644 index d3a2ea31d304..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/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/tasks/v2beta2/cloud_tasks/rest" -require "google/cloud/tasks/v2beta2/bindings_override" -require "google/cloud/tasks/v2beta2/version" - -module Google - module Cloud - module Tasks - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/tasks/v2beta2/rest" - # client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new - # - module V2beta2 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/target_pb.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/target_pb.rb deleted file mode 100644 index ef539b5091f1..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/target_pb.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/tasks/v2beta2/target.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n\'google/cloud/tasks/v2beta2/target.proto\x12\x1agoogle.cloud.tasks.v2beta2\x1a\x1fgoogle/api/field_behavior.proto\"\x0c\n\nPullTarget\"+\n\x0bPullMessage\x12\x0f\n\x07payload\x18\x01 \x01(\x0c\x12\x0b\n\x03tag\x18\x02 \x01(\t\"h\n\x13\x41ppEngineHttpTarget\x12Q\n\x1b\x61pp_engine_routing_override\x18\x01 \x01(\x0b\x32,.google.cloud.tasks.v2beta2.AppEngineRouting\"\xc4\x02\n\x14\x41ppEngineHttpRequest\x12;\n\x0bhttp_method\x18\x01 \x01(\x0e\x32&.google.cloud.tasks.v2beta2.HttpMethod\x12H\n\x12\x61pp_engine_routing\x18\x02 \x01(\x0b\x32,.google.cloud.tasks.v2beta2.AppEngineRouting\x12\x14\n\x0crelative_url\x18\x03 \x01(\t\x12N\n\x07headers\x18\x04 \x03(\x0b\x32=.google.cloud.tasks.v2beta2.AppEngineHttpRequest.HeadersEntry\x12\x0f\n\x07payload\x18\x05 \x01(\x0c\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"T\n\x10\x41ppEngineRouting\x12\x0f\n\x07service\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x10\n\x08instance\x18\x03 \x01(\t\x12\x0c\n\x04host\x18\x04 \x01(\t\"\xf5\x02\n\x0bHttpRequest\x12\x10\n\x03url\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\x0bhttp_method\x18\x02 \x01(\x0e\x32&.google.cloud.tasks.v2beta2.HttpMethod\x12\x45\n\x07headers\x18\x03 \x03(\x0b\x32\x34.google.cloud.tasks.v2beta2.HttpRequest.HeadersEntry\x12\x0c\n\x04\x62ody\x18\x04 \x01(\x0c\x12=\n\x0boauth_token\x18\x05 \x01(\x0b\x32&.google.cloud.tasks.v2beta2.OAuthTokenH\x00\x12;\n\noidc_token\x18\x06 \x01(\x0b\x32%.google.cloud.tasks.v2beta2.OidcTokenH\x00\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x16\n\x14\x61uthorization_header\"\x1c\n\x0cPathOverride\x12\x0c\n\x04path\x18\x01 \x01(\t\"%\n\rQueryOverride\x12\x14\n\x0cquery_params\x18\x01 \x01(\t\"\x97\x04\n\x0bUriOverride\x12\x43\n\x06scheme\x18\x01 \x01(\x0e\x32..google.cloud.tasks.v2beta2.UriOverride.SchemeH\x00\x88\x01\x01\x12\x11\n\x04host\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04port\x18\x03 \x01(\x03H\x02\x88\x01\x01\x12?\n\rpath_override\x18\x04 \x01(\x0b\x32(.google.cloud.tasks.v2beta2.PathOverride\x12\x41\n\x0equery_override\x18\x05 \x01(\x0b\x32).google.cloud.tasks.v2beta2.QueryOverride\x12\x61\n\x19uri_override_enforce_mode\x18\x06 \x01(\x0e\x32>.google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode\"5\n\x06Scheme\x12\x16\n\x12SCHEME_UNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"b\n\x16UriOverrideEnforceMode\x12)\n%URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED\x10\x00\x12\x11\n\rIF_NOT_EXISTS\x10\x01\x12\n\n\x06\x41LWAYS\x10\x02\x42\t\n\x07_schemeB\x07\n\x05_hostB\x07\n\x05_port\"\xe4\x03\n\nHttpTarget\x12=\n\x0curi_override\x18\x01 \x01(\x0b\x32\'.google.cloud.tasks.v2beta2.UriOverride\x12;\n\x0bhttp_method\x18\x02 \x01(\x0e\x32&.google.cloud.tasks.v2beta2.HttpMethod\x12O\n\x10header_overrides\x18\x03 \x03(\x0b\x32\x35.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride\x12=\n\x0boauth_token\x18\x05 \x01(\x0b\x32&.google.cloud.tasks.v2beta2.OAuthTokenH\x00\x12;\n\noidc_token\x18\x06 \x01(\x0b\x32%.google.cloud.tasks.v2beta2.OidcTokenH\x00\x1a$\n\x06Header\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x1aO\n\x0eHeaderOverride\x12=\n\x06header\x18\x01 \x01(\x0b\x32-.google.cloud.tasks.v2beta2.HttpTarget.HeaderB\x16\n\x14\x61uthorization_header\":\n\nOAuthToken\x12\x1d\n\x15service_account_email\x18\x01 \x01(\t\x12\r\n\x05scope\x18\x02 \x01(\t\"<\n\tOidcToken\x12\x1d\n\x15service_account_email\x18\x01 \x01(\t\x12\x10\n\x08\x61udience\x18\x02 \x01(\t*s\n\nHttpMethod\x12\x1b\n\x17HTTP_METHOD_UNSPECIFIED\x10\x00\x12\x08\n\x04POST\x10\x01\x12\x07\n\x03GET\x10\x02\x12\x08\n\x04HEAD\x10\x03\x12\x07\n\x03PUT\x10\x04\x12\n\n\x06\x44\x45LETE\x10\x05\x12\t\n\x05PATCH\x10\x06\x12\x0b\n\x07OPTIONS\x10\x07\x42t\n\x1e\x63om.google.cloud.tasks.v2beta2B\x0bTargetProtoP\x01ZCcloud.google.com/go/cloudtasks/apiv2beta2/cloudtaskspb;cloudtaskspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Tasks - module V2beta2 - PullTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.PullTarget").msgclass - PullMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.PullMessage").msgclass - AppEngineHttpTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.AppEngineHttpTarget").msgclass - AppEngineHttpRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.AppEngineHttpRequest").msgclass - AppEngineRouting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.AppEngineRouting").msgclass - HttpRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.HttpRequest").msgclass - PathOverride = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.PathOverride").msgclass - QueryOverride = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.QueryOverride").msgclass - UriOverride = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.UriOverride").msgclass - UriOverride::Scheme = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.UriOverride.Scheme").enummodule - UriOverride::UriOverrideEnforceMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode").enummodule - HttpTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.HttpTarget").msgclass - HttpTarget::Header = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.HttpTarget.Header").msgclass - HttpTarget::HeaderOverride = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride").msgclass - OAuthToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.OAuthToken").msgclass - OidcToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.OidcToken").msgclass - HttpMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.HttpMethod").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/task_pb.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/task_pb.rb deleted file mode 100644 index 3f7e4a0f93ae..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/task_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/tasks/v2beta2/task.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/tasks/v2beta2/target_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n%google/cloud/tasks/v2beta2/task.proto\x12\x1agoogle.cloud.tasks.v2beta2\x1a\x19google/api/resource.proto\x1a\'google/cloud/tasks/v2beta2/target.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xe9\x04\n\x04Task\x12\x0c\n\x04name\x18\x01 \x01(\t\x12S\n\x17\x61pp_engine_http_request\x18\x03 \x01(\x0b\x32\x30.google.cloud.tasks.v2beta2.AppEngineHttpRequestH\x00\x12?\n\x0cpull_message\x18\x04 \x01(\x0b\x32\'.google.cloud.tasks.v2beta2.PullMessageH\x00\x12?\n\x0chttp_request\x18\r \x01(\x0b\x32\'.google.cloud.tasks.v2beta2.HttpRequestH\x00\x12\x31\n\rschedule_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x06status\x18\x07 \x01(\x0b\x32&.google.cloud.tasks.v2beta2.TaskStatus\x12\x33\n\x04view\x18\x08 \x01(\x0e\x32%.google.cloud.tasks.v2beta2.Task.View\"1\n\x04View\x12\x14\n\x10VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02:h\xea\x41\x65\n\x1e\x63loudtasks.googleapis.com/Task\x12\x43projects/{project}/locations/{location}/queues/{queue}/tasks/{task}B\x0e\n\x0cpayload_type\"\xdd\x01\n\nTaskStatus\x12\x1e\n\x16\x61ttempt_dispatch_count\x18\x01 \x01(\x05\x12\x1e\n\x16\x61ttempt_response_count\x18\x02 \x01(\x05\x12G\n\x14\x66irst_attempt_status\x18\x03 \x01(\x0b\x32).google.cloud.tasks.v2beta2.AttemptStatus\x12\x46\n\x13last_attempt_status\x18\x04 \x01(\x0b\x32).google.cloud.tasks.v2beta2.AttemptStatus\"\xd5\x01\n\rAttemptStatus\x12\x31\n\rschedule_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rdispatch_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rresponse_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12+\n\x0fresponse_status\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusBr\n\x1e\x63om.google.cloud.tasks.v2beta2B\tTaskProtoP\x01ZCcloud.google.com/go/cloudtasks/apiv2beta2/cloudtaskspb;cloudtaskspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Tasks - module V2beta2 - Task = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.Task").msgclass - Task::View = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.Task.View").enummodule - TaskStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.TaskStatus").msgclass - AttemptStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.AttemptStatus").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/version.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/version.rb deleted file mode 100644 index fb19c639de63..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/lib/google/cloud/tasks/v2beta2/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 Tasks - module V2beta2 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/README.md b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/README.md deleted file mode 100644 index da33c0281ced..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Tasks V2beta2 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-tasks-v2beta2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # 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. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - # - # Example: - # - # 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 - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # 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 - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # 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 - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2/proto_docs/google/api/httpbody.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/httpbody.rb deleted file mode 100644 index 938f7ac6b2fd..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/httpbody.rb +++ /dev/null @@ -1,80 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 - # Message that represents an arbitrary HTTP body. It should only be used for - # payload formats that can't be represented as JSON, such as raw binary or - # an HTML page. - # - # - # This message can be used both in streaming and non-streaming API methods in - # the request as well as the response. - # - # It can be used as a top-level request field, which is convenient if one - # wants to extract parameters from either the URL or HTTP template into the - # request fields and also want access to the raw HTTP body. - # - # Example: - # - # message GetResourceRequest { - # // A unique request id. - # string request_id = 1; - # - # // The raw HTTP body is bound to this field. - # google.api.HttpBody http_body = 2; - # - # } - # - # service ResourceService { - # rpc GetResource(GetResourceRequest) - # returns (google.api.HttpBody); - # rpc UpdateResource(google.api.HttpBody) - # returns (google.protobuf.Empty); - # - # } - # - # Example with streaming methods: - # - # service CaldavService { - # rpc GetCalendar(stream google.api.HttpBody) - # returns (stream google.api.HttpBody); - # rpc UpdateCalendar(stream google.api.HttpBody) - # returns (stream google.api.HttpBody); - # - # } - # - # Use of this type only changes how the request and response bodies are - # handled, all other features will continue to work unchanged. - # @!attribute [rw] content_type - # @return [::String] - # The HTTP Content-Type header value specifying the content type of the body. - # @!attribute [rw] data - # @return [::String] - # The HTTP request/response body as raw binary. - # @!attribute [rw] extensions - # @return [::Array<::Google::Protobuf::Any>] - # Application specific response metadata. Must be set in the first response - # for streaming APIs. - class HttpBody - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/cloudtasks.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/cloudtasks.rb deleted file mode 100644 index 91f3d9930425..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/cloudtasks.rb +++ /dev/null @@ -1,608 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Tasks - module V2beta2 - # Request message for - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_queues ListQueues}. - # @!attribute [rw] parent - # @return [::String] - # Required. The location name. - # For example: `projects/PROJECT_ID/locations/LOCATION_ID` - # @!attribute [rw] filter - # @return [::String] - # `filter` can be used to specify a subset of queues. Any - # {::Google::Cloud::Tasks::V2beta2::Queue Queue} field can be used as a filter and - # several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The - # filter syntax is the same as described in [Stackdriver's Advanced Logs - # Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - # - # Sample filter "app_engine_http_target: *". - # - # Note that using filters might cause fewer queues than the - # requested_page size to be returned. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. - # - # The maximum page size is 9800. If unspecified, the page size will - # be the maximum. Fewer queues than requested might be returned, - # even if more queues exist; use the - # {::Google::Cloud::Tasks::V2beta2::ListQueuesResponse#next_page_token next_page_token} - # in the response to determine if more queues exist. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying the page of results to return. - # - # To request the first page results, page_token must be empty. To - # request the next page of results, page_token must be the value of - # {::Google::Cloud::Tasks::V2beta2::ListQueuesResponse#next_page_token next_page_token} - # returned from the previous call to - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_queues ListQueues} method. It - # is an error to switch the value of the - # {::Google::Cloud::Tasks::V2beta2::ListQueuesRequest#filter filter} while - # iterating through pages. - # @!attribute [rw] read_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Read mask is used for a more granular control over what the API - # returns. If the mask is not present all fields will be returned except - # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - # specified in the mask. - class ListQueuesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_queues ListQueues}. - # @!attribute [rw] queues - # @return [::Array<::Google::Cloud::Tasks::V2beta2::Queue>] - # The list of queues. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # - # To return the next page of results, call - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_queues ListQueues} with this - # value as the - # {::Google::Cloud::Tasks::V2beta2::ListQueuesRequest#page_token page_token}. - # - # If the next_page_token is empty, there are no more results. - # - # The page token is valid for only 2 hours. - class ListQueuesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#get_queue GetQueue}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the queue. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # @!attribute [rw] read_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Read mask is used for a more granular control over what the API - # returns. If the mask is not present all fields will be returned except - # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - # specified in the mask. - class GetQueueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_queue CreateQueue}. - # @!attribute [rw] parent - # @return [::String] - # Required. The location name in which the queue will be created. - # For example: `projects/PROJECT_ID/locations/LOCATION_ID` - # - # The list of allowed locations can be obtained by calling Cloud - # Tasks' implementation of - # [ListLocations][google.cloud.location.Locations.ListLocations]. - # @!attribute [rw] queue - # @return [::Google::Cloud::Tasks::V2beta2::Queue] - # Required. The queue to create. - # - # [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as - # an existing queue. - class CreateQueueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#update_queue UpdateQueue}. - # @!attribute [rw] queue - # @return [::Google::Cloud::Tasks::V2beta2::Queue] - # Required. The queue to create or update. - # - # The queue's {::Google::Cloud::Tasks::V2beta2::Queue#name name} must be - # specified. - # - # Output only fields cannot be modified using UpdateQueue. - # Any value specified for an output only field will be ignored. - # The queue's {::Google::Cloud::Tasks::V2beta2::Queue#name name} cannot be - # changed. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # A mask used to specify which fields of the queue are being updated. - # - # If empty, then all fields will be updated. - class UpdateQueueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#delete_queue DeleteQueue}. - # @!attribute [rw] name - # @return [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - class DeleteQueueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#purge_queue PurgeQueue}. - # @!attribute [rw] name - # @return [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - class PurgeQueueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#pause_queue PauseQueue}. - # @!attribute [rw] name - # @return [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - class PauseQueueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#resume_queue ResumeQueue}. - # @!attribute [rw] name - # @return [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - class ResumeQueueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#upload_queue_yaml UploadQueueYaml}. - # @!attribute [rw] app_id - # @return [::String] - # Required. The App ID is supplied as an HTTP parameter. Unlike internal - # usage of App ID, it does not include a region prefix. Rather, the App ID - # represents the Project ID against which to make the request. - # @!attribute [rw] http_body - # @return [::Google::Api::HttpBody] - # The http body contains the queue.yaml file which used to update queue lists - class UploadQueueYamlRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing tasks using - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_tasks ListTasks}. - # @!attribute [rw] parent - # @return [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # @!attribute [rw] response_view - # @return [::Google::Cloud::Tasks::V2beta2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum page size. - # - # Fewer tasks than requested might be returned, even if more tasks exist; use - # {::Google::Cloud::Tasks::V2beta2::ListTasksResponse#next_page_token next_page_token} - # in the response to determine if more tasks exist. - # - # The maximum page size is 1000. If unspecified, the page size will be the - # maximum. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying the page of results to return. - # - # To request the first page results, page_token must be empty. To - # request the next page of results, page_token must be the value of - # {::Google::Cloud::Tasks::V2beta2::ListTasksResponse#next_page_token next_page_token} - # returned from the previous call to - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_tasks ListTasks} method. - # - # The page token is valid for only 2 hours. - class ListTasksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing tasks using - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_tasks ListTasks}. - # @!attribute [rw] tasks - # @return [::Array<::Google::Cloud::Tasks::V2beta2::Task>] - # The list of tasks. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # - # To return the next page of results, call - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_tasks ListTasks} with this - # value as the - # {::Google::Cloud::Tasks::V2beta2::ListTasksRequest#page_token page_token}. - # - # If the next_page_token is empty, there are no more results. - class ListTasksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a task using - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#get_task GetTask}. - # @!attribute [rw] name - # @return [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @!attribute [rw] response_view - # @return [::Google::Cloud::Tasks::V2beta2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. - class GetTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task CreateTask}. - # @!attribute [rw] parent - # @return [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # - # The queue must already exist. - # @!attribute [rw] task - # @return [::Google::Cloud::Tasks::V2beta2::Task] - # Required. The task to add. - # - # Task names have the following format: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - # The user can optionally specify a task - # {::Google::Cloud::Tasks::V2beta2::Task#name name}. If a name is not specified - # then the system will generate a random unique task id, which will be set in - # the task returned in the {::Google::Cloud::Tasks::V2beta2::Task#name response}. - # - # If {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} is not - # set or is in the past then Cloud Tasks will set it to the current time. - # - # Task De-duplication: - # - # Explicitly specifying a task ID enables task de-duplication. If - # a task's ID is identical to that of an existing task or a task - # that was deleted or completed recently then the call will fail - # with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. - # If the task's queue was created using Cloud Tasks, then another task with - # the same name can't be created for ~1 hour after the original task was - # deleted or completed. If the task's queue was created using queue.yaml or - # queue.xml, then another task with the same name can't be created - # for ~9 days after the original task was deleted or completed. - # - # Because there is an extra lookup cost to identify duplicate task - # names, these {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task CreateTask} - # calls have significantly increased latency. Using hashed strings for the - # task id or for the prefix of the task id is recommended. Choosing task ids - # that are sequential or have sequential prefixes, for example using a - # timestamp, causes an increase in latency and error rates in all - # task commands. The infrastructure relies on an approximately - # uniform distribution of task ids to store and serve tasks - # efficiently. - # @!attribute [rw] response_view - # @return [::Google::Cloud::Tasks::V2beta2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. - class CreateTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting a task using - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#delete_task DeleteTask}. - # @!attribute [rw] name - # @return [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - class DeleteTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for leasing tasks using - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks}. - # @!attribute [rw] parent - # @return [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # @!attribute [rw] max_tasks - # @return [::Integer] - # The maximum number of tasks to lease. - # - # The system will make a best effort to return as close to as - # `max_tasks` as possible. - # - # The largest that `max_tasks` can be is 1000. - # - # The maximum total size of a [lease tasks - # response][google.cloud.tasks.v2beta2.LeaseTasksResponse] is 32 MB. If the - # sum of all task sizes requested reaches this limit, fewer tasks than - # requested are returned. - # @!attribute [rw] lease_duration - # @return [::Google::Protobuf::Duration] - # Required. The duration of the lease. - # - # Each task returned in the - # {::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse response} will have its - # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} set to the - # current time plus the `lease_duration`. The task is leased until its - # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}; thus, the - # task will not be returned to another - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} call before - # its {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}. - # - # - # After the worker has successfully finished the work associated - # with the task, the worker must call via - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#acknowledge_task AcknowledgeTask} - # before the {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}. - # Otherwise the task will be returned to a later - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} call so that - # another worker can retry it. - # - # The maximum lease duration is 1 week. - # `lease_duration` will be truncated to the nearest second. - # @!attribute [rw] response_view - # @return [::Google::Cloud::Tasks::V2beta2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. - # @!attribute [rw] filter - # @return [::String] - # `filter` can be used to specify a subset of tasks to lease. - # - # When `filter` is set to `tag=` then the - # {::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse response} will contain only - # tasks whose {::Google::Cloud::Tasks::V2beta2::PullMessage#tag tag} is equal to - # ``. `` must be less than 500 characters. - # - # When `filter` is set to `tag_function=oldest_tag()`, only tasks which have - # the same tag as the task with the oldest - # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} will be - # returned. - # - # Grammar Syntax: - # - # * `filter = "tag=" tag | "tag_function=" function` - # - # * `tag = string` - # - # * `function = "oldest_tag()"` - # - # The `oldest_tag()` function returns tasks which have the same tag as the - # oldest task (ordered by schedule time). - # - # SDK compatibility: Although the SDK allows tags to be either - # string or - # [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), - # only UTF-8 encoded tags can be used in Cloud Tasks. Tag which - # aren't UTF-8 encoded can't be used in the - # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#filter filter} and the - # task's {::Google::Cloud::Tasks::V2beta2::PullMessage#tag tag} will be displayed - # as empty in Cloud Tasks. - class LeaseTasksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for leasing tasks using - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks}. - # @!attribute [rw] tasks - # @return [::Array<::Google::Cloud::Tasks::V2beta2::Task>] - # The leased tasks. - class LeaseTasksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for acknowledging a task using - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#acknowledge_task AcknowledgeTask}. - # @!attribute [rw] name - # @return [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @!attribute [rw] schedule_time - # @return [::Google::Protobuf::Timestamp] - # Required. The task's current schedule time, available in the - # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} response or - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#renew_lease RenewLease} response. - # This restriction is to ensure that your worker currently holds the lease. - class AcknowledgeTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for renewing a lease using - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#renew_lease RenewLease}. - # @!attribute [rw] name - # @return [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @!attribute [rw] schedule_time - # @return [::Google::Protobuf::Timestamp] - # Required. The task's current schedule time, available in the - # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} response or - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#renew_lease RenewLease} response. - # This restriction is to ensure that your worker currently holds the lease. - # @!attribute [rw] lease_duration - # @return [::Google::Protobuf::Duration] - # Required. The desired new lease duration, starting from now. - # - # - # The maximum lease duration is 1 week. - # `lease_duration` will be truncated to the nearest second. - # @!attribute [rw] response_view - # @return [::Google::Cloud::Tasks::V2beta2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. - class RenewLeaseRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for canceling a lease using - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#cancel_lease CancelLease}. - # @!attribute [rw] name - # @return [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @!attribute [rw] schedule_time - # @return [::Google::Protobuf::Timestamp] - # Required. The task's current schedule time, available in the - # {::Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} response or - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#renew_lease RenewLease} response. - # This restriction is to ensure that your worker currently holds the lease. - # @!attribute [rw] response_view - # @return [::Google::Cloud::Tasks::V2beta2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. - class CancelLeaseRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for forcing a task to run now using - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#run_task RunTask}. - # @!attribute [rw] name - # @return [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @!attribute [rw] response_view - # @return [::Google::Cloud::Tasks::V2beta2::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta2::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta2::Task Task} resource. - class RunTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/queue.rb deleted file mode 100644 index c00a2ec7be5e..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/queue.rb +++ /dev/null @@ -1,448 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Tasks - module V2beta2 - # A queue is a container of related tasks. Queues are configured to manage - # how those tasks are dispatched. Configurable properties include rate limits, - # retry options, target types, and others. - # @!attribute [rw] name - # @return [::String] - # Caller-specified and required in - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_queue CreateQueue}, after - # which it becomes output only. - # - # The queue name. - # - # The queue name must have the following format: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # - # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - # hyphens (-), colons (:), or periods (.). - # For more information, see - # [Identifying - # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - # * `LOCATION_ID` is the canonical ID for the queue's location. - # The list of available locations can be obtained by calling - # [ListLocations][google.cloud.location.Locations.ListLocations]. - # For more information, see https://cloud.google.com/about/locations/. - # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - # hyphens (-). The maximum length is 100 characters. - # @!attribute [rw] app_engine_http_target - # @return [::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget] - # App Engine HTTP target. - # - # An App Engine queue is a queue that has an - # {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget AppEngineHttpTarget}. - # - # Note: The following fields are mutually exclusive: `app_engine_http_target`, `pull_target`, `http_target`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] pull_target - # @return [::Google::Cloud::Tasks::V2beta2::PullTarget] - # Pull target. - # - # A pull queue is a queue that has a - # {::Google::Cloud::Tasks::V2beta2::PullTarget PullTarget}. - # - # Note: The following fields are mutually exclusive: `pull_target`, `app_engine_http_target`, `http_target`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] http_target - # @return [::Google::Cloud::Tasks::V2beta2::HttpTarget] - # An http_target is used to override the target values for HTTP tasks. - # - # Note: The following fields are mutually exclusive: `http_target`, `app_engine_http_target`, `pull_target`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] rate_limits - # @return [::Google::Cloud::Tasks::V2beta2::RateLimits] - # Rate limits for task dispatches. - # - # {::Google::Cloud::Tasks::V2beta2::Queue#rate_limits rate_limits} and - # {::Google::Cloud::Tasks::V2beta2::Queue#retry_config retry_config} are related - # because they both control task attempts however they control how tasks are - # attempted in different ways: - # - # * {::Google::Cloud::Tasks::V2beta2::Queue#rate_limits rate_limits} controls the - # total rate of - # dispatches from a queue (i.e. all traffic dispatched from the - # queue, regardless of whether the dispatch is from a first - # attempt or a retry). - # * {::Google::Cloud::Tasks::V2beta2::Queue#retry_config retry_config} controls - # what happens to - # particular a task after its first attempt fails. That is, - # {::Google::Cloud::Tasks::V2beta2::Queue#retry_config retry_config} controls - # task retries (the second attempt, third attempt, etc). - # @!attribute [rw] retry_config - # @return [::Google::Cloud::Tasks::V2beta2::RetryConfig] - # Settings that determine the retry behavior. - # - # * For tasks created using Cloud Tasks: the queue-level retry settings - # apply to all tasks in the queue that were created using Cloud Tasks. - # Retry settings cannot be set on individual tasks. - # * For tasks created using the App Engine SDK: the queue-level retry - # settings apply to all tasks in the queue which do not have retry settings - # explicitly set on the task and were created by the App Engine SDK. See - # [App Engine - # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). - # @!attribute [rw] state - # @return [::Google::Cloud::Tasks::V2beta2::Queue::State] - # Output only. The state of the queue. - # - # `state` can only be changed by called - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#pause_queue PauseQueue}, - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#resume_queue ResumeQueue}, or - # uploading - # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#update_queue UpdateQueue} cannot be - # used to change `state`. - # @!attribute [rw] purge_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last time this queue was purged. - # - # All tasks that were {::Google::Cloud::Tasks::V2beta2::Task#create_time created} - # before this time were purged. - # - # A queue can be purged using - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#purge_queue PurgeQueue}, the [App - # Engine Task Queue SDK, or the Cloud - # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). - # - # Purge time will be truncated to the nearest microsecond. Purge - # time will be unset if the queue has never been purged. - # @!attribute [rw] task_ttl - # @return [::Google::Protobuf::Duration] - # The maximum amount of time that a task will be retained in - # this queue. - # - # Queues created by Cloud Tasks have a default `task_ttl` of 31 days. - # After a task has lived for `task_ttl`, the task will be deleted - # regardless of whether it was dispatched or not. - # - # The `task_ttl` for queues created via queue.yaml/xml is equal to the - # maximum duration because there is a - # [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for - # these queues. To view the maximum valid duration, see the documentation for - # {::Google::Protobuf::Duration Duration}. - # @!attribute [rw] tombstone_ttl - # @return [::Google::Protobuf::Duration] - # The task tombstone time to live (TTL). - # - # After a task is deleted or completed, the task's tombstone is - # retained for the length of time specified by `tombstone_ttl`. - # The tombstone is used by task de-duplication; another task with the same - # name can't be created until the tombstone has expired. For more information - # about task de-duplication, see the documentation for - # {::Google::Cloud::Tasks::V2beta2::CreateTaskRequest#task CreateTaskRequest}. - # - # Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour. - # @!attribute [r] stats - # @return [::Google::Cloud::Tasks::V2beta2::QueueStats] - # Output only. The realtime, informational statistics for a queue. In order - # to receive the statistics the caller should include this field in the - # FieldMask. - class Queue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # State of the queue. - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # The queue is running. Tasks can be dispatched. - # - # If the queue was created using Cloud Tasks and the queue has - # had no activity (method calls or task dispatches) for 30 days, - # the queue may take a few minutes to re-activate. Some method - # calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and - # tasks may not be dispatched for a few minutes until the queue - # has been re-activated. - RUNNING = 1 - - # Tasks are paused by the user. If the queue is paused then Cloud - # Tasks will stop delivering tasks from it, but more tasks can - # still be added to it by the user. When a pull queue is paused, - # all {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} calls - # will return a [FAILED_PRECONDITION][google.rpc.Code.FAILED_PRECONDITION]. - PAUSED = 2 - - # The queue is disabled. - # - # A queue becomes `DISABLED` when - # [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) - # or - # [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) - # is uploaded which does not contain the queue. You cannot directly disable - # a queue. - # - # When a queue is disabled, tasks can still be added to a queue - # but the tasks are not dispatched and - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} calls - # return a `FAILED_PRECONDITION` error. - # - # To permanently delete this queue and all of its tasks, call - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#delete_queue DeleteQueue}. - DISABLED = 3 - end - end - - # Rate limits. - # - # This message determines the maximum rate that tasks can be dispatched by a - # queue, regardless of whether the dispatch is a first task attempt or a retry. - # - # Note: The debugging command, - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#run_task RunTask}, will run a task - # even if the queue has reached its - # {::Google::Cloud::Tasks::V2beta2::RateLimits RateLimits}. - # @!attribute [rw] max_tasks_dispatched_per_second - # @return [::Float] - # The maximum rate at which tasks are dispatched from this queue. - # - # If unspecified when the queue is created, Cloud Tasks will pick the - # default. - # - # * For {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget App Engine queues}, - # the maximum allowed value - # is 500. - # * This field is output only for [pull - # queues][google.cloud.tasks.v2beta2.PullTarget]. In addition to the - # `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} requests - # are allowed per pull queue. - # - # - # This field has the same meaning as - # [rate in - # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). - # @!attribute [rw] max_burst_size - # @return [::Integer] - # The max burst size. - # - # Max burst size limits how fast tasks in queue are processed when - # many tasks are in the queue and the rate is high. This field - # allows the queue to have a high rate so processing starts shortly - # after a task is enqueued, but still limits resource usage when - # many tasks are enqueued in a short period of time. - # - # The [token bucket](https://wikipedia.org/wiki/Token_Bucket) - # algorithm is used to control the rate of task dispatches. Each - # queue has a token bucket that holds tokens, up to the maximum - # specified by `max_burst_size`. Each time a task is dispatched, a - # token is removed from the bucket. Tasks will be dispatched until - # the queue's bucket runs out of tokens. The bucket will be - # continuously refilled with new tokens based on - # [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. - # - # The default value of `max_burst_size` is picked by Cloud Tasks - # based on the value of - # [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. - # - # The maximum value of `max_burst_size` is 500. - # - # For App Engine queues that were created or updated using - # `queue.yaml/xml`, `max_burst_size` is equal to - # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). - # If - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#update_queue UpdateQueue} is called - # on a queue without explicitly setting a value for `max_burst_size`, - # `max_burst_size` value will get updated if - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#update_queue UpdateQueue} is - # updating [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. - # @!attribute [rw] max_concurrent_tasks - # @return [::Integer] - # The maximum number of concurrent tasks that Cloud Tasks allows - # to be dispatched for this queue. After this threshold has been - # reached, Cloud Tasks stops dispatching tasks until the number of - # concurrent requests decreases. - # - # If unspecified when the queue is created, Cloud Tasks will pick the - # default. - # - # - # The maximum allowed value is 5,000. - # - # This field is output only for - # {::Google::Cloud::Tasks::V2beta2::PullTarget pull queues} and always -1, which - # indicates no limit. No other queue types can have `max_concurrent_tasks` - # set to -1. - # - # - # This field has the same meaning as - # [max_concurrent_requests in - # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). - class RateLimits - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Retry config. - # - # These settings determine how a failed task attempt is retried. - # @!attribute [rw] max_attempts - # @return [::Integer] - # The maximum number of attempts for a task. - # - # Cloud Tasks will attempt the task `max_attempts` times (that - # is, if the first attempt fails, then there will be - # `max_attempts - 1` retries). Must be > 0. - # - # Note: The following fields are mutually exclusive: `max_attempts`, `unlimited_attempts`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] unlimited_attempts - # @return [::Boolean] - # If true, then the number of attempts is unlimited. - # - # Note: The following fields are mutually exclusive: `unlimited_attempts`, `max_attempts`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] max_retry_duration - # @return [::Google::Protobuf::Duration] - # If positive, `max_retry_duration` specifies the time limit for - # retrying a failed task, measured from when the task was first - # attempted. Once `max_retry_duration` time has passed *and* the - # task has been attempted - # {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_attempts max_attempts} times, - # no further attempts will be made and the task will be deleted. - # - # If zero, then the task age is unlimited. - # - # If unspecified when the queue is created, Cloud Tasks will pick the - # default. - # - # This field is output only for [pull - # queues][google.cloud.tasks.v2beta2.PullTarget]. - # - # - # `max_retry_duration` will be truncated to the nearest second. - # - # This field has the same meaning as - # [task_age_limit in - # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - # @!attribute [rw] min_backoff - # @return [::Google::Protobuf::Duration] - # A task will be {::Google::Cloud::Tasks::V2beta2::Task#schedule_time scheduled} - # for retry between - # {::Google::Cloud::Tasks::V2beta2::RetryConfig#min_backoff min_backoff} and - # {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_backoff max_backoff} duration - # after it fails, if the queue's - # {::Google::Cloud::Tasks::V2beta2::RetryConfig RetryConfig} specifies that the - # task should be retried. - # - # If unspecified when the queue is created, Cloud Tasks will pick the - # default. - # - # This field is output only for [pull - # queues][google.cloud.tasks.v2beta2.PullTarget]. - # - # - # `min_backoff` will be truncated to the nearest second. - # - # This field has the same meaning as - # [min_backoff_seconds in - # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - # @!attribute [rw] max_backoff - # @return [::Google::Protobuf::Duration] - # A task will be {::Google::Cloud::Tasks::V2beta2::Task#schedule_time scheduled} - # for retry between - # {::Google::Cloud::Tasks::V2beta2::RetryConfig#min_backoff min_backoff} and - # {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_backoff max_backoff} duration - # after it fails, if the queue's - # {::Google::Cloud::Tasks::V2beta2::RetryConfig RetryConfig} specifies that the - # task should be retried. - # - # If unspecified when the queue is created, Cloud Tasks will pick the - # default. - # - # This field is output only for [pull - # queues][google.cloud.tasks.v2beta2.PullTarget]. - # - # - # `max_backoff` will be truncated to the nearest second. - # - # This field has the same meaning as - # [max_backoff_seconds in - # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - # @!attribute [rw] max_doublings - # @return [::Integer] - # The time between retries will double `max_doublings` times. - # - # A task's retry interval starts at - # {::Google::Cloud::Tasks::V2beta2::RetryConfig#min_backoff min_backoff}, then - # doubles `max_doublings` times, then increases linearly, and finally retries - # at intervals of - # {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_backoff max_backoff} up to - # {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_attempts max_attempts} times. - # - # For example, if - # {::Google::Cloud::Tasks::V2beta2::RetryConfig#min_backoff min_backoff} is 10s, - # {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_backoff max_backoff} is 300s, - # and `max_doublings` is 3, then the a task will first be retried in 10s. The - # retry interval will double three times, and then increase linearly by 2^3 * - # 10s. Finally, the task will retry at intervals of - # {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_backoff max_backoff} until the - # task has been attempted - # {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_attempts max_attempts} times. - # Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, - # 300s, .... - # - # If unspecified when the queue is created, Cloud Tasks will pick the - # default. - # - # This field is output only for [pull - # queues][google.cloud.tasks.v2beta2.PullTarget]. - # - # - # This field has the same meaning as - # [max_doublings in - # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - class RetryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Statistics for a queue. - # @!attribute [r] tasks_count - # @return [::Integer] - # Output only. An estimation of the number of tasks in the queue, that is, - # the tasks in the queue that haven't been executed, the tasks in the queue - # which the queue has dispatched but has not yet received a reply for, and - # the failed tasks that the queue is retrying. - # @!attribute [r] oldest_estimated_arrival_time - # @return [::Google::Protobuf::Timestamp] - # Output only. An estimation of the nearest time in the future where a task - # in the queue is scheduled to be executed. - # @!attribute [r] executed_last_minute_count - # @return [::Integer] - # Output only. The number of tasks that the queue has dispatched and received - # a reply for during the last minute. This variable counts both successful - # and non-successful executions. - # @!attribute [r] concurrent_dispatches_count - # @return [::Integer] - # Output only. The number of requests that the queue has dispatched but has - # not received a reply for yet. - # @!attribute [r] effective_execution_rate - # @return [::Float] - # Output only. The current maximum number of tasks per second executed by the - # queue. The maximum value of this variable is controlled by the RateLimits - # of the Queue. However, this value could be less to avoid overloading the - # endpoints tasks in the queue are targeting. - class QueueStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/target.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/target.rb deleted file mode 100644 index 0ca9fafc9695..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/target.rb +++ /dev/null @@ -1,775 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Tasks - module V2beta2 - # Pull target. - class PullTarget - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The pull message contains data that can be used by the caller of - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} to process the - # task. - # - # This proto can only be used for tasks in a queue which has - # {::Google::Cloud::Tasks::V2beta2::Queue#pull_target pull_target} set. - # @!attribute [rw] payload - # @return [::String] - # A data payload consumed by the worker to execute the task. - # @!attribute [rw] tag - # @return [::String] - # The task's tag. - # - # Tags allow similar tasks to be processed in a batch. If you label - # tasks with a tag, your worker can - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks lease tasks} with the - # same tag using - # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#filter filter}. For example, - # if you want to aggregate the events associated with a specific user once a - # day, you could tag tasks with the user ID. - # - # The task's tag can only be set when the - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task task is created}. - # - # The tag must be less than 500 characters. - # - # SDK compatibility: Although the SDK allows tags to be either - # string or - # [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), - # only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 - # encoded, the tag will be empty when the task is returned by Cloud Tasks. - class PullMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # App Engine HTTP target. - # - # The task will be delivered to the App Engine application hostname - # specified by its - # {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget AppEngineHttpTarget} and - # {::Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest AppEngineHttpRequest}. The - # documentation for - # {::Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest AppEngineHttpRequest} - # explains how the task's host URL is constructed. - # - # Using {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget AppEngineHttpTarget} - # requires - # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) - # Google IAM permission for the project - # and the following scope: - # - # `https://www.googleapis.com/auth/cloud-platform` - # @!attribute [rw] app_engine_routing_override - # @return [::Google::Cloud::Tasks::V2beta2::AppEngineRouting] - # Overrides for the - # [task-level - # app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. - # - # If set, `app_engine_routing_override` is used for all tasks in - # the queue, no matter what the setting is for the - # [task-level - # app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. - class AppEngineHttpTarget - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # App Engine HTTP request. - # - # The message defines the HTTP request that is sent to an App Engine app when - # the task is dispatched. - # - # This proto can only be used for tasks in a queue which has - # {::Google::Cloud::Tasks::V2beta2::Queue#app_engine_http_target app_engine_http_target} - # set. - # - # Using {::Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest AppEngineHttpRequest} - # requires - # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) - # Google IAM permission for the project - # and the following scope: - # - # `https://www.googleapis.com/auth/cloud-platform` - # - # The task will be delivered to the App Engine app which belongs to the same - # project as the queue. For more information, see - # [How Requests are - # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) - # and how routing is affected by - # [dispatch - # files](https://cloud.google.com/appengine/docs/python/config/dispatchref). - # Traffic is encrypted during transport and never leaves Google datacenters. - # Because this traffic is carried over a communication mechanism internal to - # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS). - # The request to the handler, however, will appear to have used the HTTP - # protocol. - # - # The {::Google::Cloud::Tasks::V2beta2::AppEngineRouting AppEngineRouting} used to - # construct the URL that the task is delivered to can be set at the queue-level - # or task-level: - # - # * If set, - # {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget#app_engine_routing_override app_engine_routing_override} - # is used for all tasks in the queue, no matter what the setting - # is for the - # [task-level - # app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. - # - # - # The `url` that the task will be sent to is: - # - # * `url =` {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} `+` - # {::Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest#relative_url relative_url} - # - # Tasks can be dispatched to secure app handlers, unsecure app handlers, and - # URIs restricted with - # [`login: - # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref). - # Because tasks are not run as any user, they cannot be dispatched to URIs - # restricted with - # [`login: - # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) - # Task dispatches also do not follow redirects. - # - # The task attempt has succeeded if the app's request handler returns an HTTP - # response code in the range [`200` - `299`]. The task attempt has failed if - # the app's handler returns a non-2xx response code or Cloud Tasks does - # not receive response before the [deadline][Task.dispatch_deadline]. Failed - # tasks will be retried according to the - # {::Google::Cloud::Tasks::V2beta2::Queue#retry_config retry configuration}. `503` - # (Service Unavailable) is considered an App Engine system error instead of an - # application error and will cause Cloud Tasks' traffic congestion control to - # temporarily throttle the queue's dispatches. Unlike other types of task - # targets, a `429` (Too Many Requests) response from an app handler does not - # cause traffic congestion control to throttle the queue. - # @!attribute [rw] http_method - # @return [::Google::Cloud::Tasks::V2beta2::HttpMethod] - # The HTTP method to use for the request. The default is POST. - # - # The app's request handler for the task's target URL must be able to handle - # HTTP requests with this http_method, otherwise the task attempt fails with - # error code 405 (Method Not Allowed). See [Writing a push task request - # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - # and the App Engine documentation for your runtime on [How Requests are - # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). - # @!attribute [rw] app_engine_routing - # @return [::Google::Cloud::Tasks::V2beta2::AppEngineRouting] - # Task-level setting for App Engine routing. - # - # If set, - # {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget#app_engine_routing_override app_engine_routing_override} - # is used for all tasks in the queue, no matter what the setting is for the - # [task-level - # app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. - # @!attribute [rw] relative_url - # @return [::String] - # The relative URL. - # - # The relative URL must begin with "/" and must be a valid HTTP relative URL. - # It can contain a path and query string arguments. - # If the relative URL is empty, then the root path "/" will be used. - # No spaces are allowed, and the maximum length allowed is 2083 characters. - # @!attribute [rw] headers - # @return [::Google::Protobuf::Map{::String => ::String}] - # HTTP request headers. - # - # This map contains the header field names and values. - # Headers can be set when the - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task task is created}. - # Repeated headers are not supported but a header value can contain commas. - # - # Cloud Tasks sets some headers to default values: - # - # * `User-Agent`: By default, this header is - # `"AppEngine-Google; (+http://code.google.com/appengine)"`. - # This header can be modified, but Cloud Tasks will append - # `"AppEngine-Google; (+http://code.google.com/appengine)"` to the - # modified `User-Agent`. - # - # If the task has a - # {::Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest#payload payload}, Cloud - # Tasks sets the following headers: - # - # * `Content-Type`: By default, the `Content-Type` header is set to - # `"application/octet-stream"`. The default can be overridden by explicitly - # setting `Content-Type` to a particular media type when the - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task task is created}. - # For example, `Content-Type` can be set to `"application/json"`. - # * `Content-Length`: This is computed by Cloud Tasks. This value is - # output only. It cannot be changed. - # - # The headers below cannot be set or overridden: - # - # * `Host` - # * `X-Google-*` - # * `X-AppEngine-*` - # - # In addition, Cloud Tasks sets some headers when the task is dispatched, - # such as headers containing information about the task; see - # [request - # headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). - # These headers are set only when the task is dispatched, so they are not - # visible when the task is returned in a Cloud Tasks response. - # - # Although there is no specific limit for the maximum number of headers or - # the size, there is a limit on the maximum size of the - # {::Google::Cloud::Tasks::V2beta2::Task Task}. For more information, see the - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task CreateTask} - # documentation. - # @!attribute [rw] payload - # @return [::String] - # Payload. - # - # The payload will be sent as the HTTP message body. A message - # body, and thus a payload, is allowed only if the HTTP method is - # POST or PUT. It is an error to set a data payload on a task with - # an incompatible {::Google::Cloud::Tasks::V2beta2::HttpMethod HttpMethod}. - class AppEngineHttpRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class HeadersEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # App Engine Routing. - # - # Defines routing characteristics specific to App Engine - service, version, - # and instance. - # - # For more information about services, versions, and instances see - # [An Overview of App - # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), - # [Microservices Architecture on Google App - # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), - # [App Engine Standard request - # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), - # and [App Engine Flex request - # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). - # @!attribute [rw] service - # @return [::String] - # App service. - # - # By default, the task is sent to the service which is the default - # service when the task is attempted. - # - # For some queues or tasks which were created using the App Engine - # Task Queue API, {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} is - # not parsable into - # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service}, - # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}, and - # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance}. For - # example, some tasks which were created using the App Engine SDK use a - # custom domain name; custom domains are not parsed by Cloud Tasks. If - # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} is not parsable, - # then {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service}, - # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}, and - # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} are the - # empty string. - # @!attribute [rw] version - # @return [::String] - # App version. - # - # By default, the task is sent to the version which is the default - # version when the task is attempted. - # - # For some queues or tasks which were created using the App Engine - # Task Queue API, {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} is - # not parsable into - # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service}, - # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}, and - # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance}. For - # example, some tasks which were created using the App Engine SDK use a - # custom domain name; custom domains are not parsed by Cloud Tasks. If - # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} is not parsable, - # then {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service}, - # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}, and - # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} are the - # empty string. - # @!attribute [rw] instance - # @return [::String] - # App instance. - # - # By default, the task is sent to an instance which is available when - # the task is attempted. - # - # Requests can only be sent to a specific instance if - # [manual scaling is used in App Engine - # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). - # App Engine Flex does not support instances. For more information, see - # [App Engine Standard request - # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) - # and [App Engine Flex request - # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). - # @!attribute [rw] host - # @return [::String] - # Output only. The host that the task is sent to. - # - # For more information, see - # [How Requests are - # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). - # - # The host is constructed as: - # - # - # * `host = [application_domain_name]`
- # `| [service] + '.' + [application_domain_name]`
- # `| [version] + '.' + [application_domain_name]`
- # `| [version_dot_service]+ '.' + [application_domain_name]`
- # `| [instance] + '.' + [application_domain_name]`
- # `| [instance_dot_service] + '.' + [application_domain_name]`
- # `| [instance_dot_version] + '.' + [application_domain_name]`
- # `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` - # - # * `application_domain_name` = The domain name of the app, for - # example .appspot.com, which is associated with the - # queue's project ID. Some tasks which were created using the App Engine - # SDK use a custom domain name. - # - # * `service =` - # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service} - # - # * `version =` - # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version} - # - # * `version_dot_service =` - # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version} `+ '.' +` - # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service} - # - # * `instance =` - # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} - # - # * `instance_dot_service =` - # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} `+ '.' - # +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] - # - # * `instance_dot_version =` - # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} `+ '.' - # +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] - # - # * `instance_dot_version_dot_service =` - # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} `+ '.' - # +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' - # +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] - # - # If {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service} is empty, - # then the task will be sent to the service which is the default service when - # the task is attempted. - # - # If {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version} is empty, - # then the task will be sent to the version which is the default version when - # the task is attempted. - # - # If {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} is - # empty, then the task will be sent to an instance which is available when - # the task is attempted. - # - # If {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service}, - # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}, or - # {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} is - # invalid, then the task will be sent to the default version of the default - # service when the task is attempted. - class AppEngineRouting - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # HTTP request. - # - # The task will be pushed to the worker as an HTTP request. An HTTP request - # embodies a url, an http method, headers, body and authorization for the http - # task. - # @!attribute [rw] url - # @return [::String] - # Required. The full url path that the request will be sent to. - # - # This string must begin with either "http://" or "https://". Some examples - # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will - # encode some characters for safety and compatibility. The maximum allowed - # URL length is 2083 characters after encoding. - # - # The `Location` header response from a redirect response [`300` - `399`] - # may be followed. The redirect is not counted as a separate attempt. - # @!attribute [rw] http_method - # @return [::Google::Cloud::Tasks::V2beta2::HttpMethod] - # The HTTP method to use for the request. The default is POST. - # @!attribute [rw] headers - # @return [::Google::Protobuf::Map{::String => ::String}] - # HTTP request headers. - # - # This map contains the header field names and values. - # Headers can be set when running the - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task task is created} or - # [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. - # - # These headers represent a subset of the headers that will accompany the - # task's HTTP request. Some HTTP request headers will be ignored or replaced. - # - # A partial list of headers that will be ignored or replaced is: - # - # * Any header that is prefixed with "X-CloudTasks-" will be treated - # as service header. Service headers define properties of the task and are - # predefined in CloudTask. - # * Host: This will be computed by Cloud Tasks and derived from - # {::Google::Cloud::Tasks::V2beta2::HttpRequest#url HttpRequest.url}. - # * Content-Length: This will be computed by Cloud Tasks. - # * User-Agent: This will be set to `"Google-Cloud-Tasks"`. - # * `X-Google-*`: Google use only. - # * `X-AppEngine-*`: Google use only. - # - # `Content-Type` won't be set by Cloud Tasks. You can explicitly set - # `Content-Type` to a media type when the - # [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - # For example, `Content-Type` can be set to `"application/octet-stream"` or - # `"application/json"`. - # - # Headers which can have multiple values (according to RFC2616) can be - # specified using comma-separated values. - # - # The size of the headers must be less than 80KB. - # @!attribute [rw] body - # @return [::String] - # HTTP request body. - # - # A request body is allowed only if the - # {::Google::Cloud::Tasks::V2beta2::HttpRequest#http_method HTTP method} is POST, - # PUT, or PATCH. It is an error to set body on a task with an incompatible - # {::Google::Cloud::Tasks::V2beta2::HttpMethod HttpMethod}. - # @!attribute [rw] oauth_token - # @return [::Google::Cloud::Tasks::V2beta2::OAuthToken] - # 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`, `oidc_token`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] oidc_token - # @return [::Google::Cloud::Tasks::V2beta2::OidcToken] - # If specified, an - # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) - # token will be generated and attached as an `Authorization` header in the - # HTTP request. - # - # This type of authorization can be used for many scenarios, including - # calling Cloud Run, or endpoints where you intend to validate the token - # yourself. - # - # Note: The following fields are mutually exclusive: `oidc_token`, `oauth_token`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class HttpRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class HeadersEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # PathOverride. - # - # Path message defines path override for HTTP targets. - # @!attribute [rw] path - # @return [::String] - # The URI path (e.g., /users/1234). Default is an empty string. - class PathOverride - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # QueryOverride. - # - # Query message defines query override for HTTP targets. - # @!attribute [rw] query_params - # @return [::String] - # The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty - # string. - class QueryOverride - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Uri Override. - # - # When specified, all the HTTP tasks inside the queue will be partially or - # fully overridden depending on the configured values. - # @!attribute [rw] scheme - # @return [::Google::Cloud::Tasks::V2beta2::UriOverride::Scheme] - # Scheme override. - # - # When specified, the task URI scheme is replaced by the provided value (HTTP - # or HTTPS). - # @!attribute [rw] host - # @return [::String] - # Host override. - # - # When specified, replaces the host part of the task URL. For example, - # if the task URL is "https://www.google.com," and host value is set to - # "example.net", the overridden URI will be changed to "https://example.net." - # Host value cannot be an empty string (INVALID_ARGUMENT). - # @!attribute [rw] port - # @return [::Integer] - # Port override. - # - # When specified, replaces the port part of the task URI. For instance, - # for a URI http://www.google.com/foo and port=123, the overridden URI - # becomes http://www.google.com:123/foo. Note that the port value must be a - # positive integer. Setting the port to 0 (Zero) clears the URI port. - # @!attribute [rw] path_override - # @return [::Google::Cloud::Tasks::V2beta2::PathOverride] - # URI path. - # - # When specified, replaces the existing path of the task URL. Setting the - # path value to an empty string clears the URI path segment. - # @!attribute [rw] query_override - # @return [::Google::Cloud::Tasks::V2beta2::QueryOverride] - # URI Query. - # - # When specified, replaces the query part of the task URI. Setting the - # query value to an empty string clears the URI query segment. - # @!attribute [rw] uri_override_enforce_mode - # @return [::Google::Cloud::Tasks::V2beta2::UriOverride::UriOverrideEnforceMode] - # URI Override Enforce Mode - # - # When specified, determines the Target UriOverride mode. If not specified, - # it defaults to ALWAYS. - class UriOverride - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The Scheme for an HTTP request. By default, it is HTTPS. - module Scheme - # Scheme unspecified. Defaults to HTTPS. - SCHEME_UNSPECIFIED = 0 - - # Convert the scheme to HTTP, e.g., https://www.google.ca will change to - # http://www.google.ca. - HTTP = 1 - - # Convert the scheme to HTTPS, e.g., http://www.google.ca will change to - # https://www.google.ca. - HTTPS = 2 - end - - # UriOverrideEnforceMode mode is to define enforcing mode for the override - # modes. - module UriOverrideEnforceMode - # OverrideMode Unspecified. Defaults to ALWAYS. - URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED = 0 - - # In the IF_NOT_EXISTS mode, queue-level configuration is only - # applied where task-level configuration does not exist. - IF_NOT_EXISTS = 1 - - # In the ALWAYS mode, queue-level configuration overrides all - # task-level configuration - ALWAYS = 2 - end - end - - # HTTP target. - # - # When specified as a [Queue][target_type], all the tasks with [HttpRequest] - # will be overridden according to the target. - # @!attribute [rw] uri_override - # @return [::Google::Cloud::Tasks::V2beta2::UriOverride] - # Uri override. - # - # When specified, overrides the execution Uri for all the tasks in the queue. - # @!attribute [rw] http_method - # @return [::Google::Cloud::Tasks::V2beta2::HttpMethod] - # The HTTP method to use for the request. - # - # When specified, it overrides - # {::Google::Cloud::Tasks::V2beta2::HttpTarget#http_method HttpRequest} for the - # task. Note that if the value is set to [HttpMethod][GET] the - # [HttpRequest][body] of the task will be ignored at execution time. - # @!attribute [rw] header_overrides - # @return [::Array<::Google::Cloud::Tasks::V2beta2::HttpTarget::HeaderOverride>] - # HTTP target headers. - # - # This map contains the header field names and values. - # Headers will be set when running the - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task task is created} and/or - # [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. - # - # These headers represent a subset of the headers that will accompany the - # task's HTTP request. Some HTTP request headers will be ignored or replaced. - # - # A partial list of headers that will be ignored or replaced is: - # * Any header that is prefixed with "X-CloudTasks-" will be treated - # as service header. Service headers define properties of the task and are - # predefined in CloudTask. - # * Host: This will be computed by Cloud Tasks and derived from - # {::Google::Cloud::Tasks::V2beta2::HttpRequest#url HttpRequest.url}. - # * Content-Length: This will be computed by Cloud Tasks. - # * User-Agent: This will be set to `"Google-CloudTasks"`. - # * `X-Google-*`: Google use only. - # * `X-AppEngine-*`: Google use only. - # - # `Content-Type` won't be set by Cloud Tasks. You can explicitly set - # `Content-Type` to a media type when the - # [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - # For example, `Content-Type` can be set to `"application/octet-stream"` or - # `"application/json"`. - # - # Headers which can have multiple values (according to RFC2616) can be - # specified using comma-separated values. - # - # The size of the headers must be less than 80KB. - # Queue-level headers to override headers of all the tasks in the queue. - # @!attribute [rw] oauth_token - # @return [::Google::Cloud::Tasks::V2beta2::OAuthToken] - # 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`, `oidc_token`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] oidc_token - # @return [::Google::Cloud::Tasks::V2beta2::OidcToken] - # If specified, an - # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) - # token will be generated and attached as an `Authorization` header in the - # HTTP request. - # - # This type of authorization can be used for many scenarios, including - # calling Cloud Run, or endpoints where you intend to validate the token - # yourself. - # - # Note: The following fields are mutually exclusive: `oidc_token`, `oauth_token`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class HttpTarget - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines a header message. A header can have a key and a value. - # @!attribute [rw] key - # @return [::String] - # The key of the header. - # @!attribute [rw] value - # @return [::String] - # The value of the header. - class Header - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wraps the Header object. - # @!attribute [rw] header - # @return [::Google::Cloud::Tasks::V2beta2::HttpTarget::Header] - # header embodying a key and a value. - class HeaderOverride - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - 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_email - # @return [::String] - # [Service account email](https://cloud.google.com/iam/docs/service-accounts) - # to be used for generating OAuth token. - # The service account must be within the same project as the queue. The - # caller must have iam.serviceAccounts.actAs permission for the service - # account. - # @!attribute [rw] scope - # @return [::String] - # 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 - - # Contains information needed for generating an - # [OpenID Connect - # token](https://developers.google.com/identity/protocols/OpenIDConnect). - # This type of authorization can be used for many scenarios, including - # calling Cloud Run, or endpoints where you intend to validate the token - # yourself. - # @!attribute [rw] service_account_email - # @return [::String] - # [Service account email](https://cloud.google.com/iam/docs/service-accounts) - # to be used for generating OIDC token. - # The service account must be within the same project as the queue. The - # caller must have iam.serviceAccounts.actAs permission for the service - # account. - # @!attribute [rw] audience - # @return [::String] - # Audience to be used when generating OIDC token. If not specified, the URI - # specified in target will be used. - class OidcToken - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The HTTP method used to execute the task. - module HttpMethod - # HTTP method unspecified - HTTP_METHOD_UNSPECIFIED = 0 - - # HTTP POST - POST = 1 - - # HTTP GET - GET = 2 - - # HTTP HEAD - HEAD = 3 - - # HTTP PUT - PUT = 4 - - # HTTP DELETE - DELETE = 5 - - # HTTP PATCH - PATCH = 6 - - # HTTP OPTIONS - OPTIONS = 7 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/task.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/task.rb deleted file mode 100644 index aae0f9e8995f..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/cloud/tasks/v2beta2/task.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 Tasks - module V2beta2 - # A unit of scheduled work. - # @!attribute [rw] name - # @return [::String] - # Optionally caller-specified in - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task CreateTask}. - # - # The task name. - # - # The task name must have the following format: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # - # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - # hyphens (-), colons (:), or periods (.). - # For more information, see - # [Identifying - # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - # * `LOCATION_ID` is the canonical ID for the task's location. - # The list of available locations can be obtained by calling - # [ListLocations][google.cloud.location.Locations.ListLocations]. - # For more information, see https://cloud.google.com/about/locations/. - # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - # hyphens (-). The maximum length is 100 characters. - # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), - # hyphens (-), or underscores (_). The maximum length is 500 characters. - # @!attribute [rw] app_engine_http_request - # @return [::Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest] - # App Engine HTTP request that is sent to the task's target. Can - # be set only if - # {::Google::Cloud::Tasks::V2beta2::Queue#app_engine_http_target app_engine_http_target} - # is set on the queue. - # - # An App Engine task is a task that has - # {::Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest AppEngineHttpRequest} - # set. - # - # Note: The following fields are mutually exclusive: `app_engine_http_request`, `pull_message`, `http_request`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] pull_message - # @return [::Google::Cloud::Tasks::V2beta2::PullMessage] - # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} to process - # the task. Can be set only if - # {::Google::Cloud::Tasks::V2beta2::Queue#pull_target pull_target} is set on the - # queue. - # - # A pull task is a task that has - # {::Google::Cloud::Tasks::V2beta2::PullMessage PullMessage} set. - # - # Note: The following fields are mutually exclusive: `pull_message`, `app_engine_http_request`, `http_request`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] http_request - # @return [::Google::Cloud::Tasks::V2beta2::HttpRequest] - # HTTP request that is sent to the task's target. - # - # An HTTP task is a task that has - # {::Google::Cloud::Tasks::V2beta2::HttpRequest HttpRequest} set. - # - # Note: The following fields are mutually exclusive: `http_request`, `app_engine_http_request`, `pull_message`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] schedule_time - # @return [::Google::Protobuf::Timestamp] - # The time when the task is scheduled to be attempted. - # - # For App Engine queues, this is when the task will be attempted or retried. - # - # For pull queues, this is the time when the task is available to - # be leased; if a task is currently leased, this is the time when - # the current lease expires, that is, the time that the task was - # leased plus the - # {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#lease_duration lease_duration}. - # - # `schedule_time` will be truncated to the nearest microsecond. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time that the task was created. - # - # `create_time` will be truncated to the nearest second. - # @!attribute [rw] status - # @return [::Google::Cloud::Tasks::V2beta2::TaskStatus] - # Output only. The task status. - # @!attribute [rw] view - # @return [::Google::Cloud::Tasks::V2beta2::Task::View] - # Output only. The view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta2::Task Task} has been returned. - class Task - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The view specifies a subset of {::Google::Cloud::Tasks::V2beta2::Task Task} - # data. - # - # When a task is returned in a response, not all - # information is retrieved by default because some data, such as - # payloads, might be desirable to return only when needed because - # of its large size or because of the sensitivity of data that it - # contains. - module View - # Unspecified. Defaults to BASIC. - VIEW_UNSPECIFIED = 0 - - # The basic view omits fields which can be large or can contain - # sensitive data. - # - # This view does not include the - # ([payload in - # AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] - # and [payload in - # PullMessage][google.cloud.tasks.v2beta2.PullMessage.payload]). These - # payloads are desirable to return only when needed, because they can be - # large and because of the sensitivity of the data that you choose to store - # in it. - BASIC = 1 - - # All information is returned. - # - # Authorization for {::Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta2::Queue Queue} resource. - FULL = 2 - end - end - - # Status of the task. - # @!attribute [rw] attempt_dispatch_count - # @return [::Integer] - # Output only. The number of attempts dispatched. - # - # This count includes attempts which have been dispatched but haven't - # received a response. - # @!attribute [rw] attempt_response_count - # @return [::Integer] - # Output only. The number of attempts which have received a response. - # - # This field is not calculated for [pull - # tasks][google.cloud.tasks.v2beta2.PullMessage]. - # @!attribute [rw] first_attempt_status - # @return [::Google::Cloud::Tasks::V2beta2::AttemptStatus] - # Output only. The status of the task's first attempt. - # - # Only - # {::Google::Cloud::Tasks::V2beta2::AttemptStatus#dispatch_time dispatch_time} - # will be set. The other - # {::Google::Cloud::Tasks::V2beta2::AttemptStatus AttemptStatus} information is - # not retained by Cloud Tasks. - # - # This field is not calculated for [pull - # tasks][google.cloud.tasks.v2beta2.PullMessage]. - # @!attribute [rw] last_attempt_status - # @return [::Google::Cloud::Tasks::V2beta2::AttemptStatus] - # Output only. The status of the task's last attempt. - # - # This field is not calculated for [pull - # tasks][google.cloud.tasks.v2beta2.PullMessage]. - class TaskStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The status of a task attempt. - # @!attribute [rw] schedule_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time that this attempt was scheduled. - # - # `schedule_time` will be truncated to the nearest microsecond. - # @!attribute [rw] dispatch_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time that this attempt was dispatched. - # - # `dispatch_time` will be truncated to the nearest microsecond. - # @!attribute [rw] response_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time that this attempt response was received. - # - # `response_time` will be truncated to the nearest microsecond. - # @!attribute [rw] response_status - # @return [::Google::Rpc::Status] - # Output only. The response from the target for this attempt. - # - # If the task has not been attempted or the task is currently running - # then the response status is unset. - class AttemptStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # 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"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::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). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/iam/v1/options.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! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2/snippets/Gemfile b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/Gemfile deleted file mode 100644 index 3e8ffddf5b75..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/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-tasks-v2beta2", path: "../" -else - gem "google-cloud-tasks-v2beta2" -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-tasks-v2beta2/snippets/cloud_tasks/acknowledge_task.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/acknowledge_task.rb deleted file mode 100644 index b6dc7e27d406..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/acknowledge_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudtasks_v2beta2_generated_CloudTasks_AcknowledgeTask_sync] -require "google/cloud/tasks/v2beta2" - -## -# Snippet for the acknowledge_task call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#acknowledge_task. -# -def acknowledge_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest.new - - # Call the acknowledge_task method. - result = client.acknowledge_task request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END cloudtasks_v2beta2_generated_CloudTasks_AcknowledgeTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/cancel_lease.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/cancel_lease.rb deleted file mode 100644 index d14830cb0974..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/cancel_lease.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 cloudtasks_v2beta2_generated_CloudTasks_CancelLease_sync] -require "google/cloud/tasks/v2beta2" - -## -# Snippet for the cancel_lease call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#cancel_lease. -# -def cancel_lease - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta2::CancelLeaseRequest.new - - # Call the cancel_lease method. - result = client.cancel_lease request - - # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. - p result -end -# [END cloudtasks_v2beta2_generated_CloudTasks_CancelLease_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/create_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/create_queue.rb deleted file mode 100644 index 9c97427bd607..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/create_queue.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 cloudtasks_v2beta2_generated_CloudTasks_CreateQueue_sync] -require "google/cloud/tasks/v2beta2" - -## -# Snippet for the create_queue call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_queue. -# -def create_queue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta2::CreateQueueRequest.new - - # Call the create_queue method. - result = client.create_queue request - - # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. - p result -end -# [END cloudtasks_v2beta2_generated_CloudTasks_CreateQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/create_task.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/create_task.rb deleted file mode 100644 index e0bf7a6bb378..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/create_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudtasks_v2beta2_generated_CloudTasks_CreateTask_sync] -require "google/cloud/tasks/v2beta2" - -## -# Snippet for the create_task call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task. -# -def create_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta2::CreateTaskRequest.new - - # Call the create_task method. - result = client.create_task request - - # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. - p result -end -# [END cloudtasks_v2beta2_generated_CloudTasks_CreateTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/delete_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/delete_queue.rb deleted file mode 100644 index b5a51bf66325..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/delete_queue.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 cloudtasks_v2beta2_generated_CloudTasks_DeleteQueue_sync] -require "google/cloud/tasks/v2beta2" - -## -# Snippet for the delete_queue call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#delete_queue. -# -def delete_queue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta2::DeleteQueueRequest.new - - # Call the delete_queue method. - result = client.delete_queue request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END cloudtasks_v2beta2_generated_CloudTasks_DeleteQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/delete_task.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/delete_task.rb deleted file mode 100644 index e140f2dd5bed..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/delete_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudtasks_v2beta2_generated_CloudTasks_DeleteTask_sync] -require "google/cloud/tasks/v2beta2" - -## -# Snippet for the delete_task call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#delete_task. -# -def delete_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta2::DeleteTaskRequest.new - - # Call the delete_task method. - result = client.delete_task request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END cloudtasks_v2beta2_generated_CloudTasks_DeleteTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/get_iam_policy.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/get_iam_policy.rb deleted file mode 100644 index 1c993e8e0b61..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/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 cloudtasks_v2beta2_generated_CloudTasks_GetIamPolicy_sync] -require "google/cloud/tasks/v2beta2" - -## -# Snippet for the get_iam_policy call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta2::CloudTasks::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 cloudtasks_v2beta2_generated_CloudTasks_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/get_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/get_queue.rb deleted file mode 100644 index 5ec8ef1c332d..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/get_queue.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 cloudtasks_v2beta2_generated_CloudTasks_GetQueue_sync] -require "google/cloud/tasks/v2beta2" - -## -# Snippet for the get_queue call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#get_queue. -# -def get_queue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta2::GetQueueRequest.new - - # Call the get_queue method. - result = client.get_queue request - - # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. - p result -end -# [END cloudtasks_v2beta2_generated_CloudTasks_GetQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/get_task.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/get_task.rb deleted file mode 100644 index a4511bfe5be7..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/get_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudtasks_v2beta2_generated_CloudTasks_GetTask_sync] -require "google/cloud/tasks/v2beta2" - -## -# Snippet for the get_task call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#get_task. -# -def get_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta2::GetTaskRequest.new - - # Call the get_task method. - result = client.get_task request - - # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. - p result -end -# [END cloudtasks_v2beta2_generated_CloudTasks_GetTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/lease_tasks.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/lease_tasks.rb deleted file mode 100644 index 20aec0526b69..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/lease_tasks.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 cloudtasks_v2beta2_generated_CloudTasks_LeaseTasks_sync] -require "google/cloud/tasks/v2beta2" - -## -# Snippet for the lease_tasks call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks. -# -def lease_tasks - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta2::LeaseTasksRequest.new - - # Call the lease_tasks method. - result = client.lease_tasks request - - # The returned object is of type Google::Cloud::Tasks::V2beta2::LeaseTasksResponse. - p result -end -# [END cloudtasks_v2beta2_generated_CloudTasks_LeaseTasks_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/list_queues.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/list_queues.rb deleted file mode 100644 index 0338b25067c5..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/list_queues.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 cloudtasks_v2beta2_generated_CloudTasks_ListQueues_sync] -require "google/cloud/tasks/v2beta2" - -## -# Snippet for the list_queues call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_queues. -# -def list_queues - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta2::ListQueuesRequest.new - - # Call the list_queues method. - result = client.list_queues request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Tasks::V2beta2::Queue. - p item - end -end -# [END cloudtasks_v2beta2_generated_CloudTasks_ListQueues_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/list_tasks.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/list_tasks.rb deleted file mode 100644 index a88f6c92ccec..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/list_tasks.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudtasks_v2beta2_generated_CloudTasks_ListTasks_sync] -require "google/cloud/tasks/v2beta2" - -## -# Snippet for the list_tasks call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_tasks. -# -def list_tasks - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta2::ListTasksRequest.new - - # Call the list_tasks method. - result = client.list_tasks request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Tasks::V2beta2::Task. - p item - end -end -# [END cloudtasks_v2beta2_generated_CloudTasks_ListTasks_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/pause_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/pause_queue.rb deleted file mode 100644 index f37d59216de0..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/pause_queue.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 cloudtasks_v2beta2_generated_CloudTasks_PauseQueue_sync] -require "google/cloud/tasks/v2beta2" - -## -# Snippet for the pause_queue call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#pause_queue. -# -def pause_queue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta2::PauseQueueRequest.new - - # Call the pause_queue method. - result = client.pause_queue request - - # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. - p result -end -# [END cloudtasks_v2beta2_generated_CloudTasks_PauseQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/purge_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/purge_queue.rb deleted file mode 100644 index 8e55f1adbd2b..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/purge_queue.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 cloudtasks_v2beta2_generated_CloudTasks_PurgeQueue_sync] -require "google/cloud/tasks/v2beta2" - -## -# Snippet for the purge_queue call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#purge_queue. -# -def purge_queue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta2::PurgeQueueRequest.new - - # Call the purge_queue method. - result = client.purge_queue request - - # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. - p result -end -# [END cloudtasks_v2beta2_generated_CloudTasks_PurgeQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/renew_lease.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/renew_lease.rb deleted file mode 100644 index c73fde9eddb4..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/renew_lease.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 cloudtasks_v2beta2_generated_CloudTasks_RenewLease_sync] -require "google/cloud/tasks/v2beta2" - -## -# Snippet for the renew_lease call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#renew_lease. -# -def renew_lease - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta2::RenewLeaseRequest.new - - # Call the renew_lease method. - result = client.renew_lease request - - # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. - p result -end -# [END cloudtasks_v2beta2_generated_CloudTasks_RenewLease_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/resume_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/resume_queue.rb deleted file mode 100644 index d2636e095fa1..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/resume_queue.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 cloudtasks_v2beta2_generated_CloudTasks_ResumeQueue_sync] -require "google/cloud/tasks/v2beta2" - -## -# Snippet for the resume_queue call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#resume_queue. -# -def resume_queue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta2::ResumeQueueRequest.new - - # Call the resume_queue method. - result = client.resume_queue request - - # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. - p result -end -# [END cloudtasks_v2beta2_generated_CloudTasks_ResumeQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/run_task.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/run_task.rb deleted file mode 100644 index e68873afd93c..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/run_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudtasks_v2beta2_generated_CloudTasks_RunTask_sync] -require "google/cloud/tasks/v2beta2" - -## -# Snippet for the run_task call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#run_task. -# -def run_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta2::RunTaskRequest.new - - # Call the run_task method. - result = client.run_task request - - # The returned object is of type Google::Cloud::Tasks::V2beta2::Task. - p result -end -# [END cloudtasks_v2beta2_generated_CloudTasks_RunTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/set_iam_policy.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/set_iam_policy.rb deleted file mode 100644 index 9ceb07ceada7..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/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 cloudtasks_v2beta2_generated_CloudTasks_SetIamPolicy_sync] -require "google/cloud/tasks/v2beta2" - -## -# Snippet for the set_iam_policy call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta2::CloudTasks::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 cloudtasks_v2beta2_generated_CloudTasks_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/test_iam_permissions.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/test_iam_permissions.rb deleted file mode 100644 index eb20412a5689..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/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 cloudtasks_v2beta2_generated_CloudTasks_TestIamPermissions_sync] -require "google/cloud/tasks/v2beta2" - -## -# Snippet for the test_iam_permissions call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta2::CloudTasks::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 cloudtasks_v2beta2_generated_CloudTasks_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/update_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/update_queue.rb deleted file mode 100644 index 1811e14dc6e7..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/update_queue.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 cloudtasks_v2beta2_generated_CloudTasks_UpdateQueue_sync] -require "google/cloud/tasks/v2beta2" - -## -# Snippet for the update_queue call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#update_queue. -# -def update_queue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta2::UpdateQueueRequest.new - - # Call the update_queue method. - result = client.update_queue request - - # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue. - p result -end -# [END cloudtasks_v2beta2_generated_CloudTasks_UpdateQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/upload_queue_yaml.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/upload_queue_yaml.rb deleted file mode 100644 index affb52517a64..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/cloud_tasks/upload_queue_yaml.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 cloudtasks_v2beta2_generated_CloudTasks_UploadQueueYaml_sync] -require "google/cloud/tasks/v2beta2" - -## -# Snippet for the upload_queue_yaml call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta2::CloudTasks::Client#upload_queue_yaml. -# -def upload_queue_yaml - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta2::UploadQueueYamlRequest.new - - # Call the upload_queue_yaml method. - result = client.upload_queue_yaml request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END cloudtasks_v2beta2_generated_CloudTasks_UploadQueueYaml_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/snippet_metadata_google.cloud.tasks.v2beta2.json b/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/snippet_metadata_google.cloud.tasks.v2beta2.json deleted file mode 100644 index cc2f4452567f..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/snippets/snippet_metadata_google.cloud.tasks.v2beta2.json +++ /dev/null @@ -1,855 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-tasks-v2beta2", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.tasks.v2beta2", - "version": "v2beta2" - } - ] - }, - "snippets": [ - { - "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_ListQueues_sync", - "title": "Snippet for the list_queues call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_queues.", - "file": "cloud_tasks/list_queues.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_queues", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_queues", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta2::ListQueuesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2beta2::ListQueuesResponse", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" - }, - "method": { - "short_name": "ListQueues", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks.ListQueues", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_GetQueue_sync", - "title": "Snippet for the get_queue call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#get_queue.", - "file": "cloud_tasks/get_queue.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_queue", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#get_queue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta2::GetQueueRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2beta2::Queue", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" - }, - "method": { - "short_name": "GetQueue", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks.GetQueue", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_CreateQueue_sync", - "title": "Snippet for the create_queue call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_queue.", - "file": "cloud_tasks/create_queue.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_queue", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_queue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta2::CreateQueueRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2beta2::Queue", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" - }, - "method": { - "short_name": "CreateQueue", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks.CreateQueue", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_UpdateQueue_sync", - "title": "Snippet for the update_queue call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#update_queue.", - "file": "cloud_tasks/update_queue.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_queue", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#update_queue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2beta2::Queue", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" - }, - "method": { - "short_name": "UpdateQueue", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_DeleteQueue_sync", - "title": "Snippet for the delete_queue call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#delete_queue.", - "file": "cloud_tasks/delete_queue.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_queue", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#delete_queue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" - }, - "method": { - "short_name": "DeleteQueue", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_PurgeQueue_sync", - "title": "Snippet for the purge_queue call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#purge_queue.", - "file": "cloud_tasks/purge_queue.rb", - "language": "RUBY", - "client_method": { - "short_name": "purge_queue", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#purge_queue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2beta2::Queue", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" - }, - "method": { - "short_name": "PurgeQueue", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_PauseQueue_sync", - "title": "Snippet for the pause_queue call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#pause_queue.", - "file": "cloud_tasks/pause_queue.rb", - "language": "RUBY", - "client_method": { - "short_name": "pause_queue", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#pause_queue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta2::PauseQueueRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2beta2::Queue", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" - }, - "method": { - "short_name": "PauseQueue", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks.PauseQueue", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_ResumeQueue_sync", - "title": "Snippet for the resume_queue call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#resume_queue.", - "file": "cloud_tasks/resume_queue.rb", - "language": "RUBY", - "client_method": { - "short_name": "resume_queue", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#resume_queue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2beta2::Queue", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" - }, - "method": { - "short_name": "ResumeQueue", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_UploadQueueYaml_sync", - "title": "Snippet for the upload_queue_yaml call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#upload_queue_yaml.", - "file": "cloud_tasks/upload_queue_yaml.rb", - "language": "RUBY", - "client_method": { - "short_name": "upload_queue_yaml", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#upload_queue_yaml", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta2::UploadQueueYamlRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" - }, - "method": { - "short_name": "UploadQueueYaml", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks.UploadQueueYaml", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#get_iam_policy.", - "file": "cloud_tasks/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks.GetIamPolicy", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#set_iam_policy.", - "file": "cloud_tasks/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks.SetIamPolicy", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#test_iam_permissions.", - "file": "cloud_tasks/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks.TestIamPermissions", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_ListTasks_sync", - "title": "Snippet for the list_tasks call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_tasks.", - "file": "cloud_tasks/list_tasks.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_tasks", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_tasks", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta2::ListTasksRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2beta2::ListTasksResponse", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" - }, - "method": { - "short_name": "ListTasks", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks.ListTasks", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_GetTask_sync", - "title": "Snippet for the get_task call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#get_task.", - "file": "cloud_tasks/get_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_task", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#get_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta2::GetTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2beta2::Task", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" - }, - "method": { - "short_name": "GetTask", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks.GetTask", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_CreateTask_sync", - "title": "Snippet for the create_task call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task.", - "file": "cloud_tasks/create_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_task", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta2::CreateTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2beta2::Task", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" - }, - "method": { - "short_name": "CreateTask", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks.CreateTask", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_DeleteTask_sync", - "title": "Snippet for the delete_task call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#delete_task.", - "file": "cloud_tasks/delete_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_task", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#delete_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" - }, - "method": { - "short_name": "DeleteTask", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks.DeleteTask", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_LeaseTasks_sync", - "title": "Snippet for the lease_tasks call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks.", - "file": "cloud_tasks/lease_tasks.rb", - "language": "RUBY", - "client_method": { - "short_name": "lease_tasks", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" - }, - "method": { - "short_name": "LeaseTasks", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_AcknowledgeTask_sync", - "title": "Snippet for the acknowledge_task call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#acknowledge_task.", - "file": "cloud_tasks/acknowledge_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "acknowledge_task", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#acknowledge_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" - }, - "method": { - "short_name": "AcknowledgeTask", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_RenewLease_sync", - "title": "Snippet for the renew_lease call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#renew_lease.", - "file": "cloud_tasks/renew_lease.rb", - "language": "RUBY", - "client_method": { - "short_name": "renew_lease", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#renew_lease", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2beta2::Task", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" - }, - "method": { - "short_name": "RenewLease", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks.RenewLease", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_CancelLease_sync", - "title": "Snippet for the cancel_lease call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#cancel_lease.", - "file": "cloud_tasks/cancel_lease.rb", - "language": "RUBY", - "client_method": { - "short_name": "cancel_lease", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#cancel_lease", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2beta2::Task", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" - }, - "method": { - "short_name": "CancelLease", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks.CancelLease", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta2_generated_CloudTasks_RunTask_sync", - "title": "Snippet for the run_task call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta2::CloudTasks::Client#run_task.", - "file": "cloud_tasks/run_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "run_task", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#run_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta2::RunTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2beta2::Task", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta2::CloudTasks::Client" - }, - "method": { - "short_name": "RunTask", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks.RunTask", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta2.CloudTasks" - } - } - }, - "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-tasks-v2beta2/test/google/cloud/tasks/v2beta2/cloud_tasks_paths_test.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/test/google/cloud/tasks/v2beta2/cloud_tasks_paths_test.rb deleted file mode 100644 index 898df1868940..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/test/google/cloud/tasks/v2beta2/cloud_tasks_paths_test.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/tasks/v2beta2/cloud_tasks" - -class ::Google::Cloud::Tasks::V2beta2::CloudTasks::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_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::Tasks::V2beta2::CloudTasks::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_queue_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.queue_path project: "value0", location: "value1", queue: "value2" - assert_equal "projects/value0/locations/value1/queues/value2", path - end - end - - def test_task_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.task_path project: "value0", location: "value1", queue: "value2", task: "value3" - assert_equal "projects/value0/locations/value1/queues/value2/tasks/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/test/google/cloud/tasks/v2beta2/cloud_tasks_rest_test.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/test/google/cloud/tasks/v2beta2/cloud_tasks_rest_test.rb deleted file mode 100644 index adc077978678..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/test/google/cloud/tasks/v2beta2/cloud_tasks_rest_test.rb +++ /dev/null @@ -1,1207 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/tasks/v2beta2/cloudtasks_pb" -require "google/cloud/tasks/v2beta2/cloud_tasks/rest" - - -class ::Google::Cloud::Tasks::V2beta2::CloudTasks::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_queues - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2beta2::ListQueuesResponse.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" - read_mask = {} - - list_queues_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_list_queues_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_queues_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_queues({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_queues parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_queues ::Google::Cloud::Tasks::V2beta2::ListQueuesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_queues({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_queues(::Google::Cloud::Tasks::V2beta2::ListQueuesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_queues_client_stub.call_count - end - end - end - - def test_get_queue - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2beta2::Queue.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - read_mask = {} - - get_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_get_queue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_queue({ name: name, read_mask: read_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_queue name: name, read_mask: read_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_queue ::Google::Cloud::Tasks::V2beta2::GetQueueRequest.new(name: name, read_mask: read_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_queue({ name: name, read_mask: read_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_queue(::Google::Cloud::Tasks::V2beta2::GetQueueRequest.new(name: name, read_mask: read_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_queue_client_stub.call_count - end - end - end - - def test_create_queue - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2beta2::Queue.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - queue = {} - - create_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_create_queue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_queue({ parent: parent, queue: queue }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_queue parent: parent, queue: queue do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_queue ::Google::Cloud::Tasks::V2beta2::CreateQueueRequest.new(parent: parent, queue: queue) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_queue({ parent: parent, queue: queue }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_queue(::Google::Cloud::Tasks::V2beta2::CreateQueueRequest.new(parent: parent, queue: queue), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_queue_client_stub.call_count - end - end - end - - def test_update_queue - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2beta2::Queue.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - queue = {} - update_mask = {} - - update_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_update_queue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_queue({ queue: queue, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_queue queue: queue, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_queue ::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest.new(queue: queue, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_queue({ queue: queue, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_queue(::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest.new(queue: queue, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_queue_client_stub.call_count - end - end - end - - def test_delete_queue - # 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_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_delete_queue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_queue({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_queue name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_queue ::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_queue({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_queue(::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_queue_client_stub.call_count - end - end - end - - def test_purge_queue - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2beta2::Queue.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - purge_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_purge_queue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, purge_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.purge_queue({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.purge_queue name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.purge_queue ::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.purge_queue({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.purge_queue(::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, purge_queue_client_stub.call_count - end - end - end - - def test_pause_queue - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2beta2::Queue.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - pause_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_pause_queue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, pause_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.pause_queue({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.pause_queue name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.pause_queue ::Google::Cloud::Tasks::V2beta2::PauseQueueRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.pause_queue({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.pause_queue(::Google::Cloud::Tasks::V2beta2::PauseQueueRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, pause_queue_client_stub.call_count - end - end - end - - def test_resume_queue - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2beta2::Queue.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - resume_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_resume_queue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, resume_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.resume_queue({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.resume_queue name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.resume_queue ::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.resume_queue({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.resume_queue(::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, resume_queue_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::Tasks::V2beta2::CloudTasks::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::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_set_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta2::CloudTasks::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::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_count - end - end - end - - def test_test_iam_permissions - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta2::CloudTasks::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::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_count - end - end - end - - def test_list_tasks - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2beta2::ListTasksResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - response_view = :VIEW_UNSPECIFIED - page_size = 42 - page_token = "hello world" - - list_tasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_list_tasks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_tasks_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_tasks({ parent: parent, response_view: response_view, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_tasks parent: parent, response_view: response_view, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_tasks ::Google::Cloud::Tasks::V2beta2::ListTasksRequest.new(parent: parent, response_view: response_view, 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_tasks({ parent: parent, response_view: response_view, 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_tasks(::Google::Cloud::Tasks::V2beta2::ListTasksRequest.new(parent: parent, response_view: response_view, 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_tasks_client_stub.call_count - end - end - end - - def test_get_task - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2beta2::Task.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - response_view = :VIEW_UNSPECIFIED - - get_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_get_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_task({ name: name, response_view: response_view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_task name: name, response_view: response_view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_task ::Google::Cloud::Tasks::V2beta2::GetTaskRequest.new(name: name, response_view: response_view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_task({ name: name, response_view: response_view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_task(::Google::Cloud::Tasks::V2beta2::GetTaskRequest.new(name: name, response_view: response_view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_task_client_stub.call_count - end - end - end - - def test_create_task - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2beta2::Task.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - task = {} - response_view = :VIEW_UNSPECIFIED - - create_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_create_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_task({ parent: parent, task: task, response_view: response_view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_task parent: parent, task: task, response_view: response_view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_task ::Google::Cloud::Tasks::V2beta2::CreateTaskRequest.new(parent: parent, task: task, response_view: response_view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_task({ parent: parent, task: task, response_view: response_view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_task(::Google::Cloud::Tasks::V2beta2::CreateTaskRequest.new(parent: parent, task: task, response_view: response_view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_task_client_stub.call_count - end - end - end - - def test_delete_task - # 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_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_delete_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_task({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_task name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_task ::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_task({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_task(::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_task_client_stub.call_count - end - end - end - - def test_lease_tasks - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - max_tasks = 42 - lease_duration = {} - response_view = :VIEW_UNSPECIFIED - filter = "hello world" - - lease_tasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_lease_tasks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, lease_tasks_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.lease_tasks({ parent: parent, max_tasks: max_tasks, lease_duration: lease_duration, response_view: response_view, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.lease_tasks parent: parent, max_tasks: max_tasks, lease_duration: lease_duration, response_view: response_view, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.lease_tasks ::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest.new(parent: parent, max_tasks: max_tasks, lease_duration: lease_duration, response_view: response_view, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.lease_tasks({ parent: parent, max_tasks: max_tasks, lease_duration: lease_duration, response_view: response_view, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.lease_tasks(::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest.new(parent: parent, max_tasks: max_tasks, lease_duration: lease_duration, response_view: response_view, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, lease_tasks_client_stub.call_count - end - end - end - - def test_acknowledge_task - # 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" - schedule_time = {} - - acknowledge_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_acknowledge_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, acknowledge_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.acknowledge_task({ name: name, schedule_time: schedule_time }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.acknowledge_task name: name, schedule_time: schedule_time do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.acknowledge_task ::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest.new(name: name, schedule_time: schedule_time) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.acknowledge_task({ name: name, schedule_time: schedule_time }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.acknowledge_task(::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest.new(name: name, schedule_time: schedule_time), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, acknowledge_task_client_stub.call_count - end - end - end - - def test_renew_lease - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2beta2::Task.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - schedule_time = {} - lease_duration = {} - response_view = :VIEW_UNSPECIFIED - - renew_lease_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_renew_lease_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, renew_lease_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.renew_lease({ name: name, schedule_time: schedule_time, lease_duration: lease_duration, response_view: response_view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.renew_lease name: name, schedule_time: schedule_time, lease_duration: lease_duration, response_view: response_view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.renew_lease ::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest.new(name: name, schedule_time: schedule_time, lease_duration: lease_duration, response_view: response_view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.renew_lease({ name: name, schedule_time: schedule_time, lease_duration: lease_duration, response_view: response_view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.renew_lease(::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest.new(name: name, schedule_time: schedule_time, lease_duration: lease_duration, response_view: response_view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, renew_lease_client_stub.call_count - end - end - end - - def test_cancel_lease - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2beta2::Task.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - schedule_time = {} - response_view = :VIEW_UNSPECIFIED - - cancel_lease_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_cancel_lease_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, cancel_lease_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.cancel_lease({ name: name, schedule_time: schedule_time, response_view: response_view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.cancel_lease name: name, schedule_time: schedule_time, response_view: response_view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.cancel_lease ::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest.new(name: name, schedule_time: schedule_time, response_view: response_view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.cancel_lease({ name: name, schedule_time: schedule_time, response_view: response_view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.cancel_lease(::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest.new(name: name, schedule_time: schedule_time, response_view: response_view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, cancel_lease_client_stub.call_count - end - end - end - - def test_run_task - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2beta2::Task.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - response_view = :VIEW_UNSPECIFIED - - run_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::ServiceStub.stub :transcode_run_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, run_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.run_task({ name: name, response_view: response_view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.run_task name: name, response_view: response_view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.run_task ::Google::Cloud::Tasks::V2beta2::RunTaskRequest.new(name: name, response_view: response_view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.run_task({ name: name, response_view: response_view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.run_task(::Google::Cloud::Tasks::V2beta2::RunTaskRequest.new(name: name, response_view: response_view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, run_task_client_stub.call_count - end - end - end - - def test_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::Tasks::V2beta2::CloudTasks::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::Tasks::V2beta2::CloudTasks::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/test/google/cloud/tasks/v2beta2/cloud_tasks_test.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/test/google/cloud/tasks/v2beta2/cloud_tasks_test.rb deleted file mode 100644 index e8e1832596d6..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/test/google/cloud/tasks/v2beta2/cloud_tasks_test.rb +++ /dev/null @@ -1,1391 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/tasks/v2beta2/cloudtasks_pb" -require "google/cloud/tasks/v2beta2/cloud_tasks" - -class ::Google::Cloud::Tasks::V2beta2::CloudTasks::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_queues - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2beta2::ListQueuesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - read_mask = {} - - list_queues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_queues, name - assert_kind_of ::Google::Cloud::Tasks::V2beta2::ListQueuesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_queues_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_queues({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_queues parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_queues ::Google::Cloud::Tasks::V2beta2::ListQueuesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_queues({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_queues(::Google::Cloud::Tasks::V2beta2::ListQueuesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_queues_client_stub.call_rpc_count - end - end - - def test_get_queue - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2beta2::Queue.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - read_mask = {} - - get_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_queue, name - assert_kind_of ::Google::Cloud::Tasks::V2beta2::GetQueueRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_queue({ name: name, read_mask: read_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_queue name: name, read_mask: read_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_queue ::Google::Cloud::Tasks::V2beta2::GetQueueRequest.new(name: name, read_mask: read_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_queue({ name: name, read_mask: read_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_queue(::Google::Cloud::Tasks::V2beta2::GetQueueRequest.new(name: name, read_mask: read_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_queue_client_stub.call_rpc_count - end - end - - def test_create_queue - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2beta2::Queue.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - queue = {} - - create_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_queue, name - assert_kind_of ::Google::Cloud::Tasks::V2beta2::CreateQueueRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Tasks::V2beta2::Queue), request["queue"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_queue({ parent: parent, queue: queue }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_queue parent: parent, queue: queue do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_queue ::Google::Cloud::Tasks::V2beta2::CreateQueueRequest.new(parent: parent, queue: queue) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_queue({ parent: parent, queue: queue }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_queue(::Google::Cloud::Tasks::V2beta2::CreateQueueRequest.new(parent: parent, queue: queue), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_queue_client_stub.call_rpc_count - end - end - - def test_update_queue - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2beta2::Queue.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - queue = {} - update_mask = {} - - update_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_queue, name - assert_kind_of ::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Tasks::V2beta2::Queue), request["queue"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_queue({ queue: queue, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_queue queue: queue, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_queue ::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest.new(queue: queue, 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_queue({ queue: queue, 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_queue(::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest.new(queue: queue, 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_queue_client_stub.call_rpc_count - end - end - - def test_delete_queue - # 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_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_queue, name - assert_kind_of ::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_queue({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_queue name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_queue ::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_queue({ 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_queue(::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest.new(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_queue_client_stub.call_rpc_count - end - end - - def test_purge_queue - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2beta2::Queue.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - purge_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :purge_queue, name - assert_kind_of ::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, purge_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.purge_queue({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.purge_queue name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.purge_queue ::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.purge_queue({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.purge_queue(::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, purge_queue_client_stub.call_rpc_count - end - end - - def test_pause_queue - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2beta2::Queue.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - pause_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :pause_queue, name - assert_kind_of ::Google::Cloud::Tasks::V2beta2::PauseQueueRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, pause_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.pause_queue({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.pause_queue name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.pause_queue ::Google::Cloud::Tasks::V2beta2::PauseQueueRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.pause_queue({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.pause_queue(::Google::Cloud::Tasks::V2beta2::PauseQueueRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, pause_queue_client_stub.call_rpc_count - end - end - - def test_resume_queue - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2beta2::Queue.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - resume_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :resume_queue, name - assert_kind_of ::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, resume_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.resume_queue({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.resume_queue name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.resume_queue ::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.resume_queue({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.resume_queue(::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, resume_queue_client_stub.call_rpc_count - end - end - - def test_upload_queue_yaml - # 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. - app_id = "hello world" - http_body = {} - - upload_queue_yaml_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :upload_queue_yaml, name - assert_kind_of ::Google::Cloud::Tasks::V2beta2::UploadQueueYamlRequest, request - assert_equal "hello world", request["app_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Api::HttpBody), request["http_body"] - assert request.has_http_body? - refute_nil options - end - - Gapic::ServiceStub.stub :new, upload_queue_yaml_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.upload_queue_yaml({ app_id: app_id, http_body: http_body }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.upload_queue_yaml app_id: app_id, http_body: http_body do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.upload_queue_yaml ::Google::Cloud::Tasks::V2beta2::UploadQueueYamlRequest.new(app_id: app_id, http_body: http_body) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.upload_queue_yaml({ app_id: app_id, http_body: http_body }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.upload_queue_yaml(::Google::Cloud::Tasks::V2beta2::UploadQueueYamlRequest.new(app_id: app_id, http_body: http_body), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, upload_queue_yaml_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::Tasks::V2beta2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_rpc_count - end - end - - def test_test_iam_permissions - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_rpc_count - end - end - - def test_list_tasks - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2beta2::ListTasksResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - response_view = :VIEW_UNSPECIFIED - page_size = 42 - page_token = "hello world" - - list_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_tasks, name - assert_kind_of ::Google::Cloud::Tasks::V2beta2::ListTasksRequest, request - assert_equal "hello world", request["parent"] - assert_equal :VIEW_UNSPECIFIED, request["response_view"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_tasks_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_tasks({ parent: parent, response_view: response_view, 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_tasks parent: parent, response_view: response_view, 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_tasks ::Google::Cloud::Tasks::V2beta2::ListTasksRequest.new(parent: parent, response_view: response_view, 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_tasks({ parent: parent, response_view: response_view, 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_tasks(::Google::Cloud::Tasks::V2beta2::ListTasksRequest.new(parent: parent, response_view: response_view, 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_tasks_client_stub.call_rpc_count - end - end - - def test_get_task - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2beta2::Task.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - response_view = :VIEW_UNSPECIFIED - - get_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_task, name - assert_kind_of ::Google::Cloud::Tasks::V2beta2::GetTaskRequest, request - assert_equal "hello world", request["name"] - assert_equal :VIEW_UNSPECIFIED, request["response_view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_task({ name: name, response_view: response_view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_task name: name, response_view: response_view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_task ::Google::Cloud::Tasks::V2beta2::GetTaskRequest.new(name: name, response_view: response_view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_task({ name: name, response_view: response_view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_task(::Google::Cloud::Tasks::V2beta2::GetTaskRequest.new(name: name, response_view: response_view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_task_client_stub.call_rpc_count - end - end - - def test_create_task - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2beta2::Task.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - task = {} - response_view = :VIEW_UNSPECIFIED - - create_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_task, name - assert_kind_of ::Google::Cloud::Tasks::V2beta2::CreateTaskRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Tasks::V2beta2::Task), request["task"] - assert_equal :VIEW_UNSPECIFIED, request["response_view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_task({ parent: parent, task: task, response_view: response_view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_task parent: parent, task: task, response_view: response_view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_task ::Google::Cloud::Tasks::V2beta2::CreateTaskRequest.new(parent: parent, task: task, response_view: response_view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_task({ parent: parent, task: task, response_view: response_view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_task(::Google::Cloud::Tasks::V2beta2::CreateTaskRequest.new(parent: parent, task: task, response_view: response_view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_task_client_stub.call_rpc_count - end - end - - def test_delete_task - # 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_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_task, name - assert_kind_of ::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_task({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_task name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_task ::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_task({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_task(::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest.new(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_task_client_stub.call_rpc_count - end - end - - def test_lease_tasks - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - max_tasks = 42 - lease_duration = {} - response_view = :VIEW_UNSPECIFIED - filter = "hello world" - - lease_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :lease_tasks, name - assert_kind_of ::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["max_tasks"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["lease_duration"] - assert_equal :VIEW_UNSPECIFIED, request["response_view"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, lease_tasks_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.lease_tasks({ parent: parent, max_tasks: max_tasks, lease_duration: lease_duration, response_view: response_view, filter: filter }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.lease_tasks parent: parent, max_tasks: max_tasks, lease_duration: lease_duration, response_view: response_view, filter: filter do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.lease_tasks ::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest.new(parent: parent, max_tasks: max_tasks, lease_duration: lease_duration, response_view: response_view, filter: filter) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.lease_tasks({ parent: parent, max_tasks: max_tasks, lease_duration: lease_duration, response_view: response_view, filter: filter }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.lease_tasks(::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest.new(parent: parent, max_tasks: max_tasks, lease_duration: lease_duration, response_view: response_view, filter: filter), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, lease_tasks_client_stub.call_rpc_count - end - end - - def test_acknowledge_task - # 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" - schedule_time = {} - - acknowledge_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :acknowledge_task, name - assert_kind_of ::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["schedule_time"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, acknowledge_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.acknowledge_task({ name: name, schedule_time: schedule_time }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.acknowledge_task name: name, schedule_time: schedule_time do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.acknowledge_task ::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest.new(name: name, schedule_time: schedule_time) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.acknowledge_task({ name: name, schedule_time: schedule_time }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.acknowledge_task(::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest.new(name: name, schedule_time: schedule_time), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, acknowledge_task_client_stub.call_rpc_count - end - end - - def test_renew_lease - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2beta2::Task.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - schedule_time = {} - lease_duration = {} - response_view = :VIEW_UNSPECIFIED - - renew_lease_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :renew_lease, name - assert_kind_of ::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["schedule_time"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["lease_duration"] - assert_equal :VIEW_UNSPECIFIED, request["response_view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, renew_lease_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.renew_lease({ name: name, schedule_time: schedule_time, lease_duration: lease_duration, response_view: response_view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.renew_lease name: name, schedule_time: schedule_time, lease_duration: lease_duration, response_view: response_view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.renew_lease ::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest.new(name: name, schedule_time: schedule_time, lease_duration: lease_duration, response_view: response_view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.renew_lease({ name: name, schedule_time: schedule_time, lease_duration: lease_duration, response_view: response_view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.renew_lease(::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest.new(name: name, schedule_time: schedule_time, lease_duration: lease_duration, response_view: response_view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, renew_lease_client_stub.call_rpc_count - end - end - - def test_cancel_lease - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2beta2::Task.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - schedule_time = {} - response_view = :VIEW_UNSPECIFIED - - cancel_lease_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_lease, name - assert_kind_of ::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["schedule_time"] - assert_equal :VIEW_UNSPECIFIED, request["response_view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_lease_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_lease({ name: name, schedule_time: schedule_time, response_view: response_view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_lease name: name, schedule_time: schedule_time, response_view: response_view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_lease ::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest.new(name: name, schedule_time: schedule_time, response_view: response_view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_lease({ name: name, schedule_time: schedule_time, response_view: response_view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_lease(::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest.new(name: name, schedule_time: schedule_time, response_view: response_view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_lease_client_stub.call_rpc_count - end - end - - def test_run_task - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2beta2::Task.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - response_view = :VIEW_UNSPECIFIED - - run_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :run_task, name - assert_kind_of ::Google::Cloud::Tasks::V2beta2::RunTaskRequest, request - assert_equal "hello world", request["name"] - assert_equal :VIEW_UNSPECIFIED, request["response_view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, run_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.run_task({ name: name, response_view: response_view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.run_task name: name, response_view: response_view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.run_task ::Google::Cloud::Tasks::V2beta2::RunTaskRequest.new(name: name, response_view: response_view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.run_task({ name: name, response_view: response_view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.run_task(::Google::Cloud::Tasks::V2beta2::RunTaskRequest.new(name: name, response_view: response_view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, run_task_client_stub.call_rpc_count - end - end - - def test_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::Tasks::V2beta2::CloudTasks::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::Tasks::V2beta2::CloudTasks::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::Tasks::V2beta2::CloudTasks::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta2/test/helper.rb b/owl-bot-staging/google-cloud-tasks-v2beta2/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta2/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/.gitignore b/owl-bot-staging/google-cloud-tasks-v2beta3/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/.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-tasks-v2beta3/.repo-metadata.json b/owl-bot-staging/google-cloud-tasks-v2beta3/.repo-metadata.json deleted file mode 100644 index 1acb6f32f0fe..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "cloudtasks.googleapis.com", - "api_shortname": "cloudtasks", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta3/latest", - "distribution_name": "google-cloud-tasks-v2beta3", - "is_cloud": true, - "language": "ruby", - "name": "cloudtasks", - "name_pretty": "Cloud Tasks V2beta3 API", - "product_documentation": "https://cloud.google.com/tasks", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Cloud Tasks is a fully managed service that allows you to manage the execution, dispatch and delivery of a large number of distributed tasks. You can asynchronously perform work outside of a user request. Your tasks can be executed on App Engine or any arbitrary HTTP endpoint. Note that google-cloud-tasks-v2beta3 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-tasks instead. See the readme for more details.", - "ruby-cloud-env-prefix": "TASKS", - "ruby-cloud-product-url": "https://cloud.google.com/tasks", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/.rubocop.yml b/owl-bot-staging/google-cloud-tasks-v2beta3/.rubocop.yml deleted file mode 100644 index da9d8f7ee985..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-tasks-v2beta3.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-tasks-v2beta3.rb" diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/.toys.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/.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-tasks-v2beta3/.yardopts b/owl-bot-staging/google-cloud-tasks-v2beta3/.yardopts deleted file mode 100644 index 07f7a83a5822..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Tasks V2beta3 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-tasks-v2beta3/AUTHENTICATION.md b/owl-bot-staging/google-cloud-tasks-v2beta3/AUTHENTICATION.md deleted file mode 100644 index 8a26642ba1e1..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-tasks-v2beta3 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-tasks-v2beta3 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/tasks/v2beta3" - -client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/tasks/v2beta3" - -::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::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-tasks-v2beta3 -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/tasks/v2beta3" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::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-tasks-v2beta3/CHANGELOG.md b/owl-bot-staging/google-cloud-tasks-v2beta3/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/Gemfile b/owl-bot-staging/google-cloud-tasks-v2beta3/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/LICENSE.md b/owl-bot-staging/google-cloud-tasks-v2beta3/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3/README.md b/owl-bot-staging/google-cloud-tasks-v2beta3/README.md deleted file mode 100644 index 410125fde32f..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Tasks V2beta3 API - -Manages the execution of large numbers of distributed requests. - -Cloud Tasks is a fully managed service that allows you to manage the execution, dispatch and delivery of a large number of distributed tasks. You can asynchronously perform work outside of a user request. Your tasks can be executed on App Engine or any arbitrary HTTP endpoint. - -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 Tasks V2beta3 API. Most users should consider using -the main client gem, -[google-cloud-tasks](https://rubygems.org/gems/google-cloud-tasks). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-tasks-v2beta3 -``` - -## 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/cloudtasks.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/tasks/v2beta3" - -client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new -request = ::Google::Cloud::Tasks::V2beta3::ListQueuesRequest.new # (request fields as keyword arguments...) -response = client.list_queues request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta3/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/tasks) -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/tasks/v2beta3" -require "logger" - -client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::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-tasks`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-tasks-v2beta3`. -_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-tasks`. -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-tasks-v2beta3`. - -### 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-tasks-v2beta3/Rakefile b/owl-bot-staging/google-cloud-tasks-v2beta3/Rakefile deleted file mode 100644 index 9d14c39d473d..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["TASKS_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["TASKS_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["TASKS_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 TASKS_TEST_PROJECT=test123 TASKS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/tasks/v2beta3/cloud_tasks/credentials" - ::Google::Cloud::Tasks::V2beta3::CloudTasks::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["TASKS_PROJECT"] = project - ENV["TASKS_TEST_PROJECT"] = project - ENV["TASKS_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-tasks-v2beta3 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-tasks-v2beta3 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-tasks-v2beta3 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-tasks-v2beta3 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-tasks-v2beta3" - header "google-cloud-tasks-v2beta3 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-tasks-v2beta3 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-tasks-v2beta3 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-tasks-v2beta3 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-tasks-v2beta3 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-tasks-v2beta3/gapic_metadata.json b/owl-bot-staging/google-cloud-tasks-v2beta3/gapic_metadata.json deleted file mode 100644 index d31c26024e7f..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/gapic_metadata.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.tasks.v2beta3", - "libraryPackage": "::Google::Cloud::Tasks::V2beta3", - "services": { - "CloudTasks": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client", - "rpcs": { - "ListQueues": { - "methods": [ - "list_queues" - ] - }, - "GetQueue": { - "methods": [ - "get_queue" - ] - }, - "CreateQueue": { - "methods": [ - "create_queue" - ] - }, - "UpdateQueue": { - "methods": [ - "update_queue" - ] - }, - "DeleteQueue": { - "methods": [ - "delete_queue" - ] - }, - "PurgeQueue": { - "methods": [ - "purge_queue" - ] - }, - "PauseQueue": { - "methods": [ - "pause_queue" - ] - }, - "ResumeQueue": { - "methods": [ - "resume_queue" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - }, - "ListTasks": { - "methods": [ - "list_tasks" - ] - }, - "GetTask": { - "methods": [ - "get_task" - ] - }, - "CreateTask": { - "methods": [ - "create_task" - ] - }, - "DeleteTask": { - "methods": [ - "delete_task" - ] - }, - "RunTask": { - "methods": [ - "run_task" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/google-cloud-tasks-v2beta3.gemspec b/owl-bot-staging/google-cloud-tasks-v2beta3/google-cloud-tasks-v2beta3.gemspec deleted file mode 100644 index 4ec7216e415b..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/google-cloud-tasks-v2beta3.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/tasks/v2beta3/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-tasks-v2beta3" - gem.version = Google::Cloud::Tasks::V2beta3::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Cloud Tasks is a fully managed service that allows you to manage the execution, dispatch and delivery of a large number of distributed tasks. You can asynchronously perform work outside of a user request. Your tasks can be executed on App Engine or any arbitrary HTTP endpoint. Note that google-cloud-tasks-v2beta3 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-tasks instead. See the readme for more details." - gem.summary = "Manages the execution of large numbers of distributed requests." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google-cloud-tasks-v2beta3.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google-cloud-tasks-v2beta3.rb deleted file mode 100644 index dbe62c531a09..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google-cloud-tasks-v2beta3.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/tasks/v2beta3" diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3.rb deleted file mode 100644 index 4a4e1bf079bd..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3.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/tasks/v2beta3/cloud_tasks" -require "google/cloud/tasks/v2beta3/version" - -module Google - module Cloud - module Tasks - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/tasks/v2beta3" - # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/tasks/v2beta3" - # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new - # - module V2beta3 - end - end - end -end - -helper_path = ::File.join __dir__, "v2beta3", "_helpers.rb" -require "google/cloud/tasks/v2beta3/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/bindings_override.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/bindings_override.rb deleted file mode 100644 index 52093b505354..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/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 Tasks - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/tasks/v2beta3/rest" - # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new - # - module V2beta3 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Tasks"] - 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: "/v2beta3/{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: "/v2beta3/{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-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks.rb deleted file mode 100644 index ab36034a01a3..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks.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/tasks/v2beta3/version" - -require "google/cloud/tasks/v2beta3/cloud_tasks/credentials" -require "google/cloud/tasks/v2beta3/cloud_tasks/paths" -require "google/cloud/tasks/v2beta3/cloud_tasks/client" -require "google/cloud/tasks/v2beta3/cloud_tasks/rest" - -module Google - module Cloud - module Tasks - module V2beta3 - ## - # Cloud Tasks allows developers to manage the execution of background - # work in their applications. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/tasks/v2beta3/cloud_tasks" - # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/tasks/v2beta3/cloud_tasks/rest" - # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new - # - module CloudTasks - end - end - end - end -end - -helper_path = ::File.join __dir__, "cloud_tasks", "helpers.rb" -require "google/cloud/tasks/v2beta3/cloud_tasks/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/client.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/client.rb deleted file mode 100644 index 87441ecbb60b..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/client.rb +++ /dev/null @@ -1,2277 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/tasks/v2beta3/cloudtasks_pb" -require "google/cloud/location" - -module Google - module Cloud - module Tasks - module V2beta3 - module CloudTasks - ## - # Client for the CloudTasks service. - # - # Cloud Tasks allows developers to manage the execution of background - # work in their applications. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudtasks.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_tasks_stub - - ## - # Configure the CloudTasks Client class. - # - # See {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudTasks clients - # ::Google::Cloud::Tasks::V2beta3::CloudTasks::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", "Tasks", "V2beta3"] - 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_queues.timeout = 20.0 - default_config.rpcs.list_queues.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_queue.timeout = 20.0 - default_config.rpcs.get_queue.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_queue.timeout = 20.0 - - default_config.rpcs.update_queue.timeout = 20.0 - - default_config.rpcs.delete_queue.timeout = 20.0 - default_config.rpcs.delete_queue.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.purge_queue.timeout = 20.0 - - default_config.rpcs.pause_queue.timeout = 20.0 - - default_config.rpcs.resume_queue.timeout = 20.0 - - default_config.rpcs.get_iam_policy.timeout = 20.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.set_iam_policy.timeout = 20.0 - - default_config.rpcs.test_iam_permissions.timeout = 20.0 - default_config.rpcs.test_iam_permissions.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_tasks.timeout = 20.0 - default_config.rpcs.list_tasks.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_task.timeout = 20.0 - default_config.rpcs.get_task.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_task.timeout = 20.0 - - default_config.rpcs.delete_task.timeout = 20.0 - default_config.rpcs.delete_task.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.run_task.timeout = 20.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudTasks 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::Tasks::V2beta3::CloudTasks::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_tasks_stub.universe_domain - end - - ## - # Create a new CloudTasks client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudTasks 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/tasks/v2beta3/cloudtasks_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 - - @cloud_tasks_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Tasks::V2beta3::CloudTasks::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_tasks_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_tasks_stub.endpoint - config.universe_domain = @cloud_tasks_stub.universe_domain - config.logger = @cloud_tasks_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 - @cloud_tasks_stub.logger - end - - # Service calls - - ## - # Lists queues. - # - # Queues are returned in lexicographical order. - # - # @overload list_queues(request, options = nil) - # Pass arguments to `list_queues` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::ListQueuesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::ListQueuesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_queues(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) - # Pass arguments to `list_queues` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 name. - # For example: `projects/PROJECT_ID/locations/LOCATION_ID` - # @param filter [::String] - # `filter` can be used to specify a subset of queues. Any - # {::Google::Cloud::Tasks::V2beta3::Queue Queue} field can be used as a filter and - # several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The - # filter syntax is the same as described in [Stackdriver's Advanced Logs - # Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - # - # Sample filter "state: PAUSED". - # - # Note that using filters might cause fewer queues than the - # requested page_size to be returned. - # @param page_size [::Integer] - # Requested page size. - # - # The maximum page size is 9800. If unspecified, the page size will - # be the maximum. Fewer queues than requested might be returned, - # even if more queues exist; use the - # {::Google::Cloud::Tasks::V2beta3::ListQueuesResponse#next_page_token next_page_token} - # in the response to determine if more queues exist. - # @param page_token [::String] - # A token identifying the page of results to return. - # - # To request the first page results, page_token must be empty. To - # request the next page of results, page_token must be the value of - # {::Google::Cloud::Tasks::V2beta3::ListQueuesResponse#next_page_token next_page_token} - # returned from the previous call to - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_queues ListQueues} method. It - # is an error to switch the value of the - # {::Google::Cloud::Tasks::V2beta3::ListQueuesRequest#filter filter} while - # iterating through pages. - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Read mask is used for a more granular control over what the API - # returns. If the mask is not present all fields will be returned except - # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - # specified in the mask. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2beta3::Queue>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2beta3::Queue>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::ListQueuesRequest.new - # - # # Call the list_queues method. - # result = client.list_queues request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Tasks::V2beta3::Queue. - # p item - # end - # - def list_queues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::ListQueuesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_queues.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_queues.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_queues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :list_queues, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_tasks_stub, :list_queues, 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 queue. - # - # @overload get_queue(request, options = nil) - # Pass arguments to `get_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::GetQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::GetQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_queue(name: nil, read_mask: nil) - # Pass arguments to `get_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the queue. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Read mask is used for a more granular control over what the API - # returns. If the mask is not present all fields will be returned except - # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - # specified in the mask. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2beta3::Queue] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Queue] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::GetQueueRequest.new - # - # # Call the get_queue method. - # result = client.get_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. - # p result - # - def get_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::GetQueueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_queue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :get_queue, request, 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 queue. - # - # Queues created with this method allow tasks to live for a maximum of 31 - # days. After a task is 31 days old, the task will be deleted regardless of - # whether it was dispatched or not. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - # - # @overload create_queue(request, options = nil) - # Pass arguments to `create_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::CreateQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::CreateQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_queue(parent: nil, queue: nil) - # Pass arguments to `create_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 name in which the queue will be created. - # For example: `projects/PROJECT_ID/locations/LOCATION_ID` - # - # The list of allowed locations can be obtained by calling Cloud - # Tasks' implementation of - # [ListLocations][google.cloud.location.Locations.ListLocations]. - # @param queue [::Google::Cloud::Tasks::V2beta3::Queue, ::Hash] - # Required. The queue to create. - # - # [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as - # an existing queue. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2beta3::Queue] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Queue] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::CreateQueueRequest.new - # - # # Call the create_queue method. - # result = client.create_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. - # p result - # - def create_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::CreateQueueRequest - - # Converts hash and nil to 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_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_queue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :create_queue, request, 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 queue. - # - # This method creates the queue if it does not exist and updates - # the queue if it does exist. - # - # Queues created with this method allow tasks to live for a maximum of 31 - # days. After a task is 31 days old, the task will be deleted regardless of - # whether it was dispatched or not. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - # - # @overload update_queue(request, options = nil) - # Pass arguments to `update_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_queue(queue: nil, update_mask: nil) - # Pass arguments to `update_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param queue [::Google::Cloud::Tasks::V2beta3::Queue, ::Hash] - # Required. The queue to create or update. - # - # The queue's {::Google::Cloud::Tasks::V2beta3::Queue#name name} must be - # specified. - # - # Output only fields cannot be modified using UpdateQueue. - # Any value specified for an output only field will be ignored. - # The queue's {::Google::Cloud::Tasks::V2beta3::Queue#name name} cannot be - # changed. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # A mask used to specify which fields of the queue are being updated. - # - # If empty, then all fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2beta3::Queue] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Queue] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::UpdateQueueRequest.new - # - # # Call the update_queue method. - # result = client.update_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. - # p result - # - def update_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest - - # Converts hash and nil to 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_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.queue&.name - header_params["queue.name"] = request.queue.name - end - - request_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_queue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :update_queue, request, 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 queue. - # - # This command will delete the queue even if it has tasks in it. - # - # Note: If you delete a queue, a queue with the same name can't be created - # for 7 days. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - # - # @overload delete_queue(request, options = nil) - # Pass arguments to `delete_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_queue(name: nil) - # Pass arguments to `delete_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::DeleteQueueRequest.new - # - # # Call the delete_queue method. - # result = client.delete_queue request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest - - # Converts hash and nil to 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_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_queue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :delete_queue, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Purges a queue by deleting all of its tasks. - # - # All tasks created before this method is called are permanently deleted. - # - # Purge operations can take up to one minute to take effect. Tasks - # might be dispatched before the purge takes effect. A purge is irreversible. - # - # @overload purge_queue(request, options = nil) - # Pass arguments to `purge_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload purge_queue(name: nil) - # Pass arguments to `purge_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2beta3::Queue] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Queue] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::PurgeQueueRequest.new - # - # # Call the purge_queue method. - # result = client.purge_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. - # p result - # - def purge_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.purge_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.purge_queue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.purge_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :purge_queue, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Pauses the queue. - # - # If a queue is paused then the system will stop dispatching tasks - # until the queue is resumed via - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#resume_queue ResumeQueue}. Tasks can - # still be added when the queue is paused. A queue is paused if its - # {::Google::Cloud::Tasks::V2beta3::Queue#state state} is - # {::Google::Cloud::Tasks::V2beta3::Queue::State::PAUSED PAUSED}. - # - # @overload pause_queue(request, options = nil) - # Pass arguments to `pause_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::PauseQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::PauseQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload pause_queue(name: nil) - # Pass arguments to `pause_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2beta3::Queue] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Queue] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::PauseQueueRequest.new - # - # # Call the pause_queue method. - # result = client.pause_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. - # p result - # - def pause_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::PauseQueueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.pause_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.pause_queue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.pause_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :pause_queue, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Resume a queue. - # - # This method resumes a queue after it has been - # {::Google::Cloud::Tasks::V2beta3::Queue::State::PAUSED PAUSED} or - # {::Google::Cloud::Tasks::V2beta3::Queue::State::DISABLED DISABLED}. The state of a - # queue is stored in the queue's - # {::Google::Cloud::Tasks::V2beta3::Queue#state state}; after calling this method - # it will be set to - # {::Google::Cloud::Tasks::V2beta3::Queue::State::RUNNING RUNNING}. - # - # WARNING: Resuming many high-QPS queues at the same time can - # lead to target overloading. If you are resuming high-QPS - # queues, follow the 500/50/5 pattern described in - # [Managing Cloud Tasks Scaling - # Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). - # - # @overload resume_queue(request, options = nil) - # Pass arguments to `resume_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload resume_queue(name: nil) - # Pass arguments to `resume_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2beta3::Queue] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Queue] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::ResumeQueueRequest.new - # - # # Call the resume_queue method. - # result = client.resume_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. - # p result - # - def resume_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.resume_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.resume_queue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.resume_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :resume_queue, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy for a - # {::Google::Cloud::Tasks::V2beta3::Queue Queue}. Returns an empty policy if the - # resource exists and does not have a policy set. - # - # Authorization requires the following - # [Google IAM](https://cloud.google.com/iam) permission on the specified - # resource parent: - # - # * `cloudtasks.queues.getIamPolicy` - # - # @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/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::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::Tasks::V2beta3::VERSION - metadata[:"x-goog-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_tasks_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy for a - # {::Google::Cloud::Tasks::V2beta3::Queue Queue}. Replaces any existing policy. - # - # Note: The Cloud Console does not check queue-level IAM permissions yet. - # Project-level permissions are required to use the Cloud Console. - # - # Authorization requires the following - # [Google IAM](https://cloud.google.com/iam) permission on the specified - # resource parent: - # - # * `cloudtasks.queues.setIamPolicy` - # - # @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/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::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::Tasks::V2beta3::VERSION - metadata[:"x-goog-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_tasks_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns permissions that a caller has on a - # {::Google::Cloud::Tasks::V2beta3::Queue Queue}. If the resource does not exist, - # this will return an empty set of permissions, not a - # [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. - # - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::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::Tasks::V2beta3::VERSION - metadata[:"x-goog-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_tasks_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 - - ## - # Lists the tasks in a queue. - # - # By default, only the {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC} - # view is retrieved due to performance considerations; - # {::Google::Cloud::Tasks::V2beta3::ListTasksRequest#response_view response_view} - # controls the subset of information which is returned. - # - # The tasks may be returned in any order. The ordering may change at any - # time. - # - # @overload list_tasks(request, options = nil) - # Pass arguments to `list_tasks` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::ListTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::ListTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_tasks(parent: nil, response_view: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # @param response_view [::Google::Cloud::Tasks::V2beta3::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta3::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta3::Task Task} resource. - # @param page_size [::Integer] - # Maximum page size. - # - # Fewer tasks than requested might be returned, even if more tasks exist; use - # {::Google::Cloud::Tasks::V2beta3::ListTasksResponse#next_page_token next_page_token} - # in the response to determine if more tasks exist. - # - # The maximum page size is 1000. If unspecified, the page size will be the - # maximum. - # @param page_token [::String] - # A token identifying the page of results to return. - # - # To request the first page results, page_token must be empty. To - # request the next page of results, page_token must be the value of - # {::Google::Cloud::Tasks::V2beta3::ListTasksResponse#next_page_token next_page_token} - # returned from the previous call to - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_tasks ListTasks} method. - # - # The page token is valid for only 2 hours. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2beta3::Task>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2beta3::Task>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::ListTasksRequest.new - # - # # Call the list_tasks method. - # result = client.list_tasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Tasks::V2beta3::Task. - # p item - # end - # - def list_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::ListTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_tasks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :list_tasks, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_tasks_stub, :list_tasks, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a task. - # - # @overload get_task(request, options = nil) - # Pass arguments to `get_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::GetTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::GetTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_task(name: nil, response_view: nil) - # Pass arguments to `get_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @param response_view [::Google::Cloud::Tasks::V2beta3::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta3::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta3::Task Task} resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2beta3::Task] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Task] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::GetTaskRequest.new - # - # # Call the get_task method. - # result = client.get_task request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta3::Task. - # p result - # - def get_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::GetTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :get_task, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a task and adds it to a queue. - # - # Tasks cannot be updated after creation; there is no UpdateTask command. - # - # * The maximum task size is 100KB. - # - # @overload create_task(request, options = nil) - # Pass arguments to `create_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::CreateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::CreateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_task(parent: nil, task: nil, response_view: nil) - # Pass arguments to `create_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # - # The queue must already exist. - # @param task [::Google::Cloud::Tasks::V2beta3::Task, ::Hash] - # Required. The task to add. - # - # Task names have the following format: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - # The user can optionally specify a task - # {::Google::Cloud::Tasks::V2beta3::Task#name name}. If a name is not specified - # then the system will generate a random unique task id, which will be set in - # the task returned in the {::Google::Cloud::Tasks::V2beta3::Task#name response}. - # - # If {::Google::Cloud::Tasks::V2beta3::Task#schedule_time schedule_time} is not - # set or is in the past then Cloud Tasks will set it to the current time. - # - # Task De-duplication: - # - # Explicitly specifying a task ID enables task de-duplication. If - # a task's ID is identical to that of an existing task or a task - # that was deleted or executed recently then the call will fail - # with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. - # If the task's queue was created using Cloud Tasks, then another task with - # the same name can't be created for ~1 hour after the original task was - # deleted or executed. If the task's queue was created using queue.yaml or - # queue.xml, then another task with the same name can't be created - # for ~9 days after the original task was deleted or executed. - # - # Because there is an extra lookup cost to identify duplicate task - # names, these {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task CreateTask} - # calls have significantly increased latency. Using hashed strings for the - # task id or for the prefix of the task id is recommended. Choosing task ids - # that are sequential or have sequential prefixes, for example using a - # timestamp, causes an increase in latency and error rates in all - # task commands. The infrastructure relies on an approximately - # uniform distribution of task ids to store and serve tasks - # efficiently. - # @param response_view [::Google::Cloud::Tasks::V2beta3::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta3::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta3::Task Task} resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2beta3::Task] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Task] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::CreateTaskRequest.new - # - # # Call the create_task method. - # result = client.create_task request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta3::Task. - # p result - # - def create_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::CreateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :create_task, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a task. - # - # A task can be deleted if it is scheduled or dispatched. A task - # cannot be deleted if it has executed successfully or permanently - # failed. - # - # @overload delete_task(request, options = nil) - # Pass arguments to `delete_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_task(name: nil) - # Pass arguments to `delete_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::DeleteTaskRequest.new - # - # # Call the delete_task method. - # result = client.delete_task request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :delete_task, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Forces a task to run now. - # - # When this method is called, Cloud Tasks will dispatch the task, even if - # the task is already running, the queue has reached its - # {::Google::Cloud::Tasks::V2beta3::RateLimits RateLimits} or is - # {::Google::Cloud::Tasks::V2beta3::Queue::State::PAUSED PAUSED}. - # - # This command is meant to be used for manual debugging. For - # example, {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#run_task RunTask} can be - # used to retry a failed task after a fix has been made or to manually force - # a task to be dispatched now. - # - # The dispatched task is returned. That is, the task that is returned - # contains the [status][Task.status] after the task is dispatched but - # before the task is received by its target. - # - # If Cloud Tasks receives a successful response from the task's - # target, then the task will be deleted; otherwise the task's - # {::Google::Cloud::Tasks::V2beta3::Task#schedule_time schedule_time} will be - # reset to the time that - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#run_task RunTask} was called plus - # the retry delay specified in the queue's - # {::Google::Cloud::Tasks::V2beta3::RetryConfig RetryConfig}. - # - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#run_task RunTask} returns - # [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a - # task that has already succeeded or permanently failed. - # - # @overload run_task(request, options = nil) - # Pass arguments to `run_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::RunTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::RunTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload run_task(name: nil, response_view: nil) - # Pass arguments to `run_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @param response_view [::Google::Cloud::Tasks::V2beta3::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta3::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta3::Task Task} resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tasks::V2beta3::Task] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Task] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::RunTaskRequest.new - # - # # Call the run_task method. - # result = client.run_task request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta3::Task. - # p result - # - def run_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::RunTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.run_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.run_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.run_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.call_rpc :run_task, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CloudTasks API. - # - # This class represents the configuration for CloudTasks, - # 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::Tasks::V2beta3::CloudTasks::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_queues to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_queues.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_queues.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::Tasks::V2beta3::CloudTasks::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 = "cloudtasks.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 CloudTasks 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_queues` - # @return [::Gapic::Config::Method] - # - attr_reader :list_queues - ## - # RPC-specific configuration for `get_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :get_queue - ## - # RPC-specific configuration for `create_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :create_queue - ## - # RPC-specific configuration for `update_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :update_queue - ## - # RPC-specific configuration for `delete_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_queue - ## - # RPC-specific configuration for `purge_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :purge_queue - ## - # RPC-specific configuration for `pause_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :pause_queue - ## - # RPC-specific configuration for `resume_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :resume_queue - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `list_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tasks - ## - # RPC-specific configuration for `get_task` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task - ## - # RPC-specific configuration for `create_task` - # @return [::Gapic::Config::Method] - # - attr_reader :create_task - ## - # RPC-specific configuration for `delete_task` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_task - ## - # RPC-specific configuration for `run_task` - # @return [::Gapic::Config::Method] - # - attr_reader :run_task - - # @private - def initialize parent_rpcs = nil - list_queues_config = parent_rpcs.list_queues if parent_rpcs.respond_to? :list_queues - @list_queues = ::Gapic::Config::Method.new list_queues_config - get_queue_config = parent_rpcs.get_queue if parent_rpcs.respond_to? :get_queue - @get_queue = ::Gapic::Config::Method.new get_queue_config - create_queue_config = parent_rpcs.create_queue if parent_rpcs.respond_to? :create_queue - @create_queue = ::Gapic::Config::Method.new create_queue_config - update_queue_config = parent_rpcs.update_queue if parent_rpcs.respond_to? :update_queue - @update_queue = ::Gapic::Config::Method.new update_queue_config - delete_queue_config = parent_rpcs.delete_queue if parent_rpcs.respond_to? :delete_queue - @delete_queue = ::Gapic::Config::Method.new delete_queue_config - purge_queue_config = parent_rpcs.purge_queue if parent_rpcs.respond_to? :purge_queue - @purge_queue = ::Gapic::Config::Method.new purge_queue_config - pause_queue_config = parent_rpcs.pause_queue if parent_rpcs.respond_to? :pause_queue - @pause_queue = ::Gapic::Config::Method.new pause_queue_config - resume_queue_config = parent_rpcs.resume_queue if parent_rpcs.respond_to? :resume_queue - @resume_queue = ::Gapic::Config::Method.new resume_queue_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks - @list_tasks = ::Gapic::Config::Method.new list_tasks_config - get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task - @get_task = ::Gapic::Config::Method.new get_task_config - create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task - @create_task = ::Gapic::Config::Method.new create_task_config - delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task - @delete_task = ::Gapic::Config::Method.new delete_task_config - run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task - @run_task = ::Gapic::Config::Method.new run_task_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/credentials.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/credentials.rb deleted file mode 100644 index 3bccd23bae21..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/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 Tasks - module V2beta3 - module CloudTasks - # Credentials for the CloudTasks API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "TASKS_CREDENTIALS", - "TASKS_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "TASKS_CREDENTIALS_JSON", - "TASKS_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-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/paths.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/paths.rb deleted file mode 100644 index eecb06ef35df..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/paths.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 Tasks - module V2beta3 - module CloudTasks - # Path helper methods for the CloudTasks API. - module Paths - ## - # 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 Queue resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/queues/{queue}` - # - # @param project [String] - # @param location [String] - # @param queue [String] - # - # @return [::String] - def queue_path project:, location:, queue: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/queues/#{queue}" - end - - ## - # Create a fully-qualified Task resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/queues/{queue}/tasks/{task}` - # - # @param project [String] - # @param location [String] - # @param queue [String] - # @param task [String] - # - # @return [::String] - def task_path project:, location:, queue:, task: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "queue cannot contain /" if queue.to_s.include? "/" - - "projects/#{project}/locations/#{location}/queues/#{queue}/tasks/#{task}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/rest.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/rest.rb deleted file mode 100644 index b443ca9c286e..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/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/tasks/v2beta3/version" -require "google/cloud/tasks/v2beta3/bindings_override" - -require "google/cloud/tasks/v2beta3/cloud_tasks/credentials" -require "google/cloud/tasks/v2beta3/cloud_tasks/paths" -require "google/cloud/tasks/v2beta3/cloud_tasks/rest/client" - -module Google - module Cloud - module Tasks - module V2beta3 - ## - # Cloud Tasks allows developers to manage the execution of background - # work in their applications. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/tasks/v2beta3/cloud_tasks/rest" - # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new - # - module CloudTasks - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/tasks/v2beta3/cloud_tasks/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/rest/client.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/rest/client.rb deleted file mode 100644 index 0c27095bec5c..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/rest/client.rb +++ /dev/null @@ -1,2130 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/tasks/v2beta3/cloudtasks_pb" -require "google/cloud/tasks/v2beta3/cloud_tasks/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module Tasks - module V2beta3 - module CloudTasks - module Rest - ## - # REST client for the CloudTasks service. - # - # Cloud Tasks allows developers to manage the execution of background - # work in their applications. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudtasks.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_tasks_stub - - ## - # Configure the CloudTasks Client class. - # - # See {::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudTasks clients - # ::Google::Cloud::Tasks::V2beta3::CloudTasks::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", "Tasks", "V2beta3"] - 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_queues.timeout = 20.0 - default_config.rpcs.list_queues.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_queue.timeout = 20.0 - default_config.rpcs.get_queue.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_queue.timeout = 20.0 - - default_config.rpcs.update_queue.timeout = 20.0 - - default_config.rpcs.delete_queue.timeout = 20.0 - default_config.rpcs.delete_queue.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.purge_queue.timeout = 20.0 - - default_config.rpcs.pause_queue.timeout = 20.0 - - default_config.rpcs.resume_queue.timeout = 20.0 - - default_config.rpcs.get_iam_policy.timeout = 20.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.set_iam_policy.timeout = 20.0 - - default_config.rpcs.test_iam_permissions.timeout = 20.0 - default_config.rpcs.test_iam_permissions.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_tasks.timeout = 20.0 - default_config.rpcs.list_tasks.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_task.timeout = 20.0 - default_config.rpcs.get_task.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_task.timeout = 20.0 - - default_config.rpcs.delete_task.timeout = 20.0 - default_config.rpcs.delete_task.retry_policy = { - initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.run_task.timeout = 20.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudTasks 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::Tasks::V2beta3::CloudTasks::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_tasks_stub.universe_domain - end - - ## - # Create a new CloudTasks REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudTasks 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 - - @cloud_tasks_stub = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @cloud_tasks_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_tasks_stub.endpoint - config.universe_domain = @cloud_tasks_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @cloud_tasks_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 - @cloud_tasks_stub.logger - end - - # Service calls - - ## - # Lists queues. - # - # Queues are returned in lexicographical order. - # - # @overload list_queues(request, options = nil) - # Pass arguments to `list_queues` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::ListQueuesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::ListQueuesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_queues(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) - # Pass arguments to `list_queues` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 name. - # For example: `projects/PROJECT_ID/locations/LOCATION_ID` - # @param filter [::String] - # `filter` can be used to specify a subset of queues. Any - # {::Google::Cloud::Tasks::V2beta3::Queue Queue} field can be used as a filter and - # several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The - # filter syntax is the same as described in [Stackdriver's Advanced Logs - # Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - # - # Sample filter "state: PAUSED". - # - # Note that using filters might cause fewer queues than the - # requested page_size to be returned. - # @param page_size [::Integer] - # Requested page size. - # - # The maximum page size is 9800. If unspecified, the page size will - # be the maximum. Fewer queues than requested might be returned, - # even if more queues exist; use the - # {::Google::Cloud::Tasks::V2beta3::ListQueuesResponse#next_page_token next_page_token} - # in the response to determine if more queues exist. - # @param page_token [::String] - # A token identifying the page of results to return. - # - # To request the first page results, page_token must be empty. To - # request the next page of results, page_token must be the value of - # {::Google::Cloud::Tasks::V2beta3::ListQueuesResponse#next_page_token next_page_token} - # returned from the previous call to - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client#list_queues ListQueues} method. It - # is an error to switch the value of the - # {::Google::Cloud::Tasks::V2beta3::ListQueuesRequest#filter filter} while - # iterating through pages. - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Read mask is used for a more granular control over what the API - # returns. If the mask is not present all fields will be returned except - # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - # specified in the mask. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2beta3::Queue>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2beta3::Queue>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::ListQueuesRequest.new - # - # # Call the list_queues method. - # result = client.list_queues request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Tasks::V2beta3::Queue. - # p item - # end - # - def list_queues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::ListQueuesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_queues.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_queues.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_queues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.list_queues request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_tasks_stub, :list_queues, "queues", 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 queue. - # - # @overload get_queue(request, options = nil) - # Pass arguments to `get_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::GetQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::GetQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_queue(name: nil, read_mask: nil) - # Pass arguments to `get_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the queue. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Read mask is used for a more granular control over what the API - # returns. If the mask is not present all fields will be returned except - # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - # specified in the mask. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Queue] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::GetQueueRequest.new - # - # # Call the get_queue method. - # result = client.get_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. - # p result - # - def get_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::GetQueueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_queue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.get_queue request, 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 queue. - # - # Queues created with this method allow tasks to live for a maximum of 31 - # days. After a task is 31 days old, the task will be deleted regardless of - # whether it was dispatched or not. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - # - # @overload create_queue(request, options = nil) - # Pass arguments to `create_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::CreateQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::CreateQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_queue(parent: nil, queue: nil) - # Pass arguments to `create_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 name in which the queue will be created. - # For example: `projects/PROJECT_ID/locations/LOCATION_ID` - # - # The list of allowed locations can be obtained by calling Cloud - # Tasks' implementation of - # [ListLocations][google.cloud.location.Locations.ListLocations]. - # @param queue [::Google::Cloud::Tasks::V2beta3::Queue, ::Hash] - # Required. The queue to create. - # - # [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as - # an existing queue. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Queue] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::CreateQueueRequest.new - # - # # Call the create_queue method. - # result = client.create_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. - # p result - # - def create_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::CreateQueueRequest - - # Converts hash and nil to an 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_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_queue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.create_queue request, 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 queue. - # - # This method creates the queue if it does not exist and updates - # the queue if it does exist. - # - # Queues created with this method allow tasks to live for a maximum of 31 - # days. After a task is 31 days old, the task will be deleted regardless of - # whether it was dispatched or not. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - # - # @overload update_queue(request, options = nil) - # Pass arguments to `update_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_queue(queue: nil, update_mask: nil) - # Pass arguments to `update_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param queue [::Google::Cloud::Tasks::V2beta3::Queue, ::Hash] - # Required. The queue to create or update. - # - # The queue's {::Google::Cloud::Tasks::V2beta3::Queue#name name} must be - # specified. - # - # Output only fields cannot be modified using UpdateQueue. - # Any value specified for an output only field will be ignored. - # The queue's {::Google::Cloud::Tasks::V2beta3::Queue#name name} cannot be - # changed. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # A mask used to specify which fields of the queue are being updated. - # - # If empty, then all fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Queue] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::UpdateQueueRequest.new - # - # # Call the update_queue method. - # result = client.update_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. - # p result - # - def update_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest - - # Converts hash and nil to an 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_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_queue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.update_queue request, 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 queue. - # - # This command will delete the queue even if it has tasks in it. - # - # Note: If you delete a queue, a queue with the same name can't be created - # for 7 days. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - # - # @overload delete_queue(request, options = nil) - # Pass arguments to `delete_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_queue(name: nil) - # Pass arguments to `delete_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::DeleteQueueRequest.new - # - # # Call the delete_queue method. - # result = client.delete_queue request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest - - # Converts hash and nil to an 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_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_queue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.delete_queue request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Purges a queue by deleting all of its tasks. - # - # All tasks created before this method is called are permanently deleted. - # - # Purge operations can take up to one minute to take effect. Tasks - # might be dispatched before the purge takes effect. A purge is irreversible. - # - # @overload purge_queue(request, options = nil) - # Pass arguments to `purge_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload purge_queue(name: nil) - # Pass arguments to `purge_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Queue] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::PurgeQueueRequest.new - # - # # Call the purge_queue method. - # result = client.purge_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. - # p result - # - def purge_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.purge_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.purge_queue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.purge_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.purge_queue request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Pauses the queue. - # - # If a queue is paused then the system will stop dispatching tasks - # until the queue is resumed via - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client#resume_queue ResumeQueue}. Tasks can - # still be added when the queue is paused. A queue is paused if its - # {::Google::Cloud::Tasks::V2beta3::Queue#state state} is - # {::Google::Cloud::Tasks::V2beta3::Queue::State::PAUSED PAUSED}. - # - # @overload pause_queue(request, options = nil) - # Pass arguments to `pause_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::PauseQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::PauseQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload pause_queue(name: nil) - # Pass arguments to `pause_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Queue] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::PauseQueueRequest.new - # - # # Call the pause_queue method. - # result = client.pause_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. - # p result - # - def pause_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::PauseQueueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.pause_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.pause_queue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.pause_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.pause_queue request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Resume a queue. - # - # This method resumes a queue after it has been - # {::Google::Cloud::Tasks::V2beta3::Queue::State::PAUSED PAUSED} or - # {::Google::Cloud::Tasks::V2beta3::Queue::State::DISABLED DISABLED}. The state of a - # queue is stored in the queue's - # {::Google::Cloud::Tasks::V2beta3::Queue#state state}; after calling this method - # it will be set to - # {::Google::Cloud::Tasks::V2beta3::Queue::State::RUNNING RUNNING}. - # - # WARNING: Resuming many high-QPS queues at the same time can - # lead to target overloading. If you are resuming high-QPS - # queues, follow the 500/50/5 pattern described in - # [Managing Cloud Tasks Scaling - # Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). - # - # @overload resume_queue(request, options = nil) - # Pass arguments to `resume_queue` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload resume_queue(name: nil) - # Pass arguments to `resume_queue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Queue] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::ResumeQueueRequest.new - # - # # Call the resume_queue method. - # result = client.resume_queue request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. - # p result - # - def resume_queue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.resume_queue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.resume_queue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.resume_queue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.resume_queue request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy for a - # {::Google::Cloud::Tasks::V2beta3::Queue Queue}. Returns an empty policy if the - # resource exists and does not have a policy set. - # - # Authorization requires the following - # [Google IAM](https://cloud.google.com/iam) permission on the specified - # resource parent: - # - # * `cloudtasks.queues.getIamPolicy` - # - # @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/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::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::Tasks::V2beta3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_tasks_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy for a - # {::Google::Cloud::Tasks::V2beta3::Queue Queue}. Replaces any existing policy. - # - # Note: The Cloud Console does not check queue-level IAM permissions yet. - # Project-level permissions are required to use the Cloud Console. - # - # Authorization requires the following - # [Google IAM](https://cloud.google.com/iam) permission on the specified - # resource parent: - # - # * `cloudtasks.queues.setIamPolicy` - # - # @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/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::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::Tasks::V2beta3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_tasks_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns permissions that a caller has on a - # {::Google::Cloud::Tasks::V2beta3::Queue Queue}. If the resource does not exist, - # this will return an empty set of permissions, not a - # [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. - # - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::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::Tasks::V2beta3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_tasks_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 - - ## - # Lists the tasks in a queue. - # - # By default, only the {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC} - # view is retrieved due to performance considerations; - # {::Google::Cloud::Tasks::V2beta3::ListTasksRequest#response_view response_view} - # controls the subset of information which is returned. - # - # The tasks may be returned in any order. The ordering may change at any - # time. - # - # @overload list_tasks(request, options = nil) - # Pass arguments to `list_tasks` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::ListTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::ListTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_tasks(parent: nil, response_view: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # @param response_view [::Google::Cloud::Tasks::V2beta3::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta3::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta3::Task Task} resource. - # @param page_size [::Integer] - # Maximum page size. - # - # Fewer tasks than requested might be returned, even if more tasks exist; use - # {::Google::Cloud::Tasks::V2beta3::ListTasksResponse#next_page_token next_page_token} - # in the response to determine if more tasks exist. - # - # The maximum page size is 1000. If unspecified, the page size will be the - # maximum. - # @param page_token [::String] - # A token identifying the page of results to return. - # - # To request the first page results, page_token must be empty. To - # request the next page of results, page_token must be the value of - # {::Google::Cloud::Tasks::V2beta3::ListTasksResponse#next_page_token next_page_token} - # returned from the previous call to - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client#list_tasks ListTasks} method. - # - # The page token is valid for only 2 hours. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2beta3::Task>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2beta3::Task>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::ListTasksRequest.new - # - # # Call the list_tasks method. - # result = client.list_tasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Tasks::V2beta3::Task. - # p item - # end - # - def list_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::ListTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_tasks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.list_tasks request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_tasks_stub, :list_tasks, "tasks", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a task. - # - # @overload get_task(request, options = nil) - # Pass arguments to `get_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::GetTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::GetTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_task(name: nil, response_view: nil) - # Pass arguments to `get_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @param response_view [::Google::Cloud::Tasks::V2beta3::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta3::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta3::Task Task} resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Task] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::GetTaskRequest.new - # - # # Call the get_task method. - # result = client.get_task request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta3::Task. - # p result - # - def get_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::GetTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.get_task request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a task and adds it to a queue. - # - # Tasks cannot be updated after creation; there is no UpdateTask command. - # - # * The maximum task size is 100KB. - # - # @overload create_task(request, options = nil) - # Pass arguments to `create_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::CreateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::CreateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_task(parent: nil, task: nil, response_view: nil) - # Pass arguments to `create_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # - # The queue must already exist. - # @param task [::Google::Cloud::Tasks::V2beta3::Task, ::Hash] - # Required. The task to add. - # - # Task names have the following format: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - # The user can optionally specify a task - # {::Google::Cloud::Tasks::V2beta3::Task#name name}. If a name is not specified - # then the system will generate a random unique task id, which will be set in - # the task returned in the {::Google::Cloud::Tasks::V2beta3::Task#name response}. - # - # If {::Google::Cloud::Tasks::V2beta3::Task#schedule_time schedule_time} is not - # set or is in the past then Cloud Tasks will set it to the current time. - # - # Task De-duplication: - # - # Explicitly specifying a task ID enables task de-duplication. If - # a task's ID is identical to that of an existing task or a task - # that was deleted or executed recently then the call will fail - # with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. - # If the task's queue was created using Cloud Tasks, then another task with - # the same name can't be created for ~1 hour after the original task was - # deleted or executed. If the task's queue was created using queue.yaml or - # queue.xml, then another task with the same name can't be created - # for ~9 days after the original task was deleted or executed. - # - # Because there is an extra lookup cost to identify duplicate task - # names, these {::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client#create_task CreateTask} - # calls have significantly increased latency. Using hashed strings for the - # task id or for the prefix of the task id is recommended. Choosing task ids - # that are sequential or have sequential prefixes, for example using a - # timestamp, causes an increase in latency and error rates in all - # task commands. The infrastructure relies on an approximately - # uniform distribution of task ids to store and serve tasks - # efficiently. - # @param response_view [::Google::Cloud::Tasks::V2beta3::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta3::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta3::Task Task} resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Task] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::CreateTaskRequest.new - # - # # Call the create_task method. - # result = client.create_task request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta3::Task. - # p result - # - def create_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::CreateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.create_task request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a task. - # - # A task can be deleted if it is scheduled or dispatched. A task - # cannot be deleted if it has executed successfully or permanently - # failed. - # - # @overload delete_task(request, options = nil) - # Pass arguments to `delete_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_task(name: nil) - # Pass arguments to `delete_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::DeleteTaskRequest.new - # - # # Call the delete_task method. - # result = client.delete_task request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.delete_task request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Forces a task to run now. - # - # When this method is called, Cloud Tasks will dispatch the task, even if - # the task is already running, the queue has reached its - # {::Google::Cloud::Tasks::V2beta3::RateLimits RateLimits} or is - # {::Google::Cloud::Tasks::V2beta3::Queue::State::PAUSED PAUSED}. - # - # This command is meant to be used for manual debugging. For - # example, {::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client#run_task RunTask} can be - # used to retry a failed task after a fix has been made or to manually force - # a task to be dispatched now. - # - # The dispatched task is returned. That is, the task that is returned - # contains the [status][Task.status] after the task is dispatched but - # before the task is received by its target. - # - # If Cloud Tasks receives a successful response from the task's - # target, then the task will be deleted; otherwise the task's - # {::Google::Cloud::Tasks::V2beta3::Task#schedule_time schedule_time} will be - # reset to the time that - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client#run_task RunTask} was called plus - # the retry delay specified in the queue's - # {::Google::Cloud::Tasks::V2beta3::RetryConfig RetryConfig}. - # - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client#run_task RunTask} returns - # [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a - # task that has already succeeded or permanently failed. - # - # @overload run_task(request, options = nil) - # Pass arguments to `run_task` via a request object, either of type - # {::Google::Cloud::Tasks::V2beta3::RunTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tasks::V2beta3::RunTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload run_task(name: nil, response_view: nil) - # Pass arguments to `run_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @param response_view [::Google::Cloud::Tasks::V2beta3::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta3::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta3::Task Task} resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Task] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/tasks/v2beta3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tasks::V2beta3::RunTaskRequest.new - # - # # Call the run_task method. - # result = client.run_task request - # - # # The returned object is of type Google::Cloud::Tasks::V2beta3::Task. - # p result - # - def run_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tasks::V2beta3::RunTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.run_task.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.run_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.run_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_tasks_stub.run_task request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CloudTasks REST API. - # - # This class represents the configuration for CloudTasks 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::Tasks::V2beta3::CloudTasks::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_queues to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_queues.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_queues.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 = "cloudtasks.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 CloudTasks 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_queues` - # @return [::Gapic::Config::Method] - # - attr_reader :list_queues - ## - # RPC-specific configuration for `get_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :get_queue - ## - # RPC-specific configuration for `create_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :create_queue - ## - # RPC-specific configuration for `update_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :update_queue - ## - # RPC-specific configuration for `delete_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_queue - ## - # RPC-specific configuration for `purge_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :purge_queue - ## - # RPC-specific configuration for `pause_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :pause_queue - ## - # RPC-specific configuration for `resume_queue` - # @return [::Gapic::Config::Method] - # - attr_reader :resume_queue - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `list_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tasks - ## - # RPC-specific configuration for `get_task` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task - ## - # RPC-specific configuration for `create_task` - # @return [::Gapic::Config::Method] - # - attr_reader :create_task - ## - # RPC-specific configuration for `delete_task` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_task - ## - # RPC-specific configuration for `run_task` - # @return [::Gapic::Config::Method] - # - attr_reader :run_task - - # @private - def initialize parent_rpcs = nil - list_queues_config = parent_rpcs.list_queues if parent_rpcs.respond_to? :list_queues - @list_queues = ::Gapic::Config::Method.new list_queues_config - get_queue_config = parent_rpcs.get_queue if parent_rpcs.respond_to? :get_queue - @get_queue = ::Gapic::Config::Method.new get_queue_config - create_queue_config = parent_rpcs.create_queue if parent_rpcs.respond_to? :create_queue - @create_queue = ::Gapic::Config::Method.new create_queue_config - update_queue_config = parent_rpcs.update_queue if parent_rpcs.respond_to? :update_queue - @update_queue = ::Gapic::Config::Method.new update_queue_config - delete_queue_config = parent_rpcs.delete_queue if parent_rpcs.respond_to? :delete_queue - @delete_queue = ::Gapic::Config::Method.new delete_queue_config - purge_queue_config = parent_rpcs.purge_queue if parent_rpcs.respond_to? :purge_queue - @purge_queue = ::Gapic::Config::Method.new purge_queue_config - pause_queue_config = parent_rpcs.pause_queue if parent_rpcs.respond_to? :pause_queue - @pause_queue = ::Gapic::Config::Method.new pause_queue_config - resume_queue_config = parent_rpcs.resume_queue if parent_rpcs.respond_to? :resume_queue - @resume_queue = ::Gapic::Config::Method.new resume_queue_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks - @list_tasks = ::Gapic::Config::Method.new list_tasks_config - get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task - @get_task = ::Gapic::Config::Method.new get_task_config - create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task - @create_task = ::Gapic::Config::Method.new create_task_config - delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task - @delete_task = ::Gapic::Config::Method.new delete_task_config - run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task - @run_task = ::Gapic::Config::Method.new run_task_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/rest/service_stub.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/rest/service_stub.rb deleted file mode 100644 index 769a0336a270..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloud_tasks/rest/service_stub.rb +++ /dev/null @@ -1,1067 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/tasks/v2beta3/cloudtasks_pb" - -module Google - module Cloud - module Tasks - module V2beta3 - module CloudTasks - module Rest - ## - # REST service stub for the CloudTasks 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_queues REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::ListQueuesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta3::ListQueuesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta3::ListQueuesResponse] - # A result object deserialized from the server's reply - def list_queues request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_queues_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_queues", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2beta3::ListQueuesResponse.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_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::GetQueueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Queue] - # A result object deserialized from the server's reply - def get_queue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_queue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_queue", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2beta3::Queue.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_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::CreateQueueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Queue] - # A result object deserialized from the server's reply - def create_queue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_queue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_queue", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2beta3::Queue.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_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Queue] - # A result object deserialized from the server's reply - def update_queue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_queue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_queue", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2beta3::Queue.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_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_queue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_queue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_queue", - 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 purge_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Queue] - # A result object deserialized from the server's reply - def purge_queue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_purge_queue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "purge_queue", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2beta3::Queue.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the pause_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::PauseQueueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Queue] - # A result object deserialized from the server's reply - def pause_queue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_pause_queue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "pause_queue", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2beta3::Queue.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the resume_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Queue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Queue] - # A result object deserialized from the server's reply - def resume_queue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_resume_queue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "resume_queue", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2beta3::Queue.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_tasks REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::ListTasksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta3::ListTasksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta3::ListTasksResponse] - # A result object deserialized from the server's reply - def list_tasks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_tasks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_tasks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2beta3::ListTasksResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::GetTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Task] - # A result object deserialized from the server's reply - def get_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2beta3::Task.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::CreateTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Task] - # A result object deserialized from the server's reply - def create_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2beta3::Task.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::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_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::RunTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Tasks::V2beta3::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Tasks::V2beta3::Task] - # A result object deserialized from the server's reply - def run_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_run_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "run_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Tasks::V2beta3::Task.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_queues REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::ListQueuesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_queues_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2beta3/{parent}/queues", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::GetQueueRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_queue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2beta3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::CreateQueueRequest] - # 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_queue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2beta3/{parent}/queues", - body: "queue", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest] - # 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_queue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2beta3/{queue.name}", - body: "queue", - matches: [ - ["queue.name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest] - # 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_queue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2beta3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the purge_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_purge_queue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2beta3/{name}:purge", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the pause_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::PauseQueueRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_pause_queue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2beta3/{name}:pause", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the resume_queue REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_resume_queue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2beta3/{name}:resume", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, 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: :post, - uri_template: "/v2beta3/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, 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: "/v2beta3/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, 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: "/v2beta3/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_tasks REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::ListTasksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_tasks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2beta3/{parent}/tasks", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::GetTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2beta3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::CreateTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2beta3/{parent}/tasks", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2beta3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the run_task REST call - # - # @param request_pb [::Google::Cloud::Tasks::V2beta3::RunTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_run_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2beta3/{name}:run", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloudtasks_pb.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloudtasks_pb.rb deleted file mode 100644 index 3ecd7cde1e6f..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloudtasks_pb.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/tasks/v2beta3/cloudtasks.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/tasks/v2beta3/queue_pb' -require 'google/cloud/tasks/v2beta3/task_pb' -require 'google/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n+google/cloud/tasks/v2beta3/cloudtasks.proto\x12\x1agoogle.cloud.tasks.v2beta3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/tasks/v2beta3/queue.proto\x1a%google/cloud/tasks/v2beta3/task.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xb7\x01\n\x11ListQueuesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudtasks.googleapis.com/Queue\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\x12\x32\n\tread_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"`\n\x12ListQueuesResponse\x12\x31\n\x06queues\x18\x01 \x03(\x0b\x32!.google.cloud.tasks.v2beta3.Queue\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"|\n\x0fGetQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\x12\x32\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x84\x01\n\x12\x43reateQueueRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x63loudtasks.googleapis.com/Queue\x12\x35\n\x05queue\x18\x02 \x01(\x0b\x32!.google.cloud.tasks.v2beta3.QueueB\x03\xe0\x41\x02\"|\n\x12UpdateQueueRequest\x12\x35\n\x05queue\x18\x01 \x01(\x0b\x32!.google.cloud.tasks.v2beta3.QueueB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"K\n\x12\x44\x65leteQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"J\n\x11PurgeQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"J\n\x11PauseQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"K\n\x12ResumeQueueRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x63loudtasks.googleapis.com/Queue\"\xaf\x01\n\x10ListTasksRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x63loudtasks.googleapis.com/Task\x12<\n\rresponse_view\x18\x02 \x01(\x0e\x32%.google.cloud.tasks.v2beta3.Task.View\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"]\n\x11ListTasksResponse\x12/\n\x05tasks\x18\x01 \x03(\x0b\x32 .google.cloud.tasks.v2beta3.Task\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x84\x01\n\x0eGetTaskRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudtasks.googleapis.com/Task\x12<\n\rresponse_view\x18\x02 \x01(\x0e\x32%.google.cloud.tasks.v2beta3.Task.View\"\xbe\x01\n\x11\x43reateTaskRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1e\x63loudtasks.googleapis.com/Task\x12\x33\n\x04task\x18\x02 \x01(\x0b\x32 .google.cloud.tasks.v2beta3.TaskB\x03\xe0\x41\x02\x12<\n\rresponse_view\x18\x03 \x01(\x0e\x32%.google.cloud.tasks.v2beta3.Task.View\"I\n\x11\x44\x65leteTaskRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudtasks.googleapis.com/Task\"\x84\x01\n\x0eRunTaskRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudtasks.googleapis.com/Task\x12<\n\rresponse_view\x18\x02 \x01(\x0e\x32%.google.cloud.tasks.v2beta3.Task.View2\xa5\x16\n\nCloudTasks\x12\xad\x01\n\nListQueues\x12-.google.cloud.tasks.v2beta3.ListQueuesRequest\x1a..google.cloud.tasks.v2beta3.ListQueuesResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v2beta3/{parent=projects/*/locations/*}/queues\x12\x9a\x01\n\x08GetQueue\x12+.google.cloud.tasks.v2beta3.GetQueueRequest\x1a!.google.cloud.tasks.v2beta3.Queue\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v2beta3/{name=projects/*/locations/*/queues/*}\x12\xaf\x01\n\x0b\x43reateQueue\x12..google.cloud.tasks.v2beta3.CreateQueueRequest\x1a!.google.cloud.tasks.v2beta3.Queue\"M\xda\x41\x0cparent,queue\x82\xd3\xe4\x93\x02\x38\"//v2beta3/{parent=projects/*/locations/*}/queues:\x05queue\x12\xba\x01\n\x0bUpdateQueue\x12..google.cloud.tasks.v2beta3.UpdateQueueRequest\x1a!.google.cloud.tasks.v2beta3.Queue\"X\xda\x41\x11queue,update_mask\x82\xd3\xe4\x93\x02>25/v2beta3/{queue.name=projects/*/locations/*/queues/*}:\x05queue\x12\x95\x01\n\x0b\x44\x65leteQueue\x12..google.cloud.tasks.v2beta3.DeleteQueueRequest\x1a\x16.google.protobuf.Empty\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v2beta3/{name=projects/*/locations/*/queues/*}\x12\xa7\x01\n\nPurgeQueue\x12-.google.cloud.tasks.v2beta3.PurgeQueueRequest\x1a!.google.cloud.tasks.v2beta3.Queue\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/v2beta3/{name=projects/*/locations/*/queues/*}:purge:\x01*\x12\xa7\x01\n\nPauseQueue\x12-.google.cloud.tasks.v2beta3.PauseQueueRequest\x1a!.google.cloud.tasks.v2beta3.Queue\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/v2beta3/{name=projects/*/locations/*/queues/*}:pause:\x01*\x12\xaa\x01\n\x0bResumeQueue\x12..google.cloud.tasks.v2beta3.ResumeQueueRequest\x1a!.google.cloud.tasks.v2beta3.Queue\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\"6/v2beta3/{name=projects/*/locations/*/queues/*}:resume:\x01*\x12\xa1\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"V\xda\x41\x08resource\x82\xd3\xe4\x93\x02\x45\"@/v2beta3/{resource=projects/*/locations/*/queues/*}:getIamPolicy:\x01*\x12\xa8\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"]\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02\x45\"@/v2beta3/{resource=projects/*/locations/*/queues/*}:setIamPolicy:\x01*\x12\xd3\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"h\xda\x41\x14resource,permissions\x82\xd3\xe4\x93\x02K\"F/v2beta3/{resource=projects/*/locations/*/queues/*}:testIamPermissions:\x01*\x12\xb2\x01\n\tListTasks\x12,.google.cloud.tasks.v2beta3.ListTasksRequest\x1a-.google.cloud.tasks.v2beta3.ListTasksResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v2beta3/{parent=projects/*/locations/*/queues/*}/tasks\x12\x9f\x01\n\x07GetTask\x12*.google.cloud.tasks.v2beta3.GetTaskRequest\x1a .google.cloud.tasks.v2beta3.Task\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}\x12\xaf\x01\n\nCreateTask\x12-.google.cloud.tasks.v2beta3.CreateTaskRequest\x1a .google.cloud.tasks.v2beta3.Task\"P\xda\x41\x0bparent,task\x82\xd3\xe4\x93\x02<\"7/v2beta3/{parent=projects/*/locations/*/queues/*}/tasks:\x01*\x12\x9b\x01\n\nDeleteTask\x12-.google.cloud.tasks.v2beta3.DeleteTaskRequest\x1a\x16.google.protobuf.Empty\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}\x12\xa6\x01\n\x07RunTask\x12*.google.cloud.tasks.v2beta3.RunTaskRequest\x1a .google.cloud.tasks.v2beta3.Task\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\";/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}:run:\x01*\x1aM\xca\x41\x19\x63loudtasks.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x80\x01\n\x1e\x63om.google.cloud.tasks.v2beta3B\x0f\x43loudTasksProtoP\x01ZCcloud.google.com/go/cloudtasks/apiv2beta3/cloudtaskspb;cloudtaskspb\xa2\x02\x05TASKSb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Tasks - module V2beta3 - ListQueuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.ListQueuesRequest").msgclass - ListQueuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.ListQueuesResponse").msgclass - GetQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.GetQueueRequest").msgclass - CreateQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.CreateQueueRequest").msgclass - UpdateQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.UpdateQueueRequest").msgclass - DeleteQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.DeleteQueueRequest").msgclass - PurgeQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.PurgeQueueRequest").msgclass - PauseQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.PauseQueueRequest").msgclass - ResumeQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.ResumeQueueRequest").msgclass - ListTasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.ListTasksRequest").msgclass - ListTasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.ListTasksResponse").msgclass - GetTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.GetTaskRequest").msgclass - CreateTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.CreateTaskRequest").msgclass - DeleteTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.DeleteTaskRequest").msgclass - RunTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.RunTaskRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloudtasks_services_pb.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloudtasks_services_pb.rb deleted file mode 100644 index 949716898bbb..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/cloudtasks_services_pb.rb +++ /dev/null @@ -1,208 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/tasks/v2beta3/cloudtasks.proto for package 'google.cloud.tasks.v2beta3' -# 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/tasks/v2beta3/cloudtasks_pb' - -module Google - module Cloud - module Tasks - module V2beta3 - module CloudTasks - # Cloud Tasks allows developers to manage the execution of background - # work in their applications. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.tasks.v2beta3.CloudTasks' - - # Lists queues. - # - # Queues are returned in lexicographical order. - rpc :ListQueues, ::Google::Cloud::Tasks::V2beta3::ListQueuesRequest, ::Google::Cloud::Tasks::V2beta3::ListQueuesResponse - # Gets a queue. - rpc :GetQueue, ::Google::Cloud::Tasks::V2beta3::GetQueueRequest, ::Google::Cloud::Tasks::V2beta3::Queue - # Creates a queue. - # - # Queues created with this method allow tasks to live for a maximum of 31 - # days. After a task is 31 days old, the task will be deleted regardless of - # whether it was dispatched or not. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - rpc :CreateQueue, ::Google::Cloud::Tasks::V2beta3::CreateQueueRequest, ::Google::Cloud::Tasks::V2beta3::Queue - # Updates a queue. - # - # This method creates the queue if it does not exist and updates - # the queue if it does exist. - # - # Queues created with this method allow tasks to live for a maximum of 31 - # days. After a task is 31 days old, the task will be deleted regardless of - # whether it was dispatched or not. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - rpc :UpdateQueue, ::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest, ::Google::Cloud::Tasks::V2beta3::Queue - # Deletes a queue. - # - # This command will delete the queue even if it has tasks in it. - # - # Note: If you delete a queue, a queue with the same name can't be created - # for 7 days. - # - # WARNING: Using this method may have unintended side effects if you are - # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - # Read - # [Overview of Queue Management and - # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - # this method. - rpc :DeleteQueue, ::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest, ::Google::Protobuf::Empty - # Purges a queue by deleting all of its tasks. - # - # All tasks created before this method is called are permanently deleted. - # - # Purge operations can take up to one minute to take effect. Tasks - # might be dispatched before the purge takes effect. A purge is irreversible. - rpc :PurgeQueue, ::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest, ::Google::Cloud::Tasks::V2beta3::Queue - # Pauses the queue. - # - # If a queue is paused then the system will stop dispatching tasks - # until the queue is resumed via - # [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue]. Tasks can - # still be added when the queue is paused. A queue is paused if its - # [state][google.cloud.tasks.v2beta3.Queue.state] is - # [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED]. - rpc :PauseQueue, ::Google::Cloud::Tasks::V2beta3::PauseQueueRequest, ::Google::Cloud::Tasks::V2beta3::Queue - # Resume a queue. - # - # This method resumes a queue after it has been - # [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED] or - # [DISABLED][google.cloud.tasks.v2beta3.Queue.State.DISABLED]. The state of a - # queue is stored in the queue's - # [state][google.cloud.tasks.v2beta3.Queue.state]; after calling this method - # it will be set to - # [RUNNING][google.cloud.tasks.v2beta3.Queue.State.RUNNING]. - # - # WARNING: Resuming many high-QPS queues at the same time can - # lead to target overloading. If you are resuming high-QPS - # queues, follow the 500/50/5 pattern described in - # [Managing Cloud Tasks Scaling - # Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). - rpc :ResumeQueue, ::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest, ::Google::Cloud::Tasks::V2beta3::Queue - # Gets the access control policy for a - # [Queue][google.cloud.tasks.v2beta3.Queue]. Returns an empty policy if the - # resource exists and does not have a policy set. - # - # Authorization requires the following - # [Google IAM](https://cloud.google.com/iam) permission on the specified - # resource parent: - # - # * `cloudtasks.queues.getIamPolicy` - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Sets the access control policy for a - # [Queue][google.cloud.tasks.v2beta3.Queue]. Replaces any existing policy. - # - # Note: The Cloud Console does not check queue-level IAM permissions yet. - # Project-level permissions are required to use the Cloud Console. - # - # Authorization requires the following - # [Google IAM](https://cloud.google.com/iam) permission on the specified - # resource parent: - # - # * `cloudtasks.queues.setIamPolicy` - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Returns permissions that a caller has on a - # [Queue][google.cloud.tasks.v2beta3.Queue]. If the resource does not exist, - # this will return an empty set of permissions, not a - # [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. - # - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - # Lists the tasks in a queue. - # - # By default, only the [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC] - # view is retrieved due to performance considerations; - # [response_view][google.cloud.tasks.v2beta3.ListTasksRequest.response_view] - # controls the subset of information which is returned. - # - # The tasks may be returned in any order. The ordering may change at any - # time. - rpc :ListTasks, ::Google::Cloud::Tasks::V2beta3::ListTasksRequest, ::Google::Cloud::Tasks::V2beta3::ListTasksResponse - # Gets a task. - rpc :GetTask, ::Google::Cloud::Tasks::V2beta3::GetTaskRequest, ::Google::Cloud::Tasks::V2beta3::Task - # Creates a task and adds it to a queue. - # - # Tasks cannot be updated after creation; there is no UpdateTask command. - # - # * The maximum task size is 100KB. - rpc :CreateTask, ::Google::Cloud::Tasks::V2beta3::CreateTaskRequest, ::Google::Cloud::Tasks::V2beta3::Task - # Deletes a task. - # - # A task can be deleted if it is scheduled or dispatched. A task - # cannot be deleted if it has executed successfully or permanently - # failed. - rpc :DeleteTask, ::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest, ::Google::Protobuf::Empty - # Forces a task to run now. - # - # When this method is called, Cloud Tasks will dispatch the task, even if - # the task is already running, the queue has reached its - # [RateLimits][google.cloud.tasks.v2beta3.RateLimits] or is - # [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED]. - # - # This command is meant to be used for manual debugging. For - # example, [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] can be - # used to retry a failed task after a fix has been made or to manually force - # a task to be dispatched now. - # - # The dispatched task is returned. That is, the task that is returned - # contains the [status][Task.status] after the task is dispatched but - # before the task is received by its target. - # - # If Cloud Tasks receives a successful response from the task's - # target, then the task will be deleted; otherwise the task's - # [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] will be - # reset to the time that - # [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] was called plus - # the retry delay specified in the queue's - # [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. - # - # [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] returns - # [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a - # task that has already succeeded or permanently failed. - rpc :RunTask, ::Google::Cloud::Tasks::V2beta3::RunTaskRequest, ::Google::Cloud::Tasks::V2beta3::Task - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/queue_pb.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/queue_pb.rb deleted file mode 100644 index 6633fec4a463..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/queue_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/tasks/v2beta3/queue.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/tasks/v2beta3/target_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n&google/cloud/tasks/v2beta3/queue.proto\x12\x1agoogle.cloud.tasks.v2beta3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\'google/cloud/tasks/v2beta3/target.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9c\x07\n\x05Queue\x12\x0c\n\x04name\x18\x01 \x01(\t\x12O\n\x15\x61pp_engine_http_queue\x18\x03 \x01(\x0b\x32..google.cloud.tasks.v2beta3.AppEngineHttpQueueH\x00\x12;\n\x0bhttp_target\x18\r \x01(\x0b\x32&.google.cloud.tasks.v2beta3.HttpTarget\x12;\n\x0brate_limits\x18\x04 \x01(\x0b\x32&.google.cloud.tasks.v2beta3.RateLimits\x12=\n\x0cretry_config\x18\x05 \x01(\x0b\x32\'.google.cloud.tasks.v2beta3.RetryConfig\x12\x36\n\x05state\x18\x06 \x01(\x0e\x32\'.google.cloud.tasks.v2beta3.Queue.State\x12.\n\npurge_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12+\n\x08task_ttl\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x30\n\rtombstone_ttl\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12X\n\x1astackdriver_logging_config\x18\n \x01(\x0b\x32\x34.google.cloud.tasks.v2beta3.StackdriverLoggingConfig\x12\x39\n\x04type\x18\x0b \x01(\x0e\x32&.google.cloud.tasks.v2beta3.Queue.TypeB\x03\xe0\x41\x05\x12:\n\x05stats\x18\x0c \x01(\x0b\x32&.google.cloud.tasks.v2beta3.QueueStatsB\x03\xe0\x41\x03\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\n\n\x06PAUSED\x10\x02\x12\x0c\n\x08\x44ISABLED\x10\x03\"0\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04PULL\x10\x01\x12\x08\n\x04PUSH\x10\x02:\\\xea\x41Y\n\x1f\x63loudtasks.googleapis.com/Queue\x12\x36projects/{project}/locations/{location}/queues/{queue}B\x0c\n\nqueue_type\"j\n\nRateLimits\x12!\n\x19max_dispatches_per_second\x18\x01 \x01(\x01\x12\x16\n\x0emax_burst_size\x18\x02 \x01(\x05\x12!\n\x19max_concurrent_dispatches\x18\x03 \x01(\x05\"\xd1\x01\n\x0bRetryConfig\x12\x14\n\x0cmax_attempts\x18\x01 \x01(\x05\x12\x35\n\x12max_retry_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\x0bmin_backoff\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\x0bmax_backoff\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\rmax_doublings\x18\x05 \x01(\x05\"2\n\x18StackdriverLoggingConfig\x12\x16\n\x0esampling_ratio\x18\x01 \x01(\x01\"\xe8\x01\n\nQueueStats\x12\x18\n\x0btasks_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x46\n\x1doldest_estimated_arrival_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\'\n\x1a\x65xecuted_last_minute_count\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12(\n\x1b\x63oncurrent_dispatches_count\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12%\n\x18\x65\x66\x66\x65\x63tive_execution_rate\x18\x05 \x01(\x01\x42\x03\xe0\x41\x03\x42s\n\x1e\x63om.google.cloud.tasks.v2beta3B\nQueueProtoP\x01ZCcloud.google.com/go/cloudtasks/apiv2beta3/cloudtaskspb;cloudtaskspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Tasks - module V2beta3 - Queue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.Queue").msgclass - Queue::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.Queue.State").enummodule - Queue::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.Queue.Type").enummodule - RateLimits = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.RateLimits").msgclass - RetryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.RetryConfig").msgclass - StackdriverLoggingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.StackdriverLoggingConfig").msgclass - QueueStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.QueueStats").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/rest.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/rest.rb deleted file mode 100644 index 46bbd3572870..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/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/tasks/v2beta3/cloud_tasks/rest" -require "google/cloud/tasks/v2beta3/bindings_override" -require "google/cloud/tasks/v2beta3/version" - -module Google - module Cloud - module Tasks - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/tasks/v2beta3/rest" - # client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new - # - module V2beta3 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/target_pb.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/target_pb.rb deleted file mode 100644 index 39236d861299..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/target_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/tasks/v2beta3/target.proto - -require 'google/protobuf' - - -descriptor_data = "\n\'google/cloud/tasks/v2beta3/target.proto\x12\x1agoogle.cloud.tasks.v2beta3\"+\n\x0bPullMessage\x12\x0f\n\x07payload\x18\x01 \x01(\x0c\x12\x0b\n\x03tag\x18\x02 \x01(\t\"\x1c\n\x0cPathOverride\x12\x0c\n\x04path\x18\x01 \x01(\t\"%\n\rQueryOverride\x12\x14\n\x0cquery_params\x18\x01 \x01(\t\"\x97\x04\n\x0bUriOverride\x12\x43\n\x06scheme\x18\x01 \x01(\x0e\x32..google.cloud.tasks.v2beta3.UriOverride.SchemeH\x00\x88\x01\x01\x12\x11\n\x04host\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04port\x18\x03 \x01(\x03H\x02\x88\x01\x01\x12?\n\rpath_override\x18\x04 \x01(\x0b\x32(.google.cloud.tasks.v2beta3.PathOverride\x12\x41\n\x0equery_override\x18\x05 \x01(\x0b\x32).google.cloud.tasks.v2beta3.QueryOverride\x12\x61\n\x19uri_override_enforce_mode\x18\x06 \x01(\x0e\x32>.google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode\"5\n\x06Scheme\x12\x16\n\x12SCHEME_UNSPECIFIED\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\"b\n\x16UriOverrideEnforceMode\x12)\n%URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED\x10\x00\x12\x11\n\rIF_NOT_EXISTS\x10\x01\x12\n\n\x06\x41LWAYS\x10\x02\x42\t\n\x07_schemeB\x07\n\x05_hostB\x07\n\x05_port\"\xe4\x03\n\nHttpTarget\x12=\n\x0curi_override\x18\x01 \x01(\x0b\x32\'.google.cloud.tasks.v2beta3.UriOverride\x12;\n\x0bhttp_method\x18\x02 \x01(\x0e\x32&.google.cloud.tasks.v2beta3.HttpMethod\x12O\n\x10header_overrides\x18\x03 \x03(\x0b\x32\x35.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride\x12=\n\x0boauth_token\x18\x05 \x01(\x0b\x32&.google.cloud.tasks.v2beta3.OAuthTokenH\x00\x12;\n\noidc_token\x18\x06 \x01(\x0b\x32%.google.cloud.tasks.v2beta3.OidcTokenH\x00\x1a$\n\x06Header\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x1aO\n\x0eHeaderOverride\x12=\n\x06header\x18\x01 \x01(\x0b\x32-.google.cloud.tasks.v2beta3.HttpTarget.HeaderB\x16\n\x14\x61uthorization_header\"\xf0\x02\n\x0bHttpRequest\x12\x0b\n\x03url\x18\x01 \x01(\t\x12;\n\x0bhttp_method\x18\x02 \x01(\x0e\x32&.google.cloud.tasks.v2beta3.HttpMethod\x12\x45\n\x07headers\x18\x03 \x03(\x0b\x32\x34.google.cloud.tasks.v2beta3.HttpRequest.HeadersEntry\x12\x0c\n\x04\x62ody\x18\x04 \x01(\x0c\x12=\n\x0boauth_token\x18\x05 \x01(\x0b\x32&.google.cloud.tasks.v2beta3.OAuthTokenH\x00\x12;\n\noidc_token\x18\x06 \x01(\x0b\x32%.google.cloud.tasks.v2beta3.OidcTokenH\x00\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x16\n\x14\x61uthorization_header\"g\n\x12\x41ppEngineHttpQueue\x12Q\n\x1b\x61pp_engine_routing_override\x18\x01 \x01(\x0b\x32,.google.cloud.tasks.v2beta3.AppEngineRouting\"\xc1\x02\n\x14\x41ppEngineHttpRequest\x12;\n\x0bhttp_method\x18\x01 \x01(\x0e\x32&.google.cloud.tasks.v2beta3.HttpMethod\x12H\n\x12\x61pp_engine_routing\x18\x02 \x01(\x0b\x32,.google.cloud.tasks.v2beta3.AppEngineRouting\x12\x14\n\x0crelative_uri\x18\x03 \x01(\t\x12N\n\x07headers\x18\x04 \x03(\x0b\x32=.google.cloud.tasks.v2beta3.AppEngineHttpRequest.HeadersEntry\x12\x0c\n\x04\x62ody\x18\x05 \x01(\x0c\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"T\n\x10\x41ppEngineRouting\x12\x0f\n\x07service\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x10\n\x08instance\x18\x03 \x01(\t\x12\x0c\n\x04host\x18\x04 \x01(\t\":\n\nOAuthToken\x12\x1d\n\x15service_account_email\x18\x01 \x01(\t\x12\r\n\x05scope\x18\x02 \x01(\t\"<\n\tOidcToken\x12\x1d\n\x15service_account_email\x18\x01 \x01(\t\x12\x10\n\x08\x61udience\x18\x02 \x01(\t*s\n\nHttpMethod\x12\x1b\n\x17HTTP_METHOD_UNSPECIFIED\x10\x00\x12\x08\n\x04POST\x10\x01\x12\x07\n\x03GET\x10\x02\x12\x08\n\x04HEAD\x10\x03\x12\x07\n\x03PUT\x10\x04\x12\n\n\x06\x44\x45LETE\x10\x05\x12\t\n\x05PATCH\x10\x06\x12\x0b\n\x07OPTIONS\x10\x07\x42t\n\x1e\x63om.google.cloud.tasks.v2beta3B\x0bTargetProtoP\x01ZCcloud.google.com/go/cloudtasks/apiv2beta3/cloudtaskspb;cloudtaskspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Tasks - module V2beta3 - PullMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.PullMessage").msgclass - PathOverride = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.PathOverride").msgclass - QueryOverride = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.QueryOverride").msgclass - UriOverride = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.UriOverride").msgclass - UriOverride::Scheme = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.UriOverride.Scheme").enummodule - UriOverride::UriOverrideEnforceMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode").enummodule - HttpTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.HttpTarget").msgclass - HttpTarget::Header = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.HttpTarget.Header").msgclass - HttpTarget::HeaderOverride = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride").msgclass - HttpRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.HttpRequest").msgclass - AppEngineHttpQueue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.AppEngineHttpQueue").msgclass - AppEngineHttpRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.AppEngineHttpRequest").msgclass - AppEngineRouting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.AppEngineRouting").msgclass - OAuthToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.OAuthToken").msgclass - OidcToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.OidcToken").msgclass - HttpMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.HttpMethod").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/task_pb.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/task_pb.rb deleted file mode 100644 index f13eaac5e929..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/task_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/tasks/v2beta3/task.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/tasks/v2beta3/target_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n%google/cloud/tasks/v2beta3/task.proto\x12\x1agoogle.cloud.tasks.v2beta3\x1a\x19google/api/resource.proto\x1a\'google/cloud/tasks/v2beta3/target.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x8e\x06\n\x04Task\x12\x0c\n\x04name\x18\x01 \x01(\t\x12S\n\x17\x61pp_engine_http_request\x18\x03 \x01(\x0b\x32\x30.google.cloud.tasks.v2beta3.AppEngineHttpRequestH\x00\x12?\n\x0chttp_request\x18\x0b \x01(\x0b\x32\'.google.cloud.tasks.v2beta3.HttpRequestH\x00\x12?\n\x0cpull_message\x18\r \x01(\x0b\x32\'.google.cloud.tasks.v2beta3.PullMessageH\x00\x12\x31\n\rschedule_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x11\x64ispatch_deadline\x18\x0c \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x16\n\x0e\x64ispatch_count\x18\x06 \x01(\x05\x12\x16\n\x0eresponse_count\x18\x07 \x01(\x05\x12:\n\rfirst_attempt\x18\x08 \x01(\x0b\x32#.google.cloud.tasks.v2beta3.Attempt\x12\x39\n\x0clast_attempt\x18\t \x01(\x0b\x32#.google.cloud.tasks.v2beta3.Attempt\x12\x33\n\x04view\x18\n \x01(\x0e\x32%.google.cloud.tasks.v2beta3.Task.View\"1\n\x04View\x12\x14\n\x10VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02:h\xea\x41\x65\n\x1e\x63loudtasks.googleapis.com/Task\x12\x43projects/{project}/locations/{location}/queues/{queue}/tasks/{task}B\x0e\n\x0cpayload_type\"\xcf\x01\n\x07\x41ttempt\x12\x31\n\rschedule_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rdispatch_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rresponse_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12+\n\x0fresponse_status\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusBr\n\x1e\x63om.google.cloud.tasks.v2beta3B\tTaskProtoP\x01ZCcloud.google.com/go/cloudtasks/apiv2beta3/cloudtaskspb;cloudtaskspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Tasks - module V2beta3 - Task = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.Task").msgclass - Task::View = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.Task.View").enummodule - Attempt = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.Attempt").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/version.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/version.rb deleted file mode 100644 index 4734a344c8be..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/lib/google/cloud/tasks/v2beta3/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 Tasks - module V2beta3 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/README.md b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/README.md deleted file mode 100644 index 1125683d6825..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Tasks V2beta3 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-tasks-v2beta3/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # 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. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - # - # Example: - # - # 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 - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # 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 - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # 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 - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/cloudtasks.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/cloudtasks.rb deleted file mode 100644 index 00fcdde8c8b1..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/cloudtasks.rb +++ /dev/null @@ -1,396 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Tasks - module V2beta3 - # Request message for - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_queues ListQueues}. - # @!attribute [rw] parent - # @return [::String] - # Required. The location name. - # For example: `projects/PROJECT_ID/locations/LOCATION_ID` - # @!attribute [rw] filter - # @return [::String] - # `filter` can be used to specify a subset of queues. Any - # {::Google::Cloud::Tasks::V2beta3::Queue Queue} field can be used as a filter and - # several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The - # filter syntax is the same as described in [Stackdriver's Advanced Logs - # Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - # - # Sample filter "state: PAUSED". - # - # Note that using filters might cause fewer queues than the - # requested page_size to be returned. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. - # - # The maximum page size is 9800. If unspecified, the page size will - # be the maximum. Fewer queues than requested might be returned, - # even if more queues exist; use the - # {::Google::Cloud::Tasks::V2beta3::ListQueuesResponse#next_page_token next_page_token} - # in the response to determine if more queues exist. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying the page of results to return. - # - # To request the first page results, page_token must be empty. To - # request the next page of results, page_token must be the value of - # {::Google::Cloud::Tasks::V2beta3::ListQueuesResponse#next_page_token next_page_token} - # returned from the previous call to - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_queues ListQueues} method. It - # is an error to switch the value of the - # {::Google::Cloud::Tasks::V2beta3::ListQueuesRequest#filter filter} while - # iterating through pages. - # @!attribute [rw] read_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Read mask is used for a more granular control over what the API - # returns. If the mask is not present all fields will be returned except - # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - # specified in the mask. - class ListQueuesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_queues ListQueues}. - # @!attribute [rw] queues - # @return [::Array<::Google::Cloud::Tasks::V2beta3::Queue>] - # The list of queues. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # - # To return the next page of results, call - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_queues ListQueues} with this - # value as the - # {::Google::Cloud::Tasks::V2beta3::ListQueuesRequest#page_token page_token}. - # - # If the next_page_token is empty, there are no more results. - # - # The page token is valid for only 2 hours. - class ListQueuesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#get_queue GetQueue}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the queue. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # @!attribute [rw] read_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Read mask is used for a more granular control over what the API - # returns. If the mask is not present all fields will be returned except - # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - # specified in the mask. - class GetQueueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_queue CreateQueue}. - # @!attribute [rw] parent - # @return [::String] - # Required. The location name in which the queue will be created. - # For example: `projects/PROJECT_ID/locations/LOCATION_ID` - # - # The list of allowed locations can be obtained by calling Cloud - # Tasks' implementation of - # [ListLocations][google.cloud.location.Locations.ListLocations]. - # @!attribute [rw] queue - # @return [::Google::Cloud::Tasks::V2beta3::Queue] - # Required. The queue to create. - # - # [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as - # an existing queue. - class CreateQueueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#update_queue UpdateQueue}. - # @!attribute [rw] queue - # @return [::Google::Cloud::Tasks::V2beta3::Queue] - # Required. The queue to create or update. - # - # The queue's {::Google::Cloud::Tasks::V2beta3::Queue#name name} must be - # specified. - # - # Output only fields cannot be modified using UpdateQueue. - # Any value specified for an output only field will be ignored. - # The queue's {::Google::Cloud::Tasks::V2beta3::Queue#name name} cannot be - # changed. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # A mask used to specify which fields of the queue are being updated. - # - # If empty, then all fields will be updated. - class UpdateQueueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#delete_queue DeleteQueue}. - # @!attribute [rw] name - # @return [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - class DeleteQueueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#purge_queue PurgeQueue}. - # @!attribute [rw] name - # @return [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - class PurgeQueueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#pause_queue PauseQueue}. - # @!attribute [rw] name - # @return [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - class PauseQueueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#resume_queue ResumeQueue}. - # @!attribute [rw] name - # @return [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - class ResumeQueueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing tasks using - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_tasks ListTasks}. - # @!attribute [rw] parent - # @return [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # @!attribute [rw] response_view - # @return [::Google::Cloud::Tasks::V2beta3::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta3::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta3::Task Task} resource. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum page size. - # - # Fewer tasks than requested might be returned, even if more tasks exist; use - # {::Google::Cloud::Tasks::V2beta3::ListTasksResponse#next_page_token next_page_token} - # in the response to determine if more tasks exist. - # - # The maximum page size is 1000. If unspecified, the page size will be the - # maximum. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying the page of results to return. - # - # To request the first page results, page_token must be empty. To - # request the next page of results, page_token must be the value of - # {::Google::Cloud::Tasks::V2beta3::ListTasksResponse#next_page_token next_page_token} - # returned from the previous call to - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_tasks ListTasks} method. - # - # The page token is valid for only 2 hours. - class ListTasksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing tasks using - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_tasks ListTasks}. - # @!attribute [rw] tasks - # @return [::Array<::Google::Cloud::Tasks::V2beta3::Task>] - # The list of tasks. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # - # To return the next page of results, call - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_tasks ListTasks} with this - # value as the - # {::Google::Cloud::Tasks::V2beta3::ListTasksRequest#page_token page_token}. - # - # If the next_page_token is empty, there are no more results. - class ListTasksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a task using - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#get_task GetTask}. - # @!attribute [rw] name - # @return [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @!attribute [rw] response_view - # @return [::Google::Cloud::Tasks::V2beta3::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta3::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta3::Task Task} resource. - class GetTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task CreateTask}. - # @!attribute [rw] parent - # @return [::String] - # Required. The queue name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # - # The queue must already exist. - # @!attribute [rw] task - # @return [::Google::Cloud::Tasks::V2beta3::Task] - # Required. The task to add. - # - # Task names have the following format: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - # The user can optionally specify a task - # {::Google::Cloud::Tasks::V2beta3::Task#name name}. If a name is not specified - # then the system will generate a random unique task id, which will be set in - # the task returned in the {::Google::Cloud::Tasks::V2beta3::Task#name response}. - # - # If {::Google::Cloud::Tasks::V2beta3::Task#schedule_time schedule_time} is not - # set or is in the past then Cloud Tasks will set it to the current time. - # - # Task De-duplication: - # - # Explicitly specifying a task ID enables task de-duplication. If - # a task's ID is identical to that of an existing task or a task - # that was deleted or executed recently then the call will fail - # with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. - # If the task's queue was created using Cloud Tasks, then another task with - # the same name can't be created for ~1 hour after the original task was - # deleted or executed. If the task's queue was created using queue.yaml or - # queue.xml, then another task with the same name can't be created - # for ~9 days after the original task was deleted or executed. - # - # Because there is an extra lookup cost to identify duplicate task - # names, these {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task CreateTask} - # calls have significantly increased latency. Using hashed strings for the - # task id or for the prefix of the task id is recommended. Choosing task ids - # that are sequential or have sequential prefixes, for example using a - # timestamp, causes an increase in latency and error rates in all - # task commands. The infrastructure relies on an approximately - # uniform distribution of task ids to store and serve tasks - # efficiently. - # @!attribute [rw] response_view - # @return [::Google::Cloud::Tasks::V2beta3::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta3::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta3::Task Task} resource. - class CreateTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting a task using - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#delete_task DeleteTask}. - # @!attribute [rw] name - # @return [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - class DeleteTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for forcing a task to run now using - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#run_task RunTask}. - # @!attribute [rw] name - # @return [::String] - # Required. The task name. For example: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # @!attribute [rw] response_view - # @return [::Google::Cloud::Tasks::V2beta3::Task::View] - # The response_view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta3::Task Task} will be returned. - # - # By default response_view is - # {::Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all information is - # retrieved by default because some data, such as payloads, might be - # desirable to return only when needed because of its large size or because - # of the sensitivity of data that it contains. - # - # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta3::Task Task} resource. - class RunTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/queue.rb deleted file mode 100644 index 210bc3f6fa93..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/queue.rb +++ /dev/null @@ -1,462 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Tasks - module V2beta3 - # A queue is a container of related tasks. Queues are configured to manage - # how those tasks are dispatched. Configurable properties include rate limits, - # retry options, queue types, and others. - # @!attribute [rw] name - # @return [::String] - # Caller-specified and required in - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_queue CreateQueue}, after - # which it becomes output only. - # - # The queue name. - # - # The queue name must have the following format: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - # - # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - # hyphens (-), colons (:), or periods (.). - # For more information, see - # [Identifying - # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - # * `LOCATION_ID` is the canonical ID for the queue's location. - # The list of available locations can be obtained by calling - # [ListLocations][google.cloud.location.Locations.ListLocations]. - # For more information, see https://cloud.google.com/about/locations/. - # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - # hyphens (-). The maximum length is 100 characters. - # @!attribute [rw] app_engine_http_queue - # @return [::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue] - # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue AppEngineHttpQueue} - # settings apply only to [App Engine - # tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue. - # {::Google::Cloud::Tasks::V2beta3::HttpRequest Http tasks} are not affected by - # this proto. - # @!attribute [rw] http_target - # @return [::Google::Cloud::Tasks::V2beta3::HttpTarget] - # Modifies HTTP target for HTTP tasks. - # @!attribute [rw] rate_limits - # @return [::Google::Cloud::Tasks::V2beta3::RateLimits] - # Rate limits for task dispatches. - # - # {::Google::Cloud::Tasks::V2beta3::Queue#rate_limits rate_limits} and - # {::Google::Cloud::Tasks::V2beta3::Queue#retry_config retry_config} are related - # because they both control task attempts. However they control task attempts - # in different ways: - # - # * {::Google::Cloud::Tasks::V2beta3::Queue#rate_limits rate_limits} controls the - # total rate of - # dispatches from a queue (i.e. all traffic dispatched from the - # queue, regardless of whether the dispatch is from a first - # attempt or a retry). - # * {::Google::Cloud::Tasks::V2beta3::Queue#retry_config retry_config} controls - # what happens to - # particular a task after its first attempt fails. That is, - # {::Google::Cloud::Tasks::V2beta3::Queue#retry_config retry_config} controls - # task retries (the second attempt, third attempt, etc). - # - # The queue's actual dispatch rate is the result of: - # - # * Number of tasks in the queue - # * User-specified throttling: - # {::Google::Cloud::Tasks::V2beta3::Queue#rate_limits rate_limits}, - # {::Google::Cloud::Tasks::V2beta3::Queue#retry_config retry_config}, and the - # [queue's state][google.cloud.tasks.v2beta3.Queue.state]. - # * System throttling due to `429` (Too Many Requests) or `503` (Service - # Unavailable) responses from the worker, high error rates, or to smooth - # sudden large traffic spikes. - # @!attribute [rw] retry_config - # @return [::Google::Cloud::Tasks::V2beta3::RetryConfig] - # Settings that determine the retry behavior. - # - # * For tasks created using Cloud Tasks: the queue-level retry settings - # apply to all tasks in the queue that were created using Cloud Tasks. - # Retry settings cannot be set on individual tasks. - # * For tasks created using the App Engine SDK: the queue-level retry - # settings apply to all tasks in the queue which do not have retry settings - # explicitly set on the task and were created by the App Engine SDK. See - # [App Engine - # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). - # @!attribute [rw] state - # @return [::Google::Cloud::Tasks::V2beta3::Queue::State] - # Output only. The state of the queue. - # - # `state` can only be changed by called - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#pause_queue PauseQueue}, - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#resume_queue ResumeQueue}, or - # uploading - # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#update_queue UpdateQueue} cannot be - # used to change `state`. - # @!attribute [rw] purge_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last time this queue was purged. - # - # All tasks that were {::Google::Cloud::Tasks::V2beta3::Task#create_time created} - # before this time were purged. - # - # A queue can be purged using - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#purge_queue PurgeQueue}, the [App - # Engine Task Queue SDK, or the Cloud - # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). - # - # Purge time will be truncated to the nearest microsecond. Purge - # time will be unset if the queue has never been purged. - # @!attribute [rw] task_ttl - # @return [::Google::Protobuf::Duration] - # The maximum amount of time that a task will be retained in - # this queue. - # - # Queues created by Cloud Tasks have a default `task_ttl` of 31 days. - # After a task has lived for `task_ttl`, the task will be deleted - # regardless of whether it was dispatched or not. - # - # The `task_ttl` for queues created via queue.yaml/xml is equal to the - # maximum duration because there is a - # [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for - # these queues. To view the maximum valid duration, see the documentation for - # {::Google::Protobuf::Duration Duration}. - # @!attribute [rw] tombstone_ttl - # @return [::Google::Protobuf::Duration] - # The task tombstone time to live (TTL). - # - # After a task is deleted or executed, the task's tombstone is - # retained for the length of time specified by `tombstone_ttl`. - # The tombstone is used by task de-duplication; another task with the same - # name can't be created until the tombstone has expired. For more information - # about task de-duplication, see the documentation for - # {::Google::Cloud::Tasks::V2beta3::CreateTaskRequest#task CreateTaskRequest}. - # - # Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour. - # @!attribute [rw] stackdriver_logging_config - # @return [::Google::Cloud::Tasks::V2beta3::StackdriverLoggingConfig] - # Configuration options for writing logs to - # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this - # field is unset, then no logs are written. - # @!attribute [rw] type - # @return [::Google::Cloud::Tasks::V2beta3::Queue::Type] - # Immutable. The type of a queue (push or pull). - # - # `Queue.type` is an immutable property of the queue that is set at the queue - # creation time. When left unspecified, the default value of `PUSH` is - # selected. - # @!attribute [r] stats - # @return [::Google::Cloud::Tasks::V2beta3::QueueStats] - # Output only. The realtime, informational statistics for a queue. In order - # to receive the statistics the caller should include this field in the - # FieldMask. - class Queue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # State of the queue. - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # The queue is running. Tasks can be dispatched. - # - # If the queue was created using Cloud Tasks and the queue has - # had no activity (method calls or task dispatches) for 30 days, - # the queue may take a few minutes to re-activate. Some method - # calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and - # tasks may not be dispatched for a few minutes until the queue - # has been re-activated. - RUNNING = 1 - - # Tasks are paused by the user. If the queue is paused then Cloud - # Tasks will stop delivering tasks from it, but more tasks can - # still be added to it by the user. - PAUSED = 2 - - # The queue is disabled. - # - # A queue becomes `DISABLED` when - # [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) - # or - # [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) - # is uploaded which does not contain the queue. You cannot directly disable - # a queue. - # - # When a queue is disabled, tasks can still be added to a queue - # but the tasks are not dispatched. - # - # To permanently delete this queue and all of its tasks, call - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#delete_queue DeleteQueue}. - DISABLED = 3 - end - - # The type of the queue. - module Type - # Default value. - TYPE_UNSPECIFIED = 0 - - # A pull queue. - PULL = 1 - - # A push queue. - PUSH = 2 - end - end - - # Rate limits. - # - # This message determines the maximum rate that tasks can be dispatched by a - # queue, regardless of whether the dispatch is a first task attempt or a retry. - # - # Note: The debugging command, - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#run_task RunTask}, will run a task - # even if the queue has reached its - # {::Google::Cloud::Tasks::V2beta3::RateLimits RateLimits}. - # @!attribute [rw] max_dispatches_per_second - # @return [::Float] - # The maximum rate at which tasks are dispatched from this queue. - # - # If unspecified when the queue is created, Cloud Tasks will pick the - # default. - # - # * For {::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue App Engine queues}, - # the maximum allowed value - # is 500. - # - # - # This field has the same meaning as - # [rate in - # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). - # @!attribute [rw] max_burst_size - # @return [::Integer] - # The max burst size. - # - # Max burst size limits how fast tasks in queue are processed when - # many tasks are in the queue and the rate is high. This field - # allows the queue to have a high rate so processing starts shortly - # after a task is enqueued, but still limits resource usage when - # many tasks are enqueued in a short period of time. - # - # The [token bucket](https://wikipedia.org/wiki/Token_Bucket) - # algorithm is used to control the rate of task dispatches. Each - # queue has a token bucket that holds tokens, up to the maximum - # specified by `max_burst_size`. Each time a task is dispatched, a - # token is removed from the bucket. Tasks will be dispatched until - # the queue's bucket runs out of tokens. The bucket will be - # continuously refilled with new tokens based on - # {::Google::Cloud::Tasks::V2beta3::RateLimits#max_dispatches_per_second max_dispatches_per_second}. - # - # The default value of `max_burst_size` is picked by Cloud Tasks - # based on the value of - # {::Google::Cloud::Tasks::V2beta3::RateLimits#max_dispatches_per_second max_dispatches_per_second}. - # - # The maximum value of `max_burst_size` is 500. - # - # For App Engine queues that were created or updated using - # `queue.yaml/xml`, `max_burst_size` is equal to - # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). - # If - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#update_queue UpdateQueue} is called - # on a queue without explicitly setting a value for `max_burst_size`, - # `max_burst_size` value will get updated if - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#update_queue UpdateQueue} is - # updating - # {::Google::Cloud::Tasks::V2beta3::RateLimits#max_dispatches_per_second max_dispatches_per_second}. - # @!attribute [rw] max_concurrent_dispatches - # @return [::Integer] - # The maximum number of concurrent tasks that Cloud Tasks allows - # to be dispatched for this queue. After this threshold has been - # reached, Cloud Tasks stops dispatching tasks until the number of - # concurrent requests decreases. - # - # If unspecified when the queue is created, Cloud Tasks will pick the - # default. - # - # - # The maximum allowed value is 5,000. - # - # - # This field has the same meaning as - # [max_concurrent_requests in - # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). - class RateLimits - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Retry config. - # - # These settings determine when a failed task attempt is retried. - # @!attribute [rw] max_attempts - # @return [::Integer] - # Number of attempts per task. - # - # Cloud Tasks will attempt the task `max_attempts` times (that is, if the - # first attempt fails, then there will be `max_attempts - 1` retries). Must - # be >= -1. - # - # If unspecified when the queue is created, Cloud Tasks will pick the - # default. - # - # -1 indicates unlimited attempts. - # - # This field has the same meaning as - # [task_retry_limit in - # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - # @!attribute [rw] max_retry_duration - # @return [::Google::Protobuf::Duration] - # If positive, `max_retry_duration` specifies the time limit for - # retrying a failed task, measured from when the task was first - # attempted. Once `max_retry_duration` time has passed *and* the - # task has been attempted - # {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_attempts max_attempts} times, - # no further attempts will be made and the task will be deleted. - # - # If zero, then the task age is unlimited. - # - # If unspecified when the queue is created, Cloud Tasks will pick the - # default. - # - # - # `max_retry_duration` will be truncated to the nearest second. - # - # This field has the same meaning as - # [task_age_limit in - # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - # @!attribute [rw] min_backoff - # @return [::Google::Protobuf::Duration] - # A task will be {::Google::Cloud::Tasks::V2beta3::Task#schedule_time scheduled} - # for retry between - # {::Google::Cloud::Tasks::V2beta3::RetryConfig#min_backoff min_backoff} and - # {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_backoff max_backoff} duration - # after it fails, if the queue's - # {::Google::Cloud::Tasks::V2beta3::RetryConfig RetryConfig} specifies that the - # task should be retried. - # - # If unspecified when the queue is created, Cloud Tasks will pick the - # default. - # - # - # `min_backoff` will be truncated to the nearest second. - # - # This field has the same meaning as - # [min_backoff_seconds in - # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - # @!attribute [rw] max_backoff - # @return [::Google::Protobuf::Duration] - # A task will be {::Google::Cloud::Tasks::V2beta3::Task#schedule_time scheduled} - # for retry between - # {::Google::Cloud::Tasks::V2beta3::RetryConfig#min_backoff min_backoff} and - # {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_backoff max_backoff} duration - # after it fails, if the queue's - # {::Google::Cloud::Tasks::V2beta3::RetryConfig RetryConfig} specifies that the - # task should be retried. - # - # If unspecified when the queue is created, Cloud Tasks will pick the - # default. - # - # - # `max_backoff` will be truncated to the nearest second. - # - # This field has the same meaning as - # [max_backoff_seconds in - # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - # @!attribute [rw] max_doublings - # @return [::Integer] - # The time between retries will double `max_doublings` times. - # - # A task's retry interval starts at - # {::Google::Cloud::Tasks::V2beta3::RetryConfig#min_backoff min_backoff}, then - # doubles `max_doublings` times, then increases linearly, and finally retries - # at intervals of - # {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_backoff max_backoff} up to - # {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_attempts max_attempts} times. - # - # For example, if - # {::Google::Cloud::Tasks::V2beta3::RetryConfig#min_backoff min_backoff} is 10s, - # {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_backoff max_backoff} is 300s, - # and `max_doublings` is 3, then the a task will first be retried in 10s. The - # retry interval will double three times, and then increase linearly by 2^3 * - # 10s. Finally, the task will retry at intervals of - # {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_backoff max_backoff} until the - # task has been attempted - # {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_attempts max_attempts} times. - # Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, - # 300s, .... - # - # If unspecified when the queue is created, Cloud Tasks will pick the - # default. - # - # - # This field has the same meaning as - # [max_doublings in - # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - class RetryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration options for writing logs to - # [Stackdriver Logging](https://cloud.google.com/logging/docs/). - # @!attribute [rw] sampling_ratio - # @return [::Float] - # Specifies the fraction of operations to write to - # [Stackdriver Logging](https://cloud.google.com/logging/docs/). - # This field may contain any value between 0.0 and 1.0, inclusive. - # 0.0 is the default and means that no operations are logged. - class StackdriverLoggingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Statistics for a queue. - # @!attribute [r] tasks_count - # @return [::Integer] - # Output only. An estimation of the number of tasks in the queue, that is, - # the tasks in the queue that haven't been executed, the tasks in the queue - # which the queue has dispatched but has not yet received a reply for, and - # the failed tasks that the queue is retrying. - # @!attribute [r] oldest_estimated_arrival_time - # @return [::Google::Protobuf::Timestamp] - # Output only. An estimation of the nearest time in the future where a task - # in the queue is scheduled to be executed. - # @!attribute [r] executed_last_minute_count - # @return [::Integer] - # Output only. The number of tasks that the queue has dispatched and received - # a reply for during the last minute. This variable counts both successful - # and non-successful executions. - # @!attribute [r] concurrent_dispatches_count - # @return [::Integer] - # Output only. The number of requests that the queue has dispatched but has - # not received a reply for yet. - # @!attribute [r] effective_execution_rate - # @return [::Float] - # Output only. The current maximum number of tasks per second executed by the - # queue. The maximum value of this variable is controlled by the RateLimits - # of the Queue. However, this value could be less to avoid overloading the - # endpoints tasks in the queue are targeting. - class QueueStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/target.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/target.rb deleted file mode 100644 index 0e27cb1fe1f2..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/target.rb +++ /dev/null @@ -1,728 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Tasks - module V2beta3 - # Pull Message. - # - # This proto can only be used for tasks in a queue which has - # {::Google::Cloud::Tasks::V2beta3::Queue#type PULL} type. It currently exists for - # backwards compatibility with the App Engine Task Queue SDK. This message type - # maybe returned with methods - # [list][google.cloud.tasks.v2beta3.CloudTask.ListTasks] and - # [get][google.cloud.tasks.v2beta3.CloudTask.ListTasks], when the response view - # is [FULL][google.cloud.tasks.v2beta3.Task.View.Full]. - # @!attribute [rw] payload - # @return [::String] - # A data payload consumed by the worker to execute the task. - # @!attribute [rw] tag - # @return [::String] - # The tasks's tag. - # - # The tag is less than 500 characters. - # - # SDK compatibility: Although the SDK allows tags to be either - # string or - # [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), - # only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 - # encoded, the tag will be empty when the task is returned by Cloud Tasks. - class PullMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # PathOverride. - # - # Path message defines path override for HTTP targets. - # @!attribute [rw] path - # @return [::String] - # The URI path (e.g., /users/1234). Default is an empty string. - class PathOverride - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # QueryOverride. - # - # Query message defines query override for HTTP targets. - # @!attribute [rw] query_params - # @return [::String] - # The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty - # string. - class QueryOverride - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # URI Override. - # - # When specified, all the HTTP tasks inside the queue will be partially or - # fully overridden depending on the configured values. - # @!attribute [rw] scheme - # @return [::Google::Cloud::Tasks::V2beta3::UriOverride::Scheme] - # Scheme override. - # - # When specified, the task URI scheme is replaced by the provided value (HTTP - # or HTTPS). - # @!attribute [rw] host - # @return [::String] - # Host override. - # - # When specified, replaces the host part of the task URL. For example, - # if the task URL is "https://www.google.com," and host value is set to - # "example.net", the overridden URI will be changed to "https://example.net." - # Host value cannot be an empty string (INVALID_ARGUMENT). - # @!attribute [rw] port - # @return [::Integer] - # Port override. - # - # When specified, replaces the port part of the task URI. For instance, - # for a URI http://www.google.com/foo and port=123, the overridden URI - # becomes http://www.google.com:123/foo. Note that the port value must be a - # positive integer. Setting the port to 0 (Zero) clears the URI port. - # @!attribute [rw] path_override - # @return [::Google::Cloud::Tasks::V2beta3::PathOverride] - # URI path. - # - # When specified, replaces the existing path of the task URL. Setting the - # path value to an empty string clears the URI path segment. - # @!attribute [rw] query_override - # @return [::Google::Cloud::Tasks::V2beta3::QueryOverride] - # URI Query. - # - # When specified, replaces the query part of the task URI. Setting the - # query value to an empty string clears the URI query segment. - # @!attribute [rw] uri_override_enforce_mode - # @return [::Google::Cloud::Tasks::V2beta3::UriOverride::UriOverrideEnforceMode] - # URI Override Enforce Mode - # - # When specified, determines the Target UriOverride mode. If not specified, - # it defaults to ALWAYS. - class UriOverride - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The Scheme for an HTTP request. By default, it is HTTPS. - module Scheme - # Scheme unspecified. Defaults to HTTPS. - SCHEME_UNSPECIFIED = 0 - - # Convert the scheme to HTTP, e.g., https://www.google.ca will change to - # http://www.google.ca. - HTTP = 1 - - # Convert the scheme to HTTPS, e.g., http://www.google.ca will change to - # https://www.google.ca. - HTTPS = 2 - end - - # UriOverrideEnforceMode mode is to define enforcing mode for the override - # modes. - module UriOverrideEnforceMode - # OverrideMode Unspecified. Defaults to ALWAYS. - URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED = 0 - - # In the IF_NOT_EXISTS mode, queue-level configuration is only - # applied where task-level configuration does not exist. - IF_NOT_EXISTS = 1 - - # In the ALWAYS mode, queue-level configuration overrides all - # task-level configuration - ALWAYS = 2 - end - end - - # HTTP target. - # - # When specified as a [Queue][target_type], all the tasks with [HttpRequest] - # will be overridden according to the target. - # @!attribute [rw] uri_override - # @return [::Google::Cloud::Tasks::V2beta3::UriOverride] - # URI override. - # - # When specified, overrides the execution URI for all the tasks in the queue. - # @!attribute [rw] http_method - # @return [::Google::Cloud::Tasks::V2beta3::HttpMethod] - # The HTTP method to use for the request. - # - # When specified, it overrides - # {::Google::Cloud::Tasks::V2beta3::HttpTarget#http_method HttpRequest} for the - # task. Note that if the value is set to [HttpMethod][GET] the - # [HttpRequest][body] of the task will be ignored at execution time. - # @!attribute [rw] header_overrides - # @return [::Array<::Google::Cloud::Tasks::V2beta3::HttpTarget::HeaderOverride>] - # HTTP target headers. - # - # This map contains the header field names and values. - # Headers will be set when running the - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task CreateTask} and/or - # [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask]. - # - # These headers represent a subset of the headers that will be configured for - # the task's HTTP request. Some HTTP request headers will be ignored or - # replaced. - # - # A partial list of headers that will be ignored or replaced is: - # * Several predefined headers, prefixed with "X-CloudTasks-", can - # be used to define properties of the task. - # * Host: This will be computed by Cloud Tasks and derived from - # [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url]. - # * Content-Length: This will be computed by Cloud Tasks. - # - # `Content-Type` won't be set by Cloud Tasks. You can explicitly set - # `Content-Type` to a media type when the - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task task is created}. - # For example,`Content-Type` can be set to `"application/octet-stream"` or - # `"application/json"`. The default value is set to `"application/json"`. - # - # * User-Agent: This will be set to `"Google-Cloud-Tasks"`. - # - # Headers which can have multiple values (according to RFC2616) can be - # specified using comma-separated values. - # - # The size of the headers must be less than 80KB. - # Queue-level headers to override headers of all the tasks in the queue. - # @!attribute [rw] oauth_token - # @return [::Google::Cloud::Tasks::V2beta3::OAuthToken] - # If specified, an - # [OAuth token](https://developers.google.com/identity/protocols/OAuth2) - # will be generated and attached as the `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`, `oidc_token`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] oidc_token - # @return [::Google::Cloud::Tasks::V2beta3::OidcToken] - # If specified, an - # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) - # token will be generated and attached as an `Authorization` header in the - # HTTP request. - # - # This type of authorization can be used for many scenarios, including - # calling Cloud Run, or endpoints where you intend to validate the token - # yourself. - # - # Note: The following fields are mutually exclusive: `oidc_token`, `oauth_token`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class HttpTarget - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines a header message. A header can have a key and a value. - # @!attribute [rw] key - # @return [::String] - # The Key of the header. - # @!attribute [rw] value - # @return [::String] - # The Value of the header. - class Header - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wraps the Header object. - # @!attribute [rw] header - # @return [::Google::Cloud::Tasks::V2beta3::HttpTarget::Header] - # header embodying a key and a value. - class HeaderOverride - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # HTTP request. - # - # The task will be pushed to the worker as an HTTP request. If the worker - # or the redirected worker acknowledges the task by returning a successful HTTP - # response code ([`200` - `299`]), the task will be removed from the queue. If - # any other HTTP response code is returned or no response is received, the - # task will be retried according to the following: - # - # * User-specified throttling: [retry - # configuration][google.cloud.tasks.v2beta3.Queue.retry_config], - # {::Google::Cloud::Tasks::V2beta3::Queue#rate_limits rate limits}, and the - # [queue's state][google.cloud.tasks.v2beta3.Queue.state]. - # - # * System throttling: To prevent the worker from overloading, Cloud Tasks may - # temporarily reduce the queue's effective rate. User-specified settings - # will not be changed. - # - # System throttling happens because: - # - # * Cloud Tasks backs off on all errors. Normally the backoff specified in - # {::Google::Cloud::Tasks::V2beta3::Queue#rate_limits rate limits} will be used. - # But if the worker returns `429` (Too Many Requests), `503` (Service - # Unavailable), or the rate of errors is high, Cloud Tasks will use a - # higher backoff rate. The retry specified in the `Retry-After` HTTP - # response header is considered. - # - # * To prevent traffic spikes and to smooth sudden increases in traffic, - # dispatches ramp up slowly when the queue is newly created or idle and - # if large numbers of tasks suddenly become available to dispatch (due to - # spikes in create task rates, the queue being unpaused, or many tasks - # that are scheduled at the same time). - # @!attribute [rw] url - # @return [::String] - # Required. The full url path that the request will be sent to. - # - # This string must begin with either "http://" or "https://". Some examples - # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will - # encode some characters for safety and compatibility. The maximum allowed - # URL length is 2083 characters after encoding. - # - # The `Location` header response from a redirect response [`300` - `399`] - # may be followed. The redirect is not counted as a separate attempt. - # @!attribute [rw] http_method - # @return [::Google::Cloud::Tasks::V2beta3::HttpMethod] - # The HTTP method to use for the request. The default is POST. - # @!attribute [rw] headers - # @return [::Google::Protobuf::Map{::String => ::String}] - # HTTP request headers. - # - # This map contains the header field names and values. - # Headers can be set when the - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task task is created}. - # - # These headers represent a subset of the headers that will accompany the - # task's HTTP request. Some HTTP request headers will be ignored or replaced. - # - # A partial list of headers that will be ignored or replaced is: - # - # * Any header that is prefixed with "X-CloudTasks-" will be treated - # as service header. Service headers define properties of the task and are - # predefined in CloudTask. - # * Host: This will be computed by Cloud Tasks and derived from - # {::Google::Cloud::Tasks::V2beta3::HttpRequest#url HttpRequest.url}. - # * Content-Length: This will be computed by Cloud Tasks. - # * User-Agent: This will be set to `"Google-Cloud-Tasks"`. - # * `X-Google-*`: Google use only. - # * `X-AppEngine-*`: Google use only. - # - # `Content-Type` won't be set by Cloud Tasks. You can explicitly set - # `Content-Type` to a media type when the - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task task is created}. - # For example, `Content-Type` can be set to `"application/octet-stream"` or - # `"application/json"`. - # - # Headers which can have multiple values (according to RFC2616) can be - # specified using comma-separated values. - # - # The size of the headers must be less than 80KB. - # @!attribute [rw] body - # @return [::String] - # HTTP request body. - # - # A request body is allowed only if the - # {::Google::Cloud::Tasks::V2beta3::HttpRequest#http_method HTTP method} is POST, - # PUT, or PATCH. It is an error to set body on a task with an incompatible - # {::Google::Cloud::Tasks::V2beta3::HttpMethod HttpMethod}. - # @!attribute [rw] oauth_token - # @return [::Google::Cloud::Tasks::V2beta3::OAuthToken] - # 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`, `oidc_token`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] oidc_token - # @return [::Google::Cloud::Tasks::V2beta3::OidcToken] - # If specified, an - # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) - # token will be generated and attached as an `Authorization` header in the - # HTTP request. - # - # This type of authorization can be used for many scenarios, including - # calling Cloud Run, or endpoints where you intend to validate the token - # yourself. - # - # Note: The following fields are mutually exclusive: `oidc_token`, `oauth_token`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class HttpRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class HeadersEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # App Engine HTTP queue. - # - # The task will be delivered to the App Engine application hostname - # specified by its - # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue AppEngineHttpQueue} and - # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest AppEngineHttpRequest}. The - # documentation for - # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest AppEngineHttpRequest} - # explains how the task's host URL is constructed. - # - # Using {::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue AppEngineHttpQueue} - # requires - # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) - # Google IAM permission for the project - # and the following scope: - # - # `https://www.googleapis.com/auth/cloud-platform` - # @!attribute [rw] app_engine_routing_override - # @return [::Google::Cloud::Tasks::V2beta3::AppEngineRouting] - # Overrides for the - # [task-level - # app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. - # - # If set, `app_engine_routing_override` is used for all tasks in - # the queue, no matter what the setting is for the - # [task-level - # app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. - class AppEngineHttpQueue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # App Engine HTTP request. - # - # The message defines the HTTP request that is sent to an App Engine app when - # the task is dispatched. - # - # Using {::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest AppEngineHttpRequest} - # requires - # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) - # Google IAM permission for the project - # and the following scope: - # - # `https://www.googleapis.com/auth/cloud-platform` - # - # The task will be delivered to the App Engine app which belongs to the same - # project as the queue. For more information, see - # [How Requests are - # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) - # and how routing is affected by - # [dispatch - # files](https://cloud.google.com/appengine/docs/python/config/dispatchref). - # Traffic is encrypted during transport and never leaves Google datacenters. - # Because this traffic is carried over a communication mechanism internal to - # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS). - # The request to the handler, however, will appear to have used the HTTP - # protocol. - # - # The {::Google::Cloud::Tasks::V2beta3::AppEngineRouting AppEngineRouting} used to - # construct the URL that the task is delivered to can be set at the queue-level - # or task-level: - # - # * If set, - # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue#app_engine_routing_override app_engine_routing_override} - # is used for all tasks in the queue, no matter what the setting - # is for the - # [task-level - # app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. - # - # - # The `url` that the task will be sent to is: - # - # * `url =` {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#host host} `+` - # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest#relative_uri relative_uri} - # - # Tasks can be dispatched to secure app handlers, unsecure app handlers, and - # URIs restricted with - # [`login: - # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref). - # Because tasks are not run as any user, they cannot be dispatched to URIs - # restricted with - # [`login: - # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) - # Task dispatches also do not follow redirects. - # - # The task attempt has succeeded if the app's request handler returns an HTTP - # response code in the range [`200` - `299`]. The task attempt has failed if - # the app's handler returns a non-2xx response code or Cloud Tasks does - # not receive response before the - # {::Google::Cloud::Tasks::V2beta3::Task#dispatch_deadline deadline}. Failed tasks - # will be retried according to the [retry - # configuration][google.cloud.tasks.v2beta3.Queue.retry_config]. `503` (Service - # Unavailable) is considered an App Engine system error instead of an - # application error and will cause Cloud Tasks' traffic congestion control to - # temporarily throttle the queue's dispatches. Unlike other types of task - # targets, a `429` (Too Many Requests) response from an app handler does not - # cause traffic congestion control to throttle the queue. - # @!attribute [rw] http_method - # @return [::Google::Cloud::Tasks::V2beta3::HttpMethod] - # The HTTP method to use for the request. The default is POST. - # - # The app's request handler for the task's target URL must be able to handle - # HTTP requests with this http_method, otherwise the task attempt fails with - # error code 405 (Method Not Allowed). See [Writing a push task request - # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - # and the App Engine documentation for your runtime on [How Requests are - # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). - # @!attribute [rw] app_engine_routing - # @return [::Google::Cloud::Tasks::V2beta3::AppEngineRouting] - # Task-level setting for App Engine routing. - # - # If set, - # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue#app_engine_routing_override app_engine_routing_override} - # is used for all tasks in the queue, no matter what the setting is for the - # [task-level - # app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. - # @!attribute [rw] relative_uri - # @return [::String] - # The relative URI. - # - # The relative URI must begin with "/" and must be a valid HTTP relative URI. - # It can contain a path and query string arguments. - # If the relative URI is empty, then the root path "/" will be used. - # No spaces are allowed, and the maximum length allowed is 2083 characters. - # @!attribute [rw] headers - # @return [::Google::Protobuf::Map{::String => ::String}] - # HTTP request headers. - # - # This map contains the header field names and values. - # Headers can be set when the - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task task is created}. - # Repeated headers are not supported but a header value can contain commas. - # - # Cloud Tasks sets some headers to default values: - # - # * `User-Agent`: By default, this header is - # `"AppEngine-Google; (+http://code.google.com/appengine)"`. - # This header can be modified, but Cloud Tasks will append - # `"AppEngine-Google; (+http://code.google.com/appengine)"` to the - # modified `User-Agent`. - # - # If the task has a - # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest#body body}, Cloud Tasks - # sets the following headers: - # - # * `Content-Type`: By default, the `Content-Type` header is set to - # `"application/octet-stream"`. The default can be overridden by explicitly - # setting `Content-Type` to a particular media type when the - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task task is created}. - # For example, `Content-Type` can be set to `"application/json"`. - # * `Content-Length`: This is computed by Cloud Tasks. This value is - # output only. It cannot be changed. - # - # The headers below cannot be set or overridden: - # - # * `Host` - # * `X-Google-*` - # * `X-AppEngine-*` - # - # In addition, Cloud Tasks sets some headers when the task is dispatched, - # such as headers containing information about the task; see - # [request - # headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers). - # These headers are set only when the task is dispatched, so they are not - # visible when the task is returned in a Cloud Tasks response. - # - # Although there is no specific limit for the maximum number of headers or - # the size, there is a limit on the maximum size of the - # {::Google::Cloud::Tasks::V2beta3::Task Task}. For more information, see the - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task CreateTask} - # documentation. - # @!attribute [rw] body - # @return [::String] - # HTTP request body. - # - # A request body is allowed only if the HTTP method is POST or PUT. It is - # an error to set a body on a task with an incompatible - # {::Google::Cloud::Tasks::V2beta3::HttpMethod HttpMethod}. - class AppEngineHttpRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class HeadersEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # App Engine Routing. - # - # Defines routing characteristics specific to App Engine - service, version, - # and instance. - # - # For more information about services, versions, and instances see - # [An Overview of App - # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), - # [Microservices Architecture on Google App - # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), - # [App Engine Standard request - # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), - # and [App Engine Flex request - # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). - # @!attribute [rw] service - # @return [::String] - # App service. - # - # By default, the task is sent to the service which is the default - # service when the task is attempted. - # - # For some queues or tasks which were created using the App Engine - # Task Queue API, {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#host host} is - # not parsable into - # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#service service}, - # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#version version}, and - # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#instance instance}. For - # example, some tasks which were created using the App Engine SDK use a - # custom domain name; custom domains are not parsed by Cloud Tasks. If - # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#host host} is not parsable, - # then {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#service service}, - # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#version version}, and - # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#instance instance} are the - # empty string. - # @!attribute [rw] version - # @return [::String] - # App version. - # - # By default, the task is sent to the version which is the default - # version when the task is attempted. - # - # For some queues or tasks which were created using the App Engine - # Task Queue API, {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#host host} is - # not parsable into - # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#service service}, - # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#version version}, and - # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#instance instance}. For - # example, some tasks which were created using the App Engine SDK use a - # custom domain name; custom domains are not parsed by Cloud Tasks. If - # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#host host} is not parsable, - # then {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#service service}, - # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#version version}, and - # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#instance instance} are the - # empty string. - # @!attribute [rw] instance - # @return [::String] - # App instance. - # - # By default, the task is sent to an instance which is available when - # the task is attempted. - # - # Requests can only be sent to a specific instance if - # [manual scaling is used in App Engine - # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). - # App Engine Flex does not support instances. For more information, see - # [App Engine Standard request - # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) - # and [App Engine Flex request - # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). - # @!attribute [rw] host - # @return [::String] - # Output only. The host that the task is sent to. - # - # The host is constructed from the domain name of the app associated with - # the queue's project ID (for example .appspot.com), and the - # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#service service}, - # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#version version}, and - # {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#instance instance}. Tasks - # which were created using the App Engine SDK might have a custom domain - # name. - # - # For more information, see - # [How Requests are - # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). - class AppEngineRouting - 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_email - # @return [::String] - # [Service account email](https://cloud.google.com/iam/docs/service-accounts) - # to be used for generating OAuth token. - # The service account must be within the same project as the queue. The - # caller must have iam.serviceAccounts.actAs permission for the service - # account. - # @!attribute [rw] scope - # @return [::String] - # 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 - - # Contains information needed for generating an - # [OpenID Connect - # token](https://developers.google.com/identity/protocols/OpenIDConnect). - # This type of authorization can be used for many scenarios, including - # calling Cloud Run, or endpoints where you intend to validate the token - # yourself. - # @!attribute [rw] service_account_email - # @return [::String] - # [Service account email](https://cloud.google.com/iam/docs/service-accounts) - # to be used for generating OIDC token. - # The service account must be within the same project as the queue. The - # caller must have iam.serviceAccounts.actAs permission for the service - # account. - # @!attribute [rw] audience - # @return [::String] - # Audience to be used when generating OIDC token. If not specified, the URI - # specified in target will be used. - class OidcToken - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The HTTP method used to execute the task. - module HttpMethod - # HTTP method unspecified - HTTP_METHOD_UNSPECIFIED = 0 - - # HTTP POST - POST = 1 - - # HTTP GET - GET = 2 - - # HTTP HEAD - HEAD = 3 - - # HTTP PUT - PUT = 4 - - # HTTP DELETE - DELETE = 5 - - # HTTP PATCH - PATCH = 6 - - # HTTP OPTIONS - OPTIONS = 7 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/task.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/task.rb deleted file mode 100644 index b412727c1c81..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/cloud/tasks/v2beta3/task.rb +++ /dev/null @@ -1,213 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Tasks - module V2beta3 - # A unit of scheduled work. - # @!attribute [rw] name - # @return [::String] - # Optionally caller-specified in - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task CreateTask}. - # - # The task name. - # - # The task name must have the following format: - # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - # - # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - # hyphens (-), colons (:), or periods (.). - # For more information, see - # [Identifying - # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - # * `LOCATION_ID` is the canonical ID for the task's location. - # The list of available locations can be obtained by calling - # [ListLocations][google.cloud.location.Locations.ListLocations]. - # For more information, see https://cloud.google.com/about/locations/. - # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - # hyphens (-). The maximum length is 100 characters. - # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), - # hyphens (-), or underscores (_). The maximum length is 500 characters. - # @!attribute [rw] app_engine_http_request - # @return [::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest] - # HTTP request that is sent to the App Engine app handler. - # - # An App Engine task is a task that has - # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest AppEngineHttpRequest} - # set. - # - # Note: The following fields are mutually exclusive: `app_engine_http_request`, `http_request`, `pull_message`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] http_request - # @return [::Google::Cloud::Tasks::V2beta3::HttpRequest] - # HTTP request that is sent to the task's target. - # - # An HTTP task is a task that has - # {::Google::Cloud::Tasks::V2beta3::HttpRequest HttpRequest} set. - # - # Note: The following fields are mutually exclusive: `http_request`, `app_engine_http_request`, `pull_message`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] pull_message - # @return [::Google::Cloud::Tasks::V2beta3::PullMessage] - # Pull Message contained in a task in a - # {::Google::Cloud::Tasks::V2beta3::Queue#type PULL} queue type. This payload - # type cannot be explicitly set through Cloud Tasks API. Its purpose, - # currently is to provide backward compatibility with App Engine Task Queue - # [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/) - # queues to provide a way to inspect contents of pull tasks through the - # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#get_task CloudTasks.GetTask}. - # - # Note: The following fields are mutually exclusive: `pull_message`, `app_engine_http_request`, `http_request`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] schedule_time - # @return [::Google::Protobuf::Timestamp] - # The time when the task is scheduled to be attempted. - # - # For App Engine queues, this is when the task will be attempted or retried. - # - # `schedule_time` will be truncated to the nearest microsecond. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time that the task was created. - # - # `create_time` will be truncated to the nearest second. - # @!attribute [rw] dispatch_deadline - # @return [::Google::Protobuf::Duration] - # The deadline for requests sent to the worker. If the worker does not - # respond by this deadline then the request is cancelled and the attempt - # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the - # task according to the - # {::Google::Cloud::Tasks::V2beta3::RetryConfig RetryConfig}. - # - # Note that when the request is cancelled, Cloud Tasks will stop listening - # for the response, but whether the worker stops processing depends on the - # worker. For example, if the worker is stuck, it may not react to cancelled - # requests. - # - # The default and maximum values depend on the type of request: - # - # * For {::Google::Cloud::Tasks::V2beta3::HttpRequest HTTP tasks}, the default is - # 10 minutes. The deadline - # must be in the interval [15 seconds, 30 minutes]. - # - # * For {::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest App Engine tasks}, - # 0 indicates that the - # request has the default deadline. The default deadline depends on the - # [scaling - # type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) - # of the service: 10 minutes for standard apps with automatic scaling, 24 - # hours for standard apps with manual and basic scaling, and 60 minutes for - # flex apps. If the request deadline is set, it must be in the interval [15 - # seconds, 24 hours 15 seconds]. Regardless of the task's - # `dispatch_deadline`, the app handler will not run for longer than than - # the service's timeout. We recommend setting the `dispatch_deadline` to - # at most a few seconds more than the app handler's timeout. For more - # information see - # [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). - # - # `dispatch_deadline` will be truncated to the nearest millisecond. The - # deadline is an approximate deadline. - # @!attribute [rw] dispatch_count - # @return [::Integer] - # Output only. The number of attempts dispatched. - # - # This count includes attempts which have been dispatched but haven't - # received a response. - # @!attribute [rw] response_count - # @return [::Integer] - # Output only. The number of attempts which have received a response. - # @!attribute [rw] first_attempt - # @return [::Google::Cloud::Tasks::V2beta3::Attempt] - # Output only. The status of the task's first attempt. - # - # Only {::Google::Cloud::Tasks::V2beta3::Attempt#dispatch_time dispatch_time} will - # be set. The other {::Google::Cloud::Tasks::V2beta3::Attempt Attempt} information - # is not retained by Cloud Tasks. - # @!attribute [rw] last_attempt - # @return [::Google::Cloud::Tasks::V2beta3::Attempt] - # Output only. The status of the task's last attempt. - # @!attribute [rw] view - # @return [::Google::Cloud::Tasks::V2beta3::Task::View] - # Output only. The view specifies which subset of the - # {::Google::Cloud::Tasks::V2beta3::Task Task} has been returned. - class Task - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The view specifies a subset of {::Google::Cloud::Tasks::V2beta3::Task Task} - # data. - # - # When a task is returned in a response, not all - # information is retrieved by default because some data, such as - # payloads, might be desirable to return only when needed because - # of its large size or because of the sensitivity of data that it - # contains. - module View - # Unspecified. Defaults to BASIC. - VIEW_UNSPECIFIED = 0 - - # The basic view omits fields which can be large or can contain - # sensitive data. - # - # This view does not include the - # [body in - # AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body]. - # Bodies are desirable to return only when needed, because they - # can be large and because of the sensitivity of the data that you - # choose to store in it. - BASIC = 1 - - # All information is returned. - # - # Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} - # requires `cloudtasks.tasks.fullView` [Google - # IAM](https://cloud.google.com/iam/) permission on the - # {::Google::Cloud::Tasks::V2beta3::Queue Queue} resource. - FULL = 2 - end - end - - # The status of a task attempt. - # @!attribute [rw] schedule_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time that this attempt was scheduled. - # - # `schedule_time` will be truncated to the nearest microsecond. - # @!attribute [rw] dispatch_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time that this attempt was dispatched. - # - # `dispatch_time` will be truncated to the nearest microsecond. - # @!attribute [rw] response_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time that this attempt response was received. - # - # `response_time` will be truncated to the nearest microsecond. - # @!attribute [rw] response_status - # @return [::Google::Rpc::Status] - # Output only. The response from the worker for this attempt. - # - # If `response_time` is unset, then the task has not been attempted or is - # currently running and the `response_status` field is meaningless. - class Attempt - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # 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"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::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). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/iam/v1/options.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! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3/snippets/Gemfile b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/Gemfile deleted file mode 100644 index b6cbdf612a3b..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/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-tasks-v2beta3", path: "../" -else - gem "google-cloud-tasks-v2beta3" -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-tasks-v2beta3/snippets/cloud_tasks/create_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/create_queue.rb deleted file mode 100644 index 9d315fa5fb2a..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/create_queue.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 cloudtasks_v2beta3_generated_CloudTasks_CreateQueue_sync] -require "google/cloud/tasks/v2beta3" - -## -# Snippet for the create_queue call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_queue. -# -def create_queue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta3::CreateQueueRequest.new - - # Call the create_queue method. - result = client.create_queue request - - # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. - p result -end -# [END cloudtasks_v2beta3_generated_CloudTasks_CreateQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/create_task.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/create_task.rb deleted file mode 100644 index 1307bbaa425c..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/create_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudtasks_v2beta3_generated_CloudTasks_CreateTask_sync] -require "google/cloud/tasks/v2beta3" - -## -# Snippet for the create_task call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task. -# -def create_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta3::CreateTaskRequest.new - - # Call the create_task method. - result = client.create_task request - - # The returned object is of type Google::Cloud::Tasks::V2beta3::Task. - p result -end -# [END cloudtasks_v2beta3_generated_CloudTasks_CreateTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/delete_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/delete_queue.rb deleted file mode 100644 index 32780452f076..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/delete_queue.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 cloudtasks_v2beta3_generated_CloudTasks_DeleteQueue_sync] -require "google/cloud/tasks/v2beta3" - -## -# Snippet for the delete_queue call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#delete_queue. -# -def delete_queue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta3::DeleteQueueRequest.new - - # Call the delete_queue method. - result = client.delete_queue request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END cloudtasks_v2beta3_generated_CloudTasks_DeleteQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/delete_task.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/delete_task.rb deleted file mode 100644 index 2e14ac7238d7..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/delete_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudtasks_v2beta3_generated_CloudTasks_DeleteTask_sync] -require "google/cloud/tasks/v2beta3" - -## -# Snippet for the delete_task call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#delete_task. -# -def delete_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta3::DeleteTaskRequest.new - - # Call the delete_task method. - result = client.delete_task request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END cloudtasks_v2beta3_generated_CloudTasks_DeleteTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/get_iam_policy.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/get_iam_policy.rb deleted file mode 100644 index b67132daf33c..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/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 cloudtasks_v2beta3_generated_CloudTasks_GetIamPolicy_sync] -require "google/cloud/tasks/v2beta3" - -## -# Snippet for the get_iam_policy call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta3::CloudTasks::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 cloudtasks_v2beta3_generated_CloudTasks_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/get_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/get_queue.rb deleted file mode 100644 index 6a08e7775a37..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/get_queue.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 cloudtasks_v2beta3_generated_CloudTasks_GetQueue_sync] -require "google/cloud/tasks/v2beta3" - -## -# Snippet for the get_queue call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#get_queue. -# -def get_queue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta3::GetQueueRequest.new - - # Call the get_queue method. - result = client.get_queue request - - # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. - p result -end -# [END cloudtasks_v2beta3_generated_CloudTasks_GetQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/get_task.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/get_task.rb deleted file mode 100644 index 7601d4c33b48..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/get_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudtasks_v2beta3_generated_CloudTasks_GetTask_sync] -require "google/cloud/tasks/v2beta3" - -## -# Snippet for the get_task call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#get_task. -# -def get_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta3::GetTaskRequest.new - - # Call the get_task method. - result = client.get_task request - - # The returned object is of type Google::Cloud::Tasks::V2beta3::Task. - p result -end -# [END cloudtasks_v2beta3_generated_CloudTasks_GetTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/list_queues.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/list_queues.rb deleted file mode 100644 index 221826aa161c..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/list_queues.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 cloudtasks_v2beta3_generated_CloudTasks_ListQueues_sync] -require "google/cloud/tasks/v2beta3" - -## -# Snippet for the list_queues call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_queues. -# -def list_queues - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta3::ListQueuesRequest.new - - # Call the list_queues method. - result = client.list_queues request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Tasks::V2beta3::Queue. - p item - end -end -# [END cloudtasks_v2beta3_generated_CloudTasks_ListQueues_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/list_tasks.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/list_tasks.rb deleted file mode 100644 index e3e486644e66..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/list_tasks.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudtasks_v2beta3_generated_CloudTasks_ListTasks_sync] -require "google/cloud/tasks/v2beta3" - -## -# Snippet for the list_tasks call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_tasks. -# -def list_tasks - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta3::ListTasksRequest.new - - # Call the list_tasks method. - result = client.list_tasks request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Tasks::V2beta3::Task. - p item - end -end -# [END cloudtasks_v2beta3_generated_CloudTasks_ListTasks_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/pause_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/pause_queue.rb deleted file mode 100644 index d2ece1b4633a..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/pause_queue.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 cloudtasks_v2beta3_generated_CloudTasks_PauseQueue_sync] -require "google/cloud/tasks/v2beta3" - -## -# Snippet for the pause_queue call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#pause_queue. -# -def pause_queue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta3::PauseQueueRequest.new - - # Call the pause_queue method. - result = client.pause_queue request - - # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. - p result -end -# [END cloudtasks_v2beta3_generated_CloudTasks_PauseQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/purge_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/purge_queue.rb deleted file mode 100644 index 0948654d23db..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/purge_queue.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 cloudtasks_v2beta3_generated_CloudTasks_PurgeQueue_sync] -require "google/cloud/tasks/v2beta3" - -## -# Snippet for the purge_queue call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#purge_queue. -# -def purge_queue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta3::PurgeQueueRequest.new - - # Call the purge_queue method. - result = client.purge_queue request - - # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. - p result -end -# [END cloudtasks_v2beta3_generated_CloudTasks_PurgeQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/resume_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/resume_queue.rb deleted file mode 100644 index e22638c37139..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/resume_queue.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 cloudtasks_v2beta3_generated_CloudTasks_ResumeQueue_sync] -require "google/cloud/tasks/v2beta3" - -## -# Snippet for the resume_queue call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#resume_queue. -# -def resume_queue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta3::ResumeQueueRequest.new - - # Call the resume_queue method. - result = client.resume_queue request - - # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. - p result -end -# [END cloudtasks_v2beta3_generated_CloudTasks_ResumeQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/run_task.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/run_task.rb deleted file mode 100644 index dae7f35f5236..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/run_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudtasks_v2beta3_generated_CloudTasks_RunTask_sync] -require "google/cloud/tasks/v2beta3" - -## -# Snippet for the run_task call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#run_task. -# -def run_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta3::RunTaskRequest.new - - # Call the run_task method. - result = client.run_task request - - # The returned object is of type Google::Cloud::Tasks::V2beta3::Task. - p result -end -# [END cloudtasks_v2beta3_generated_CloudTasks_RunTask_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/set_iam_policy.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/set_iam_policy.rb deleted file mode 100644 index f83897ede198..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/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 cloudtasks_v2beta3_generated_CloudTasks_SetIamPolicy_sync] -require "google/cloud/tasks/v2beta3" - -## -# Snippet for the set_iam_policy call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta3::CloudTasks::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 cloudtasks_v2beta3_generated_CloudTasks_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/test_iam_permissions.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/test_iam_permissions.rb deleted file mode 100644 index ee6f4a9fcbc0..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/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 cloudtasks_v2beta3_generated_CloudTasks_TestIamPermissions_sync] -require "google/cloud/tasks/v2beta3" - -## -# Snippet for the test_iam_permissions call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta3::CloudTasks::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 cloudtasks_v2beta3_generated_CloudTasks_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/update_queue.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/update_queue.rb deleted file mode 100644 index cc52805757c2..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/cloud_tasks/update_queue.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 cloudtasks_v2beta3_generated_CloudTasks_UpdateQueue_sync] -require "google/cloud/tasks/v2beta3" - -## -# Snippet for the update_queue call in the CloudTasks service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tasks::V2beta3::CloudTasks::Client#update_queue. -# -def update_queue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tasks::V2beta3::UpdateQueueRequest.new - - # Call the update_queue method. - result = client.update_queue request - - # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue. - p result -end -# [END cloudtasks_v2beta3_generated_CloudTasks_UpdateQueue_sync] diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/snippet_metadata_google.cloud.tasks.v2beta3.json b/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/snippet_metadata_google.cloud.tasks.v2beta3.json deleted file mode 100644 index 7d11f956527e..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/snippets/snippet_metadata_google.cloud.tasks.v2beta3.json +++ /dev/null @@ -1,655 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-tasks-v2beta3", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.tasks.v2beta3", - "version": "v2beta3" - } - ] - }, - "snippets": [ - { - "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_ListQueues_sync", - "title": "Snippet for the list_queues call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_queues.", - "file": "cloud_tasks/list_queues.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_queues", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_queues", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta3::ListQueuesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2beta3::ListQueuesResponse", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" - }, - "method": { - "short_name": "ListQueues", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks.ListQueues", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_GetQueue_sync", - "title": "Snippet for the get_queue call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#get_queue.", - "file": "cloud_tasks/get_queue.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_queue", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#get_queue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta3::GetQueueRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2beta3::Queue", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" - }, - "method": { - "short_name": "GetQueue", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks.GetQueue", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_CreateQueue_sync", - "title": "Snippet for the create_queue call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_queue.", - "file": "cloud_tasks/create_queue.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_queue", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_queue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta3::CreateQueueRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2beta3::Queue", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" - }, - "method": { - "short_name": "CreateQueue", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks.CreateQueue", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_UpdateQueue_sync", - "title": "Snippet for the update_queue call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#update_queue.", - "file": "cloud_tasks/update_queue.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_queue", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#update_queue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2beta3::Queue", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" - }, - "method": { - "short_name": "UpdateQueue", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_DeleteQueue_sync", - "title": "Snippet for the delete_queue call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#delete_queue.", - "file": "cloud_tasks/delete_queue.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_queue", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#delete_queue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" - }, - "method": { - "short_name": "DeleteQueue", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks.DeleteQueue", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_PurgeQueue_sync", - "title": "Snippet for the purge_queue call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#purge_queue.", - "file": "cloud_tasks/purge_queue.rb", - "language": "RUBY", - "client_method": { - "short_name": "purge_queue", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#purge_queue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2beta3::Queue", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" - }, - "method": { - "short_name": "PurgeQueue", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_PauseQueue_sync", - "title": "Snippet for the pause_queue call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#pause_queue.", - "file": "cloud_tasks/pause_queue.rb", - "language": "RUBY", - "client_method": { - "short_name": "pause_queue", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#pause_queue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta3::PauseQueueRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2beta3::Queue", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" - }, - "method": { - "short_name": "PauseQueue", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks.PauseQueue", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_ResumeQueue_sync", - "title": "Snippet for the resume_queue call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#resume_queue.", - "file": "cloud_tasks/resume_queue.rb", - "language": "RUBY", - "client_method": { - "short_name": "resume_queue", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#resume_queue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2beta3::Queue", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" - }, - "method": { - "short_name": "ResumeQueue", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#get_iam_policy.", - "file": "cloud_tasks/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks.GetIamPolicy", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#set_iam_policy.", - "file": "cloud_tasks/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks.SetIamPolicy", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#test_iam_permissions.", - "file": "cloud_tasks/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks.TestIamPermissions", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_ListTasks_sync", - "title": "Snippet for the list_tasks call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_tasks.", - "file": "cloud_tasks/list_tasks.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_tasks", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#list_tasks", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta3::ListTasksRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2beta3::ListTasksResponse", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" - }, - "method": { - "short_name": "ListTasks", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks.ListTasks", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_GetTask_sync", - "title": "Snippet for the get_task call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#get_task.", - "file": "cloud_tasks/get_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_task", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#get_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta3::GetTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2beta3::Task", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" - }, - "method": { - "short_name": "GetTask", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks.GetTask", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_CreateTask_sync", - "title": "Snippet for the create_task call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task.", - "file": "cloud_tasks/create_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_task", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta3::CreateTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2beta3::Task", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" - }, - "method": { - "short_name": "CreateTask", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks.CreateTask", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_DeleteTask_sync", - "title": "Snippet for the delete_task call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#delete_task.", - "file": "cloud_tasks/delete_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_task", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#delete_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" - }, - "method": { - "short_name": "DeleteTask", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks.DeleteTask", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtasks_v2beta3_generated_CloudTasks_RunTask_sync", - "title": "Snippet for the run_task call in the CloudTasks service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tasks::V2beta3::CloudTasks::Client#run_task.", - "file": "cloud_tasks/run_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "run_task", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#run_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tasks::V2beta3::RunTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tasks::V2beta3::Task", - "client": { - "short_name": "CloudTasks::Client", - "full_name": "::Google::Cloud::Tasks::V2beta3::CloudTasks::Client" - }, - "method": { - "short_name": "RunTask", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks.RunTask", - "service": { - "short_name": "CloudTasks", - "full_name": "google.cloud.tasks.v2beta3.CloudTasks" - } - } - }, - "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-tasks-v2beta3/test/google/cloud/tasks/v2beta3/cloud_tasks_paths_test.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/test/google/cloud/tasks/v2beta3/cloud_tasks_paths_test.rb deleted file mode 100644 index 664ebc6b1b18..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/test/google/cloud/tasks/v2beta3/cloud_tasks_paths_test.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/tasks/v2beta3/cloud_tasks" - -class ::Google::Cloud::Tasks::V2beta3::CloudTasks::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_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::Tasks::V2beta3::CloudTasks::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_queue_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.queue_path project: "value0", location: "value1", queue: "value2" - assert_equal "projects/value0/locations/value1/queues/value2", path - end - end - - def test_task_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.task_path project: "value0", location: "value1", queue: "value2", task: "value3" - assert_equal "projects/value0/locations/value1/queues/value2/tasks/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/test/google/cloud/tasks/v2beta3/cloud_tasks_rest_test.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/test/google/cloud/tasks/v2beta3/cloud_tasks_rest_test.rb deleted file mode 100644 index 34a301c32a3d..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/test/google/cloud/tasks/v2beta3/cloud_tasks_rest_test.rb +++ /dev/null @@ -1,981 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/tasks/v2beta3/cloudtasks_pb" -require "google/cloud/tasks/v2beta3/cloud_tasks/rest" - - -class ::Google::Cloud::Tasks::V2beta3::CloudTasks::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_queues - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2beta3::ListQueuesResponse.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" - read_mask = {} - - list_queues_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_list_queues_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_queues_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_queues({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_queues parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_queues ::Google::Cloud::Tasks::V2beta3::ListQueuesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_queues({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_queues(::Google::Cloud::Tasks::V2beta3::ListQueuesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_queues_client_stub.call_count - end - end - end - - def test_get_queue - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2beta3::Queue.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - read_mask = {} - - get_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_get_queue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_queue({ name: name, read_mask: read_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_queue name: name, read_mask: read_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_queue ::Google::Cloud::Tasks::V2beta3::GetQueueRequest.new(name: name, read_mask: read_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_queue({ name: name, read_mask: read_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_queue(::Google::Cloud::Tasks::V2beta3::GetQueueRequest.new(name: name, read_mask: read_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_queue_client_stub.call_count - end - end - end - - def test_create_queue - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2beta3::Queue.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - queue = {} - - create_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_create_queue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_queue({ parent: parent, queue: queue }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_queue parent: parent, queue: queue do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_queue ::Google::Cloud::Tasks::V2beta3::CreateQueueRequest.new(parent: parent, queue: queue) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_queue({ parent: parent, queue: queue }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_queue(::Google::Cloud::Tasks::V2beta3::CreateQueueRequest.new(parent: parent, queue: queue), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_queue_client_stub.call_count - end - end - end - - def test_update_queue - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2beta3::Queue.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - queue = {} - update_mask = {} - - update_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_update_queue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_queue({ queue: queue, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_queue queue: queue, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_queue ::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest.new(queue: queue, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_queue({ queue: queue, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_queue(::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest.new(queue: queue, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_queue_client_stub.call_count - end - end - end - - def test_delete_queue - # 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_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_delete_queue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_queue({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_queue name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_queue ::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_queue({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_queue(::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_queue_client_stub.call_count - end - end - end - - def test_purge_queue - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2beta3::Queue.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - purge_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_purge_queue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, purge_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.purge_queue({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.purge_queue name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.purge_queue ::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.purge_queue({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.purge_queue(::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, purge_queue_client_stub.call_count - end - end - end - - def test_pause_queue - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2beta3::Queue.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - pause_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_pause_queue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, pause_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.pause_queue({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.pause_queue name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.pause_queue ::Google::Cloud::Tasks::V2beta3::PauseQueueRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.pause_queue({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.pause_queue(::Google::Cloud::Tasks::V2beta3::PauseQueueRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, pause_queue_client_stub.call_count - end - end - end - - def test_resume_queue - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2beta3::Queue.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - resume_queue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_resume_queue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, resume_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.resume_queue({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.resume_queue name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.resume_queue ::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.resume_queue({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.resume_queue(::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, resume_queue_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::Tasks::V2beta3::CloudTasks::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::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_set_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta3::CloudTasks::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::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_count - end - end - end - - def test_test_iam_permissions - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta3::CloudTasks::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::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_count - end - end - end - - def test_list_tasks - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2beta3::ListTasksResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - response_view = :VIEW_UNSPECIFIED - page_size = 42 - page_token = "hello world" - - list_tasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_list_tasks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_tasks_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_tasks({ parent: parent, response_view: response_view, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_tasks parent: parent, response_view: response_view, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_tasks ::Google::Cloud::Tasks::V2beta3::ListTasksRequest.new(parent: parent, response_view: response_view, 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_tasks({ parent: parent, response_view: response_view, 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_tasks(::Google::Cloud::Tasks::V2beta3::ListTasksRequest.new(parent: parent, response_view: response_view, 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_tasks_client_stub.call_count - end - end - end - - def test_get_task - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2beta3::Task.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - response_view = :VIEW_UNSPECIFIED - - get_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_get_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_task({ name: name, response_view: response_view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_task name: name, response_view: response_view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_task ::Google::Cloud::Tasks::V2beta3::GetTaskRequest.new(name: name, response_view: response_view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_task({ name: name, response_view: response_view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_task(::Google::Cloud::Tasks::V2beta3::GetTaskRequest.new(name: name, response_view: response_view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_task_client_stub.call_count - end - end - end - - def test_create_task - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2beta3::Task.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - task = {} - response_view = :VIEW_UNSPECIFIED - - create_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_create_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_task({ parent: parent, task: task, response_view: response_view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_task parent: parent, task: task, response_view: response_view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_task ::Google::Cloud::Tasks::V2beta3::CreateTaskRequest.new(parent: parent, task: task, response_view: response_view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_task({ parent: parent, task: task, response_view: response_view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_task(::Google::Cloud::Tasks::V2beta3::CreateTaskRequest.new(parent: parent, task: task, response_view: response_view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_task_client_stub.call_count - end - end - end - - def test_delete_task - # 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_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_delete_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_task({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_task name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_task ::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_task({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_task(::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_task_client_stub.call_count - end - end - end - - def test_run_task - # Create test objects. - client_result = ::Google::Cloud::Tasks::V2beta3::Task.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - response_view = :VIEW_UNSPECIFIED - - run_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::ServiceStub.stub :transcode_run_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, run_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.run_task({ name: name, response_view: response_view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.run_task name: name, response_view: response_view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.run_task ::Google::Cloud::Tasks::V2beta3::RunTaskRequest.new(name: name, response_view: response_view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.run_task({ name: name, response_view: response_view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.run_task(::Google::Cloud::Tasks::V2beta3::RunTaskRequest.new(name: name, response_view: response_view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, run_task_client_stub.call_count - end - end - end - - def test_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::Tasks::V2beta3::CloudTasks::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::Tasks::V2beta3::CloudTasks::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/test/google/cloud/tasks/v2beta3/cloud_tasks_test.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/test/google/cloud/tasks/v2beta3/cloud_tasks_test.rb deleted file mode 100644 index f2365c3dd2eb..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/test/google/cloud/tasks/v2beta3/cloud_tasks_test.rb +++ /dev/null @@ -1,1078 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/tasks/v2beta3/cloudtasks_pb" -require "google/cloud/tasks/v2beta3/cloud_tasks" - -class ::Google::Cloud::Tasks::V2beta3::CloudTasks::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_queues - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2beta3::ListQueuesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - read_mask = {} - - list_queues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_queues, name - assert_kind_of ::Google::Cloud::Tasks::V2beta3::ListQueuesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_queues_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_queues({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_queues parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_queues ::Google::Cloud::Tasks::V2beta3::ListQueuesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_queues({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_queues(::Google::Cloud::Tasks::V2beta3::ListQueuesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, read_mask: read_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_queues_client_stub.call_rpc_count - end - end - - def test_get_queue - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2beta3::Queue.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - read_mask = {} - - get_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_queue, name - assert_kind_of ::Google::Cloud::Tasks::V2beta3::GetQueueRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_queue({ name: name, read_mask: read_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_queue name: name, read_mask: read_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_queue ::Google::Cloud::Tasks::V2beta3::GetQueueRequest.new(name: name, read_mask: read_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_queue({ name: name, read_mask: read_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_queue(::Google::Cloud::Tasks::V2beta3::GetQueueRequest.new(name: name, read_mask: read_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_queue_client_stub.call_rpc_count - end - end - - def test_create_queue - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2beta3::Queue.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - queue = {} - - create_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_queue, name - assert_kind_of ::Google::Cloud::Tasks::V2beta3::CreateQueueRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Tasks::V2beta3::Queue), request["queue"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_queue({ parent: parent, queue: queue }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_queue parent: parent, queue: queue do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_queue ::Google::Cloud::Tasks::V2beta3::CreateQueueRequest.new(parent: parent, queue: queue) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_queue({ parent: parent, queue: queue }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_queue(::Google::Cloud::Tasks::V2beta3::CreateQueueRequest.new(parent: parent, queue: queue), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_queue_client_stub.call_rpc_count - end - end - - def test_update_queue - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2beta3::Queue.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - queue = {} - update_mask = {} - - update_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_queue, name - assert_kind_of ::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Tasks::V2beta3::Queue), request["queue"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_queue({ queue: queue, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_queue queue: queue, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_queue ::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest.new(queue: queue, 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_queue({ queue: queue, 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_queue(::Google::Cloud::Tasks::V2beta3::UpdateQueueRequest.new(queue: queue, 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_queue_client_stub.call_rpc_count - end - end - - def test_delete_queue - # 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_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_queue, name - assert_kind_of ::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_queue({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_queue name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_queue ::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_queue({ 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_queue(::Google::Cloud::Tasks::V2beta3::DeleteQueueRequest.new(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_queue_client_stub.call_rpc_count - end - end - - def test_purge_queue - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2beta3::Queue.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - purge_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :purge_queue, name - assert_kind_of ::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, purge_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.purge_queue({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.purge_queue name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.purge_queue ::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.purge_queue({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.purge_queue(::Google::Cloud::Tasks::V2beta3::PurgeQueueRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, purge_queue_client_stub.call_rpc_count - end - end - - def test_pause_queue - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2beta3::Queue.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - pause_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :pause_queue, name - assert_kind_of ::Google::Cloud::Tasks::V2beta3::PauseQueueRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, pause_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.pause_queue({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.pause_queue name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.pause_queue ::Google::Cloud::Tasks::V2beta3::PauseQueueRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.pause_queue({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.pause_queue(::Google::Cloud::Tasks::V2beta3::PauseQueueRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, pause_queue_client_stub.call_rpc_count - end - end - - def test_resume_queue - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2beta3::Queue.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - resume_queue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :resume_queue, name - assert_kind_of ::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, resume_queue_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.resume_queue({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.resume_queue name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.resume_queue ::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.resume_queue({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.resume_queue(::Google::Cloud::Tasks::V2beta3::ResumeQueueRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, resume_queue_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::Tasks::V2beta3::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_rpc_count - end - end - - def test_test_iam_permissions - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_rpc_count - end - end - - def test_list_tasks - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2beta3::ListTasksResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - response_view = :VIEW_UNSPECIFIED - page_size = 42 - page_token = "hello world" - - list_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_tasks, name - assert_kind_of ::Google::Cloud::Tasks::V2beta3::ListTasksRequest, request - assert_equal "hello world", request["parent"] - assert_equal :VIEW_UNSPECIFIED, request["response_view"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_tasks_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_tasks({ parent: parent, response_view: response_view, 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_tasks parent: parent, response_view: response_view, 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_tasks ::Google::Cloud::Tasks::V2beta3::ListTasksRequest.new(parent: parent, response_view: response_view, 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_tasks({ parent: parent, response_view: response_view, 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_tasks(::Google::Cloud::Tasks::V2beta3::ListTasksRequest.new(parent: parent, response_view: response_view, 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_tasks_client_stub.call_rpc_count - end - end - - def test_get_task - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2beta3::Task.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - response_view = :VIEW_UNSPECIFIED - - get_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_task, name - assert_kind_of ::Google::Cloud::Tasks::V2beta3::GetTaskRequest, request - assert_equal "hello world", request["name"] - assert_equal :VIEW_UNSPECIFIED, request["response_view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_task({ name: name, response_view: response_view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_task name: name, response_view: response_view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_task ::Google::Cloud::Tasks::V2beta3::GetTaskRequest.new(name: name, response_view: response_view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_task({ name: name, response_view: response_view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_task(::Google::Cloud::Tasks::V2beta3::GetTaskRequest.new(name: name, response_view: response_view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_task_client_stub.call_rpc_count - end - end - - def test_create_task - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2beta3::Task.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - task = {} - response_view = :VIEW_UNSPECIFIED - - create_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_task, name - assert_kind_of ::Google::Cloud::Tasks::V2beta3::CreateTaskRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Tasks::V2beta3::Task), request["task"] - assert_equal :VIEW_UNSPECIFIED, request["response_view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_task({ parent: parent, task: task, response_view: response_view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_task parent: parent, task: task, response_view: response_view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_task ::Google::Cloud::Tasks::V2beta3::CreateTaskRequest.new(parent: parent, task: task, response_view: response_view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_task({ parent: parent, task: task, response_view: response_view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_task(::Google::Cloud::Tasks::V2beta3::CreateTaskRequest.new(parent: parent, task: task, response_view: response_view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_task_client_stub.call_rpc_count - end - end - - def test_delete_task - # 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_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_task, name - assert_kind_of ::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_task({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_task name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_task ::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_task({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_task(::Google::Cloud::Tasks::V2beta3::DeleteTaskRequest.new(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_task_client_stub.call_rpc_count - end - end - - def test_run_task - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tasks::V2beta3::Task.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - response_view = :VIEW_UNSPECIFIED - - run_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :run_task, name - assert_kind_of ::Google::Cloud::Tasks::V2beta3::RunTaskRequest, request - assert_equal "hello world", request["name"] - assert_equal :VIEW_UNSPECIFIED, request["response_view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, run_task_client_stub do - # Create client - client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.run_task({ name: name, response_view: response_view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.run_task name: name, response_view: response_view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.run_task ::Google::Cloud::Tasks::V2beta3::RunTaskRequest.new(name: name, response_view: response_view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.run_task({ name: name, response_view: response_view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.run_task(::Google::Cloud::Tasks::V2beta3::RunTaskRequest.new(name: name, response_view: response_view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, run_task_client_stub.call_rpc_count - end - end - - def test_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::Tasks::V2beta3::CloudTasks::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::Tasks::V2beta3::CloudTasks::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::Tasks::V2beta3::CloudTasks::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-tasks-v2beta3/test/helper.rb b/owl-bot-staging/google-cloud-tasks-v2beta3/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-tasks-v2beta3/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/.gitignore b/owl-bot-staging/google-cloud-telco_automation-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-telco_automation-v1/.repo-metadata.json deleted file mode 100644 index 6fa8f0fd2fc5..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "telcoautomation.googleapis.com", - "api_shortname": "telcoautomation", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-telco_automation-v1/latest", - "distribution_name": "google-cloud-telco_automation-v1", - "is_cloud": true, - "language": "ruby", - "name": "telcoautomation", - "name_pretty": "Telco Automation V1 API", - "product_documentation": "https://cloud.google.com/telecom-network-automation", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "APIs to automate management of cloud infrastructure for network functions. Note that google-cloud-telco_automation-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-telco_automation instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/telecom-network-automation", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/.rubocop.yml b/owl-bot-staging/google-cloud-telco_automation-v1/.rubocop.yml deleted file mode 100644 index d6fc34a05a64..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-telco_automation-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-telco_automation-v1.rb" diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/.toys.rb b/owl-bot-staging/google-cloud-telco_automation-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/.yardopts b/owl-bot-staging/google-cloud-telco_automation-v1/.yardopts deleted file mode 100644 index 74eef8dd924a..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Telco Automation 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-telco_automation-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-telco_automation-v1/AUTHENTICATION.md deleted file mode 100644 index 15c5b59bafcf..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-telco_automation-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-telco_automation-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/telco_automation/v1" - -client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/telco_automation/v1" - -::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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-telco_automation-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/telco_automation/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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-telco_automation-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-telco_automation-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/Gemfile b/owl-bot-staging/google-cloud-telco_automation-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/LICENSE.md b/owl-bot-staging/google-cloud-telco_automation-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/README.md b/owl-bot-staging/google-cloud-telco_automation-v1/README.md deleted file mode 100644 index f64067ee0d10..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Telco Automation V1 API - -APIs to automate management of cloud infrastructure for network functions. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Telco Automation V1 API. Most users should consider using -the main client gem, -[google-cloud-telco_automation](https://rubygems.org/gems/google-cloud-telco_automation). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-telco_automation-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/telcoautomation.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/telco_automation/v1" - -client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new -request = ::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest.new # (request fields as keyword arguments...) -response = client.list_orchestration_clusters request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-telco_automation-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/telecom-network-automation) -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/telco_automation/v1" -require "logger" - -client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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-telco_automation`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-telco_automation-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-telco_automation`. -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-telco_automation-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-telco_automation-v1/Rakefile b/owl-bot-staging/google-cloud-telco_automation-v1/Rakefile deleted file mode 100644 index 2264fb9ae7a4..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-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/telco_automation/v1/telco_automation/credentials" - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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-telco_automation-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-telco_automation-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-telco_automation-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-telco_automation-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-telco_automation-v1" - header "google-cloud-telco_automation-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-telco_automation-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-telco_automation-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-telco_automation-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-telco_automation-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-telco_automation-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-telco_automation-v1/gapic_metadata.json deleted file mode 100644 index f7243c38771e..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/gapic_metadata.json +++ /dev/null @@ -1,198 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.telcoautomation.v1", - "libraryPackage": "::Google::Cloud::TelcoAutomation::V1", - "services": { - "TelcoAutomation": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client", - "rpcs": { - "ListOrchestrationClusters": { - "methods": [ - "list_orchestration_clusters" - ] - }, - "GetOrchestrationCluster": { - "methods": [ - "get_orchestration_cluster" - ] - }, - "CreateOrchestrationCluster": { - "methods": [ - "create_orchestration_cluster" - ] - }, - "DeleteOrchestrationCluster": { - "methods": [ - "delete_orchestration_cluster" - ] - }, - "ListEdgeSlms": { - "methods": [ - "list_edge_slms" - ] - }, - "GetEdgeSlm": { - "methods": [ - "get_edge_slm" - ] - }, - "CreateEdgeSlm": { - "methods": [ - "create_edge_slm" - ] - }, - "DeleteEdgeSlm": { - "methods": [ - "delete_edge_slm" - ] - }, - "CreateBlueprint": { - "methods": [ - "create_blueprint" - ] - }, - "UpdateBlueprint": { - "methods": [ - "update_blueprint" - ] - }, - "GetBlueprint": { - "methods": [ - "get_blueprint" - ] - }, - "DeleteBlueprint": { - "methods": [ - "delete_blueprint" - ] - }, - "ListBlueprints": { - "methods": [ - "list_blueprints" - ] - }, - "ApproveBlueprint": { - "methods": [ - "approve_blueprint" - ] - }, - "ProposeBlueprint": { - "methods": [ - "propose_blueprint" - ] - }, - "RejectBlueprint": { - "methods": [ - "reject_blueprint" - ] - }, - "ListBlueprintRevisions": { - "methods": [ - "list_blueprint_revisions" - ] - }, - "SearchBlueprintRevisions": { - "methods": [ - "search_blueprint_revisions" - ] - }, - "SearchDeploymentRevisions": { - "methods": [ - "search_deployment_revisions" - ] - }, - "DiscardBlueprintChanges": { - "methods": [ - "discard_blueprint_changes" - ] - }, - "ListPublicBlueprints": { - "methods": [ - "list_public_blueprints" - ] - }, - "GetPublicBlueprint": { - "methods": [ - "get_public_blueprint" - ] - }, - "CreateDeployment": { - "methods": [ - "create_deployment" - ] - }, - "UpdateDeployment": { - "methods": [ - "update_deployment" - ] - }, - "GetDeployment": { - "methods": [ - "get_deployment" - ] - }, - "RemoveDeployment": { - "methods": [ - "remove_deployment" - ] - }, - "ListDeployments": { - "methods": [ - "list_deployments" - ] - }, - "ListDeploymentRevisions": { - "methods": [ - "list_deployment_revisions" - ] - }, - "DiscardDeploymentChanges": { - "methods": [ - "discard_deployment_changes" - ] - }, - "ApplyDeployment": { - "methods": [ - "apply_deployment" - ] - }, - "ComputeDeploymentStatus": { - "methods": [ - "compute_deployment_status" - ] - }, - "RollbackDeployment": { - "methods": [ - "rollback_deployment" - ] - }, - "GetHydratedDeployment": { - "methods": [ - "get_hydrated_deployment" - ] - }, - "ListHydratedDeployments": { - "methods": [ - "list_hydrated_deployments" - ] - }, - "UpdateHydratedDeployment": { - "methods": [ - "update_hydrated_deployment" - ] - }, - "ApplyHydratedDeployment": { - "methods": [ - "apply_hydrated_deployment" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/google-cloud-telco_automation-v1.gemspec b/owl-bot-staging/google-cloud-telco_automation-v1/google-cloud-telco_automation-v1.gemspec deleted file mode 100644 index 8477418caaa2..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/google-cloud-telco_automation-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/telco_automation/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-telco_automation-v1" - gem.version = Google::Cloud::TelcoAutomation::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "APIs to automate management of cloud infrastructure for network functions. Note that google-cloud-telco_automation-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-telco_automation instead. See the readme for more details." - gem.summary = "APIs to automate management of cloud infrastructure for network functions." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google-cloud-telco_automation-v1.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google-cloud-telco_automation-v1.rb deleted file mode 100644 index 259caf3da82e..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google-cloud-telco_automation-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/telco_automation/v1" diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1.rb deleted file mode 100644 index 8ead8612208c..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/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/telco_automation/v1/telco_automation" -require "google/cloud/telco_automation/v1/version" - -module Google - module Cloud - module TelcoAutomation - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/telco_automation/v1" - # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/telco_automation/v1" - # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/telco_automation/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/bindings_override.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/bindings_override.rb deleted file mode 100644 index df522790e2b1..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/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 TelcoAutomation - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/telco_automation/v1/rest" - # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "TelcoAutomation"] - 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}", - matches: [ - ["name", %r{^projects/[^/]+/locations/?$}, 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-telco_automation-v1/lib/google/cloud/telco_automation/v1/rest.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/rest.rb deleted file mode 100644 index 51f472690194..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/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/telco_automation/v1/telco_automation/rest" -require "google/cloud/telco_automation/v1/bindings_override" -require "google/cloud/telco_automation/v1/version" - -module Google - module Cloud - module TelcoAutomation - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/telco_automation/v1/rest" - # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation.rb deleted file mode 100644 index 2fe22c8a42e7..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/telco_automation/v1/version" - -require "google/cloud/telco_automation/v1/telco_automation/credentials" -require "google/cloud/telco_automation/v1/telco_automation/paths" -require "google/cloud/telco_automation/v1/telco_automation/operations" -require "google/cloud/telco_automation/v1/telco_automation/client" -require "google/cloud/telco_automation/v1/telco_automation/rest" - -module Google - module Cloud - module TelcoAutomation - module V1 - ## - # TelcoAutomation Service manages the control plane cluster a.k.a. - # Orchestration Cluster (GKE cluster with config controller) of TNA. It also - # exposes blueprint APIs which manages the lifecycle of blueprints that control - # the infrastructure setup (e.g GDCE clusters) and deployment of network - # functions. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/telco_automation/v1/telco_automation" - # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/telco_automation/v1/telco_automation/rest" - # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - module TelcoAutomation - end - end - end - end -end - -helper_path = ::File.join __dir__, "telco_automation", "helpers.rb" -require "google/cloud/telco_automation/v1/telco_automation/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/client.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/client.rb deleted file mode 100644 index 47ef08d71fa1..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/client.rb +++ /dev/null @@ -1,4039 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/telcoautomation/v1/telcoautomation_pb" -require "google/cloud/location" - -module Google - module Cloud - module TelcoAutomation - module V1 - module TelcoAutomation - ## - # Client for the TelcoAutomation service. - # - # TelcoAutomation Service manages the control plane cluster a.k.a. - # Orchestration Cluster (GKE cluster with config controller) of TNA. It also - # exposes blueprint APIs which manages the lifecycle of blueprints that control - # the infrastructure setup (e.g GDCE clusters) and deployment of network - # functions. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "telcoautomation.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :telco_automation_stub - - ## - # Configure the TelcoAutomation Client class. - # - # See {::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TelcoAutomation clients - # ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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", "TelcoAutomation", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TelcoAutomation 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::TelcoAutomation::V1::TelcoAutomation::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 - @telco_automation_stub.universe_domain - end - - ## - # Create a new TelcoAutomation client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TelcoAutomation 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/telcoautomation/v1/telcoautomation_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 - - @telco_automation_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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 - ) - - @telco_automation_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 = @telco_automation_stub.endpoint - config.universe_domain = @telco_automation_stub.universe_domain - config.logger = @telco_automation_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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 - @telco_automation_stub.logger - end - - # Service calls - - ## - # Lists OrchestrationClusters in a given project and location. - # - # @overload list_orchestration_clusters(request, options = nil) - # Pass arguments to `list_orchestration_clusters` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_orchestration_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_orchestration_clusters` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListOrchestrationClustersRequest - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filtering results. - # @param order_by [::String] - # Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest.new - # - # # Call the list_orchestration_clusters method. - # result = client.list_orchestration_clusters request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster. - # p item - # end - # - def list_orchestration_clusters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_orchestration_clusters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_orchestration_clusters.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_orchestration_clusters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :list_orchestration_clusters, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :list_orchestration_clusters, 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 single OrchestrationCluster. - # - # @overload get_orchestration_cluster(request, options = nil) - # Pass arguments to `get_orchestration_cluster` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_orchestration_cluster(name: nil) - # Pass arguments to `get_orchestration_cluster` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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::TelcoAutomation::V1::OrchestrationCluster] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest.new - # - # # Call the get_orchestration_cluster method. - # result = client.get_orchestration_cluster request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::OrchestrationCluster. - # p result - # - def get_orchestration_cluster request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_orchestration_cluster.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_orchestration_cluster.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_orchestration_cluster.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :get_orchestration_cluster, request, 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 OrchestrationCluster in a given project and location. - # - # @overload create_orchestration_cluster(request, options = nil) - # Pass arguments to `create_orchestration_cluster` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_orchestration_cluster(parent: nil, orchestration_cluster_id: nil, orchestration_cluster: nil, request_id: nil) - # Pass arguments to `create_orchestration_cluster` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Value for parent. - # @param orchestration_cluster_id [::String] - # Required. Id of the requesting object - # If auto-generating Id server-side, remove this field and - # orchestration_cluster_id from the method_signature of Create RPC - # @param orchestration_cluster [::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster, ::Hash] - # Required. The resource being 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/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest.new - # - # # Call the create_orchestration_cluster method. - # result = client.create_orchestration_cluster request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_orchestration_cluster request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest - - # Converts hash and nil to 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_orchestration_cluster.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_orchestration_cluster.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_orchestration_cluster.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :create_orchestration_cluster, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 single OrchestrationCluster. - # - # @overload delete_orchestration_cluster(request, options = nil) - # Pass arguments to `delete_orchestration_cluster` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_orchestration_cluster(name: nil, request_id: nil) - # Pass arguments to `delete_orchestration_cluster` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 - # @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/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest.new - # - # # Call the delete_orchestration_cluster method. - # result = client.delete_orchestration_cluster request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_orchestration_cluster request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest - - # Converts hash and nil to 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_orchestration_cluster.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_orchestration_cluster.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_orchestration_cluster.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :delete_orchestration_cluster, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 EdgeSlms in a given project and location. - # - # @overload list_edge_slms(request, options = nil) - # Pass arguments to `list_edge_slms` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_edge_slms(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_edge_slms` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListEdgeSlmsRequest - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filtering results - # @param order_by [::String] - # Hint for how to order the results - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::EdgeSlm>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::EdgeSlm>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest.new - # - # # Call the list_edge_slms method. - # result = client.list_edge_slms request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::EdgeSlm. - # p item - # end - # - def list_edge_slms request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_edge_slms.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_edge_slms.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_edge_slms.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :list_edge_slms, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :list_edge_slms, 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 single EdgeSlm. - # - # @overload get_edge_slm(request, options = nil) - # Pass arguments to `get_edge_slm` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_edge_slm(name: nil) - # Pass arguments to `get_edge_slm` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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::TelcoAutomation::V1::EdgeSlm] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::EdgeSlm] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest.new - # - # # Call the get_edge_slm method. - # result = client.get_edge_slm request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::EdgeSlm. - # p result - # - def get_edge_slm request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_edge_slm.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_edge_slm.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_edge_slm.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :get_edge_slm, request, 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 EdgeSlm in a given project and location. - # - # @overload create_edge_slm(request, options = nil) - # Pass arguments to `create_edge_slm` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_edge_slm(parent: nil, edge_slm_id: nil, edge_slm: nil, request_id: nil) - # Pass arguments to `create_edge_slm` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Value for parent. - # @param edge_slm_id [::String] - # Required. Id of the requesting object - # If auto-generating Id server-side, remove this field and - # edge_slm_id from the method_signature of Create RPC - # @param edge_slm [::Google::Cloud::TelcoAutomation::V1::EdgeSlm, ::Hash] - # Required. The resource being 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/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest.new - # - # # Call the create_edge_slm method. - # result = client.create_edge_slm request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_edge_slm request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest - - # Converts hash and nil to 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_edge_slm.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_edge_slm.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_edge_slm.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :create_edge_slm, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 single EdgeSlm. - # - # @overload delete_edge_slm(request, options = nil) - # Pass arguments to `delete_edge_slm` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_edge_slm(name: nil, request_id: nil) - # Pass arguments to `delete_edge_slm` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 - # @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/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest.new - # - # # Call the delete_edge_slm method. - # result = client.delete_edge_slm request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_edge_slm request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest - - # Converts hash and nil to 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_edge_slm.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_edge_slm.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_edge_slm.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :delete_edge_slm, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 blueprint. - # - # @overload create_blueprint(request, options = nil) - # Pass arguments to `create_blueprint` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_blueprint(parent: nil, blueprint_id: nil, blueprint: nil) - # Pass arguments to `create_blueprint` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of parent resource. - # Format should be - - # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". - # @param blueprint_id [::String] - # Optional. The name of the blueprint. - # @param blueprint [::Google::Cloud::TelcoAutomation::V1::Blueprint, ::Hash] - # Required. The `Blueprint` to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest.new - # - # # Call the create_blueprint method. - # result = client.create_blueprint request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. - # p result - # - def create_blueprint request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest - - # Converts hash and nil to 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_blueprint.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_blueprint.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_blueprint.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :create_blueprint, request, 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 blueprint. - # - # @overload update_blueprint(request, options = nil) - # Pass arguments to `update_blueprint` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_blueprint(blueprint: nil, update_mask: nil) - # Pass arguments to `update_blueprint` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param blueprint [::Google::Cloud::TelcoAutomation::V1::Blueprint, ::Hash] - # Required. The `blueprint` to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Update mask is used to specify the fields to be overwritten in - # the `blueprint` resource by the update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest.new - # - # # Call the update_blueprint method. - # result = client.update_blueprint request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. - # p result - # - def update_blueprint request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest - - # Converts hash and nil to 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_blueprint.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.blueprint&.name - header_params["blueprint.name"] = request.blueprint.name - end - - request_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_blueprint.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_blueprint.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :update_blueprint, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the requested blueprint. - # - # @overload get_blueprint(request, options = nil) - # Pass arguments to `get_blueprint` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_blueprint(name: nil, view: nil) - # Pass arguments to `get_blueprint` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 blueprint. - # Case 1: If the name provided in the request is - # \\{blueprint_id}@\\{revision_id}, then the revision with revision_id will be - # returned. Case 2: If the name provided in the request is \\{blueprint}, then - # the current state of the blueprint is returned. - # @param view [::Google::Cloud::TelcoAutomation::V1::BlueprintView] - # Optional. Defines the type of view of the blueprint. - # When field is not present BLUEPRINT_VIEW_BASIC is considered as default. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest.new - # - # # Call the get_blueprint method. - # result = client.get_blueprint request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. - # p result - # - def get_blueprint request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_blueprint.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_blueprint.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_blueprint.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :get_blueprint, request, 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 blueprint and all its revisions. - # - # @overload delete_blueprint(request, options = nil) - # Pass arguments to `delete_blueprint` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_blueprint(name: nil) - # Pass arguments to `delete_blueprint` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 blueprint to delete. - # Blueprint name should be in the format \\{blueprint_id}, if - # \\{blueprint_id}@\\{revision_id} is passed then the API throws invalid - # argument. - # - # @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/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest.new - # - # # Call the delete_blueprint method. - # result = client.delete_blueprint request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_blueprint request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest - - # Converts hash and nil to 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_blueprint.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_blueprint.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_blueprint.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :delete_blueprint, request, 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 blueprints. - # - # @overload list_blueprints(request, options = nil) - # Pass arguments to `list_blueprints` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_blueprints(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_blueprints` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of parent orchestration cluster resource. - # Format should be - - # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". - # @param filter [::String] - # Optional. Filtering only supports equality on blueprint state. - # It should be in the form: "state = DRAFT". `OR` operator can be used to - # get response for multiple states. e.g. "state = DRAFT OR state = PROPOSED". - # @param page_size [::Integer] - # Optional. The maximum number of blueprints to return per page. - # @param page_token [::String] - # Optional. The page token, received from a previous ListBlueprints call. - # It can be provided to retrieve the subsequent page. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest.new - # - # # Call the list_blueprints method. - # result = client.list_blueprints request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Blueprint. - # p item - # end - # - def list_blueprints request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_blueprints.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_blueprints.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_blueprints.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :list_blueprints, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :list_blueprints, 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 - - ## - # Approves a blueprint and commits a new revision. - # - # @overload approve_blueprint(request, options = nil) - # Pass arguments to `approve_blueprint` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload approve_blueprint(name: nil) - # Pass arguments to `approve_blueprint` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 blueprint to approve. The blueprint must be in - # Proposed state. A new revision is committed on approval. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest.new - # - # # Call the approve_blueprint method. - # result = client.approve_blueprint request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. - # p result - # - def approve_blueprint request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.approve_blueprint.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.approve_blueprint.timeout, - metadata: metadata, - retry_policy: @config.rpcs.approve_blueprint.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :approve_blueprint, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Proposes a blueprint for approval of changes. - # - # @overload propose_blueprint(request, options = nil) - # Pass arguments to `propose_blueprint` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload propose_blueprint(name: nil) - # Pass arguments to `propose_blueprint` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 blueprint being proposed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest.new - # - # # Call the propose_blueprint method. - # result = client.propose_blueprint request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. - # p result - # - def propose_blueprint request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.propose_blueprint.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.propose_blueprint.timeout, - metadata: metadata, - retry_policy: @config.rpcs.propose_blueprint.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :propose_blueprint, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Rejects a blueprint revision proposal and flips it back to Draft state. - # - # @overload reject_blueprint(request, options = nil) - # Pass arguments to `reject_blueprint` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload reject_blueprint(name: nil) - # Pass arguments to `reject_blueprint` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 blueprint being rejected. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest.new - # - # # Call the reject_blueprint method. - # result = client.reject_blueprint request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. - # p result - # - def reject_blueprint request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.reject_blueprint.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.reject_blueprint.timeout, - metadata: metadata, - retry_policy: @config.rpcs.reject_blueprint.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :reject_blueprint, request, 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 blueprint revisions of a given blueprint. - # - # @overload list_blueprint_revisions(request, options = nil) - # Pass arguments to `list_blueprint_revisions` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_blueprint_revisions(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_blueprint_revisions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 blueprint to list revisions for. - # @param page_size [::Integer] - # The maximum number of revisions to return per page. - # @param page_token [::String] - # The page token, received from a previous ListBlueprintRevisions call - # It can be provided to retrieve the subsequent page. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest.new - # - # # Call the list_blueprint_revisions method. - # result = client.list_blueprint_revisions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Blueprint. - # p item - # end - # - def list_blueprint_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_blueprint_revisions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_blueprint_revisions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_blueprint_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :list_blueprint_revisions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :list_blueprint_revisions, 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 - - ## - # Searches across blueprint revisions. - # - # @overload search_blueprint_revisions(request, options = nil) - # Pass arguments to `search_blueprint_revisions` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload search_blueprint_revisions(parent: nil, query: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_blueprint_revisions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of parent orchestration cluster resource. - # Format should be - - # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". - # @param query [::String] - # Required. Supported queries: - # 1. "" : Lists all revisions across all blueprints. - # 2. "latest=true" : Lists latest revisions across all blueprints. - # 3. "name=\\{name}" : Lists all revisions of blueprint with name - # \\{name}. - # 4. "name=\\{name} latest=true": Lists latest revision of blueprint with name - # \\{name} - # @param page_size [::Integer] - # Optional. The maximum number of blueprints revisions to return per page. - # max page size = 100, default page size = 20. - # @param page_token [::String] - # Optional. The page token, received from a previous search call. - # It can be provided to retrieve the subsequent page. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest.new - # - # # Call the search_blueprint_revisions method. - # result = client.search_blueprint_revisions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Blueprint. - # p item - # end - # - def search_blueprint_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.search_blueprint_revisions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_blueprint_revisions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_blueprint_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :search_blueprint_revisions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :search_blueprint_revisions, 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 - - ## - # Searches across deployment revisions. - # - # @overload search_deployment_revisions(request, options = nil) - # Pass arguments to `search_deployment_revisions` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload search_deployment_revisions(parent: nil, query: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_deployment_revisions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of parent orchestration cluster resource. - # Format should be - - # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". - # @param query [::String] - # Required. Supported queries: - # 1. "" : Lists all revisions across all deployments. - # 2. "latest=true" : Lists latest revisions across all - # deployments. - # 3. "name=\\{name}" : Lists all revisions of deployment with name - # \\{name}. - # 4. "name=\\{name} latest=true": Lists latest revision of deployment with name - # \\{name} - # @param page_size [::Integer] - # Optional. The maximum number of deployment revisions to return per page. - # max page size = 100, default page size = 20. - # @param page_token [::String] - # Optional. The page token, received from a previous search call. - # It can be provided to retrieve the subsequent page. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest.new - # - # # Call the search_deployment_revisions method. - # result = client.search_deployment_revisions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Deployment. - # p item - # end - # - def search_deployment_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.search_deployment_revisions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_deployment_revisions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_deployment_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :search_deployment_revisions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :search_deployment_revisions, 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 - - ## - # Discards the changes in a blueprint and reverts the blueprint to the last - # approved blueprint revision. No changes take place if a blueprint does not - # have revisions. - # - # @overload discard_blueprint_changes(request, options = nil) - # Pass arguments to `discard_blueprint_changes` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload discard_blueprint_changes(name: nil) - # Pass arguments to `discard_blueprint_changes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 blueprint of which changes are being discarded. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest.new - # - # # Call the discard_blueprint_changes method. - # result = client.discard_blueprint_changes request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse. - # p result - # - def discard_blueprint_changes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.discard_blueprint_changes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.discard_blueprint_changes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.discard_blueprint_changes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :discard_blueprint_changes, request, 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 blueprints in TNA's public catalog. Default page size = 20, - # Max Page Size = 100. - # - # @overload list_public_blueprints(request, options = nil) - # Pass arguments to `list_public_blueprints` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_public_blueprints(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_public_blueprints` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value of public blueprint. - # Format should be - - # "projects/\\{project_id}/locations/\\{location_name}". - # @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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::PublicBlueprint>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::PublicBlueprint>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest.new - # - # # Call the list_public_blueprints method. - # result = client.list_public_blueprints request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::PublicBlueprint. - # p item - # end - # - def list_public_blueprints request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_public_blueprints.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_public_blueprints.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_public_blueprints.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :list_public_blueprints, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :list_public_blueprints, 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 the requested public blueprint. - # - # @overload get_public_blueprint(request, options = nil) - # Pass arguments to `get_public_blueprint` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_public_blueprint(name: nil) - # Pass arguments to `get_public_blueprint` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 public blueprint. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::PublicBlueprint] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::PublicBlueprint] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest.new - # - # # Call the get_public_blueprint method. - # result = client.get_public_blueprint request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::PublicBlueprint. - # p result - # - def get_public_blueprint request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_public_blueprint.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_public_blueprint.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_public_blueprint.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :get_public_blueprint, request, 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 deployment. - # - # @overload create_deployment(request, options = nil) - # Pass arguments to `create_deployment` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_deployment(parent: nil, deployment_id: nil, deployment: nil) - # Pass arguments to `create_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of parent resource. - # Format should be - - # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". - # @param deployment_id [::String] - # Optional. The name of the deployment. - # @param deployment [::Google::Cloud::TelcoAutomation::V1::Deployment, ::Hash] - # Required. The `Deployment` to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Deployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest.new - # - # # Call the create_deployment method. - # result = client.create_deployment request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. - # p result - # - def create_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest - - # Converts hash and nil to 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_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :create_deployment, request, 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 deployment. - # - # @overload update_deployment(request, options = nil) - # Pass arguments to `update_deployment` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_deployment(deployment: nil, update_mask: nil) - # Pass arguments to `update_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param deployment [::Google::Cloud::TelcoAutomation::V1::Deployment, ::Hash] - # Required. The `deployment` to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Update mask is used to specify the fields to be overwritten in - # the `deployment` resource by the update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Deployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest.new - # - # # Call the update_deployment method. - # result = client.update_deployment request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. - # p result - # - def update_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest - - # Converts hash and nil to 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_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.deployment&.name - header_params["deployment.name"] = request.deployment.name - end - - request_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_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :update_deployment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the requested deployment. - # - # @overload get_deployment(request, options = nil) - # Pass arguments to `get_deployment` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_deployment(name: nil, view: nil) - # Pass arguments to `get_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 deployment. - # Case 1: If the name provided in the request is - # \\{deployment_id}@\\{revision_id}, then the revision with revision_id will be - # returned. - # Case 2: If the name provided in the request is \\{deployment}, then - # the current state of the deployment is returned. - # @param view [::Google::Cloud::TelcoAutomation::V1::DeploymentView] - # Optional. Defines the type of view of the deployment. - # When field is not present VIEW_BASIC is considered as default. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Deployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest.new - # - # # Call the get_deployment method. - # result = client.get_deployment request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. - # p result - # - def get_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :get_deployment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes the deployment by marking it as DELETING. Post which deployment and - # it's revisions gets deleted. - # - # @overload remove_deployment(request, options = nil) - # Pass arguments to `remove_deployment` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload remove_deployment(name: nil) - # Pass arguments to `remove_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 deployment to initiate delete. - # - # @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/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest.new - # - # # Call the remove_deployment method. - # result = client.remove_deployment request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def remove_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.remove_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.remove_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.remove_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :remove_deployment, request, 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 deployments. - # - # @overload list_deployments(request, options = nil) - # Pass arguments to `list_deployments` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_deployments(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_deployments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of parent orchestration cluster resource. - # Format should be - - # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". - # @param filter [::String] - # Optional. Filtering only supports equality on deployment state. - # It should be in the form: "state = DRAFT". `OR` operator can be used to - # get response for multiple states. e.g. "state = DRAFT OR state = APPLIED". - # @param page_size [::Integer] - # Optional. The maximum number of deployments to return per page. - # @param page_token [::String] - # Optional. The page token, received from a previous ListDeployments call. - # It can be provided to retrieve the subsequent page. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest.new - # - # # Call the list_deployments method. - # result = client.list_deployments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Deployment. - # p item - # end - # - def list_deployments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_deployments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_deployments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_deployments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :list_deployments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :list_deployments, 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 deployment revisions of a given deployment. - # - # @overload list_deployment_revisions(request, options = nil) - # Pass arguments to `list_deployment_revisions` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_deployment_revisions(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_deployment_revisions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 deployment to list revisions for. - # @param page_size [::Integer] - # Optional. The maximum number of revisions to return per page. - # @param page_token [::String] - # Optional. The page token, received from a previous ListDeploymentRevisions - # call Provide this to retrieve the subsequent page. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest.new - # - # # Call the list_deployment_revisions method. - # result = client.list_deployment_revisions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Deployment. - # p item - # end - # - def list_deployment_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_deployment_revisions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_deployment_revisions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_deployment_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :list_deployment_revisions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :list_deployment_revisions, 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 - - ## - # Discards the changes in a deployment and reverts the deployment to the last - # approved deployment revision. No changes take place if a deployment does - # not have revisions. - # - # @overload discard_deployment_changes(request, options = nil) - # Pass arguments to `discard_deployment_changes` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload discard_deployment_changes(name: nil) - # Pass arguments to `discard_deployment_changes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 deployment of which changes are being discarded. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest.new - # - # # Call the discard_deployment_changes method. - # result = client.discard_deployment_changes request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse. - # p result - # - def discard_deployment_changes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.discard_deployment_changes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.discard_deployment_changes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.discard_deployment_changes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :discard_deployment_changes, request, 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 the deployment's YAML files to the parent orchestration cluster. - # - # @overload apply_deployment(request, options = nil) - # Pass arguments to `apply_deployment` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload apply_deployment(name: nil) - # Pass arguments to `apply_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 deployment to apply to orchestration cluster. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Deployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest.new - # - # # Call the apply_deployment method. - # result = client.apply_deployment request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. - # p result - # - def apply_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.apply_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.apply_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.apply_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :apply_deployment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the requested deployment status. - # - # @overload compute_deployment_status(request, options = nil) - # Pass arguments to `compute_deployment_status` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload compute_deployment_status(name: nil) - # Pass arguments to `compute_deployment_status` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 deployment without revisionID. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest.new - # - # # Call the compute_deployment_status method. - # result = client.compute_deployment_status request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse. - # p result - # - def compute_deployment_status request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.compute_deployment_status.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.compute_deployment_status.timeout, - metadata: metadata, - retry_policy: @config.rpcs.compute_deployment_status.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :compute_deployment_status, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Rollback the active deployment to the given past approved deployment - # revision. - # - # @overload rollback_deployment(request, options = nil) - # Pass arguments to `rollback_deployment` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_deployment(name: nil, revision_id: nil) - # Pass arguments to `rollback_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 deployment. - # @param revision_id [::String] - # Required. The revision id of deployment to roll back to. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::Deployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest.new - # - # # Call the rollback_deployment method. - # result = client.rollback_deployment request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. - # p result - # - def rollback_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest - - # Converts hash and nil to 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_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.rollback_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :rollback_deployment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the requested hydrated deployment. - # - # @overload get_hydrated_deployment(request, options = nil) - # Pass arguments to `get_hydrated_deployment` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_hydrated_deployment(name: nil) - # Pass arguments to `get_hydrated_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 hydrated deployment. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest.new - # - # # Call the get_hydrated_deployment method. - # result = client.get_hydrated_deployment request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::HydratedDeployment. - # p result - # - def get_hydrated_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_hydrated_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_hydrated_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_hydrated_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :get_hydrated_deployment, request, 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 hydrated deployments present under a deployment. - # - # @overload list_hydrated_deployments(request, options = nil) - # Pass arguments to `list_hydrated_deployments` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_hydrated_deployments(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_hydrated_deployments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The deployment managing the hydrated deployments. - # @param page_size [::Integer] - # Optional. The maximum number of hydrated deployments to return. The service - # may return fewer than this value. If unspecified, at most 50 hydrated - # deployments will be returned. The maximum value is 1000. Values above 1000 - # will be set to 1000. - # @param page_token [::String] - # Optional. The page token, received from a previous ListHydratedDeployments - # call. Provide this to retrieve the subsequent page. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::HydratedDeployment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::HydratedDeployment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest.new - # - # # Call the list_hydrated_deployments method. - # result = client.list_hydrated_deployments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment. - # p item - # end - # - def list_hydrated_deployments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_hydrated_deployments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_hydrated_deployments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_hydrated_deployments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :list_hydrated_deployments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @telco_automation_stub, :list_hydrated_deployments, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a hydrated deployment. - # - # @overload update_hydrated_deployment(request, options = nil) - # Pass arguments to `update_hydrated_deployment` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_hydrated_deployment(hydrated_deployment: nil, update_mask: nil) - # Pass arguments to `update_hydrated_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param hydrated_deployment [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment, ::Hash] - # Required. The hydrated deployment to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. Update mask supports a special - # value `*` which fully replaces (equivalent to PUT) the resource provided. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest.new - # - # # Call the update_hydrated_deployment method. - # result = client.update_hydrated_deployment request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::HydratedDeployment. - # p result - # - def update_hydrated_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest - - # Converts hash and nil to 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_hydrated_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.hydrated_deployment&.name - header_params["hydrated_deployment.name"] = request.hydrated_deployment.name - end - - request_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_hydrated_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_hydrated_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :update_hydrated_deployment, request, 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 hydrated deployment to a workload cluster. - # - # @overload apply_hydrated_deployment(request, options = nil) - # Pass arguments to `apply_hydrated_deployment` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload apply_hydrated_deployment(name: nil) - # Pass arguments to `apply_hydrated_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 hydrated deployment to apply. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest.new - # - # # Call the apply_hydrated_deployment method. - # result = client.apply_hydrated_deployment request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::HydratedDeployment. - # p result - # - def apply_hydrated_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.apply_hydrated_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.apply_hydrated_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.apply_hydrated_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.call_rpc :apply_hydrated_deployment, request, 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 TelcoAutomation API. - # - # This class represents the configuration for TelcoAutomation, - # 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::TelcoAutomation::V1::TelcoAutomation::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_orchestration_clusters to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_orchestration_clusters.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_orchestration_clusters.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::TelcoAutomation::V1::TelcoAutomation::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 = "telcoautomation.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 TelcoAutomation 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_orchestration_clusters` - # @return [::Gapic::Config::Method] - # - attr_reader :list_orchestration_clusters - ## - # RPC-specific configuration for `get_orchestration_cluster` - # @return [::Gapic::Config::Method] - # - attr_reader :get_orchestration_cluster - ## - # RPC-specific configuration for `create_orchestration_cluster` - # @return [::Gapic::Config::Method] - # - attr_reader :create_orchestration_cluster - ## - # RPC-specific configuration for `delete_orchestration_cluster` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_orchestration_cluster - ## - # RPC-specific configuration for `list_edge_slms` - # @return [::Gapic::Config::Method] - # - attr_reader :list_edge_slms - ## - # RPC-specific configuration for `get_edge_slm` - # @return [::Gapic::Config::Method] - # - attr_reader :get_edge_slm - ## - # RPC-specific configuration for `create_edge_slm` - # @return [::Gapic::Config::Method] - # - attr_reader :create_edge_slm - ## - # RPC-specific configuration for `delete_edge_slm` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_edge_slm - ## - # RPC-specific configuration for `create_blueprint` - # @return [::Gapic::Config::Method] - # - attr_reader :create_blueprint - ## - # RPC-specific configuration for `update_blueprint` - # @return [::Gapic::Config::Method] - # - attr_reader :update_blueprint - ## - # RPC-specific configuration for `get_blueprint` - # @return [::Gapic::Config::Method] - # - attr_reader :get_blueprint - ## - # RPC-specific configuration for `delete_blueprint` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_blueprint - ## - # RPC-specific configuration for `list_blueprints` - # @return [::Gapic::Config::Method] - # - attr_reader :list_blueprints - ## - # RPC-specific configuration for `approve_blueprint` - # @return [::Gapic::Config::Method] - # - attr_reader :approve_blueprint - ## - # RPC-specific configuration for `propose_blueprint` - # @return [::Gapic::Config::Method] - # - attr_reader :propose_blueprint - ## - # RPC-specific configuration for `reject_blueprint` - # @return [::Gapic::Config::Method] - # - attr_reader :reject_blueprint - ## - # RPC-specific configuration for `list_blueprint_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_blueprint_revisions - ## - # RPC-specific configuration for `search_blueprint_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :search_blueprint_revisions - ## - # RPC-specific configuration for `search_deployment_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :search_deployment_revisions - ## - # RPC-specific configuration for `discard_blueprint_changes` - # @return [::Gapic::Config::Method] - # - attr_reader :discard_blueprint_changes - ## - # RPC-specific configuration for `list_public_blueprints` - # @return [::Gapic::Config::Method] - # - attr_reader :list_public_blueprints - ## - # RPC-specific configuration for `get_public_blueprint` - # @return [::Gapic::Config::Method] - # - attr_reader :get_public_blueprint - ## - # RPC-specific configuration for `create_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_deployment - ## - # RPC-specific configuration for `update_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_deployment - ## - # RPC-specific configuration for `get_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_deployment - ## - # RPC-specific configuration for `remove_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :remove_deployment - ## - # RPC-specific configuration for `list_deployments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_deployments - ## - # RPC-specific configuration for `list_deployment_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_deployment_revisions - ## - # RPC-specific configuration for `discard_deployment_changes` - # @return [::Gapic::Config::Method] - # - attr_reader :discard_deployment_changes - ## - # RPC-specific configuration for `apply_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :apply_deployment - ## - # RPC-specific configuration for `compute_deployment_status` - # @return [::Gapic::Config::Method] - # - attr_reader :compute_deployment_status - ## - # RPC-specific configuration for `rollback_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :rollback_deployment - ## - # RPC-specific configuration for `get_hydrated_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_hydrated_deployment - ## - # RPC-specific configuration for `list_hydrated_deployments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_hydrated_deployments - ## - # RPC-specific configuration for `update_hydrated_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_hydrated_deployment - ## - # RPC-specific configuration for `apply_hydrated_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :apply_hydrated_deployment - - # @private - def initialize parent_rpcs = nil - list_orchestration_clusters_config = parent_rpcs.list_orchestration_clusters if parent_rpcs.respond_to? :list_orchestration_clusters - @list_orchestration_clusters = ::Gapic::Config::Method.new list_orchestration_clusters_config - get_orchestration_cluster_config = parent_rpcs.get_orchestration_cluster if parent_rpcs.respond_to? :get_orchestration_cluster - @get_orchestration_cluster = ::Gapic::Config::Method.new get_orchestration_cluster_config - create_orchestration_cluster_config = parent_rpcs.create_orchestration_cluster if parent_rpcs.respond_to? :create_orchestration_cluster - @create_orchestration_cluster = ::Gapic::Config::Method.new create_orchestration_cluster_config - delete_orchestration_cluster_config = parent_rpcs.delete_orchestration_cluster if parent_rpcs.respond_to? :delete_orchestration_cluster - @delete_orchestration_cluster = ::Gapic::Config::Method.new delete_orchestration_cluster_config - list_edge_slms_config = parent_rpcs.list_edge_slms if parent_rpcs.respond_to? :list_edge_slms - @list_edge_slms = ::Gapic::Config::Method.new list_edge_slms_config - get_edge_slm_config = parent_rpcs.get_edge_slm if parent_rpcs.respond_to? :get_edge_slm - @get_edge_slm = ::Gapic::Config::Method.new get_edge_slm_config - create_edge_slm_config = parent_rpcs.create_edge_slm if parent_rpcs.respond_to? :create_edge_slm - @create_edge_slm = ::Gapic::Config::Method.new create_edge_slm_config - delete_edge_slm_config = parent_rpcs.delete_edge_slm if parent_rpcs.respond_to? :delete_edge_slm - @delete_edge_slm = ::Gapic::Config::Method.new delete_edge_slm_config - create_blueprint_config = parent_rpcs.create_blueprint if parent_rpcs.respond_to? :create_blueprint - @create_blueprint = ::Gapic::Config::Method.new create_blueprint_config - update_blueprint_config = parent_rpcs.update_blueprint if parent_rpcs.respond_to? :update_blueprint - @update_blueprint = ::Gapic::Config::Method.new update_blueprint_config - get_blueprint_config = parent_rpcs.get_blueprint if parent_rpcs.respond_to? :get_blueprint - @get_blueprint = ::Gapic::Config::Method.new get_blueprint_config - delete_blueprint_config = parent_rpcs.delete_blueprint if parent_rpcs.respond_to? :delete_blueprint - @delete_blueprint = ::Gapic::Config::Method.new delete_blueprint_config - list_blueprints_config = parent_rpcs.list_blueprints if parent_rpcs.respond_to? :list_blueprints - @list_blueprints = ::Gapic::Config::Method.new list_blueprints_config - approve_blueprint_config = parent_rpcs.approve_blueprint if parent_rpcs.respond_to? :approve_blueprint - @approve_blueprint = ::Gapic::Config::Method.new approve_blueprint_config - propose_blueprint_config = parent_rpcs.propose_blueprint if parent_rpcs.respond_to? :propose_blueprint - @propose_blueprint = ::Gapic::Config::Method.new propose_blueprint_config - reject_blueprint_config = parent_rpcs.reject_blueprint if parent_rpcs.respond_to? :reject_blueprint - @reject_blueprint = ::Gapic::Config::Method.new reject_blueprint_config - list_blueprint_revisions_config = parent_rpcs.list_blueprint_revisions if parent_rpcs.respond_to? :list_blueprint_revisions - @list_blueprint_revisions = ::Gapic::Config::Method.new list_blueprint_revisions_config - search_blueprint_revisions_config = parent_rpcs.search_blueprint_revisions if parent_rpcs.respond_to? :search_blueprint_revisions - @search_blueprint_revisions = ::Gapic::Config::Method.new search_blueprint_revisions_config - search_deployment_revisions_config = parent_rpcs.search_deployment_revisions if parent_rpcs.respond_to? :search_deployment_revisions - @search_deployment_revisions = ::Gapic::Config::Method.new search_deployment_revisions_config - discard_blueprint_changes_config = parent_rpcs.discard_blueprint_changes if parent_rpcs.respond_to? :discard_blueprint_changes - @discard_blueprint_changes = ::Gapic::Config::Method.new discard_blueprint_changes_config - list_public_blueprints_config = parent_rpcs.list_public_blueprints if parent_rpcs.respond_to? :list_public_blueprints - @list_public_blueprints = ::Gapic::Config::Method.new list_public_blueprints_config - get_public_blueprint_config = parent_rpcs.get_public_blueprint if parent_rpcs.respond_to? :get_public_blueprint - @get_public_blueprint = ::Gapic::Config::Method.new get_public_blueprint_config - create_deployment_config = parent_rpcs.create_deployment if parent_rpcs.respond_to? :create_deployment - @create_deployment = ::Gapic::Config::Method.new create_deployment_config - update_deployment_config = parent_rpcs.update_deployment if parent_rpcs.respond_to? :update_deployment - @update_deployment = ::Gapic::Config::Method.new update_deployment_config - get_deployment_config = parent_rpcs.get_deployment if parent_rpcs.respond_to? :get_deployment - @get_deployment = ::Gapic::Config::Method.new get_deployment_config - remove_deployment_config = parent_rpcs.remove_deployment if parent_rpcs.respond_to? :remove_deployment - @remove_deployment = ::Gapic::Config::Method.new remove_deployment_config - list_deployments_config = parent_rpcs.list_deployments if parent_rpcs.respond_to? :list_deployments - @list_deployments = ::Gapic::Config::Method.new list_deployments_config - list_deployment_revisions_config = parent_rpcs.list_deployment_revisions if parent_rpcs.respond_to? :list_deployment_revisions - @list_deployment_revisions = ::Gapic::Config::Method.new list_deployment_revisions_config - discard_deployment_changes_config = parent_rpcs.discard_deployment_changes if parent_rpcs.respond_to? :discard_deployment_changes - @discard_deployment_changes = ::Gapic::Config::Method.new discard_deployment_changes_config - apply_deployment_config = parent_rpcs.apply_deployment if parent_rpcs.respond_to? :apply_deployment - @apply_deployment = ::Gapic::Config::Method.new apply_deployment_config - compute_deployment_status_config = parent_rpcs.compute_deployment_status if parent_rpcs.respond_to? :compute_deployment_status - @compute_deployment_status = ::Gapic::Config::Method.new compute_deployment_status_config - rollback_deployment_config = parent_rpcs.rollback_deployment if parent_rpcs.respond_to? :rollback_deployment - @rollback_deployment = ::Gapic::Config::Method.new rollback_deployment_config - get_hydrated_deployment_config = parent_rpcs.get_hydrated_deployment if parent_rpcs.respond_to? :get_hydrated_deployment - @get_hydrated_deployment = ::Gapic::Config::Method.new get_hydrated_deployment_config - list_hydrated_deployments_config = parent_rpcs.list_hydrated_deployments if parent_rpcs.respond_to? :list_hydrated_deployments - @list_hydrated_deployments = ::Gapic::Config::Method.new list_hydrated_deployments_config - update_hydrated_deployment_config = parent_rpcs.update_hydrated_deployment if parent_rpcs.respond_to? :update_hydrated_deployment - @update_hydrated_deployment = ::Gapic::Config::Method.new update_hydrated_deployment_config - apply_hydrated_deployment_config = parent_rpcs.apply_hydrated_deployment if parent_rpcs.respond_to? :apply_hydrated_deployment - @apply_hydrated_deployment = ::Gapic::Config::Method.new apply_hydrated_deployment_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/credentials.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/credentials.rb deleted file mode 100644 index 95f1611e1573..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/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 TelcoAutomation - module V1 - module TelcoAutomation - # Credentials for the TelcoAutomation 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-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/operations.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/operations.rb deleted file mode 100644 index 050b914fa8e1..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/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 TelcoAutomation - module V1 - module TelcoAutomation - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "telcoautomation.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the TelcoAutomation 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 TelcoAutomation 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::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::TelcoAutomation::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::TelcoAutomation::V1::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 = "telcoautomation.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-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/paths.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/paths.rb deleted file mode 100644 index 7a62a825c5f7..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/paths.rb +++ /dev/null @@ -1,172 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module TelcoAutomation - module V1 - module TelcoAutomation - # Path helper methods for the TelcoAutomation API. - module Paths - ## - # Create a fully-qualified Blueprint resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/blueprints/{blueprint}` - # - # @param project [String] - # @param location [String] - # @param orchestration_cluster [String] - # @param blueprint [String] - # - # @return [::String] - def blueprint_path project:, location:, orchestration_cluster:, blueprint: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "orchestration_cluster cannot contain /" if orchestration_cluster.to_s.include? "/" - - "projects/#{project}/locations/#{location}/orchestrationClusters/#{orchestration_cluster}/blueprints/#{blueprint}" - end - - ## - # Create a fully-qualified Deployment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/deployments/{deployment}` - # - # @param project [String] - # @param location [String] - # @param orchestration_cluster [String] - # @param deployment [String] - # - # @return [::String] - def deployment_path project:, location:, orchestration_cluster:, deployment: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "orchestration_cluster cannot contain /" if orchestration_cluster.to_s.include? "/" - - "projects/#{project}/locations/#{location}/orchestrationClusters/#{orchestration_cluster}/deployments/#{deployment}" - end - - ## - # Create a fully-qualified EdgeSlm resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/edgeSlms/{edge_slm}` - # - # @param project [String] - # @param location [String] - # @param edge_slm [String] - # - # @return [::String] - def edge_slm_path project:, location:, edge_slm: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/edgeSlms/#{edge_slm}" - end - - ## - # Create a fully-qualified HydratedDeployment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/deployments/{deployment}/hydratedDeployments/{hydrated_deployment}` - # - # @param project [String] - # @param location [String] - # @param orchestration_cluster [String] - # @param deployment [String] - # @param hydrated_deployment [String] - # - # @return [::String] - def hydrated_deployment_path project:, location:, orchestration_cluster:, deployment:, hydrated_deployment: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "orchestration_cluster cannot contain /" if orchestration_cluster.to_s.include? "/" - raise ::ArgumentError, "deployment cannot contain /" if deployment.to_s.include? "/" - - "projects/#{project}/locations/#{location}/orchestrationClusters/#{orchestration_cluster}/deployments/#{deployment}/hydratedDeployments/#{hydrated_deployment}" - 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 OrchestrationCluster resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}` - # - # @param project [String] - # @param location [String] - # @param orchestration_cluster [String] - # - # @return [::String] - def orchestration_cluster_path project:, location:, orchestration_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}/orchestrationClusters/#{orchestration_cluster}" - end - - ## - # Create a fully-qualified PublicBlueprint resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/publicBlueprints/{public_lueprint}` - # - # @param project [String] - # @param location [String] - # @param public_lueprint [String] - # - # @return [::String] - def public_blueprint_path project:, location:, public_lueprint: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/publicBlueprints/#{public_lueprint}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest.rb deleted file mode 100644 index ecc60ae205c8..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/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/telco_automation/v1/version" -require "google/cloud/telco_automation/v1/bindings_override" - -require "google/cloud/telco_automation/v1/telco_automation/credentials" -require "google/cloud/telco_automation/v1/telco_automation/paths" -require "google/cloud/telco_automation/v1/telco_automation/rest/operations" -require "google/cloud/telco_automation/v1/telco_automation/rest/client" - -module Google - module Cloud - module TelcoAutomation - module V1 - ## - # TelcoAutomation Service manages the control plane cluster a.k.a. - # Orchestration Cluster (GKE cluster with config controller) of TNA. It also - # exposes blueprint APIs which manages the lifecycle of blueprints that control - # the infrastructure setup (e.g GDCE clusters) and deployment of network - # functions. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/telco_automation/v1/telco_automation/rest" - # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - module TelcoAutomation - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/telco_automation/v1/telco_automation/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest/client.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest/client.rb deleted file mode 100644 index 24a2151fd203..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest/client.rb +++ /dev/null @@ -1,3752 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/telcoautomation/v1/telcoautomation_pb" -require "google/cloud/telco_automation/v1/telco_automation/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module TelcoAutomation - module V1 - module TelcoAutomation - module Rest - ## - # REST client for the TelcoAutomation service. - # - # TelcoAutomation Service manages the control plane cluster a.k.a. - # Orchestration Cluster (GKE cluster with config controller) of TNA. It also - # exposes blueprint APIs which manages the lifecycle of blueprints that control - # the infrastructure setup (e.g GDCE clusters) and deployment of network - # functions. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "telcoautomation.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :telco_automation_stub - - ## - # Configure the TelcoAutomation Client class. - # - # See {::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TelcoAutomation clients - # ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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", "TelcoAutomation", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TelcoAutomation 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::TelcoAutomation::V1::TelcoAutomation::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 - @telco_automation_stub.universe_domain - end - - ## - # Create a new TelcoAutomation REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TelcoAutomation 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::TelcoAutomation::V1::TelcoAutomation::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 - - @telco_automation_stub = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @telco_automation_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 = @telco_automation_stub.endpoint - config.universe_domain = @telco_automation_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @telco_automation_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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 - @telco_automation_stub.logger - end - - # Service calls - - ## - # Lists OrchestrationClusters in a given project and location. - # - # @overload list_orchestration_clusters(request, options = nil) - # Pass arguments to `list_orchestration_clusters` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_orchestration_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_orchestration_clusters` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListOrchestrationClustersRequest - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filtering results. - # @param order_by [::String] - # 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::TelcoAutomation::V1::OrchestrationCluster>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest.new - # - # # Call the list_orchestration_clusters method. - # result = client.list_orchestration_clusters request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster. - # p item - # end - # - def list_orchestration_clusters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_orchestration_clusters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_orchestration_clusters.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_orchestration_clusters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.list_orchestration_clusters request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :list_orchestration_clusters, "orchestration_clusters", 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 single OrchestrationCluster. - # - # @overload get_orchestration_cluster(request, options = nil) - # Pass arguments to `get_orchestration_cluster` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_orchestration_cluster(name: nil) - # Pass arguments to `get_orchestration_cluster` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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::TelcoAutomation::V1::OrchestrationCluster] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest.new - # - # # Call the get_orchestration_cluster method. - # result = client.get_orchestration_cluster request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::OrchestrationCluster. - # p result - # - def get_orchestration_cluster request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_orchestration_cluster.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_orchestration_cluster.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_orchestration_cluster.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.get_orchestration_cluster request, 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 OrchestrationCluster in a given project and location. - # - # @overload create_orchestration_cluster(request, options = nil) - # Pass arguments to `create_orchestration_cluster` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_orchestration_cluster(parent: nil, orchestration_cluster_id: nil, orchestration_cluster: nil, request_id: nil) - # Pass arguments to `create_orchestration_cluster` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Value for parent. - # @param orchestration_cluster_id [::String] - # Required. Id of the requesting object - # If auto-generating Id server-side, remove this field and - # orchestration_cluster_id from the method_signature of Create RPC - # @param orchestration_cluster [::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster, ::Hash] - # Required. The resource being 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/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest.new - # - # # Call the create_orchestration_cluster method. - # result = client.create_orchestration_cluster request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_orchestration_cluster request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest - - # Converts hash and nil to an 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_orchestration_cluster.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_orchestration_cluster.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_orchestration_cluster.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.create_orchestration_cluster request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 single OrchestrationCluster. - # - # @overload delete_orchestration_cluster(request, options = nil) - # Pass arguments to `delete_orchestration_cluster` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_orchestration_cluster(name: nil, request_id: nil) - # Pass arguments to `delete_orchestration_cluster` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 - # @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/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest.new - # - # # Call the delete_orchestration_cluster method. - # result = client.delete_orchestration_cluster request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_orchestration_cluster request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest - - # Converts hash and nil to an 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_orchestration_cluster.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_orchestration_cluster.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_orchestration_cluster.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.delete_orchestration_cluster request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 EdgeSlms in a given project and location. - # - # @overload list_edge_slms(request, options = nil) - # Pass arguments to `list_edge_slms` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_edge_slms(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_edge_slms` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListEdgeSlmsRequest - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filtering results - # @param order_by [::String] - # 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::TelcoAutomation::V1::EdgeSlm>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::EdgeSlm>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest.new - # - # # Call the list_edge_slms method. - # result = client.list_edge_slms request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::EdgeSlm. - # p item - # end - # - def list_edge_slms request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_edge_slms.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_edge_slms.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_edge_slms.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.list_edge_slms request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :list_edge_slms, "edge_slms", 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 single EdgeSlm. - # - # @overload get_edge_slm(request, options = nil) - # Pass arguments to `get_edge_slm` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_edge_slm(name: nil) - # Pass arguments to `get_edge_slm` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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::TelcoAutomation::V1::EdgeSlm] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::EdgeSlm] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest.new - # - # # Call the get_edge_slm method. - # result = client.get_edge_slm request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::EdgeSlm. - # p result - # - def get_edge_slm request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_edge_slm.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_edge_slm.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_edge_slm.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.get_edge_slm request, 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 EdgeSlm in a given project and location. - # - # @overload create_edge_slm(request, options = nil) - # Pass arguments to `create_edge_slm` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_edge_slm(parent: nil, edge_slm_id: nil, edge_slm: nil, request_id: nil) - # Pass arguments to `create_edge_slm` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Value for parent. - # @param edge_slm_id [::String] - # Required. Id of the requesting object - # If auto-generating Id server-side, remove this field and - # edge_slm_id from the method_signature of Create RPC - # @param edge_slm [::Google::Cloud::TelcoAutomation::V1::EdgeSlm, ::Hash] - # Required. The resource being 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/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest.new - # - # # Call the create_edge_slm method. - # result = client.create_edge_slm request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_edge_slm request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest - - # Converts hash and nil to an 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_edge_slm.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_edge_slm.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_edge_slm.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.create_edge_slm request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 single EdgeSlm. - # - # @overload delete_edge_slm(request, options = nil) - # Pass arguments to `delete_edge_slm` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_edge_slm(name: nil, request_id: nil) - # Pass arguments to `delete_edge_slm` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 - # @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/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest.new - # - # # Call the delete_edge_slm method. - # result = client.delete_edge_slm request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_edge_slm request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest - - # Converts hash and nil to an 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_edge_slm.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_edge_slm.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_edge_slm.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.delete_edge_slm request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 blueprint. - # - # @overload create_blueprint(request, options = nil) - # Pass arguments to `create_blueprint` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_blueprint(parent: nil, blueprint_id: nil, blueprint: nil) - # Pass arguments to `create_blueprint` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of parent resource. - # Format should be - - # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". - # @param blueprint_id [::String] - # Optional. The name of the blueprint. - # @param blueprint [::Google::Cloud::TelcoAutomation::V1::Blueprint, ::Hash] - # Required. The `Blueprint` to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest.new - # - # # Call the create_blueprint method. - # result = client.create_blueprint request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. - # p result - # - def create_blueprint request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest - - # Converts hash and nil to an 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_blueprint.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_blueprint.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_blueprint.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.create_blueprint request, 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 blueprint. - # - # @overload update_blueprint(request, options = nil) - # Pass arguments to `update_blueprint` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_blueprint(blueprint: nil, update_mask: nil) - # Pass arguments to `update_blueprint` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param blueprint [::Google::Cloud::TelcoAutomation::V1::Blueprint, ::Hash] - # Required. The `blueprint` to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Update mask is used to specify the fields to be overwritten in - # the `blueprint` resource by the update. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest.new - # - # # Call the update_blueprint method. - # result = client.update_blueprint request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. - # p result - # - def update_blueprint request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest - - # Converts hash and nil to an 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_blueprint.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_blueprint.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_blueprint.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.update_blueprint request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the requested blueprint. - # - # @overload get_blueprint(request, options = nil) - # Pass arguments to `get_blueprint` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_blueprint(name: nil, view: nil) - # Pass arguments to `get_blueprint` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 blueprint. - # Case 1: If the name provided in the request is - # \\{blueprint_id}@\\{revision_id}, then the revision with revision_id will be - # returned. Case 2: If the name provided in the request is \\{blueprint}, then - # the current state of the blueprint is returned. - # @param view [::Google::Cloud::TelcoAutomation::V1::BlueprintView] - # Optional. Defines the type of view of the blueprint. - # When field is not present BLUEPRINT_VIEW_BASIC is considered as default. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest.new - # - # # Call the get_blueprint method. - # result = client.get_blueprint request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. - # p result - # - def get_blueprint request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_blueprint.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_blueprint.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_blueprint.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.get_blueprint request, 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 blueprint and all its revisions. - # - # @overload delete_blueprint(request, options = nil) - # Pass arguments to `delete_blueprint` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_blueprint(name: nil) - # Pass arguments to `delete_blueprint` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 blueprint to delete. - # Blueprint name should be in the format \\{blueprint_id}, if - # \\{blueprint_id}@\\{revision_id} is passed then the API throws invalid - # argument. - # @yield [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/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest.new - # - # # Call the delete_blueprint method. - # result = client.delete_blueprint request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_blueprint request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest - - # Converts hash and nil to an 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_blueprint.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_blueprint.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_blueprint.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.delete_blueprint request, 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 blueprints. - # - # @overload list_blueprints(request, options = nil) - # Pass arguments to `list_blueprints` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_blueprints(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_blueprints` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of parent orchestration cluster resource. - # Format should be - - # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". - # @param filter [::String] - # Optional. Filtering only supports equality on blueprint state. - # It should be in the form: "state = DRAFT". `OR` operator can be used to - # get response for multiple states. e.g. "state = DRAFT OR state = PROPOSED". - # @param page_size [::Integer] - # Optional. The maximum number of blueprints to return per page. - # @param page_token [::String] - # Optional. The page token, received from a previous ListBlueprints call. - # It can be provided to retrieve the subsequent page. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest.new - # - # # Call the list_blueprints method. - # result = client.list_blueprints request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Blueprint. - # p item - # end - # - def list_blueprints request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_blueprints.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_blueprints.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_blueprints.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.list_blueprints request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :list_blueprints, "blueprints", 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 - - ## - # Approves a blueprint and commits a new revision. - # - # @overload approve_blueprint(request, options = nil) - # Pass arguments to `approve_blueprint` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload approve_blueprint(name: nil) - # Pass arguments to `approve_blueprint` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 blueprint to approve. The blueprint must be in - # Proposed state. A new revision is committed on approval. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest.new - # - # # Call the approve_blueprint method. - # result = client.approve_blueprint request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. - # p result - # - def approve_blueprint request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.approve_blueprint.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.approve_blueprint.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.approve_blueprint.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.approve_blueprint request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Proposes a blueprint for approval of changes. - # - # @overload propose_blueprint(request, options = nil) - # Pass arguments to `propose_blueprint` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload propose_blueprint(name: nil) - # Pass arguments to `propose_blueprint` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 blueprint being proposed. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest.new - # - # # Call the propose_blueprint method. - # result = client.propose_blueprint request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. - # p result - # - def propose_blueprint request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.propose_blueprint.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.propose_blueprint.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.propose_blueprint.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.propose_blueprint request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Rejects a blueprint revision proposal and flips it back to Draft state. - # - # @overload reject_blueprint(request, options = nil) - # Pass arguments to `reject_blueprint` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload reject_blueprint(name: nil) - # Pass arguments to `reject_blueprint` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 blueprint being rejected. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest.new - # - # # Call the reject_blueprint method. - # result = client.reject_blueprint request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. - # p result - # - def reject_blueprint request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.reject_blueprint.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.reject_blueprint.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.reject_blueprint.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.reject_blueprint request, 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 blueprint revisions of a given blueprint. - # - # @overload list_blueprint_revisions(request, options = nil) - # Pass arguments to `list_blueprint_revisions` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_blueprint_revisions(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_blueprint_revisions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 blueprint to list revisions for. - # @param page_size [::Integer] - # The maximum number of revisions to return per page. - # @param page_token [::String] - # The page token, received from a previous ListBlueprintRevisions call - # It can be provided to retrieve the subsequent page. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest.new - # - # # Call the list_blueprint_revisions method. - # result = client.list_blueprint_revisions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Blueprint. - # p item - # end - # - def list_blueprint_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_blueprint_revisions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_blueprint_revisions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_blueprint_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.list_blueprint_revisions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :list_blueprint_revisions, "blueprints", 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 - - ## - # Searches across blueprint revisions. - # - # @overload search_blueprint_revisions(request, options = nil) - # Pass arguments to `search_blueprint_revisions` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload search_blueprint_revisions(parent: nil, query: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_blueprint_revisions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of parent orchestration cluster resource. - # Format should be - - # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". - # @param query [::String] - # Required. Supported queries: - # 1. "" : Lists all revisions across all blueprints. - # 2. "latest=true" : Lists latest revisions across all blueprints. - # 3. "name=\\{name}" : Lists all revisions of blueprint with name - # \\{name}. - # 4. "name=\\{name} latest=true": Lists latest revision of blueprint with name - # \\{name} - # @param page_size [::Integer] - # Optional. The maximum number of blueprints revisions to return per page. - # max page size = 100, default page size = 20. - # @param page_token [::String] - # Optional. The page token, received from a previous search call. - # It can be provided to retrieve the subsequent page. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Blueprint>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest.new - # - # # Call the search_blueprint_revisions method. - # result = client.search_blueprint_revisions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Blueprint. - # p item - # end - # - def search_blueprint_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.search_blueprint_revisions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.search_blueprint_revisions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_blueprint_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.search_blueprint_revisions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :search_blueprint_revisions, "blueprints", 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 - - ## - # Searches across deployment revisions. - # - # @overload search_deployment_revisions(request, options = nil) - # Pass arguments to `search_deployment_revisions` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload search_deployment_revisions(parent: nil, query: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_deployment_revisions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of parent orchestration cluster resource. - # Format should be - - # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". - # @param query [::String] - # Required. Supported queries: - # 1. "" : Lists all revisions across all deployments. - # 2. "latest=true" : Lists latest revisions across all - # deployments. - # 3. "name=\\{name}" : Lists all revisions of deployment with name - # \\{name}. - # 4. "name=\\{name} latest=true": Lists latest revision of deployment with name - # \\{name} - # @param page_size [::Integer] - # Optional. The maximum number of deployment revisions to return per page. - # max page size = 100, default page size = 20. - # @param page_token [::String] - # Optional. The page token, received from a previous search call. - # It can be provided to retrieve the subsequent page. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest.new - # - # # Call the search_deployment_revisions method. - # result = client.search_deployment_revisions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Deployment. - # p item - # end - # - def search_deployment_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.search_deployment_revisions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.search_deployment_revisions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_deployment_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.search_deployment_revisions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :search_deployment_revisions, "deployments", 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 - - ## - # Discards the changes in a blueprint and reverts the blueprint to the last - # approved blueprint revision. No changes take place if a blueprint does not - # have revisions. - # - # @overload discard_blueprint_changes(request, options = nil) - # Pass arguments to `discard_blueprint_changes` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload discard_blueprint_changes(name: nil) - # Pass arguments to `discard_blueprint_changes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 blueprint of which changes are being discarded. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest.new - # - # # Call the discard_blueprint_changes method. - # result = client.discard_blueprint_changes request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse. - # p result - # - def discard_blueprint_changes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.discard_blueprint_changes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.discard_blueprint_changes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.discard_blueprint_changes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.discard_blueprint_changes request, 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 blueprints in TNA's public catalog. Default page size = 20, - # Max Page Size = 100. - # - # @overload list_public_blueprints(request, options = nil) - # Pass arguments to `list_public_blueprints` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_public_blueprints(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_public_blueprints` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value of public blueprint. - # Format should be - - # "projects/\\{project_id}/locations/\\{location_name}". - # @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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::PublicBlueprint>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::PublicBlueprint>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest.new - # - # # Call the list_public_blueprints method. - # result = client.list_public_blueprints request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::PublicBlueprint. - # p item - # end - # - def list_public_blueprints request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_public_blueprints.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_public_blueprints.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_public_blueprints.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.list_public_blueprints request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :list_public_blueprints, "public_blueprints", 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 the requested public blueprint. - # - # @overload get_public_blueprint(request, options = nil) - # Pass arguments to `get_public_blueprint` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_public_blueprint(name: nil) - # Pass arguments to `get_public_blueprint` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 public blueprint. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::PublicBlueprint] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::PublicBlueprint] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest.new - # - # # Call the get_public_blueprint method. - # result = client.get_public_blueprint request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::PublicBlueprint. - # p result - # - def get_public_blueprint request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_public_blueprint.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_public_blueprint.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_public_blueprint.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.get_public_blueprint request, 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 deployment. - # - # @overload create_deployment(request, options = nil) - # Pass arguments to `create_deployment` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_deployment(parent: nil, deployment_id: nil, deployment: nil) - # Pass arguments to `create_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of parent resource. - # Format should be - - # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". - # @param deployment_id [::String] - # Optional. The name of the deployment. - # @param deployment [::Google::Cloud::TelcoAutomation::V1::Deployment, ::Hash] - # Required. The `Deployment` to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Deployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest.new - # - # # Call the create_deployment method. - # result = client.create_deployment request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. - # p result - # - def create_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest - - # Converts hash and nil to an 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_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.create_deployment request, 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 deployment. - # - # @overload update_deployment(request, options = nil) - # Pass arguments to `update_deployment` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_deployment(deployment: nil, update_mask: nil) - # Pass arguments to `update_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param deployment [::Google::Cloud::TelcoAutomation::V1::Deployment, ::Hash] - # Required. The `deployment` to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Update mask is used to specify the fields to be overwritten in - # the `deployment` resource by the update. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Deployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest.new - # - # # Call the update_deployment method. - # result = client.update_deployment request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. - # p result - # - def update_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest - - # Converts hash and nil to an 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_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.update_deployment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the requested deployment. - # - # @overload get_deployment(request, options = nil) - # Pass arguments to `get_deployment` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_deployment(name: nil, view: nil) - # Pass arguments to `get_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 deployment. - # Case 1: If the name provided in the request is - # \\{deployment_id}@\\{revision_id}, then the revision with revision_id will be - # returned. - # Case 2: If the name provided in the request is \\{deployment}, then - # the current state of the deployment is returned. - # @param view [::Google::Cloud::TelcoAutomation::V1::DeploymentView] - # Optional. Defines the type of view of the deployment. - # When field is not present VIEW_BASIC is considered as default. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Deployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest.new - # - # # Call the get_deployment method. - # result = client.get_deployment request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. - # p result - # - def get_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.get_deployment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes the deployment by marking it as DELETING. Post which deployment and - # it's revisions gets deleted. - # - # @overload remove_deployment(request, options = nil) - # Pass arguments to `remove_deployment` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload remove_deployment(name: nil) - # Pass arguments to `remove_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 deployment to initiate delete. - # @yield [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/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest.new - # - # # Call the remove_deployment method. - # result = client.remove_deployment request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def remove_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.remove_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.remove_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.remove_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.remove_deployment request, 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 deployments. - # - # @overload list_deployments(request, options = nil) - # Pass arguments to `list_deployments` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_deployments(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_deployments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of parent orchestration cluster resource. - # Format should be - - # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". - # @param filter [::String] - # Optional. Filtering only supports equality on deployment state. - # It should be in the form: "state = DRAFT". `OR` operator can be used to - # get response for multiple states. e.g. "state = DRAFT OR state = APPLIED". - # @param page_size [::Integer] - # Optional. The maximum number of deployments to return per page. - # @param page_token [::String] - # Optional. The page token, received from a previous ListDeployments call. - # It can be provided to retrieve the subsequent page. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest.new - # - # # Call the list_deployments method. - # result = client.list_deployments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Deployment. - # p item - # end - # - def list_deployments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_deployments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_deployments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_deployments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.list_deployments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :list_deployments, "deployments", 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 deployment revisions of a given deployment. - # - # @overload list_deployment_revisions(request, options = nil) - # Pass arguments to `list_deployment_revisions` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_deployment_revisions(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_deployment_revisions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 deployment to list revisions for. - # @param page_size [::Integer] - # Optional. The maximum number of revisions to return per page. - # @param page_token [::String] - # Optional. The page token, received from a previous ListDeploymentRevisions - # call Provide this to retrieve the subsequent page. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::Deployment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest.new - # - # # Call the list_deployment_revisions method. - # result = client.list_deployment_revisions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Deployment. - # p item - # end - # - def list_deployment_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_deployment_revisions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_deployment_revisions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_deployment_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.list_deployment_revisions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :list_deployment_revisions, "deployments", 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 - - ## - # Discards the changes in a deployment and reverts the deployment to the last - # approved deployment revision. No changes take place if a deployment does - # not have revisions. - # - # @overload discard_deployment_changes(request, options = nil) - # Pass arguments to `discard_deployment_changes` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload discard_deployment_changes(name: nil) - # Pass arguments to `discard_deployment_changes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 deployment of which changes are being discarded. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest.new - # - # # Call the discard_deployment_changes method. - # result = client.discard_deployment_changes request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse. - # p result - # - def discard_deployment_changes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.discard_deployment_changes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.discard_deployment_changes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.discard_deployment_changes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.discard_deployment_changes request, 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 the deployment's YAML files to the parent orchestration cluster. - # - # @overload apply_deployment(request, options = nil) - # Pass arguments to `apply_deployment` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload apply_deployment(name: nil) - # Pass arguments to `apply_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 deployment to apply to orchestration cluster. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Deployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest.new - # - # # Call the apply_deployment method. - # result = client.apply_deployment request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. - # p result - # - def apply_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.apply_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.apply_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.apply_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.apply_deployment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the requested deployment status. - # - # @overload compute_deployment_status(request, options = nil) - # Pass arguments to `compute_deployment_status` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload compute_deployment_status(name: nil) - # Pass arguments to `compute_deployment_status` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 deployment without revisionID. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest.new - # - # # Call the compute_deployment_status method. - # result = client.compute_deployment_status request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse. - # p result - # - def compute_deployment_status request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.compute_deployment_status.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.compute_deployment_status.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.compute_deployment_status.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.compute_deployment_status request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Rollback the active deployment to the given past approved deployment - # revision. - # - # @overload rollback_deployment(request, options = nil) - # Pass arguments to `rollback_deployment` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_deployment(name: nil, revision_id: nil) - # Pass arguments to `rollback_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 deployment. - # @param revision_id [::String] - # Required. The revision id of deployment to roll back to. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Deployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest.new - # - # # Call the rollback_deployment method. - # result = client.rollback_deployment request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. - # p result - # - def rollback_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest - - # Converts hash and nil to an 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_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.rollback_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.rollback_deployment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the requested hydrated deployment. - # - # @overload get_hydrated_deployment(request, options = nil) - # Pass arguments to `get_hydrated_deployment` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_hydrated_deployment(name: nil) - # Pass arguments to `get_hydrated_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 hydrated deployment. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest.new - # - # # Call the get_hydrated_deployment method. - # result = client.get_hydrated_deployment request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::HydratedDeployment. - # p result - # - def get_hydrated_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_hydrated_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_hydrated_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_hydrated_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.get_hydrated_deployment request, 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 hydrated deployments present under a deployment. - # - # @overload list_hydrated_deployments(request, options = nil) - # Pass arguments to `list_hydrated_deployments` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_hydrated_deployments(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_hydrated_deployments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The deployment managing the hydrated deployments. - # @param page_size [::Integer] - # Optional. The maximum number of hydrated deployments to return. The service - # may return fewer than this value. If unspecified, at most 50 hydrated - # deployments will be returned. The maximum value is 1000. Values above 1000 - # will be set to 1000. - # @param page_token [::String] - # Optional. The page token, received from a previous ListHydratedDeployments - # call. Provide this to retrieve the subsequent page. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::HydratedDeployment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::TelcoAutomation::V1::HydratedDeployment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest.new - # - # # Call the list_hydrated_deployments method. - # result = client.list_hydrated_deployments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment. - # p item - # end - # - def list_hydrated_deployments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_hydrated_deployments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_hydrated_deployments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_hydrated_deployments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.list_hydrated_deployments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :list_hydrated_deployments, "hydrated_deployments", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a hydrated deployment. - # - # @overload update_hydrated_deployment(request, options = nil) - # Pass arguments to `update_hydrated_deployment` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_hydrated_deployment(hydrated_deployment: nil, update_mask: nil) - # Pass arguments to `update_hydrated_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param hydrated_deployment [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment, ::Hash] - # Required. The hydrated deployment to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. Update mask supports a special - # value `*` which fully replaces (equivalent to PUT) the resource provided. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest.new - # - # # Call the update_hydrated_deployment method. - # result = client.update_hydrated_deployment request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::HydratedDeployment. - # p result - # - def update_hydrated_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest - - # Converts hash and nil to an 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_hydrated_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_hydrated_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_hydrated_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.update_hydrated_deployment request, 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 hydrated deployment to a workload cluster. - # - # @overload apply_hydrated_deployment(request, options = nil) - # Pass arguments to `apply_hydrated_deployment` via a request object, either of type - # {::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload apply_hydrated_deployment(name: nil) - # Pass arguments to `apply_hydrated_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 hydrated deployment to apply. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/telco_automation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest.new - # - # # Call the apply_hydrated_deployment method. - # result = client.apply_hydrated_deployment request - # - # # The returned object is of type Google::Cloud::TelcoAutomation::V1::HydratedDeployment. - # p result - # - def apply_hydrated_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.apply_hydrated_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.apply_hydrated_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.apply_hydrated_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @telco_automation_stub.apply_hydrated_deployment request, 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 TelcoAutomation REST API. - # - # This class represents the configuration for TelcoAutomation 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::TelcoAutomation::V1::TelcoAutomation::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_orchestration_clusters to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_orchestration_clusters.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_orchestration_clusters.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 = "telcoautomation.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 TelcoAutomation 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_orchestration_clusters` - # @return [::Gapic::Config::Method] - # - attr_reader :list_orchestration_clusters - ## - # RPC-specific configuration for `get_orchestration_cluster` - # @return [::Gapic::Config::Method] - # - attr_reader :get_orchestration_cluster - ## - # RPC-specific configuration for `create_orchestration_cluster` - # @return [::Gapic::Config::Method] - # - attr_reader :create_orchestration_cluster - ## - # RPC-specific configuration for `delete_orchestration_cluster` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_orchestration_cluster - ## - # RPC-specific configuration for `list_edge_slms` - # @return [::Gapic::Config::Method] - # - attr_reader :list_edge_slms - ## - # RPC-specific configuration for `get_edge_slm` - # @return [::Gapic::Config::Method] - # - attr_reader :get_edge_slm - ## - # RPC-specific configuration for `create_edge_slm` - # @return [::Gapic::Config::Method] - # - attr_reader :create_edge_slm - ## - # RPC-specific configuration for `delete_edge_slm` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_edge_slm - ## - # RPC-specific configuration for `create_blueprint` - # @return [::Gapic::Config::Method] - # - attr_reader :create_blueprint - ## - # RPC-specific configuration for `update_blueprint` - # @return [::Gapic::Config::Method] - # - attr_reader :update_blueprint - ## - # RPC-specific configuration for `get_blueprint` - # @return [::Gapic::Config::Method] - # - attr_reader :get_blueprint - ## - # RPC-specific configuration for `delete_blueprint` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_blueprint - ## - # RPC-specific configuration for `list_blueprints` - # @return [::Gapic::Config::Method] - # - attr_reader :list_blueprints - ## - # RPC-specific configuration for `approve_blueprint` - # @return [::Gapic::Config::Method] - # - attr_reader :approve_blueprint - ## - # RPC-specific configuration for `propose_blueprint` - # @return [::Gapic::Config::Method] - # - attr_reader :propose_blueprint - ## - # RPC-specific configuration for `reject_blueprint` - # @return [::Gapic::Config::Method] - # - attr_reader :reject_blueprint - ## - # RPC-specific configuration for `list_blueprint_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_blueprint_revisions - ## - # RPC-specific configuration for `search_blueprint_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :search_blueprint_revisions - ## - # RPC-specific configuration for `search_deployment_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :search_deployment_revisions - ## - # RPC-specific configuration for `discard_blueprint_changes` - # @return [::Gapic::Config::Method] - # - attr_reader :discard_blueprint_changes - ## - # RPC-specific configuration for `list_public_blueprints` - # @return [::Gapic::Config::Method] - # - attr_reader :list_public_blueprints - ## - # RPC-specific configuration for `get_public_blueprint` - # @return [::Gapic::Config::Method] - # - attr_reader :get_public_blueprint - ## - # RPC-specific configuration for `create_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_deployment - ## - # RPC-specific configuration for `update_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_deployment - ## - # RPC-specific configuration for `get_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_deployment - ## - # RPC-specific configuration for `remove_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :remove_deployment - ## - # RPC-specific configuration for `list_deployments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_deployments - ## - # RPC-specific configuration for `list_deployment_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_deployment_revisions - ## - # RPC-specific configuration for `discard_deployment_changes` - # @return [::Gapic::Config::Method] - # - attr_reader :discard_deployment_changes - ## - # RPC-specific configuration for `apply_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :apply_deployment - ## - # RPC-specific configuration for `compute_deployment_status` - # @return [::Gapic::Config::Method] - # - attr_reader :compute_deployment_status - ## - # RPC-specific configuration for `rollback_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :rollback_deployment - ## - # RPC-specific configuration for `get_hydrated_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_hydrated_deployment - ## - # RPC-specific configuration for `list_hydrated_deployments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_hydrated_deployments - ## - # RPC-specific configuration for `update_hydrated_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_hydrated_deployment - ## - # RPC-specific configuration for `apply_hydrated_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :apply_hydrated_deployment - - # @private - def initialize parent_rpcs = nil - list_orchestration_clusters_config = parent_rpcs.list_orchestration_clusters if parent_rpcs.respond_to? :list_orchestration_clusters - @list_orchestration_clusters = ::Gapic::Config::Method.new list_orchestration_clusters_config - get_orchestration_cluster_config = parent_rpcs.get_orchestration_cluster if parent_rpcs.respond_to? :get_orchestration_cluster - @get_orchestration_cluster = ::Gapic::Config::Method.new get_orchestration_cluster_config - create_orchestration_cluster_config = parent_rpcs.create_orchestration_cluster if parent_rpcs.respond_to? :create_orchestration_cluster - @create_orchestration_cluster = ::Gapic::Config::Method.new create_orchestration_cluster_config - delete_orchestration_cluster_config = parent_rpcs.delete_orchestration_cluster if parent_rpcs.respond_to? :delete_orchestration_cluster - @delete_orchestration_cluster = ::Gapic::Config::Method.new delete_orchestration_cluster_config - list_edge_slms_config = parent_rpcs.list_edge_slms if parent_rpcs.respond_to? :list_edge_slms - @list_edge_slms = ::Gapic::Config::Method.new list_edge_slms_config - get_edge_slm_config = parent_rpcs.get_edge_slm if parent_rpcs.respond_to? :get_edge_slm - @get_edge_slm = ::Gapic::Config::Method.new get_edge_slm_config - create_edge_slm_config = parent_rpcs.create_edge_slm if parent_rpcs.respond_to? :create_edge_slm - @create_edge_slm = ::Gapic::Config::Method.new create_edge_slm_config - delete_edge_slm_config = parent_rpcs.delete_edge_slm if parent_rpcs.respond_to? :delete_edge_slm - @delete_edge_slm = ::Gapic::Config::Method.new delete_edge_slm_config - create_blueprint_config = parent_rpcs.create_blueprint if parent_rpcs.respond_to? :create_blueprint - @create_blueprint = ::Gapic::Config::Method.new create_blueprint_config - update_blueprint_config = parent_rpcs.update_blueprint if parent_rpcs.respond_to? :update_blueprint - @update_blueprint = ::Gapic::Config::Method.new update_blueprint_config - get_blueprint_config = parent_rpcs.get_blueprint if parent_rpcs.respond_to? :get_blueprint - @get_blueprint = ::Gapic::Config::Method.new get_blueprint_config - delete_blueprint_config = parent_rpcs.delete_blueprint if parent_rpcs.respond_to? :delete_blueprint - @delete_blueprint = ::Gapic::Config::Method.new delete_blueprint_config - list_blueprints_config = parent_rpcs.list_blueprints if parent_rpcs.respond_to? :list_blueprints - @list_blueprints = ::Gapic::Config::Method.new list_blueprints_config - approve_blueprint_config = parent_rpcs.approve_blueprint if parent_rpcs.respond_to? :approve_blueprint - @approve_blueprint = ::Gapic::Config::Method.new approve_blueprint_config - propose_blueprint_config = parent_rpcs.propose_blueprint if parent_rpcs.respond_to? :propose_blueprint - @propose_blueprint = ::Gapic::Config::Method.new propose_blueprint_config - reject_blueprint_config = parent_rpcs.reject_blueprint if parent_rpcs.respond_to? :reject_blueprint - @reject_blueprint = ::Gapic::Config::Method.new reject_blueprint_config - list_blueprint_revisions_config = parent_rpcs.list_blueprint_revisions if parent_rpcs.respond_to? :list_blueprint_revisions - @list_blueprint_revisions = ::Gapic::Config::Method.new list_blueprint_revisions_config - search_blueprint_revisions_config = parent_rpcs.search_blueprint_revisions if parent_rpcs.respond_to? :search_blueprint_revisions - @search_blueprint_revisions = ::Gapic::Config::Method.new search_blueprint_revisions_config - search_deployment_revisions_config = parent_rpcs.search_deployment_revisions if parent_rpcs.respond_to? :search_deployment_revisions - @search_deployment_revisions = ::Gapic::Config::Method.new search_deployment_revisions_config - discard_blueprint_changes_config = parent_rpcs.discard_blueprint_changes if parent_rpcs.respond_to? :discard_blueprint_changes - @discard_blueprint_changes = ::Gapic::Config::Method.new discard_blueprint_changes_config - list_public_blueprints_config = parent_rpcs.list_public_blueprints if parent_rpcs.respond_to? :list_public_blueprints - @list_public_blueprints = ::Gapic::Config::Method.new list_public_blueprints_config - get_public_blueprint_config = parent_rpcs.get_public_blueprint if parent_rpcs.respond_to? :get_public_blueprint - @get_public_blueprint = ::Gapic::Config::Method.new get_public_blueprint_config - create_deployment_config = parent_rpcs.create_deployment if parent_rpcs.respond_to? :create_deployment - @create_deployment = ::Gapic::Config::Method.new create_deployment_config - update_deployment_config = parent_rpcs.update_deployment if parent_rpcs.respond_to? :update_deployment - @update_deployment = ::Gapic::Config::Method.new update_deployment_config - get_deployment_config = parent_rpcs.get_deployment if parent_rpcs.respond_to? :get_deployment - @get_deployment = ::Gapic::Config::Method.new get_deployment_config - remove_deployment_config = parent_rpcs.remove_deployment if parent_rpcs.respond_to? :remove_deployment - @remove_deployment = ::Gapic::Config::Method.new remove_deployment_config - list_deployments_config = parent_rpcs.list_deployments if parent_rpcs.respond_to? :list_deployments - @list_deployments = ::Gapic::Config::Method.new list_deployments_config - list_deployment_revisions_config = parent_rpcs.list_deployment_revisions if parent_rpcs.respond_to? :list_deployment_revisions - @list_deployment_revisions = ::Gapic::Config::Method.new list_deployment_revisions_config - discard_deployment_changes_config = parent_rpcs.discard_deployment_changes if parent_rpcs.respond_to? :discard_deployment_changes - @discard_deployment_changes = ::Gapic::Config::Method.new discard_deployment_changes_config - apply_deployment_config = parent_rpcs.apply_deployment if parent_rpcs.respond_to? :apply_deployment - @apply_deployment = ::Gapic::Config::Method.new apply_deployment_config - compute_deployment_status_config = parent_rpcs.compute_deployment_status if parent_rpcs.respond_to? :compute_deployment_status - @compute_deployment_status = ::Gapic::Config::Method.new compute_deployment_status_config - rollback_deployment_config = parent_rpcs.rollback_deployment if parent_rpcs.respond_to? :rollback_deployment - @rollback_deployment = ::Gapic::Config::Method.new rollback_deployment_config - get_hydrated_deployment_config = parent_rpcs.get_hydrated_deployment if parent_rpcs.respond_to? :get_hydrated_deployment - @get_hydrated_deployment = ::Gapic::Config::Method.new get_hydrated_deployment_config - list_hydrated_deployments_config = parent_rpcs.list_hydrated_deployments if parent_rpcs.respond_to? :list_hydrated_deployments - @list_hydrated_deployments = ::Gapic::Config::Method.new list_hydrated_deployments_config - update_hydrated_deployment_config = parent_rpcs.update_hydrated_deployment if parent_rpcs.respond_to? :update_hydrated_deployment - @update_hydrated_deployment = ::Gapic::Config::Method.new update_hydrated_deployment_config - apply_hydrated_deployment_config = parent_rpcs.apply_hydrated_deployment if parent_rpcs.respond_to? :apply_hydrated_deployment - @apply_hydrated_deployment = ::Gapic::Config::Method.new apply_hydrated_deployment_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest/operations.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest/operations.rb deleted file mode 100644 index 6d9d6798af44..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/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 TelcoAutomation - module V1 - module TelcoAutomation - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "telcoautomation.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the TelcoAutomation 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 TelcoAutomation 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::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::TelcoAutomation::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "telcoautomation.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}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/?$}, 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-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest/service_stub.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest/service_stub.rb deleted file mode 100644 index a3585b11399f..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/telco_automation/rest/service_stub.rb +++ /dev/null @@ -1,2293 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/telcoautomation/v1/telcoautomation_pb" - -module Google - module Cloud - module TelcoAutomation - module V1 - module TelcoAutomation - module Rest - ## - # REST service stub for the TelcoAutomation 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_orchestration_clusters REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersResponse] - # A result object deserialized from the server's reply - def list_orchestration_clusters request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_orchestration_clusters_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_orchestration_clusters", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersResponse.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_orchestration_cluster REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster] - # A result object deserialized from the server's reply - def get_orchestration_cluster request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_orchestration_cluster_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_orchestration_cluster", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster.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_orchestration_cluster REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_orchestration_cluster request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_orchestration_cluster_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_orchestration_cluster", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_orchestration_cluster REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_orchestration_cluster request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_orchestration_cluster_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_orchestration_cluster", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_edge_slms REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsResponse] - # A result object deserialized from the server's reply - def list_edge_slms request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_edge_slms_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_edge_slms", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsResponse.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_edge_slm REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::EdgeSlm] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::EdgeSlm] - # A result object deserialized from the server's reply - def get_edge_slm request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_edge_slm_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_edge_slm", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::EdgeSlm.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_edge_slm REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_edge_slm request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_edge_slm_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_edge_slm", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_edge_slm REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_edge_slm request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_edge_slm_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_edge_slm", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_blueprint REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # A result object deserialized from the server's reply - def create_blueprint request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_blueprint_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_blueprint", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::Blueprint.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_blueprint REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # A result object deserialized from the server's reply - def update_blueprint request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_blueprint_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_blueprint", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::Blueprint.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_blueprint REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # A result object deserialized from the server's reply - def get_blueprint request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_blueprint_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_blueprint", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::Blueprint.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_blueprint REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_blueprint request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_blueprint_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_blueprint", - 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 list_blueprints REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::ListBlueprintsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::ListBlueprintsResponse] - # A result object deserialized from the server's reply - def list_blueprints request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_blueprints_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_blueprints", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::ListBlueprintsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the approve_blueprint REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # A result object deserialized from the server's reply - def approve_blueprint request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_approve_blueprint_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "approve_blueprint", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::Blueprint.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the propose_blueprint REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # A result object deserialized from the server's reply - def propose_blueprint request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_propose_blueprint_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "propose_blueprint", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::Blueprint.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the reject_blueprint REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # A result object deserialized from the server's reply - def reject_blueprint request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_reject_blueprint_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "reject_blueprint", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::Blueprint.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_blueprint_revisions REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsResponse] - # A result object deserialized from the server's reply - def list_blueprint_revisions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_blueprint_revisions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_blueprint_revisions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the search_blueprint_revisions REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsResponse] - # A result object deserialized from the server's reply - def search_blueprint_revisions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_blueprint_revisions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "search_blueprint_revisions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the search_deployment_revisions REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsResponse] - # A result object deserialized from the server's reply - def search_deployment_revisions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_deployment_revisions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "search_deployment_revisions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the discard_blueprint_changes REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse] - # A result object deserialized from the server's reply - def discard_blueprint_changes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_discard_blueprint_changes_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "discard_blueprint_changes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse.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_public_blueprints REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsResponse] - # A result object deserialized from the server's reply - def list_public_blueprints request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_public_blueprints_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_public_blueprints", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsResponse.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_public_blueprint REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::PublicBlueprint] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::PublicBlueprint] - # A result object deserialized from the server's reply - def get_public_blueprint request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_public_blueprint_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_public_blueprint", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::PublicBlueprint.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_deployment REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Deployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] - # A result object deserialized from the server's reply - def create_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::Deployment.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_deployment REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Deployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] - # A result object deserialized from the server's reply - def update_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::Deployment.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_deployment REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Deployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] - # A result object deserialized from the server's reply - def get_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::Deployment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the remove_deployment REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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 remove_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_remove_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "remove_deployment", - 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 list_deployments REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::ListDeploymentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::ListDeploymentsResponse] - # A result object deserialized from the server's reply - def list_deployments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_deployments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_deployments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::ListDeploymentsResponse.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_deployment_revisions REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsResponse] - # A result object deserialized from the server's reply - def list_deployment_revisions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_deployment_revisions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_deployment_revisions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the discard_deployment_changes REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse] - # A result object deserialized from the server's reply - def discard_deployment_changes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_discard_deployment_changes_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "discard_deployment_changes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the apply_deployment REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Deployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] - # A result object deserialized from the server's reply - def apply_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_apply_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "apply_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::Deployment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the compute_deployment_status REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse] - # A result object deserialized from the server's reply - def compute_deployment_status request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_compute_deployment_status_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "compute_deployment_status", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse.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_deployment REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::Deployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] - # A result object deserialized from the server's reply - def rollback_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_rollback_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::Deployment.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_hydrated_deployment REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] - # A result object deserialized from the server's reply - def get_hydrated_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_hydrated_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_hydrated_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment.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_hydrated_deployments REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsResponse] - # A result object deserialized from the server's reply - def list_hydrated_deployments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_hydrated_deployments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_hydrated_deployments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsResponse.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_hydrated_deployment REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] - # A result object deserialized from the server's reply - def update_hydrated_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_hydrated_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_hydrated_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the apply_hydrated_deployment REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] - # A result object deserialized from the server's reply - def apply_hydrated_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_apply_hydrated_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "apply_hydrated_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment.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_orchestration_clusters REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_orchestration_clusters_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/orchestrationClusters", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_orchestration_cluster REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_orchestration_cluster_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_orchestration_cluster REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest] - # 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_orchestration_cluster_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/orchestrationClusters", - body: "orchestration_cluster", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_orchestration_cluster REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest] - # 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_orchestration_cluster_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_edge_slms REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_edge_slms_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/edgeSlms", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_edge_slm REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_edge_slm_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/edgeSlms/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_edge_slm REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest] - # 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_edge_slm_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/edgeSlms", - body: "edge_slm", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_edge_slm REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest] - # 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_edge_slm_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/edgeSlms/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_blueprint REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest] - # 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_blueprint_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/blueprints", - body: "blueprint", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_blueprint REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest] - # 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_blueprint_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{blueprint.name}", - body: "blueprint", - matches: [ - ["blueprint.name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/blueprints/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_blueprint REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_blueprint_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/blueprints/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_blueprint REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest] - # 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_blueprint_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/blueprints/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_blueprints REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_blueprints_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/blueprints", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the approve_blueprint REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_approve_blueprint_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:approve", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/blueprints/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the propose_blueprint REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_propose_blueprint_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:propose", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/blueprints/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the reject_blueprint REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_reject_blueprint_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:reject", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/blueprints/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_blueprint_revisions REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_blueprint_revisions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:listRevisions", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/blueprints/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_blueprint_revisions REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_search_blueprint_revisions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/blueprints:searchRevisions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_deployment_revisions REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_search_deployment_revisions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/deployments:searchRevisions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the discard_blueprint_changes REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_discard_blueprint_changes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:discard", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/blueprints/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_public_blueprints REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_public_blueprints_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/publicBlueprints", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_public_blueprint REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_public_blueprint_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/publicBlueprints/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_deployment REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest] - # 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_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/deployments", - body: "deployment", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_deployment REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest] - # 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_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{deployment.name}", - body: "deployment", - matches: [ - ["deployment.name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_deployment REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the remove_deployment REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_remove_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:remove", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_deployments REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_deployments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/deployments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_deployment_revisions REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_deployment_revisions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:listRevisions", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the discard_deployment_changes REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_discard_deployment_changes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:discard", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the apply_deployment REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_apply_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:apply", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the compute_deployment_status REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_compute_deployment_status_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:computeDeploymentStatus", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the rollback_deployment REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest] - # 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_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:rollback", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_hydrated_deployment REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_hydrated_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/deployments/[^/]+/hydratedDeployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_hydrated_deployments REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_hydrated_deployments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/hydratedDeployments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_hydrated_deployment REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest] - # 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_hydrated_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{hydrated_deployment.name}", - body: "hydrated_deployment", - matches: [ - ["hydrated_deployment.name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/deployments/[^/]+/hydratedDeployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the apply_hydrated_deployment REST call - # - # @param request_pb [::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_apply_hydrated_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:apply", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orchestrationClusters/[^/]+/deployments/[^/]+/hydratedDeployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/version.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/v1/version.rb deleted file mode 100644 index c881f2cf866a..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telco_automation/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 TelcoAutomation - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telcoautomation/v1/telcoautomation_pb.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telcoautomation/v1/telcoautomation_pb.rb deleted file mode 100644 index 0b6473c43f4f..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telcoautomation/v1/telcoautomation_pb.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/telcoautomation/v1/telcoautomation.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/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n5google/cloud/telcoautomation/v1/telcoautomation.proto\x12\x1fgoogle.cloud.telcoautomation.v1\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\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb2\x05\n\x14OrchestrationCluster\x12\x0c\n\x04name\x18\x01 \x01(\t\x12L\n\x11management_config\x18\x05 \x01(\x0b\x32\x31.google.cloud.telcoautomation.v1.ManagementConfig\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\x41.google.cloud.telcoautomation.v1.OrchestrationCluster.LabelsEntry\x12\x18\n\x0btna_version\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12O\n\x05state\x18\x07 \x01(\x0e\x32;.google.cloud.telcoautomation.v1.OrchestrationCluster.StateB\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\"R\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\x0c\n\x08\x44\x45LETING\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04:\x90\x01\xea\x41\x8c\x01\n3telcoautomation.googleapis.com/OrchestrationCluster\x12Uprojects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}\"\xbb\x06\n\x07\x45\x64geSlm\x12\x0c\n\x04name\x18\x01 \x01(\t\x12Z\n\x15orchestration_cluster\x18\x05 \x01(\tB;\xe0\x41\x05\xfa\x41\x35\n3telcoautomation.googleapis.com/OrchestrationCluster\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\x12I\n\x06labels\x18\x04 \x03(\x0b\x32\x34.google.cloud.telcoautomation.v1.EdgeSlm.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0btna_version\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x42\n\x05state\x18\x07 \x01(\x0e\x32..google.cloud.telcoautomation.v1.EdgeSlm.StateB\x03\xe0\x41\x03\x12`\n\x15workload_cluster_type\x18\x08 \x01(\x0e\x32<.google.cloud.telcoautomation.v1.EdgeSlm.WorkloadClusterTypeB\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\"R\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\x0c\n\x08\x44\x45LETING\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\"O\n\x13WorkloadClusterType\x12%\n!WORKLOAD_CLUSTER_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04GDCE\x10\x01\x12\x07\n\x03GKE\x10\x02:{\xea\x41x\n&telcoautomation.googleapis.com/EdgeSlm\x12;projects/{project}/locations/{location}/edgeSlms/{edge_slm}*\x08\x65\x64geSlms2\x07\x65\x64geSlm\"\xe1\x07\n\tBlueprint\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1b\n\x0brevision_id\x18\x02 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x03\x12 \n\x10source_blueprint\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12=\n\x14revision_create_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12U\n\x0e\x61pproval_state\x18\x06 \x01(\x0e\x32\x38.google.cloud.telcoautomation.v1.Blueprint.ApprovalStateB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nrepository\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x39\n\x05\x66iles\x18\t \x03(\x0b\x32%.google.cloud.telcoautomation.v1.FileB\x03\xe0\x41\x01\x12K\n\x06labels\x18\n \x03(\x0b\x32\x36.google.cloud.telcoautomation.v1.Blueprint.LabelsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x0fsource_provider\x18\r \x01(\tB\x03\xe0\x41\x03\x12O\n\x10\x64\x65ployment_level\x18\x0e \x01(\x0e\x32\x30.google.cloud.telcoautomation.v1.DeploymentLevelB\x03\xe0\x41\x03\x12\x1d\n\x10rollback_support\x18\x0f \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\"V\n\rApprovalState\x12\x1e\n\x1a\x41PPROVAL_STATE_UNSPECIFIED\x10\x00\x12\t\n\x05\x44RAFT\x10\x01\x12\x0c\n\x08PROPOSED\x10\x02\x12\x0c\n\x08\x41PPROVED\x10\x03:\xb3\x01\xea\x41\xaf\x01\n(telcoautomation.googleapis.com/Blueprint\x12lprojects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/blueprints/{blueprint}*\nblueprints2\tblueprint\"\xf4\x02\n\x0fPublicBlueprint\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12J\n\x10\x64\x65ployment_level\x18\x04 \x01(\x0e\x32\x30.google.cloud.telcoautomation.v1.DeploymentLevel\x12\x17\n\x0fsource_provider\x18\x05 \x01(\t\x12\x1d\n\x10rollback_support\x18\x0f \x01(\x08\x42\x03\xe0\x41\x03:\xa3\x01\xea\x41\x9f\x01\n.telcoautomation.googleapis.com/PublicBlueprint\x12Jprojects/{project}/locations/{location}/publicBlueprints/{public_lueprint}*\x10publicBlueprints2\x0fpublicBlueprint\"\xee\x07\n\nDeployment\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1b\n\x0brevision_id\x18\x02 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x03\x12&\n\x19source_blueprint_revision\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12=\n\x14revision_create_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x45\n\x05state\x18\x05 \x01(\x0e\x32\x31.google.cloud.telcoautomation.v1.Deployment.StateB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nrepository\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x39\n\x05\x66iles\x18\x08 \x03(\x0b\x32%.google.cloud.telcoautomation.v1.FileB\x03\xe0\x41\x01\x12L\n\x06labels\x18\t \x03(\x0b\x32\x37.google.cloud.telcoautomation.v1.Deployment.LabelsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x0fsource_provider\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12 \n\x10workload_cluster\x18\r \x01(\tB\x06\xe0\x41\x05\xe0\x41\x01\x12O\n\x10\x64\x65ployment_level\x18\x0e \x01(\x0e\x32\x30.google.cloud.telcoautomation.v1.DeploymentLevelB\x03\xe0\x41\x03\x12\x1d\n\x10rollback_support\x18\x0f \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\"D\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05\x44RAFT\x10\x01\x12\x0b\n\x07\x41PPLIED\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03:\xb8\x01\xea\x41\xb4\x01\n)telcoautomation.googleapis.com/Deployment\x12nprojects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/deployments/{deployment}*\x0b\x64\x65ployments2\ndeployment\"\x86\x04\n\x12HydratedDeployment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12M\n\x05state\x18\x02 \x01(\x0e\x32\x39.google.cloud.telcoautomation.v1.HydratedDeployment.StateB\x03\xe0\x41\x03\x12\x39\n\x05\x66iles\x18\x03 \x03(\x0b\x32%.google.cloud.telcoautomation.v1.FileB\x03\xe0\x41\x01\x12\x1d\n\x10workload_cluster\x18\x04 \x01(\tB\x03\xe0\x41\x03\"6\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05\x44RAFT\x10\x01\x12\x0b\n\x07\x41PPLIED\x10\x02:\xfb\x01\xea\x41\xf7\x01\n1telcoautomation.googleapis.com/HydratedDeployment\x12\x98\x01projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/deployments/{deployment}/hydratedDeployments/{hydrated_deployment}*\x13hydratedDeployments2\x12hydratedDeployment\"\xb8\x01\n ListOrchestrationClustersRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33telcoautomation.googleapis.com/OrchestrationCluster\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\"\xa8\x01\n!ListOrchestrationClustersResponse\x12U\n\x16orchestration_clusters\x18\x01 \x03(\x0b\x32\x35.google.cloud.telcoautomation.v1.OrchestrationCluster\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"k\n\x1eGetOrchestrationClusterRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3telcoautomation.googleapis.com/OrchestrationCluster\"\x8b\x02\n!CreateOrchestrationClusterRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33telcoautomation.googleapis.com/OrchestrationCluster\x12%\n\x18orchestration_cluster_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Y\n\x15orchestration_cluster\x18\x03 \x01(\x0b\x32\x35.google.cloud.telcoautomation.v1.OrchestrationClusterB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x87\x01\n!DeleteOrchestrationClusterRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3telcoautomation.googleapis.com/OrchestrationCluster\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x9e\x01\n\x13ListEdgeSlmsRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&telcoautomation.googleapis.com/EdgeSlm\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\"\x81\x01\n\x14ListEdgeSlmsResponse\x12;\n\tedge_slms\x18\x01 \x03(\x0b\x32(.google.cloud.telcoautomation.v1.EdgeSlm\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"Q\n\x11GetEdgeSlmRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&telcoautomation.googleapis.com/EdgeSlm\"\xca\x01\n\x14\x43reateEdgeSlmRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&telcoautomation.googleapis.com/EdgeSlm\x12\x18\n\x0b\x65\x64ge_slm_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12?\n\x08\x65\x64ge_slm\x18\x03 \x01(\x0b\x32(.google.cloud.telcoautomation.v1.EdgeSlmB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"m\n\x14\x44\x65leteEdgeSlmRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&telcoautomation.googleapis.com/EdgeSlm\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb9\x01\n\x16\x43reateBlueprintRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(telcoautomation.googleapis.com/Blueprint\x12\x19\n\x0c\x62lueprint_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x42\n\tblueprint\x18\x03 \x01(\x0b\x32*.google.cloud.telcoautomation.v1.BlueprintB\x03\xe0\x41\x02\"\x92\x01\n\x16UpdateBlueprintRequest\x12\x42\n\tblueprint\x18\x01 \x01(\x0b\x32*.google.cloud.telcoautomation.v1.BlueprintB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x98\x01\n\x13GetBlueprintRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(telcoautomation.googleapis.com/Blueprint\x12\x41\n\x04view\x18\x02 \x01(\x0e\x32..google.cloud.telcoautomation.v1.BlueprintViewB\x03\xe0\x41\x01\"X\n\x16\x44\x65leteBlueprintRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(telcoautomation.googleapis.com/Blueprint\"\x9f\x01\n\x15ListBlueprintsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(telcoautomation.googleapis.com/Blueprint\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"q\n\x16ListBlueprintsResponse\x12>\n\nblueprints\x18\x01 \x03(\x0b\x32*.google.cloud.telcoautomation.v1.Blueprint\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Y\n\x17\x41pproveBlueprintRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(telcoautomation.googleapis.com/Blueprint\"Y\n\x17ProposeBlueprintRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(telcoautomation.googleapis.com/Blueprint\"X\n\x16RejectBlueprintRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(telcoautomation.googleapis.com/Blueprint\"\x86\x01\n\x1dListBlueprintRevisionsRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(telcoautomation.googleapis.com/Blueprint\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"y\n\x1eListBlueprintRevisionsResponse\x12>\n\nblueprints\x18\x01 \x03(\x0b\x32*.google.cloud.telcoautomation.v1.Blueprint\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa8\x01\n\x1fSearchBlueprintRevisionsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(telcoautomation.googleapis.com/Blueprint\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"{\n SearchBlueprintRevisionsResponse\x12>\n\nblueprints\x18\x01 \x03(\x0b\x32*.google.cloud.telcoautomation.v1.Blueprint\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"`\n\x1e\x44iscardBlueprintChangesRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(telcoautomation.googleapis.com/Blueprint\"!\n\x1f\x44iscardBlueprintChangesResponse\"\x96\x01\n\x1bListPublicBlueprintsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.telcoautomation.googleapis.com/PublicBlueprint\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x89\x01\n\x1cListPublicBlueprintsResponse\x12K\n\x11public_blueprints\x18\x01 \x03(\x0b\x32\x30.google.cloud.telcoautomation.v1.PublicBlueprint\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"a\n\x19GetPublicBlueprintRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.telcoautomation.googleapis.com/PublicBlueprint\"\xbe\x01\n\x17\x43reateDeploymentRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)telcoautomation.googleapis.com/Deployment\x12\x1a\n\rdeployment_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\ndeployment\x18\x03 \x01(\x0b\x32+.google.cloud.telcoautomation.v1.DeploymentB\x03\xe0\x41\x02\"\x95\x01\n\x17UpdateDeploymentRequest\x12\x44\n\ndeployment\x18\x01 \x01(\x0b\x32+.google.cloud.telcoautomation.v1.DeploymentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x9b\x01\n\x14GetDeploymentRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)telcoautomation.googleapis.com/Deployment\x12\x42\n\x04view\x18\x02 \x01(\x0e\x32/.google.cloud.telcoautomation.v1.DeploymentViewB\x03\xe0\x41\x01\"Z\n\x17RemoveDeploymentRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)telcoautomation.googleapis.com/Deployment\"\xa1\x01\n\x16ListDeploymentsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)telcoautomation.googleapis.com/Deployment\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"t\n\x17ListDeploymentsResponse\x12@\n\x0b\x64\x65ployments\x18\x01 \x03(\x0b\x32+.google.cloud.telcoautomation.v1.Deployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x92\x01\n\x1eListDeploymentRevisionsRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)telcoautomation.googleapis.com/Deployment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"|\n\x1fListDeploymentRevisionsResponse\x12@\n\x0b\x64\x65ployments\x18\x01 \x03(\x0b\x32+.google.cloud.telcoautomation.v1.Deployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa9\x01\n SearchDeploymentRevisionsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(telcoautomation.googleapis.com/Blueprint\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"~\n!SearchDeploymentRevisionsResponse\x12@\n\x0b\x64\x65ployments\x18\x01 \x03(\x0b\x32+.google.cloud.telcoautomation.v1.Deployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"b\n\x1f\x44iscardDeploymentChangesRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)telcoautomation.googleapis.com/Deployment\"\"\n DiscardDeploymentChangesResponse\"Y\n\x16\x41pplyDeploymentRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)telcoautomation.googleapis.com/Deployment\"a\n\x1e\x43omputeDeploymentStatusRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)telcoautomation.googleapis.com/Deployment\"\xc9\x01\n\x1f\x43omputeDeploymentStatusResponse\x12\x0c\n\x04name\x18\x01 \x01(\t\x12G\n\x11\x61ggregated_status\x18\x02 \x01(\x0e\x32\'.google.cloud.telcoautomation.v1.StatusB\x03\xe0\x41\x03\x12O\n\x11resource_statuses\x18\x03 \x03(\x0b\x32/.google.cloud.telcoautomation.v1.ResourceStatusB\x03\xe0\x41\x03\"v\n\x19RollbackDeploymentRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)telcoautomation.googleapis.com/Deployment\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\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\"g\n\x1cGetHydratedDeploymentRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1telcoautomation.googleapis.com/HydratedDeployment\"\x9c\x01\n\x1eListHydratedDeploymentsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31telcoautomation.googleapis.com/HydratedDeployment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n\x1fListHydratedDeploymentsResponse\x12Q\n\x14hydrated_deployments\x18\x01 \x03(\x0b\x32\x33.google.cloud.telcoautomation.v1.HydratedDeployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xae\x01\n\x1fUpdateHydratedDeploymentRequest\x12U\n\x13hydrated_deployment\x18\x01 \x01(\x0b\x32\x33.google.cloud.telcoautomation.v1.HydratedDeploymentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"i\n\x1e\x41pplyHydratedDeploymentRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1telcoautomation.googleapis.com/HydratedDeployment\"\xdc\x01\n\x10ManagementConfig\x12_\n\x1astandard_management_config\x18\x01 \x01(\x0b\x32\x39.google.cloud.telcoautomation.v1.StandardManagementConfigH\x00\x12W\n\x16\x66ull_management_config\x18\x02 \x01(\x0b\x32\x35.google.cloud.telcoautomation.v1.FullManagementConfigH\x00\x42\x0e\n\x0coneof_config\"\xe3\x02\n\x18StandardManagementConfig\x12\x14\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06subnet\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16master_ipv4_cidr_block\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12\x63luster_cidr_block\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13services_cidr_block\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13\x63luster_named_range\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14services_named_range\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12o\n!master_authorized_networks_config\x18\x08 \x01(\x0b\x32?.google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfigB\x03\xe0\x41\x01\"\xdf\x02\n\x14\x46ullManagementConfig\x12\x14\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06subnet\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16master_ipv4_cidr_block\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12\x63luster_cidr_block\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13services_cidr_block\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13\x63luster_named_range\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14services_named_range\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12o\n!master_authorized_networks_config\x18\x08 \x01(\x0b\x32?.google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfigB\x03\xe0\x41\x01\"\xc6\x01\n\x1eMasterAuthorizedNetworksConfig\x12\x63\n\x0b\x63idr_blocks\x18\x01 \x03(\x0b\x32I.google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig.CidrBlockB\x03\xe0\x41\x01\x1a?\n\tCidrBlock\x12\x19\n\x0c\x64isplay_name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\ncidr_block\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\\\n\x04\x46ile\x12\x11\n\x04path\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07\x63ontent\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x64\x65leted\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x15\n\x08\x65\x64itable\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xc1\x02\n\x0eResourceStatus\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\x12resource_namespace\x18\x02 \x01(\t\x12\r\n\x05group\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\t\x12\x0c\n\x04kind\x18\x05 \x01(\t\x12I\n\rresource_type\x18\x06 \x01(\x0e\x32-.google.cloud.telcoautomation.v1.ResourceTypeB\x03\xe0\x41\x03\x12<\n\x06status\x18\x07 \x01(\x0e\x32\'.google.cloud.telcoautomation.v1.StatusB\x03\xe0\x41\x03\x12N\n\x10nf_deploy_status\x18\x08 \x01(\x0b\x32/.google.cloud.telcoautomation.v1.NFDeployStatusB\x03\xe0\x41\x03\"\x8c\x01\n\x0eNFDeployStatus\x12\x19\n\x0ctargeted_nfs\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x16\n\tready_nfs\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12G\n\x05sites\x18\x03 \x03(\x0b\x32\x33.google.cloud.telcoautomation.v1.NFDeploySiteStatusB\x03\xe0\x41\x03\"\xd8\x01\n\x12NFDeploySiteStatus\x12\x11\n\x04site\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10pending_deletion\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x12H\n\thydration\x18\x03 \x01(\x0b\x32\x30.google.cloud.telcoautomation.v1.HydrationStatusB\x03\xe0\x41\x03\x12\x46\n\x08workload\x18\x04 \x01(\x0b\x32/.google.cloud.telcoautomation.v1.WorkloadStatusB\x03\xe0\x41\x03\"o\n\x0fHydrationStatus\x12G\n\x0csite_version\x18\x01 \x01(\x0b\x32,.google.cloud.telcoautomation.v1.SiteVersionB\x03\xe0\x41\x03\x12\x13\n\x06status\x18\x02 \x01(\tB\x03\xe0\x41\x03\"T\n\x0bSiteVersion\x12\x16\n\tnf_vendor\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07nf_type\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nnf_version\x18\x03 \x01(\tB\x03\xe0\x41\x03\"n\n\x0eWorkloadStatus\x12G\n\x0csite_version\x18\x01 \x01(\x0b\x32,.google.cloud.telcoautomation.v1.SiteVersionB\x03\xe0\x41\x03\x12\x13\n\x06status\x18\x02 \x01(\tB\x03\xe0\x41\x03*b\n\rBlueprintView\x12\x1e\n\x1a\x42LUEPRINT_VIEW_UNSPECIFIED\x10\x00\x12\x18\n\x14\x42LUEPRINT_VIEW_BASIC\x10\x01\x12\x17\n\x13\x42LUEPRINT_VIEW_FULL\x10\x02*f\n\x0e\x44\x65ploymentView\x12\x1f\n\x1b\x44\x45PLOYMENT_VIEW_UNSPECIFIED\x10\x00\x12\x19\n\x15\x44\x45PLOYMENT_VIEW_BASIC\x10\x01\x12\x18\n\x14\x44\x45PLOYMENT_VIEW_FULL\x10\x02*^\n\x0cResourceType\x12\x1d\n\x19RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12NF_DEPLOY_RESOURCE\x10\x01\x12\x17\n\x13\x44\x45PLOYMENT_RESOURCE\x10\x02*\xb6\x01\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x16\n\x12STATUS_IN_PROGRESS\x10\x01\x12\x11\n\rSTATUS_ACTIVE\x10\x02\x12\x11\n\rSTATUS_FAILED\x10\x03\x12\x13\n\x0fSTATUS_DELETING\x10\x04\x12\x12\n\x0eSTATUS_DELETED\x10\x05\x12\x12\n\x0eSTATUS_PEERING\x10\n\x12\x19\n\x15STATUS_NOT_APPLICABLE\x10\x0b*\x90\x01\n\x0f\x44\x65ploymentLevel\x12 \n\x1c\x44\x45PLOYMENT_LEVEL_UNSPECIFIED\x10\x00\x12\r\n\tHYDRATION\x10\x01\x12\x15\n\x11SINGLE_DEPLOYMENT\x10\x02\x12\x14\n\x10MULTI_DEPLOYMENT\x10\x03\x12\x1f\n\x1bWORKLOAD_CLUSTER_DEPLOYMENT\x10\x04\x32\xec\x43\n\x0fTelcoAutomation\x12\xee\x01\n\x19ListOrchestrationClusters\x12\x41.google.cloud.telcoautomation.v1.ListOrchestrationClustersRequest\x1a\x42.google.cloud.telcoautomation.v1.ListOrchestrationClustersResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*}/orchestrationClusters\x12\xdb\x01\n\x17GetOrchestrationCluster\x12?.google.cloud.telcoautomation.v1.GetOrchestrationClusterRequest\x1a\x35.google.cloud.telcoautomation.v1.OrchestrationCluster\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/orchestrationClusters/*}\x12\xbe\x02\n\x1a\x43reateOrchestrationCluster\x12\x42.google.cloud.telcoautomation.v1.CreateOrchestrationClusterRequest\x1a\x1d.google.longrunning.Operation\"\xbc\x01\xca\x41)\n\x14OrchestrationCluster\x12\x11OperationMetadata\xda\x41\x35parent,orchestration_cluster,orchestration_cluster_id\x82\xd3\xe4\x93\x02R\"9/v1/{parent=projects/*/locations/*}/orchestrationClusters:\x15orchestration_cluster\x12\xf6\x01\n\x1a\x44\x65leteOrchestrationCluster\x12\x42.google.cloud.telcoautomation.v1.DeleteOrchestrationClusterRequest\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/*/orchestrationClusters/*}\x12\xba\x01\n\x0cListEdgeSlms\x12\x34.google.cloud.telcoautomation.v1.ListEdgeSlmsRequest\x1a\x35.google.cloud.telcoautomation.v1.ListEdgeSlmsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/edgeSlms\x12\xa7\x01\n\nGetEdgeSlm\x12\x32.google.cloud.telcoautomation.v1.GetEdgeSlmRequest\x1a(.google.cloud.telcoautomation.v1.EdgeSlm\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/edgeSlms/*}\x12\xe2\x01\n\rCreateEdgeSlm\x12\x35.google.cloud.telcoautomation.v1.CreateEdgeSlmRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41\x1c\n\x07\x45\x64geSlm\x12\x11OperationMetadata\xda\x41\x1bparent,edge_slm,edge_slm_id\x82\xd3\xe4\x93\x02\x38\",/v1/{parent=projects/*/locations/*}/edgeSlms:\x08\x65\x64ge_slm\x12\xcf\x01\n\rDeleteEdgeSlm\x12\x35.google.cloud.telcoautomation.v1.DeleteEdgeSlmRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/edgeSlms/*}\x12\xf1\x01\n\x0f\x43reateBlueprint\x12\x37.google.cloud.telcoautomation.v1.CreateBlueprintRequest\x1a*.google.cloud.telcoautomation.v1.Blueprint\"y\xda\x41\x1dparent,blueprint,blueprint_id\x82\xd3\xe4\x93\x02S\"F/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/blueprints:\tblueprint\x12\xf3\x01\n\x0fUpdateBlueprint\x12\x37.google.cloud.telcoautomation.v1.UpdateBlueprintRequest\x1a*.google.cloud.telcoautomation.v1.Blueprint\"{\xda\x41\x15\x62lueprint,update_mask\x82\xd3\xe4\x93\x02]2P/v1/{blueprint.name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:\tblueprint\x12\xc7\x01\n\x0cGetBlueprint\x12\x34.google.cloud.telcoautomation.v1.GetBlueprintRequest\x1a*.google.cloud.telcoautomation.v1.Blueprint\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H\x12\x46/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}\x12\xb9\x01\n\x0f\x44\x65leteBlueprint\x12\x37.google.cloud.telcoautomation.v1.DeleteBlueprintRequest\x1a\x16.google.protobuf.Empty\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H*F/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}\x12\xda\x01\n\x0eListBlueprints\x12\x36.google.cloud.telcoautomation.v1.ListBlueprintsRequest\x1a\x37.google.cloud.telcoautomation.v1.ListBlueprintsResponse\"W\xda\x41\x06parent\x82\xd3\xe4\x93\x02H\x12\x46/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/blueprints\x12\xda\x01\n\x10\x41pproveBlueprint\x12\x38.google.cloud.telcoautomation.v1.ApproveBlueprintRequest\x1a*.google.cloud.telcoautomation.v1.Blueprint\"`\xda\x41\x04name\x82\xd3\xe4\x93\x02S\"N/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:approve:\x01*\x12\xda\x01\n\x10ProposeBlueprint\x12\x38.google.cloud.telcoautomation.v1.ProposeBlueprintRequest\x1a*.google.cloud.telcoautomation.v1.Blueprint\"`\xda\x41\x04name\x82\xd3\xe4\x93\x02S\"N/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:propose:\x01*\x12\xd7\x01\n\x0fRejectBlueprint\x12\x37.google.cloud.telcoautomation.v1.RejectBlueprintRequest\x1a*.google.cloud.telcoautomation.v1.Blueprint\"_\xda\x41\x04name\x82\xd3\xe4\x93\x02R\"M/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:reject:\x01*\x12\xfe\x01\n\x16ListBlueprintRevisions\x12>.google.cloud.telcoautomation.v1.ListBlueprintRevisionsRequest\x1a?.google.cloud.telcoautomation.v1.ListBlueprintRevisionsResponse\"c\xda\x41\x04name\x82\xd3\xe4\x93\x02V\x12T/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:listRevisions\x12\x8e\x02\n\x18SearchBlueprintRevisions\x12@.google.cloud.telcoautomation.v1.SearchBlueprintRevisionsRequest\x1a\x41.google.cloud.telcoautomation.v1.SearchBlueprintRevisionsResponse\"m\xda\x41\x0cparent,query\x82\xd3\xe4\x93\x02X\x12V/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/blueprints:searchRevisions\x12\x92\x02\n\x19SearchDeploymentRevisions\x12\x41.google.cloud.telcoautomation.v1.SearchDeploymentRevisionsRequest\x1a\x42.google.cloud.telcoautomation.v1.SearchDeploymentRevisionsResponse\"n\xda\x41\x0cparent,query\x82\xd3\xe4\x93\x02Y\x12W/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/deployments:searchRevisions\x12\xfe\x01\n\x17\x44iscardBlueprintChanges\x12?.google.cloud.telcoautomation.v1.DiscardBlueprintChangesRequest\x1a@.google.cloud.telcoautomation.v1.DiscardBlueprintChangesResponse\"`\xda\x41\x04name\x82\xd3\xe4\x93\x02S\"N/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:discard:\x01*\x12\xda\x01\n\x14ListPublicBlueprints\x12<.google.cloud.telcoautomation.v1.ListPublicBlueprintsRequest\x1a=.google.cloud.telcoautomation.v1.ListPublicBlueprintsResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*}/publicBlueprints\x12\xc7\x01\n\x12GetPublicBlueprint\x12:.google.cloud.telcoautomation.v1.GetPublicBlueprintRequest\x1a\x30.google.cloud.telcoautomation.v1.PublicBlueprint\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/publicBlueprints/*}\x12\xf8\x01\n\x10\x43reateDeployment\x12\x38.google.cloud.telcoautomation.v1.CreateDeploymentRequest\x1a+.google.cloud.telcoautomation.v1.Deployment\"}\xda\x41\x1fparent,deployment,deployment_id\x82\xd3\xe4\x93\x02U\"G/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/deployments:\ndeployment\x12\xfa\x01\n\x10UpdateDeployment\x12\x38.google.cloud.telcoautomation.v1.UpdateDeploymentRequest\x1a+.google.cloud.telcoautomation.v1.Deployment\"\x7f\xda\x41\x16\x64\x65ployment,update_mask\x82\xd3\xe4\x93\x02`2R/v1/{deployment.name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:\ndeployment\x12\xcb\x01\n\rGetDeployment\x12\x35.google.cloud.telcoautomation.v1.GetDeploymentRequest\x1a+.google.cloud.telcoautomation.v1.Deployment\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02I\x12G/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}\x12\xc6\x01\n\x10RemoveDeployment\x12\x38.google.cloud.telcoautomation.v1.RemoveDeploymentRequest\x1a\x16.google.protobuf.Empty\"`\xda\x41\x04name\x82\xd3\xe4\x93\x02S\"N/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:remove:\x01*\x12\xde\x01\n\x0fListDeployments\x12\x37.google.cloud.telcoautomation.v1.ListDeploymentsRequest\x1a\x38.google.cloud.telcoautomation.v1.ListDeploymentsResponse\"X\xda\x41\x06parent\x82\xd3\xe4\x93\x02I\x12G/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/deployments\x12\x82\x02\n\x17ListDeploymentRevisions\x12?.google.cloud.telcoautomation.v1.ListDeploymentRevisionsRequest\x1a@.google.cloud.telcoautomation.v1.ListDeploymentRevisionsResponse\"d\xda\x41\x04name\x82\xd3\xe4\x93\x02W\x12U/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:listRevisions\x12\x82\x02\n\x18\x44iscardDeploymentChanges\x12@.google.cloud.telcoautomation.v1.DiscardDeploymentChangesRequest\x1a\x41.google.cloud.telcoautomation.v1.DiscardDeploymentChangesResponse\"a\xda\x41\x04name\x82\xd3\xe4\x93\x02T\"O/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:discard:\x01*\x12\xd8\x01\n\x0f\x41pplyDeployment\x12\x37.google.cloud.telcoautomation.v1.ApplyDeploymentRequest\x1a+.google.cloud.telcoautomation.v1.Deployment\"_\xda\x41\x04name\x82\xd3\xe4\x93\x02R\"M/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:apply:\x01*\x12\x8c\x02\n\x17\x43omputeDeploymentStatus\x12?.google.cloud.telcoautomation.v1.ComputeDeploymentStatusRequest\x1a@.google.cloud.telcoautomation.v1.ComputeDeploymentStatusResponse\"n\xda\x41\x04name\x82\xd3\xe4\x93\x02\x61\x12_/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:computeDeploymentStatus\x12\xed\x01\n\x12RollbackDeployment\x12:.google.cloud.telcoautomation.v1.RollbackDeploymentRequest\x1a+.google.cloud.telcoautomation.v1.Deployment\"n\xda\x41\x10name,revision_id\x82\xd3\xe4\x93\x02U\"P/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:rollback:\x01*\x12\xf9\x01\n\x15GetHydratedDeployment\x12=.google.cloud.telcoautomation.v1.GetHydratedDeploymentRequest\x1a\x33.google.cloud.telcoautomation.v1.HydratedDeployment\"l\xda\x41\x04name\x82\xd3\xe4\x93\x02_\x12]/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*/hydratedDeployments/*}\x12\x8c\x02\n\x17ListHydratedDeployments\x12?.google.cloud.telcoautomation.v1.ListHydratedDeploymentsRequest\x1a@.google.cloud.telcoautomation.v1.ListHydratedDeploymentsResponse\"n\xda\x41\x06parent\x82\xd3\xe4\x93\x02_\x12]/v1/{parent=projects/*/locations/*/orchestrationClusters/*/deployments/*}/hydratedDeployments\x12\xc5\x02\n\x18UpdateHydratedDeployment\x12@.google.cloud.telcoautomation.v1.UpdateHydratedDeploymentRequest\x1a\x33.google.cloud.telcoautomation.v1.HydratedDeployment\"\xb1\x01\xda\x41\x1fhydrated_deployment,update_mask\x82\xd3\xe4\x93\x02\x88\x01\x32q/v1/{hydrated_deployment.name=projects/*/locations/*/orchestrationClusters/*/deployments/*/hydratedDeployments/*}:\x13hydrated_deployment\x12\x86\x02\n\x17\x41pplyHydratedDeployment\x12?.google.cloud.telcoautomation.v1.ApplyHydratedDeploymentRequest\x1a\x33.google.cloud.telcoautomation.v1.HydratedDeployment\"u\xda\x41\x04name\x82\xd3\xe4\x93\x02h\"c/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*/hydratedDeployments/*}:apply:\x01*\x1aR\xca\x41\x1etelcoautomation.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xf5\x01\n#com.google.cloud.telcoautomation.v1B\x14TelcoautomationProtoP\x01ZMcloud.google.com/go/telcoautomation/apiv1/telcoautomationpb;telcoautomationpb\xaa\x02\x1fGoogle.Cloud.TelcoAutomation.V1\xca\x02\x1fGoogle\\Cloud\\TelcoAutomation\\V1\xea\x02\"Google::Cloud::TelcoAutomation::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module TelcoAutomation - module V1 - OrchestrationCluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.OrchestrationCluster").msgclass - OrchestrationCluster::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.OrchestrationCluster.State").enummodule - EdgeSlm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.EdgeSlm").msgclass - EdgeSlm::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.EdgeSlm.State").enummodule - EdgeSlm::WorkloadClusterType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.EdgeSlm.WorkloadClusterType").enummodule - Blueprint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.Blueprint").msgclass - Blueprint::ApprovalState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.Blueprint.ApprovalState").enummodule - PublicBlueprint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.PublicBlueprint").msgclass - Deployment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.Deployment").msgclass - Deployment::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.Deployment.State").enummodule - HydratedDeployment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.HydratedDeployment").msgclass - HydratedDeployment::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.HydratedDeployment.State").enummodule - ListOrchestrationClustersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListOrchestrationClustersRequest").msgclass - ListOrchestrationClustersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListOrchestrationClustersResponse").msgclass - GetOrchestrationClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.GetOrchestrationClusterRequest").msgclass - CreateOrchestrationClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.CreateOrchestrationClusterRequest").msgclass - DeleteOrchestrationClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.DeleteOrchestrationClusterRequest").msgclass - ListEdgeSlmsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListEdgeSlmsRequest").msgclass - ListEdgeSlmsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListEdgeSlmsResponse").msgclass - GetEdgeSlmRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.GetEdgeSlmRequest").msgclass - CreateEdgeSlmRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.CreateEdgeSlmRequest").msgclass - DeleteEdgeSlmRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.DeleteEdgeSlmRequest").msgclass - CreateBlueprintRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.CreateBlueprintRequest").msgclass - UpdateBlueprintRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.UpdateBlueprintRequest").msgclass - GetBlueprintRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.GetBlueprintRequest").msgclass - DeleteBlueprintRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.DeleteBlueprintRequest").msgclass - ListBlueprintsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListBlueprintsRequest").msgclass - ListBlueprintsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListBlueprintsResponse").msgclass - ApproveBlueprintRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ApproveBlueprintRequest").msgclass - ProposeBlueprintRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ProposeBlueprintRequest").msgclass - RejectBlueprintRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.RejectBlueprintRequest").msgclass - ListBlueprintRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListBlueprintRevisionsRequest").msgclass - ListBlueprintRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListBlueprintRevisionsResponse").msgclass - SearchBlueprintRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.SearchBlueprintRevisionsRequest").msgclass - SearchBlueprintRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.SearchBlueprintRevisionsResponse").msgclass - DiscardBlueprintChangesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.DiscardBlueprintChangesRequest").msgclass - DiscardBlueprintChangesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.DiscardBlueprintChangesResponse").msgclass - ListPublicBlueprintsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListPublicBlueprintsRequest").msgclass - ListPublicBlueprintsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListPublicBlueprintsResponse").msgclass - GetPublicBlueprintRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.GetPublicBlueprintRequest").msgclass - CreateDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.CreateDeploymentRequest").msgclass - UpdateDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.UpdateDeploymentRequest").msgclass - GetDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.GetDeploymentRequest").msgclass - RemoveDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.RemoveDeploymentRequest").msgclass - ListDeploymentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListDeploymentsRequest").msgclass - ListDeploymentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListDeploymentsResponse").msgclass - ListDeploymentRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListDeploymentRevisionsRequest").msgclass - ListDeploymentRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListDeploymentRevisionsResponse").msgclass - SearchDeploymentRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.SearchDeploymentRevisionsRequest").msgclass - SearchDeploymentRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.SearchDeploymentRevisionsResponse").msgclass - DiscardDeploymentChangesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.DiscardDeploymentChangesRequest").msgclass - DiscardDeploymentChangesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.DiscardDeploymentChangesResponse").msgclass - ApplyDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ApplyDeploymentRequest").msgclass - ComputeDeploymentStatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ComputeDeploymentStatusRequest").msgclass - ComputeDeploymentStatusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ComputeDeploymentStatusResponse").msgclass - RollbackDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.RollbackDeploymentRequest").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.OperationMetadata").msgclass - GetHydratedDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.GetHydratedDeploymentRequest").msgclass - ListHydratedDeploymentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListHydratedDeploymentsRequest").msgclass - ListHydratedDeploymentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ListHydratedDeploymentsResponse").msgclass - UpdateHydratedDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.UpdateHydratedDeploymentRequest").msgclass - ApplyHydratedDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ApplyHydratedDeploymentRequest").msgclass - ManagementConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ManagementConfig").msgclass - StandardManagementConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.StandardManagementConfig").msgclass - FullManagementConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.FullManagementConfig").msgclass - MasterAuthorizedNetworksConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig").msgclass - MasterAuthorizedNetworksConfig::CidrBlock = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig.CidrBlock").msgclass - File = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.File").msgclass - ResourceStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ResourceStatus").msgclass - NFDeployStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.NFDeployStatus").msgclass - NFDeploySiteStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.NFDeploySiteStatus").msgclass - HydrationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.HydrationStatus").msgclass - SiteVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.SiteVersion").msgclass - WorkloadStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.WorkloadStatus").msgclass - BlueprintView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.BlueprintView").enummodule - DeploymentView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.DeploymentView").enummodule - ResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.ResourceType").enummodule - Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.Status").enummodule - DeploymentLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.telcoautomation.v1.DeploymentLevel").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telcoautomation/v1/telcoautomation_services_pb.rb b/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telcoautomation/v1/telcoautomation_services_pb.rb deleted file mode 100644 index bc4578b621de..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/lib/google/cloud/telcoautomation/v1/telcoautomation_services_pb.rb +++ /dev/null @@ -1,126 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/telcoautomation/v1/telcoautomation.proto for package 'Google.Cloud.TelcoAutomation.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/telcoautomation/v1/telcoautomation_pb' - -module Google - module Cloud - module TelcoAutomation - module V1 - module TelcoAutomation - # TelcoAutomation Service manages the control plane cluster a.k.a. - # Orchestration Cluster (GKE cluster with config controller) of TNA. It also - # exposes blueprint APIs which manages the lifecycle of blueprints that control - # the infrastructure setup (e.g GDCE clusters) and deployment of network - # functions. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.telcoautomation.v1.TelcoAutomation' - - # Lists OrchestrationClusters in a given project and location. - rpc :ListOrchestrationClusters, ::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest, ::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersResponse - # Gets details of a single OrchestrationCluster. - rpc :GetOrchestrationCluster, ::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest, ::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster - # Creates a new OrchestrationCluster in a given project and location. - rpc :CreateOrchestrationCluster, ::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest, ::Google::Longrunning::Operation - # Deletes a single OrchestrationCluster. - rpc :DeleteOrchestrationCluster, ::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest, ::Google::Longrunning::Operation - # Lists EdgeSlms in a given project and location. - rpc :ListEdgeSlms, ::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest, ::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsResponse - # Gets details of a single EdgeSlm. - rpc :GetEdgeSlm, ::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest, ::Google::Cloud::TelcoAutomation::V1::EdgeSlm - # Creates a new EdgeSlm in a given project and location. - rpc :CreateEdgeSlm, ::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest, ::Google::Longrunning::Operation - # Deletes a single EdgeSlm. - rpc :DeleteEdgeSlm, ::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest, ::Google::Longrunning::Operation - # Creates a blueprint. - rpc :CreateBlueprint, ::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest, ::Google::Cloud::TelcoAutomation::V1::Blueprint - # Updates a blueprint. - rpc :UpdateBlueprint, ::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest, ::Google::Cloud::TelcoAutomation::V1::Blueprint - # Returns the requested blueprint. - rpc :GetBlueprint, ::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest, ::Google::Cloud::TelcoAutomation::V1::Blueprint - # Deletes a blueprint and all its revisions. - rpc :DeleteBlueprint, ::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest, ::Google::Protobuf::Empty - # List all blueprints. - rpc :ListBlueprints, ::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest, ::Google::Cloud::TelcoAutomation::V1::ListBlueprintsResponse - # Approves a blueprint and commits a new revision. - rpc :ApproveBlueprint, ::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest, ::Google::Cloud::TelcoAutomation::V1::Blueprint - # Proposes a blueprint for approval of changes. - rpc :ProposeBlueprint, ::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest, ::Google::Cloud::TelcoAutomation::V1::Blueprint - # Rejects a blueprint revision proposal and flips it back to Draft state. - rpc :RejectBlueprint, ::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest, ::Google::Cloud::TelcoAutomation::V1::Blueprint - # List blueprint revisions of a given blueprint. - rpc :ListBlueprintRevisions, ::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest, ::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsResponse - # Searches across blueprint revisions. - rpc :SearchBlueprintRevisions, ::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest, ::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsResponse - # Searches across deployment revisions. - rpc :SearchDeploymentRevisions, ::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest, ::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsResponse - # Discards the changes in a blueprint and reverts the blueprint to the last - # approved blueprint revision. No changes take place if a blueprint does not - # have revisions. - rpc :DiscardBlueprintChanges, ::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest, ::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse - # Lists the blueprints in TNA's public catalog. Default page size = 20, - # Max Page Size = 100. - rpc :ListPublicBlueprints, ::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest, ::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsResponse - # Returns the requested public blueprint. - rpc :GetPublicBlueprint, ::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest, ::Google::Cloud::TelcoAutomation::V1::PublicBlueprint - # Creates a deployment. - rpc :CreateDeployment, ::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest, ::Google::Cloud::TelcoAutomation::V1::Deployment - # Updates a deployment. - rpc :UpdateDeployment, ::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest, ::Google::Cloud::TelcoAutomation::V1::Deployment - # Returns the requested deployment. - rpc :GetDeployment, ::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest, ::Google::Cloud::TelcoAutomation::V1::Deployment - # Removes the deployment by marking it as DELETING. Post which deployment and - # it's revisions gets deleted. - rpc :RemoveDeployment, ::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest, ::Google::Protobuf::Empty - # List all deployments. - rpc :ListDeployments, ::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest, ::Google::Cloud::TelcoAutomation::V1::ListDeploymentsResponse - # List deployment revisions of a given deployment. - rpc :ListDeploymentRevisions, ::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest, ::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsResponse - # Discards the changes in a deployment and reverts the deployment to the last - # approved deployment revision. No changes take place if a deployment does - # not have revisions. - rpc :DiscardDeploymentChanges, ::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest, ::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse - # Applies the deployment's YAML files to the parent orchestration cluster. - rpc :ApplyDeployment, ::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest, ::Google::Cloud::TelcoAutomation::V1::Deployment - # Returns the requested deployment status. - rpc :ComputeDeploymentStatus, ::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest, ::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse - # Rollback the active deployment to the given past approved deployment - # revision. - rpc :RollbackDeployment, ::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest, ::Google::Cloud::TelcoAutomation::V1::Deployment - # Returns the requested hydrated deployment. - rpc :GetHydratedDeployment, ::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest, ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment - # List all hydrated deployments present under a deployment. - rpc :ListHydratedDeployments, ::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest, ::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsResponse - # Updates a hydrated deployment. - rpc :UpdateHydratedDeployment, ::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest, ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment - # Applies a hydrated deployment to a workload cluster. - rpc :ApplyHydratedDeployment, ::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest, ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/README.md deleted file mode 100644 index ad404433aa18..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Telco Automation 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-telco_automation-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # 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. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - # - # Example: - # - # 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 - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # 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 - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # 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 - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/proto_docs/google/cloud/telcoautomation/v1/telcoautomation.rb b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/cloud/telcoautomation/v1/telcoautomation.rb deleted file mode 100644 index 2386f15aacc5..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/cloud/telcoautomation/v1/telcoautomation.rb +++ /dev/null @@ -1,1551 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module TelcoAutomation - module V1 - # Orchestration cluster represents a GKE cluster with config controller and - # TNA specific components installed on it. - # @!attribute [rw] name - # @return [::String] - # Name of the orchestration cluster. The name of orchestration cluster cannot - # be more than 24 characters. - # @!attribute [rw] management_config - # @return [::Google::Cloud::TelcoAutomation::V1::ManagementConfig] - # Management configuration of the underlying GKE cluster. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] Create time stamp. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] Update time stamp. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels as key value pairs. - # @!attribute [r] tna_version - # @return [::String] - # Output only. Provides the TNA version installed on the cluster. - # @!attribute [r] state - # @return [::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster::State] - # Output only. State of the Orchestration Cluster. - class OrchestrationCluster - 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 - - # Possible states that the Orchestration Cluster can be in. - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # OrchestrationCluster is being created. - CREATING = 1 - - # OrchestrationCluster has been created and is ready for use. - ACTIVE = 2 - - # OrchestrationCluster is being deleted. - DELETING = 3 - - # OrchestrationCluster encountered an error and is in an indeterministic - # state. User can still initiate a delete operation on this state. - FAILED = 4 - end - end - - # EdgeSlm represents an SLM instance which manages the lifecycle of edge - # components installed on Workload clusters managed by an Orchestration - # Cluster. - # @!attribute [rw] name - # @return [::String] - # Name of the EdgeSlm resource. - # @!attribute [rw] orchestration_cluster - # @return [::String] - # Immutable. Reference to the orchestration cluster on which templates for - # this resources will be applied. This should be of format - # projects/\\{project}/locations/\\{location}/orchestrationClusters/\\{orchestration_cluster}. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] Create time stamp. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] Update time stamp. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels as key value pairs. The key and value should contain - # characters which are UTF-8 compliant and less than 50 characters. - # @!attribute [r] tna_version - # @return [::String] - # Output only. Provides the active TNA version for this resource. - # @!attribute [r] state - # @return [::Google::Cloud::TelcoAutomation::V1::EdgeSlm::State] - # Output only. State of the EdgeSlm resource. - # @!attribute [rw] workload_cluster_type - # @return [::Google::Cloud::TelcoAutomation::V1::EdgeSlm::WorkloadClusterType] - # Optional. Type of workload cluster for which an EdgeSLM resource is - # created. - class EdgeSlm - 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 - - # Possible states of the resource. - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # EdgeSlm is being created. - CREATING = 1 - - # EdgeSlm has been created and is ready for use. - ACTIVE = 2 - - # EdgeSlm is being deleted. - DELETING = 3 - - # EdgeSlm encountered an error and is in an indeterministic - # state. User can still initiate a delete operation on this state. - FAILED = 4 - end - - # Workload clusters supported by TNA. New values will be added to the enum - # list as TNA adds supports for new workload clusters in future. - module WorkloadClusterType - # Unspecified workload cluster. - WORKLOAD_CLUSTER_TYPE_UNSPECIFIED = 0 - - # Workload cluster is a GDCE cluster. - GDCE = 1 - - # Workload cluster is a GKE cluster. - GKE = 2 - end - end - - # A Blueprint contains a collection of kubernetes resources in the form of - # YAML files. The file contents of a blueprint are collectively known as - # package. A blueprint can be - # a) imported from TNA's public catalog - # b) modified as per a user's need - # c) proposed and approved. - # On approval, a revision of blueprint is created which can be used to - # create a deployment on Orchestration or Workload Cluster. - # @!attribute [rw] name - # @return [::String] - # The name of the blueprint. If unspecified, the name will be autogenerated - # from server side. Name of the blueprint must not contain `@` character. - # @!attribute [r] revision_id - # @return [::String] - # Output only. Immutable. The revision ID of the blueprint. - # A new revision is committed whenever a blueprint is approved. - # @!attribute [rw] source_blueprint - # @return [::String] - # Required. Immutable. The public blueprint ID from which this blueprint was - # created. - # @!attribute [r] revision_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp that the revision was created. - # @!attribute [r] approval_state - # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint::ApprovalState] - # Output only. Approval state of the blueprint (DRAFT, PROPOSED, APPROVED) - # @!attribute [rw] display_name - # @return [::String] - # Optional. Human readable name of a Blueprint. - # @!attribute [r] repository - # @return [::String] - # Output only. Name of the repository where the blueprint files are stored. - # @!attribute [rw] files - # @return [::Array<::Google::Cloud::TelcoAutomation::V1::File>] - # Optional. Files present in a blueprint. - # When invoking UpdateBlueprint API, only the modified files should be - # included in this. Files that are not included in the update of a blueprint - # will not be changed. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels are key-value attributes that can be set on a blueprint - # resource by the user. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Blueprint creation time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the blueprint was updated. - # @!attribute [r] source_provider - # @return [::String] - # Output only. Source provider is the author of a public blueprint, from - # which this blueprint is created. - # @!attribute [r] deployment_level - # @return [::Google::Cloud::TelcoAutomation::V1::DeploymentLevel] - # Output only. DeploymentLevel of a blueprint signifies where the blueprint - # will be applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] - # @!attribute [r] rollback_support - # @return [::Boolean] - # Output only. Indicates if the deployment created from this blueprint can be - # rolled back. - class Blueprint - 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 - - # Approval state indicates the state of a Blueprint in its approval - # lifecycle. - module ApprovalState - # Unspecified state. - APPROVAL_STATE_UNSPECIFIED = 0 - - # A blueprint starts in DRAFT state once it is created. All edits are made - # to the blueprint in DRAFT state. - DRAFT = 1 - - # When the edits are ready for review, blueprint can be proposed and moves - # to PROPOSED state. Edits cannot be made to a blueprint in PROPOSED state. - PROPOSED = 2 - - # When a proposed blueprint is approved, it moves to APPROVED state. A new - # revision is committed. The latest committed revision can be used to - # create a deployment on Orchestration or Workload Cluster. Edits to an - # APPROVED blueprint changes its state back to DRAFT. The last committed - # revision of a blueprint represents its latest APPROVED state. - APPROVED = 3 - end - end - - # A Blueprint contains a collection of kubernetes resources in the form of - # YAML files. The file contents of a blueprint are collectively known as - # package. - # Public blueprint is a TNA provided blueprint that in present in TNA's public - # catalog. A user can copy the public blueprint to their private catalog for - # further modifications. - # @!attribute [rw] name - # @return [::String] - # Name of the public blueprint. - # @!attribute [rw] display_name - # @return [::String] - # The display name of the public blueprint. - # @!attribute [rw] description - # @return [::String] - # The description of the public blueprint. - # @!attribute [rw] deployment_level - # @return [::Google::Cloud::TelcoAutomation::V1::DeploymentLevel] - # DeploymentLevel of a blueprint signifies where the blueprint will be - # applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] - # @!attribute [rw] source_provider - # @return [::String] - # Source provider is the author of a public blueprint. e.g. Google, vendors - # @!attribute [r] rollback_support - # @return [::Boolean] - # Output only. Indicates if the deployment created from this blueprint can be - # rolled back. - class PublicBlueprint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Deployment contains a collection of YAML files (This collection is also known - # as package) that can to applied on an orchestration cluster (GKE cluster with - # TNA addons) or a workload cluster. - # @!attribute [rw] name - # @return [::String] - # The name of the deployment. - # @!attribute [r] revision_id - # @return [::String] - # Output only. Immutable. The revision ID of the deployment. - # A new revision is committed whenever a change in deployment is applied. - # @!attribute [rw] source_blueprint_revision - # @return [::String] - # Required. The blueprint revision from which this deployment was created. - # @!attribute [r] revision_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp that the revision was created. - # @!attribute [r] state - # @return [::Google::Cloud::TelcoAutomation::V1::Deployment::State] - # Output only. State of the deployment (DRAFT, APPLIED, DELETING). - # @!attribute [rw] display_name - # @return [::String] - # Optional. Human readable name of a Deployment. - # @!attribute [r] repository - # @return [::String] - # Output only. Name of the repository where the deployment package files are - # stored. - # @!attribute [rw] files - # @return [::Array<::Google::Cloud::TelcoAutomation::V1::File>] - # Optional. Files present in a deployment. - # When invoking UpdateDeployment API, only the modified files should be - # included in this. Files that are not included in the update of a deployment - # will not be changed. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels are key-value attributes that can be set on a deployment - # resource by the user. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Deployment creation time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the deployment was updated. - # @!attribute [r] source_provider - # @return [::String] - # Output only. Source provider is the author of a public blueprint, from - # which this deployment is created. - # @!attribute [rw] workload_cluster - # @return [::String] - # Optional. Immutable. The WorkloadCluster on which to create the Deployment. - # This field should only be passed when the deployment_level of the source - # blueprint specifies deployments on workload clusters e.g. - # WORKLOAD_CLUSTER_DEPLOYMENT. - # @!attribute [r] deployment_level - # @return [::Google::Cloud::TelcoAutomation::V1::DeploymentLevel] - # Output only. Attributes to where the deployment can inflict changes. The - # value can only be [SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT]. - # @!attribute [r] rollback_support - # @return [::Boolean] - # Output only. Indicates if the deployment can be rolled back, exported from - # public blueprint. - class Deployment - 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 defines which state the current deployment is in. - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # A deployment starts in DRAFT state. All edits are made in DRAFT state. A - # deployment opened for editing after applying will be in draft state, - # while its prevision revision will be its current applied version. - DRAFT = 1 - - # This state means that the contents (YAML files containing kubernetes - # resources) of the deployment have been applied to an Orchestration or - # Workload Cluster. A revision is created when a deployment is applied. - # This revision will represent the latest view of what is applied on the - # cluster until the deployment is modified and applied again, which will - # create a new revision. - APPLIED = 2 - - # A deployment in DELETING state has been marked for deletion. Its - # deletion status can be queried using `ComputeDeploymentStatus` API. No - # updates are allowed to a deployment in DELETING state. - DELETING = 3 - end - end - - # A collection of kubernetes yaml files which are deployed on a Workload - # Cluster. Hydrated Deployments are created by TNA intent based automation. - # @!attribute [r] name - # @return [::String] - # Output only. The name of the hydrated deployment. - # @!attribute [r] state - # @return [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment::State] - # Output only. State of the hydrated deployment (DRAFT, APPLIED). - # @!attribute [rw] files - # @return [::Array<::Google::Cloud::TelcoAutomation::V1::File>] - # Optional. File contents of a hydrated deployment. - # When invoking UpdateHydratedBlueprint API, only the modified files should - # be included in this. Files that are not included in the update of a - # hydrated deployment will not be changed. - # @!attribute [r] workload_cluster - # @return [::String] - # Output only. WorkloadCluster identifies which workload cluster will the - # hydrated deployment will be deployed on. - class HydratedDeployment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # State defines which state the current hydrated deployment is in. - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # A hydrated deployment starts in DRAFT state. All edits are made in DRAFT - # state. - DRAFT = 1 - - # When the edit is applied, the hydrated deployment moves to APPLIED - # state. No changes can be made once a hydrated deployment is applied. - APPLIED = 2 - end - end - - # Message for requesting list of OrchestrationClusters. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListOrchestrationClustersRequest - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Hint for how to order the results. - class ListOrchestrationClustersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing OrchestrationClusters. - # @!attribute [rw] orchestration_clusters - # @return [::Array<::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster>] - # The list of OrchestrationCluster - # @!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 ListOrchestrationClustersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a OrchestrationCluster. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource - class GetOrchestrationClusterRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a OrchestrationCluster. - # @!attribute [rw] parent - # @return [::String] - # Required. Value for parent. - # @!attribute [rw] orchestration_cluster_id - # @return [::String] - # Required. Id of the requesting object - # If auto-generating Id server-side, remove this field and - # orchestration_cluster_id from the method_signature of Create RPC - # @!attribute [rw] orchestration_cluster - # @return [::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster] - # Required. The resource being 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 CreateOrchestrationClusterRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a OrchestrationCluster. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource - # @!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 DeleteOrchestrationClusterRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting list of EdgeSlms - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListEdgeSlmsRequest - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Filtering results - # @!attribute [rw] order_by - # @return [::String] - # Hint for how to order the results - class ListEdgeSlmsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing EdgeSlms. - # @!attribute [rw] edge_slms - # @return [::Array<::Google::Cloud::TelcoAutomation::V1::EdgeSlm>] - # The list of EdgeSlm - # @!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 ListEdgeSlmsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a EdgeSlm. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource - class GetEdgeSlmRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a EdgeSlm. - # @!attribute [rw] parent - # @return [::String] - # Required. Value for parent. - # @!attribute [rw] edge_slm_id - # @return [::String] - # Required. Id of the requesting object - # If auto-generating Id server-side, remove this field and - # edge_slm_id from the method_signature of Create RPC - # @!attribute [rw] edge_slm - # @return [::Google::Cloud::TelcoAutomation::V1::EdgeSlm] - # Required. The resource being 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 CreateEdgeSlmRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a EdgeSlm. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource - # @!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 DeleteEdgeSlmRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request object for `CreateBlueprint`. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of parent resource. - # Format should be - - # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". - # @!attribute [rw] blueprint_id - # @return [::String] - # Optional. The name of the blueprint. - # @!attribute [rw] blueprint - # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # Required. The `Blueprint` to create. - class CreateBlueprintRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request object for `UpdateBlueprint`. - # @!attribute [rw] blueprint - # @return [::Google::Cloud::TelcoAutomation::V1::Blueprint] - # Required. The `blueprint` to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Update mask is used to specify the fields to be overwritten in - # the `blueprint` resource by the update. - class UpdateBlueprintRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request object for `GetBlueprint`. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the blueprint. - # Case 1: If the name provided in the request is - # \\{blueprint_id}@\\{revision_id}, then the revision with revision_id will be - # returned. Case 2: If the name provided in the request is \\{blueprint}, then - # the current state of the blueprint is returned. - # @!attribute [rw] view - # @return [::Google::Cloud::TelcoAutomation::V1::BlueprintView] - # Optional. Defines the type of view of the blueprint. - # When field is not present BLUEPRINT_VIEW_BASIC is considered as default. - class GetBlueprintRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request object for `DeleteBlueprint`. - # @!attribute [rw] name - # @return [::String] - # Required. The name of blueprint to delete. - # Blueprint name should be in the format \\{blueprint_id}, if - # \\{blueprint_id}@\\{revision_id} is passed then the API throws invalid - # argument. - class DeleteBlueprintRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request object for `ListBlueprints`. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of parent orchestration cluster resource. - # Format should be - - # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering only supports equality on blueprint state. - # It should be in the form: "state = DRAFT". `OR` operator can be used to - # get response for multiple states. e.g. "state = DRAFT OR state = PROPOSED". - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of blueprints to return per page. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The page token, received from a previous ListBlueprints call. - # It can be provided to retrieve the subsequent page. - class ListBlueprintsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response object for `ListBlueprints`. - # @!attribute [rw] blueprints - # @return [::Array<::Google::Cloud::TelcoAutomation::V1::Blueprint>] - # The list of requested blueprints. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListBlueprintsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request object for `ApproveBlueprint`. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the blueprint to approve. The blueprint must be in - # Proposed state. A new revision is committed on approval. - class ApproveBlueprintRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request object for `ProposeBlueprint`. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the blueprint being proposed. - class ProposeBlueprintRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request object for `RejectBlueprint`. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the blueprint being rejected. - class RejectBlueprintRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request object for `ListBlueprintRevisions`. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the blueprint to list revisions for. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of revisions to return per page. - # @!attribute [rw] page_token - # @return [::String] - # The page token, received from a previous ListBlueprintRevisions call - # It can be provided to retrieve the subsequent page. - class ListBlueprintRevisionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response object for `ListBlueprintRevisions`. - # @!attribute [rw] blueprints - # @return [::Array<::Google::Cloud::TelcoAutomation::V1::Blueprint>] - # The revisions of the blueprint. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListBlueprintRevisionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request object for `SearchBlueprintRevisions`. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of parent orchestration cluster resource. - # Format should be - - # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". - # @!attribute [rw] query - # @return [::String] - # Required. Supported queries: - # 1. "" : Lists all revisions across all blueprints. - # 2. "latest=true" : Lists latest revisions across all blueprints. - # 3. "name=\\{name}" : Lists all revisions of blueprint with name - # \\{name}. - # 4. "name=\\{name} latest=true": Lists latest revision of blueprint with name - # \\{name} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of blueprints revisions to return per page. - # max page size = 100, default page size = 20. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The page token, received from a previous search call. - # It can be provided to retrieve the subsequent page. - class SearchBlueprintRevisionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response object for `SearchBlueprintRevisions`. - # @!attribute [rw] blueprints - # @return [::Array<::Google::Cloud::TelcoAutomation::V1::Blueprint>] - # The list of requested blueprint revisions. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class SearchBlueprintRevisionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request object for `DiscardBlueprintChanges`. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the blueprint of which changes are being discarded. - class DiscardBlueprintChangesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response object for `DiscardBlueprintChanges`. - class DiscardBlueprintChangesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request object for `ListPublicBlueprints`. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value of public blueprint. - # Format should be - - # "projects/\\{project_id}/locations/\\{location_name}". - # @!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. - class ListPublicBlueprintsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response object for `ListPublicBlueprints`. - # @!attribute [rw] public_blueprints - # @return [::Array<::Google::Cloud::TelcoAutomation::V1::PublicBlueprint>] - # The list of public blueprints to return. - # @!attribute [r] next_page_token - # @return [::String] - # Output only. A token identifying a page of results the server should - # return. - class ListPublicBlueprintsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request object for `GetPublicBlueprint`. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the public blueprint. - class GetPublicBlueprintRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request object for `CreateDeployment`. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of parent resource. - # Format should be - - # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". - # @!attribute [rw] deployment_id - # @return [::String] - # Optional. The name of the deployment. - # @!attribute [rw] deployment - # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] - # Required. The `Deployment` to create. - class CreateDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request object for `UpdateDeployment`. - # @!attribute [rw] deployment - # @return [::Google::Cloud::TelcoAutomation::V1::Deployment] - # Required. The `deployment` to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Update mask is used to specify the fields to be overwritten in - # the `deployment` resource by the update. - class UpdateDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request object for `GetDeployment`. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the deployment. - # Case 1: If the name provided in the request is - # \\{deployment_id}@\\{revision_id}, then the revision with revision_id will be - # returned. - # Case 2: If the name provided in the request is \\{deployment}, then - # the current state of the deployment is returned. - # @!attribute [rw] view - # @return [::Google::Cloud::TelcoAutomation::V1::DeploymentView] - # Optional. Defines the type of view of the deployment. - # When field is not present VIEW_BASIC is considered as default. - class GetDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request object for `RemoveDeployment`. - # @!attribute [rw] name - # @return [::String] - # Required. The name of deployment to initiate delete. - class RemoveDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request object for `ListDeployments`. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of parent orchestration cluster resource. - # Format should be - - # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering only supports equality on deployment state. - # It should be in the form: "state = DRAFT". `OR` operator can be used to - # get response for multiple states. e.g. "state = DRAFT OR state = APPLIED". - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of deployments to return per page. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The page token, received from a previous ListDeployments call. - # It can be provided to retrieve the subsequent page. - class ListDeploymentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response object for `ListDeployments`. - # @!attribute [rw] deployments - # @return [::Array<::Google::Cloud::TelcoAutomation::V1::Deployment>] - # The list of requested deployments. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListDeploymentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for listing all revisions of a deployment. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the deployment to list revisions for. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of revisions to return per page. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The page token, received from a previous ListDeploymentRevisions - # call Provide this to retrieve the subsequent page. - class ListDeploymentRevisionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List of deployment revisions for a given deployment. - # @!attribute [rw] deployments - # @return [::Array<::Google::Cloud::TelcoAutomation::V1::Deployment>] - # The revisions of the deployment. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListDeploymentRevisionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request object for `SearchDeploymentRevisions`. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of parent orchestration cluster resource. - # Format should be - - # "projects/\\{project_id}/locations/\\{location_name}/orchestrationClusters/\\{orchestration_cluster}". - # @!attribute [rw] query - # @return [::String] - # Required. Supported queries: - # 1. "" : Lists all revisions across all deployments. - # 2. "latest=true" : Lists latest revisions across all - # deployments. - # 3. "name=\\{name}" : Lists all revisions of deployment with name - # \\{name}. - # 4. "name=\\{name} latest=true": Lists latest revision of deployment with name - # \\{name} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of deployment revisions to return per page. - # max page size = 100, default page size = 20. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The page token, received from a previous search call. - # It can be provided to retrieve the subsequent page. - class SearchDeploymentRevisionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response object for `SearchDeploymentRevisions`. - # @!attribute [rw] deployments - # @return [::Array<::Google::Cloud::TelcoAutomation::V1::Deployment>] - # The list of requested deployment revisions. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class SearchDeploymentRevisionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request object for `DiscardDeploymentChanges`. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the deployment of which changes are being discarded. - class DiscardDeploymentChangesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response object for `DiscardDeploymentChanges`. - class DiscardDeploymentChangesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request object for `ApplyDeployment`. The resources in given deployment - # gets applied to Orchestration Cluster. A new revision is created when a - # deployment is applied. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the deployment to apply to orchestration cluster. - class ApplyDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request object for `ComputeDeploymentStatus`. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the deployment without revisionID. - class ComputeDeploymentStatusRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response object for `ComputeDeploymentStatus`. - # @!attribute [rw] name - # @return [::String] - # The name of the deployment. - # @!attribute [r] aggregated_status - # @return [::Google::Cloud::TelcoAutomation::V1::Status] - # Output only. Aggregated status of a deployment. - # @!attribute [r] resource_statuses - # @return [::Array<::Google::Cloud::TelcoAutomation::V1::ResourceStatus>] - # Output only. Resource level status details in deployments. - class ComputeDeploymentStatusResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request object for `RollbackDeployment`. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the deployment. - # @!attribute [rw] revision_id - # @return [::String] - # Required. The revision id of deployment to roll back to. - class RollbackDeploymentRequest - 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 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 - - # Request object for `GetHydratedDeployment`. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the hydrated deployment. - class GetHydratedDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request object for `ListHydratedDeployments`. - # @!attribute [rw] parent - # @return [::String] - # Required. The deployment managing the hydrated deployments. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of hydrated deployments to return. The service - # may return fewer than this value. If unspecified, at most 50 hydrated - # deployments will be returned. The maximum value is 1000. Values above 1000 - # will be set to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The page token, received from a previous ListHydratedDeployments - # call. Provide this to retrieve the subsequent page. - class ListHydratedDeploymentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response object for `ListHydratedDeployments`. - # @!attribute [rw] hydrated_deployments - # @return [::Array<::Google::Cloud::TelcoAutomation::V1::HydratedDeployment>] - # The list of hydrated deployments. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListHydratedDeploymentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request object for `UpdateHydratedDeployment`. - # @!attribute [rw] hydrated_deployment - # @return [::Google::Cloud::TelcoAutomation::V1::HydratedDeployment] - # Required. The hydrated deployment to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to update. Update mask supports a special - # value `*` which fully replaces (equivalent to PUT) the resource provided. - class UpdateHydratedDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for applying a hydrated deployment. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the hydrated deployment to apply. - class ApplyHydratedDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration of the cluster management - # @!attribute [rw] standard_management_config - # @return [::Google::Cloud::TelcoAutomation::V1::StandardManagementConfig] - # Configuration of the standard (GKE) cluster management - # - # Note: The following fields are mutually exclusive: `standard_management_config`, `full_management_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] full_management_config - # @return [::Google::Cloud::TelcoAutomation::V1::FullManagementConfig] - # Configuration of the full (Autopilot) cluster management. Full cluster - # management is a preview feature. - # - # Note: The following fields are mutually exclusive: `full_management_config`, `standard_management_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ManagementConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration of the standard (GKE) cluster management. - # @!attribute [rw] network - # @return [::String] - # Optional. Name of the VPC Network to put the GKE cluster and nodes in. The - # VPC will be created if it doesn't exist. - # @!attribute [rw] subnet - # @return [::String] - # Optional. Specifies the subnet that the interface will be part of. Network - # key must be specified and the subnet must be a subnetwork of the specified - # network. - # @!attribute [rw] master_ipv4_cidr_block - # @return [::String] - # Optional. The /28 network that the masters will use. It should be free - # within the network. - # @!attribute [rw] cluster_cidr_block - # @return [::String] - # Optional. The IP address range for the cluster pod IPs. Set to blank to - # have a range chosen with the default size. Set to /netmask (e.g. /14) to - # have a range chosen with a specific netmask. Set to a CIDR notation - # (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, - # 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. - # @!attribute [rw] services_cidr_block - # @return [::String] - # Optional. The IP address range for the cluster service IPs. Set to blank to - # have a range chosen with the default size. Set to /netmask (e.g. /14) to - # have a range chosen with a specific netmask. Set to a CIDR notation (e.g. - # 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, - # 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. - # @!attribute [rw] cluster_named_range - # @return [::String] - # Optional. The name of the existing secondary range in the cluster's - # subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block - # can be used to automatically create a GKE-managed one. - # @!attribute [rw] services_named_range - # @return [::String] - # Optional. The name of the existing secondary range in the cluster's - # subnetwork to use for service ClusterIPs. Alternatively, - # services_cidr_block can be used to automatically create a GKE-managed one. - # @!attribute [rw] master_authorized_networks_config - # @return [::Google::Cloud::TelcoAutomation::V1::MasterAuthorizedNetworksConfig] - # Optional. Master Authorized Network that supports multiple CIDR blocks. - # Allows access to the k8s master from multiple blocks. It cannot be set at - # the same time with the field man_block. - class StandardManagementConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration of the full (Autopilot) cluster management - # @!attribute [rw] network - # @return [::String] - # Optional. Name of the VPC Network to put the GKE cluster and nodes in. The - # VPC will be created if it doesn't exist. - # @!attribute [rw] subnet - # @return [::String] - # Optional. Specifies the subnet that the interface will be part of. Network - # key must be specified and the subnet must be a subnetwork of the specified - # network. - # @!attribute [rw] master_ipv4_cidr_block - # @return [::String] - # Optional. The /28 network that the masters will use. - # @!attribute [rw] cluster_cidr_block - # @return [::String] - # Optional. The IP address range for the cluster pod IPs. Set to blank to - # have a range chosen with the default size. Set to /netmask (e.g. /14) to - # have a range chosen with a specific netmask. Set to a CIDR notation - # (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, - # 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. - # @!attribute [rw] services_cidr_block - # @return [::String] - # Optional. The IP address range for the cluster service IPs. Set to blank to - # have a range chosen with the default size. Set to /netmask (e.g. /14) to - # have a range chosen with a specific netmask. Set to a CIDR notation (e.g. - # 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, - # 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. - # @!attribute [rw] cluster_named_range - # @return [::String] - # Optional. The name of the existing secondary range in the cluster's - # subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block - # can be used to automatically create a GKE-managed one. - # @!attribute [rw] services_named_range - # @return [::String] - # Optional. The name of the existing secondary range in the cluster's - # subnetwork to use for service ClusterIPs. Alternatively, - # services_cidr_block can be used to automatically create a GKE-managed one. - # @!attribute [rw] master_authorized_networks_config - # @return [::Google::Cloud::TelcoAutomation::V1::MasterAuthorizedNetworksConfig] - # Optional. Master Authorized Network that supports multiple CIDR blocks. - # Allows access to the k8s master from multiple blocks. It cannot be set at - # the same time with the field man_block. - class FullManagementConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration of the Master Authorized Network that support multiple CIDRs - # @!attribute [rw] cidr_blocks - # @return [::Array<::Google::Cloud::TelcoAutomation::V1::MasterAuthorizedNetworksConfig::CidrBlock>] - # Optional. cidr_blocks define up to 50 external networks that could access - # Kubernetes master through HTTPS. - class MasterAuthorizedNetworksConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # CidrBlock contains an optional name and one CIDR block. - # @!attribute [rw] display_name - # @return [::String] - # Optional. display_name is an optional field for users to identify CIDR - # blocks. - # @!attribute [rw] cidr_block - # @return [::String] - # Optional. cidr_block must be specified in CIDR notation when using - # master_authorized_networks_config. Currently, the user could still use - # the deprecated man_block field, so this field is currently optional, but - # will be required in the future. - class CidrBlock - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # File represents a yaml file present in a blueprint's package. - # @!attribute [rw] path - # @return [::String] - # Required. Path of the file in package. - # e.g. `gdce/v1/cluster.yaml` - # @!attribute [rw] content - # @return [::String] - # Optional. The contents of a file in string format. - # @!attribute [rw] deleted - # @return [::Boolean] - # Optional. Signifies whether a file is marked for deletion. - # @!attribute [rw] editable - # @return [::Boolean] - # Optional. Indicates whether changes are allowed to a file. If the field is - # not set, the file cannot be edited. - class File - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Status of a deployment resource. - # @!attribute [rw] name - # @return [::String] - # Name of the resource. - # @!attribute [rw] resource_namespace - # @return [::String] - # Namespace of the resource. - # @!attribute [rw] group - # @return [::String] - # Group to which the resource belongs to. - # @!attribute [rw] version - # @return [::String] - # Version of the resource. - # @!attribute [rw] kind - # @return [::String] - # Kind of the resource. - # @!attribute [r] resource_type - # @return [::Google::Cloud::TelcoAutomation::V1::ResourceType] - # Output only. Resource type. - # @!attribute [r] status - # @return [::Google::Cloud::TelcoAutomation::V1::Status] - # Output only. Status of the resource. - # @!attribute [r] nf_deploy_status - # @return [::Google::Cloud::TelcoAutomation::V1::NFDeployStatus] - # Output only. Detailed status of NFDeploy. - class ResourceStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Deployment status of NFDeploy. - # @!attribute [r] targeted_nfs - # @return [::Integer] - # Output only. Total number of NFs targeted by this deployment - # @!attribute [r] ready_nfs - # @return [::Integer] - # Output only. Total number of NFs targeted by this deployment with a Ready - # Condition set. - # @!attribute [r] sites - # @return [::Array<::Google::Cloud::TelcoAutomation::V1::NFDeploySiteStatus>] - # Output only. Per-Site Status. - class NFDeployStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Per-Site Status. - # @!attribute [r] site - # @return [::String] - # Output only. Site id. - # @!attribute [r] pending_deletion - # @return [::Boolean] - # Output only. If true, the Site Deletion is in progress. - # @!attribute [r] hydration - # @return [::Google::Cloud::TelcoAutomation::V1::HydrationStatus] - # Output only. Hydration status. - # @!attribute [r] workload - # @return [::Google::Cloud::TelcoAutomation::V1::WorkloadStatus] - # Output only. Workload status. - class NFDeploySiteStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Hydration status. - # @!attribute [r] site_version - # @return [::Google::Cloud::TelcoAutomation::V1::SiteVersion] - # Output only. SiteVersion Hydration is targeting. - # @!attribute [r] status - # @return [::String] - # Output only. Status. - class HydrationStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # SiteVersion Hydration is targeting. - # @!attribute [r] nf_vendor - # @return [::String] - # Output only. NF vendor. - # @!attribute [r] nf_type - # @return [::String] - # Output only. NF vendor type. - # @!attribute [r] nf_version - # @return [::String] - # Output only. NF version. - class SiteVersion - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Workload status. - # @!attribute [r] site_version - # @return [::Google::Cloud::TelcoAutomation::V1::SiteVersion] - # Output only. SiteVersion running in the workload cluster. - # @!attribute [r] status - # @return [::String] - # Output only. Status. - class WorkloadStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # BlueprintView defines the type of view of the blueprint. - module BlueprintView - # Unspecified enum value. - BLUEPRINT_VIEW_UNSPECIFIED = 0 - - # View which only contains metadata. - BLUEPRINT_VIEW_BASIC = 1 - - # View which contains metadata and files it encapsulates. - BLUEPRINT_VIEW_FULL = 2 - end - - # DeploymentView defines the type of view of the deployment. - module DeploymentView - # Unspecified enum value. - DEPLOYMENT_VIEW_UNSPECIFIED = 0 - - # View which only contains metadata. - DEPLOYMENT_VIEW_BASIC = 1 - - # View which contains metadata and files it encapsulates. - DEPLOYMENT_VIEW_FULL = 2 - end - - # Represent type of CR. - module ResourceType - # Unspecified resource type. - RESOURCE_TYPE_UNSPECIFIED = 0 - - # User specified NF Deploy CR. - NF_DEPLOY_RESOURCE = 1 - - # CRs that are part of a blueprint. - DEPLOYMENT_RESOURCE = 2 - end - - # Status of an entity (resource, deployment). - module Status - # Unknown state. - STATUS_UNSPECIFIED = 0 - - # Under progress. - STATUS_IN_PROGRESS = 1 - - # Running and ready to serve traffic. - STATUS_ACTIVE = 2 - - # Failed or stalled. - STATUS_FAILED = 3 - - # Delete in progress. - STATUS_DELETING = 4 - - # Deleted deployment. - STATUS_DELETED = 5 - - # NFDeploy specific status. Peering in progress. - STATUS_PEERING = 10 - - # K8s objects such as NetworkAttachmentDefinition don't have a defined - # status. - STATUS_NOT_APPLICABLE = 11 - end - - # DeploymentLevel of a blueprint signifies where the blueprint will be - # applied. - module DeploymentLevel - # Default unspecified deployment level. - DEPLOYMENT_LEVEL_UNSPECIFIED = 0 - - # Blueprints at HYDRATION level cannot be used to create a Deployment - # (A user cannot manually initate deployment of these blueprints on - # orchestration or workload cluster). - # These blueprints stay in a user's private catalog and are configured and - # deployed by TNA automation. - HYDRATION = 1 - - # Blueprints at SINGLE_DEPLOYMENT level can be - # a) Modified in private catalog. - # b) Used to create a deployment on orchestration cluster by the user, once - # approved. - SINGLE_DEPLOYMENT = 2 - - # Blueprints at MULTI_DEPLOYMENT level can be - # a) Modified in private catalog. - # b) Used to create a deployment on orchestration cluster which will create - # further hydrated deployments. - MULTI_DEPLOYMENT = 3 - - # Blueprints at WORKLOAD_CLUSTER_DEPLOYMENT level can be - # a) Modified in private catalog. - # b) Used to create a deployment on workload cluster by the user, once - # approved. - WORKLOAD_CLUSTER_DEPLOYMENT = 4 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-telco_automation-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/Gemfile deleted file mode 100644 index 5dd146715d0e..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-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-telco_automation-v1", path: "../" -else - gem "google-cloud-telco_automation-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-telco_automation-v1/snippets/snippet_metadata_google.cloud.telcoautomation.v1.json b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/snippet_metadata_google.cloud.telcoautomation.v1.json deleted file mode 100644 index 7a4dce2494a0..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/snippet_metadata_google.cloud.telcoautomation.v1.json +++ /dev/null @@ -1,1455 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-telco_automation-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.telcoautomation.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ListOrchestrationClusters_sync", - "title": "Snippet for the list_orchestration_clusters call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_orchestration_clusters.", - "file": "telco_automation/list_orchestration_clusters.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_orchestration_clusters", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_orchestration_clusters", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersResponse", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "ListOrchestrationClusters", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ListOrchestrationClusters", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_GetOrchestrationCluster_sync", - "title": "Snippet for the get_orchestration_cluster call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_orchestration_cluster.", - "file": "telco_automation/get_orchestration_cluster.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_orchestration_cluster", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_orchestration_cluster", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "GetOrchestrationCluster", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.GetOrchestrationCluster", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_CreateOrchestrationCluster_sync", - "title": "Snippet for the create_orchestration_cluster call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#create_orchestration_cluster.", - "file": "telco_automation/create_orchestration_cluster.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_orchestration_cluster", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#create_orchestration_cluster", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "CreateOrchestrationCluster", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.CreateOrchestrationCluster", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_DeleteOrchestrationCluster_sync", - "title": "Snippet for the delete_orchestration_cluster call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#delete_orchestration_cluster.", - "file": "telco_automation/delete_orchestration_cluster.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_orchestration_cluster", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#delete_orchestration_cluster", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "DeleteOrchestrationCluster", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.DeleteOrchestrationCluster", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ListEdgeSlms_sync", - "title": "Snippet for the list_edge_slms call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_edge_slms.", - "file": "telco_automation/list_edge_slms.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_edge_slms", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_edge_slms", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsResponse", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "ListEdgeSlms", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ListEdgeSlms", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_GetEdgeSlm_sync", - "title": "Snippet for the get_edge_slm call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_edge_slm.", - "file": "telco_automation/get_edge_slm.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_edge_slm", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_edge_slm", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::EdgeSlm", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "GetEdgeSlm", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.GetEdgeSlm", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_CreateEdgeSlm_sync", - "title": "Snippet for the create_edge_slm call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#create_edge_slm.", - "file": "telco_automation/create_edge_slm.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_edge_slm", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#create_edge_slm", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "CreateEdgeSlm", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.CreateEdgeSlm", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_DeleteEdgeSlm_sync", - "title": "Snippet for the delete_edge_slm call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#delete_edge_slm.", - "file": "telco_automation/delete_edge_slm.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_edge_slm", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#delete_edge_slm", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "DeleteEdgeSlm", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.DeleteEdgeSlm", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_CreateBlueprint_sync", - "title": "Snippet for the create_blueprint call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#create_blueprint.", - "file": "telco_automation/create_blueprint.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_blueprint", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#create_blueprint", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::Blueprint", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "CreateBlueprint", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.CreateBlueprint", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_UpdateBlueprint_sync", - "title": "Snippet for the update_blueprint call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#update_blueprint.", - "file": "telco_automation/update_blueprint.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_blueprint", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#update_blueprint", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::Blueprint", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "UpdateBlueprint", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.UpdateBlueprint", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_GetBlueprint_sync", - "title": "Snippet for the get_blueprint call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_blueprint.", - "file": "telco_automation/get_blueprint.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_blueprint", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_blueprint", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::Blueprint", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "GetBlueprint", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.GetBlueprint", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_DeleteBlueprint_sync", - "title": "Snippet for the delete_blueprint call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#delete_blueprint.", - "file": "telco_automation/delete_blueprint.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_blueprint", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#delete_blueprint", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "DeleteBlueprint", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.DeleteBlueprint", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ListBlueprints_sync", - "title": "Snippet for the list_blueprints call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_blueprints.", - "file": "telco_automation/list_blueprints.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_blueprints", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_blueprints", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::ListBlueprintsResponse", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "ListBlueprints", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ListBlueprints", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ApproveBlueprint_sync", - "title": "Snippet for the approve_blueprint call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#approve_blueprint.", - "file": "telco_automation/approve_blueprint.rb", - "language": "RUBY", - "client_method": { - "short_name": "approve_blueprint", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#approve_blueprint", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::Blueprint", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "ApproveBlueprint", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ApproveBlueprint", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ProposeBlueprint_sync", - "title": "Snippet for the propose_blueprint call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#propose_blueprint.", - "file": "telco_automation/propose_blueprint.rb", - "language": "RUBY", - "client_method": { - "short_name": "propose_blueprint", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#propose_blueprint", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::Blueprint", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "ProposeBlueprint", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ProposeBlueprint", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_RejectBlueprint_sync", - "title": "Snippet for the reject_blueprint call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#reject_blueprint.", - "file": "telco_automation/reject_blueprint.rb", - "language": "RUBY", - "client_method": { - "short_name": "reject_blueprint", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#reject_blueprint", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::Blueprint", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "RejectBlueprint", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.RejectBlueprint", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ListBlueprintRevisions_sync", - "title": "Snippet for the list_blueprint_revisions call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_blueprint_revisions.", - "file": "telco_automation/list_blueprint_revisions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_blueprint_revisions", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_blueprint_revisions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsResponse", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "ListBlueprintRevisions", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ListBlueprintRevisions", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_SearchBlueprintRevisions_sync", - "title": "Snippet for the search_blueprint_revisions call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#search_blueprint_revisions.", - "file": "telco_automation/search_blueprint_revisions.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_blueprint_revisions", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#search_blueprint_revisions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsResponse", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "SearchBlueprintRevisions", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.SearchBlueprintRevisions", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_SearchDeploymentRevisions_sync", - "title": "Snippet for the search_deployment_revisions call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#search_deployment_revisions.", - "file": "telco_automation/search_deployment_revisions.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_deployment_revisions", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#search_deployment_revisions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsResponse", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "SearchDeploymentRevisions", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.SearchDeploymentRevisions", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_DiscardBlueprintChanges_sync", - "title": "Snippet for the discard_blueprint_changes call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#discard_blueprint_changes.", - "file": "telco_automation/discard_blueprint_changes.rb", - "language": "RUBY", - "client_method": { - "short_name": "discard_blueprint_changes", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#discard_blueprint_changes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "DiscardBlueprintChanges", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.DiscardBlueprintChanges", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ListPublicBlueprints_sync", - "title": "Snippet for the list_public_blueprints call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_public_blueprints.", - "file": "telco_automation/list_public_blueprints.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_public_blueprints", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_public_blueprints", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsResponse", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "ListPublicBlueprints", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ListPublicBlueprints", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_GetPublicBlueprint_sync", - "title": "Snippet for the get_public_blueprint call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_public_blueprint.", - "file": "telco_automation/get_public_blueprint.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_public_blueprint", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_public_blueprint", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::PublicBlueprint", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "GetPublicBlueprint", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.GetPublicBlueprint", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_CreateDeployment_sync", - "title": "Snippet for the create_deployment call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#create_deployment.", - "file": "telco_automation/create_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_deployment", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#create_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::Deployment", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "CreateDeployment", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.CreateDeployment", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_UpdateDeployment_sync", - "title": "Snippet for the update_deployment call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#update_deployment.", - "file": "telco_automation/update_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_deployment", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#update_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::Deployment", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "UpdateDeployment", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.UpdateDeployment", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_GetDeployment_sync", - "title": "Snippet for the get_deployment call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_deployment.", - "file": "telco_automation/get_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_deployment", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::Deployment", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "GetDeployment", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.GetDeployment", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_RemoveDeployment_sync", - "title": "Snippet for the remove_deployment call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#remove_deployment.", - "file": "telco_automation/remove_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "remove_deployment", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#remove_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "RemoveDeployment", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.RemoveDeployment", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ListDeployments_sync", - "title": "Snippet for the list_deployments call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_deployments.", - "file": "telco_automation/list_deployments.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_deployments", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_deployments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::ListDeploymentsResponse", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "ListDeployments", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ListDeployments", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ListDeploymentRevisions_sync", - "title": "Snippet for the list_deployment_revisions call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_deployment_revisions.", - "file": "telco_automation/list_deployment_revisions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_deployment_revisions", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_deployment_revisions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsResponse", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "ListDeploymentRevisions", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ListDeploymentRevisions", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_DiscardDeploymentChanges_sync", - "title": "Snippet for the discard_deployment_changes call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#discard_deployment_changes.", - "file": "telco_automation/discard_deployment_changes.rb", - "language": "RUBY", - "client_method": { - "short_name": "discard_deployment_changes", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#discard_deployment_changes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "DiscardDeploymentChanges", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.DiscardDeploymentChanges", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ApplyDeployment_sync", - "title": "Snippet for the apply_deployment call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#apply_deployment.", - "file": "telco_automation/apply_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "apply_deployment", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#apply_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::Deployment", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "ApplyDeployment", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ApplyDeployment", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ComputeDeploymentStatus_sync", - "title": "Snippet for the compute_deployment_status call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#compute_deployment_status.", - "file": "telco_automation/compute_deployment_status.rb", - "language": "RUBY", - "client_method": { - "short_name": "compute_deployment_status", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#compute_deployment_status", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "ComputeDeploymentStatus", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ComputeDeploymentStatus", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_RollbackDeployment_sync", - "title": "Snippet for the rollback_deployment call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#rollback_deployment.", - "file": "telco_automation/rollback_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "rollback_deployment", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#rollback_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::Deployment", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "RollbackDeployment", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.RollbackDeployment", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_GetHydratedDeployment_sync", - "title": "Snippet for the get_hydrated_deployment call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_hydrated_deployment.", - "file": "telco_automation/get_hydrated_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_hydrated_deployment", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_hydrated_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::HydratedDeployment", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "GetHydratedDeployment", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.GetHydratedDeployment", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ListHydratedDeployments_sync", - "title": "Snippet for the list_hydrated_deployments call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_hydrated_deployments.", - "file": "telco_automation/list_hydrated_deployments.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_hydrated_deployments", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_hydrated_deployments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsResponse", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "ListHydratedDeployments", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ListHydratedDeployments", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_UpdateHydratedDeployment_sync", - "title": "Snippet for the update_hydrated_deployment call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#update_hydrated_deployment.", - "file": "telco_automation/update_hydrated_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_hydrated_deployment", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#update_hydrated_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::HydratedDeployment", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "UpdateHydratedDeployment", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.UpdateHydratedDeployment", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "telcoautomation_v1_generated_TelcoAutomation_ApplyHydratedDeployment_sync", - "title": "Snippet for the apply_hydrated_deployment call in the TelcoAutomation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#apply_hydrated_deployment.", - "file": "telco_automation/apply_hydrated_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "apply_hydrated_deployment", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#apply_hydrated_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TelcoAutomation::V1::HydratedDeployment", - "client": { - "short_name": "TelcoAutomation::Client", - "full_name": "::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client" - }, - "method": { - "short_name": "ApplyHydratedDeployment", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation.ApplyHydratedDeployment", - "service": { - "short_name": "TelcoAutomation", - "full_name": "google.cloud.telcoautomation.v1.TelcoAutomation" - } - } - }, - "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-telco_automation-v1/snippets/telco_automation/apply_deployment.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/apply_deployment.rb deleted file mode 100644 index 6ef9fad80a28..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/apply_deployment.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 telcoautomation_v1_generated_TelcoAutomation_ApplyDeployment_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the apply_deployment call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#apply_deployment. -# -def apply_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest.new - - # Call the apply_deployment method. - result = client.apply_deployment request - - # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. - p result -end -# [END telcoautomation_v1_generated_TelcoAutomation_ApplyDeployment_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/apply_hydrated_deployment.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/apply_hydrated_deployment.rb deleted file mode 100644 index 2b072dc5c67e..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/apply_hydrated_deployment.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 telcoautomation_v1_generated_TelcoAutomation_ApplyHydratedDeployment_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the apply_hydrated_deployment call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#apply_hydrated_deployment. -# -def apply_hydrated_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest.new - - # Call the apply_hydrated_deployment method. - result = client.apply_hydrated_deployment request - - # The returned object is of type Google::Cloud::TelcoAutomation::V1::HydratedDeployment. - p result -end -# [END telcoautomation_v1_generated_TelcoAutomation_ApplyHydratedDeployment_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/approve_blueprint.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/approve_blueprint.rb deleted file mode 100644 index f575adec66b0..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/approve_blueprint.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 telcoautomation_v1_generated_TelcoAutomation_ApproveBlueprint_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the approve_blueprint call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#approve_blueprint. -# -def approve_blueprint - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest.new - - # Call the approve_blueprint method. - result = client.approve_blueprint request - - # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. - p result -end -# [END telcoautomation_v1_generated_TelcoAutomation_ApproveBlueprint_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/compute_deployment_status.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/compute_deployment_status.rb deleted file mode 100644 index 649e4df861e0..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/compute_deployment_status.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 telcoautomation_v1_generated_TelcoAutomation_ComputeDeploymentStatus_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the compute_deployment_status call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#compute_deployment_status. -# -def compute_deployment_status - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest.new - - # Call the compute_deployment_status method. - result = client.compute_deployment_status request - - # The returned object is of type Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse. - p result -end -# [END telcoautomation_v1_generated_TelcoAutomation_ComputeDeploymentStatus_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_blueprint.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_blueprint.rb deleted file mode 100644 index fb48fce111ce..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_blueprint.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 telcoautomation_v1_generated_TelcoAutomation_CreateBlueprint_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the create_blueprint call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#create_blueprint. -# -def create_blueprint - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest.new - - # Call the create_blueprint method. - result = client.create_blueprint request - - # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. - p result -end -# [END telcoautomation_v1_generated_TelcoAutomation_CreateBlueprint_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_deployment.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_deployment.rb deleted file mode 100644 index 50957be164fc..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_deployment.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 telcoautomation_v1_generated_TelcoAutomation_CreateDeployment_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the create_deployment call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#create_deployment. -# -def create_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest.new - - # Call the create_deployment method. - result = client.create_deployment request - - # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. - p result -end -# [END telcoautomation_v1_generated_TelcoAutomation_CreateDeployment_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_edge_slm.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_edge_slm.rb deleted file mode 100644 index 09483c7f6561..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_edge_slm.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 telcoautomation_v1_generated_TelcoAutomation_CreateEdgeSlm_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the create_edge_slm call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#create_edge_slm. -# -def create_edge_slm - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest.new - - # Call the create_edge_slm method. - result = client.create_edge_slm request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END telcoautomation_v1_generated_TelcoAutomation_CreateEdgeSlm_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_orchestration_cluster.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_orchestration_cluster.rb deleted file mode 100644 index 9e819520ccbe..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/create_orchestration_cluster.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 telcoautomation_v1_generated_TelcoAutomation_CreateOrchestrationCluster_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the create_orchestration_cluster call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#create_orchestration_cluster. -# -def create_orchestration_cluster - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest.new - - # Call the create_orchestration_cluster method. - result = client.create_orchestration_cluster request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END telcoautomation_v1_generated_TelcoAutomation_CreateOrchestrationCluster_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/delete_blueprint.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/delete_blueprint.rb deleted file mode 100644 index 7d2053f3fbe9..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/delete_blueprint.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 telcoautomation_v1_generated_TelcoAutomation_DeleteBlueprint_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the delete_blueprint call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#delete_blueprint. -# -def delete_blueprint - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest.new - - # Call the delete_blueprint method. - result = client.delete_blueprint request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END telcoautomation_v1_generated_TelcoAutomation_DeleteBlueprint_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/delete_edge_slm.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/delete_edge_slm.rb deleted file mode 100644 index 3c881a5faac3..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/delete_edge_slm.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 telcoautomation_v1_generated_TelcoAutomation_DeleteEdgeSlm_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the delete_edge_slm call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#delete_edge_slm. -# -def delete_edge_slm - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest.new - - # Call the delete_edge_slm method. - result = client.delete_edge_slm request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END telcoautomation_v1_generated_TelcoAutomation_DeleteEdgeSlm_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/delete_orchestration_cluster.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/delete_orchestration_cluster.rb deleted file mode 100644 index ec4c90ef42c6..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/delete_orchestration_cluster.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 telcoautomation_v1_generated_TelcoAutomation_DeleteOrchestrationCluster_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the delete_orchestration_cluster call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#delete_orchestration_cluster. -# -def delete_orchestration_cluster - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest.new - - # Call the delete_orchestration_cluster method. - result = client.delete_orchestration_cluster request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END telcoautomation_v1_generated_TelcoAutomation_DeleteOrchestrationCluster_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/discard_blueprint_changes.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/discard_blueprint_changes.rb deleted file mode 100644 index 7a6b315bbc97..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/discard_blueprint_changes.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 telcoautomation_v1_generated_TelcoAutomation_DiscardBlueprintChanges_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the discard_blueprint_changes call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#discard_blueprint_changes. -# -def discard_blueprint_changes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest.new - - # Call the discard_blueprint_changes method. - result = client.discard_blueprint_changes request - - # The returned object is of type Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse. - p result -end -# [END telcoautomation_v1_generated_TelcoAutomation_DiscardBlueprintChanges_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/discard_deployment_changes.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/discard_deployment_changes.rb deleted file mode 100644 index 4c200c82912b..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/discard_deployment_changes.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 telcoautomation_v1_generated_TelcoAutomation_DiscardDeploymentChanges_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the discard_deployment_changes call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#discard_deployment_changes. -# -def discard_deployment_changes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest.new - - # Call the discard_deployment_changes method. - result = client.discard_deployment_changes request - - # The returned object is of type Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse. - p result -end -# [END telcoautomation_v1_generated_TelcoAutomation_DiscardDeploymentChanges_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_blueprint.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_blueprint.rb deleted file mode 100644 index f6389e7206c7..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_blueprint.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 telcoautomation_v1_generated_TelcoAutomation_GetBlueprint_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the get_blueprint call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_blueprint. -# -def get_blueprint - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest.new - - # Call the get_blueprint method. - result = client.get_blueprint request - - # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. - p result -end -# [END telcoautomation_v1_generated_TelcoAutomation_GetBlueprint_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_deployment.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_deployment.rb deleted file mode 100644 index d7affc180770..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_deployment.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 telcoautomation_v1_generated_TelcoAutomation_GetDeployment_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the get_deployment call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_deployment. -# -def get_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest.new - - # Call the get_deployment method. - result = client.get_deployment request - - # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. - p result -end -# [END telcoautomation_v1_generated_TelcoAutomation_GetDeployment_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_edge_slm.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_edge_slm.rb deleted file mode 100644 index 028ca2b921b3..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_edge_slm.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 telcoautomation_v1_generated_TelcoAutomation_GetEdgeSlm_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the get_edge_slm call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_edge_slm. -# -def get_edge_slm - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest.new - - # Call the get_edge_slm method. - result = client.get_edge_slm request - - # The returned object is of type Google::Cloud::TelcoAutomation::V1::EdgeSlm. - p result -end -# [END telcoautomation_v1_generated_TelcoAutomation_GetEdgeSlm_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_hydrated_deployment.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_hydrated_deployment.rb deleted file mode 100644 index e0fd8ecf6de2..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_hydrated_deployment.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 telcoautomation_v1_generated_TelcoAutomation_GetHydratedDeployment_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the get_hydrated_deployment call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_hydrated_deployment. -# -def get_hydrated_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest.new - - # Call the get_hydrated_deployment method. - result = client.get_hydrated_deployment request - - # The returned object is of type Google::Cloud::TelcoAutomation::V1::HydratedDeployment. - p result -end -# [END telcoautomation_v1_generated_TelcoAutomation_GetHydratedDeployment_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_orchestration_cluster.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_orchestration_cluster.rb deleted file mode 100644 index 868d0765f0e5..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_orchestration_cluster.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 telcoautomation_v1_generated_TelcoAutomation_GetOrchestrationCluster_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the get_orchestration_cluster call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_orchestration_cluster. -# -def get_orchestration_cluster - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest.new - - # Call the get_orchestration_cluster method. - result = client.get_orchestration_cluster request - - # The returned object is of type Google::Cloud::TelcoAutomation::V1::OrchestrationCluster. - p result -end -# [END telcoautomation_v1_generated_TelcoAutomation_GetOrchestrationCluster_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_public_blueprint.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_public_blueprint.rb deleted file mode 100644 index 042660f4b4e8..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/get_public_blueprint.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 telcoautomation_v1_generated_TelcoAutomation_GetPublicBlueprint_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the get_public_blueprint call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#get_public_blueprint. -# -def get_public_blueprint - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest.new - - # Call the get_public_blueprint method. - result = client.get_public_blueprint request - - # The returned object is of type Google::Cloud::TelcoAutomation::V1::PublicBlueprint. - p result -end -# [END telcoautomation_v1_generated_TelcoAutomation_GetPublicBlueprint_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_blueprint_revisions.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_blueprint_revisions.rb deleted file mode 100644 index 6d392a9c3b56..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_blueprint_revisions.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 telcoautomation_v1_generated_TelcoAutomation_ListBlueprintRevisions_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the list_blueprint_revisions call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_blueprint_revisions. -# -def list_blueprint_revisions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest.new - - # Call the list_blueprint_revisions method. - result = client.list_blueprint_revisions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Blueprint. - p item - end -end -# [END telcoautomation_v1_generated_TelcoAutomation_ListBlueprintRevisions_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_blueprints.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_blueprints.rb deleted file mode 100644 index 3c3110dd1491..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_blueprints.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 telcoautomation_v1_generated_TelcoAutomation_ListBlueprints_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the list_blueprints call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_blueprints. -# -def list_blueprints - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest.new - - # Call the list_blueprints method. - result = client.list_blueprints request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Blueprint. - p item - end -end -# [END telcoautomation_v1_generated_TelcoAutomation_ListBlueprints_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_deployment_revisions.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_deployment_revisions.rb deleted file mode 100644 index 8135cf5b7fa2..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_deployment_revisions.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 telcoautomation_v1_generated_TelcoAutomation_ListDeploymentRevisions_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the list_deployment_revisions call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_deployment_revisions. -# -def list_deployment_revisions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest.new - - # Call the list_deployment_revisions method. - result = client.list_deployment_revisions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Deployment. - p item - end -end -# [END telcoautomation_v1_generated_TelcoAutomation_ListDeploymentRevisions_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_deployments.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_deployments.rb deleted file mode 100644 index 4c263b609502..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_deployments.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 telcoautomation_v1_generated_TelcoAutomation_ListDeployments_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the list_deployments call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_deployments. -# -def list_deployments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest.new - - # Call the list_deployments method. - result = client.list_deployments request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Deployment. - p item - end -end -# [END telcoautomation_v1_generated_TelcoAutomation_ListDeployments_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_edge_slms.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_edge_slms.rb deleted file mode 100644 index 764597f3e805..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_edge_slms.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 telcoautomation_v1_generated_TelcoAutomation_ListEdgeSlms_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the list_edge_slms call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_edge_slms. -# -def list_edge_slms - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest.new - - # Call the list_edge_slms method. - result = client.list_edge_slms request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::TelcoAutomation::V1::EdgeSlm. - p item - end -end -# [END telcoautomation_v1_generated_TelcoAutomation_ListEdgeSlms_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_hydrated_deployments.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_hydrated_deployments.rb deleted file mode 100644 index 5ef1508c264d..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_hydrated_deployments.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 telcoautomation_v1_generated_TelcoAutomation_ListHydratedDeployments_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the list_hydrated_deployments call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_hydrated_deployments. -# -def list_hydrated_deployments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest.new - - # Call the list_hydrated_deployments method. - result = client.list_hydrated_deployments request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment. - p item - end -end -# [END telcoautomation_v1_generated_TelcoAutomation_ListHydratedDeployments_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_orchestration_clusters.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_orchestration_clusters.rb deleted file mode 100644 index 8843a3d25975..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_orchestration_clusters.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 telcoautomation_v1_generated_TelcoAutomation_ListOrchestrationClusters_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the list_orchestration_clusters call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_orchestration_clusters. -# -def list_orchestration_clusters - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest.new - - # Call the list_orchestration_clusters method. - result = client.list_orchestration_clusters request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster. - p item - end -end -# [END telcoautomation_v1_generated_TelcoAutomation_ListOrchestrationClusters_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_public_blueprints.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_public_blueprints.rb deleted file mode 100644 index e1b5503b4efd..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/list_public_blueprints.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 telcoautomation_v1_generated_TelcoAutomation_ListPublicBlueprints_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the list_public_blueprints call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#list_public_blueprints. -# -def list_public_blueprints - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest.new - - # Call the list_public_blueprints method. - result = client.list_public_blueprints request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::TelcoAutomation::V1::PublicBlueprint. - p item - end -end -# [END telcoautomation_v1_generated_TelcoAutomation_ListPublicBlueprints_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/propose_blueprint.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/propose_blueprint.rb deleted file mode 100644 index b7ec509c5f02..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/propose_blueprint.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 telcoautomation_v1_generated_TelcoAutomation_ProposeBlueprint_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the propose_blueprint call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#propose_blueprint. -# -def propose_blueprint - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest.new - - # Call the propose_blueprint method. - result = client.propose_blueprint request - - # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. - p result -end -# [END telcoautomation_v1_generated_TelcoAutomation_ProposeBlueprint_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/reject_blueprint.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/reject_blueprint.rb deleted file mode 100644 index 75a4ea6ea8af..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/reject_blueprint.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 telcoautomation_v1_generated_TelcoAutomation_RejectBlueprint_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the reject_blueprint call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#reject_blueprint. -# -def reject_blueprint - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest.new - - # Call the reject_blueprint method. - result = client.reject_blueprint request - - # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. - p result -end -# [END telcoautomation_v1_generated_TelcoAutomation_RejectBlueprint_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/remove_deployment.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/remove_deployment.rb deleted file mode 100644 index bb2d2295d142..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/remove_deployment.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 telcoautomation_v1_generated_TelcoAutomation_RemoveDeployment_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the remove_deployment call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#remove_deployment. -# -def remove_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest.new - - # Call the remove_deployment method. - result = client.remove_deployment request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END telcoautomation_v1_generated_TelcoAutomation_RemoveDeployment_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/rollback_deployment.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/rollback_deployment.rb deleted file mode 100644 index b8ca6cdd4e1e..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/rollback_deployment.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 telcoautomation_v1_generated_TelcoAutomation_RollbackDeployment_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the rollback_deployment call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#rollback_deployment. -# -def rollback_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest.new - - # Call the rollback_deployment method. - result = client.rollback_deployment request - - # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. - p result -end -# [END telcoautomation_v1_generated_TelcoAutomation_RollbackDeployment_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/search_blueprint_revisions.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/search_blueprint_revisions.rb deleted file mode 100644 index decfa6d9bc27..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/search_blueprint_revisions.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 telcoautomation_v1_generated_TelcoAutomation_SearchBlueprintRevisions_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the search_blueprint_revisions call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#search_blueprint_revisions. -# -def search_blueprint_revisions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest.new - - # Call the search_blueprint_revisions method. - result = client.search_blueprint_revisions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Blueprint. - p item - end -end -# [END telcoautomation_v1_generated_TelcoAutomation_SearchBlueprintRevisions_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/search_deployment_revisions.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/search_deployment_revisions.rb deleted file mode 100644 index a17c4de2a015..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/search_deployment_revisions.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 telcoautomation_v1_generated_TelcoAutomation_SearchDeploymentRevisions_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the search_deployment_revisions call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#search_deployment_revisions. -# -def search_deployment_revisions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest.new - - # Call the search_deployment_revisions method. - result = client.search_deployment_revisions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::TelcoAutomation::V1::Deployment. - p item - end -end -# [END telcoautomation_v1_generated_TelcoAutomation_SearchDeploymentRevisions_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/update_blueprint.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/update_blueprint.rb deleted file mode 100644 index 1281abedf47a..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/update_blueprint.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 telcoautomation_v1_generated_TelcoAutomation_UpdateBlueprint_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the update_blueprint call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#update_blueprint. -# -def update_blueprint - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest.new - - # Call the update_blueprint method. - result = client.update_blueprint request - - # The returned object is of type Google::Cloud::TelcoAutomation::V1::Blueprint. - p result -end -# [END telcoautomation_v1_generated_TelcoAutomation_UpdateBlueprint_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/update_deployment.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/update_deployment.rb deleted file mode 100644 index 3baab957f9bb..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/update_deployment.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 telcoautomation_v1_generated_TelcoAutomation_UpdateDeployment_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the update_deployment call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#update_deployment. -# -def update_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest.new - - # Call the update_deployment method. - result = client.update_deployment request - - # The returned object is of type Google::Cloud::TelcoAutomation::V1::Deployment. - p result -end -# [END telcoautomation_v1_generated_TelcoAutomation_UpdateDeployment_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/update_hydrated_deployment.rb b/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/update_hydrated_deployment.rb deleted file mode 100644 index b99b772b91c4..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/snippets/telco_automation/update_hydrated_deployment.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 telcoautomation_v1_generated_TelcoAutomation_UpdateHydratedDeployment_sync] -require "google/cloud/telco_automation/v1" - -## -# Snippet for the update_hydrated_deployment call in the TelcoAutomation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client#update_hydrated_deployment. -# -def update_hydrated_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest.new - - # Call the update_hydrated_deployment method. - result = client.update_hydrated_deployment request - - # The returned object is of type Google::Cloud::TelcoAutomation::V1::HydratedDeployment. - p result -end -# [END telcoautomation_v1_generated_TelcoAutomation_UpdateHydratedDeployment_sync] diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_operations_test.rb b/owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_operations_test.rb deleted file mode 100644 index eedbcf1982df..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_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/telcoautomation/v1/telcoautomation_pb" -require "google/cloud/telcoautomation/v1/telcoautomation_services_pb" -require "google/cloud/telco_automation/v1/telco_automation" - -class ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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::TelcoAutomation::V1::TelcoAutomation::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::TelcoAutomation::V1::TelcoAutomation::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::TelcoAutomation::V1::TelcoAutomation::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::TelcoAutomation::V1::TelcoAutomation::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::TelcoAutomation::V1::TelcoAutomation::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::TelcoAutomation::V1::TelcoAutomation::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::TelcoAutomation::V1::TelcoAutomation::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_paths_test.rb b/owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_paths_test.rb deleted file mode 100644 index e833fcbea5eb..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_paths_test.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/telco_automation/v1/telco_automation" - -class ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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_blueprint_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.blueprint_path project: "value0", location: "value1", orchestration_cluster: "value2", blueprint: "value3" - assert_equal "projects/value0/locations/value1/orchestrationClusters/value2/blueprints/value3", path - end - end - - def test_deployment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.deployment_path project: "value0", location: "value1", orchestration_cluster: "value2", deployment: "value3" - assert_equal "projects/value0/locations/value1/orchestrationClusters/value2/deployments/value3", path - end - end - - def test_edge_slm_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.edge_slm_path project: "value0", location: "value1", edge_slm: "value2" - assert_equal "projects/value0/locations/value1/edgeSlms/value2", path - end - end - - def test_hydrated_deployment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.hydrated_deployment_path project: "value0", location: "value1", orchestration_cluster: "value2", deployment: "value3", hydrated_deployment: "value4" - assert_equal "projects/value0/locations/value1/orchestrationClusters/value2/deployments/value3/hydratedDeployments/value4", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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_orchestration_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::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.orchestration_cluster_path project: "value0", location: "value1", orchestration_cluster: "value2" - assert_equal "projects/value0/locations/value1/orchestrationClusters/value2", path - end - end - - def test_public_blueprint_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.public_blueprint_path project: "value0", location: "value1", public_lueprint: "value2" - assert_equal "projects/value0/locations/value1/publicBlueprints/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_rest_test.rb b/owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_rest_test.rb deleted file mode 100644 index dfa385ab3434..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_rest_test.rb +++ /dev/null @@ -1,2089 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/telcoautomation/v1/telcoautomation_pb" -require "google/cloud/telco_automation/v1/telco_automation/rest" - - -class ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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_orchestration_clusters - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersResponse.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_orchestration_clusters_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_list_orchestration_clusters_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_orchestration_clusters_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_orchestration_clusters({ parent: parent, page_size: 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_orchestration_clusters parent: parent, page_size: 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_orchestration_clusters ::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest.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_orchestration_clusters({ parent: parent, page_size: page_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_orchestration_clusters(::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest.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_orchestration_clusters_client_stub.call_count - end - end - end - - def test_get_orchestration_cluster - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_orchestration_cluster_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_get_orchestration_cluster_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_orchestration_cluster_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_orchestration_cluster({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_orchestration_cluster name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_orchestration_cluster ::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_orchestration_cluster({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_orchestration_cluster(::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_orchestration_cluster_client_stub.call_count - end - end - end - - def test_create_orchestration_cluster - # Create test objects. - 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" - orchestration_cluster_id = "hello world" - orchestration_cluster = {} - request_id = "hello world" - - create_orchestration_cluster_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_create_orchestration_cluster_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_orchestration_cluster_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_orchestration_cluster({ parent: parent, orchestration_cluster_id: orchestration_cluster_id, orchestration_cluster: orchestration_cluster, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_orchestration_cluster parent: parent, orchestration_cluster_id: orchestration_cluster_id, orchestration_cluster: orchestration_cluster, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_orchestration_cluster ::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest.new(parent: parent, orchestration_cluster_id: orchestration_cluster_id, orchestration_cluster: orchestration_cluster, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_orchestration_cluster({ parent: parent, orchestration_cluster_id: orchestration_cluster_id, orchestration_cluster: orchestration_cluster, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_orchestration_cluster(::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest.new(parent: parent, orchestration_cluster_id: orchestration_cluster_id, orchestration_cluster: orchestration_cluster, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_orchestration_cluster_client_stub.call_count - end - end - end - - def test_delete_orchestration_cluster - # Create test objects. - 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_orchestration_cluster_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_delete_orchestration_cluster_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_orchestration_cluster_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_orchestration_cluster({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_orchestration_cluster name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_orchestration_cluster ::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest.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_orchestration_cluster({ 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_orchestration_cluster(::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest.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_orchestration_cluster_client_stub.call_count - end - end - end - - def test_list_edge_slms - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsResponse.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_edge_slms_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_list_edge_slms_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_edge_slms_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_edge_slms({ parent: parent, page_size: 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_edge_slms parent: parent, page_size: 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_edge_slms ::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest.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_edge_slms({ parent: parent, page_size: page_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_edge_slms(::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest.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_edge_slms_client_stub.call_count - end - end - end - - def test_get_edge_slm - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::EdgeSlm.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_edge_slm_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_get_edge_slm_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_edge_slm_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_edge_slm({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_edge_slm name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_edge_slm ::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_edge_slm({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_edge_slm(::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_edge_slm_client_stub.call_count - end - end - end - - def test_create_edge_slm - # Create test objects. - 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" - edge_slm_id = "hello world" - edge_slm = {} - request_id = "hello world" - - create_edge_slm_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_create_edge_slm_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_edge_slm_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_edge_slm({ parent: parent, edge_slm_id: edge_slm_id, edge_slm: edge_slm, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_edge_slm parent: parent, edge_slm_id: edge_slm_id, edge_slm: edge_slm, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_edge_slm ::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest.new(parent: parent, edge_slm_id: edge_slm_id, edge_slm: edge_slm, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_edge_slm({ parent: parent, edge_slm_id: edge_slm_id, edge_slm: edge_slm, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_edge_slm(::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest.new(parent: parent, edge_slm_id: edge_slm_id, edge_slm: edge_slm, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_edge_slm_client_stub.call_count - end - end - end - - def test_delete_edge_slm - # Create test objects. - 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_edge_slm_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_delete_edge_slm_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_edge_slm_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_edge_slm({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_edge_slm name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_edge_slm ::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest.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_edge_slm({ 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_edge_slm(::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest.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_edge_slm_client_stub.call_count - end - end - end - - def test_create_blueprint - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::Blueprint.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - blueprint_id = "hello world" - blueprint = {} - - create_blueprint_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_create_blueprint_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_blueprint_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_blueprint({ parent: parent, blueprint_id: blueprint_id, blueprint: blueprint }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_blueprint parent: parent, blueprint_id: blueprint_id, blueprint: blueprint do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_blueprint ::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest.new(parent: parent, blueprint_id: blueprint_id, blueprint: blueprint) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_blueprint({ parent: parent, blueprint_id: blueprint_id, blueprint: blueprint }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_blueprint(::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest.new(parent: parent, blueprint_id: blueprint_id, blueprint: blueprint), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_blueprint_client_stub.call_count - end - end - end - - def test_update_blueprint - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::Blueprint.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - blueprint = {} - update_mask = {} - - update_blueprint_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_update_blueprint_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_blueprint_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_blueprint({ blueprint: blueprint, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_blueprint blueprint: blueprint, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_blueprint ::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest.new(blueprint: blueprint, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_blueprint({ blueprint: blueprint, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_blueprint(::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest.new(blueprint: blueprint, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_blueprint_client_stub.call_count - end - end - end - - def test_get_blueprint - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::Blueprint.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :BLUEPRINT_VIEW_UNSPECIFIED - - get_blueprint_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_get_blueprint_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_blueprint_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_blueprint({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_blueprint name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_blueprint ::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_blueprint({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_blueprint(::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_blueprint_client_stub.call_count - end - end - end - - def test_delete_blueprint - # 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_blueprint_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_delete_blueprint_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_blueprint_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_blueprint({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_blueprint name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_blueprint ::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_blueprint({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_blueprint(::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_blueprint_client_stub.call_count - end - end - end - - def test_list_blueprints - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::ListBlueprintsResponse.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_blueprints_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_list_blueprints_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_blueprints_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_blueprints({ 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_blueprints 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_blueprints ::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest.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_blueprints({ 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_blueprints(::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest.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_blueprints_client_stub.call_count - end - end - end - - def test_approve_blueprint - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::Blueprint.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - approve_blueprint_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_approve_blueprint_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, approve_blueprint_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.approve_blueprint({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.approve_blueprint name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.approve_blueprint ::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.approve_blueprint({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.approve_blueprint(::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, approve_blueprint_client_stub.call_count - end - end - end - - def test_propose_blueprint - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::Blueprint.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - propose_blueprint_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_propose_blueprint_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, propose_blueprint_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.propose_blueprint({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.propose_blueprint name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.propose_blueprint ::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.propose_blueprint({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.propose_blueprint(::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, propose_blueprint_client_stub.call_count - end - end - end - - def test_reject_blueprint - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::Blueprint.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - reject_blueprint_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_reject_blueprint_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, reject_blueprint_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.reject_blueprint({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.reject_blueprint name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.reject_blueprint ::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.reject_blueprint({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.reject_blueprint(::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, reject_blueprint_client_stub.call_count - end - end - end - - def test_list_blueprint_revisions - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - page_size = 42 - page_token = "hello world" - - list_blueprint_revisions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_list_blueprint_revisions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_blueprint_revisions_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_blueprint_revisions({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_blueprint_revisions name: name, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_blueprint_revisions ::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest.new(name: name, 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_blueprint_revisions({ name: name, 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_blueprint_revisions(::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest.new(name: name, 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_blueprint_revisions_client_stub.call_count - end - end - end - - def test_search_blueprint_revisions - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - query = "hello world" - page_size = 42 - page_token = "hello world" - - search_blueprint_revisions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_search_blueprint_revisions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_blueprint_revisions_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.search_blueprint_revisions({ parent: parent, query: query, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.search_blueprint_revisions parent: parent, query: query, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.search_blueprint_revisions ::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest.new(parent: parent, query: query, 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.search_blueprint_revisions({ parent: parent, query: query, 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.search_blueprint_revisions(::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest.new(parent: parent, query: query, 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, search_blueprint_revisions_client_stub.call_count - end - end - end - - def test_search_deployment_revisions - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - query = "hello world" - page_size = 42 - page_token = "hello world" - - search_deployment_revisions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_search_deployment_revisions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_deployment_revisions_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.search_deployment_revisions({ parent: parent, query: query, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.search_deployment_revisions parent: parent, query: query, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.search_deployment_revisions ::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest.new(parent: parent, query: query, 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.search_deployment_revisions({ parent: parent, query: query, 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.search_deployment_revisions(::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest.new(parent: parent, query: query, 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, search_deployment_revisions_client_stub.call_count - end - end - end - - def test_discard_blueprint_changes - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - discard_blueprint_changes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_discard_blueprint_changes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, discard_blueprint_changes_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.discard_blueprint_changes({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.discard_blueprint_changes name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.discard_blueprint_changes ::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.discard_blueprint_changes({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.discard_blueprint_changes(::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, discard_blueprint_changes_client_stub.call_count - end - end - end - - def test_list_public_blueprints - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsResponse.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_public_blueprints_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_list_public_blueprints_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_public_blueprints_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_public_blueprints({ 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_public_blueprints 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_public_blueprints ::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest.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_public_blueprints({ 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_public_blueprints(::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest.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_public_blueprints_client_stub.call_count - end - end - end - - def test_get_public_blueprint - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::PublicBlueprint.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_public_blueprint_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_get_public_blueprint_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_public_blueprint_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_public_blueprint({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_public_blueprint name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_public_blueprint ::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_public_blueprint({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_public_blueprint(::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_public_blueprint_client_stub.call_count - end - end - end - - def test_create_deployment - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::Deployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - deployment_id = "hello world" - deployment = {} - - create_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_create_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_deployment_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_deployment({ parent: parent, deployment_id: deployment_id, deployment: deployment }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_deployment parent: parent, deployment_id: deployment_id, deployment: deployment do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_deployment ::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest.new(parent: parent, deployment_id: deployment_id, deployment: deployment) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_deployment({ parent: parent, deployment_id: deployment_id, deployment: deployment }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_deployment(::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest.new(parent: parent, deployment_id: deployment_id, deployment: deployment), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_deployment_client_stub.call_count - end - end - end - - def test_update_deployment - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::Deployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - deployment = {} - update_mask = {} - - update_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_update_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_deployment_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_deployment({ deployment: deployment, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_deployment deployment: deployment, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_deployment ::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest.new(deployment: deployment, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_deployment({ deployment: deployment, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_deployment(::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest.new(deployment: deployment, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_deployment_client_stub.call_count - end - end - end - - def test_get_deployment - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::Deployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :DEPLOYMENT_VIEW_UNSPECIFIED - - get_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_get_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_deployment_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_deployment({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_deployment name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_deployment ::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_deployment({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_deployment(::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_deployment_client_stub.call_count - end - end - end - - def test_remove_deployment - # 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" - - remove_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_remove_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, remove_deployment_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.remove_deployment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.remove_deployment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.remove_deployment ::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.remove_deployment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.remove_deployment(::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, remove_deployment_client_stub.call_count - end - end - end - - def test_list_deployments - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::ListDeploymentsResponse.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_deployments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_list_deployments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_deployments_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_deployments({ 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_deployments 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_deployments ::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest.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_deployments({ 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_deployments(::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest.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_deployments_client_stub.call_count - end - end - end - - def test_list_deployment_revisions - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - page_size = 42 - page_token = "hello world" - - list_deployment_revisions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_list_deployment_revisions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_deployment_revisions_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_deployment_revisions({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_deployment_revisions name: name, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_deployment_revisions ::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest.new(name: name, 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_deployment_revisions({ name: name, 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_deployment_revisions(::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest.new(name: name, 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_deployment_revisions_client_stub.call_count - end - end - end - - def test_discard_deployment_changes - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - discard_deployment_changes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_discard_deployment_changes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, discard_deployment_changes_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.discard_deployment_changes({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.discard_deployment_changes name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.discard_deployment_changes ::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.discard_deployment_changes({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.discard_deployment_changes(::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, discard_deployment_changes_client_stub.call_count - end - end - end - - def test_apply_deployment - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::Deployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - apply_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_apply_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, apply_deployment_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.apply_deployment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.apply_deployment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.apply_deployment ::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.apply_deployment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.apply_deployment(::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, apply_deployment_client_stub.call_count - end - end - end - - def test_compute_deployment_status - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - compute_deployment_status_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_compute_deployment_status_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, compute_deployment_status_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.compute_deployment_status({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.compute_deployment_status name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.compute_deployment_status ::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.compute_deployment_status({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.compute_deployment_status(::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, compute_deployment_status_client_stub.call_count - end - end - end - - def test_rollback_deployment - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::Deployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - revision_id = "hello world" - - rollback_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_rollback_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, rollback_deployment_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.rollback_deployment({ name: name, revision_id: revision_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.rollback_deployment name: name, revision_id: revision_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.rollback_deployment ::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest.new(name: name, revision_id: revision_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.rollback_deployment({ name: name, revision_id: revision_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.rollback_deployment(::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest.new(name: name, revision_id: revision_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, rollback_deployment_client_stub.call_count - end - end - end - - def test_get_hydrated_deployment - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_hydrated_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_get_hydrated_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_hydrated_deployment_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_hydrated_deployment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_hydrated_deployment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_hydrated_deployment ::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_hydrated_deployment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_hydrated_deployment(::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_hydrated_deployment_client_stub.call_count - end - end - end - - def test_list_hydrated_deployments - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsResponse.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_hydrated_deployments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_list_hydrated_deployments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_hydrated_deployments_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_hydrated_deployments({ 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_hydrated_deployments 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_hydrated_deployments ::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest.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_hydrated_deployments({ 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_hydrated_deployments(::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest.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_hydrated_deployments_client_stub.call_count - end - end - end - - def test_update_hydrated_deployment - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - hydrated_deployment = {} - update_mask = {} - - update_hydrated_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_update_hydrated_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_hydrated_deployment_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_hydrated_deployment({ hydrated_deployment: hydrated_deployment, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_hydrated_deployment hydrated_deployment: hydrated_deployment, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_hydrated_deployment ::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest.new(hydrated_deployment: hydrated_deployment, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_hydrated_deployment({ hydrated_deployment: hydrated_deployment, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_hydrated_deployment(::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest.new(hydrated_deployment: hydrated_deployment, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_hydrated_deployment_client_stub.call_count - end - end - end - - def test_apply_hydrated_deployment - # Create test objects. - client_result = ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - apply_hydrated_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::ServiceStub.stub :transcode_apply_hydrated_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, apply_hydrated_deployment_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.apply_hydrated_deployment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.apply_hydrated_deployment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.apply_hydrated_deployment ::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.apply_hydrated_deployment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.apply_hydrated_deployment(::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, apply_hydrated_deployment_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::TelcoAutomation::V1::TelcoAutomation::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::TelcoAutomation::V1::TelcoAutomation::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_test.rb b/owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_test.rb deleted file mode 100644 index c2be48e205f0..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/test/google/cloud/telco_automation/v1/telco_automation_test.rb +++ /dev/null @@ -1,2368 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/telcoautomation/v1/telcoautomation_pb" -require "google/cloud/telco_automation/v1/telco_automation" - -class ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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_orchestration_clusters - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_orchestration_clusters_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_orchestration_clusters, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest, 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_orchestration_clusters_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_orchestration_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_orchestration_clusters parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_orchestration_clusters ::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest.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_orchestration_clusters({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_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_orchestration_clusters(::Google::Cloud::TelcoAutomation::V1::ListOrchestrationClustersRequest.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_orchestration_clusters_client_stub.call_rpc_count - end - end - - def test_get_orchestration_cluster - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_orchestration_cluster_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_orchestration_cluster, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_orchestration_cluster_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_orchestration_cluster({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_orchestration_cluster name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_orchestration_cluster ::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_orchestration_cluster({ 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_orchestration_cluster(::Google::Cloud::TelcoAutomation::V1::GetOrchestrationClusterRequest.new(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_orchestration_cluster_client_stub.call_rpc_count - end - end - - def test_create_orchestration_cluster - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - orchestration_cluster_id = "hello world" - orchestration_cluster = {} - request_id = "hello world" - - create_orchestration_cluster_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_orchestration_cluster, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["orchestration_cluster_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TelcoAutomation::V1::OrchestrationCluster), request["orchestration_cluster"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_orchestration_cluster_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_orchestration_cluster({ parent: parent, orchestration_cluster_id: orchestration_cluster_id, orchestration_cluster: orchestration_cluster, 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_orchestration_cluster parent: parent, orchestration_cluster_id: orchestration_cluster_id, orchestration_cluster: orchestration_cluster, 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_orchestration_cluster ::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest.new(parent: parent, orchestration_cluster_id: orchestration_cluster_id, orchestration_cluster: orchestration_cluster, 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_orchestration_cluster({ parent: parent, orchestration_cluster_id: orchestration_cluster_id, orchestration_cluster: orchestration_cluster, 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_orchestration_cluster(::Google::Cloud::TelcoAutomation::V1::CreateOrchestrationClusterRequest.new(parent: parent, orchestration_cluster_id: orchestration_cluster_id, orchestration_cluster: orchestration_cluster, 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_orchestration_cluster_client_stub.call_rpc_count - end - end - - def test_delete_orchestration_cluster - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_orchestration_cluster_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_orchestration_cluster, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_orchestration_cluster_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_orchestration_cluster({ 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_orchestration_cluster 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_orchestration_cluster ::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest.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_orchestration_cluster({ 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_orchestration_cluster(::Google::Cloud::TelcoAutomation::V1::DeleteOrchestrationClusterRequest.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_orchestration_cluster_client_stub.call_rpc_count - end - end - - def test_list_edge_slms - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_edge_slms_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_edge_slms, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest, 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_edge_slms_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_edge_slms({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_edge_slms parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_edge_slms ::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest.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_edge_slms({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_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_edge_slms(::Google::Cloud::TelcoAutomation::V1::ListEdgeSlmsRequest.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_edge_slms_client_stub.call_rpc_count - end - end - - def test_get_edge_slm - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::EdgeSlm.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_edge_slm_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_edge_slm, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_edge_slm_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_edge_slm({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_edge_slm name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_edge_slm ::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_edge_slm({ 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_edge_slm(::Google::Cloud::TelcoAutomation::V1::GetEdgeSlmRequest.new(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_edge_slm_client_stub.call_rpc_count - end - end - - def test_create_edge_slm - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - edge_slm_id = "hello world" - edge_slm = {} - request_id = "hello world" - - create_edge_slm_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_edge_slm, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["edge_slm_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TelcoAutomation::V1::EdgeSlm), request["edge_slm"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_edge_slm_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_edge_slm({ parent: parent, edge_slm_id: edge_slm_id, edge_slm: edge_slm, 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_edge_slm parent: parent, edge_slm_id: edge_slm_id, edge_slm: edge_slm, 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_edge_slm ::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest.new(parent: parent, edge_slm_id: edge_slm_id, edge_slm: edge_slm, 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_edge_slm({ parent: parent, edge_slm_id: edge_slm_id, edge_slm: edge_slm, 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_edge_slm(::Google::Cloud::TelcoAutomation::V1::CreateEdgeSlmRequest.new(parent: parent, edge_slm_id: edge_slm_id, edge_slm: edge_slm, 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_edge_slm_client_stub.call_rpc_count - end - end - - def test_delete_edge_slm - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_edge_slm_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_edge_slm, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_edge_slm_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_edge_slm({ 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_edge_slm 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_edge_slm ::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest.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_edge_slm({ 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_edge_slm(::Google::Cloud::TelcoAutomation::V1::DeleteEdgeSlmRequest.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_edge_slm_client_stub.call_rpc_count - end - end - - def test_create_blueprint - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::Blueprint.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - blueprint_id = "hello world" - blueprint = {} - - create_blueprint_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_blueprint, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["blueprint_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TelcoAutomation::V1::Blueprint), request["blueprint"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_blueprint_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_blueprint({ parent: parent, blueprint_id: blueprint_id, blueprint: blueprint }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_blueprint parent: parent, blueprint_id: blueprint_id, blueprint: blueprint do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_blueprint ::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest.new(parent: parent, blueprint_id: blueprint_id, blueprint: blueprint) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_blueprint({ parent: parent, blueprint_id: blueprint_id, blueprint: blueprint }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_blueprint(::Google::Cloud::TelcoAutomation::V1::CreateBlueprintRequest.new(parent: parent, blueprint_id: blueprint_id, blueprint: blueprint), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_blueprint_client_stub.call_rpc_count - end - end - - def test_update_blueprint - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::Blueprint.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - blueprint = {} - update_mask = {} - - update_blueprint_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_blueprint, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TelcoAutomation::V1::Blueprint), request["blueprint"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_blueprint_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_blueprint({ blueprint: blueprint, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_blueprint blueprint: blueprint, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_blueprint ::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest.new(blueprint: blueprint, 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_blueprint({ blueprint: blueprint, 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_blueprint(::Google::Cloud::TelcoAutomation::V1::UpdateBlueprintRequest.new(blueprint: blueprint, 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_blueprint_client_stub.call_rpc_count - end - end - - def test_get_blueprint - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::Blueprint.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :BLUEPRINT_VIEW_UNSPECIFIED - - get_blueprint_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_blueprint, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest, request - assert_equal "hello world", request["name"] - assert_equal :BLUEPRINT_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_blueprint_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_blueprint({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_blueprint name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_blueprint ::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_blueprint({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_blueprint(::Google::Cloud::TelcoAutomation::V1::GetBlueprintRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_blueprint_client_stub.call_rpc_count - end - end - - def test_delete_blueprint - # 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_blueprint_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_blueprint, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_blueprint_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_blueprint({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_blueprint name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_blueprint ::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_blueprint({ 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_blueprint(::Google::Cloud::TelcoAutomation::V1::DeleteBlueprintRequest.new(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_blueprint_client_stub.call_rpc_count - end - end - - def test_list_blueprints - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::ListBlueprintsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_blueprints_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_blueprints, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest, 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_blueprints_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_blueprints({ 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_blueprints 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_blueprints ::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest.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_blueprints({ 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_blueprints(::Google::Cloud::TelcoAutomation::V1::ListBlueprintsRequest.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_blueprints_client_stub.call_rpc_count - end - end - - def test_approve_blueprint - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::Blueprint.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - approve_blueprint_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :approve_blueprint, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, approve_blueprint_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.approve_blueprint({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.approve_blueprint name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.approve_blueprint ::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.approve_blueprint({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.approve_blueprint(::Google::Cloud::TelcoAutomation::V1::ApproveBlueprintRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, approve_blueprint_client_stub.call_rpc_count - end - end - - def test_propose_blueprint - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::Blueprint.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - propose_blueprint_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :propose_blueprint, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, propose_blueprint_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.propose_blueprint({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.propose_blueprint name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.propose_blueprint ::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.propose_blueprint({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.propose_blueprint(::Google::Cloud::TelcoAutomation::V1::ProposeBlueprintRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, propose_blueprint_client_stub.call_rpc_count - end - end - - def test_reject_blueprint - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::Blueprint.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - reject_blueprint_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :reject_blueprint, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, reject_blueprint_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.reject_blueprint({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.reject_blueprint name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.reject_blueprint ::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.reject_blueprint({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.reject_blueprint(::Google::Cloud::TelcoAutomation::V1::RejectBlueprintRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, reject_blueprint_client_stub.call_rpc_count - end - end - - def test_list_blueprint_revisions - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - page_size = 42 - page_token = "hello world" - - list_blueprint_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_blueprint_revisions, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest, request - assert_equal "hello world", request["name"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_blueprint_revisions_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_blueprint_revisions({ name: name, 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_blueprint_revisions name: name, 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_blueprint_revisions ::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest.new(name: name, 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_blueprint_revisions({ name: name, 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_blueprint_revisions(::Google::Cloud::TelcoAutomation::V1::ListBlueprintRevisionsRequest.new(name: name, 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_blueprint_revisions_client_stub.call_rpc_count - end - end - - def test_search_blueprint_revisions - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - query = "hello world" - page_size = 42 - page_token = "hello world" - - search_blueprint_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_blueprint_revisions, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["query"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_blueprint_revisions_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.search_blueprint_revisions({ parent: parent, query: query, 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.search_blueprint_revisions parent: parent, query: query, 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.search_blueprint_revisions ::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest.new(parent: parent, query: query, 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.search_blueprint_revisions({ parent: parent, query: query, 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.search_blueprint_revisions(::Google::Cloud::TelcoAutomation::V1::SearchBlueprintRevisionsRequest.new(parent: parent, query: query, 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, search_blueprint_revisions_client_stub.call_rpc_count - end - end - - def test_search_deployment_revisions - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - query = "hello world" - page_size = 42 - page_token = "hello world" - - search_deployment_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_deployment_revisions, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["query"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_deployment_revisions_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.search_deployment_revisions({ parent: parent, query: query, 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.search_deployment_revisions parent: parent, query: query, 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.search_deployment_revisions ::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest.new(parent: parent, query: query, 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.search_deployment_revisions({ parent: parent, query: query, 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.search_deployment_revisions(::Google::Cloud::TelcoAutomation::V1::SearchDeploymentRevisionsRequest.new(parent: parent, query: query, 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, search_deployment_revisions_client_stub.call_rpc_count - end - end - - def test_discard_blueprint_changes - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - discard_blueprint_changes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :discard_blueprint_changes, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, discard_blueprint_changes_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.discard_blueprint_changes({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.discard_blueprint_changes name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.discard_blueprint_changes ::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.discard_blueprint_changes({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.discard_blueprint_changes(::Google::Cloud::TelcoAutomation::V1::DiscardBlueprintChangesRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, discard_blueprint_changes_client_stub.call_rpc_count - end - end - - def test_list_public_blueprints - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_public_blueprints_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_public_blueprints, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest, 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_public_blueprints_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_public_blueprints({ 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_public_blueprints 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_public_blueprints ::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest.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_public_blueprints({ 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_public_blueprints(::Google::Cloud::TelcoAutomation::V1::ListPublicBlueprintsRequest.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_public_blueprints_client_stub.call_rpc_count - end - end - - def test_get_public_blueprint - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::PublicBlueprint.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_public_blueprint_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_public_blueprint, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_public_blueprint_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_public_blueprint({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_public_blueprint name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_public_blueprint ::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_public_blueprint({ 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_public_blueprint(::Google::Cloud::TelcoAutomation::V1::GetPublicBlueprintRequest.new(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_public_blueprint_client_stub.call_rpc_count - end - end - - def test_create_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::Deployment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - deployment_id = "hello world" - deployment = {} - - create_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_deployment, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["deployment_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TelcoAutomation::V1::Deployment), request["deployment"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_deployment_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_deployment({ parent: parent, deployment_id: deployment_id, deployment: deployment }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_deployment parent: parent, deployment_id: deployment_id, deployment: deployment do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_deployment ::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest.new(parent: parent, deployment_id: deployment_id, deployment: deployment) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_deployment({ parent: parent, deployment_id: deployment_id, deployment: deployment }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_deployment(::Google::Cloud::TelcoAutomation::V1::CreateDeploymentRequest.new(parent: parent, deployment_id: deployment_id, deployment: deployment), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_deployment_client_stub.call_rpc_count - end - end - - def test_update_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::Deployment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - deployment = {} - update_mask = {} - - update_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_deployment, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TelcoAutomation::V1::Deployment), request["deployment"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_deployment_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_deployment({ deployment: deployment, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_deployment deployment: deployment, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_deployment ::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest.new(deployment: deployment, 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_deployment({ deployment: deployment, 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_deployment(::Google::Cloud::TelcoAutomation::V1::UpdateDeploymentRequest.new(deployment: deployment, 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_deployment_client_stub.call_rpc_count - end - end - - def test_get_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::Deployment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :DEPLOYMENT_VIEW_UNSPECIFIED - - get_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_deployment, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest, request - assert_equal "hello world", request["name"] - assert_equal :DEPLOYMENT_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_deployment_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_deployment({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_deployment name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_deployment ::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_deployment({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_deployment(::Google::Cloud::TelcoAutomation::V1::GetDeploymentRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_deployment_client_stub.call_rpc_count - end - end - - def test_remove_deployment - # 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" - - remove_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :remove_deployment, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, remove_deployment_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.remove_deployment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.remove_deployment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.remove_deployment ::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.remove_deployment({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.remove_deployment(::Google::Cloud::TelcoAutomation::V1::RemoveDeploymentRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, remove_deployment_client_stub.call_rpc_count - end - end - - def test_list_deployments - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::ListDeploymentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_deployments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_deployments, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest, 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_deployments_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_deployments({ 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_deployments 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_deployments ::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest.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_deployments({ 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_deployments(::Google::Cloud::TelcoAutomation::V1::ListDeploymentsRequest.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_deployments_client_stub.call_rpc_count - end - end - - def test_list_deployment_revisions - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - page_size = 42 - page_token = "hello world" - - list_deployment_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_deployment_revisions, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest, request - assert_equal "hello world", request["name"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_deployment_revisions_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_deployment_revisions({ name: name, 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_deployment_revisions name: name, 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_deployment_revisions ::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest.new(name: name, 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_deployment_revisions({ name: name, 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_deployment_revisions(::Google::Cloud::TelcoAutomation::V1::ListDeploymentRevisionsRequest.new(name: name, 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_deployment_revisions_client_stub.call_rpc_count - end - end - - def test_discard_deployment_changes - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - discard_deployment_changes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :discard_deployment_changes, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, discard_deployment_changes_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.discard_deployment_changes({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.discard_deployment_changes name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.discard_deployment_changes ::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.discard_deployment_changes({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.discard_deployment_changes(::Google::Cloud::TelcoAutomation::V1::DiscardDeploymentChangesRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, discard_deployment_changes_client_stub.call_rpc_count - end - end - - def test_apply_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::Deployment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - apply_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :apply_deployment, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, apply_deployment_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.apply_deployment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.apply_deployment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.apply_deployment ::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.apply_deployment({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.apply_deployment(::Google::Cloud::TelcoAutomation::V1::ApplyDeploymentRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, apply_deployment_client_stub.call_rpc_count - end - end - - def test_compute_deployment_status - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - compute_deployment_status_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :compute_deployment_status, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, compute_deployment_status_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.compute_deployment_status({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.compute_deployment_status name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.compute_deployment_status ::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.compute_deployment_status({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.compute_deployment_status(::Google::Cloud::TelcoAutomation::V1::ComputeDeploymentStatusRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, compute_deployment_status_client_stub.call_rpc_count - end - end - - def test_rollback_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::Deployment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_id = "hello world" - - rollback_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :rollback_deployment, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["revision_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, rollback_deployment_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.rollback_deployment({ name: name, revision_id: revision_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.rollback_deployment name: name, revision_id: revision_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.rollback_deployment ::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest.new(name: name, revision_id: revision_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.rollback_deployment({ name: name, revision_id: revision_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.rollback_deployment(::Google::Cloud::TelcoAutomation::V1::RollbackDeploymentRequest.new(name: name, revision_id: revision_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, rollback_deployment_client_stub.call_rpc_count - end - end - - def test_get_hydrated_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_hydrated_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_hydrated_deployment, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_hydrated_deployment_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_hydrated_deployment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_hydrated_deployment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_hydrated_deployment ::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_hydrated_deployment({ 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_hydrated_deployment(::Google::Cloud::TelcoAutomation::V1::GetHydratedDeploymentRequest.new(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_hydrated_deployment_client_stub.call_rpc_count - end - end - - def test_list_hydrated_deployments - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_hydrated_deployments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_hydrated_deployments, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest, 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_hydrated_deployments_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_hydrated_deployments({ 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_hydrated_deployments 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_hydrated_deployments ::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest.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_hydrated_deployments({ 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_hydrated_deployments(::Google::Cloud::TelcoAutomation::V1::ListHydratedDeploymentsRequest.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_hydrated_deployments_client_stub.call_rpc_count - end - end - - def test_update_hydrated_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - hydrated_deployment = {} - update_mask = {} - - update_hydrated_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_hydrated_deployment, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment), request["hydrated_deployment"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_hydrated_deployment_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_hydrated_deployment({ hydrated_deployment: hydrated_deployment, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_hydrated_deployment hydrated_deployment: hydrated_deployment, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_hydrated_deployment ::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest.new(hydrated_deployment: hydrated_deployment, 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_hydrated_deployment({ hydrated_deployment: hydrated_deployment, 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_hydrated_deployment(::Google::Cloud::TelcoAutomation::V1::UpdateHydratedDeploymentRequest.new(hydrated_deployment: hydrated_deployment, 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_hydrated_deployment_client_stub.call_rpc_count - end - end - - def test_apply_hydrated_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::TelcoAutomation::V1::HydratedDeployment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - apply_hydrated_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :apply_hydrated_deployment, name - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, apply_hydrated_deployment_client_stub do - # Create client - client = ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.apply_hydrated_deployment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.apply_hydrated_deployment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.apply_hydrated_deployment ::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.apply_hydrated_deployment({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.apply_hydrated_deployment(::Google::Cloud::TelcoAutomation::V1::ApplyHydratedDeploymentRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, apply_hydrated_deployment_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::TelcoAutomation::V1::TelcoAutomation::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::TelcoAutomation::V1::TelcoAutomation::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::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::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::TelcoAutomation::V1::TelcoAutomation::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::TelcoAutomation::V1::TelcoAutomation::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-telco_automation-v1/test/helper.rb b/owl-bot-staging/google-cloud-telco_automation-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-telco_automation-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/.gitignore b/owl-bot-staging/google-cloud-text_to_speech-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-text_to_speech-v1/.repo-metadata.json deleted file mode 100644 index 0f1680fa6d2d..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "texttospeech.googleapis.com", - "api_shortname": "texttospeech", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest", - "distribution_name": "google-cloud-text_to_speech-v1", - "is_cloud": true, - "language": "ruby", - "name": "texttospeech", - "name_pretty": "Cloud Text-to-Speech V1 API", - "product_documentation": "https://cloud.google.com/text-to-speech", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Text-to-Speech converts text or Speech Synthesis Markup Language (SSML) input into audio data of natural human speech. Note that google-cloud-text_to_speech-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-text_to_speech instead. See the readme for more details.", - "ruby-cloud-env-prefix": "TEXTTOSPEECH", - "ruby-cloud-product-url": "https://cloud.google.com/text-to-speech", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/.rubocop.yml b/owl-bot-staging/google-cloud-text_to_speech-v1/.rubocop.yml deleted file mode 100644 index dc3e19ac0403..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-text_to_speech-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-text_to_speech-v1.rb" diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/.toys.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1/.yardopts b/owl-bot-staging/google-cloud-text_to_speech-v1/.yardopts deleted file mode 100644 index b23b0b3b07e1..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Text-to-Speech 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-text_to_speech-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-text_to_speech-v1/AUTHENTICATION.md deleted file mode 100644 index 9eb74f158a54..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-text_to_speech-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-text_to_speech-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/text_to_speech/v1" - -client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/text_to_speech/v1" - -::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::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-text_to_speech-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/text_to_speech/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::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-text_to_speech-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-text_to_speech-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/Gemfile b/owl-bot-staging/google-cloud-text_to_speech-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/LICENSE.md b/owl-bot-staging/google-cloud-text_to_speech-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1/README.md b/owl-bot-staging/google-cloud-text_to_speech-v1/README.md deleted file mode 100644 index 27409b96177e..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Text-to-Speech V1 API - -Synthesizes natural-sounding speech by applying powerful neural network models. - -Text-to-Speech converts text or Speech Synthesis Markup Language (SSML) input into audio data of natural human speech. - -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 Text-to-Speech V1 API. Most users should consider using -the main client gem, -[google-cloud-text_to_speech](https://rubygems.org/gems/google-cloud-text_to_speech). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-text_to_speech-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/texttospeech.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/text_to_speech/v1" - -client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new -request = ::Google::Cloud::TextToSpeech::V1::ListVoicesRequest.new # (request fields as keyword arguments...) -response = client.list_voices request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/text-to-speech) -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/text_to_speech/v1" -require "logger" - -client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::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-text_to_speech`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-text_to_speech-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-text_to_speech`. -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-text_to_speech-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-text_to_speech-v1/Rakefile b/owl-bot-staging/google-cloud-text_to_speech-v1/Rakefile deleted file mode 100644 index 7db3ca6b5cb0..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["TEXTTOSPEECH_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["TEXTTOSPEECH_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["TEXTTOSPEECH_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 TEXTTOSPEECH_TEST_PROJECT=test123 TEXTTOSPEECH_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/text_to_speech/v1/text_to_speech/credentials" - ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["TEXTTOSPEECH_PROJECT"] = project - ENV["TEXTTOSPEECH_TEST_PROJECT"] = project - ENV["TEXTTOSPEECH_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-text_to_speech-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-text_to_speech-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-text_to_speech-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-text_to_speech-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-text_to_speech-v1" - header "google-cloud-text_to_speech-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-text_to_speech-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-text_to_speech-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-text_to_speech-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-text_to_speech-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-text_to_speech-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-text_to_speech-v1/gapic_metadata.json deleted file mode 100644 index 16049d7c8a36..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/gapic_metadata.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.texttospeech.v1", - "libraryPackage": "::Google::Cloud::TextToSpeech::V1", - "services": { - "TextToSpeech": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client", - "rpcs": { - "ListVoices": { - "methods": [ - "list_voices" - ] - }, - "SynthesizeSpeech": { - "methods": [ - "synthesize_speech" - ] - }, - "StreamingSynthesize": { - "methods": [ - "streaming_synthesize" - ] - } - } - } - } - }, - "TextToSpeechLongAudioSynthesize": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client", - "rpcs": { - "SynthesizeLongAudio": { - "methods": [ - "synthesize_long_audio" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/google-cloud-text_to_speech-v1.gemspec b/owl-bot-staging/google-cloud-text_to_speech-v1/google-cloud-text_to_speech-v1.gemspec deleted file mode 100644 index fc9844c9372b..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/google-cloud-text_to_speech-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/text_to_speech/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-text_to_speech-v1" - gem.version = Google::Cloud::TextToSpeech::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Text-to-Speech converts text or Speech Synthesis Markup Language (SSML) input into audio data of natural human speech. Note that google-cloud-text_to_speech-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-text_to_speech instead. See the readme for more details." - gem.summary = "Synthesizes natural-sounding speech by applying powerful neural network models." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google-cloud-text_to_speech-v1.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google-cloud-text_to_speech-v1.rb deleted file mode 100644 index 796720aff7fd..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google-cloud-text_to_speech-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/text_to_speech/v1" diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1.rb deleted file mode 100644 index 4d6d2e5dfd49..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/text_to_speech/v1/text_to_speech" -require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize" -require "google/cloud/text_to_speech/v1/version" - -module Google - module Cloud - module TextToSpeech - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/text_to_speech/v1" - # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/text_to_speech/v1" - # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/text_to_speech/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/rest.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/rest.rb deleted file mode 100644 index 410254eba135..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/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/text_to_speech/v1/text_to_speech/rest" -require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest" -require "google/cloud/text_to_speech/v1/version" - -module Google - module Cloud - module TextToSpeech - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/text_to_speech/v1/rest" - # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech.rb deleted file mode 100644 index ec1fb13e094d..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech.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/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/text_to_speech/v1/version" - -require "google/cloud/text_to_speech/v1/text_to_speech/credentials" -require "google/cloud/text_to_speech/v1/text_to_speech/paths" -require "google/cloud/text_to_speech/v1/text_to_speech/client" -require "google/cloud/text_to_speech/v1/text_to_speech/rest" - -module Google - module Cloud - module TextToSpeech - module V1 - ## - # Service that implements Google Cloud Text-to-Speech API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/text_to_speech/v1/text_to_speech" - # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/text_to_speech/v1/text_to_speech/rest" - # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.new - # - module TextToSpeech - end - end - end - end -end - -helper_path = ::File.join __dir__, "text_to_speech", "helpers.rb" -require "google/cloud/text_to_speech/v1/text_to_speech/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/client.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/client.rb deleted file mode 100644 index f538e52e5dfe..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/client.rb +++ /dev/null @@ -1,655 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/texttospeech/v1/cloud_tts_pb" - -module Google - module Cloud - module TextToSpeech - module V1 - module TextToSpeech - ## - # Client for the TextToSpeech service. - # - # Service that implements Google Cloud Text-to-Speech API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "texttospeech.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :text_to_speech_stub - - ## - # Configure the TextToSpeech Client class. - # - # See {::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TextToSpeech clients - # ::Google::Cloud::TextToSpeech::V1::TextToSpeech::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", "TextToSpeech", "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.timeout = 300.0 - default_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TextToSpeech 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::TextToSpeech::V1::TextToSpeech::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 - @text_to_speech_stub.universe_domain - end - - ## - # Create a new TextToSpeech client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TextToSpeech 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/texttospeech/v1/cloud_tts_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 - - @text_to_speech_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::TextToSpeech::V1::TextToSpeech::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 - ) - - @text_to_speech_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 - @text_to_speech_stub.logger - end - - # Service calls - - ## - # Returns a list of Voice supported for synthesis. - # - # @overload list_voices(request, options = nil) - # Pass arguments to `list_voices` via a request object, either of type - # {::Google::Cloud::TextToSpeech::V1::ListVoicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TextToSpeech::V1::ListVoicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_voices(language_code: nil) - # Pass arguments to `list_voices` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param language_code [::String] - # Optional. Recommended. - # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - # If not specified, the API will return all supported voices. - # If specified, the ListVoices call will only return voices that can be used - # to synthesize this language_code. For example, if you specify `"en-NZ"`, - # all `"en-NZ"` voices will be returned. If you specify `"no"`, both - # `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be - # returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::TextToSpeech::V1::ListVoicesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::TextToSpeech::V1::ListVoicesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/text_to_speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TextToSpeech::V1::ListVoicesRequest.new - # - # # Call the list_voices method. - # result = client.list_voices request - # - # # The returned object is of type Google::Cloud::TextToSpeech::V1::ListVoicesResponse. - # p result - # - def list_voices request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1::ListVoicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_voices.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TextToSpeech::V1::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_voices.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_voices.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @text_to_speech_stub.call_rpc :list_voices, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Synthesizes speech synchronously: receive results after all text input - # has been processed. - # - # @overload synthesize_speech(request, options = nil) - # Pass arguments to `synthesize_speech` via a request object, either of type - # {::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload synthesize_speech(input: nil, voice: nil, audio_config: nil, advanced_voice_options: nil) - # Pass arguments to `synthesize_speech` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param input [::Google::Cloud::TextToSpeech::V1::SynthesisInput, ::Hash] - # Required. The Synthesizer requires either plain text or SSML as input. - # @param voice [::Google::Cloud::TextToSpeech::V1::VoiceSelectionParams, ::Hash] - # Required. The desired voice of the synthesized audio. - # @param audio_config [::Google::Cloud::TextToSpeech::V1::AudioConfig, ::Hash] - # Required. The configuration of the synthesized audio. - # @param advanced_voice_options [::Google::Cloud::TextToSpeech::V1::AdvancedVoiceOptions, ::Hash] - # Advanced voice options. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/text_to_speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest.new - # - # # Call the synthesize_speech method. - # result = client.synthesize_speech request - # - # # The returned object is of type Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse. - # p result - # - def synthesize_speech request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.synthesize_speech.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TextToSpeech::V1::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.synthesize_speech.timeout, - metadata: metadata, - retry_policy: @config.rpcs.synthesize_speech.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @text_to_speech_stub.call_rpc :synthesize_speech, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Performs bidirectional streaming speech synthesis: receives audio while - # sending text. - # - # @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeRequest, ::Hash>] - # An enumerable of {::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeRequest} 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::TextToSpeech::V1::StreamingSynthesizeResponse>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeResponse>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/text_to_speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new - # - # # Create an input stream. - # input = Gapic::StreamInput.new - # - # # Call the streaming_synthesize method to start streaming. - # output = client.streaming_synthesize 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::TextToSpeech::V1::StreamingSynthesizeRequest.new - # input << Google::Cloud::TextToSpeech::V1::StreamingSynthesizeRequest.new - # input.close - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeResponse - # output.each do |current_response| - # p current_response - # end - # - def streaming_synthesize 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::TextToSpeech::V1::StreamingSynthesizeRequest - 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.streaming_synthesize.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TextToSpeech::V1::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.streaming_synthesize.timeout, - metadata: metadata, - retry_policy: @config.rpcs.streaming_synthesize.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @text_to_speech_stub.call_rpc :streaming_synthesize, request, 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 TextToSpeech API. - # - # This class represents the configuration for TextToSpeech, - # 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::TextToSpeech::V1::TextToSpeech::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_voices to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_voices.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_voices.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::TextToSpeech::V1::TextToSpeech::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 = "texttospeech.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 TextToSpeech 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_voices` - # @return [::Gapic::Config::Method] - # - attr_reader :list_voices - ## - # RPC-specific configuration for `synthesize_speech` - # @return [::Gapic::Config::Method] - # - attr_reader :synthesize_speech - ## - # RPC-specific configuration for `streaming_synthesize` - # @return [::Gapic::Config::Method] - # - attr_reader :streaming_synthesize - - # @private - def initialize parent_rpcs = nil - list_voices_config = parent_rpcs.list_voices if parent_rpcs.respond_to? :list_voices - @list_voices = ::Gapic::Config::Method.new list_voices_config - synthesize_speech_config = parent_rpcs.synthesize_speech if parent_rpcs.respond_to? :synthesize_speech - @synthesize_speech = ::Gapic::Config::Method.new synthesize_speech_config - streaming_synthesize_config = parent_rpcs.streaming_synthesize if parent_rpcs.respond_to? :streaming_synthesize - @streaming_synthesize = ::Gapic::Config::Method.new streaming_synthesize_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/credentials.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/credentials.rb deleted file mode 100644 index ae03a5f2f50e..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/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 TextToSpeech - module V1 - module TextToSpeech - # Credentials for the TextToSpeech API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "TEXTTOSPEECH_CREDENTIALS", - "TEXTTOSPEECH_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "TEXTTOSPEECH_CREDENTIALS_JSON", - "TEXTTOSPEECH_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-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/paths.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/paths.rb deleted file mode 100644 index 742f694939cc..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/paths.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module TextToSpeech - module V1 - module TextToSpeech - # Path helper methods for the TextToSpeech API. - module Paths - ## - # Create a fully-qualified Model resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/models/{model}` - # - # @param project [String] - # @param location [String] - # @param model [String] - # - # @return [::String] - def model_path project:, location:, model: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/models/#{model}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/rest.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/rest.rb deleted file mode 100644 index c624653e2965..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/rest.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 "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/text_to_speech/v1/version" - -require "google/cloud/text_to_speech/v1/text_to_speech/credentials" -require "google/cloud/text_to_speech/v1/text_to_speech/paths" -require "google/cloud/text_to_speech/v1/text_to_speech/rest/client" - -module Google - module Cloud - module TextToSpeech - module V1 - ## - # Service that implements Google Cloud Text-to-Speech API. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/text_to_speech/v1/text_to_speech/rest" - # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.new - # - module TextToSpeech - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/text_to_speech/v1/text_to_speech/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/rest/client.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/rest/client.rb deleted file mode 100644 index 862337249dae..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/rest/client.rb +++ /dev/null @@ -1,528 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/texttospeech/v1/cloud_tts_pb" -require "google/cloud/text_to_speech/v1/text_to_speech/rest/service_stub" - -module Google - module Cloud - module TextToSpeech - module V1 - module TextToSpeech - module Rest - ## - # REST client for the TextToSpeech service. - # - # Service that implements Google Cloud Text-to-Speech API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "texttospeech.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :text_to_speech_stub - - ## - # Configure the TextToSpeech Client class. - # - # See {::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TextToSpeech clients - # ::Google::Cloud::TextToSpeech::V1::TextToSpeech::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", "TextToSpeech", "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.timeout = 300.0 - default_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TextToSpeech 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::TextToSpeech::V1::TextToSpeech::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 - @text_to_speech_stub.universe_domain - end - - ## - # Create a new TextToSpeech REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TextToSpeech 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 - - @text_to_speech_stub = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @text_to_speech_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 - @text_to_speech_stub.logger - end - - # Service calls - - ## - # Returns a list of Voice supported for synthesis. - # - # @overload list_voices(request, options = nil) - # Pass arguments to `list_voices` via a request object, either of type - # {::Google::Cloud::TextToSpeech::V1::ListVoicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TextToSpeech::V1::ListVoicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_voices(language_code: nil) - # Pass arguments to `list_voices` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param language_code [::String] - # Optional. Recommended. - # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - # If not specified, the API will return all supported voices. - # If specified, the ListVoices call will only return voices that can be used - # to synthesize this language_code. For example, if you specify `"en-NZ"`, - # all `"en-NZ"` voices will be returned. If you specify `"no"`, both - # `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be - # returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TextToSpeech::V1::ListVoicesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TextToSpeech::V1::ListVoicesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/text_to_speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TextToSpeech::V1::ListVoicesRequest.new - # - # # Call the list_voices method. - # result = client.list_voices request - # - # # The returned object is of type Google::Cloud::TextToSpeech::V1::ListVoicesResponse. - # p result - # - def list_voices request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1::ListVoicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_voices.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TextToSpeech::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_voices.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_voices.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @text_to_speech_stub.list_voices request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Synthesizes speech synchronously: receive results after all text input - # has been processed. - # - # @overload synthesize_speech(request, options = nil) - # Pass arguments to `synthesize_speech` via a request object, either of type - # {::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload synthesize_speech(input: nil, voice: nil, audio_config: nil, advanced_voice_options: nil) - # Pass arguments to `synthesize_speech` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param input [::Google::Cloud::TextToSpeech::V1::SynthesisInput, ::Hash] - # Required. The Synthesizer requires either plain text or SSML as input. - # @param voice [::Google::Cloud::TextToSpeech::V1::VoiceSelectionParams, ::Hash] - # Required. The desired voice of the synthesized audio. - # @param audio_config [::Google::Cloud::TextToSpeech::V1::AudioConfig, ::Hash] - # Required. The configuration of the synthesized audio. - # @param advanced_voice_options [::Google::Cloud::TextToSpeech::V1::AdvancedVoiceOptions, ::Hash] - # Advanced voice options. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/text_to_speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest.new - # - # # Call the synthesize_speech method. - # result = client.synthesize_speech request - # - # # The returned object is of type Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse. - # p result - # - def synthesize_speech request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.synthesize_speech.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TextToSpeech::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.synthesize_speech.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.synthesize_speech.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @text_to_speech_stub.synthesize_speech request, 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 TextToSpeech REST API. - # - # This class represents the configuration for TextToSpeech 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::TextToSpeech::V1::TextToSpeech::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_voices to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_voices.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_voices.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 = "texttospeech.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 TextToSpeech 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_voices` - # @return [::Gapic::Config::Method] - # - attr_reader :list_voices - ## - # RPC-specific configuration for `synthesize_speech` - # @return [::Gapic::Config::Method] - # - attr_reader :synthesize_speech - - # @private - def initialize parent_rpcs = nil - list_voices_config = parent_rpcs.list_voices if parent_rpcs.respond_to? :list_voices - @list_voices = ::Gapic::Config::Method.new list_voices_config - synthesize_speech_config = parent_rpcs.synthesize_speech if parent_rpcs.respond_to? :synthesize_speech - @synthesize_speech = ::Gapic::Config::Method.new synthesize_speech_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/rest/service_stub.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/rest/service_stub.rb deleted file mode 100644 index 2b4b9cdd5d6d..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech/rest/service_stub.rb +++ /dev/null @@ -1,200 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/texttospeech/v1/cloud_tts_pb" - -module Google - module Cloud - module TextToSpeech - module V1 - module TextToSpeech - module Rest - ## - # REST service stub for the TextToSpeech 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_voices REST call - # - # @param request_pb [::Google::Cloud::TextToSpeech::V1::ListVoicesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TextToSpeech::V1::ListVoicesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TextToSpeech::V1::ListVoicesResponse] - # A result object deserialized from the server's reply - def list_voices request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_voices_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_voices", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TextToSpeech::V1::ListVoicesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the synthesize_speech REST call - # - # @param request_pb [::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse] - # A result object deserialized from the server's reply - def synthesize_speech request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_synthesize_speech_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "synthesize_speech", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse.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_voices REST call - # - # @param request_pb [::Google::Cloud::TextToSpeech::V1::ListVoicesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_voices_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/voices", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the synthesize_speech REST call - # - # @param request_pb [::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_synthesize_speech_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/text:synthesize", - body: "*", - matches: [] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize.rb deleted file mode 100644 index 5ac749d808a7..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize.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/text_to_speech/v1/version" - -require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/credentials" -require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/paths" -require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/operations" -require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/client" -require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest" - -module Google - module Cloud - module TextToSpeech - module V1 - ## - # Service that implements Google Cloud Text-to-Speech API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize" - # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest" - # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client.new - # - module TextToSpeechLongAudioSynthesize - end - end - end - end -end - -helper_path = ::File.join __dir__, "text_to_speech_long_audio_synthesize", "helpers.rb" -require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/client.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/client.rb deleted file mode 100644 index c0e39e1b0936..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/client.rb +++ /dev/null @@ -1,510 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/texttospeech/v1/cloud_tts_lrs_pb" - -module Google - module Cloud - module TextToSpeech - module V1 - module TextToSpeechLongAudioSynthesize - ## - # Client for the TextToSpeechLongAudioSynthesize service. - # - # Service that implements Google Cloud Text-to-Speech API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "texttospeech.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :text_to_speech_long_audio_synthesize_stub - - ## - # Configure the TextToSpeechLongAudioSynthesize Client class. - # - # See {::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TextToSpeechLongAudioSynthesize clients - # ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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", "TextToSpeech", "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.synthesize_long_audio.timeout = 5000.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TextToSpeechLongAudioSynthesize 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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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 - @text_to_speech_long_audio_synthesize_stub.universe_domain - end - - ## - # Create a new TextToSpeechLongAudioSynthesize client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TextToSpeechLongAudioSynthesize 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/texttospeech/v1/cloud_tts_lrs_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 - - @text_to_speech_long_audio_synthesize_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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 - ) - - @text_to_speech_long_audio_synthesize_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 - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @text_to_speech_long_audio_synthesize_stub.logger - end - - # Service calls - - ## - # Synthesizes long form text asynchronously. - # - # @overload synthesize_long_audio(request, options = nil) - # Pass arguments to `synthesize_long_audio` via a request object, either of type - # {::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload synthesize_long_audio(parent: nil, input: nil, audio_config: nil, output_gcs_uri: nil, voice: nil) - # Pass arguments to `synthesize_long_audio` via keyword arguments. Note that at - # least one keyword argument is required. To 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 resource states of the request in the form of - # `projects/*/locations/*`. - # @param input [::Google::Cloud::TextToSpeech::V1::SynthesisInput, ::Hash] - # Required. The Synthesizer requires either plain text or SSML as input. - # @param audio_config [::Google::Cloud::TextToSpeech::V1::AudioConfig, ::Hash] - # Required. The configuration of the synthesized audio. - # @param output_gcs_uri [::String] - # Required. Specifies a Cloud Storage URI for the synthesis results. Must be - # specified in the format: `gs://bucket_name/object_name`, and the bucket - # must already exist. - # @param voice [::Google::Cloud::TextToSpeech::V1::VoiceSelectionParams, ::Hash] - # Required. The desired voice of the synthesized audio. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/text_to_speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest.new - # - # # Call the synthesize_long_audio method. - # result = client.synthesize_long_audio request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def synthesize_long_audio request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.synthesize_long_audio.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TextToSpeech::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.synthesize_long_audio.timeout, - metadata: metadata, - retry_policy: @config.rpcs.synthesize_long_audio.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @text_to_speech_long_audio_synthesize_stub.call_rpc :synthesize_long_audio, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 TextToSpeechLongAudioSynthesize API. - # - # This class represents the configuration for TextToSpeechLongAudioSynthesize, - # 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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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 - # # synthesize_long_audio to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.synthesize_long_audio.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.synthesize_long_audio.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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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 = "texttospeech.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 TextToSpeechLongAudioSynthesize 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 `synthesize_long_audio` - # @return [::Gapic::Config::Method] - # - attr_reader :synthesize_long_audio - - # @private - def initialize parent_rpcs = nil - synthesize_long_audio_config = parent_rpcs.synthesize_long_audio if parent_rpcs.respond_to? :synthesize_long_audio - @synthesize_long_audio = ::Gapic::Config::Method.new synthesize_long_audio_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/credentials.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/credentials.rb deleted file mode 100644 index df1224d64357..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/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 TextToSpeech - module V1 - module TextToSpeechLongAudioSynthesize - # Credentials for the TextToSpeechLongAudioSynthesize API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "TEXTTOSPEECH_CREDENTIALS", - "TEXTTOSPEECH_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "TEXTTOSPEECH_CREDENTIALS_JSON", - "TEXTTOSPEECH_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-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/operations.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/operations.rb deleted file mode 100644 index fadf9ad19fb8..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/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 TextToSpeech - module V1 - module TextToSpeechLongAudioSynthesize - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "texttospeech.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the TextToSpeechLongAudioSynthesize 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 TextToSpeechLongAudioSynthesize 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::TextToSpeech::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::TextToSpeech::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::TextToSpeech::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::TextToSpeech::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::TextToSpeech::V1::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 = "texttospeech.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-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/paths.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/paths.rb deleted file mode 100644 index 3632788fa392..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/paths.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module TextToSpeech - module V1 - module TextToSpeechLongAudioSynthesize - # Path helper methods for the TextToSpeechLongAudioSynthesize API. - module Paths - ## - # Create a fully-qualified Model resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/models/{model}` - # - # @param project [String] - # @param location [String] - # @param model [String] - # - # @return [::String] - def model_path project:, location:, model: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/models/#{model}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest.rb deleted file mode 100644 index eb8a249fb23a..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest.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 "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/text_to_speech/v1/version" - -require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/credentials" -require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/paths" -require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/operations" -require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/client" - -module Google - module Cloud - module TextToSpeech - module V1 - ## - # Service that implements Google Cloud Text-to-Speech API. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest" - # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client.new - # - module TextToSpeechLongAudioSynthesize - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/client.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/client.rb deleted file mode 100644 index 06c4eb02a0f9..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/client.rb +++ /dev/null @@ -1,460 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/texttospeech/v1/cloud_tts_lrs_pb" -require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/service_stub" - -module Google - module Cloud - module TextToSpeech - module V1 - module TextToSpeechLongAudioSynthesize - module Rest - ## - # REST client for the TextToSpeechLongAudioSynthesize service. - # - # Service that implements Google Cloud Text-to-Speech API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "texttospeech.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :text_to_speech_long_audio_synthesize_stub - - ## - # Configure the TextToSpeechLongAudioSynthesize Client class. - # - # See {::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TextToSpeechLongAudioSynthesize clients - # ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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", "TextToSpeech", "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.synthesize_long_audio.timeout = 5000.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TextToSpeechLongAudioSynthesize 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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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 - @text_to_speech_long_audio_synthesize_stub.universe_domain - end - - ## - # Create a new TextToSpeechLongAudioSynthesize REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TextToSpeechLongAudioSynthesize 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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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 - - @text_to_speech_long_audio_synthesize_stub = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @text_to_speech_long_audio_synthesize_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 - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @text_to_speech_long_audio_synthesize_stub.logger - end - - # Service calls - - ## - # Synthesizes long form text asynchronously. - # - # @overload synthesize_long_audio(request, options = nil) - # Pass arguments to `synthesize_long_audio` via a request object, either of type - # {::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload synthesize_long_audio(parent: nil, input: nil, audio_config: nil, output_gcs_uri: nil, voice: nil) - # Pass arguments to `synthesize_long_audio` via keyword arguments. Note that at - # least one keyword argument is required. To 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 resource states of the request in the form of - # `projects/*/locations/*`. - # @param input [::Google::Cloud::TextToSpeech::V1::SynthesisInput, ::Hash] - # Required. The Synthesizer requires either plain text or SSML as input. - # @param audio_config [::Google::Cloud::TextToSpeech::V1::AudioConfig, ::Hash] - # Required. The configuration of the synthesized audio. - # @param output_gcs_uri [::String] - # Required. Specifies a Cloud Storage URI for the synthesis results. Must be - # specified in the format: `gs://bucket_name/object_name`, and the bucket - # must already exist. - # @param voice [::Google::Cloud::TextToSpeech::V1::VoiceSelectionParams, ::Hash] - # Required. The desired voice of the synthesized audio. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/text_to_speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest.new - # - # # Call the synthesize_long_audio method. - # result = client.synthesize_long_audio request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def synthesize_long_audio request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.synthesize_long_audio.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TextToSpeech::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.synthesize_long_audio.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.synthesize_long_audio.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @text_to_speech_long_audio_synthesize_stub.synthesize_long_audio request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 TextToSpeechLongAudioSynthesize REST API. - # - # This class represents the configuration for TextToSpeechLongAudioSynthesize 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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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 - # # synthesize_long_audio to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.synthesize_long_audio.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.synthesize_long_audio.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 = "texttospeech.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 TextToSpeechLongAudioSynthesize 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 `synthesize_long_audio` - # @return [::Gapic::Config::Method] - # - attr_reader :synthesize_long_audio - - # @private - def initialize parent_rpcs = nil - synthesize_long_audio_config = parent_rpcs.synthesize_long_audio if parent_rpcs.respond_to? :synthesize_long_audio - @synthesize_long_audio = ::Gapic::Config::Method.new synthesize_long_audio_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/operations.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/operations.rb deleted file mode 100644 index 166fbb391f2b..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/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 TextToSpeech - module V1 - module TextToSpeechLongAudioSynthesize - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "texttospeech.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the TextToSpeechLongAudioSynthesize 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 TextToSpeechLongAudioSynthesize 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::TextToSpeech::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::TextToSpeech::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::TextToSpeech::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::TextToSpeech::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "texttospeech.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{^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-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/service_stub.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/service_stub.rb deleted file mode 100644 index 865f7c9fc35b..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/service_stub.rb +++ /dev/null @@ -1,143 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/texttospeech/v1/cloud_tts_lrs_pb" - -module Google - module Cloud - module TextToSpeech - module V1 - module TextToSpeechLongAudioSynthesize - module Rest - ## - # REST service stub for the TextToSpeechLongAudioSynthesize 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 synthesize_long_audio REST call - # - # @param request_pb [::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def synthesize_long_audio request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_synthesize_long_audio_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "synthesize_long_audio", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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 synthesize_long_audio REST call - # - # @param request_pb [::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_synthesize_long_audio_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:synthesizeLongAudio", - body: "*", - 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-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/version.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/v1/version.rb deleted file mode 100644 index bac4947af0ac..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/text_to_speech/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 TextToSpeech - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_lrs_pb.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_lrs_pb.rb deleted file mode 100644 index 14296d90aed6..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_lrs_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/texttospeech/v1/cloud_tts_lrs.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/cloud/texttospeech/v1/cloud_tts_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n0google/cloud/texttospeech/v1/cloud_tts_lrs.proto\x12\x1cgoogle.cloud.texttospeech.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a,google/cloud/texttospeech/v1/cloud_tts.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x99\x02\n\x1aSynthesizeLongAudioRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12@\n\x05input\x18\x02 \x01(\x0b\x32,.google.cloud.texttospeech.v1.SynthesisInputB\x03\xe0\x41\x02\x12\x44\n\x0c\x61udio_config\x18\x03 \x01(\x0b\x32).google.cloud.texttospeech.v1.AudioConfigB\x03\xe0\x41\x02\x12\x1b\n\x0eoutput_gcs_uri\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x46\n\x05voice\x18\x05 \x01(\x0b\x32\x32.google.cloud.texttospeech.v1.VoiceSelectionParamsB\x03\xe0\x41\x02\"\x1d\n\x1bSynthesizeLongAudioResponse\"\xa4\x01\n\x1bSynthesizeLongAudioMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x10last_update_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01\x12\x1b\n\x13progress_percentage\x18\x03 \x01(\x01\x32\x9f\x03\n\x1fTextToSpeechLongAudioSynthesize\x12\xaa\x02\n\x13SynthesizeLongAudio\x12\x38.google.cloud.texttospeech.v1.SynthesizeLongAudioRequest\x1a\x1d.google.longrunning.Operation\"\xb9\x01\xca\x41t\n8google.cloud.texttospeech.v1.SynthesizeLongAudioResponse\x12\x38google.cloud.texttospeech.v1.SynthesizeLongAudioMetadata\x82\xd3\xe4\x93\x02<\"7/v1/{parent=projects/*/locations/*}:synthesizeLongAudio:\x01*\x1aO\xca\x41\x1btexttospeech.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xef\x01\n com.google.cloud.texttospeech.v1B#TextToSpeechLongAudioSynthesisProtoP\x01ZDcloud.google.com/go/texttospeech/apiv1/texttospeechpb;texttospeechpb\xaa\x02\x1cGoogle.Cloud.TextToSpeech.V1\xca\x02\x1cGoogle\\Cloud\\TextToSpeech\\V1\xea\x02\x1fGoogle::Cloud::TextToSpeech::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module TextToSpeech - module V1 - SynthesizeLongAudioRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.SynthesizeLongAudioRequest").msgclass - SynthesizeLongAudioResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.SynthesizeLongAudioResponse").msgclass - SynthesizeLongAudioMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.SynthesizeLongAudioMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_lrs_services_pb.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_lrs_services_pb.rb deleted file mode 100644 index a814fd22032f..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_lrs_services_pb.rb +++ /dev/null @@ -1,45 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/texttospeech/v1/cloud_tts_lrs.proto for package 'Google.Cloud.TextToSpeech.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/texttospeech/v1/cloud_tts_lrs_pb' - -module Google - module Cloud - module TextToSpeech - module V1 - module TextToSpeechLongAudioSynthesize - # Service that implements Google Cloud Text-to-Speech API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.texttospeech.v1.TextToSpeechLongAudioSynthesize' - - # Synthesizes long form text asynchronously. - rpc :SynthesizeLongAudio, ::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_pb.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_pb.rb deleted file mode 100644 index 073184080aaf..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/texttospeech/v1/cloud_tts.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n,google/cloud/texttospeech/v1/cloud_tts.proto\x12\x1cgoogle.cloud.texttospeech.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"/\n\x11ListVoicesRequest\x12\x1a\n\rlanguage_code\x18\x01 \x01(\tB\x03\xe0\x41\x01\"I\n\x12ListVoicesResponse\x12\x33\n\x06voices\x18\x01 \x03(\x0b\x32#.google.cloud.texttospeech.v1.Voice\"\x94\x01\n\x05Voice\x12\x16\n\x0elanguage_codes\x18\x01 \x03(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x42\n\x0bssml_gender\x18\x03 \x01(\x0e\x32-.google.cloud.texttospeech.v1.SsmlVoiceGender\x12!\n\x19natural_sample_rate_hertz\x18\x04 \x01(\x05\"\x8a\x01\n\x14\x41\x64vancedVoiceOptions\x12*\n\x1dlow_latency_journey_synthesis\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12$\n\x14relax_safety_filters\x18\x08 \x01(\x08\x42\x06\xe0\x41\x04\xe0\x41\x01\x42 \n\x1e_low_latency_journey_synthesis\"\xdd\x02\n\x17SynthesizeSpeechRequest\x12@\n\x05input\x18\x01 \x01(\x0b\x32,.google.cloud.texttospeech.v1.SynthesisInputB\x03\xe0\x41\x02\x12\x46\n\x05voice\x18\x02 \x01(\x0b\x32\x32.google.cloud.texttospeech.v1.VoiceSelectionParamsB\x03\xe0\x41\x02\x12\x44\n\x0c\x61udio_config\x18\x03 \x01(\x0b\x32).google.cloud.texttospeech.v1.AudioConfigB\x03\xe0\x41\x02\x12W\n\x16\x61\x64vanced_voice_options\x18\x08 \x01(\x0b\x32\x32.google.cloud.texttospeech.v1.AdvancedVoiceOptionsH\x00\x88\x01\x01\x42\x19\n\x17_advanced_voice_options\"\xa2\x03\n\x19\x43ustomPronunciationParams\x12\x13\n\x06phrase\x18\x01 \x01(\tH\x00\x88\x01\x01\x12h\n\x11phonetic_encoding\x18\x02 \x01(\x0e\x32H.google.cloud.texttospeech.v1.CustomPronunciationParams.PhoneticEncodingH\x01\x88\x01\x01\x12\x1a\n\rpronunciation\x18\x03 \x01(\tH\x02\x88\x01\x01\"\xb6\x01\n\x10PhoneticEncoding\x12!\n\x1dPHONETIC_ENCODING_UNSPECIFIED\x10\x00\x12\x19\n\x15PHONETIC_ENCODING_IPA\x10\x01\x12\x1d\n\x19PHONETIC_ENCODING_X_SAMPA\x10\x02\x12\'\n#PHONETIC_ENCODING_JAPANESE_YOMIGANA\x10\x03\x12\x1c\n\x18PHONETIC_ENCODING_PINYIN\x10\x04\x42\t\n\x07_phraseB\x14\n\x12_phonetic_encodingB\x10\n\x0e_pronunciation\"g\n\x14\x43ustomPronunciations\x12O\n\x0epronunciations\x18\x01 \x03(\x0b\x32\x37.google.cloud.texttospeech.v1.CustomPronunciationParams\"\x90\x01\n\x12MultiSpeakerMarkup\x12I\n\x05turns\x18\x01 \x03(\x0b\x32\x35.google.cloud.texttospeech.v1.MultiSpeakerMarkup.TurnB\x03\xe0\x41\x02\x1a/\n\x04Turn\x12\x14\n\x07speaker\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04text\x18\x02 \x01(\tB\x03\xe0\x41\x02\"P\n\x19MultispeakerPrebuiltVoice\x12\x1a\n\rspeaker_alias\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nspeaker_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"v\n\x17MultiSpeakerVoiceConfig\x12[\n\x15speaker_voice_configs\x18\x02 \x03(\x0b\x32\x37.google.cloud.texttospeech.v1.MultispeakerPrebuiltVoiceB\x03\xe0\x41\x02\"\x9c\x02\n\x0eSynthesisInput\x12\x0e\n\x04text\x18\x01 \x01(\tH\x00\x12\x10\n\x06markup\x18\x05 \x01(\tH\x00\x12\x0e\n\x04ssml\x18\x02 \x01(\tH\x00\x12P\n\x14multi_speaker_markup\x18\x04 \x01(\x0b\x32\x30.google.cloud.texttospeech.v1.MultiSpeakerMarkupH\x00\x12\x13\n\x06prompt\x18\x06 \x01(\tH\x01\x88\x01\x01\x12V\n\x15\x63ustom_pronunciations\x18\x03 \x01(\x0b\x32\x32.google.cloud.texttospeech.v1.CustomPronunciationsB\x03\xe0\x41\x01\x42\x0e\n\x0cinput_sourceB\t\n\x07_prompt\"\x8e\x03\n\x14VoiceSelectionParams\x12\x1a\n\rlanguage_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x42\n\x0bssml_gender\x18\x03 \x01(\x0e\x32-.google.cloud.texttospeech.v1.SsmlVoiceGender\x12\x45\n\x0c\x63ustom_voice\x18\x04 \x01(\x0b\x32/.google.cloud.texttospeech.v1.CustomVoiceParams\x12H\n\x0bvoice_clone\x18\x05 \x01(\x0b\x32..google.cloud.texttospeech.v1.VoiceCloneParamsB\x03\xe0\x41\x01\x12\x17\n\nmodel_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12^\n\x1amulti_speaker_voice_config\x18\x07 \x01(\x0b\x32\x35.google.cloud.texttospeech.v1.MultiSpeakerVoiceConfigB\x03\xe0\x41\x01\"\xf1\x01\n\x0b\x41udioConfig\x12H\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32+.google.cloud.texttospeech.v1.AudioEncodingB\x03\xe0\x41\x02\x12\x1d\n\rspeaking_rate\x18\x02 \x01(\x01\x42\x06\xe0\x41\x04\xe0\x41\x01\x12\x15\n\x05pitch\x18\x03 \x01(\x01\x42\x06\xe0\x41\x04\xe0\x41\x01\x12\x1e\n\x0evolume_gain_db\x18\x04 \x01(\x01\x42\x06\xe0\x41\x04\xe0\x41\x01\x12\x1e\n\x11sample_rate_hertz\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\"\n\x12\x65\x66\x66\x65\x63ts_profile_id\x18\x06 \x03(\tB\x06\xe0\x41\x04\xe0\x41\x01\"\xf1\x01\n\x11\x43ustomVoiceParams\x12\x32\n\x05model\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12\\\n\x0ereported_usage\x18\x03 \x01(\x0e\x32=.google.cloud.texttospeech.v1.CustomVoiceParams.ReportedUsageB\x05\x18\x01\xe0\x41\x01\"J\n\rReportedUsage\x12\x1e\n\x1aREPORTED_USAGE_UNSPECIFIED\x10\x00\x12\x0c\n\x08REALTIME\x10\x01\x12\x0b\n\x07OFFLINE\x10\x02\"2\n\x10VoiceCloneParams\x12\x1e\n\x11voice_cloning_key\x18\x01 \x01(\tB\x03\xe0\x41\x02\"1\n\x18SynthesizeSpeechResponse\x12\x15\n\raudio_content\x18\x01 \x01(\x0c\"\x9f\x01\n\x14StreamingAudioConfig\x12H\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32+.google.cloud.texttospeech.v1.AudioEncodingB\x03\xe0\x41\x02\x12\x1e\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1d\n\rspeaking_rate\x18\x03 \x01(\x01\x42\x06\xe0\x41\x04\xe0\x41\x01\"\x94\x02\n\x19StreamingSynthesizeConfig\x12\x46\n\x05voice\x18\x01 \x01(\x0b\x32\x32.google.cloud.texttospeech.v1.VoiceSelectionParamsB\x03\xe0\x41\x02\x12W\n\x16streaming_audio_config\x18\x04 \x01(\x0b\x32\x32.google.cloud.texttospeech.v1.StreamingAudioConfigB\x03\xe0\x41\x01\x12V\n\x15\x63ustom_pronunciations\x18\x05 \x01(\x0b\x32\x32.google.cloud.texttospeech.v1.CustomPronunciationsB\x03\xe0\x41\x01\"\xbd\x01\n\x17StreamingSynthesisInput\x12\x0e\n\x04text\x18\x01 \x01(\tH\x00\x12\x10\n\x06markup\x18\x05 \x01(\tH\x00\x12P\n\x14multi_speaker_markup\x18\x07 \x01(\x0b\x32\x30.google.cloud.texttospeech.v1.MultiSpeakerMarkupH\x00\x12\x13\n\x06prompt\x18\x06 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0cinput_sourceB\t\n\x07_prompt\"\xce\x01\n\x1aStreamingSynthesizeRequest\x12S\n\x10streaming_config\x18\x01 \x01(\x0b\x32\x37.google.cloud.texttospeech.v1.StreamingSynthesizeConfigH\x00\x12\x46\n\x05input\x18\x02 \x01(\x0b\x32\x35.google.cloud.texttospeech.v1.StreamingSynthesisInputH\x00\x42\x13\n\x11streaming_request\"4\n\x1bStreamingSynthesizeResponse\x12\x15\n\raudio_content\x18\x01 \x01(\x0c*W\n\x0fSsmlVoiceGender\x12!\n\x1dSSML_VOICE_GENDER_UNSPECIFIED\x10\x00\x12\x08\n\x04MALE\x10\x01\x12\n\n\x06\x46\x45MALE\x10\x02\x12\x0b\n\x07NEUTRAL\x10\x03*{\n\rAudioEncoding\x12\x1e\n\x1a\x41UDIO_ENCODING_UNSPECIFIED\x10\x00\x12\x0c\n\x08LINEAR16\x10\x01\x12\x07\n\x03MP3\x10\x02\x12\x0c\n\x08OGG_OPUS\x10\x03\x12\t\n\x05MULAW\x10\x05\x12\x08\n\x04\x41LAW\x10\x06\x12\x07\n\x03PCM\x10\x07\x12\x07\n\x03M4A\x10\x08\x32\xc7\x04\n\x0cTextToSpeech\x12\x93\x01\n\nListVoices\x12/.google.cloud.texttospeech.v1.ListVoicesRequest\x1a\x30.google.cloud.texttospeech.v1.ListVoicesResponse\"\"\xda\x41\rlanguage_code\x82\xd3\xe4\x93\x02\x0c\x12\n/v1/voices\x12\xbc\x01\n\x10SynthesizeSpeech\x12\x35.google.cloud.texttospeech.v1.SynthesizeSpeechRequest\x1a\x36.google.cloud.texttospeech.v1.SynthesizeSpeechResponse\"9\xda\x41\x18input,voice,audio_config\x82\xd3\xe4\x93\x02\x18\"\x13/v1/text:synthesize:\x01*\x12\x90\x01\n\x13StreamingSynthesize\x12\x38.google.cloud.texttospeech.v1.StreamingSynthesizeRequest\x1a\x39.google.cloud.texttospeech.v1.StreamingSynthesizeResponse\"\x00(\x01\x30\x01\x1aO\xca\x41\x1btexttospeech.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbc\x02\n com.google.cloud.texttospeech.v1B\x11TextToSpeechProtoP\x01ZDcloud.google.com/go/texttospeech/apiv1/texttospeechpb;texttospeechpb\xa2\x02\x04\x43TTS\xaa\x02\x1cGoogle.Cloud.TextToSpeech.V1\xca\x02\x1cGoogle\\Cloud\\TextToSpeech\\V1\xea\x02\x1fGoogle::Cloud::TextToSpeech::V1\xea\x41U\n\x1b\x61utoml.googleapis.com/Model\x12\x36projects/{project}/locations/{location}/models/{model}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module TextToSpeech - module V1 - ListVoicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.ListVoicesRequest").msgclass - ListVoicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.ListVoicesResponse").msgclass - Voice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.Voice").msgclass - AdvancedVoiceOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.AdvancedVoiceOptions").msgclass - SynthesizeSpeechRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.SynthesizeSpeechRequest").msgclass - CustomPronunciationParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.CustomPronunciationParams").msgclass - CustomPronunciationParams::PhoneticEncoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.CustomPronunciationParams.PhoneticEncoding").enummodule - CustomPronunciations = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.CustomPronunciations").msgclass - MultiSpeakerMarkup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.MultiSpeakerMarkup").msgclass - MultiSpeakerMarkup::Turn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.MultiSpeakerMarkup.Turn").msgclass - MultispeakerPrebuiltVoice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.MultispeakerPrebuiltVoice").msgclass - MultiSpeakerVoiceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.MultiSpeakerVoiceConfig").msgclass - SynthesisInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.SynthesisInput").msgclass - VoiceSelectionParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.VoiceSelectionParams").msgclass - AudioConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.AudioConfig").msgclass - CustomVoiceParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.CustomVoiceParams").msgclass - CustomVoiceParams::ReportedUsage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.CustomVoiceParams.ReportedUsage").enummodule - VoiceCloneParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.VoiceCloneParams").msgclass - SynthesizeSpeechResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.SynthesizeSpeechResponse").msgclass - StreamingAudioConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.StreamingAudioConfig").msgclass - StreamingSynthesizeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.StreamingSynthesizeConfig").msgclass - StreamingSynthesisInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.StreamingSynthesisInput").msgclass - StreamingSynthesizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.StreamingSynthesizeRequest").msgclass - StreamingSynthesizeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.StreamingSynthesizeResponse").msgclass - SsmlVoiceGender = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.SsmlVoiceGender").enummodule - AudioEncoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1.AudioEncoding").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_services_pb.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_services_pb.rb deleted file mode 100644 index 45222db99258..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/lib/google/cloud/texttospeech/v1/cloud_tts_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/texttospeech/v1/cloud_tts.proto for package 'Google.Cloud.TextToSpeech.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/texttospeech/v1/cloud_tts_pb' - -module Google - module Cloud - module TextToSpeech - module V1 - module TextToSpeech - # Service that implements Google Cloud Text-to-Speech API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.texttospeech.v1.TextToSpeech' - - # Returns a list of Voice supported for synthesis. - rpc :ListVoices, ::Google::Cloud::TextToSpeech::V1::ListVoicesRequest, ::Google::Cloud::TextToSpeech::V1::ListVoicesResponse - # Synthesizes speech synchronously: receive results after all text input - # has been processed. - rpc :SynthesizeSpeech, ::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest, ::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse - # Performs bidirectional streaming speech synthesis: receives audio while - # sending text. - rpc :StreamingSynthesize, stream(::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeRequest), stream(::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeResponse) - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/README.md deleted file mode 100644 index ccb07287720d..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Text-to-Speech 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-text_to_speech-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # 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. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - # - # Example: - # - # 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 - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # 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 - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # 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 - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1/proto_docs/google/cloud/texttospeech/v1/cloud_tts.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/cloud/texttospeech/v1/cloud_tts.rb deleted file mode 100644 index 957a73931130..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/cloud/texttospeech/v1/cloud_tts.rb +++ /dev/null @@ -1,583 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module TextToSpeech - module V1 - # The top-level message sent by the client for the `ListVoices` method. - # @!attribute [rw] language_code - # @return [::String] - # Optional. Recommended. - # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - # If not specified, the API will return all supported voices. - # If specified, the ListVoices call will only return voices that can be used - # to synthesize this language_code. For example, if you specify `"en-NZ"`, - # all `"en-NZ"` voices will be returned. If you specify `"no"`, both - # `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be - # returned. - class ListVoicesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The message returned to the client by the `ListVoices` method. - # @!attribute [rw] voices - # @return [::Array<::Google::Cloud::TextToSpeech::V1::Voice>] - # The list of voices. - class ListVoicesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Description of a voice supported by the TTS service. - # @!attribute [rw] language_codes - # @return [::Array<::String>] - # The languages that this voice supports, expressed as - # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g. - # "en-US", "es-419", "cmn-tw"). - # @!attribute [rw] name - # @return [::String] - # The name of this voice. Each distinct voice has a unique name. - # @!attribute [rw] ssml_gender - # @return [::Google::Cloud::TextToSpeech::V1::SsmlVoiceGender] - # The gender of this voice. - # @!attribute [rw] natural_sample_rate_hertz - # @return [::Integer] - # The natural sample rate (in hertz) for this voice. - class Voice - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Used for advanced voice options. - # @!attribute [rw] low_latency_journey_synthesis - # @return [::Boolean] - # Only for Journey voices. If false, the synthesis is context aware - # and has a higher latency. - # @!attribute [rw] relax_safety_filters - # @return [::Boolean] - # Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only - # supported for accounts linked to Invoiced (Offline) Cloud billing accounts. - # Otherwise, will return result - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - class AdvancedVoiceOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The top-level message sent by the client for the `SynthesizeSpeech` method. - # @!attribute [rw] input - # @return [::Google::Cloud::TextToSpeech::V1::SynthesisInput] - # Required. The Synthesizer requires either plain text or SSML as input. - # @!attribute [rw] voice - # @return [::Google::Cloud::TextToSpeech::V1::VoiceSelectionParams] - # Required. The desired voice of the synthesized audio. - # @!attribute [rw] audio_config - # @return [::Google::Cloud::TextToSpeech::V1::AudioConfig] - # Required. The configuration of the synthesized audio. - # @!attribute [rw] advanced_voice_options - # @return [::Google::Cloud::TextToSpeech::V1::AdvancedVoiceOptions] - # Advanced voice options. - class SynthesizeSpeechRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Pronunciation customization for a phrase. - # @!attribute [rw] phrase - # @return [::String] - # The phrase to which the customization is applied. - # The phrase can be multiple words, such as proper nouns, but shouldn't span - # the length of the sentence. - # @!attribute [rw] phonetic_encoding - # @return [::Google::Cloud::TextToSpeech::V1::CustomPronunciationParams::PhoneticEncoding] - # The phonetic encoding of the phrase. - # @!attribute [rw] pronunciation - # @return [::String] - # The pronunciation of the phrase. This must be in the phonetic encoding - # specified above. - class CustomPronunciationParams - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The phonetic encoding of the phrase. - module PhoneticEncoding - # Not specified. - PHONETIC_ENCODING_UNSPECIFIED = 0 - - # IPA, such as apple -> ˈæpəl. - # https://en.wikipedia.org/wiki/International_Phonetic_Alphabet - PHONETIC_ENCODING_IPA = 1 - - # X-SAMPA, such as apple -> "{p@l". - # https://en.wikipedia.org/wiki/X-SAMPA - PHONETIC_ENCODING_X_SAMPA = 2 - - # For reading-to-pron conversion to work well, the `pronunciation` field - # should only contain Kanji, Hiragana, and Katakana. - # - # The pronunciation can also contain pitch accents. - # The start of a pitch phrase is specified with `^` and the down-pitch - # position is specified with `!`, for example: - # - # phrase:端 pronunciation:^はし - # phrase:箸 pronunciation:^は!し - # phrase:橋 pronunciation:^はし! - # - # We currently only support the Tokyo dialect, which allows at most one - # down-pitch per phrase (i.e. at most one `!` between `^`). - PHONETIC_ENCODING_JAPANESE_YOMIGANA = 3 - - # Used to specify pronunciations for Mandarin words. See - # https://en.wikipedia.org/wiki/Pinyin. - # - # For example: 朝阳, the pronunciation is "chao2 yang2". The number - # represents the tone, and there is a space between syllables. Neutral - # tones are represented by 5, for example 孩子 "hai2 zi5". - PHONETIC_ENCODING_PINYIN = 4 - end - end - - # A collection of pronunciation customizations. - # @!attribute [rw] pronunciations - # @return [::Array<::Google::Cloud::TextToSpeech::V1::CustomPronunciationParams>] - # The pronunciation customizations are applied. - class CustomPronunciations - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A collection of turns for multi-speaker synthesis. - # @!attribute [rw] turns - # @return [::Array<::Google::Cloud::TextToSpeech::V1::MultiSpeakerMarkup::Turn>] - # Required. Speaker turns. - class MultiSpeakerMarkup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A multi-speaker turn. - # @!attribute [rw] speaker - # @return [::String] - # Required. The speaker of the turn, for example, 'O' or 'Q'. Please refer - # to documentation for available speakers. - # @!attribute [rw] text - # @return [::String] - # Required. The text to speak. - class Turn - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Configuration for a single speaker in a Gemini TTS multi-speaker setup. - # Enables dialogue between two speakers. - # @!attribute [rw] speaker_alias - # @return [::String] - # Required. The speaker alias of the voice. This is the user-chosen speaker - # name that is used in the multispeaker text input, such as "Speaker1". - # @!attribute [rw] speaker_id - # @return [::String] - # Required. The speaker ID of the voice. See - # https://cloud.google.com/text-to-speech/docs/gemini-tts#voice_options - # for available values. - class MultispeakerPrebuiltVoice - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for a multi-speaker text-to-speech setup. Enables the use of up - # to two distinct voices in a single synthesis request. - # @!attribute [rw] speaker_voice_configs - # @return [::Array<::Google::Cloud::TextToSpeech::V1::MultispeakerPrebuiltVoice>] - # Required. A list of configurations for the voices of the speakers. Exactly - # two speaker voice configurations must be provided. - class MultiSpeakerVoiceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains text input to be synthesized. Either `text` or `ssml` must be - # supplied. Supplying both or neither returns - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. The - # input size is limited to 5000 bytes. - # @!attribute [rw] text - # @return [::String] - # The raw text to be synthesized. - # - # Note: The following fields are mutually exclusive: `text`, `markup`, `ssml`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] markup - # @return [::String] - # Markup for HD voices specifically. This field may not be used with any - # other voices. - # - # Note: The following fields are mutually exclusive: `markup`, `text`, `ssml`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] ssml - # @return [::String] - # The SSML document to be synthesized. The SSML document must be valid - # and well-formed. Otherwise the RPC will fail and return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. For - # more information, see - # [SSML](https://cloud.google.com/text-to-speech/docs/ssml). - # - # Note: The following fields are mutually exclusive: `ssml`, `text`, `markup`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] multi_speaker_markup - # @return [::Google::Cloud::TextToSpeech::V1::MultiSpeakerMarkup] - # The multi-speaker input to be synthesized. Only applicable for - # multi-speaker synthesis. - # - # Note: The following fields are mutually exclusive: `multi_speaker_markup`, `text`, `markup`, `ssml`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] prompt - # @return [::String] - # This system instruction is supported only for controllable/promptable voice - # models. If this system instruction is used, we pass the unedited text to - # Gemini-TTS. Otherwise, a default system instruction is used. AI Studio - # calls this system instruction, Style Instructions. - # @!attribute [rw] custom_pronunciations - # @return [::Google::Cloud::TextToSpeech::V1::CustomPronunciations] - # Optional. The pronunciation customizations are applied to the input. If - # this is set, the input is synthesized using the given pronunciation - # customizations. - # - # The initial support is for en-us, with plans to expand to other locales in - # the future. Instant Clone voices aren't supported. - # - # In order to customize the pronunciation of a phrase, there must be an exact - # match of the phrase in the input types. If using SSML, the phrase must not - # be inside a phoneme tag. - class SynthesisInput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Description of which voice to use for a synthesis request. - # @!attribute [rw] language_code - # @return [::String] - # Required. The language (and potentially also the region) of the voice - # expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - # language tag, e.g. "en-US". This should not include a script tag (e.g. use - # "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred - # from the input provided in the SynthesisInput. The TTS service - # will use this parameter to help choose an appropriate voice. Note that - # the TTS service may choose a voice with a slightly different language code - # than the one selected; it may substitute a different region - # (e.g. using en-US rather than en-CA if there isn't a Canadian voice - # available), or even a different language, e.g. using "nb" (Norwegian - # Bokmal) instead of "no" (Norwegian)". - # @!attribute [rw] name - # @return [::String] - # The name of the voice. If both the name and the gender are not set, - # the service will choose a voice based on the other parameters such as - # language_code. - # @!attribute [rw] ssml_gender - # @return [::Google::Cloud::TextToSpeech::V1::SsmlVoiceGender] - # The preferred gender of the voice. If not set, the service will - # choose a voice based on the other parameters such as language_code and - # name. Note that this is only a preference, not requirement; if a - # voice of the appropriate gender is not available, the synthesizer should - # substitute a voice with a different gender rather than failing the request. - # @!attribute [rw] custom_voice - # @return [::Google::Cloud::TextToSpeech::V1::CustomVoiceParams] - # The configuration for a custom voice. If [CustomVoiceParams.model] is set, - # the service will choose the custom voice matching the specified - # configuration. - # @!attribute [rw] voice_clone - # @return [::Google::Cloud::TextToSpeech::V1::VoiceCloneParams] - # Optional. The configuration for a voice clone. If - # [VoiceCloneParams.voice_clone_key] is set, the service chooses the voice - # clone matching the specified configuration. - # @!attribute [rw] model_name - # @return [::String] - # Optional. The name of the model. If set, the service will choose the model - # matching the specified configuration. - # @!attribute [rw] multi_speaker_voice_config - # @return [::Google::Cloud::TextToSpeech::V1::MultiSpeakerVoiceConfig] - # Optional. The configuration for a Gemini multi-speaker text-to-speech - # setup. Enables the use of two distinct voices in a single synthesis - # request. - class VoiceSelectionParams - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Description of audio data to be synthesized. - # @!attribute [rw] audio_encoding - # @return [::Google::Cloud::TextToSpeech::V1::AudioEncoding] - # Required. The format of the audio byte stream. - # @!attribute [rw] speaking_rate - # @return [::Float] - # Optional. Input only. Speaking rate/speed, in the range [0.25, 2.0]. 1.0 is - # the normal native speed supported by the specific voice. 2.0 is twice as - # fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 - # speed. Any other values < 0.25 or > 2.0 will return an error. - # @!attribute [rw] pitch - # @return [::Float] - # Optional. Input only. Speaking pitch, in the range [-20.0, 20.0]. 20 means - # increase 20 semitones from the original pitch. -20 means decrease 20 - # semitones from the original pitch. - # @!attribute [rw] volume_gain_db - # @return [::Float] - # Optional. Input only. Volume gain (in dB) of the normal native volume - # supported by the specific voice, in the range [-96.0, 16.0]. If unset, or - # set to a value of 0.0 (dB), will play at normal native signal amplitude. A - # value of -6.0 (dB) will play at approximately half the amplitude of the - # normal native signal amplitude. A value of +6.0 (dB) will play at - # approximately twice the amplitude of the normal native signal amplitude. - # Strongly recommend not to exceed +10 (dB) as there's usually no effective - # increase in loudness for any value greater than that. - # @!attribute [rw] sample_rate_hertz - # @return [::Integer] - # Optional. The synthesis sample rate (in hertz) for this audio. When this is - # specified in SynthesizeSpeechRequest, if this is different from the voice's - # natural sample rate, then the synthesizer will honor this request by - # converting to the desired sample rate (which might result in worse audio - # quality), unless the specified sample rate is not supported for the - # encoding chosen, in which case it will fail the request and return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - # @!attribute [rw] effects_profile_id - # @return [::Array<::String>] - # Optional. Input only. An identifier which selects 'audio effects' profiles - # that are applied on (post synthesized) text to speech. Effects are applied - # on top of each other in the order they are given. See - # [audio - # profiles](https://cloud.google.com/text-to-speech/docs/audio-profiles) for - # current supported profile ids. - class AudioConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Description of the custom voice to be synthesized. - # @!attribute [rw] model - # @return [::String] - # Required. The name of the AutoML model that synthesizes the custom voice. - # @!attribute [rw] reported_usage - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::TextToSpeech::V1::CustomVoiceParams::ReportedUsage] - # Optional. Deprecated. The usage of the synthesized audio to be reported. - class CustomVoiceParams - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Deprecated. The usage of the synthesized audio. Usage does not affect - # billing. - module ReportedUsage - # Request with reported usage unspecified will be rejected. - REPORTED_USAGE_UNSPECIFIED = 0 - - # For scenarios where the synthesized audio is not downloadable and can - # only be used once. For example, real-time request in IVR system. - REALTIME = 1 - - # For scenarios where the synthesized audio is downloadable and can be - # reused. For example, the synthesized audio is downloaded, stored in - # customer service system and played repeatedly. - OFFLINE = 2 - end - end - - # The configuration of Voice Clone feature. - # @!attribute [rw] voice_cloning_key - # @return [::String] - # Required. Created by GenerateVoiceCloningKey. - class VoiceCloneParams - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The message returned to the client by the `SynthesizeSpeech` method. - # @!attribute [rw] audio_content - # @return [::String] - # The audio data bytes encoded as specified in the request, including the - # header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS). - # For LINEAR16 audio, we include the WAV header. Note: as - # with all bytes fields, protobuffers use a pure binary representation, - # whereas JSON representations use base64. - class SynthesizeSpeechResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Description of the desired output audio data. - # @!attribute [rw] audio_encoding - # @return [::Google::Cloud::TextToSpeech::V1::AudioEncoding] - # Required. The format of the audio byte stream. - # Streaming supports PCM, ALAW, MULAW and OGG_OPUS. All other encodings - # return an error. - # @!attribute [rw] sample_rate_hertz - # @return [::Integer] - # Optional. The synthesis sample rate (in hertz) for this audio. - # @!attribute [rw] speaking_rate - # @return [::Float] - # Optional. Input only. Speaking rate/speed, in the range [0.25, 2.0]. 1.0 is - # the normal native speed supported by the specific voice. 2.0 is twice as - # fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 - # speed. Any other values < 0.25 or > 2.0 will return an error. - class StreamingAudioConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides configuration information for the StreamingSynthesize request. - # @!attribute [rw] voice - # @return [::Google::Cloud::TextToSpeech::V1::VoiceSelectionParams] - # Required. The desired voice of the synthesized audio. - # @!attribute [rw] streaming_audio_config - # @return [::Google::Cloud::TextToSpeech::V1::StreamingAudioConfig] - # Optional. The configuration of the synthesized audio. - # @!attribute [rw] custom_pronunciations - # @return [::Google::Cloud::TextToSpeech::V1::CustomPronunciations] - # Optional. The pronunciation customizations are applied to the input. If - # this is set, the input is synthesized using the given pronunciation - # customizations. - # - # The initial support is for en-us, with plans to expand to other locales in - # the future. Instant Clone voices aren't supported. - # - # In order to customize the pronunciation of a phrase, there must be an exact - # match of the phrase in the input types. If using SSML, the phrase must not - # be inside a phoneme tag. - class StreamingSynthesizeConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Input to be synthesized. - # @!attribute [rw] text - # @return [::String] - # The raw text to be synthesized. It is recommended that each input - # contains complete, terminating sentences, which results in better prosody - # in the output audio. - # - # Note: The following fields are mutually exclusive: `text`, `markup`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] markup - # @return [::String] - # Markup for HD voices specifically. This field may not be used with any - # other voices. - # - # Note: The following fields are mutually exclusive: `markup`, `text`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] multi_speaker_markup - # @return [::Google::Cloud::TextToSpeech::V1::MultiSpeakerMarkup] - # Multi-speaker markup for Gemini TTS. This field may not - # be used with any other voices. - # - # Note: The following fields are mutually exclusive: `multi_speaker_markup`, `text`, `markup`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] prompt - # @return [::String] - # This is system instruction supported only for controllable voice models. - class StreamingSynthesisInput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `StreamingSynthesize` method. Multiple - # `StreamingSynthesizeRequest` messages are sent in one call. - # The first message must contain a `streaming_config` that - # fully specifies the request configuration and must not contain `input`. All - # subsequent messages must only have `input` set. - # @!attribute [rw] streaming_config - # @return [::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeConfig] - # StreamingSynthesizeConfig to be used in this streaming attempt. Only - # specified in the first message sent in a `StreamingSynthesize` call. - # - # Note: The following fields are mutually exclusive: `streaming_config`, `input`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] input - # @return [::Google::Cloud::TextToSpeech::V1::StreamingSynthesisInput] - # Input to synthesize. Specified in all messages but the first in a - # `StreamingSynthesize` call. - # - # Note: The following fields are mutually exclusive: `input`, `streaming_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class StreamingSynthesizeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `StreamingSynthesizeResponse` is the only message returned to the - # client by `StreamingSynthesize` method. A series of zero or more - # `StreamingSynthesizeResponse` messages are streamed back to the client. - # @!attribute [rw] audio_content - # @return [::String] - # The audio data bytes encoded as specified in the request. This is - # headerless LINEAR16 audio with a sample rate of 24000. - class StreamingSynthesizeResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Gender of the voice as described in - # [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice). - module SsmlVoiceGender - # An unspecified gender. - # In VoiceSelectionParams, this means that the client doesn't care which - # gender the selected voice will have. In the Voice field of - # ListVoicesResponse, this may mean that the voice doesn't fit any of the - # other categories in this enum, or that the gender of the voice isn't known. - SSML_VOICE_GENDER_UNSPECIFIED = 0 - - # A male voice. - MALE = 1 - - # A female voice. - FEMALE = 2 - - # A gender-neutral voice. This voice is not yet supported. - NEUTRAL = 3 - end - - # Configuration to set up audio encoder. The encoding determines the output - # audio format that we'd like. - module AudioEncoding - # Not specified. Only used by GenerateVoiceCloningKey. Otherwise, will return - # result - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - AUDIO_ENCODING_UNSPECIFIED = 0 - - # Uncompressed 16-bit signed little-endian samples (Linear PCM). - # Audio content returned as LINEAR16 also contains a WAV header. - LINEAR16 = 1 - - # MP3 audio at 32kbps. - MP3 = 2 - - # Opus encoded audio wrapped in an ogg container. The result is a - # file which can be played natively on Android, and in browsers (at least - # Chrome and Firefox). The quality of the encoding is considerably higher - # than MP3 while using approximately the same bitrate. - OGG_OPUS = 3 - - # 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. - # Audio content returned as MULAW also contains a WAV header. - MULAW = 5 - - # 8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law. - # Audio content returned as ALAW also contains a WAV header. - ALAW = 6 - - # Uncompressed 16-bit signed little-endian samples (Linear PCM). - # Note that as opposed to LINEAR16, audio won't be wrapped in a WAV (or - # any other) header. - PCM = 7 - - # M4A audio. - M4A = 8 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/cloud/texttospeech/v1/cloud_tts_lrs.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/cloud/texttospeech/v1/cloud_tts_lrs.rb deleted file mode 100644 index 661006f03010..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/cloud/texttospeech/v1/cloud_tts_lrs.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module TextToSpeech - module V1 - # The top-level message sent by the client for the - # `SynthesizeLongAudio` method. - # @!attribute [rw] parent - # @return [::String] - # The resource states of the request in the form of - # `projects/*/locations/*`. - # @!attribute [rw] input - # @return [::Google::Cloud::TextToSpeech::V1::SynthesisInput] - # Required. The Synthesizer requires either plain text or SSML as input. - # @!attribute [rw] audio_config - # @return [::Google::Cloud::TextToSpeech::V1::AudioConfig] - # Required. The configuration of the synthesized audio. - # @!attribute [rw] output_gcs_uri - # @return [::String] - # Required. Specifies a Cloud Storage URI for the synthesis results. Must be - # specified in the format: `gs://bucket_name/object_name`, and the bucket - # must already exist. - # @!attribute [rw] voice - # @return [::Google::Cloud::TextToSpeech::V1::VoiceSelectionParams] - # Required. The desired voice of the synthesized audio. - class SynthesizeLongAudioRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The message returned to the client by the `SynthesizeLongAudio` method. - class SynthesizeLongAudioResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for response returned by the `SynthesizeLongAudio` method. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Time when the request was received. - # @!attribute [rw] last_update_time - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Timestamp] - # Deprecated. Do not use. - # @!attribute [rw] progress_percentage - # @return [::Float] - # The progress of the most recent processing update in percentage, ie. 70.0%. - class SynthesizeLongAudioMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/Gemfile deleted file mode 100644 index 7976a33d4ee6..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-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-text_to_speech-v1", path: "../" -else - gem "google-cloud-text_to_speech-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-text_to_speech-v1/snippets/snippet_metadata_google.cloud.texttospeech.v1.json b/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/snippet_metadata_google.cloud.texttospeech.v1.json deleted file mode 100644 index 69310b5a3978..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/snippet_metadata_google.cloud.texttospeech.v1.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-text_to_speech-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.texttospeech.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "texttospeech_v1_generated_TextToSpeech_ListVoices_sync", - "title": "Snippet for the list_voices call in the TextToSpeech service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TextToSpeech::V1::TextToSpeech::Client#list_voices.", - "file": "text_to_speech/list_voices.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_voices", - "full_name": "::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client#list_voices", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TextToSpeech::V1::ListVoicesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TextToSpeech::V1::ListVoicesResponse", - "client": { - "short_name": "TextToSpeech::Client", - "full_name": "::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client" - }, - "method": { - "short_name": "ListVoices", - "full_name": "google.cloud.texttospeech.v1.TextToSpeech.ListVoices", - "service": { - "short_name": "TextToSpeech", - "full_name": "google.cloud.texttospeech.v1.TextToSpeech" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "texttospeech_v1_generated_TextToSpeech_SynthesizeSpeech_sync", - "title": "Snippet for the synthesize_speech call in the TextToSpeech service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TextToSpeech::V1::TextToSpeech::Client#synthesize_speech.", - "file": "text_to_speech/synthesize_speech.rb", - "language": "RUBY", - "client_method": { - "short_name": "synthesize_speech", - "full_name": "::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client#synthesize_speech", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse", - "client": { - "short_name": "TextToSpeech::Client", - "full_name": "::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client" - }, - "method": { - "short_name": "SynthesizeSpeech", - "full_name": "google.cloud.texttospeech.v1.TextToSpeech.SynthesizeSpeech", - "service": { - "short_name": "TextToSpeech", - "full_name": "google.cloud.texttospeech.v1.TextToSpeech" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "texttospeech_v1_generated_TextToSpeech_StreamingSynthesize_sync", - "title": "Snippet for the streaming_synthesize call in the TextToSpeech service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TextToSpeech::V1::TextToSpeech::Client#streaming_synthesize.", - "file": "text_to_speech/streaming_synthesize.rb", - "language": "RUBY", - "client_method": { - "short_name": "streaming_synthesize", - "full_name": "::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client#streaming_synthesize", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeResponse", - "client": { - "short_name": "TextToSpeech::Client", - "full_name": "::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client" - }, - "method": { - "short_name": "StreamingSynthesize", - "full_name": "google.cloud.texttospeech.v1.TextToSpeech.StreamingSynthesize", - "service": { - "short_name": "TextToSpeech", - "full_name": "google.cloud.texttospeech.v1.TextToSpeech" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 55, - "type": "FULL" - } - ] - }, - { - "region_tag": "texttospeech_v1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_sync", - "title": "Snippet for the synthesize_long_audio call in the TextToSpeechLongAudioSynthesize service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client#synthesize_long_audio.", - "file": "text_to_speech_long_audio_synthesize/synthesize_long_audio.rb", - "language": "RUBY", - "client_method": { - "short_name": "synthesize_long_audio", - "full_name": "::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client#synthesize_long_audio", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "TextToSpeechLongAudioSynthesize::Client", - "full_name": "::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client" - }, - "method": { - "short_name": "SynthesizeLongAudio", - "full_name": "google.cloud.texttospeech.v1.TextToSpeechLongAudioSynthesize.SynthesizeLongAudio", - "service": { - "short_name": "TextToSpeechLongAudioSynthesize", - "full_name": "google.cloud.texttospeech.v1.TextToSpeechLongAudioSynthesize" - } - } - }, - "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-text_to_speech-v1/snippets/text_to_speech/list_voices.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech/list_voices.rb deleted file mode 100644 index dcedec6e5a0c..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech/list_voices.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 texttospeech_v1_generated_TextToSpeech_ListVoices_sync] -require "google/cloud/text_to_speech/v1" - -## -# Snippet for the list_voices call in the TextToSpeech service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TextToSpeech::V1::TextToSpeech::Client#list_voices. -# -def list_voices - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TextToSpeech::V1::ListVoicesRequest.new - - # Call the list_voices method. - result = client.list_voices request - - # The returned object is of type Google::Cloud::TextToSpeech::V1::ListVoicesResponse. - p result -end -# [END texttospeech_v1_generated_TextToSpeech_ListVoices_sync] diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech/streaming_synthesize.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech/streaming_synthesize.rb deleted file mode 100644 index 12502cdb1184..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech/streaming_synthesize.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 texttospeech_v1_generated_TextToSpeech_StreamingSynthesize_sync] -require "google/cloud/text_to_speech/v1" - -## -# Snippet for the streaming_synthesize call in the TextToSpeech service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TextToSpeech::V1::TextToSpeech::Client#streaming_synthesize. -# -def streaming_synthesize - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new - - # Create an input stream. - input = Gapic::StreamInput.new - - # Call the streaming_synthesize method to start streaming. - output = client.streaming_synthesize 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::TextToSpeech::V1::StreamingSynthesizeRequest.new - input << Google::Cloud::TextToSpeech::V1::StreamingSynthesizeRequest.new - input.close - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeResponse - output.each do |current_response| - p current_response - end -end -# [END texttospeech_v1_generated_TextToSpeech_StreamingSynthesize_sync] diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech/synthesize_speech.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech/synthesize_speech.rb deleted file mode 100644 index 47f43d5a430b..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech/synthesize_speech.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 texttospeech_v1_generated_TextToSpeech_SynthesizeSpeech_sync] -require "google/cloud/text_to_speech/v1" - -## -# Snippet for the synthesize_speech call in the TextToSpeech service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TextToSpeech::V1::TextToSpeech::Client#synthesize_speech. -# -def synthesize_speech - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest.new - - # Call the synthesize_speech method. - result = client.synthesize_speech request - - # The returned object is of type Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse. - p result -end -# [END texttospeech_v1_generated_TextToSpeech_SynthesizeSpeech_sync] diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech_long_audio_synthesize/synthesize_long_audio.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech_long_audio_synthesize/synthesize_long_audio.rb deleted file mode 100644 index 735a14416d4b..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/snippets/text_to_speech_long_audio_synthesize/synthesize_long_audio.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 texttospeech_v1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_sync] -require "google/cloud/text_to_speech/v1" - -## -# Snippet for the synthesize_long_audio call in the TextToSpeechLongAudioSynthesize service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client#synthesize_long_audio. -# -def synthesize_long_audio - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest.new - - # Call the synthesize_long_audio method. - result = client.synthesize_long_audio request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END texttospeech_v1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_sync] diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_operations_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_operations_test.rb deleted file mode 100644 index db4bf31d4508..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_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/texttospeech/v1/cloud_tts_lrs_pb" -require "google/cloud/texttospeech/v1/cloud_tts_lrs_services_pb" -require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize" - -class ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_paths_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_paths_test.rb deleted file mode 100644 index 7b3d9ca4c355..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_paths_test.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 "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize" - -class ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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_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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.model_path project: "value0", location: "value1", model: "value2" - assert_equal "projects/value0/locations/value1/models/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_rest_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_rest_test.rb deleted file mode 100644 index 9163bb0d1bf4..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_rest_test.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 "helper" -require "gapic/rest" -require "google/cloud/texttospeech/v1/cloud_tts_lrs_pb" -require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest" - - -class ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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_synthesize_long_audio - # Create test objects. - 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" - input = {} - audio_config = {} - output_gcs_uri = "hello world" - voice = {} - - synthesize_long_audio_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::ServiceStub.stub :transcode_synthesize_long_audio_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, synthesize_long_audio_client_stub do - # Create client - client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.synthesize_long_audio({ parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.synthesize_long_audio parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.synthesize_long_audio ::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest.new(parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.synthesize_long_audio({ parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.synthesize_long_audio(::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest.new(parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, synthesize_long_audio_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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_test.rb deleted file mode 100644 index 43ec433e106d..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize_test.rb +++ /dev/null @@ -1,189 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/texttospeech/v1/cloud_tts_lrs_pb" -require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize" - -class ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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_synthesize_long_audio - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - input = {} - audio_config = {} - output_gcs_uri = "hello world" - voice = {} - - synthesize_long_audio_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :synthesize_long_audio, name - assert_kind_of ::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1::SynthesisInput), request["input"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1::AudioConfig), request["audio_config"] - assert_equal "hello world", request["output_gcs_uri"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1::VoiceSelectionParams), request["voice"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, synthesize_long_audio_client_stub do - # Create client - client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.synthesize_long_audio({ parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.synthesize_long_audio parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.synthesize_long_audio ::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest.new(parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.synthesize_long_audio({ parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.synthesize_long_audio(::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest.new(parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, synthesize_long_audio_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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_paths_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_paths_test.rb deleted file mode 100644 index 9a2c35e6af4b..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_paths_test.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 "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/text_to_speech/v1/text_to_speech" - -class ::Google::Cloud::TextToSpeech::V1::TextToSpeech::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_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::TextToSpeech::V1::TextToSpeech::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.model_path project: "value0", location: "value1", model: "value2" - assert_equal "projects/value0/locations/value1/models/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_rest_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_rest_test.rb deleted file mode 100644 index a521af9545c2..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_rest_test.rb +++ /dev/null @@ -1,210 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/texttospeech/v1/cloud_tts_pb" -require "google/cloud/text_to_speech/v1/text_to_speech/rest" - - -class ::Google::Cloud::TextToSpeech::V1::TextToSpeech::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_voices - # Create test objects. - client_result = ::Google::Cloud::TextToSpeech::V1::ListVoicesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - language_code = "hello world" - - list_voices_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::ServiceStub.stub :transcode_list_voices_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_voices_client_stub do - # Create client - client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_voices({ language_code: language_code }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_voices language_code: language_code do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_voices ::Google::Cloud::TextToSpeech::V1::ListVoicesRequest.new(language_code: language_code) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_voices({ language_code: language_code }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_voices(::Google::Cloud::TextToSpeech::V1::ListVoicesRequest.new(language_code: language_code), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_voices_client_stub.call_count - end - end - end - - def test_synthesize_speech - # Create test objects. - client_result = ::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - input = {} - voice = {} - audio_config = {} - advanced_voice_options = {} - - synthesize_speech_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::ServiceStub.stub :transcode_synthesize_speech_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, synthesize_speech_client_stub do - # Create client - client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.synthesize_speech({ input: input, voice: voice, audio_config: audio_config, advanced_voice_options: advanced_voice_options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.synthesize_speech input: input, voice: voice, audio_config: audio_config, advanced_voice_options: advanced_voice_options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.synthesize_speech ::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest.new(input: input, voice: voice, audio_config: audio_config, advanced_voice_options: advanced_voice_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.synthesize_speech({ input: input, voice: voice, audio_config: audio_config, advanced_voice_options: advanced_voice_options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.synthesize_speech(::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest.new(input: input, voice: voice, audio_config: audio_config, advanced_voice_options: advanced_voice_options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, synthesize_speech_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::TextToSpeech::V1::TextToSpeech::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::TextToSpeech::V1::TextToSpeech::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_test.rb deleted file mode 100644 index ccce604bf027..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/test/google/cloud/text_to_speech/v1/text_to_speech_test.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! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/texttospeech/v1/cloud_tts_pb" -require "google/cloud/text_to_speech/v1/text_to_speech" - -class ::Google::Cloud::TextToSpeech::V1::TextToSpeech::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_voices - # Create GRPC objects. - grpc_response = ::Google::Cloud::TextToSpeech::V1::ListVoicesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - language_code = "hello world" - - list_voices_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_voices, name - assert_kind_of ::Google::Cloud::TextToSpeech::V1::ListVoicesRequest, request - assert_equal "hello world", request["language_code"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_voices_client_stub do - # Create client - client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_voices({ language_code: language_code }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_voices language_code: language_code do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_voices ::Google::Cloud::TextToSpeech::V1::ListVoicesRequest.new(language_code: language_code) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_voices({ language_code: language_code }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_voices(::Google::Cloud::TextToSpeech::V1::ListVoicesRequest.new(language_code: language_code), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_voices_client_stub.call_rpc_count - end - end - - def test_synthesize_speech - # Create GRPC objects. - grpc_response = ::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - input = {} - voice = {} - audio_config = {} - advanced_voice_options = {} - - synthesize_speech_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :synthesize_speech, name - assert_kind_of ::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1::SynthesisInput), request["input"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1::VoiceSelectionParams), request["voice"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1::AudioConfig), request["audio_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1::AdvancedVoiceOptions), request["advanced_voice_options"] - assert request.has_advanced_voice_options? - refute_nil options - end - - Gapic::ServiceStub.stub :new, synthesize_speech_client_stub do - # Create client - client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.synthesize_speech({ input: input, voice: voice, audio_config: audio_config, advanced_voice_options: advanced_voice_options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.synthesize_speech input: input, voice: voice, audio_config: audio_config, advanced_voice_options: advanced_voice_options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.synthesize_speech ::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest.new(input: input, voice: voice, audio_config: audio_config, advanced_voice_options: advanced_voice_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.synthesize_speech({ input: input, voice: voice, audio_config: audio_config, advanced_voice_options: advanced_voice_options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.synthesize_speech(::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest.new(input: input, voice: voice, audio_config: audio_config, advanced_voice_options: advanced_voice_options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, synthesize_speech_client_stub.call_rpc_count - end - end - - def test_streaming_synthesize - # Create GRPC objects. - grpc_response = ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeResponse.new - grpc_operation = GRPC::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. - streaming_config = {} - - streaming_synthesize_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :streaming_synthesize, name - assert_kind_of Enumerable, request - refute_nil options - request - end - - Gapic::ServiceStub.stub :new, streaming_synthesize_client_stub do - # Create client - client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new do |config| - config.credentials = grpc_channel - end - - # Use enumerable object with hash and protobuf object. - request_hash = { streaming_config: streaming_config } - request_proto = ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeRequest.new streaming_config: streaming_config - enum_input = [request_hash, request_proto].to_enum - client.streaming_synthesize enum_input do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeResponse, r - end - assert_equal grpc_operation, operation - end - - # Use stream input object (from gapic-common). - request_hash = { streaming_config: streaming_config } - request_proto = ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeRequest.new streaming_config: streaming_config - stream_input = Gapic::StreamInput.new - client.streaming_synthesize stream_input do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeResponse, 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 = { streaming_config: streaming_config } - request_proto = ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeRequest.new streaming_config: streaming_config - enum_input = [request_hash, request_proto].to_enum - client.streaming_synthesize enum_input, grpc_options do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeResponse, r - end - assert_equal grpc_operation, operation - end - - # Use stream input object (from gapic-common) with options. - request_hash = { streaming_config: streaming_config } - request_proto = ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeRequest.new streaming_config: streaming_config - stream_input = Gapic::StreamInput.new - client.streaming_synthesize stream_input, grpc_options do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeResponse, 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, streaming_synthesize_client_stub.call_rpc_count - streaming_synthesize_client_stub.requests.each do |request| - request.to_a.each do |r| - assert_kind_of ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeRequest, r - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1::StreamingSynthesizeConfig), r["streaming_config"] - assert_equal :streaming_config, r.streaming_request - end - end - 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::TextToSpeech::V1::TextToSpeech::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::TextToSpeech::V1::TextToSpeech::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::TextToSpeech::V1::TextToSpeech::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1/test/helper.rb b/owl-bot-staging/google-cloud-text_to_speech-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.gitignore b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.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-text_to_speech-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.repo-metadata.json deleted file mode 100644 index 62505f56579f..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "texttospeech.googleapis.com", - "api_shortname": "texttospeech", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1beta1/latest", - "distribution_name": "google-cloud-text_to_speech-v1beta1", - "is_cloud": true, - "language": "ruby", - "name": "texttospeech", - "name_pretty": "Cloud Text-to-Speech V1beta1 API", - "product_documentation": "https://cloud.google.com/text-to-speech", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Text-to-Speech converts text or Speech Synthesis Markup Language (SSML) input into audio data of natural human speech. Note that google-cloud-text_to_speech-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-text_to_speech instead. See the readme for more details.", - "ruby-cloud-env-prefix": "TEXTTOSPEECH", - "ruby-cloud-product-url": "https://cloud.google.com/text-to-speech", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.rubocop.yml deleted file mode 100644 index 1902584e3617..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-text_to_speech-v1beta1.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-text_to_speech-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.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-text_to_speech-v1beta1/.yardopts b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.yardopts deleted file mode 100644 index e1ca395542bf..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Text-to-Speech V1beta1 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-text_to_speech-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/AUTHENTICATION.md deleted file mode 100644 index b8cf76c40475..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-text_to_speech-v1beta1 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-text_to_speech-v1beta1 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/text_to_speech/v1beta1" - -client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/text_to_speech/v1beta1" - -::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::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-text_to_speech-v1beta1 -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/text_to_speech/v1beta1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::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-text_to_speech-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/Gemfile b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/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-text_to_speech-v1beta1/README.md b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/README.md deleted file mode 100644 index 164b19d0e5ab..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Text-to-Speech V1beta1 API - -Synthesizes natural-sounding speech by applying powerful neural network models. - -Text-to-Speech converts text or Speech Synthesis Markup Language (SSML) input into audio data of natural human speech. - -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 Text-to-Speech V1beta1 API. Most users should consider using -the main client gem, -[google-cloud-text_to_speech](https://rubygems.org/gems/google-cloud-text_to_speech). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-text_to_speech-v1beta1 -``` - -## 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/texttospeech.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/text_to_speech/v1beta1" - -client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new -request = ::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest.new # (request fields as keyword arguments...) -response = client.list_voices request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1beta1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/text-to-speech) -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/text_to_speech/v1beta1" -require "logger" - -client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::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-text_to_speech`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-text_to_speech-v1beta1`. -_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-text_to_speech`. -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-text_to_speech-v1beta1`. - -### 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-text_to_speech-v1beta1/Rakefile b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/Rakefile deleted file mode 100644 index d2ce03364134..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/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-text_to_speech-v1beta1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["TEXTTOSPEECH_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["TEXTTOSPEECH_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["TEXTTOSPEECH_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 TEXTTOSPEECH_TEST_PROJECT=test123 TEXTTOSPEECH_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/text_to_speech/v1beta1/text_to_speech/credentials" - ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["TEXTTOSPEECH_PROJECT"] = project - ENV["TEXTTOSPEECH_TEST_PROJECT"] = project - ENV["TEXTTOSPEECH_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-text_to_speech-v1beta1 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-text_to_speech-v1beta1 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-text_to_speech-v1beta1 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-text_to_speech-v1beta1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-text_to_speech-v1beta1" - header "google-cloud-text_to_speech-v1beta1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-text_to_speech-v1beta1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-text_to_speech-v1beta1 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-text_to_speech-v1beta1 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-text_to_speech-v1beta1 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-text_to_speech-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/gapic_metadata.json deleted file mode 100644 index ad2335193dfe..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/gapic_metadata.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.texttospeech.v1beta1", - "libraryPackage": "::Google::Cloud::TextToSpeech::V1beta1", - "services": { - "TextToSpeech": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client", - "rpcs": { - "ListVoices": { - "methods": [ - "list_voices" - ] - }, - "SynthesizeSpeech": { - "methods": [ - "synthesize_speech" - ] - }, - "StreamingSynthesize": { - "methods": [ - "streaming_synthesize" - ] - } - } - } - } - }, - "TextToSpeechLongAudioSynthesize": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client", - "rpcs": { - "SynthesizeLongAudio": { - "methods": [ - "synthesize_long_audio" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/google-cloud-text_to_speech-v1beta1.gemspec b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/google-cloud-text_to_speech-v1beta1.gemspec deleted file mode 100644 index d7b0ae8fb093..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/google-cloud-text_to_speech-v1beta1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/text_to_speech/v1beta1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-text_to_speech-v1beta1" - gem.version = Google::Cloud::TextToSpeech::V1beta1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Text-to-Speech converts text or Speech Synthesis Markup Language (SSML) input into audio data of natural human speech. Note that google-cloud-text_to_speech-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-text_to_speech instead. See the readme for more details." - gem.summary = "Synthesizes natural-sounding speech by applying powerful neural network models." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google-cloud-text_to_speech-v1beta1.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google-cloud-text_to_speech-v1beta1.rb deleted file mode 100644 index 0d9b902cd048..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google-cloud-text_to_speech-v1beta1.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/text_to_speech/v1beta1" diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1.rb deleted file mode 100644 index 5e90ad3198ba..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/text_to_speech/v1beta1/text_to_speech" -require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize" -require "google/cloud/text_to_speech/v1beta1/version" - -module Google - module Cloud - module TextToSpeech - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/text_to_speech/v1beta1" - # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/text_to_speech/v1beta1" - # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new - # - module V1beta1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" -require "google/cloud/text_to_speech/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/rest.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/rest.rb deleted file mode 100644 index e5fbca0fbb22..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/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/text_to_speech/v1beta1/text_to_speech/rest" -require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest" -require "google/cloud/text_to_speech/v1beta1/version" - -module Google - module Cloud - module TextToSpeech - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/text_to_speech/v1beta1/rest" - # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new - # - module V1beta1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech.rb deleted file mode 100644 index b1bcd5fb1511..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech.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/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/text_to_speech/v1beta1/version" - -require "google/cloud/text_to_speech/v1beta1/text_to_speech/credentials" -require "google/cloud/text_to_speech/v1beta1/text_to_speech/paths" -require "google/cloud/text_to_speech/v1beta1/text_to_speech/client" -require "google/cloud/text_to_speech/v1beta1/text_to_speech/rest" - -module Google - module Cloud - module TextToSpeech - module V1beta1 - ## - # Service that implements Google Cloud Text-to-Speech API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/text_to_speech/v1beta1/text_to_speech" - # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/text_to_speech/v1beta1/text_to_speech/rest" - # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new - # - module TextToSpeech - end - end - end - end -end - -helper_path = ::File.join __dir__, "text_to_speech", "helpers.rb" -require "google/cloud/text_to_speech/v1beta1/text_to_speech/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/client.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/client.rb deleted file mode 100644 index c6f42a492766..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/client.rb +++ /dev/null @@ -1,657 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/texttospeech/v1beta1/cloud_tts_pb" - -module Google - module Cloud - module TextToSpeech - module V1beta1 - module TextToSpeech - ## - # Client for the TextToSpeech service. - # - # Service that implements Google Cloud Text-to-Speech API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "texttospeech.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :text_to_speech_stub - - ## - # Configure the TextToSpeech Client class. - # - # See {::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TextToSpeech clients - # ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::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", "TextToSpeech", "V1beta1"] - 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.timeout = 300.0 - default_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TextToSpeech 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::TextToSpeech::V1beta1::TextToSpeech::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 - @text_to_speech_stub.universe_domain - end - - ## - # Create a new TextToSpeech client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TextToSpeech 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/texttospeech/v1beta1/cloud_tts_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 - - @text_to_speech_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::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 - ) - - @text_to_speech_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 - @text_to_speech_stub.logger - end - - # Service calls - - ## - # Returns a list of Voice supported for synthesis. - # - # @overload list_voices(request, options = nil) - # Pass arguments to `list_voices` via a request object, either of type - # {::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_voices(language_code: nil) - # Pass arguments to `list_voices` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param language_code [::String] - # Optional. Recommended. - # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - # If not specified, the API will return all supported voices. - # If specified, the ListVoices call will only return voices that can be used - # to synthesize this language_code. For example, if you specify `"en-NZ"`, - # all `"en-NZ"` voices will be returned. If you specify `"no"`, both - # `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be - # returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/text_to_speech/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest.new - # - # # Call the list_voices method. - # result = client.list_voices request - # - # # The returned object is of type Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse. - # p result - # - def list_voices request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_voices.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TextToSpeech::V1beta1::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_voices.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_voices.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @text_to_speech_stub.call_rpc :list_voices, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Synthesizes speech synchronously: receive results after all text input - # has been processed. - # - # @overload synthesize_speech(request, options = nil) - # Pass arguments to `synthesize_speech` via a request object, either of type - # {::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload synthesize_speech(input: nil, voice: nil, audio_config: nil, enable_time_pointing: nil, advanced_voice_options: nil) - # Pass arguments to `synthesize_speech` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param input [::Google::Cloud::TextToSpeech::V1beta1::SynthesisInput, ::Hash] - # Required. The Synthesizer requires either plain text or SSML as input. - # @param voice [::Google::Cloud::TextToSpeech::V1beta1::VoiceSelectionParams, ::Hash] - # Required. The desired voice of the synthesized audio. - # @param audio_config [::Google::Cloud::TextToSpeech::V1beta1::AudioConfig, ::Hash] - # Required. The configuration of the synthesized audio. - # @param enable_time_pointing [::Array<::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest::TimepointType>] - # Whether and what timepoints are returned in the response. - # @param advanced_voice_options [::Google::Cloud::TextToSpeech::V1beta1::AdvancedVoiceOptions, ::Hash] - # Advanced voice options. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/text_to_speech/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest.new - # - # # Call the synthesize_speech method. - # result = client.synthesize_speech request - # - # # The returned object is of type Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse. - # p result - # - def synthesize_speech request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.synthesize_speech.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TextToSpeech::V1beta1::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.synthesize_speech.timeout, - metadata: metadata, - retry_policy: @config.rpcs.synthesize_speech.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @text_to_speech_stub.call_rpc :synthesize_speech, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Performs bidirectional streaming speech synthesis: receives audio while - # sending text. - # - # @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeRequest, ::Hash>] - # An enumerable of {::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeRequest} 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::TextToSpeech::V1beta1::StreamingSynthesizeResponse>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeResponse>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/text_to_speech/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new - # - # # Create an input stream. - # input = Gapic::StreamInput.new - # - # # Call the streaming_synthesize method to start streaming. - # output = client.streaming_synthesize 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::TextToSpeech::V1beta1::StreamingSynthesizeRequest.new - # input << Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeRequest.new - # input.close - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeResponse - # output.each do |current_response| - # p current_response - # end - # - def streaming_synthesize 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::TextToSpeech::V1beta1::StreamingSynthesizeRequest - 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.streaming_synthesize.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TextToSpeech::V1beta1::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.streaming_synthesize.timeout, - metadata: metadata, - retry_policy: @config.rpcs.streaming_synthesize.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @text_to_speech_stub.call_rpc :streaming_synthesize, request, 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 TextToSpeech API. - # - # This class represents the configuration for TextToSpeech, - # 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::TextToSpeech::V1beta1::TextToSpeech::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_voices to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_voices.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_voices.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::TextToSpeech::V1beta1::TextToSpeech::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 = "texttospeech.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 TextToSpeech 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_voices` - # @return [::Gapic::Config::Method] - # - attr_reader :list_voices - ## - # RPC-specific configuration for `synthesize_speech` - # @return [::Gapic::Config::Method] - # - attr_reader :synthesize_speech - ## - # RPC-specific configuration for `streaming_synthesize` - # @return [::Gapic::Config::Method] - # - attr_reader :streaming_synthesize - - # @private - def initialize parent_rpcs = nil - list_voices_config = parent_rpcs.list_voices if parent_rpcs.respond_to? :list_voices - @list_voices = ::Gapic::Config::Method.new list_voices_config - synthesize_speech_config = parent_rpcs.synthesize_speech if parent_rpcs.respond_to? :synthesize_speech - @synthesize_speech = ::Gapic::Config::Method.new synthesize_speech_config - streaming_synthesize_config = parent_rpcs.streaming_synthesize if parent_rpcs.respond_to? :streaming_synthesize - @streaming_synthesize = ::Gapic::Config::Method.new streaming_synthesize_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/credentials.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/credentials.rb deleted file mode 100644 index 20cb9a5a0f32..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/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 TextToSpeech - module V1beta1 - module TextToSpeech - # Credentials for the TextToSpeech API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "TEXTTOSPEECH_CREDENTIALS", - "TEXTTOSPEECH_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "TEXTTOSPEECH_CREDENTIALS_JSON", - "TEXTTOSPEECH_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-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/paths.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/paths.rb deleted file mode 100644 index 8d480777bee8..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/paths.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module TextToSpeech - module V1beta1 - module TextToSpeech - # Path helper methods for the TextToSpeech API. - module Paths - ## - # Create a fully-qualified Model resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/models/{model}` - # - # @param project [String] - # @param location [String] - # @param model [String] - # - # @return [::String] - def model_path project:, location:, model: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/models/#{model}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/rest.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/rest.rb deleted file mode 100644 index f01222022b03..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/rest.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 "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/text_to_speech/v1beta1/version" - -require "google/cloud/text_to_speech/v1beta1/text_to_speech/credentials" -require "google/cloud/text_to_speech/v1beta1/text_to_speech/paths" -require "google/cloud/text_to_speech/v1beta1/text_to_speech/rest/client" - -module Google - module Cloud - module TextToSpeech - module V1beta1 - ## - # Service that implements Google Cloud Text-to-Speech API. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/text_to_speech/v1beta1/text_to_speech/rest" - # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new - # - module TextToSpeech - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/text_to_speech/v1beta1/text_to_speech/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/rest/client.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/rest/client.rb deleted file mode 100644 index 75ecc2cb5a4f..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/rest/client.rb +++ /dev/null @@ -1,530 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/texttospeech/v1beta1/cloud_tts_pb" -require "google/cloud/text_to_speech/v1beta1/text_to_speech/rest/service_stub" - -module Google - module Cloud - module TextToSpeech - module V1beta1 - module TextToSpeech - module Rest - ## - # REST client for the TextToSpeech service. - # - # Service that implements Google Cloud Text-to-Speech API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "texttospeech.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :text_to_speech_stub - - ## - # Configure the TextToSpeech Client class. - # - # See {::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TextToSpeech clients - # ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::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", "TextToSpeech", "V1beta1"] - 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.timeout = 300.0 - default_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TextToSpeech 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::TextToSpeech::V1beta1::TextToSpeech::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 - @text_to_speech_stub.universe_domain - end - - ## - # Create a new TextToSpeech REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TextToSpeech 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 - - @text_to_speech_stub = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @text_to_speech_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 - @text_to_speech_stub.logger - end - - # Service calls - - ## - # Returns a list of Voice supported for synthesis. - # - # @overload list_voices(request, options = nil) - # Pass arguments to `list_voices` via a request object, either of type - # {::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_voices(language_code: nil) - # Pass arguments to `list_voices` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param language_code [::String] - # Optional. Recommended. - # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - # If not specified, the API will return all supported voices. - # If specified, the ListVoices call will only return voices that can be used - # to synthesize this language_code. For example, if you specify `"en-NZ"`, - # all `"en-NZ"` voices will be returned. If you specify `"no"`, both - # `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be - # returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/text_to_speech/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest.new - # - # # Call the list_voices method. - # result = client.list_voices request - # - # # The returned object is of type Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse. - # p result - # - def list_voices request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_voices.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TextToSpeech::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_voices.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_voices.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @text_to_speech_stub.list_voices request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Synthesizes speech synchronously: receive results after all text input - # has been processed. - # - # @overload synthesize_speech(request, options = nil) - # Pass arguments to `synthesize_speech` via a request object, either of type - # {::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload synthesize_speech(input: nil, voice: nil, audio_config: nil, enable_time_pointing: nil, advanced_voice_options: nil) - # Pass arguments to `synthesize_speech` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param input [::Google::Cloud::TextToSpeech::V1beta1::SynthesisInput, ::Hash] - # Required. The Synthesizer requires either plain text or SSML as input. - # @param voice [::Google::Cloud::TextToSpeech::V1beta1::VoiceSelectionParams, ::Hash] - # Required. The desired voice of the synthesized audio. - # @param audio_config [::Google::Cloud::TextToSpeech::V1beta1::AudioConfig, ::Hash] - # Required. The configuration of the synthesized audio. - # @param enable_time_pointing [::Array<::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest::TimepointType>] - # Whether and what timepoints are returned in the response. - # @param advanced_voice_options [::Google::Cloud::TextToSpeech::V1beta1::AdvancedVoiceOptions, ::Hash] - # Advanced voice options. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/text_to_speech/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest.new - # - # # Call the synthesize_speech method. - # result = client.synthesize_speech request - # - # # The returned object is of type Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse. - # p result - # - def synthesize_speech request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.synthesize_speech.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TextToSpeech::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.synthesize_speech.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.synthesize_speech.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @text_to_speech_stub.synthesize_speech request, 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 TextToSpeech REST API. - # - # This class represents the configuration for TextToSpeech 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::TextToSpeech::V1beta1::TextToSpeech::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_voices to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_voices.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_voices.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 = "texttospeech.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 TextToSpeech 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_voices` - # @return [::Gapic::Config::Method] - # - attr_reader :list_voices - ## - # RPC-specific configuration for `synthesize_speech` - # @return [::Gapic::Config::Method] - # - attr_reader :synthesize_speech - - # @private - def initialize parent_rpcs = nil - list_voices_config = parent_rpcs.list_voices if parent_rpcs.respond_to? :list_voices - @list_voices = ::Gapic::Config::Method.new list_voices_config - synthesize_speech_config = parent_rpcs.synthesize_speech if parent_rpcs.respond_to? :synthesize_speech - @synthesize_speech = ::Gapic::Config::Method.new synthesize_speech_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/rest/service_stub.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/rest/service_stub.rb deleted file mode 100644 index 649d72d8ea28..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/rest/service_stub.rb +++ /dev/null @@ -1,200 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/texttospeech/v1beta1/cloud_tts_pb" - -module Google - module Cloud - module TextToSpeech - module V1beta1 - module TextToSpeech - module Rest - ## - # REST service stub for the TextToSpeech 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_voices REST call - # - # @param request_pb [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse] - # A result object deserialized from the server's reply - def list_voices request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_voices_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_voices", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the synthesize_speech REST call - # - # @param request_pb [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse] - # A result object deserialized from the server's reply - def synthesize_speech request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_synthesize_speech_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "synthesize_speech", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse.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_voices REST call - # - # @param request_pb [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_voices_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/voices", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the synthesize_speech REST call - # - # @param request_pb [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_synthesize_speech_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/text:synthesize", - body: "*", - matches: [] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize.rb deleted file mode 100644 index 9e9b19a683b1..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize.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/text_to_speech/v1beta1/version" - -require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/credentials" -require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/paths" -require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/operations" -require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/client" -require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest" - -module Google - module Cloud - module TextToSpeech - module V1beta1 - ## - # Service that implements Google Cloud Text-to-Speech API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize" - # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest" - # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::Client.new - # - module TextToSpeechLongAudioSynthesize - end - end - end - end -end - -helper_path = ::File.join __dir__, "text_to_speech_long_audio_synthesize", "helpers.rb" -require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/client.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/client.rb deleted file mode 100644 index dd7cf39daa54..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/client.rb +++ /dev/null @@ -1,510 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/texttospeech/v1beta1/cloud_tts_lrs_pb" - -module Google - module Cloud - module TextToSpeech - module V1beta1 - module TextToSpeechLongAudioSynthesize - ## - # Client for the TextToSpeechLongAudioSynthesize service. - # - # Service that implements Google Cloud Text-to-Speech API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "texttospeech.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :text_to_speech_long_audio_synthesize_stub - - ## - # Configure the TextToSpeechLongAudioSynthesize Client class. - # - # See {::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TextToSpeechLongAudioSynthesize clients - # ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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", "TextToSpeech", "V1beta1"] - 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.synthesize_long_audio.timeout = 5000.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TextToSpeechLongAudioSynthesize 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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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 - @text_to_speech_long_audio_synthesize_stub.universe_domain - end - - ## - # Create a new TextToSpeechLongAudioSynthesize client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TextToSpeechLongAudioSynthesize 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/texttospeech/v1beta1/cloud_tts_lrs_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 - - @text_to_speech_long_audio_synthesize_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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 - ) - - @text_to_speech_long_audio_synthesize_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 - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @text_to_speech_long_audio_synthesize_stub.logger - end - - # Service calls - - ## - # Synthesizes long form text asynchronously. - # - # @overload synthesize_long_audio(request, options = nil) - # Pass arguments to `synthesize_long_audio` via a request object, either of type - # {::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload synthesize_long_audio(parent: nil, input: nil, audio_config: nil, output_gcs_uri: nil, voice: nil) - # Pass arguments to `synthesize_long_audio` via keyword arguments. Note that at - # least one keyword argument is required. To 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 resource states of the request in the form of - # `projects/*/locations/*`. - # @param input [::Google::Cloud::TextToSpeech::V1beta1::SynthesisInput, ::Hash] - # Required. The Synthesizer requires either plain text or SSML as input. - # @param audio_config [::Google::Cloud::TextToSpeech::V1beta1::AudioConfig, ::Hash] - # Required. The configuration of the synthesized audio. - # @param output_gcs_uri [::String] - # Required. Specifies a Cloud Storage URI for the synthesis results. Must be - # specified in the format: `gs://bucket_name/object_name`, and the bucket - # must already exist. - # @param voice [::Google::Cloud::TextToSpeech::V1beta1::VoiceSelectionParams, ::Hash] - # Required. The desired voice of the synthesized audio. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/text_to_speech/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest.new - # - # # Call the synthesize_long_audio method. - # result = client.synthesize_long_audio request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def synthesize_long_audio request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.synthesize_long_audio.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TextToSpeech::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.synthesize_long_audio.timeout, - metadata: metadata, - retry_policy: @config.rpcs.synthesize_long_audio.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @text_to_speech_long_audio_synthesize_stub.call_rpc :synthesize_long_audio, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 TextToSpeechLongAudioSynthesize API. - # - # This class represents the configuration for TextToSpeechLongAudioSynthesize, - # 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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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 - # # synthesize_long_audio to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.synthesize_long_audio.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.synthesize_long_audio.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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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 = "texttospeech.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 TextToSpeechLongAudioSynthesize 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 `synthesize_long_audio` - # @return [::Gapic::Config::Method] - # - attr_reader :synthesize_long_audio - - # @private - def initialize parent_rpcs = nil - synthesize_long_audio_config = parent_rpcs.synthesize_long_audio if parent_rpcs.respond_to? :synthesize_long_audio - @synthesize_long_audio = ::Gapic::Config::Method.new synthesize_long_audio_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/credentials.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/credentials.rb deleted file mode 100644 index 73270e7cae0f..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/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 TextToSpeech - module V1beta1 - module TextToSpeechLongAudioSynthesize - # Credentials for the TextToSpeechLongAudioSynthesize API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "TEXTTOSPEECH_CREDENTIALS", - "TEXTTOSPEECH_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "TEXTTOSPEECH_CREDENTIALS_JSON", - "TEXTTOSPEECH_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-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/operations.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/operations.rb deleted file mode 100644 index 088a5688cb57..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/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 TextToSpeech - module V1beta1 - module TextToSpeechLongAudioSynthesize - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "texttospeech.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the TextToSpeechLongAudioSynthesize 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 TextToSpeechLongAudioSynthesize 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::TextToSpeech::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::TextToSpeech::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::TextToSpeech::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::TextToSpeech::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::TextToSpeech::V1beta1::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 = "texttospeech.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-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/paths.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/paths.rb deleted file mode 100644 index b964dee446f0..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/paths.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module TextToSpeech - module V1beta1 - module TextToSpeechLongAudioSynthesize - # Path helper methods for the TextToSpeechLongAudioSynthesize API. - module Paths - ## - # Create a fully-qualified Model resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/models/{model}` - # - # @param project [String] - # @param location [String] - # @param model [String] - # - # @return [::String] - def model_path project:, location:, model: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/models/#{model}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest.rb deleted file mode 100644 index 8ecb924df3d1..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest.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 "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/text_to_speech/v1beta1/version" - -require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/credentials" -require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/paths" -require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/operations" -require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/client" - -module Google - module Cloud - module TextToSpeech - module V1beta1 - ## - # Service that implements Google Cloud Text-to-Speech API. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest" - # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::Client.new - # - module TextToSpeechLongAudioSynthesize - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/client.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/client.rb deleted file mode 100644 index 7d208e743c42..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/client.rb +++ /dev/null @@ -1,460 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/texttospeech/v1beta1/cloud_tts_lrs_pb" -require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/service_stub" - -module Google - module Cloud - module TextToSpeech - module V1beta1 - module TextToSpeechLongAudioSynthesize - module Rest - ## - # REST client for the TextToSpeechLongAudioSynthesize service. - # - # Service that implements Google Cloud Text-to-Speech API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "texttospeech.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :text_to_speech_long_audio_synthesize_stub - - ## - # Configure the TextToSpeechLongAudioSynthesize Client class. - # - # See {::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TextToSpeechLongAudioSynthesize clients - # ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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", "TextToSpeech", "V1beta1"] - 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.synthesize_long_audio.timeout = 5000.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TextToSpeechLongAudioSynthesize 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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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 - @text_to_speech_long_audio_synthesize_stub.universe_domain - end - - ## - # Create a new TextToSpeechLongAudioSynthesize REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TextToSpeechLongAudioSynthesize 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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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 - - @text_to_speech_long_audio_synthesize_stub = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @text_to_speech_long_audio_synthesize_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 - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @text_to_speech_long_audio_synthesize_stub.logger - end - - # Service calls - - ## - # Synthesizes long form text asynchronously. - # - # @overload synthesize_long_audio(request, options = nil) - # Pass arguments to `synthesize_long_audio` via a request object, either of type - # {::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload synthesize_long_audio(parent: nil, input: nil, audio_config: nil, output_gcs_uri: nil, voice: nil) - # Pass arguments to `synthesize_long_audio` via keyword arguments. Note that at - # least one keyword argument is required. To 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 resource states of the request in the form of - # `projects/*/locations/*`. - # @param input [::Google::Cloud::TextToSpeech::V1beta1::SynthesisInput, ::Hash] - # Required. The Synthesizer requires either plain text or SSML as input. - # @param audio_config [::Google::Cloud::TextToSpeech::V1beta1::AudioConfig, ::Hash] - # Required. The configuration of the synthesized audio. - # @param output_gcs_uri [::String] - # Required. Specifies a Cloud Storage URI for the synthesis results. Must be - # specified in the format: `gs://bucket_name/object_name`, and the bucket - # must already exist. - # @param voice [::Google::Cloud::TextToSpeech::V1beta1::VoiceSelectionParams, ::Hash] - # Required. The desired voice of the synthesized audio. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/text_to_speech/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest.new - # - # # Call the synthesize_long_audio method. - # result = client.synthesize_long_audio request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def synthesize_long_audio request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.synthesize_long_audio.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::TextToSpeech::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.synthesize_long_audio.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.synthesize_long_audio.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @text_to_speech_long_audio_synthesize_stub.synthesize_long_audio request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 TextToSpeechLongAudioSynthesize REST API. - # - # This class represents the configuration for TextToSpeechLongAudioSynthesize 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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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 - # # synthesize_long_audio to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.synthesize_long_audio.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.synthesize_long_audio.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 = "texttospeech.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 TextToSpeechLongAudioSynthesize 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 `synthesize_long_audio` - # @return [::Gapic::Config::Method] - # - attr_reader :synthesize_long_audio - - # @private - def initialize parent_rpcs = nil - synthesize_long_audio_config = parent_rpcs.synthesize_long_audio if parent_rpcs.respond_to? :synthesize_long_audio - @synthesize_long_audio = ::Gapic::Config::Method.new synthesize_long_audio_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/operations.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/operations.rb deleted file mode 100644 index 8250012f372b..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/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 TextToSpeech - module V1beta1 - module TextToSpeechLongAudioSynthesize - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "texttospeech.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the TextToSpeechLongAudioSynthesize 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 TextToSpeechLongAudioSynthesize 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::TextToSpeech::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::TextToSpeech::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::TextToSpeech::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::TextToSpeech::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "texttospeech.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: "/v1beta1/{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: "/v1beta1/{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-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/service_stub.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/service_stub.rb deleted file mode 100644 index bd08eb3a2f11..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest/service_stub.rb +++ /dev/null @@ -1,143 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/texttospeech/v1beta1/cloud_tts_lrs_pb" - -module Google - module Cloud - module TextToSpeech - module V1beta1 - module TextToSpeechLongAudioSynthesize - module Rest - ## - # REST service stub for the TextToSpeechLongAudioSynthesize 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 synthesize_long_audio REST call - # - # @param request_pb [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def synthesize_long_audio request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_synthesize_long_audio_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "synthesize_long_audio", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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 synthesize_long_audio REST call - # - # @param request_pb [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_synthesize_long_audio_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{parent}:synthesizeLongAudio", - body: "*", - 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-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/version.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/version.rb deleted file mode 100644 index e867e4eac333..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/text_to_speech/v1beta1/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 TextToSpeech - module V1beta1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/texttospeech/v1beta1/cloud_tts_lrs_pb.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/texttospeech/v1beta1/cloud_tts_lrs_pb.rb deleted file mode 100644 index 196a9e031108..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/texttospeech/v1beta1/cloud_tts_lrs_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/texttospeech/v1beta1/cloud_tts_lrs.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/cloud/texttospeech/v1beta1/cloud_tts_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n5google/cloud/texttospeech/v1beta1/cloud_tts_lrs.proto\x12!google.cloud.texttospeech.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x31google/cloud/texttospeech/v1beta1/cloud_tts.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa8\x02\n\x1aSynthesizeLongAudioRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x45\n\x05input\x18\x02 \x01(\x0b\x32\x31.google.cloud.texttospeech.v1beta1.SynthesisInputB\x03\xe0\x41\x02\x12I\n\x0c\x61udio_config\x18\x03 \x01(\x0b\x32..google.cloud.texttospeech.v1beta1.AudioConfigB\x03\xe0\x41\x02\x12\x1b\n\x0eoutput_gcs_uri\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12K\n\x05voice\x18\x05 \x01(\x0b\x32\x37.google.cloud.texttospeech.v1beta1.VoiceSelectionParamsB\x03\xe0\x41\x02\"\x1d\n\x1bSynthesizeLongAudioResponse\"\xa4\x01\n\x1bSynthesizeLongAudioMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x10last_update_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01\x12\x1b\n\x13progress_percentage\x18\x03 \x01(\x01\x32\xb3\x03\n\x1fTextToSpeechLongAudioSynthesize\x12\xbe\x02\n\x13SynthesizeLongAudio\x12=.google.cloud.texttospeech.v1beta1.SynthesizeLongAudioRequest\x1a\x1d.google.longrunning.Operation\"\xc8\x01\xca\x41~\n=google.cloud.texttospeech.v1beta1.SynthesizeLongAudioResponse\x12=google.cloud.texttospeech.v1beta1.SynthesizeLongAudioMetadata\x82\xd3\xe4\x93\x02\x41\"\n\rTimepointType\x12\x1e\n\x1aTIMEPOINT_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tSSML_MARK\x10\x01\x42\x19\n\x17_advanced_voice_options\"\xa7\x03\n\x19\x43ustomPronunciationParams\x12\x13\n\x06phrase\x18\x01 \x01(\tH\x00\x88\x01\x01\x12m\n\x11phonetic_encoding\x18\x02 \x01(\x0e\x32M.google.cloud.texttospeech.v1beta1.CustomPronunciationParams.PhoneticEncodingH\x01\x88\x01\x01\x12\x1a\n\rpronunciation\x18\x03 \x01(\tH\x02\x88\x01\x01\"\xb6\x01\n\x10PhoneticEncoding\x12!\n\x1dPHONETIC_ENCODING_UNSPECIFIED\x10\x00\x12\x19\n\x15PHONETIC_ENCODING_IPA\x10\x01\x12\x1d\n\x19PHONETIC_ENCODING_X_SAMPA\x10\x02\x12\'\n#PHONETIC_ENCODING_JAPANESE_YOMIGANA\x10\x03\x12\x1c\n\x18PHONETIC_ENCODING_PINYIN\x10\x04\x42\t\n\x07_phraseB\x14\n\x12_phonetic_encodingB\x10\n\x0e_pronunciation\"l\n\x14\x43ustomPronunciations\x12T\n\x0epronunciations\x18\x01 \x03(\x0b\x32<.google.cloud.texttospeech.v1beta1.CustomPronunciationParams\"\x95\x01\n\x12MultiSpeakerMarkup\x12N\n\x05turns\x18\x01 \x03(\x0b\x32:.google.cloud.texttospeech.v1beta1.MultiSpeakerMarkup.TurnB\x03\xe0\x41\x02\x1a/\n\x04Turn\x12\x14\n\x07speaker\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04text\x18\x02 \x01(\tB\x03\xe0\x41\x02\"P\n\x19MultispeakerPrebuiltVoice\x12\x1a\n\rspeaker_alias\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nspeaker_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"{\n\x17MultiSpeakerVoiceConfig\x12`\n\x15speaker_voice_configs\x18\x02 \x03(\x0b\x32<.google.cloud.texttospeech.v1beta1.MultispeakerPrebuiltVoiceB\x03\xe0\x41\x02\"\xa6\x02\n\x0eSynthesisInput\x12\x0e\n\x04text\x18\x01 \x01(\tH\x00\x12\x10\n\x06markup\x18\x05 \x01(\tH\x00\x12\x0e\n\x04ssml\x18\x02 \x01(\tH\x00\x12U\n\x14multi_speaker_markup\x18\x04 \x01(\x0b\x32\x35.google.cloud.texttospeech.v1beta1.MultiSpeakerMarkupH\x00\x12\x13\n\x06prompt\x18\x06 \x01(\tH\x01\x88\x01\x01\x12[\n\x15\x63ustom_pronunciations\x18\x03 \x01(\x0b\x32\x37.google.cloud.texttospeech.v1beta1.CustomPronunciationsB\x03\xe0\x41\x01\x42\x0e\n\x0cinput_sourceB\t\n\x07_prompt\"\xa2\x03\n\x14VoiceSelectionParams\x12\x1a\n\rlanguage_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x02 \x01(\t\x12G\n\x0bssml_gender\x18\x03 \x01(\x0e\x32\x32.google.cloud.texttospeech.v1beta1.SsmlVoiceGender\x12J\n\x0c\x63ustom_voice\x18\x04 \x01(\x0b\x32\x34.google.cloud.texttospeech.v1beta1.CustomVoiceParams\x12M\n\x0bvoice_clone\x18\x05 \x01(\x0b\x32\x33.google.cloud.texttospeech.v1beta1.VoiceCloneParamsB\x03\xe0\x41\x01\x12\x17\n\nmodel_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x63\n\x1amulti_speaker_voice_config\x18\x07 \x01(\x0b\x32:.google.cloud.texttospeech.v1beta1.MultiSpeakerVoiceConfigB\x03\xe0\x41\x01\"\xf6\x01\n\x0b\x41udioConfig\x12M\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32\x30.google.cloud.texttospeech.v1beta1.AudioEncodingB\x03\xe0\x41\x02\x12\x1d\n\rspeaking_rate\x18\x02 \x01(\x01\x42\x06\xe0\x41\x04\xe0\x41\x01\x12\x15\n\x05pitch\x18\x03 \x01(\x01\x42\x06\xe0\x41\x04\xe0\x41\x01\x12\x1e\n\x0evolume_gain_db\x18\x04 \x01(\x01\x42\x06\xe0\x41\x04\xe0\x41\x01\x12\x1e\n\x11sample_rate_hertz\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\"\n\x12\x65\x66\x66\x65\x63ts_profile_id\x18\x06 \x03(\tB\x06\xe0\x41\x04\xe0\x41\x01\"\xf6\x01\n\x11\x43ustomVoiceParams\x12\x32\n\x05model\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12\x61\n\x0ereported_usage\x18\x03 \x01(\x0e\x32\x42.google.cloud.texttospeech.v1beta1.CustomVoiceParams.ReportedUsageB\x05\x18\x01\xe0\x41\x01\"J\n\rReportedUsage\x12\x1e\n\x1aREPORTED_USAGE_UNSPECIFIED\x10\x00\x12\x0c\n\x08REALTIME\x10\x01\x12\x0b\n\x07OFFLINE\x10\x02\"2\n\x10VoiceCloneParams\x12\x1e\n\x11voice_cloning_key\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xb9\x01\n\x18SynthesizeSpeechResponse\x12\x15\n\raudio_content\x18\x01 \x01(\x0c\x12@\n\ntimepoints\x18\x02 \x03(\x0b\x32,.google.cloud.texttospeech.v1beta1.Timepoint\x12\x44\n\x0c\x61udio_config\x18\x04 \x01(\x0b\x32..google.cloud.texttospeech.v1beta1.AudioConfig\"4\n\tTimepoint\x12\x11\n\tmark_name\x18\x04 \x01(\t\x12\x14\n\x0ctime_seconds\x18\x03 \x01(\x01\"\xa4\x01\n\x14StreamingAudioConfig\x12M\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32\x30.google.cloud.texttospeech.v1beta1.AudioEncodingB\x03\xe0\x41\x02\x12\x1e\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1d\n\rspeaking_rate\x18\x03 \x01(\x01\x42\x06\xe0\x41\x04\xe0\x41\x01\"\xa3\x02\n\x19StreamingSynthesizeConfig\x12K\n\x05voice\x18\x01 \x01(\x0b\x32\x37.google.cloud.texttospeech.v1beta1.VoiceSelectionParamsB\x03\xe0\x41\x02\x12\\\n\x16streaming_audio_config\x18\x04 \x01(\x0b\x32\x37.google.cloud.texttospeech.v1beta1.StreamingAudioConfigB\x03\xe0\x41\x01\x12[\n\x15\x63ustom_pronunciations\x18\x05 \x01(\x0b\x32\x37.google.cloud.texttospeech.v1beta1.CustomPronunciationsB\x03\xe0\x41\x01\"\xc2\x01\n\x17StreamingSynthesisInput\x12\x0e\n\x04text\x18\x01 \x01(\tH\x00\x12\x10\n\x06markup\x18\x05 \x01(\tH\x00\x12U\n\x14multi_speaker_markup\x18\x07 \x01(\x0b\x32\x35.google.cloud.texttospeech.v1beta1.MultiSpeakerMarkupH\x00\x12\x13\n\x06prompt\x18\x06 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0cinput_sourceB\t\n\x07_prompt\"\xd8\x01\n\x1aStreamingSynthesizeRequest\x12X\n\x10streaming_config\x18\x01 \x01(\x0b\x32<.google.cloud.texttospeech.v1beta1.StreamingSynthesizeConfigH\x00\x12K\n\x05input\x18\x02 \x01(\x0b\x32:.google.cloud.texttospeech.v1beta1.StreamingSynthesisInputH\x00\x42\x13\n\x11streaming_request\"4\n\x1bStreamingSynthesizeResponse\x12\x15\n\raudio_content\x18\x01 \x01(\x0c*W\n\x0fSsmlVoiceGender\x12!\n\x1dSSML_VOICE_GENDER_UNSPECIFIED\x10\x00\x12\x08\n\x04MALE\x10\x01\x12\n\n\x06\x46\x45MALE\x10\x02\x12\x0b\n\x07NEUTRAL\x10\x03*\x8c\x01\n\rAudioEncoding\x12\x1e\n\x1a\x41UDIO_ENCODING_UNSPECIFIED\x10\x00\x12\x0c\n\x08LINEAR16\x10\x01\x12\x07\n\x03MP3\x10\x02\x12\x0f\n\x0bMP3_64_KBPS\x10\x04\x12\x0c\n\x08OGG_OPUS\x10\x03\x12\t\n\x05MULAW\x10\x05\x12\x08\n\x04\x41LAW\x10\x06\x12\x07\n\x03PCM\x10\x07\x12\x07\n\x03M4A\x10\x08\x32\xef\x04\n\x0cTextToSpeech\x12\xa2\x01\n\nListVoices\x12\x34.google.cloud.texttospeech.v1beta1.ListVoicesRequest\x1a\x35.google.cloud.texttospeech.v1beta1.ListVoicesResponse\"\'\xda\x41\rlanguage_code\x82\xd3\xe4\x93\x02\x11\x12\x0f/v1beta1/voices\x12\xcb\x01\n\x10SynthesizeSpeech\x12:.google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest\x1a;.google.cloud.texttospeech.v1beta1.SynthesizeSpeechResponse\">\xda\x41\x18input,voice,audio_config\x82\xd3\xe4\x93\x02\x1d\"\x18/v1beta1/text:synthesize:\x01*\x12\x9a\x01\n\x13StreamingSynthesize\x12=.google.cloud.texttospeech.v1beta1.StreamingSynthesizeRequest\x1a>.google.cloud.texttospeech.v1beta1.StreamingSynthesizeResponse\"\x00(\x01\x30\x01\x1aO\xca\x41\x1btexttospeech.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd5\x02\n%com.google.cloud.texttospeech.v1beta1B\x11TextToSpeechProtoP\x01ZIcloud.google.com/go/texttospeech/apiv1beta1/texttospeechpb;texttospeechpb\xa2\x02\x04\x43TTS\xaa\x02!Google.Cloud.TextToSpeech.V1Beta1\xca\x02!Google\\Cloud\\TextToSpeech\\V1beta1\xea\x02$Google::Cloud::TextToSpeech::V1beta1\xea\x41U\n\x1b\x61utoml.googleapis.com/Model\x12\x36projects/{project}/locations/{location}/models/{model}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module TextToSpeech - module V1beta1 - ListVoicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.ListVoicesRequest").msgclass - ListVoicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.ListVoicesResponse").msgclass - Voice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.Voice").msgclass - AdvancedVoiceOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions").msgclass - SynthesizeSpeechRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest").msgclass - SynthesizeSpeechRequest::TimepointType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest.TimepointType").enummodule - CustomPronunciationParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.CustomPronunciationParams").msgclass - CustomPronunciationParams::PhoneticEncoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.CustomPronunciationParams.PhoneticEncoding").enummodule - CustomPronunciations = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.CustomPronunciations").msgclass - MultiSpeakerMarkup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.MultiSpeakerMarkup").msgclass - MultiSpeakerMarkup::Turn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.MultiSpeakerMarkup.Turn").msgclass - MultispeakerPrebuiltVoice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.MultispeakerPrebuiltVoice").msgclass - MultiSpeakerVoiceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.MultiSpeakerVoiceConfig").msgclass - SynthesisInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.SynthesisInput").msgclass - VoiceSelectionParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.VoiceSelectionParams").msgclass - AudioConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.AudioConfig").msgclass - CustomVoiceParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.CustomVoiceParams").msgclass - CustomVoiceParams::ReportedUsage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.CustomVoiceParams.ReportedUsage").enummodule - VoiceCloneParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.VoiceCloneParams").msgclass - SynthesizeSpeechResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.SynthesizeSpeechResponse").msgclass - Timepoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.Timepoint").msgclass - StreamingAudioConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.StreamingAudioConfig").msgclass - StreamingSynthesizeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.StreamingSynthesizeConfig").msgclass - StreamingSynthesisInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.StreamingSynthesisInput").msgclass - StreamingSynthesizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.StreamingSynthesizeRequest").msgclass - StreamingSynthesizeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.StreamingSynthesizeResponse").msgclass - SsmlVoiceGender = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.SsmlVoiceGender").enummodule - AudioEncoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.AudioEncoding").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/texttospeech/v1beta1/cloud_tts_services_pb.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/texttospeech/v1beta1/cloud_tts_services_pb.rb deleted file mode 100644 index cd9155f58667..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/lib/google/cloud/texttospeech/v1beta1/cloud_tts_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/texttospeech/v1beta1/cloud_tts.proto for package 'Google.Cloud.TextToSpeech.V1beta1' -# 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/texttospeech/v1beta1/cloud_tts_pb' - -module Google - module Cloud - module TextToSpeech - module V1beta1 - module TextToSpeech - # Service that implements Google Cloud Text-to-Speech API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.texttospeech.v1beta1.TextToSpeech' - - # Returns a list of Voice supported for synthesis. - rpc :ListVoices, ::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest, ::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse - # Synthesizes speech synchronously: receive results after all text input - # has been processed. - rpc :SynthesizeSpeech, ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest, ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse - # Performs bidirectional streaming speech synthesis: receives audio while - # sending text. - rpc :StreamingSynthesize, stream(::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeRequest), stream(::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeResponse) - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/README.md deleted file mode 100644 index 86ce92848b79..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Text-to-Speech V1beta1 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-text_to_speech-v1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # 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. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - # - # Example: - # - # 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 - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # 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 - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # 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 - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/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-text_to_speech-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/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-text_to_speech-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/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-text_to_speech-v1beta1/proto_docs/google/cloud/texttospeech/v1beta1/cloud_tts.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/cloud/texttospeech/v1beta1/cloud_tts.rb deleted file mode 100644 index 030e04028192..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/cloud/texttospeech/v1beta1/cloud_tts.rb +++ /dev/null @@ -1,618 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module TextToSpeech - module V1beta1 - # The top-level message sent by the client for the `ListVoices` method. - # @!attribute [rw] language_code - # @return [::String] - # Optional. Recommended. - # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - # If not specified, the API will return all supported voices. - # If specified, the ListVoices call will only return voices that can be used - # to synthesize this language_code. For example, if you specify `"en-NZ"`, - # all `"en-NZ"` voices will be returned. If you specify `"no"`, both - # `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be - # returned. - class ListVoicesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The message returned to the client by the `ListVoices` method. - # @!attribute [rw] voices - # @return [::Array<::Google::Cloud::TextToSpeech::V1beta1::Voice>] - # The list of voices. - class ListVoicesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Description of a voice supported by the TTS service. - # @!attribute [rw] language_codes - # @return [::Array<::String>] - # The languages that this voice supports, expressed as - # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g. - # "en-US", "es-419", "cmn-tw"). - # @!attribute [rw] name - # @return [::String] - # The name of this voice. Each distinct voice has a unique name. - # @!attribute [rw] ssml_gender - # @return [::Google::Cloud::TextToSpeech::V1beta1::SsmlVoiceGender] - # The gender of this voice. - # @!attribute [rw] natural_sample_rate_hertz - # @return [::Integer] - # The natural sample rate (in hertz) for this voice. - class Voice - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Used for advanced voice options. - # @!attribute [rw] low_latency_journey_synthesis - # @return [::Boolean] - # Only for Journey voices. If false, the synthesis is context aware - # and has a higher latency. - # @!attribute [rw] relax_safety_filters - # @return [::Boolean] - # Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only - # supported for accounts linked to Invoiced (Offline) Cloud billing accounts. - # Otherwise, will return result - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - class AdvancedVoiceOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The top-level message sent by the client for the `SynthesizeSpeech` method. - # @!attribute [rw] input - # @return [::Google::Cloud::TextToSpeech::V1beta1::SynthesisInput] - # Required. The Synthesizer requires either plain text or SSML as input. - # @!attribute [rw] voice - # @return [::Google::Cloud::TextToSpeech::V1beta1::VoiceSelectionParams] - # Required. The desired voice of the synthesized audio. - # @!attribute [rw] audio_config - # @return [::Google::Cloud::TextToSpeech::V1beta1::AudioConfig] - # Required. The configuration of the synthesized audio. - # @!attribute [rw] enable_time_pointing - # @return [::Array<::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest::TimepointType>] - # Whether and what timepoints are returned in the response. - # @!attribute [rw] advanced_voice_options - # @return [::Google::Cloud::TextToSpeech::V1beta1::AdvancedVoiceOptions] - # Advanced voice options. - class SynthesizeSpeechRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of timepoint information that is returned in the response. - module TimepointType - # Not specified. No timepoint information will be returned. - TIMEPOINT_TYPE_UNSPECIFIED = 0 - - # Timepoint information of `` tags in SSML input will be returned. - SSML_MARK = 1 - end - end - - # Pronunciation customization for a phrase. - # @!attribute [rw] phrase - # @return [::String] - # The phrase to which the customization is applied. - # The phrase can be multiple words, such as proper nouns, but shouldn't span - # the length of the sentence. - # @!attribute [rw] phonetic_encoding - # @return [::Google::Cloud::TextToSpeech::V1beta1::CustomPronunciationParams::PhoneticEncoding] - # The phonetic encoding of the phrase. - # @!attribute [rw] pronunciation - # @return [::String] - # The pronunciation of the phrase. This must be in the phonetic encoding - # specified above. - class CustomPronunciationParams - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The phonetic encoding of the phrase. - module PhoneticEncoding - # Not specified. - PHONETIC_ENCODING_UNSPECIFIED = 0 - - # IPA, such as apple -> ˈæpəl. - # https://en.wikipedia.org/wiki/International_Phonetic_Alphabet - PHONETIC_ENCODING_IPA = 1 - - # X-SAMPA, such as apple -> "{p@l". - # https://en.wikipedia.org/wiki/X-SAMPA - PHONETIC_ENCODING_X_SAMPA = 2 - - # For reading-to-pron conversion to work well, the `pronunciation` field - # should only contain Kanji, Hiragana, and Katakana. - # - # The pronunciation can also contain pitch accents. - # The start of a pitch phrase is specified with `^` and the down-pitch - # position is specified with `!`, for example: - # - # phrase:端 pronunciation:^はし - # phrase:箸 pronunciation:^は!し - # phrase:橋 pronunciation:^はし! - # - # We currently only support the Tokyo dialect, which allows at most one - # down-pitch per phrase (i.e. at most one `!` between `^`). - PHONETIC_ENCODING_JAPANESE_YOMIGANA = 3 - - # Used to specify pronunciations for Mandarin words. See - # https://en.wikipedia.org/wiki/Pinyin. - # - # For example: 朝阳, the pronunciation is "chao2 yang2". The number - # represents the tone, and there is a space between syllables. Neutral - # tones are represented by 5, for example 孩子 "hai2 zi5". - PHONETIC_ENCODING_PINYIN = 4 - end - end - - # A collection of pronunciation customizations. - # @!attribute [rw] pronunciations - # @return [::Array<::Google::Cloud::TextToSpeech::V1beta1::CustomPronunciationParams>] - # The pronunciation customizations are applied. - class CustomPronunciations - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A collection of turns for multi-speaker synthesis. - # @!attribute [rw] turns - # @return [::Array<::Google::Cloud::TextToSpeech::V1beta1::MultiSpeakerMarkup::Turn>] - # Required. Speaker turns. - class MultiSpeakerMarkup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A multi-speaker turn. - # @!attribute [rw] speaker - # @return [::String] - # Required. The speaker of the turn, for example, 'O' or 'Q'. Please refer - # to documentation for available speakers. - # @!attribute [rw] text - # @return [::String] - # Required. The text to speak. - class Turn - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Configuration for a single speaker in a Gemini TTS multi-speaker setup. - # Enables dialogue between two speakers. - # @!attribute [rw] speaker_alias - # @return [::String] - # Required. The speaker alias of the voice. This is the user-chosen speaker - # name that is used in the multispeaker text input, such as "Speaker1". - # @!attribute [rw] speaker_id - # @return [::String] - # Required. The speaker ID of the voice. See - # https://cloud.google.com/text-to-speech/docs/gemini-tts#voice_options - # for available values. - class MultispeakerPrebuiltVoice - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for a multi-speaker text-to-speech setup. Enables the use of up - # to two distinct voices in a single synthesis request. - # @!attribute [rw] speaker_voice_configs - # @return [::Array<::Google::Cloud::TextToSpeech::V1beta1::MultispeakerPrebuiltVoice>] - # Required. A list of configurations for the voices of the speakers. Exactly - # two speaker voice configurations must be provided. - class MultiSpeakerVoiceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains text input to be synthesized. Either `text` or `ssml` must be - # supplied. Supplying both or neither returns - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. The - # input size is limited to 5000 bytes. - # @!attribute [rw] text - # @return [::String] - # The raw text to be synthesized. - # - # Note: The following fields are mutually exclusive: `text`, `markup`, `ssml`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] markup - # @return [::String] - # Markup for HD voices specifically. This field may not be used with any - # other voices. - # - # Note: The following fields are mutually exclusive: `markup`, `text`, `ssml`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] ssml - # @return [::String] - # The SSML document to be synthesized. The SSML document must be valid - # and well-formed. Otherwise the RPC will fail and return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. For - # more information, see - # [SSML](https://cloud.google.com/text-to-speech/docs/ssml). - # - # Note: The following fields are mutually exclusive: `ssml`, `text`, `markup`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] multi_speaker_markup - # @return [::Google::Cloud::TextToSpeech::V1beta1::MultiSpeakerMarkup] - # The multi-speaker input to be synthesized. Only applicable for - # multi-speaker synthesis. - # - # Note: The following fields are mutually exclusive: `multi_speaker_markup`, `text`, `markup`, `ssml`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] prompt - # @return [::String] - # This system instruction is supported only for controllable/promptable voice - # models. If this system instruction is used, we pass the unedited text to - # Gemini-TTS. Otherwise, a default system instruction is used. AI Studio - # calls this system instruction, Style Instructions. - # @!attribute [rw] custom_pronunciations - # @return [::Google::Cloud::TextToSpeech::V1beta1::CustomPronunciations] - # Optional. The pronunciation customizations are applied to the input. If - # this is set, the input is synthesized using the given pronunciation - # customizations. - # - # The initial support is for en-us, with plans to expand to other locales in - # the future. Instant Clone voices aren't supported. - # - # In order to customize the pronunciation of a phrase, there must be an exact - # match of the phrase in the input types. If using SSML, the phrase must not - # be inside a phoneme tag. - class SynthesisInput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Description of which voice to use for a synthesis request. - # @!attribute [rw] language_code - # @return [::String] - # Required. The language (and potentially also the region) of the voice - # expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - # language tag, e.g. "en-US". This should not include a script tag (e.g. use - # "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred - # from the input provided in the SynthesisInput. The TTS service - # will use this parameter to help choose an appropriate voice. Note that - # the TTS service may choose a voice with a slightly different language code - # than the one selected; it may substitute a different region - # (e.g. using en-US rather than en-CA if there isn't a Canadian voice - # available), or even a different language, e.g. using "nb" (Norwegian - # Bokmal) instead of "no" (Norwegian)". - # @!attribute [rw] name - # @return [::String] - # The name of the voice. If both the name and the gender are not set, - # the service will choose a voice based on the other parameters such as - # language_code. - # @!attribute [rw] ssml_gender - # @return [::Google::Cloud::TextToSpeech::V1beta1::SsmlVoiceGender] - # The preferred gender of the voice. If not set, the service will - # choose a voice based on the other parameters such as language_code and - # name. Note that this is only a preference, not requirement; if a - # voice of the appropriate gender is not available, the synthesizer should - # substitute a voice with a different gender rather than failing the request. - # @!attribute [rw] custom_voice - # @return [::Google::Cloud::TextToSpeech::V1beta1::CustomVoiceParams] - # The configuration for a custom voice. If [CustomVoiceParams.model] is set, - # the service will choose the custom voice matching the specified - # configuration. - # @!attribute [rw] voice_clone - # @return [::Google::Cloud::TextToSpeech::V1beta1::VoiceCloneParams] - # Optional. The configuration for a voice clone. If - # [VoiceCloneParams.voice_clone_key] is set, the service chooses the voice - # clone matching the specified configuration. - # @!attribute [rw] model_name - # @return [::String] - # Optional. The name of the model. If set, the service will choose the model - # matching the specified configuration. - # @!attribute [rw] multi_speaker_voice_config - # @return [::Google::Cloud::TextToSpeech::V1beta1::MultiSpeakerVoiceConfig] - # Optional. The configuration for a Gemini multi-speaker text-to-speech - # setup. Enables the use of two distinct voices in a single synthesis - # request. - class VoiceSelectionParams - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Description of audio data to be synthesized. - # @!attribute [rw] audio_encoding - # @return [::Google::Cloud::TextToSpeech::V1beta1::AudioEncoding] - # Required. The format of the audio byte stream. - # @!attribute [rw] speaking_rate - # @return [::Float] - # Optional. Input only. Speaking rate/speed, in the range [0.25, 2.0]. 1.0 is - # the normal native speed supported by the specific voice. 2.0 is twice as - # fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 - # speed. Any other values < 0.25 or > 2.0 will return an error. - # @!attribute [rw] pitch - # @return [::Float] - # Optional. Input only. Speaking pitch, in the range [-20.0, 20.0]. 20 means - # increase 20 semitones from the original pitch. -20 means decrease 20 - # semitones from the original pitch. - # @!attribute [rw] volume_gain_db - # @return [::Float] - # Optional. Input only. Volume gain (in dB) of the normal native volume - # supported by the specific voice, in the range [-96.0, 16.0]. If unset, or - # set to a value of 0.0 (dB), will play at normal native signal amplitude. A - # value of -6.0 (dB) will play at approximately half the amplitude of the - # normal native signal amplitude. A value of +6.0 (dB) will play at - # approximately twice the amplitude of the normal native signal amplitude. - # Strongly recommend not to exceed +10 (dB) as there's usually no effective - # increase in loudness for any value greater than that. - # @!attribute [rw] sample_rate_hertz - # @return [::Integer] - # Optional. The synthesis sample rate (in hertz) for this audio. When this is - # specified in SynthesizeSpeechRequest, if this is different from the voice's - # natural sample rate, then the synthesizer will honor this request by - # converting to the desired sample rate (which might result in worse audio - # quality), unless the specified sample rate is not supported for the - # encoding chosen, in which case it will fail the request and return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - # @!attribute [rw] effects_profile_id - # @return [::Array<::String>] - # Optional. Input only. An identifier which selects 'audio effects' profiles - # that are applied on (post synthesized) text to speech. Effects are applied - # on top of each other in the order they are given. See - # [audio - # profiles](https://cloud.google.com/text-to-speech/docs/audio-profiles) for - # current supported profile ids. - class AudioConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Description of the custom voice to be synthesized. - # @!attribute [rw] model - # @return [::String] - # Required. The name of the AutoML model that synthesizes the custom voice. - # @!attribute [rw] reported_usage - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::TextToSpeech::V1beta1::CustomVoiceParams::ReportedUsage] - # Optional. Deprecated. The usage of the synthesized audio to be reported. - class CustomVoiceParams - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Deprecated. The usage of the synthesized audio. Usage does not affect - # billing. - module ReportedUsage - # Request with reported usage unspecified will be rejected. - REPORTED_USAGE_UNSPECIFIED = 0 - - # For scenarios where the synthesized audio is not downloadable and can - # only be used once. For example, real-time request in IVR system. - REALTIME = 1 - - # For scenarios where the synthesized audio is downloadable and can be - # reused. For example, the synthesized audio is downloaded, stored in - # customer service system and played repeatedly. - OFFLINE = 2 - end - end - - # The configuration of Voice Clone feature. - # @!attribute [rw] voice_cloning_key - # @return [::String] - # Required. Created by GenerateVoiceCloningKey. - class VoiceCloneParams - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The message returned to the client by the `SynthesizeSpeech` method. - # @!attribute [rw] audio_content - # @return [::String] - # The audio data bytes encoded as specified in the request, including the - # header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS). - # For LINEAR16 audio, we include the WAV header. Note: as - # with all bytes fields, protobuffers use a pure binary representation, - # whereas JSON representations use base64. - # @!attribute [rw] timepoints - # @return [::Array<::Google::Cloud::TextToSpeech::V1beta1::Timepoint>] - # A link between a position in the original request input and a corresponding - # time in the output audio. It's only supported via `` of SSML input. - # @!attribute [rw] audio_config - # @return [::Google::Cloud::TextToSpeech::V1beta1::AudioConfig] - # The audio metadata of `audio_content`. - class SynthesizeSpeechResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This contains a mapping between a certain point in the input text and a - # corresponding time in the output audio. - # @!attribute [rw] mark_name - # @return [::String] - # Timepoint name as received from the client within `` tag. - # @!attribute [rw] time_seconds - # @return [::Float] - # Time offset in seconds from the start of the synthesized audio. - class Timepoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Description of the desired output audio data. - # @!attribute [rw] audio_encoding - # @return [::Google::Cloud::TextToSpeech::V1beta1::AudioEncoding] - # Required. The format of the audio byte stream. - # Streaming supports PCM, ALAW, MULAW and OGG_OPUS. All other encodings - # return an error. - # @!attribute [rw] sample_rate_hertz - # @return [::Integer] - # Optional. The synthesis sample rate (in hertz) for this audio. - # @!attribute [rw] speaking_rate - # @return [::Float] - # Optional. Input only. Speaking rate/speed, in the range [0.25, 2.0]. 1.0 is - # the normal native speed supported by the specific voice. 2.0 is twice as - # fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 - # speed. Any other values < 0.25 or > 2.0 will return an error. - class StreamingAudioConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides configuration information for the StreamingSynthesize request. - # @!attribute [rw] voice - # @return [::Google::Cloud::TextToSpeech::V1beta1::VoiceSelectionParams] - # Required. The desired voice of the synthesized audio. - # @!attribute [rw] streaming_audio_config - # @return [::Google::Cloud::TextToSpeech::V1beta1::StreamingAudioConfig] - # Optional. The configuration of the synthesized audio. - # @!attribute [rw] custom_pronunciations - # @return [::Google::Cloud::TextToSpeech::V1beta1::CustomPronunciations] - # Optional. The pronunciation customizations are applied to the input. If - # this is set, the input is synthesized using the given pronunciation - # customizations. - # - # The initial support is for en-us, with plans to expand to other locales in - # the future. Instant Clone voices aren't supported. - # - # In order to customize the pronunciation of a phrase, there must be an exact - # match of the phrase in the input types. If using SSML, the phrase must not - # be inside a phoneme tag. - class StreamingSynthesizeConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Input to be synthesized. - # @!attribute [rw] text - # @return [::String] - # The raw text to be synthesized. It is recommended that each input - # contains complete, terminating sentences, which results in better prosody - # in the output audio. - # - # Note: The following fields are mutually exclusive: `text`, `markup`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] markup - # @return [::String] - # Markup for HD voices specifically. This field may not be used with any - # other voices. - # - # Note: The following fields are mutually exclusive: `markup`, `text`, `multi_speaker_markup`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] multi_speaker_markup - # @return [::Google::Cloud::TextToSpeech::V1beta1::MultiSpeakerMarkup] - # Multi-speaker markup for Gemini TTS. This field may not - # be used with any other voices. - # - # Note: The following fields are mutually exclusive: `multi_speaker_markup`, `text`, `markup`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] prompt - # @return [::String] - # This is system instruction supported only for controllable voice models. - class StreamingSynthesisInput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `StreamingSynthesize` method. Multiple - # `StreamingSynthesizeRequest` messages are sent in one call. - # The first message must contain a `streaming_config` that - # fully specifies the request configuration and must not contain `input`. All - # subsequent messages must only have `input` set. - # @!attribute [rw] streaming_config - # @return [::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeConfig] - # StreamingSynthesizeConfig to be used in this streaming attempt. Only - # specified in the first message sent in a `StreamingSynthesize` call. - # - # Note: The following fields are mutually exclusive: `streaming_config`, `input`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] input - # @return [::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesisInput] - # Input to synthesize. Specified in all messages but the first in a - # `StreamingSynthesize` call. - # - # Note: The following fields are mutually exclusive: `input`, `streaming_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class StreamingSynthesizeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `StreamingSynthesizeResponse` is the only message returned to the - # client by `StreamingSynthesize` method. A series of zero or more - # `StreamingSynthesizeResponse` messages are streamed back to the client. - # @!attribute [rw] audio_content - # @return [::String] - # The audio data bytes encoded as specified in the request. This is - # headerless LINEAR16 audio with a sample rate of 24000. - class StreamingSynthesizeResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Gender of the voice as described in - # [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice). - module SsmlVoiceGender - # An unspecified gender. - # In VoiceSelectionParams, this means that the client doesn't care which - # gender the selected voice will have. In the Voice field of - # ListVoicesResponse, this may mean that the voice doesn't fit any of the - # other categories in this enum, or that the gender of the voice isn't known. - SSML_VOICE_GENDER_UNSPECIFIED = 0 - - # A male voice. - MALE = 1 - - # A female voice. - FEMALE = 2 - - # A gender-neutral voice. This voice is not yet supported. - NEUTRAL = 3 - end - - # Configuration to set up audio encoder. The encoding determines the output - # audio format that we'd like. - module AudioEncoding - # Not specified. Only used by GenerateVoiceCloningKey. Otherwise, will return - # result - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - AUDIO_ENCODING_UNSPECIFIED = 0 - - # Uncompressed 16-bit signed little-endian samples (Linear PCM). - # Audio content returned as LINEAR16 also contains a WAV header. - LINEAR16 = 1 - - # MP3 audio at 32kbps. - MP3 = 2 - - # MP3 at 64kbps. - MP3_64_KBPS = 4 - - # Opus encoded audio wrapped in an ogg container. The result is a - # file which can be played natively on Android, and in browsers (at least - # Chrome and Firefox). The quality of the encoding is considerably higher - # than MP3 while using approximately the same bitrate. - OGG_OPUS = 3 - - # 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. - # Audio content returned as MULAW also contains a WAV header. - MULAW = 5 - - # 8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law. - # Audio content returned as ALAW also contains a WAV header. - ALAW = 6 - - # Uncompressed 16-bit signed little-endian samples (Linear PCM). - # Note that as opposed to LINEAR16, audio won't be wrapped in a WAV (or - # any other) header. - PCM = 7 - - # M4A audio. - M4A = 8 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/cloud/texttospeech/v1beta1/cloud_tts_lrs.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/cloud/texttospeech/v1beta1/cloud_tts_lrs.rb deleted file mode 100644 index c155bf275945..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/cloud/texttospeech/v1beta1/cloud_tts_lrs.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module TextToSpeech - module V1beta1 - # The top-level message sent by the client for the - # `SynthesizeLongAudio` method. - # @!attribute [rw] parent - # @return [::String] - # The resource states of the request in the form of - # `projects/*/locations/*`. - # @!attribute [rw] input - # @return [::Google::Cloud::TextToSpeech::V1beta1::SynthesisInput] - # Required. The Synthesizer requires either plain text or SSML as input. - # @!attribute [rw] audio_config - # @return [::Google::Cloud::TextToSpeech::V1beta1::AudioConfig] - # Required. The configuration of the synthesized audio. - # @!attribute [rw] output_gcs_uri - # @return [::String] - # Required. Specifies a Cloud Storage URI for the synthesis results. Must be - # specified in the format: `gs://bucket_name/object_name`, and the bucket - # must already exist. - # @!attribute [rw] voice - # @return [::Google::Cloud::TextToSpeech::V1beta1::VoiceSelectionParams] - # Required. The desired voice of the synthesized audio. - class SynthesizeLongAudioRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The message returned to the client by the `SynthesizeLongAudio` method. - class SynthesizeLongAudioResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for response returned by the `SynthesizeLongAudio` method. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Time when the request was received. - # @!attribute [rw] last_update_time - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Timestamp] - # Deprecated. Do not use. - # @!attribute [rw] progress_percentage - # @return [::Float] - # The progress of the most recent processing update in percentage, ie. 70.0%. - class SynthesizeLongAudioMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/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-text_to_speech-v1beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/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-text_to_speech-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/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-text_to_speech-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/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-text_to_speech-v1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/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-text_to_speech-v1beta1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/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-text_to_speech-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/Gemfile deleted file mode 100644 index d5f0f822f878..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/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-text_to_speech-v1beta1", path: "../" -else - gem "google-cloud-text_to_speech-v1beta1" -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-text_to_speech-v1beta1/snippets/snippet_metadata_google.cloud.texttospeech.v1beta1.json b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/snippet_metadata_google.cloud.texttospeech.v1beta1.json deleted file mode 100644 index 37611738d746..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/snippet_metadata_google.cloud.texttospeech.v1beta1.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-text_to_speech-v1beta1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.texttospeech.v1beta1", - "version": "v1beta1" - } - ] - }, - "snippets": [ - { - "region_tag": "texttospeech_v1beta1_generated_TextToSpeech_ListVoices_sync", - "title": "Snippet for the list_voices call in the TextToSpeech service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client#list_voices.", - "file": "text_to_speech/list_voices.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_voices", - "full_name": "::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client#list_voices", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse", - "client": { - "short_name": "TextToSpeech::Client", - "full_name": "::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client" - }, - "method": { - "short_name": "ListVoices", - "full_name": "google.cloud.texttospeech.v1beta1.TextToSpeech.ListVoices", - "service": { - "short_name": "TextToSpeech", - "full_name": "google.cloud.texttospeech.v1beta1.TextToSpeech" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "texttospeech_v1beta1_generated_TextToSpeech_SynthesizeSpeech_sync", - "title": "Snippet for the synthesize_speech call in the TextToSpeech service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client#synthesize_speech.", - "file": "text_to_speech/synthesize_speech.rb", - "language": "RUBY", - "client_method": { - "short_name": "synthesize_speech", - "full_name": "::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client#synthesize_speech", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse", - "client": { - "short_name": "TextToSpeech::Client", - "full_name": "::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client" - }, - "method": { - "short_name": "SynthesizeSpeech", - "full_name": "google.cloud.texttospeech.v1beta1.TextToSpeech.SynthesizeSpeech", - "service": { - "short_name": "TextToSpeech", - "full_name": "google.cloud.texttospeech.v1beta1.TextToSpeech" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "texttospeech_v1beta1_generated_TextToSpeech_StreamingSynthesize_sync", - "title": "Snippet for the streaming_synthesize call in the TextToSpeech service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client#streaming_synthesize.", - "file": "text_to_speech/streaming_synthesize.rb", - "language": "RUBY", - "client_method": { - "short_name": "streaming_synthesize", - "full_name": "::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client#streaming_synthesize", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeResponse", - "client": { - "short_name": "TextToSpeech::Client", - "full_name": "::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client" - }, - "method": { - "short_name": "StreamingSynthesize", - "full_name": "google.cloud.texttospeech.v1beta1.TextToSpeech.StreamingSynthesize", - "service": { - "short_name": "TextToSpeech", - "full_name": "google.cloud.texttospeech.v1beta1.TextToSpeech" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 55, - "type": "FULL" - } - ] - }, - { - "region_tag": "texttospeech_v1beta1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_sync", - "title": "Snippet for the synthesize_long_audio call in the TextToSpeechLongAudioSynthesize service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client#synthesize_long_audio.", - "file": "text_to_speech_long_audio_synthesize/synthesize_long_audio.rb", - "language": "RUBY", - "client_method": { - "short_name": "synthesize_long_audio", - "full_name": "::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client#synthesize_long_audio", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "TextToSpeechLongAudioSynthesize::Client", - "full_name": "::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client" - }, - "method": { - "short_name": "SynthesizeLongAudio", - "full_name": "google.cloud.texttospeech.v1beta1.TextToSpeechLongAudioSynthesize.SynthesizeLongAudio", - "service": { - "short_name": "TextToSpeechLongAudioSynthesize", - "full_name": "google.cloud.texttospeech.v1beta1.TextToSpeechLongAudioSynthesize" - } - } - }, - "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-text_to_speech-v1beta1/snippets/text_to_speech/list_voices.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech/list_voices.rb deleted file mode 100644 index 72a6f7d574e4..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech/list_voices.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 texttospeech_v1beta1_generated_TextToSpeech_ListVoices_sync] -require "google/cloud/text_to_speech/v1beta1" - -## -# Snippet for the list_voices call in the TextToSpeech service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client#list_voices. -# -def list_voices - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest.new - - # Call the list_voices method. - result = client.list_voices request - - # The returned object is of type Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse. - p result -end -# [END texttospeech_v1beta1_generated_TextToSpeech_ListVoices_sync] diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech/streaming_synthesize.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech/streaming_synthesize.rb deleted file mode 100644 index 69970b81486e..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech/streaming_synthesize.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 texttospeech_v1beta1_generated_TextToSpeech_StreamingSynthesize_sync] -require "google/cloud/text_to_speech/v1beta1" - -## -# Snippet for the streaming_synthesize call in the TextToSpeech service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client#streaming_synthesize. -# -def streaming_synthesize - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new - - # Create an input stream. - input = Gapic::StreamInput.new - - # Call the streaming_synthesize method to start streaming. - output = client.streaming_synthesize 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::TextToSpeech::V1beta1::StreamingSynthesizeRequest.new - input << Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeRequest.new - input.close - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeResponse - output.each do |current_response| - p current_response - end -end -# [END texttospeech_v1beta1_generated_TextToSpeech_StreamingSynthesize_sync] diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech/synthesize_speech.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech/synthesize_speech.rb deleted file mode 100644 index 9ec83074902f..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech/synthesize_speech.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 texttospeech_v1beta1_generated_TextToSpeech_SynthesizeSpeech_sync] -require "google/cloud/text_to_speech/v1beta1" - -## -# Snippet for the synthesize_speech call in the TextToSpeech service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client#synthesize_speech. -# -def synthesize_speech - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest.new - - # Call the synthesize_speech method. - result = client.synthesize_speech request - - # The returned object is of type Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse. - p result -end -# [END texttospeech_v1beta1_generated_TextToSpeech_SynthesizeSpeech_sync] diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech_long_audio_synthesize/synthesize_long_audio.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech_long_audio_synthesize/synthesize_long_audio.rb deleted file mode 100644 index ea7685188b99..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/snippets/text_to_speech_long_audio_synthesize/synthesize_long_audio.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 texttospeech_v1beta1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_sync] -require "google/cloud/text_to_speech/v1beta1" - -## -# Snippet for the synthesize_long_audio call in the TextToSpeechLongAudioSynthesize service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client#synthesize_long_audio. -# -def synthesize_long_audio - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest.new - - # Call the synthesize_long_audio method. - result = client.synthesize_long_audio request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END texttospeech_v1beta1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_sync] diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_operations_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_operations_test.rb deleted file mode 100644 index 9f679ded2226..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_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/texttospeech/v1beta1/cloud_tts_lrs_pb" -require "google/cloud/texttospeech/v1beta1/cloud_tts_lrs_services_pb" -require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize" - -class ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_paths_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_paths_test.rb deleted file mode 100644 index 434f49ebc8f3..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_paths_test.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 "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize" - -class ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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_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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.model_path project: "value0", location: "value1", model: "value2" - assert_equal "projects/value0/locations/value1/models/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_rest_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_rest_test.rb deleted file mode 100644 index 8cc355c8b862..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_rest_test.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 "helper" -require "gapic/rest" -require "google/cloud/texttospeech/v1beta1/cloud_tts_lrs_pb" -require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest" - - -class ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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_synthesize_long_audio - # Create test objects. - 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" - input = {} - audio_config = {} - output_gcs_uri = "hello world" - voice = {} - - synthesize_long_audio_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::ServiceStub.stub :transcode_synthesize_long_audio_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, synthesize_long_audio_client_stub do - # Create client - client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.synthesize_long_audio({ parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.synthesize_long_audio parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.synthesize_long_audio ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest.new(parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.synthesize_long_audio({ parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.synthesize_long_audio(::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest.new(parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, synthesize_long_audio_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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_test.rb deleted file mode 100644 index 5671468e58a9..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize_test.rb +++ /dev/null @@ -1,189 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/texttospeech/v1beta1/cloud_tts_lrs_pb" -require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize" - -class ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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_synthesize_long_audio - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - input = {} - audio_config = {} - output_gcs_uri = "hello world" - voice = {} - - synthesize_long_audio_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :synthesize_long_audio, name - assert_kind_of ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1beta1::SynthesisInput), request["input"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1beta1::AudioConfig), request["audio_config"] - assert_equal "hello world", request["output_gcs_uri"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1beta1::VoiceSelectionParams), request["voice"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, synthesize_long_audio_client_stub do - # Create client - client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.synthesize_long_audio({ parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.synthesize_long_audio parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.synthesize_long_audio ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest.new(parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.synthesize_long_audio({ parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.synthesize_long_audio(::Google::Cloud::TextToSpeech::V1beta1::SynthesizeLongAudioRequest.new(parent: parent, input: input, audio_config: audio_config, output_gcs_uri: output_gcs_uri, voice: voice), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, synthesize_long_audio_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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::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::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeechLongAudioSynthesize::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_paths_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_paths_test.rb deleted file mode 100644 index 0dd55bde46da..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_paths_test.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 "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/text_to_speech/v1beta1/text_to_speech" - -class ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::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_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::TextToSpeech::V1beta1::TextToSpeech::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.model_path project: "value0", location: "value1", model: "value2" - assert_equal "projects/value0/locations/value1/models/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_rest_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_rest_test.rb deleted file mode 100644 index acb908987e5e..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_rest_test.rb +++ /dev/null @@ -1,211 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/texttospeech/v1beta1/cloud_tts_pb" -require "google/cloud/text_to_speech/v1beta1/text_to_speech/rest" - - -class ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::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_voices - # Create test objects. - client_result = ::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - language_code = "hello world" - - list_voices_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::ServiceStub.stub :transcode_list_voices_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_voices_client_stub do - # Create client - client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_voices({ language_code: language_code }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_voices language_code: language_code do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_voices ::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest.new(language_code: language_code) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_voices({ language_code: language_code }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_voices(::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest.new(language_code: language_code), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_voices_client_stub.call_count - end - end - end - - def test_synthesize_speech - # Create test objects. - client_result = ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - input = {} - voice = {} - audio_config = {} - enable_time_pointing = [:TIMEPOINT_TYPE_UNSPECIFIED] - advanced_voice_options = {} - - synthesize_speech_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::ServiceStub.stub :transcode_synthesize_speech_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, synthesize_speech_client_stub do - # Create client - client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.synthesize_speech({ input: input, voice: voice, audio_config: audio_config, enable_time_pointing: enable_time_pointing, advanced_voice_options: advanced_voice_options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.synthesize_speech input: input, voice: voice, audio_config: audio_config, enable_time_pointing: enable_time_pointing, advanced_voice_options: advanced_voice_options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.synthesize_speech ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest.new(input: input, voice: voice, audio_config: audio_config, enable_time_pointing: enable_time_pointing, advanced_voice_options: advanced_voice_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.synthesize_speech({ input: input, voice: voice, audio_config: audio_config, enable_time_pointing: enable_time_pointing, advanced_voice_options: advanced_voice_options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.synthesize_speech(::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest.new(input: input, voice: voice, audio_config: audio_config, enable_time_pointing: enable_time_pointing, advanced_voice_options: advanced_voice_options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, synthesize_speech_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::TextToSpeech::V1beta1::TextToSpeech::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::TextToSpeech::V1beta1::TextToSpeech::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_test.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_test.rb deleted file mode 100644 index b789760fe045..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/google/cloud/text_to_speech/v1beta1/text_to_speech_test.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! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/texttospeech/v1beta1/cloud_tts_pb" -require "google/cloud/text_to_speech/v1beta1/text_to_speech" - -class ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::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_voices - # Create GRPC objects. - grpc_response = ::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - language_code = "hello world" - - list_voices_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_voices, name - assert_kind_of ::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest, request - assert_equal "hello world", request["language_code"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_voices_client_stub do - # Create client - client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_voices({ language_code: language_code }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_voices language_code: language_code do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_voices ::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest.new(language_code: language_code) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_voices({ language_code: language_code }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_voices(::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest.new(language_code: language_code), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_voices_client_stub.call_rpc_count - end - end - - def test_synthesize_speech - # Create GRPC objects. - grpc_response = ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - input = {} - voice = {} - audio_config = {} - enable_time_pointing = [:TIMEPOINT_TYPE_UNSPECIFIED] - advanced_voice_options = {} - - synthesize_speech_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :synthesize_speech, name - assert_kind_of ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1beta1::SynthesisInput), request["input"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1beta1::VoiceSelectionParams), request["voice"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1beta1::AudioConfig), request["audio_config"] - assert_equal [:TIMEPOINT_TYPE_UNSPECIFIED], request["enable_time_pointing"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1beta1::AdvancedVoiceOptions), request["advanced_voice_options"] - assert request.has_advanced_voice_options? - refute_nil options - end - - Gapic::ServiceStub.stub :new, synthesize_speech_client_stub do - # Create client - client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.synthesize_speech({ input: input, voice: voice, audio_config: audio_config, enable_time_pointing: enable_time_pointing, advanced_voice_options: advanced_voice_options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.synthesize_speech input: input, voice: voice, audio_config: audio_config, enable_time_pointing: enable_time_pointing, advanced_voice_options: advanced_voice_options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.synthesize_speech ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest.new(input: input, voice: voice, audio_config: audio_config, enable_time_pointing: enable_time_pointing, advanced_voice_options: advanced_voice_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.synthesize_speech({ input: input, voice: voice, audio_config: audio_config, enable_time_pointing: enable_time_pointing, advanced_voice_options: advanced_voice_options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.synthesize_speech(::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest.new(input: input, voice: voice, audio_config: audio_config, enable_time_pointing: enable_time_pointing, advanced_voice_options: advanced_voice_options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, synthesize_speech_client_stub.call_rpc_count - end - end - - def test_streaming_synthesize - # Create GRPC objects. - grpc_response = ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeResponse.new - grpc_operation = GRPC::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. - streaming_config = {} - - streaming_synthesize_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :streaming_synthesize, name - assert_kind_of Enumerable, request - refute_nil options - request - end - - Gapic::ServiceStub.stub :new, streaming_synthesize_client_stub do - # Create client - client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new do |config| - config.credentials = grpc_channel - end - - # Use enumerable object with hash and protobuf object. - request_hash = { streaming_config: streaming_config } - request_proto = ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeRequest.new streaming_config: streaming_config - enum_input = [request_hash, request_proto].to_enum - client.streaming_synthesize enum_input do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeResponse, r - end - assert_equal grpc_operation, operation - end - - # Use stream input object (from gapic-common). - request_hash = { streaming_config: streaming_config } - request_proto = ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeRequest.new streaming_config: streaming_config - stream_input = Gapic::StreamInput.new - client.streaming_synthesize stream_input do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeResponse, 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 = { streaming_config: streaming_config } - request_proto = ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeRequest.new streaming_config: streaming_config - enum_input = [request_hash, request_proto].to_enum - client.streaming_synthesize enum_input, grpc_options do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeResponse, r - end - assert_equal grpc_operation, operation - end - - # Use stream input object (from gapic-common) with options. - request_hash = { streaming_config: streaming_config } - request_proto = ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeRequest.new streaming_config: streaming_config - stream_input = Gapic::StreamInput.new - client.streaming_synthesize stream_input, grpc_options do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeResponse, 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, streaming_synthesize_client_stub.call_rpc_count - streaming_synthesize_client_stub.requests.each do |request| - request.to_a.each do |r| - assert_kind_of ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeRequest, r - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::TextToSpeech::V1beta1::StreamingSynthesizeConfig), r["streaming_config"] - assert_equal :streaming_config, r.streaming_request - end - end - 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::TextToSpeech::V1beta1::TextToSpeech::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::TextToSpeech::V1beta1::TextToSpeech::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::TextToSpeech::V1beta1::TextToSpeech::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-text_to_speech-v1beta1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-tpu-v1/.gitignore b/owl-bot-staging/google-cloud-tpu-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-tpu-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-tpu-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-tpu-v1/.repo-metadata.json deleted file mode 100644 index 382bdf22eb6e..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "tpu.googleapis.com", - "api_shortname": "tpu", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-tpu-v1/latest", - "distribution_name": "google-cloud-tpu-v1", - "is_cloud": true, - "language": "ruby", - "name": "tpu", - "name_pretty": "Cloud TPU V1 API", - "product_documentation": "https://cloud.google.com/tpu/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Tensor Processing Units (TPUs) are Google's custom-developed application-specific integrated circuits (ASICs) used to accelerate machine learning workloads. Cloud TPUs allow you to access TPUs from Compute Engine, Google Kubernetes Engine and AI Platform. Note that google-cloud-tpu-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-tpu instead. See the readme for more details.", - "ruby-cloud-env-prefix": "CLOUD_TPU", - "ruby-cloud-product-url": "https://cloud.google.com/tpu/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-tpu-v1/.rubocop.yml b/owl-bot-staging/google-cloud-tpu-v1/.rubocop.yml deleted file mode 100644 index 0db23e57cdbd..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-tpu-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-tpu-v1.rb" diff --git a/owl-bot-staging/google-cloud-tpu-v1/.toys.rb b/owl-bot-staging/google-cloud-tpu-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-tpu-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-tpu-v1/.yardopts b/owl-bot-staging/google-cloud-tpu-v1/.yardopts deleted file mode 100644 index f2c8ec30b07e..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud TPU 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-tpu-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-tpu-v1/AUTHENTICATION.md deleted file mode 100644 index dcd3772bc00e..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-tpu-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-tpu-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/tpu/v1" - -client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/tpu/v1" - -::Google::Cloud::Tpu::V1::Tpu::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Tpu::V1::Tpu::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-tpu-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/tpu/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Tpu::V1::Tpu::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-tpu-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-tpu-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-tpu-v1/Gemfile b/owl-bot-staging/google-cloud-tpu-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-tpu-v1/LICENSE.md b/owl-bot-staging/google-cloud-tpu-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-tpu-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-tpu-v1/README.md b/owl-bot-staging/google-cloud-tpu-v1/README.md deleted file mode 100644 index 8e5f3796c7e1..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud TPU V1 API - -TPU API provides customers with access to Google TPU technology. - -Tensor Processing Units (TPUs) are Google's custom-developed application-specific integrated circuits (ASICs) used to accelerate machine learning workloads. Cloud TPUs allow you to access TPUs from Compute Engine, Google Kubernetes Engine and AI Platform. - -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 TPU V1 API. Most users should consider using -the main client gem, -[google-cloud-tpu](https://rubygems.org/gems/google-cloud-tpu). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-tpu-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/tpu.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/tpu/v1" - -client = ::Google::Cloud::Tpu::V1::Tpu::Client.new -request = ::Google::Cloud::Tpu::V1::ListNodesRequest.new # (request fields as keyword arguments...) -response = client.list_nodes request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-tpu-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/tpu/) -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/tpu/v1" -require "logger" - -client = ::Google::Cloud::Tpu::V1::Tpu::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-tpu`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-tpu-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-tpu`. -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-tpu-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-tpu-v1/Rakefile b/owl-bot-staging/google-cloud-tpu-v1/Rakefile deleted file mode 100644 index 6973baaa474a..000000000000 --- a/owl-bot-staging/google-cloud-tpu-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-tpu-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["CLOUD_TPU_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["CLOUD_TPU_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["CLOUD_TPU_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 CLOUD_TPU_TEST_PROJECT=test123 CLOUD_TPU_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/tpu/v1/tpu/credentials" - ::Google::Cloud::Tpu::V1::Tpu::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["CLOUD_TPU_PROJECT"] = project - ENV["CLOUD_TPU_TEST_PROJECT"] = project - ENV["CLOUD_TPU_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-tpu-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-tpu-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-tpu-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-tpu-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-tpu-v1" - header "google-cloud-tpu-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-tpu-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-tpu-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-tpu-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-tpu-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-tpu-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-tpu-v1/gapic_metadata.json deleted file mode 100644 index d3485f86c0f6..000000000000 --- a/owl-bot-staging/google-cloud-tpu-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.tpu.v1", - "libraryPackage": "::Google::Cloud::Tpu::V1", - "services": { - "Tpu": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Tpu::V1::Tpu::Client", - "rpcs": { - "ListNodes": { - "methods": [ - "list_nodes" - ] - }, - "GetNode": { - "methods": [ - "get_node" - ] - }, - "CreateNode": { - "methods": [ - "create_node" - ] - }, - "DeleteNode": { - "methods": [ - "delete_node" - ] - }, - "ReimageNode": { - "methods": [ - "reimage_node" - ] - }, - "StopNode": { - "methods": [ - "stop_node" - ] - }, - "StartNode": { - "methods": [ - "start_node" - ] - }, - "ListTensorFlowVersions": { - "methods": [ - "list_tensor_flow_versions" - ] - }, - "GetTensorFlowVersion": { - "methods": [ - "get_tensor_flow_version" - ] - }, - "ListAcceleratorTypes": { - "methods": [ - "list_accelerator_types" - ] - }, - "GetAcceleratorType": { - "methods": [ - "get_accelerator_type" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-tpu-v1/google-cloud-tpu-v1.gemspec b/owl-bot-staging/google-cloud-tpu-v1/google-cloud-tpu-v1.gemspec deleted file mode 100644 index a0c096780448..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/google-cloud-tpu-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/tpu/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-tpu-v1" - gem.version = Google::Cloud::Tpu::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Tensor Processing Units (TPUs) are Google's custom-developed application-specific integrated circuits (ASICs) used to accelerate machine learning workloads. Cloud TPUs allow you to access TPUs from Compute Engine, Google Kubernetes Engine and AI Platform. Note that google-cloud-tpu-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-tpu instead. See the readme for more details." - gem.summary = "TPU API provides customers with access to Google TPU technology." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-tpu-v1/lib/google-cloud-tpu-v1.rb b/owl-bot-staging/google-cloud-tpu-v1/lib/google-cloud-tpu-v1.rb deleted file mode 100644 index feffd3cd43da..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/lib/google-cloud-tpu-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/tpu/v1" diff --git a/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1.rb b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1.rb deleted file mode 100644 index 04462f2cc2c2..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/tpu/v1/tpu" -require "google/cloud/tpu/v1/version" - -module Google - module Cloud - module Tpu - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/tpu/v1" - # client = ::Google::Cloud::Tpu::V1::Tpu::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/tpu/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/cloud_tpu_pb.rb b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/cloud_tpu_pb.rb deleted file mode 100644 index ef5ed72337db..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/cloud_tpu_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/tpu/v1/cloud_tpu.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/timestamp_pb' - - -descriptor_data = "\n#google/cloud/tpu/v1/cloud_tpu.proto\x12\x13google.cloud.tpu.v1\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\x1fgoogle/protobuf/timestamp.proto\"9\n\x10SchedulingConfig\x12\x13\n\x0bpreemptible\x18\x01 \x01(\x08\x12\x10\n\x08reserved\x18\x02 \x01(\x08\"3\n\x0fNetworkEndpoint\x12\x12\n\nip_address\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\x05\"\xc1\n\n\x04Node\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x1d\n\x10\x61\x63\x63\x65lerator_type\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\nip_address\x18\x08 \x01(\tB\x02\x18\x01\x12\x10\n\x04port\x18\x0e \x01(\tB\x02\x18\x01\x12\x33\n\x05state\x18\t \x01(\x0e\x32\x1f.google.cloud.tpu.v1.Node.StateB\x03\xe0\x41\x03\x12\x1f\n\x12health_description\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12tensorflow_version\x18\x0b \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07network\x18\x0c \x01(\t\x12\x12\n\ncidr_block\x18\r \x01(\t\x12\x1c\n\x0fservice_account\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x11scheduling_config\x18\x11 \x01(\x0b\x32%.google.cloud.tpu.v1.SchedulingConfig\x12\x44\n\x11network_endpoints\x18\x15 \x03(\x0b\x32$.google.cloud.tpu.v1.NetworkEndpointB\x03\xe0\x41\x03\x12\x30\n\x06health\x18\x16 \x01(\x0e\x32 .google.cloud.tpu.v1.Node.Health\x12\x35\n\x06labels\x18\x18 \x03(\x0b\x32%.google.cloud.tpu.v1.Node.LabelsEntry\x12\x1e\n\x16use_service_networking\x18\x1b \x01(\x08\x12>\n\x0b\x61pi_version\x18& \x01(\x0e\x32$.google.cloud.tpu.v1.Node.ApiVersionB\x03\xe0\x41\x03\x12\x33\n\x08symptoms\x18\' \x03(\x0b\x32\x1c.google.cloud.tpu.v1.SymptomB\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\"\xee\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0e\n\nRESTARTING\x10\x03\x12\r\n\tREIMAGING\x10\x04\x12\x0c\n\x08\x44\x45LETING\x10\x05\x12\r\n\tREPAIRING\x10\x06\x12\x0b\n\x07STOPPED\x10\x08\x12\x0c\n\x08STOPPING\x10\t\x12\x0c\n\x08STARTING\x10\n\x12\r\n\tPREEMPTED\x10\x0b\x12\x0e\n\nTERMINATED\x10\x0c\x12\n\n\x06HIDING\x10\r\x12\n\n\x06HIDDEN\x10\x0e\x12\x0c\n\x08UNHIDING\x10\x0f\x12\x0b\n\x07UNKNOWN\x10\x10\"\x89\x01\n\x06Health\x12\x16\n\x12HEALTH_UNSPECIFIED\x10\x00\x12\x0b\n\x07HEALTHY\x10\x01\x12\x18\n\x14\x44\x45PRECATED_UNHEALTHY\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x18\n\x14UNHEALTHY_TENSORFLOW\x10\x04\x12\x19\n\x15UNHEALTHY_MAINTENANCE\x10\x05\"O\n\nApiVersion\x12\x1b\n\x17\x41PI_VERSION_UNSPECIFIED\x10\x00\x12\r\n\tV1_ALPHA1\x10\x01\x12\x06\n\x02V1\x10\x02\x12\r\n\tV2_ALPHA1\x10\x03:R\xea\x41O\n\x17tpu.googleapis.com/Node\x12\x34projects/{project}/locations/{location}/nodes/{node}\"j\n\x10ListNodesRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17tpu.googleapis.com/Node\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"k\n\x11ListNodesResponse\x12(\n\x05nodes\x18\x01 \x03(\x0b\x32\x19.google.cloud.tpu.v1.Node\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"?\n\x0eGetNodeRequest\x12-\n\x04name\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\n\x17tpu.googleapis.com/Node\"\x83\x01\n\x11\x43reateNodeRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17tpu.googleapis.com/Node\x12\x0f\n\x07node_id\x18\x02 \x01(\t\x12,\n\x04node\x18\x03 \x01(\x0b\x32\x19.google.cloud.tpu.v1.NodeB\x03\xe0\x41\x02\"B\n\x11\x44\x65leteNodeRequest\x12-\n\x04name\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\n\x17tpu.googleapis.com/Node\">\n\x12ReimageNodeRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\x12tensorflow_version\x18\x02 \x01(\t\"\x1f\n\x0fStopNodeRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\" \n\x10StartNodeRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\xaf\x01\n\x11TensorFlowVersion\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t:{\xea\x41x\n$tpu.googleapis.com/TensorFlowVersion\x12Pprojects/{project}/locations/{location}/tensorFlowVersions/{tensor_flow_version}\"Y\n\x1bGetTensorFlowVersionRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$tpu.googleapis.com/TensorFlowVersion\"\xa6\x01\n\x1dListTensorFlowVersionsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$tpu.googleapis.com/TensorFlowVersion\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\x12\x10\n\x08order_by\x18\x06 \x01(\t\"\x93\x01\n\x1eListTensorFlowVersionsResponse\x12\x43\n\x13tensorflow_versions\x18\x01 \x03(\x0b\x32&.google.cloud.tpu.v1.TensorFlowVersion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xa3\x01\n\x0f\x41\x63\x63\x65leratorType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t:t\xea\x41q\n\"tpu.googleapis.com/AcceleratorType\x12Kprojects/{project}/locations/{location}/acceleratorTypes/{accelerator_type}\"U\n\x19GetAcceleratorTypeRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"tpu.googleapis.com/AcceleratorType\"\xa2\x01\n\x1bListAcceleratorTypesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"tpu.googleapis.com/AcceleratorType\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\x12\x10\n\x08order_by\x18\x06 \x01(\t\"\x8d\x01\n\x1cListAcceleratorTypesResponse\x12?\n\x11\x61\x63\x63\x65lerator_types\x18\x01 \x03(\x0b\x32$.google.cloud.tpu.v1.AcceleratorType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xd6\x01\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\"\xc5\x02\n\x07Symptom\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x0csymptom_type\x18\x02 \x01(\x0e\x32(.google.cloud.tpu.v1.Symptom.SymptomType\x12\x0f\n\x07\x64\x65tails\x18\x03 \x01(\t\x12\x11\n\tworker_id\x18\x04 \x01(\t\"\xa4\x01\n\x0bSymptomType\x12\x1c\n\x18SYMPTOM_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nLOW_MEMORY\x10\x01\x12\x11\n\rOUT_OF_MEMORY\x10\x02\x12\x15\n\x11\x45XECUTE_TIMED_OUT\x10\x03\x12\x13\n\x0fMESH_BUILD_FAIL\x10\x04\x12\x15\n\x11HBM_OUT_OF_MEMORY\x10\x05\x12\x11\n\rPROJECT_ABUSE\x10\x06\x32\xde\x0f\n\x03Tpu\x12\x96\x01\n\tListNodes\x12%.google.cloud.tpu.v1.ListNodesRequest\x1a&.google.cloud.tpu.v1.ListNodesResponse\":\xda\x41\x06parent\x82\xd3\xe4\x93\x02+\x12)/v1/{parent=projects/*/locations/*}/nodes\x12\x83\x01\n\x07GetNode\x12#.google.cloud.tpu.v1.GetNodeRequest\x1a\x19.google.cloud.tpu.v1.Node\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+\x12)/v1/{name=projects/*/locations/*/nodes/*}\x12\xbe\x01\n\nCreateNode\x12&.google.cloud.tpu.v1.CreateNodeRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41\x19\n\x04Node\x12\x11OperationMetadata\xda\x41\x13parent,node,node_id\x82\xd3\xe4\x93\x02\x31\")/v1/{parent=projects/*/locations/*}/nodes:\x04node\x12\xa9\x01\n\nDeleteNode\x12&.google.cloud.tpu.v1.DeleteNodeRequest\x1a\x1d.google.longrunning.Operation\"T\xca\x41\x19\n\x04Node\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02+*)/v1/{name=projects/*/locations/*/nodes/*}\x12\xaf\x01\n\x0bReimageNode\x12\'.google.cloud.tpu.v1.ReimageNodeRequest\x1a\x1d.google.longrunning.Operation\"X\xca\x41\x19\n\x04Node\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/locations/*/nodes/*}:reimage:\x01*\x12\xa6\x01\n\x08StopNode\x12$.google.cloud.tpu.v1.StopNodeRequest\x1a\x1d.google.longrunning.Operation\"U\xca\x41\x19\n\x04Node\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\x33\"./v1/{name=projects/*/locations/*/nodes/*}:stop:\x01*\x12\xa9\x01\n\tStartNode\x12%.google.cloud.tpu.v1.StartNodeRequest\x1a\x1d.google.longrunning.Operation\"V\xca\x41\x19\n\x04Node\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\x34\"//v1/{name=projects/*/locations/*/nodes/*}:start:\x01*\x12\xca\x01\n\x16ListTensorFlowVersions\x12\x32.google.cloud.tpu.v1.ListTensorFlowVersionsRequest\x1a\x33.google.cloud.tpu.v1.ListTensorFlowVersionsResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{parent=projects/*/locations/*}/tensorflowVersions\x12\xb7\x01\n\x14GetTensorFlowVersion\x12\x30.google.cloud.tpu.v1.GetTensorFlowVersionRequest\x1a&.google.cloud.tpu.v1.TensorFlowVersion\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/locations/*/tensorflowVersions/*}\x12\xc2\x01\n\x14ListAcceleratorTypes\x12\x30.google.cloud.tpu.v1.ListAcceleratorTypesRequest\x1a\x31.google.cloud.tpu.v1.ListAcceleratorTypesResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*}/acceleratorTypes\x12\xaf\x01\n\x12GetAcceleratorType\x12..google.cloud.tpu.v1.GetAcceleratorTypeRequest\x1a$.google.cloud.tpu.v1.AcceleratorType\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/acceleratorTypes/*}\x1a\x46\xca\x41\x12tpu.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBU\n\x17\x63om.google.cloud.tpu.v1B\rCloudTpuProtoP\x01Z)cloud.google.com/go/tpu/apiv1/tpupb;tpupbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Tpu - module V1 - SchedulingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.SchedulingConfig").msgclass - NetworkEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.NetworkEndpoint").msgclass - Node = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.Node").msgclass - Node::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.Node.State").enummodule - Node::Health = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.Node.Health").enummodule - Node::ApiVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.Node.ApiVersion").enummodule - ListNodesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.ListNodesRequest").msgclass - ListNodesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.ListNodesResponse").msgclass - GetNodeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.GetNodeRequest").msgclass - CreateNodeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.CreateNodeRequest").msgclass - DeleteNodeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.DeleteNodeRequest").msgclass - ReimageNodeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.ReimageNodeRequest").msgclass - StopNodeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.StopNodeRequest").msgclass - StartNodeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.StartNodeRequest").msgclass - TensorFlowVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.TensorFlowVersion").msgclass - GetTensorFlowVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.GetTensorFlowVersionRequest").msgclass - ListTensorFlowVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.ListTensorFlowVersionsRequest").msgclass - ListTensorFlowVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.ListTensorFlowVersionsResponse").msgclass - AcceleratorType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.AcceleratorType").msgclass - GetAcceleratorTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.GetAcceleratorTypeRequest").msgclass - ListAcceleratorTypesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.ListAcceleratorTypesRequest").msgclass - ListAcceleratorTypesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.ListAcceleratorTypesResponse").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.OperationMetadata").msgclass - Symptom = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.Symptom").msgclass - Symptom::SymptomType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tpu.v1.Symptom.SymptomType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/cloud_tpu_services_pb.rb b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/cloud_tpu_services_pb.rb deleted file mode 100644 index 2aafa9ceccbb..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/cloud_tpu_services_pb.rb +++ /dev/null @@ -1,67 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/tpu/v1/cloud_tpu.proto for package 'google.cloud.tpu.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/tpu/v1/cloud_tpu_pb' - -module Google - module Cloud - module Tpu - module V1 - module Tpu - # Manages TPU nodes and other resources - # - # TPU API v1 - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.tpu.v1.Tpu' - - # Lists nodes. - rpc :ListNodes, ::Google::Cloud::Tpu::V1::ListNodesRequest, ::Google::Cloud::Tpu::V1::ListNodesResponse - # Gets the details of a node. - rpc :GetNode, ::Google::Cloud::Tpu::V1::GetNodeRequest, ::Google::Cloud::Tpu::V1::Node - # Creates a node. - rpc :CreateNode, ::Google::Cloud::Tpu::V1::CreateNodeRequest, ::Google::Longrunning::Operation - # Deletes a node. - rpc :DeleteNode, ::Google::Cloud::Tpu::V1::DeleteNodeRequest, ::Google::Longrunning::Operation - # Reimages a node's OS. - rpc :ReimageNode, ::Google::Cloud::Tpu::V1::ReimageNodeRequest, ::Google::Longrunning::Operation - # Stops a node, this operation is only available with single TPU nodes. - rpc :StopNode, ::Google::Cloud::Tpu::V1::StopNodeRequest, ::Google::Longrunning::Operation - # Starts a node. - rpc :StartNode, ::Google::Cloud::Tpu::V1::StartNodeRequest, ::Google::Longrunning::Operation - # List TensorFlow versions supported by this API. - rpc :ListTensorFlowVersions, ::Google::Cloud::Tpu::V1::ListTensorFlowVersionsRequest, ::Google::Cloud::Tpu::V1::ListTensorFlowVersionsResponse - # Gets TensorFlow Version. - rpc :GetTensorFlowVersion, ::Google::Cloud::Tpu::V1::GetTensorFlowVersionRequest, ::Google::Cloud::Tpu::V1::TensorFlowVersion - # Lists accelerator types supported by this API. - rpc :ListAcceleratorTypes, ::Google::Cloud::Tpu::V1::ListAcceleratorTypesRequest, ::Google::Cloud::Tpu::V1::ListAcceleratorTypesResponse - # Gets AcceleratorType. - rpc :GetAcceleratorType, ::Google::Cloud::Tpu::V1::GetAcceleratorTypeRequest, ::Google::Cloud::Tpu::V1::AcceleratorType - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu.rb b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu.rb deleted file mode 100644 index 30ee70ee9626..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu.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 "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/tpu/v1/version" - -require "google/cloud/tpu/v1/tpu/credentials" -require "google/cloud/tpu/v1/tpu/paths" -require "google/cloud/tpu/v1/tpu/operations" -require "google/cloud/tpu/v1/tpu/client" - -module Google - module Cloud - module Tpu - module V1 - ## - # Manages TPU nodes and other resources - # - # TPU API v1 - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/tpu/v1/tpu" - # client = ::Google::Cloud::Tpu::V1::Tpu::Client.new - # - module Tpu - end - end - end - end -end - -helper_path = ::File.join __dir__, "tpu", "helpers.rb" -require "google/cloud/tpu/v1/tpu/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/client.rb b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/client.rb deleted file mode 100644 index 2b7b841df38b..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/client.rb +++ /dev/null @@ -1,1517 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/tpu/v1/cloud_tpu_pb" -require "google/cloud/location" - -module Google - module Cloud - module Tpu - module V1 - module Tpu - ## - # Client for the Tpu service. - # - # Manages TPU nodes and other resources - # - # TPU API v1 - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "tpu.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :tpu_stub - - ## - # Configure the Tpu Client class. - # - # See {::Google::Cloud::Tpu::V1::Tpu::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Tpu clients - # ::Google::Cloud::Tpu::V1::Tpu::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", "Tpu", "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.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Tpu 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::Tpu::V1::Tpu::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 - @tpu_stub.universe_domain - end - - ## - # Create a new Tpu client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Tpu::V1::Tpu::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Tpu 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/tpu/v1/cloud_tpu_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 - - @tpu_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Tpu::V1::Tpu::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 - ) - - @tpu_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 = @tpu_stub.endpoint - config.universe_domain = @tpu_stub.universe_domain - config.logger = @tpu_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Tpu::V1::Tpu::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 - @tpu_stub.logger - end - - # Service calls - - ## - # Lists nodes. - # - # @overload list_nodes(request, options = nil) - # Pass arguments to `list_nodes` via a request object, either of type - # {::Google::Cloud::Tpu::V1::ListNodesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tpu::V1::ListNodesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_nodes(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_nodes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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. - # @param page_size [::Integer] - # The maximum number of items to return. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Tpu::V1::Node>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Tpu::V1::Node>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tpu/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tpu::V1::Tpu::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tpu::V1::ListNodesRequest.new - # - # # Call the list_nodes method. - # result = client.list_nodes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Tpu::V1::Node. - # p item - # end - # - def list_nodes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tpu::V1::ListNodesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_nodes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tpu::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_nodes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_nodes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tpu_stub.call_rpc :list_nodes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @tpu_stub, :list_nodes, 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 node. - # - # @overload get_node(request, options = nil) - # Pass arguments to `get_node` via a request object, either of type - # {::Google::Cloud::Tpu::V1::GetNodeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tpu::V1::GetNodeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_node(name: nil) - # Pass arguments to `get_node` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tpu::V1::Node] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tpu::V1::Node] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tpu/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tpu::V1::Tpu::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tpu::V1::GetNodeRequest.new - # - # # Call the get_node method. - # result = client.get_node request - # - # # The returned object is of type Google::Cloud::Tpu::V1::Node. - # p result - # - def get_node request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tpu::V1::GetNodeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_node.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tpu::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_node.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_node.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tpu_stub.call_rpc :get_node, request, 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 node. - # - # @overload create_node(request, options = nil) - # Pass arguments to `create_node` via a request object, either of type - # {::Google::Cloud::Tpu::V1::CreateNodeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tpu::V1::CreateNodeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_node(parent: nil, node_id: nil, node: nil) - # Pass arguments to `create_node` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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. - # @param node_id [::String] - # The unqualified resource name. - # @param node [::Google::Cloud::Tpu::V1::Node, ::Hash] - # Required. The node. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tpu/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tpu::V1::Tpu::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tpu::V1::CreateNodeRequest.new - # - # # Call the create_node method. - # result = client.create_node request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_node request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tpu::V1::CreateNodeRequest - - # Converts hash and nil to 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_node.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tpu::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_node.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_node.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tpu_stub.call_rpc :create_node, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 node. - # - # @overload delete_node(request, options = nil) - # Pass arguments to `delete_node` via a request object, either of type - # {::Google::Cloud::Tpu::V1::DeleteNodeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tpu::V1::DeleteNodeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_node(name: nil) - # Pass arguments to `delete_node` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource 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/tpu/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tpu::V1::Tpu::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tpu::V1::DeleteNodeRequest.new - # - # # Call the delete_node method. - # result = client.delete_node request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_node request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tpu::V1::DeleteNodeRequest - - # Converts hash and nil to 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_node.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tpu::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_node.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_node.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tpu_stub.call_rpc :delete_node, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Reimages a node's OS. - # - # @overload reimage_node(request, options = nil) - # Pass arguments to `reimage_node` via a request object, either of type - # {::Google::Cloud::Tpu::V1::ReimageNodeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tpu::V1::ReimageNodeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload reimage_node(name: nil, tensorflow_version: nil) - # Pass arguments to `reimage_node` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The resource name. - # @param tensorflow_version [::String] - # The version for reimage 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/tpu/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tpu::V1::Tpu::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tpu::V1::ReimageNodeRequest.new - # - # # Call the reimage_node method. - # result = client.reimage_node request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def reimage_node request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tpu::V1::ReimageNodeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.reimage_node.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tpu::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.reimage_node.timeout, - metadata: metadata, - retry_policy: @config.rpcs.reimage_node.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tpu_stub.call_rpc :reimage_node, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Stops a node, this operation is only available with single TPU nodes. - # - # @overload stop_node(request, options = nil) - # Pass arguments to `stop_node` via a request object, either of type - # {::Google::Cloud::Tpu::V1::StopNodeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tpu::V1::StopNodeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload stop_node(name: nil) - # Pass arguments to `stop_node` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The resource 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/tpu/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tpu::V1::Tpu::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tpu::V1::StopNodeRequest.new - # - # # Call the stop_node method. - # result = client.stop_node request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def stop_node request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tpu::V1::StopNodeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.stop_node.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tpu::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.stop_node.timeout, - metadata: metadata, - retry_policy: @config.rpcs.stop_node.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tpu_stub.call_rpc :stop_node, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts a node. - # - # @overload start_node(request, options = nil) - # Pass arguments to `start_node` via a request object, either of type - # {::Google::Cloud::Tpu::V1::StartNodeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tpu::V1::StartNodeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload start_node(name: nil) - # Pass arguments to `start_node` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The resource 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/tpu/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tpu::V1::Tpu::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tpu::V1::StartNodeRequest.new - # - # # Call the start_node method. - # result = client.start_node request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def start_node request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tpu::V1::StartNodeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.start_node.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tpu::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.start_node.timeout, - metadata: metadata, - retry_policy: @config.rpcs.start_node.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tpu_stub.call_rpc :start_node, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 TensorFlow versions supported by this API. - # - # @overload list_tensor_flow_versions(request, options = nil) - # Pass arguments to `list_tensor_flow_versions` via a request object, either of type - # {::Google::Cloud::Tpu::V1::ListTensorFlowVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tpu::V1::ListTensorFlowVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_tensor_flow_versions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_tensor_flow_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 resource name. - # @param page_size [::Integer] - # The maximum number of items to return. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # @param filter [::String] - # List filter. - # @param order_by [::String] - # Sort results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Tpu::V1::TensorFlowVersion>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Tpu::V1::TensorFlowVersion>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tpu/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tpu::V1::Tpu::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tpu::V1::ListTensorFlowVersionsRequest.new - # - # # Call the list_tensor_flow_versions method. - # result = client.list_tensor_flow_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::Tpu::V1::TensorFlowVersion. - # p item - # end - # - def list_tensor_flow_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tpu::V1::ListTensorFlowVersionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_tensor_flow_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::Tpu::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_tensor_flow_versions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_tensor_flow_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tpu_stub.call_rpc :list_tensor_flow_versions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @tpu_stub, :list_tensor_flow_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 - - ## - # Gets TensorFlow Version. - # - # @overload get_tensor_flow_version(request, options = nil) - # Pass arguments to `get_tensor_flow_version` via a request object, either of type - # {::Google::Cloud::Tpu::V1::GetTensorFlowVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tpu::V1::GetTensorFlowVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_tensor_flow_version(name: nil) - # Pass arguments to `get_tensor_flow_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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tpu::V1::TensorFlowVersion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tpu::V1::TensorFlowVersion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tpu/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tpu::V1::Tpu::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tpu::V1::GetTensorFlowVersionRequest.new - # - # # Call the get_tensor_flow_version method. - # result = client.get_tensor_flow_version request - # - # # The returned object is of type Google::Cloud::Tpu::V1::TensorFlowVersion. - # p result - # - def get_tensor_flow_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tpu::V1::GetTensorFlowVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_tensor_flow_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::Tpu::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_tensor_flow_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_tensor_flow_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tpu_stub.call_rpc :get_tensor_flow_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 accelerator types supported by this API. - # - # @overload list_accelerator_types(request, options = nil) - # Pass arguments to `list_accelerator_types` via a request object, either of type - # {::Google::Cloud::Tpu::V1::ListAcceleratorTypesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tpu::V1::ListAcceleratorTypesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_accelerator_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_accelerator_types` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name. - # @param page_size [::Integer] - # The maximum number of items to return. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # @param filter [::String] - # List filter. - # @param order_by [::String] - # Sort results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Tpu::V1::AcceleratorType>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Tpu::V1::AcceleratorType>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tpu/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tpu::V1::Tpu::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tpu::V1::ListAcceleratorTypesRequest.new - # - # # Call the list_accelerator_types method. - # result = client.list_accelerator_types request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Tpu::V1::AcceleratorType. - # p item - # end - # - def list_accelerator_types request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tpu::V1::ListAcceleratorTypesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_accelerator_types.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tpu::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_accelerator_types.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_accelerator_types.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tpu_stub.call_rpc :list_accelerator_types, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @tpu_stub, :list_accelerator_types, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets AcceleratorType. - # - # @overload get_accelerator_type(request, options = nil) - # Pass arguments to `get_accelerator_type` via a request object, either of type - # {::Google::Cloud::Tpu::V1::GetAcceleratorTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Tpu::V1::GetAcceleratorTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_accelerator_type(name: nil) - # Pass arguments to `get_accelerator_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Tpu::V1::AcceleratorType] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Tpu::V1::AcceleratorType] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/tpu/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Tpu::V1::Tpu::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Tpu::V1::GetAcceleratorTypeRequest.new - # - # # Call the get_accelerator_type method. - # result = client.get_accelerator_type request - # - # # The returned object is of type Google::Cloud::Tpu::V1::AcceleratorType. - # p result - # - def get_accelerator_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Tpu::V1::GetAcceleratorTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_accelerator_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Tpu::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_accelerator_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_accelerator_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @tpu_stub.call_rpc :get_accelerator_type, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Tpu API. - # - # This class represents the configuration for Tpu, - # 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::Tpu::V1::Tpu::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_nodes to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Tpu::V1::Tpu::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_nodes.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_nodes.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::Tpu::V1::Tpu::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 = "tpu.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 Tpu 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_nodes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_nodes - ## - # RPC-specific configuration for `get_node` - # @return [::Gapic::Config::Method] - # - attr_reader :get_node - ## - # RPC-specific configuration for `create_node` - # @return [::Gapic::Config::Method] - # - attr_reader :create_node - ## - # RPC-specific configuration for `delete_node` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_node - ## - # RPC-specific configuration for `reimage_node` - # @return [::Gapic::Config::Method] - # - attr_reader :reimage_node - ## - # RPC-specific configuration for `stop_node` - # @return [::Gapic::Config::Method] - # - attr_reader :stop_node - ## - # RPC-specific configuration for `start_node` - # @return [::Gapic::Config::Method] - # - attr_reader :start_node - ## - # RPC-specific configuration for `list_tensor_flow_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tensor_flow_versions - ## - # RPC-specific configuration for `get_tensor_flow_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_tensor_flow_version - ## - # RPC-specific configuration for `list_accelerator_types` - # @return [::Gapic::Config::Method] - # - attr_reader :list_accelerator_types - ## - # RPC-specific configuration for `get_accelerator_type` - # @return [::Gapic::Config::Method] - # - attr_reader :get_accelerator_type - - # @private - def initialize parent_rpcs = nil - list_nodes_config = parent_rpcs.list_nodes if parent_rpcs.respond_to? :list_nodes - @list_nodes = ::Gapic::Config::Method.new list_nodes_config - get_node_config = parent_rpcs.get_node if parent_rpcs.respond_to? :get_node - @get_node = ::Gapic::Config::Method.new get_node_config - create_node_config = parent_rpcs.create_node if parent_rpcs.respond_to? :create_node - @create_node = ::Gapic::Config::Method.new create_node_config - delete_node_config = parent_rpcs.delete_node if parent_rpcs.respond_to? :delete_node - @delete_node = ::Gapic::Config::Method.new delete_node_config - reimage_node_config = parent_rpcs.reimage_node if parent_rpcs.respond_to? :reimage_node - @reimage_node = ::Gapic::Config::Method.new reimage_node_config - stop_node_config = parent_rpcs.stop_node if parent_rpcs.respond_to? :stop_node - @stop_node = ::Gapic::Config::Method.new stop_node_config - start_node_config = parent_rpcs.start_node if parent_rpcs.respond_to? :start_node - @start_node = ::Gapic::Config::Method.new start_node_config - list_tensor_flow_versions_config = parent_rpcs.list_tensor_flow_versions if parent_rpcs.respond_to? :list_tensor_flow_versions - @list_tensor_flow_versions = ::Gapic::Config::Method.new list_tensor_flow_versions_config - get_tensor_flow_version_config = parent_rpcs.get_tensor_flow_version if parent_rpcs.respond_to? :get_tensor_flow_version - @get_tensor_flow_version = ::Gapic::Config::Method.new get_tensor_flow_version_config - list_accelerator_types_config = parent_rpcs.list_accelerator_types if parent_rpcs.respond_to? :list_accelerator_types - @list_accelerator_types = ::Gapic::Config::Method.new list_accelerator_types_config - get_accelerator_type_config = parent_rpcs.get_accelerator_type if parent_rpcs.respond_to? :get_accelerator_type - @get_accelerator_type = ::Gapic::Config::Method.new get_accelerator_type_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/credentials.rb b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/credentials.rb deleted file mode 100644 index 9c95a410d65c..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/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 Tpu - module V1 - module Tpu - # Credentials for the Tpu API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "CLOUD_TPU_CREDENTIALS", - "CLOUD_TPU_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "CLOUD_TPU_CREDENTIALS_JSON", - "CLOUD_TPU_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-tpu-v1/lib/google/cloud/tpu/v1/tpu/operations.rb b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/operations.rb deleted file mode 100644 index 2705f05c388e..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/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 Tpu - module V1 - module Tpu - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "tpu.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Tpu 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 Tpu 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::Tpu::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Tpu::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Tpu::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Tpu::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Tpu::V1::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 = "tpu.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-tpu-v1/lib/google/cloud/tpu/v1/tpu/paths.rb b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/paths.rb deleted file mode 100644 index e459e1626bc7..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/tpu/paths.rb +++ /dev/null @@ -1,107 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Tpu - module V1 - module Tpu - # Path helper methods for the Tpu API. - module Paths - ## - # Create a fully-qualified AcceleratorType resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/acceleratorTypes/{accelerator_type}` - # - # @param project [String] - # @param location [String] - # @param accelerator_type [String] - # - # @return [::String] - def accelerator_type_path project:, location:, accelerator_type: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/acceleratorTypes/#{accelerator_type}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified Node resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/nodes/{node}` - # - # @param project [String] - # @param location [String] - # @param node [String] - # - # @return [::String] - def node_path project:, location:, node: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/nodes/#{node}" - end - - ## - # Create a fully-qualified TensorFlowVersion resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/tensorFlowVersions/{tensor_flow_version}` - # - # @param project [String] - # @param location [String] - # @param tensor_flow_version [String] - # - # @return [::String] - def tensor_flow_version_path project:, location:, tensor_flow_version: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/tensorFlowVersions/#{tensor_flow_version}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/version.rb b/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/v1/version.rb deleted file mode 100644 index 371ff2ba232b..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/lib/google/cloud/tpu/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 Tpu - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tpu-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/README.md deleted file mode 100644 index f1be9ff90bac..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud TPU 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-tpu-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # 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. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - # - # Example: - # - # 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 - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # 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 - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # 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 - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-tpu-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-tpu-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-tpu-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-tpu-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-tpu-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-tpu-v1/proto_docs/google/cloud/tpu/v1/cloud_tpu.rb b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/cloud/tpu/v1/cloud_tpu.rb deleted file mode 100644 index 337015bf0ead..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/cloud/tpu/v1/cloud_tpu.rb +++ /dev/null @@ -1,521 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Tpu - module V1 - # Sets the scheduling options for this node. - # @!attribute [rw] preemptible - # @return [::Boolean] - # Defines whether the node is preemptible. - # @!attribute [rw] reserved - # @return [::Boolean] - # Whether the node is created under a reservation. - class SchedulingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A network endpoint over which a TPU worker can be reached. - # @!attribute [rw] ip_address - # @return [::String] - # The IP address of this network endpoint. - # @!attribute [rw] port - # @return [::Integer] - # The port of this network endpoint. - class NetworkEndpoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A TPU instance. - # @!attribute [r] name - # @return [::String] - # Output only. Immutable. The name of the TPU - # @!attribute [rw] description - # @return [::String] - # The user-supplied description of the TPU. Maximum of 512 characters. - # @!attribute [rw] accelerator_type - # @return [::String] - # Required. The type of hardware accelerators associated with this node. - # @!attribute [rw] ip_address - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Output only. DEPRECATED! Use network_endpoints instead. - # The network address for the TPU Node as visible to Compute Engine - # instances. - # @!attribute [rw] port - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Output only. DEPRECATED! Use network_endpoints instead. - # The network port for the TPU Node as visible to Compute Engine instances. - # @!attribute [r] state - # @return [::Google::Cloud::Tpu::V1::Node::State] - # Output only. The current state for the TPU Node. - # @!attribute [r] health_description - # @return [::String] - # Output only. If this field is populated, it contains a description of why - # the TPU Node is unhealthy. - # @!attribute [rw] tensorflow_version - # @return [::String] - # Required. The version of Tensorflow running in the Node. - # @!attribute [rw] network - # @return [::String] - # The name of a network they wish to peer the TPU node to. It must be a - # preexisting Compute Engine network inside of the project on which this API - # has been activated. If none is provided, "default" will be used. - # @!attribute [rw] cidr_block - # @return [::String] - # The CIDR block that the TPU node will use when selecting an IP address. - # This CIDR block must be a /29 block; the Compute Engine networks API - # forbids a smaller block, and using a larger block would be wasteful (a - # node can only consume one IP address). Errors will occur if the CIDR block - # has already been used for a currently existing TPU node, the CIDR block - # conflicts with any subnetworks in the user's provided network, or the - # provided network is peered with another network that is using that CIDR - # block. - # @!attribute [r] service_account - # @return [::String] - # Output only. The service account used to run the tensor flow services - # within the node. To share resources, including Google Cloud Storage data, - # with the Tensorflow job running in the Node, this account must have - # permissions to that data. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the node was created. - # @!attribute [rw] scheduling_config - # @return [::Google::Cloud::Tpu::V1::SchedulingConfig] - # The scheduling options for this node. - # @!attribute [r] network_endpoints - # @return [::Array<::Google::Cloud::Tpu::V1::NetworkEndpoint>] - # Output only. The network endpoints where TPU workers can be accessed and - # sent work. It is recommended that Tensorflow clients of the node reach out - # to the 0th entry in this map first. - # @!attribute [rw] health - # @return [::Google::Cloud::Tpu::V1::Node::Health] - # The health status of the TPU node. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Resource labels to represent user-provided metadata. - # @!attribute [rw] use_service_networking - # @return [::Boolean] - # Whether the VPC peering for the node is set up through Service Networking - # API. The VPC Peering should be set up before provisioning the node. - # If this field is set, cidr_block field should not be specified. If the - # network, that you want to peer the TPU Node to, is Shared VPC networks, - # the node must be created with this this field enabled. - # @!attribute [r] api_version - # @return [::Google::Cloud::Tpu::V1::Node::ApiVersion] - # Output only. The API version that created this Node. - # @!attribute [r] symptoms - # @return [::Array<::Google::Cloud::Tpu::V1::Symptom>] - # Output only. The Symptoms that have occurred to the TPU Node. - class Node - 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 - - # Represents the different states of a TPU node during its lifecycle. - module State - # TPU node state is not known/set. - STATE_UNSPECIFIED = 0 - - # TPU node is being created. - CREATING = 1 - - # TPU node has been created. - READY = 2 - - # TPU node is restarting. - RESTARTING = 3 - - # TPU node is undergoing reimaging. - REIMAGING = 4 - - # TPU node is being deleted. - DELETING = 5 - - # TPU node is being repaired and may be unusable. Details can be - # found in the `help_description` field. - REPAIRING = 6 - - # TPU node is stopped. - STOPPED = 8 - - # TPU node is currently stopping. - STOPPING = 9 - - # TPU node is currently starting. - STARTING = 10 - - # TPU node has been preempted. Only applies to Preemptible TPU Nodes. - PREEMPTED = 11 - - # TPU node has been terminated due to maintenance or has reached the end of - # its life cycle (for preemptible nodes). - TERMINATED = 12 - - # TPU node is currently hiding. - HIDING = 13 - - # TPU node has been hidden. - HIDDEN = 14 - - # TPU node is currently unhiding. - UNHIDING = 15 - - # TPU node has unknown state after a failed repair. - UNKNOWN = 16 - end - - # Health defines the status of a TPU node as reported by - # Health Monitor. - module Health - # Health status is unknown: not initialized or failed to retrieve. - HEALTH_UNSPECIFIED = 0 - - # The resource is healthy. - HEALTHY = 1 - - # The resource is unhealthy. - DEPRECATED_UNHEALTHY = 2 - - # The resource is unresponsive. - TIMEOUT = 3 - - # The in-guest ML stack is unhealthy. - UNHEALTHY_TENSORFLOW = 4 - - # The node is under maintenance/priority boost caused rescheduling and - # will resume running once rescheduled. - UNHEALTHY_MAINTENANCE = 5 - end - - # TPU API Version. - module ApiVersion - # API version is unknown. - API_VERSION_UNSPECIFIED = 0 - - # TPU API V1Alpha1 version. - V1_ALPHA1 = 1 - - # TPU API V1 version. - V1 = 2 - - # TPU API V2Alpha1 version. - V2_ALPHA1 = 3 - end - end - - # Request for {::Google::Cloud::Tpu::V1::Tpu::Client#list_nodes ListNodes}. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous List request, if any. - class ListNodesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for {::Google::Cloud::Tpu::V1::Tpu::Client#list_nodes ListNodes}. - # @!attribute [rw] nodes - # @return [::Array<::Google::Cloud::Tpu::V1::Node>] - # The listed nodes. - # @!attribute [rw] next_page_token - # @return [::String] - # The next page token or empty if none. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListNodesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for {::Google::Cloud::Tpu::V1::Tpu::Client#get_node GetNode}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name. - class GetNodeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for {::Google::Cloud::Tpu::V1::Tpu::Client#create_node CreateNode}. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name. - # @!attribute [rw] node_id - # @return [::String] - # The unqualified resource name. - # @!attribute [rw] node - # @return [::Google::Cloud::Tpu::V1::Node] - # Required. The node. - class CreateNodeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for {::Google::Cloud::Tpu::V1::Tpu::Client#delete_node DeleteNode}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name. - class DeleteNodeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for {::Google::Cloud::Tpu::V1::Tpu::Client#reimage_node ReimageNode}. - # @!attribute [rw] name - # @return [::String] - # The resource name. - # @!attribute [rw] tensorflow_version - # @return [::String] - # The version for reimage to create. - class ReimageNodeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for {::Google::Cloud::Tpu::V1::Tpu::Client#stop_node StopNode}. - # @!attribute [rw] name - # @return [::String] - # The resource name. - class StopNodeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for {::Google::Cloud::Tpu::V1::Tpu::Client#start_node StartNode}. - # @!attribute [rw] name - # @return [::String] - # The resource name. - class StartNodeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A tensorflow version that a Node can be configured with. - # @!attribute [rw] name - # @return [::String] - # The resource name. - # @!attribute [rw] version - # @return [::String] - # the tensorflow version. - class TensorFlowVersion - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for - # {::Google::Cloud::Tpu::V1::Tpu::Client#get_tensor_flow_version GetTensorFlowVersion}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name. - class GetTensorFlowVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for - # {::Google::Cloud::Tpu::V1::Tpu::Client#list_tensor_flow_versions ListTensorFlowVersions}. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous List request, if any. - # @!attribute [rw] filter - # @return [::String] - # List filter. - # @!attribute [rw] order_by - # @return [::String] - # Sort results. - class ListTensorFlowVersionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for - # {::Google::Cloud::Tpu::V1::Tpu::Client#list_tensor_flow_versions ListTensorFlowVersions}. - # @!attribute [rw] tensorflow_versions - # @return [::Array<::Google::Cloud::Tpu::V1::TensorFlowVersion>] - # The listed nodes. - # @!attribute [rw] next_page_token - # @return [::String] - # The next page token or empty if none. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListTensorFlowVersionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A accelerator type that a Node can be configured with. - # @!attribute [rw] name - # @return [::String] - # The resource name. - # @!attribute [rw] type - # @return [::String] - # the accelerator type. - class AcceleratorType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for {::Google::Cloud::Tpu::V1::Tpu::Client#get_accelerator_type GetAcceleratorType}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name. - class GetAcceleratorTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for - # {::Google::Cloud::Tpu::V1::Tpu::Client#list_accelerator_types ListAcceleratorTypes}. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous List request, if any. - # @!attribute [rw] filter - # @return [::String] - # List filter. - # @!attribute [rw] order_by - # @return [::String] - # Sort results. - class ListAcceleratorTypesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for - # {::Google::Cloud::Tpu::V1::Tpu::Client#list_accelerator_types ListAcceleratorTypes}. - # @!attribute [rw] accelerator_types - # @return [::Array<::Google::Cloud::Tpu::V1::AcceleratorType>] - # The listed nodes. - # @!attribute [rw] next_page_token - # @return [::String] - # The next page token or empty if none. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListAcceleratorTypesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata describing an {::Google::Longrunning::Operation 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] - # Target of the operation - for example - # projects/project-1/connectivityTests/test-1 - # @!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] - # Specifies if cancellation was requested for the operation. - # @!attribute [rw] api_version - # @return [::String] - # API version. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A Symptom instance. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp when the Symptom is created. - # @!attribute [rw] symptom_type - # @return [::Google::Cloud::Tpu::V1::Symptom::SymptomType] - # Type of the Symptom. - # @!attribute [rw] details - # @return [::String] - # Detailed information of the current Symptom. - # @!attribute [rw] worker_id - # @return [::String] - # A string used to uniquely distinguish a worker within a TPU node. - class Symptom - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # SymptomType represents the different types of Symptoms that a TPU can be - # at. - module SymptomType - # Unspecified symptom. - SYMPTOM_TYPE_UNSPECIFIED = 0 - - # TPU VM memory is low. - LOW_MEMORY = 1 - - # TPU runtime is out of memory. - OUT_OF_MEMORY = 2 - - # TPU runtime execution has timed out. - EXECUTE_TIMED_OUT = 3 - - # TPU runtime fails to construct a mesh that recognizes each TPU device's - # neighbors. - MESH_BUILD_FAIL = 4 - - # TPU HBM is out of memory. - HBM_OUT_OF_MEMORY = 5 - - # Abusive behaviors have been identified on the current project. - PROJECT_ABUSE = 6 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-tpu-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-tpu-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-tpu-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-tpu-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-tpu-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-tpu-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-tpu-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-tpu-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-tpu-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-tpu-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-tpu-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-tpu-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-tpu-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-tpu-v1/snippets/Gemfile deleted file mode 100644 index 8e8e1bbc6e73..000000000000 --- a/owl-bot-staging/google-cloud-tpu-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-tpu-v1", path: "../" -else - gem "google-cloud-tpu-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-tpu-v1/snippets/snippet_metadata_google.cloud.tpu.v1.json b/owl-bot-staging/google-cloud-tpu-v1/snippets/snippet_metadata_google.cloud.tpu.v1.json deleted file mode 100644 index 8d24f0d69dda..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/snippets/snippet_metadata_google.cloud.tpu.v1.json +++ /dev/null @@ -1,455 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-tpu-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.tpu.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "tpu_v1_generated_Tpu_ListNodes_sync", - "title": "Snippet for the list_nodes call in the Tpu service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tpu::V1::Tpu::Client#list_nodes.", - "file": "tpu/list_nodes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_nodes", - "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client#list_nodes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tpu::V1::ListNodesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tpu::V1::ListNodesResponse", - "client": { - "short_name": "Tpu::Client", - "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client" - }, - "method": { - "short_name": "ListNodes", - "full_name": "google.cloud.tpu.v1.Tpu.ListNodes", - "service": { - "short_name": "Tpu", - "full_name": "google.cloud.tpu.v1.Tpu" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "tpu_v1_generated_Tpu_GetNode_sync", - "title": "Snippet for the get_node call in the Tpu service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tpu::V1::Tpu::Client#get_node.", - "file": "tpu/get_node.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_node", - "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client#get_node", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tpu::V1::GetNodeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tpu::V1::Node", - "client": { - "short_name": "Tpu::Client", - "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client" - }, - "method": { - "short_name": "GetNode", - "full_name": "google.cloud.tpu.v1.Tpu.GetNode", - "service": { - "short_name": "Tpu", - "full_name": "google.cloud.tpu.v1.Tpu" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "tpu_v1_generated_Tpu_CreateNode_sync", - "title": "Snippet for the create_node call in the Tpu service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tpu::V1::Tpu::Client#create_node.", - "file": "tpu/create_node.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_node", - "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client#create_node", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tpu::V1::CreateNodeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Tpu::Client", - "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client" - }, - "method": { - "short_name": "CreateNode", - "full_name": "google.cloud.tpu.v1.Tpu.CreateNode", - "service": { - "short_name": "Tpu", - "full_name": "google.cloud.tpu.v1.Tpu" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "tpu_v1_generated_Tpu_DeleteNode_sync", - "title": "Snippet for the delete_node call in the Tpu service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tpu::V1::Tpu::Client#delete_node.", - "file": "tpu/delete_node.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_node", - "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client#delete_node", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tpu::V1::DeleteNodeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Tpu::Client", - "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client" - }, - "method": { - "short_name": "DeleteNode", - "full_name": "google.cloud.tpu.v1.Tpu.DeleteNode", - "service": { - "short_name": "Tpu", - "full_name": "google.cloud.tpu.v1.Tpu" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "tpu_v1_generated_Tpu_ReimageNode_sync", - "title": "Snippet for the reimage_node call in the Tpu service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tpu::V1::Tpu::Client#reimage_node.", - "file": "tpu/reimage_node.rb", - "language": "RUBY", - "client_method": { - "short_name": "reimage_node", - "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client#reimage_node", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tpu::V1::ReimageNodeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Tpu::Client", - "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client" - }, - "method": { - "short_name": "ReimageNode", - "full_name": "google.cloud.tpu.v1.Tpu.ReimageNode", - "service": { - "short_name": "Tpu", - "full_name": "google.cloud.tpu.v1.Tpu" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "tpu_v1_generated_Tpu_StopNode_sync", - "title": "Snippet for the stop_node call in the Tpu service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tpu::V1::Tpu::Client#stop_node.", - "file": "tpu/stop_node.rb", - "language": "RUBY", - "client_method": { - "short_name": "stop_node", - "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client#stop_node", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tpu::V1::StopNodeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Tpu::Client", - "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client" - }, - "method": { - "short_name": "StopNode", - "full_name": "google.cloud.tpu.v1.Tpu.StopNode", - "service": { - "short_name": "Tpu", - "full_name": "google.cloud.tpu.v1.Tpu" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "tpu_v1_generated_Tpu_StartNode_sync", - "title": "Snippet for the start_node call in the Tpu service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tpu::V1::Tpu::Client#start_node.", - "file": "tpu/start_node.rb", - "language": "RUBY", - "client_method": { - "short_name": "start_node", - "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client#start_node", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tpu::V1::StartNodeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Tpu::Client", - "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client" - }, - "method": { - "short_name": "StartNode", - "full_name": "google.cloud.tpu.v1.Tpu.StartNode", - "service": { - "short_name": "Tpu", - "full_name": "google.cloud.tpu.v1.Tpu" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "tpu_v1_generated_Tpu_ListTensorFlowVersions_sync", - "title": "Snippet for the list_tensor_flow_versions call in the Tpu service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tpu::V1::Tpu::Client#list_tensor_flow_versions.", - "file": "tpu/list_tensor_flow_versions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_tensor_flow_versions", - "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client#list_tensor_flow_versions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tpu::V1::ListTensorFlowVersionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tpu::V1::ListTensorFlowVersionsResponse", - "client": { - "short_name": "Tpu::Client", - "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client" - }, - "method": { - "short_name": "ListTensorFlowVersions", - "full_name": "google.cloud.tpu.v1.Tpu.ListTensorFlowVersions", - "service": { - "short_name": "Tpu", - "full_name": "google.cloud.tpu.v1.Tpu" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "tpu_v1_generated_Tpu_GetTensorFlowVersion_sync", - "title": "Snippet for the get_tensor_flow_version call in the Tpu service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tpu::V1::Tpu::Client#get_tensor_flow_version.", - "file": "tpu/get_tensor_flow_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_tensor_flow_version", - "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client#get_tensor_flow_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tpu::V1::GetTensorFlowVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tpu::V1::TensorFlowVersion", - "client": { - "short_name": "Tpu::Client", - "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client" - }, - "method": { - "short_name": "GetTensorFlowVersion", - "full_name": "google.cloud.tpu.v1.Tpu.GetTensorFlowVersion", - "service": { - "short_name": "Tpu", - "full_name": "google.cloud.tpu.v1.Tpu" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "tpu_v1_generated_Tpu_ListAcceleratorTypes_sync", - "title": "Snippet for the list_accelerator_types call in the Tpu service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tpu::V1::Tpu::Client#list_accelerator_types.", - "file": "tpu/list_accelerator_types.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_accelerator_types", - "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client#list_accelerator_types", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tpu::V1::ListAcceleratorTypesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tpu::V1::ListAcceleratorTypesResponse", - "client": { - "short_name": "Tpu::Client", - "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client" - }, - "method": { - "short_name": "ListAcceleratorTypes", - "full_name": "google.cloud.tpu.v1.Tpu.ListAcceleratorTypes", - "service": { - "short_name": "Tpu", - "full_name": "google.cloud.tpu.v1.Tpu" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "tpu_v1_generated_Tpu_GetAcceleratorType_sync", - "title": "Snippet for the get_accelerator_type call in the Tpu service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Tpu::V1::Tpu::Client#get_accelerator_type.", - "file": "tpu/get_accelerator_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_accelerator_type", - "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client#get_accelerator_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Tpu::V1::GetAcceleratorTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Tpu::V1::AcceleratorType", - "client": { - "short_name": "Tpu::Client", - "full_name": "::Google::Cloud::Tpu::V1::Tpu::Client" - }, - "method": { - "short_name": "GetAcceleratorType", - "full_name": "google.cloud.tpu.v1.Tpu.GetAcceleratorType", - "service": { - "short_name": "Tpu", - "full_name": "google.cloud.tpu.v1.Tpu" - } - } - }, - "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-tpu-v1/snippets/tpu/create_node.rb b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/create_node.rb deleted file mode 100644 index d1c45f76a1a5..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/create_node.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 tpu_v1_generated_Tpu_CreateNode_sync] -require "google/cloud/tpu/v1" - -## -# Snippet for the create_node call in the Tpu service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tpu::V1::Tpu::Client#create_node. -# -def create_node - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tpu::V1::Tpu::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tpu::V1::CreateNodeRequest.new - - # Call the create_node method. - result = client.create_node request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END tpu_v1_generated_Tpu_CreateNode_sync] diff --git a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/delete_node.rb b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/delete_node.rb deleted file mode 100644 index 461da43fb962..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/delete_node.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 tpu_v1_generated_Tpu_DeleteNode_sync] -require "google/cloud/tpu/v1" - -## -# Snippet for the delete_node call in the Tpu service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tpu::V1::Tpu::Client#delete_node. -# -def delete_node - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tpu::V1::Tpu::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tpu::V1::DeleteNodeRequest.new - - # Call the delete_node method. - result = client.delete_node request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END tpu_v1_generated_Tpu_DeleteNode_sync] diff --git a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/get_accelerator_type.rb b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/get_accelerator_type.rb deleted file mode 100644 index 01933680099e..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/get_accelerator_type.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START tpu_v1_generated_Tpu_GetAcceleratorType_sync] -require "google/cloud/tpu/v1" - -## -# Snippet for the get_accelerator_type call in the Tpu service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tpu::V1::Tpu::Client#get_accelerator_type. -# -def get_accelerator_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tpu::V1::Tpu::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tpu::V1::GetAcceleratorTypeRequest.new - - # Call the get_accelerator_type method. - result = client.get_accelerator_type request - - # The returned object is of type Google::Cloud::Tpu::V1::AcceleratorType. - p result -end -# [END tpu_v1_generated_Tpu_GetAcceleratorType_sync] diff --git a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/get_node.rb b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/get_node.rb deleted file mode 100644 index 8f5fd80cf9f1..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/get_node.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 tpu_v1_generated_Tpu_GetNode_sync] -require "google/cloud/tpu/v1" - -## -# Snippet for the get_node call in the Tpu service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tpu::V1::Tpu::Client#get_node. -# -def get_node - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tpu::V1::Tpu::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tpu::V1::GetNodeRequest.new - - # Call the get_node method. - result = client.get_node request - - # The returned object is of type Google::Cloud::Tpu::V1::Node. - p result -end -# [END tpu_v1_generated_Tpu_GetNode_sync] diff --git a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/get_tensor_flow_version.rb b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/get_tensor_flow_version.rb deleted file mode 100644 index f8602be5c5da..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/get_tensor_flow_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 tpu_v1_generated_Tpu_GetTensorFlowVersion_sync] -require "google/cloud/tpu/v1" - -## -# Snippet for the get_tensor_flow_version call in the Tpu service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tpu::V1::Tpu::Client#get_tensor_flow_version. -# -def get_tensor_flow_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tpu::V1::Tpu::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tpu::V1::GetTensorFlowVersionRequest.new - - # Call the get_tensor_flow_version method. - result = client.get_tensor_flow_version request - - # The returned object is of type Google::Cloud::Tpu::V1::TensorFlowVersion. - p result -end -# [END tpu_v1_generated_Tpu_GetTensorFlowVersion_sync] diff --git a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/list_accelerator_types.rb b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/list_accelerator_types.rb deleted file mode 100644 index 98fd7b460c0e..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/list_accelerator_types.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START tpu_v1_generated_Tpu_ListAcceleratorTypes_sync] -require "google/cloud/tpu/v1" - -## -# Snippet for the list_accelerator_types call in the Tpu service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tpu::V1::Tpu::Client#list_accelerator_types. -# -def list_accelerator_types - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tpu::V1::Tpu::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tpu::V1::ListAcceleratorTypesRequest.new - - # Call the list_accelerator_types method. - result = client.list_accelerator_types request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Tpu::V1::AcceleratorType. - p item - end -end -# [END tpu_v1_generated_Tpu_ListAcceleratorTypes_sync] diff --git a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/list_nodes.rb b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/list_nodes.rb deleted file mode 100644 index 12cc06e1969a..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/list_nodes.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 tpu_v1_generated_Tpu_ListNodes_sync] -require "google/cloud/tpu/v1" - -## -# Snippet for the list_nodes call in the Tpu service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tpu::V1::Tpu::Client#list_nodes. -# -def list_nodes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tpu::V1::Tpu::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tpu::V1::ListNodesRequest.new - - # Call the list_nodes method. - result = client.list_nodes request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Tpu::V1::Node. - p item - end -end -# [END tpu_v1_generated_Tpu_ListNodes_sync] diff --git a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/list_tensor_flow_versions.rb b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/list_tensor_flow_versions.rb deleted file mode 100644 index ca3d984b9276..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/list_tensor_flow_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 tpu_v1_generated_Tpu_ListTensorFlowVersions_sync] -require "google/cloud/tpu/v1" - -## -# Snippet for the list_tensor_flow_versions call in the Tpu service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tpu::V1::Tpu::Client#list_tensor_flow_versions. -# -def list_tensor_flow_versions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tpu::V1::Tpu::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tpu::V1::ListTensorFlowVersionsRequest.new - - # Call the list_tensor_flow_versions method. - result = client.list_tensor_flow_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::Tpu::V1::TensorFlowVersion. - p item - end -end -# [END tpu_v1_generated_Tpu_ListTensorFlowVersions_sync] diff --git a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/reimage_node.rb b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/reimage_node.rb deleted file mode 100644 index 8af8741cff8f..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/reimage_node.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 tpu_v1_generated_Tpu_ReimageNode_sync] -require "google/cloud/tpu/v1" - -## -# Snippet for the reimage_node call in the Tpu service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tpu::V1::Tpu::Client#reimage_node. -# -def reimage_node - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tpu::V1::Tpu::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tpu::V1::ReimageNodeRequest.new - - # Call the reimage_node method. - result = client.reimage_node request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END tpu_v1_generated_Tpu_ReimageNode_sync] diff --git a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/start_node.rb b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/start_node.rb deleted file mode 100644 index f4bcab475e2c..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/start_node.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 tpu_v1_generated_Tpu_StartNode_sync] -require "google/cloud/tpu/v1" - -## -# Snippet for the start_node call in the Tpu service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tpu::V1::Tpu::Client#start_node. -# -def start_node - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tpu::V1::Tpu::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tpu::V1::StartNodeRequest.new - - # Call the start_node method. - result = client.start_node request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END tpu_v1_generated_Tpu_StartNode_sync] diff --git a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/stop_node.rb b/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/stop_node.rb deleted file mode 100644 index 8d4b1be90049..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/snippets/tpu/stop_node.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 tpu_v1_generated_Tpu_StopNode_sync] -require "google/cloud/tpu/v1" - -## -# Snippet for the stop_node call in the Tpu service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Tpu::V1::Tpu::Client#stop_node. -# -def stop_node - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Tpu::V1::Tpu::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Tpu::V1::StopNodeRequest.new - - # Call the stop_node method. - result = client.stop_node request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END tpu_v1_generated_Tpu_StopNode_sync] diff --git a/owl-bot-staging/google-cloud-tpu-v1/test/google/cloud/tpu/v1/tpu_operations_test.rb b/owl-bot-staging/google-cloud-tpu-v1/test/google/cloud/tpu/v1/tpu_operations_test.rb deleted file mode 100644 index ad025ce2f9bc..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/test/google/cloud/tpu/v1/tpu_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/tpu/v1/cloud_tpu_pb" -require "google/cloud/tpu/v1/cloud_tpu_services_pb" -require "google/cloud/tpu/v1/tpu" - -class ::Google::Cloud::Tpu::V1::Tpu::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::Tpu::V1::Tpu::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::Tpu::V1::Tpu::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::Tpu::V1::Tpu::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::Tpu::V1::Tpu::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::Tpu::V1::Tpu::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::Tpu::V1::Tpu::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::Tpu::V1::Tpu::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-tpu-v1/test/google/cloud/tpu/v1/tpu_paths_test.rb b/owl-bot-staging/google-cloud-tpu-v1/test/google/cloud/tpu/v1/tpu_paths_test.rb deleted file mode 100644 index 4ceac4e2e690..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/test/google/cloud/tpu/v1/tpu_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/tpu/v1/tpu" - -class ::Google::Cloud::Tpu::V1::Tpu::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_accelerator_type_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.accelerator_type_path project: "value0", location: "value1", accelerator_type: "value2" - assert_equal "projects/value0/locations/value1/acceleratorTypes/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::Tpu::V1::Tpu::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_node_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.node_path project: "value0", location: "value1", node: "value2" - assert_equal "projects/value0/locations/value1/nodes/value2", path - end - end - - def test_tensor_flow_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::Tpu::V1::Tpu::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.tensor_flow_version_path project: "value0", location: "value1", tensor_flow_version: "value2" - assert_equal "projects/value0/locations/value1/tensorFlowVersions/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-tpu-v1/test/google/cloud/tpu/v1/tpu_test.rb b/owl-bot-staging/google-cloud-tpu-v1/test/google/cloud/tpu/v1/tpu_test.rb deleted file mode 100644 index 96dc840e4d05..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/test/google/cloud/tpu/v1/tpu_test.rb +++ /dev/null @@ -1,822 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/tpu/v1/cloud_tpu_pb" -require "google/cloud/tpu/v1/tpu" - -class ::Google::Cloud::Tpu::V1::Tpu::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_nodes - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tpu::V1::ListNodesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_nodes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_nodes, name - assert_kind_of ::Google::Cloud::Tpu::V1::ListNodesRequest, 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_nodes_client_stub do - # Create client - client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_nodes({ 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_nodes 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_nodes ::Google::Cloud::Tpu::V1::ListNodesRequest.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_nodes({ 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_nodes(::Google::Cloud::Tpu::V1::ListNodesRequest.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_nodes_client_stub.call_rpc_count - end - end - - def test_get_node - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tpu::V1::Node.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_node_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_node, name - assert_kind_of ::Google::Cloud::Tpu::V1::GetNodeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_node_client_stub do - # Create client - client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_node({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_node name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_node ::Google::Cloud::Tpu::V1::GetNodeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_node({ 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_node(::Google::Cloud::Tpu::V1::GetNodeRequest.new(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_node_client_stub.call_rpc_count - end - end - - def test_create_node - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - node_id = "hello world" - node = {} - - create_node_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_node, name - assert_kind_of ::Google::Cloud::Tpu::V1::CreateNodeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["node_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Tpu::V1::Node), request["node"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_node_client_stub do - # Create client - client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_node({ parent: parent, node_id: node_id, node: node }) do |response, 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_node parent: parent, node_id: node_id, node: node do |response, 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_node ::Google::Cloud::Tpu::V1::CreateNodeRequest.new(parent: parent, node_id: node_id, node: node) do |response, operation| - assert_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_node({ parent: parent, node_id: node_id, node: node }, grpc_options) do |response, operation| - assert_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_node(::Google::Cloud::Tpu::V1::CreateNodeRequest.new(parent: parent, node_id: node_id, node: node), grpc_options) do |response, operation| - assert_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_node_client_stub.call_rpc_count - end - end - - def test_delete_node - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_node_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_node, name - assert_kind_of ::Google::Cloud::Tpu::V1::DeleteNodeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_node_client_stub do - # Create client - client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_node({ name: 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_node name: 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_node ::Google::Cloud::Tpu::V1::DeleteNodeRequest.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_node({ 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_node(::Google::Cloud::Tpu::V1::DeleteNodeRequest.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_node_client_stub.call_rpc_count - end - end - - def test_reimage_node - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - tensorflow_version = "hello world" - - reimage_node_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :reimage_node, name - assert_kind_of ::Google::Cloud::Tpu::V1::ReimageNodeRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["tensorflow_version"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, reimage_node_client_stub do - # Create client - client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.reimage_node({ name: name, tensorflow_version: tensorflow_version }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.reimage_node name: name, tensorflow_version: tensorflow_version do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.reimage_node ::Google::Cloud::Tpu::V1::ReimageNodeRequest.new(name: name, tensorflow_version: tensorflow_version) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.reimage_node({ name: name, tensorflow_version: tensorflow_version }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.reimage_node(::Google::Cloud::Tpu::V1::ReimageNodeRequest.new(name: name, tensorflow_version: tensorflow_version), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, reimage_node_client_stub.call_rpc_count - end - end - - def test_stop_node - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - stop_node_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :stop_node, name - assert_kind_of ::Google::Cloud::Tpu::V1::StopNodeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, stop_node_client_stub do - # Create client - client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.stop_node({ name: 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.stop_node name: 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.stop_node ::Google::Cloud::Tpu::V1::StopNodeRequest.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.stop_node({ 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.stop_node(::Google::Cloud::Tpu::V1::StopNodeRequest.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, stop_node_client_stub.call_rpc_count - end - end - - def test_start_node - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - start_node_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :start_node, name - assert_kind_of ::Google::Cloud::Tpu::V1::StartNodeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, start_node_client_stub do - # Create client - client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.start_node({ name: 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.start_node name: 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.start_node ::Google::Cloud::Tpu::V1::StartNodeRequest.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.start_node({ 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.start_node(::Google::Cloud::Tpu::V1::StartNodeRequest.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, start_node_client_stub.call_rpc_count - end - end - - def test_list_tensor_flow_versions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tpu::V1::ListTensorFlowVersionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_tensor_flow_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_tensor_flow_versions, name - assert_kind_of ::Google::Cloud::Tpu::V1::ListTensorFlowVersionsRequest, 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_tensor_flow_versions_client_stub do - # Create client - client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_tensor_flow_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_tensor_flow_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_tensor_flow_versions ::Google::Cloud::Tpu::V1::ListTensorFlowVersionsRequest.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_tensor_flow_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_tensor_flow_versions(::Google::Cloud::Tpu::V1::ListTensorFlowVersionsRequest.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_tensor_flow_versions_client_stub.call_rpc_count - end - end - - def test_get_tensor_flow_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tpu::V1::TensorFlowVersion.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_tensor_flow_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_tensor_flow_version, name - assert_kind_of ::Google::Cloud::Tpu::V1::GetTensorFlowVersionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_tensor_flow_version_client_stub do - # Create client - client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_tensor_flow_version({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_tensor_flow_version name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_tensor_flow_version ::Google::Cloud::Tpu::V1::GetTensorFlowVersionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_tensor_flow_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_tensor_flow_version(::Google::Cloud::Tpu::V1::GetTensorFlowVersionRequest.new(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_tensor_flow_version_client_stub.call_rpc_count - end - end - - def test_list_accelerator_types - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tpu::V1::ListAcceleratorTypesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_accelerator_types_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_accelerator_types, name - assert_kind_of ::Google::Cloud::Tpu::V1::ListAcceleratorTypesRequest, 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_accelerator_types_client_stub do - # Create client - client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_accelerator_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_accelerator_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_accelerator_types ::Google::Cloud::Tpu::V1::ListAcceleratorTypesRequest.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_accelerator_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_accelerator_types(::Google::Cloud::Tpu::V1::ListAcceleratorTypesRequest.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_accelerator_types_client_stub.call_rpc_count - end - end - - def test_get_accelerator_type - # Create GRPC objects. - grpc_response = ::Google::Cloud::Tpu::V1::AcceleratorType.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_accelerator_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_accelerator_type, name - assert_kind_of ::Google::Cloud::Tpu::V1::GetAcceleratorTypeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_accelerator_type_client_stub do - # Create client - client = ::Google::Cloud::Tpu::V1::Tpu::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_accelerator_type({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_accelerator_type name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_accelerator_type ::Google::Cloud::Tpu::V1::GetAcceleratorTypeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_accelerator_type({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_accelerator_type(::Google::Cloud::Tpu::V1::GetAcceleratorTypeRequest.new(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_accelerator_type_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::Tpu::V1::Tpu::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::Tpu::V1::Tpu::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::Tpu::V1::Tpu::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Tpu::V1::Tpu::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::Tpu::V1::Tpu::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Tpu::V1::Tpu::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-tpu-v1/test/helper.rb b/owl-bot-staging/google-cloud-tpu-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-tpu-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-trace-v1/.gitignore b/owl-bot-staging/google-cloud-trace-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-trace-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-trace-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-trace-v1/.repo-metadata.json deleted file mode 100644 index d328c585f392..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "cloudtrace.googleapis.com", - "api_shortname": "cloudtrace", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-trace-v1/latest", - "distribution_name": "google-cloud-trace-v1", - "is_cloud": true, - "language": "ruby", - "name": "cloudtrace", - "name_pretty": "Cloud Trace V1 API", - "product_documentation": "https://cloud.google.com/trace", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The Cloud Trace API lets you send and retrieve latency data to and from Cloud Trace. This API provides low-level interfaces for interacting directly with the feature. For some languages, you can use OpenTelemetry, a set of open source tracing and stats instrumentation libraries that work with multiple backends. Note that google-cloud-trace-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-trace instead. See the readme for more details.", - "ruby-cloud-env-prefix": "TRACE", - "ruby-cloud-product-url": "https://cloud.google.com/trace", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-trace-v1/.rubocop.yml b/owl-bot-staging/google-cloud-trace-v1/.rubocop.yml deleted file mode 100644 index 497c946242fd..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-trace-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-trace-v1.rb" diff --git a/owl-bot-staging/google-cloud-trace-v1/.toys.rb b/owl-bot-staging/google-cloud-trace-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-trace-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-trace-v1/.yardopts b/owl-bot-staging/google-cloud-trace-v1/.yardopts deleted file mode 100644 index a9ea6aa99950..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Trace 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-trace-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-trace-v1/AUTHENTICATION.md deleted file mode 100644 index ce2edb9aa12f..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-trace-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-trace-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/trace/v1" - -client = ::Google::Cloud::Trace::V1::TraceService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/trace/v1" - -::Google::Cloud::Trace::V1::TraceService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Trace::V1::TraceService::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-trace-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/trace/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Trace::V1::TraceService::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-trace-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-trace-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-trace-v1/Gemfile b/owl-bot-staging/google-cloud-trace-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-trace-v1/LICENSE.md b/owl-bot-staging/google-cloud-trace-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-trace-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-trace-v1/README.md b/owl-bot-staging/google-cloud-trace-v1/README.md deleted file mode 100644 index 488c98aabfe3..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Trace V1 API - -Sends application trace data to Stackdriver Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Trace API directly. If you are looking to instrument your application for Stackdriver Trace, we recommend using OpenTelemetry. - -The Cloud Trace API lets you send and retrieve latency data to and from Cloud Trace. This API provides low-level interfaces for interacting directly with the feature. For some languages, you can use OpenTelemetry, a set of open source tracing and stats instrumentation libraries that work with multiple backends. - -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 Trace V1 API. Most users should consider using -the main client gem, -[google-cloud-trace](https://rubygems.org/gems/google-cloud-trace). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-trace-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/cloudtrace.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/trace/v1" - -client = ::Google::Cloud::Trace::V1::TraceService::Client.new -request = ::Google::Cloud::Trace::V1::ListTracesRequest.new # (request fields as keyword arguments...) -response = client.list_traces request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-trace-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/trace) -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/trace/v1" -require "logger" - -client = ::Google::Cloud::Trace::V1::TraceService::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-trace`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-trace-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-trace`. -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-trace-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-trace-v1/Rakefile b/owl-bot-staging/google-cloud-trace-v1/Rakefile deleted file mode 100644 index 663b8d0b3857..000000000000 --- a/owl-bot-staging/google-cloud-trace-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-trace-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["TRACE_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["TRACE_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["TRACE_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 TRACE_TEST_PROJECT=test123 TRACE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/trace/v1/trace_service/credentials" - ::Google::Cloud::Trace::V1::TraceService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["TRACE_PROJECT"] = project - ENV["TRACE_TEST_PROJECT"] = project - ENV["TRACE_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-trace-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-trace-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-trace-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-trace-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-trace-v1" - header "google-cloud-trace-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-trace-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-trace-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-trace-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-trace-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-trace-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-trace-v1/gapic_metadata.json deleted file mode 100644 index c869538c2a6c..000000000000 --- a/owl-bot-staging/google-cloud-trace-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.devtools.cloudtrace.v1", - "libraryPackage": "::Google::Cloud::Trace::V1", - "services": { - "TraceService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Trace::V1::TraceService::Client", - "rpcs": { - "ListTraces": { - "methods": [ - "list_traces" - ] - }, - "GetTrace": { - "methods": [ - "get_trace" - ] - }, - "PatchTraces": { - "methods": [ - "patch_traces" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-trace-v1/google-cloud-trace-v1.gemspec b/owl-bot-staging/google-cloud-trace-v1/google-cloud-trace-v1.gemspec deleted file mode 100644 index 664737ad67c0..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/google-cloud-trace-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/trace/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-trace-v1" - gem.version = Google::Cloud::Trace::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The Cloud Trace API lets you send and retrieve latency data to and from Cloud Trace. This API provides low-level interfaces for interacting directly with the feature. For some languages, you can use OpenTelemetry, a set of open source tracing and stats instrumentation libraries that work with multiple backends. Note that google-cloud-trace-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-trace instead. See the readme for more details." - gem.summary = "Sends application trace data to Stackdriver Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Trace API directly. If you are looking to instrument your application for Stackdriver Trace, we recommend using OpenTelemetry." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-trace-v1/lib/google-cloud-trace-v1.rb b/owl-bot-staging/google-cloud-trace-v1/lib/google-cloud-trace-v1.rb deleted file mode 100644 index d0d18e420960..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/lib/google-cloud-trace-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/trace/v1" diff --git a/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1.rb b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1.rb deleted file mode 100644 index bdd9cdacfccf..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/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/trace/v1/trace_service" -require "google/cloud/trace/v1/version" - -module Google - module Cloud - module Trace - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/trace/v1" - # client = ::Google::Cloud::Trace::V1::TraceService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/trace/v1" - # client = ::Google::Cloud::Trace::V1::TraceService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/trace/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/rest.rb b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/rest.rb deleted file mode 100644 index 9e774bceaca2..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/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/trace/v1/trace_service/rest" -require "google/cloud/trace/v1/version" - -module Google - module Cloud - module Trace - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/trace/v1/rest" - # client = ::Google::Cloud::Trace::V1::TraceService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service.rb b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service.rb deleted file mode 100644 index 4f7face77bb1..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/trace/v1/version" - -require "google/cloud/trace/v1/trace_service/credentials" -require "google/cloud/trace/v1/trace_service/client" -require "google/cloud/trace/v1/trace_service/rest" - -module Google - module Cloud - module Trace - module V1 - ## - # This file describes an API for collecting and viewing traces and spans - # within a trace. A Trace is a collection of spans corresponding to a single - # operation or set of operations for an application. A span is an individual - # timed event which forms a node of the trace tree. Spans for a single trace - # may span multiple services. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/trace/v1/trace_service" - # client = ::Google::Cloud::Trace::V1::TraceService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/trace/v1/trace_service/rest" - # client = ::Google::Cloud::Trace::V1::TraceService::Rest::Client.new - # - module TraceService - end - end - end - end -end - -helper_path = ::File.join __dir__, "trace_service", "helpers.rb" -require "google/cloud/trace/v1/trace_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/client.rb b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/client.rb deleted file mode 100644 index 14e8613b2622..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/client.rb +++ /dev/null @@ -1,753 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/devtools/cloudtrace/v1/trace_pb" - -module Google - module Cloud - module Trace - module V1 - module TraceService - ## - # Client for the TraceService service. - # - # This file describes an API for collecting and viewing traces and spans - # within a trace. A Trace is a collection of spans corresponding to a single - # operation or set of operations for an application. A span is an individual - # timed event which forms a node of the trace tree. Spans for a single trace - # may span multiple services. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudtrace.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :trace_service_stub - - ## - # Configure the TraceService Client class. - # - # See {::Google::Cloud::Trace::V1::TraceService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TraceService clients - # ::Google::Cloud::Trace::V1::TraceService::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", "Trace", "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_traces.timeout = 45.0 - default_config.rpcs.list_traces.retry_policy = { - initial_delay: 0.1, max_delay: 1.0, multiplier: 1.2, retry_codes: [14, 4] - } - - default_config.rpcs.get_trace.timeout = 45.0 - default_config.rpcs.get_trace.retry_policy = { - initial_delay: 0.1, max_delay: 1.0, multiplier: 1.2, retry_codes: [14, 4] - } - - default_config.rpcs.patch_traces.timeout = 45.0 - default_config.rpcs.patch_traces.retry_policy = { - initial_delay: 0.1, max_delay: 1.0, multiplier: 1.2, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TraceService 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::Trace::V1::TraceService::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 - @trace_service_stub.universe_domain - end - - ## - # Create a new TraceService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Trace::V1::TraceService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Trace::V1::TraceService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TraceService 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/devtools/cloudtrace/v1/trace_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 - - @trace_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Trace::V1::TraceService::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 - ) - - @trace_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 - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @trace_service_stub.logger - end - - # Service calls - - ## - # Returns of a list of traces that match the specified filter conditions. - # - # @overload list_traces(request, options = nil) - # Pass arguments to `list_traces` via a request object, either of type - # {::Google::Cloud::Trace::V1::ListTracesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Trace::V1::ListTracesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_traces(project_id: nil, view: nil, page_size: nil, page_token: nil, start_time: nil, end_time: nil, filter: nil, order_by: nil) - # Pass arguments to `list_traces` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param project_id [::String] - # Required. ID of the Cloud project where the trace data is stored. - # @param view [::Google::Cloud::Trace::V1::ListTracesRequest::ViewType] - # Optional. Type of data returned for traces in the list. Default is - # `MINIMAL`. - # @param page_size [::Integer] - # Optional. Maximum number of traces to return. If not specified or <= 0, the - # implementation selects a reasonable value. The implementation may - # return fewer traces than the requested page size. - # @param page_token [::String] - # Token identifying the page of results to return. If provided, use the - # value of the `next_page_token` field from a previous request. - # @param start_time [::Google::Protobuf::Timestamp, ::Hash] - # Start of the time interval (inclusive) during which the trace data was - # collected from the application. - # @param end_time [::Google::Protobuf::Timestamp, ::Hash] - # End of the time interval (inclusive) during which the trace data was - # collected from the application. - # @param filter [::String] - # Optional. A filter against labels for the request. - # - # By default, searches use prefix matching. To specify exact match, prepend - # a plus symbol (`+`) to the search term. - # Multiple terms are ANDed. Syntax: - # - # * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root - # span starts with `NAME_PREFIX`. - # * `+root:NAME` or `+NAME`: Return traces where any root span's name is - # exactly `NAME`. - # * `span:NAME_PREFIX`: Return traces where any span starts with - # `NAME_PREFIX`. - # * `+span:NAME`: Return traces where any span's name is exactly - # `NAME`. - # * `latency:DURATION`: Return traces whose overall latency is - # greater or equal to than `DURATION`. Accepted units are nanoseconds - # (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For - # example, `latency:24ms` returns traces whose overall latency - # is greater than or equal to 24 milliseconds. - # * `label:LABEL_KEY`: Return all traces containing the specified - # label key (exact match, case-sensitive) regardless of the key:value - # pair's value (including empty values). - # * `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified - # label key (exact match, case-sensitive) whose value starts with - # `VALUE_PREFIX`. Both a key and a value must be specified. - # * `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair - # exactly matching the specified text. Both a key and a value must be - # specified. - # * `method:VALUE`: Equivalent to `/http/method:VALUE`. - # * `url:VALUE`: Equivalent to `/http/url:VALUE`. - # @param order_by [::String] - # Optional. Field used to sort the returned traces. - # Can be one of the following: - # - # * `trace_id` - # * `name` (`name` field of root span in the trace) - # * `duration` (difference between `end_time` and `start_time` fields of - # the root span) - # * `start` (`start_time` field of the root span) - # - # Descending order can be specified by appending `desc` to the sort field - # (for example, `name desc`). - # - # Only one sort field is permitted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Trace::V1::Trace>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Trace::V1::Trace>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/trace/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Trace::V1::TraceService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Trace::V1::ListTracesRequest.new - # - # # Call the list_traces method. - # result = client.list_traces request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Trace::V1::Trace. - # p item - # end - # - def list_traces request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Trace::V1::ListTracesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_traces.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Trace::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.project_id - header_params["project_id"] = request.project_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_traces.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_traces.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trace_service_stub.call_rpc :list_traces, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @trace_service_stub, :list_traces, 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 single trace by its ID. - # - # @overload get_trace(request, options = nil) - # Pass arguments to `get_trace` via a request object, either of type - # {::Google::Cloud::Trace::V1::GetTraceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Trace::V1::GetTraceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_trace(project_id: nil, trace_id: nil) - # Pass arguments to `get_trace` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param project_id [::String] - # Required. ID of the Cloud project where the trace data is stored. - # @param trace_id [::String] - # Required. ID of the trace to return. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Trace::V1::Trace] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Trace::V1::Trace] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/trace/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Trace::V1::TraceService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Trace::V1::GetTraceRequest.new - # - # # Call the get_trace method. - # result = client.get_trace request - # - # # The returned object is of type Google::Cloud::Trace::V1::Trace. - # p result - # - def get_trace request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Trace::V1::GetTraceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_trace.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Trace::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.project_id - header_params["project_id"] = request.project_id - end - if request.trace_id - header_params["trace_id"] = request.trace_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.get_trace.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_trace.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trace_service_stub.call_rpc :get_trace, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sends new traces to Stackdriver Trace or updates existing traces. If the ID - # of a trace that you send matches that of an existing trace, any fields - # in the existing trace and its spans are overwritten by the provided values, - # and any new fields provided are merged with the existing trace data. If the - # ID does not match, a new trace is created. - # - # @overload patch_traces(request, options = nil) - # Pass arguments to `patch_traces` via a request object, either of type - # {::Google::Cloud::Trace::V1::PatchTracesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Trace::V1::PatchTracesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload patch_traces(project_id: nil, traces: nil) - # Pass arguments to `patch_traces` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param project_id [::String] - # Required. ID of the Cloud project where the trace data is stored. - # @param traces [::Google::Cloud::Trace::V1::Traces, ::Hash] - # Required. The body of the message. - # - # @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/trace/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Trace::V1::TraceService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Trace::V1::PatchTracesRequest.new - # - # # Call the patch_traces method. - # result = client.patch_traces request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def patch_traces request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Trace::V1::PatchTracesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.patch_traces.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Trace::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.project_id - header_params["project_id"] = request.project_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.patch_traces.timeout, - metadata: metadata, - retry_policy: @config.rpcs.patch_traces.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trace_service_stub.call_rpc :patch_traces, request, 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 TraceService API. - # - # This class represents the configuration for TraceService, - # 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::Trace::V1::TraceService::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_traces to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Trace::V1::TraceService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_traces.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Trace::V1::TraceService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_traces.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::Trace::V1::TraceService::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 = "cloudtrace.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 TraceService 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_traces` - # @return [::Gapic::Config::Method] - # - attr_reader :list_traces - ## - # RPC-specific configuration for `get_trace` - # @return [::Gapic::Config::Method] - # - attr_reader :get_trace - ## - # RPC-specific configuration for `patch_traces` - # @return [::Gapic::Config::Method] - # - attr_reader :patch_traces - - # @private - def initialize parent_rpcs = nil - list_traces_config = parent_rpcs.list_traces if parent_rpcs.respond_to? :list_traces - @list_traces = ::Gapic::Config::Method.new list_traces_config - get_trace_config = parent_rpcs.get_trace if parent_rpcs.respond_to? :get_trace - @get_trace = ::Gapic::Config::Method.new get_trace_config - patch_traces_config = parent_rpcs.patch_traces if parent_rpcs.respond_to? :patch_traces - @patch_traces = ::Gapic::Config::Method.new patch_traces_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/credentials.rb b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/credentials.rb deleted file mode 100644 index b71df52a528b..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/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 Trace - module V1 - module TraceService - # Credentials for the TraceService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/trace.append", - "https://www.googleapis.com/auth/trace.readonly" - ] - self.env_vars = [ - "TRACE_CREDENTIALS", - "TRACE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "TRACE_CREDENTIALS_JSON", - "TRACE_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-trace-v1/lib/google/cloud/trace/v1/trace_service/rest.rb b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/rest.rb deleted file mode 100644 index 5de97dd38be4..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/rest.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/trace/v1/version" - -require "google/cloud/trace/v1/trace_service/credentials" -require "google/cloud/trace/v1/trace_service/rest/client" - -module Google - module Cloud - module Trace - module V1 - ## - # This file describes an API for collecting and viewing traces and spans - # within a trace. A Trace is a collection of spans corresponding to a single - # operation or set of operations for an application. A span is an individual - # timed event which forms a node of the trace tree. Spans for a single trace - # may span multiple services. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/trace/v1/trace_service/rest" - # client = ::Google::Cloud::Trace::V1::TraceService::Rest::Client.new - # - module TraceService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/trace/v1/trace_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/rest/client.rb b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/rest/client.rb deleted file mode 100644 index b3a5a3771116..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/rest/client.rb +++ /dev/null @@ -1,686 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/devtools/cloudtrace/v1/trace_pb" -require "google/cloud/trace/v1/trace_service/rest/service_stub" - -module Google - module Cloud - module Trace - module V1 - module TraceService - module Rest - ## - # REST client for the TraceService service. - # - # This file describes an API for collecting and viewing traces and spans - # within a trace. A Trace is a collection of spans corresponding to a single - # operation or set of operations for an application. A span is an individual - # timed event which forms a node of the trace tree. Spans for a single trace - # may span multiple services. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudtrace.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :trace_service_stub - - ## - # Configure the TraceService Client class. - # - # See {::Google::Cloud::Trace::V1::TraceService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TraceService clients - # ::Google::Cloud::Trace::V1::TraceService::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", "Trace", "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_traces.timeout = 45.0 - default_config.rpcs.list_traces.retry_policy = { - initial_delay: 0.1, max_delay: 1.0, multiplier: 1.2, retry_codes: [14, 4] - } - - default_config.rpcs.get_trace.timeout = 45.0 - default_config.rpcs.get_trace.retry_policy = { - initial_delay: 0.1, max_delay: 1.0, multiplier: 1.2, retry_codes: [14, 4] - } - - default_config.rpcs.patch_traces.timeout = 45.0 - default_config.rpcs.patch_traces.retry_policy = { - initial_delay: 0.1, max_delay: 1.0, multiplier: 1.2, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TraceService 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::Trace::V1::TraceService::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 - @trace_service_stub.universe_domain - end - - ## - # Create a new TraceService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Trace::V1::TraceService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Trace::V1::TraceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TraceService 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 - - @trace_service_stub = ::Google::Cloud::Trace::V1::TraceService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @trace_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 - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @trace_service_stub.logger - end - - # Service calls - - ## - # Returns of a list of traces that match the specified filter conditions. - # - # @overload list_traces(request, options = nil) - # Pass arguments to `list_traces` via a request object, either of type - # {::Google::Cloud::Trace::V1::ListTracesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Trace::V1::ListTracesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_traces(project_id: nil, view: nil, page_size: nil, page_token: nil, start_time: nil, end_time: nil, filter: nil, order_by: nil) - # Pass arguments to `list_traces` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param project_id [::String] - # Required. ID of the Cloud project where the trace data is stored. - # @param view [::Google::Cloud::Trace::V1::ListTracesRequest::ViewType] - # Optional. Type of data returned for traces in the list. Default is - # `MINIMAL`. - # @param page_size [::Integer] - # Optional. Maximum number of traces to return. If not specified or <= 0, the - # implementation selects a reasonable value. The implementation may - # return fewer traces than the requested page size. - # @param page_token [::String] - # Token identifying the page of results to return. If provided, use the - # value of the `next_page_token` field from a previous request. - # @param start_time [::Google::Protobuf::Timestamp, ::Hash] - # Start of the time interval (inclusive) during which the trace data was - # collected from the application. - # @param end_time [::Google::Protobuf::Timestamp, ::Hash] - # End of the time interval (inclusive) during which the trace data was - # collected from the application. - # @param filter [::String] - # Optional. A filter against labels for the request. - # - # By default, searches use prefix matching. To specify exact match, prepend - # a plus symbol (`+`) to the search term. - # Multiple terms are ANDed. Syntax: - # - # * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root - # span starts with `NAME_PREFIX`. - # * `+root:NAME` or `+NAME`: Return traces where any root span's name is - # exactly `NAME`. - # * `span:NAME_PREFIX`: Return traces where any span starts with - # `NAME_PREFIX`. - # * `+span:NAME`: Return traces where any span's name is exactly - # `NAME`. - # * `latency:DURATION`: Return traces whose overall latency is - # greater or equal to than `DURATION`. Accepted units are nanoseconds - # (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For - # example, `latency:24ms` returns traces whose overall latency - # is greater than or equal to 24 milliseconds. - # * `label:LABEL_KEY`: Return all traces containing the specified - # label key (exact match, case-sensitive) regardless of the key:value - # pair's value (including empty values). - # * `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified - # label key (exact match, case-sensitive) whose value starts with - # `VALUE_PREFIX`. Both a key and a value must be specified. - # * `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair - # exactly matching the specified text. Both a key and a value must be - # specified. - # * `method:VALUE`: Equivalent to `/http/method:VALUE`. - # * `url:VALUE`: Equivalent to `/http/url:VALUE`. - # @param order_by [::String] - # Optional. Field used to sort the returned traces. - # Can be one of the following: - # - # * `trace_id` - # * `name` (`name` field of root span in the trace) - # * `duration` (difference between `end_time` and `start_time` fields of - # the root span) - # * `start` (`start_time` field of the root span) - # - # Descending order can be specified by appending `desc` to the sort field - # (for example, `name desc`). - # - # Only one sort field is permitted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Trace::V1::Trace>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Trace::V1::Trace>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/trace/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Trace::V1::TraceService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Trace::V1::ListTracesRequest.new - # - # # Call the list_traces method. - # result = client.list_traces request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Trace::V1::Trace. - # p item - # end - # - def list_traces request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Trace::V1::ListTracesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_traces.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Trace::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_traces.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_traces.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trace_service_stub.list_traces request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @trace_service_stub, :list_traces, "traces", 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 single trace by its ID. - # - # @overload get_trace(request, options = nil) - # Pass arguments to `get_trace` via a request object, either of type - # {::Google::Cloud::Trace::V1::GetTraceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Trace::V1::GetTraceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_trace(project_id: nil, trace_id: nil) - # Pass arguments to `get_trace` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param project_id [::String] - # Required. ID of the Cloud project where the trace data is stored. - # @param trace_id [::String] - # Required. ID of the trace to return. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Trace::V1::Trace] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Trace::V1::Trace] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/trace/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Trace::V1::TraceService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Trace::V1::GetTraceRequest.new - # - # # Call the get_trace method. - # result = client.get_trace request - # - # # The returned object is of type Google::Cloud::Trace::V1::Trace. - # p result - # - def get_trace request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Trace::V1::GetTraceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_trace.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Trace::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_trace.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_trace.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trace_service_stub.get_trace request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sends new traces to Stackdriver Trace or updates existing traces. If the ID - # of a trace that you send matches that of an existing trace, any fields - # in the existing trace and its spans are overwritten by the provided values, - # and any new fields provided are merged with the existing trace data. If the - # ID does not match, a new trace is created. - # - # @overload patch_traces(request, options = nil) - # Pass arguments to `patch_traces` via a request object, either of type - # {::Google::Cloud::Trace::V1::PatchTracesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Trace::V1::PatchTracesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload patch_traces(project_id: nil, traces: nil) - # Pass arguments to `patch_traces` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param project_id [::String] - # Required. ID of the Cloud project where the trace data is stored. - # @param traces [::Google::Cloud::Trace::V1::Traces, ::Hash] - # Required. The body of the message. - # @yield [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/trace/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Trace::V1::TraceService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Trace::V1::PatchTracesRequest.new - # - # # Call the patch_traces method. - # result = client.patch_traces request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def patch_traces request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Trace::V1::PatchTracesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.patch_traces.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Trace::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.patch_traces.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.patch_traces.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trace_service_stub.patch_traces request, 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 TraceService REST API. - # - # This class represents the configuration for TraceService 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::Trace::V1::TraceService::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_traces to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Trace::V1::TraceService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_traces.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Trace::V1::TraceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_traces.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 = "cloudtrace.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 TraceService 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_traces` - # @return [::Gapic::Config::Method] - # - attr_reader :list_traces - ## - # RPC-specific configuration for `get_trace` - # @return [::Gapic::Config::Method] - # - attr_reader :get_trace - ## - # RPC-specific configuration for `patch_traces` - # @return [::Gapic::Config::Method] - # - attr_reader :patch_traces - - # @private - def initialize parent_rpcs = nil - list_traces_config = parent_rpcs.list_traces if parent_rpcs.respond_to? :list_traces - @list_traces = ::Gapic::Config::Method.new list_traces_config - get_trace_config = parent_rpcs.get_trace if parent_rpcs.respond_to? :get_trace - @get_trace = ::Gapic::Config::Method.new get_trace_config - patch_traces_config = parent_rpcs.patch_traces if parent_rpcs.respond_to? :patch_traces - @patch_traces = ::Gapic::Config::Method.new patch_traces_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/rest/service_stub.rb deleted file mode 100644 index 68870f715db3..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/trace_service/rest/service_stub.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 "google/devtools/cloudtrace/v1/trace_pb" - -module Google - module Cloud - module Trace - module V1 - module TraceService - module Rest - ## - # REST service stub for the TraceService 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_traces REST call - # - # @param request_pb [::Google::Cloud::Trace::V1::ListTracesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Trace::V1::ListTracesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Trace::V1::ListTracesResponse] - # A result object deserialized from the server's reply - def list_traces request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_traces_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_traces", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Trace::V1::ListTracesResponse.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_trace REST call - # - # @param request_pb [::Google::Cloud::Trace::V1::GetTraceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Trace::V1::Trace] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Trace::V1::Trace] - # A result object deserialized from the server's reply - def get_trace request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_trace_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_trace", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Trace::V1::Trace.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the patch_traces REST call - # - # @param request_pb [::Google::Cloud::Trace::V1::PatchTracesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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 patch_traces request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_patch_traces_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "patch_traces", - 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_traces REST call - # - # @param request_pb [::Google::Cloud::Trace::V1::ListTracesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_traces_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/projects/{project_id}/traces", - matches: [ - ["project_id", %r{^[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_trace REST call - # - # @param request_pb [::Google::Cloud::Trace::V1::GetTraceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_trace_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/projects/{project_id}/traces/{trace_id}", - matches: [ - ["project_id", %r{^[^/]+/?$}, false], - ["trace_id", %r{^[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the patch_traces REST call - # - # @param request_pb [::Google::Cloud::Trace::V1::PatchTracesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_patch_traces_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/projects/{project_id}/traces", - body: "traces", - matches: [ - ["project_id", %r{^[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/version.rb b/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/v1/version.rb deleted file mode 100644 index 57e91ef8eec8..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/lib/google/cloud/trace/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 Trace - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-trace-v1/lib/google/devtools/cloudtrace/v1/trace_pb.rb b/owl-bot-staging/google-cloud-trace-v1/lib/google/devtools/cloudtrace/v1/trace_pb.rb deleted file mode 100644 index 02c25e7b258a..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/lib/google/devtools/cloudtrace/v1/trace_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/cloudtrace/v1/trace.proto - -require 'google/protobuf' - -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/timestamp_pb' -require 'google/api/annotations_pb' - - -descriptor_data = "\n)google/devtools/cloudtrace/v1/trace.proto\x12\x1dgoogle.devtools.cloudtrace.v1\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto\"f\n\x05Trace\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x10\n\x08trace_id\x18\x02 \x01(\t\x12\x37\n\x05spans\x18\x03 \x03(\x0b\x32(.google.devtools.cloudtrace.v1.TraceSpan\">\n\x06Traces\x12\x34\n\x06traces\x18\x01 \x03(\x0b\x32$.google.devtools.cloudtrace.v1.Trace\"\xa2\x03\n\tTraceSpan\x12\x0f\n\x07span_id\x18\x01 \x01(\x06\x12?\n\x04kind\x18\x02 \x01(\x0e\x32\x31.google.devtools.cloudtrace.v1.TraceSpan.SpanKind\x12\x0c\n\x04name\x18\x03 \x01(\t\x12.\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1b\n\x0eparent_span_id\x18\x06 \x01(\x06\x42\x03\xe0\x41\x01\x12\x44\n\x06labels\x18\x07 \x03(\x0b\x32\x34.google.devtools.cloudtrace.v1.TraceSpan.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"E\n\x08SpanKind\x12\x19\n\x15SPAN_KIND_UNSPECIFIED\x10\x00\x12\x0e\n\nRPC_SERVER\x10\x01\x12\x0e\n\nRPC_CLIENT\x10\x02\"\x80\x03\n\x11ListTracesRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12L\n\x04view\x18\x02 \x01(\x0e\x32\x39.google.devtools.cloudtrace.v1.ListTracesRequest.ViewTypeB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x12\n\npage_token\x18\x04 \x01(\t\x12.\n\nstart_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x06\x66ilter\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x08 \x01(\tB\x03\xe0\x41\x01\"N\n\x08ViewType\x12\x19\n\x15VIEW_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07MINIMAL\x10\x01\x12\x0c\n\x08ROOTSPAN\x10\x02\x12\x0c\n\x08\x43OMPLETE\x10\x03\"c\n\x12ListTracesResponse\x12\x34\n\x06traces\x18\x01 \x03(\x0b\x32$.google.devtools.cloudtrace.v1.Trace\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"A\n\x0fGetTraceRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08trace_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"i\n\x12PatchTracesRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12:\n\x06traces\x18\x02 \x01(\x0b\x32%.google.devtools.cloudtrace.v1.TracesB\x03\xe0\x41\x02\x32\xb5\x05\n\x0cTraceService\x12\xa8\x01\n\nListTraces\x12\x30.google.devtools.cloudtrace.v1.ListTracesRequest\x1a\x31.google.devtools.cloudtrace.v1.ListTracesResponse\"5\xda\x41\nproject_id\x82\xd3\xe4\x93\x02\"\x12 /v1/projects/{project_id}/traces\x12\xab\x01\n\x08GetTrace\x12..google.devtools.cloudtrace.v1.GetTraceRequest\x1a$.google.devtools.cloudtrace.v1.Trace\"I\xda\x41\x13project_id,trace_id\x82\xd3\xe4\x93\x02-\x12+/v1/projects/{project_id}/traces/{trace_id}\x12\x9e\x01\n\x0bPatchTraces\x12\x31.google.devtools.cloudtrace.v1.PatchTracesRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x11project_id,traces\x82\xd3\xe4\x93\x02*2 /v1/projects/{project_id}/traces:\x06traces\x1a\xaa\x01\xca\x41\x19\x63loudtrace.googleapis.com\xd2\x41\x8a\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/trace.append,https://www.googleapis.com/auth/trace.readonlyB\xad\x01\n!com.google.devtools.cloudtrace.v1B\nTraceProtoP\x01Z/cloud.google.com/go/trace/apiv1/tracepb;tracepb\xaa\x02\x15Google.Cloud.Trace.V1\xca\x02\x15Google\\Cloud\\Trace\\V1\xea\x02\x18Google::Cloud::Trace::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Trace - module V1 - Trace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v1.Trace").msgclass - Traces = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v1.Traces").msgclass - TraceSpan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v1.TraceSpan").msgclass - TraceSpan::SpanKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v1.TraceSpan.SpanKind").enummodule - ListTracesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v1.ListTracesRequest").msgclass - ListTracesRequest::ViewType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v1.ListTracesRequest.ViewType").enummodule - ListTracesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v1.ListTracesResponse").msgclass - GetTraceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v1.GetTraceRequest").msgclass - PatchTracesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v1.PatchTracesRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-trace-v1/lib/google/devtools/cloudtrace/v1/trace_services_pb.rb b/owl-bot-staging/google-cloud-trace-v1/lib/google/devtools/cloudtrace/v1/trace_services_pb.rb deleted file mode 100644 index 56320be47991..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/lib/google/devtools/cloudtrace/v1/trace_services_pb.rb +++ /dev/null @@ -1,57 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/devtools/cloudtrace/v1/trace.proto for package 'Google.Cloud.Trace.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/devtools/cloudtrace/v1/trace_pb' - -module Google - module Cloud - module Trace - module V1 - module TraceService - # This file describes an API for collecting and viewing traces and spans - # within a trace. A Trace is a collection of spans corresponding to a single - # operation or set of operations for an application. A span is an individual - # timed event which forms a node of the trace tree. Spans for a single trace - # may span multiple services. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.devtools.cloudtrace.v1.TraceService' - - # Returns of a list of traces that match the specified filter conditions. - rpc :ListTraces, ::Google::Cloud::Trace::V1::ListTracesRequest, ::Google::Cloud::Trace::V1::ListTracesResponse - # Gets a single trace by its ID. - rpc :GetTrace, ::Google::Cloud::Trace::V1::GetTraceRequest, ::Google::Cloud::Trace::V1::Trace - # Sends new traces to Stackdriver Trace or updates existing traces. If the ID - # of a trace that you send matches that of an existing trace, any fields - # in the existing trace and its spans are overwritten by the provided values, - # and any new fields provided are merged with the existing trace data. If the - # ID does not match, a new trace is created. - rpc :PatchTraces, ::Google::Cloud::Trace::V1::PatchTracesRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-trace-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-trace-v1/proto_docs/README.md deleted file mode 100644 index 8f04d0cc9e5b..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Trace 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-trace-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-trace-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # 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. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - # - # Example: - # - # 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 - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # 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 - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # 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 - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-trace-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-trace-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-trace-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-trace-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-trace-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-trace-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-trace-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-trace-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-trace-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-trace-v1/proto_docs/google/devtools/cloudtrace/v1/trace.rb b/owl-bot-staging/google-cloud-trace-v1/proto_docs/google/devtools/cloudtrace/v1/trace.rb deleted file mode 100644 index f10fa9094e2d..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/proto_docs/google/devtools/cloudtrace/v1/trace.rb +++ /dev/null @@ -1,287 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Trace - module V1 - # A trace describes how long it takes for an application to perform an - # operation. It consists of a set of spans, each of which represent a single - # timed event within the operation. - # @!attribute [rw] project_id - # @return [::String] - # Project ID of the Cloud project where the trace data is stored. - # @!attribute [rw] trace_id - # @return [::String] - # Globally unique identifier for the trace. This identifier is a 128-bit - # numeric value formatted as a 32-byte hex string. For example, - # `382d4f4c6b7bb2f4a972559d9085001d`. - # @!attribute [rw] spans - # @return [::Array<::Google::Cloud::Trace::V1::TraceSpan>] - # Collection of spans in the trace. - class Trace - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List of new or updated traces. - # @!attribute [rw] traces - # @return [::Array<::Google::Cloud::Trace::V1::Trace>] - # List of traces. - class Traces - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A span represents a single timed event within a trace. Spans can be nested - # and form a trace tree. Often, a trace contains a root span that describes the - # end-to-end latency of an operation and, optionally, one or more subspans for - # its suboperations. Spans do not need to be contiguous. There may be gaps - # between spans in a trace. - # @!attribute [rw] span_id - # @return [::Integer] - # Identifier for the span. Must be a 64-bit integer other than 0 and - # unique within a trace. For example, `2205310701640571284`. - # @!attribute [rw] kind - # @return [::Google::Cloud::Trace::V1::TraceSpan::SpanKind] - # Distinguishes between spans generated in a particular context. For example, - # two spans with the same name may be distinguished using `RPC_CLIENT` - # and `RPC_SERVER` to identify queueing latency associated with the span. - # @!attribute [rw] name - # @return [::String] - # Name of the span. Must be less than 128 bytes. The span name is sanitized - # and displayed in the Stackdriver Trace tool in the - # Google Cloud Platform Console. - # The name may be a method name or some other per-call site name. - # For the same executable and the same call point, a best practice is - # to use a consistent name, which makes it easier to correlate - # cross-trace spans. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Start time of the span in nanoseconds from the UNIX epoch. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # End time of the span in nanoseconds from the UNIX epoch. - # @!attribute [rw] parent_span_id - # @return [::Integer] - # Optional. ID of the parent span, if any. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Collection of labels associated with the span. Label keys must be less than - # 128 bytes. Label values must be less than 16 kilobytes (10MB for - # `/stacktrace` values). - # - # Some predefined label keys exist, or you may create your own. When creating - # your own, we recommend the following formats: - # - # * `/category/product/key` for agents of well-known products (e.g. - # `/db/mongodb/read_size`). - # * `short_host/path/key` for domain-specific keys (e.g. - # `foo.com/myproduct/bar`) - # - # Predefined labels include: - # - # * `/agent` - # * `/component` - # * `/error/message` - # * `/error/name` - # * `/http/client_city` - # * `/http/client_country` - # * `/http/client_protocol` - # * `/http/client_region` - # * `/http/host` - # * `/http/method` - # * `/http/path` - # * `/http/redirected_url` - # * `/http/request/size` - # * `/http/response/size` - # * `/http/route` - # * `/http/status_code` - # * `/http/url` - # * `/http/user_agent` - # * `/pid` - # * `/stacktrace` - # * `/tid` - class TraceSpan - 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 - - # Type of span. Can be used to specify additional relationships between spans - # in addition to a parent/child relationship. - module SpanKind - # Unspecified. - SPAN_KIND_UNSPECIFIED = 0 - - # Indicates that the span covers server-side handling of an RPC or other - # remote network request. - RPC_SERVER = 1 - - # Indicates that the span covers the client-side wrapper around an RPC or - # other remote request. - RPC_CLIENT = 2 - end - end - - # The request message for the `ListTraces` method. All fields are required - # unless specified. - # @!attribute [rw] project_id - # @return [::String] - # Required. ID of the Cloud project where the trace data is stored. - # @!attribute [rw] view - # @return [::Google::Cloud::Trace::V1::ListTracesRequest::ViewType] - # Optional. Type of data returned for traces in the list. Default is - # `MINIMAL`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of traces to return. If not specified or <= 0, the - # implementation selects a reasonable value. The implementation may - # return fewer traces than the requested page size. - # @!attribute [rw] page_token - # @return [::String] - # Token identifying the page of results to return. If provided, use the - # value of the `next_page_token` field from a previous request. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Start of the time interval (inclusive) during which the trace data was - # collected from the application. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # End of the time interval (inclusive) during which the trace data was - # collected from the application. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter against labels for the request. - # - # By default, searches use prefix matching. To specify exact match, prepend - # a plus symbol (`+`) to the search term. - # Multiple terms are ANDed. Syntax: - # - # * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root - # span starts with `NAME_PREFIX`. - # * `+root:NAME` or `+NAME`: Return traces where any root span's name is - # exactly `NAME`. - # * `span:NAME_PREFIX`: Return traces where any span starts with - # `NAME_PREFIX`. - # * `+span:NAME`: Return traces where any span's name is exactly - # `NAME`. - # * `latency:DURATION`: Return traces whose overall latency is - # greater or equal to than `DURATION`. Accepted units are nanoseconds - # (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For - # example, `latency:24ms` returns traces whose overall latency - # is greater than or equal to 24 milliseconds. - # * `label:LABEL_KEY`: Return all traces containing the specified - # label key (exact match, case-sensitive) regardless of the key:value - # pair's value (including empty values). - # * `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified - # label key (exact match, case-sensitive) whose value starts with - # `VALUE_PREFIX`. Both a key and a value must be specified. - # * `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair - # exactly matching the specified text. Both a key and a value must be - # specified. - # * `method:VALUE`: Equivalent to `/http/method:VALUE`. - # * `url:VALUE`: Equivalent to `/http/url:VALUE`. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field used to sort the returned traces. - # Can be one of the following: - # - # * `trace_id` - # * `name` (`name` field of root span in the trace) - # * `duration` (difference between `end_time` and `start_time` fields of - # the root span) - # * `start` (`start_time` field of the root span) - # - # Descending order can be specified by appending `desc` to the sort field - # (for example, `name desc`). - # - # Only one sort field is permitted. - class ListTracesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of data returned for traces in the list. - module ViewType - # Default is `MINIMAL` if unspecified. - VIEW_TYPE_UNSPECIFIED = 0 - - # Minimal view of the trace record that contains only the project - # and trace IDs. - MINIMAL = 1 - - # Root span view of the trace record that returns the root spans along - # with the minimal trace data. - ROOTSPAN = 2 - - # Complete view of the trace record that contains the actual trace data. - # This is equivalent to calling the REST `get` or RPC `GetTrace` method - # using the ID of each listed trace. - COMPLETE = 3 - end - end - - # The response message for the `ListTraces` method. - # @!attribute [rw] traces - # @return [::Array<::Google::Cloud::Trace::V1::Trace>] - # List of trace records as specified by the view parameter. - # @!attribute [rw] next_page_token - # @return [::String] - # If defined, indicates that there are more traces that match the request - # and that this value should be passed to the next request to continue - # retrieving additional traces. - class ListTracesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the `GetTrace` method. - # @!attribute [rw] project_id - # @return [::String] - # Required. ID of the Cloud project where the trace data is stored. - # @!attribute [rw] trace_id - # @return [::String] - # Required. ID of the trace to return. - class GetTraceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the `PatchTraces` method. - # @!attribute [rw] project_id - # @return [::String] - # Required. ID of the Cloud project where the trace data is stored. - # @!attribute [rw] traces - # @return [::Google::Cloud::Trace::V1::Traces] - # Required. The body of the message. - class PatchTracesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-trace-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-trace-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-trace-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-trace-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-trace-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-trace-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-trace-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-trace-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-trace-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-trace-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-trace-v1/snippets/Gemfile deleted file mode 100644 index c09bc4f74260..000000000000 --- a/owl-bot-staging/google-cloud-trace-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-trace-v1", path: "../" -else - gem "google-cloud-trace-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-trace-v1/snippets/snippet_metadata_google.devtools.cloudtrace.v1.json b/owl-bot-staging/google-cloud-trace-v1/snippets/snippet_metadata_google.devtools.cloudtrace.v1.json deleted file mode 100644 index 314aca148ab2..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/snippets/snippet_metadata_google.devtools.cloudtrace.v1.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-trace-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.devtools.cloudtrace.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "cloudtrace_v1_generated_TraceService_ListTraces_sync", - "title": "Snippet for the list_traces call in the TraceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Trace::V1::TraceService::Client#list_traces.", - "file": "trace_service/list_traces.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_traces", - "full_name": "::Google::Cloud::Trace::V1::TraceService::Client#list_traces", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Trace::V1::ListTracesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Trace::V1::ListTracesResponse", - "client": { - "short_name": "TraceService::Client", - "full_name": "::Google::Cloud::Trace::V1::TraceService::Client" - }, - "method": { - "short_name": "ListTraces", - "full_name": "google.devtools.cloudtrace.v1.TraceService.ListTraces", - "service": { - "short_name": "TraceService", - "full_name": "google.devtools.cloudtrace.v1.TraceService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtrace_v1_generated_TraceService_GetTrace_sync", - "title": "Snippet for the get_trace call in the TraceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Trace::V1::TraceService::Client#get_trace.", - "file": "trace_service/get_trace.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_trace", - "full_name": "::Google::Cloud::Trace::V1::TraceService::Client#get_trace", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Trace::V1::GetTraceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Trace::V1::Trace", - "client": { - "short_name": "TraceService::Client", - "full_name": "::Google::Cloud::Trace::V1::TraceService::Client" - }, - "method": { - "short_name": "GetTrace", - "full_name": "google.devtools.cloudtrace.v1.TraceService.GetTrace", - "service": { - "short_name": "TraceService", - "full_name": "google.devtools.cloudtrace.v1.TraceService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtrace_v1_generated_TraceService_PatchTraces_sync", - "title": "Snippet for the patch_traces call in the TraceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Trace::V1::TraceService::Client#patch_traces.", - "file": "trace_service/patch_traces.rb", - "language": "RUBY", - "client_method": { - "short_name": "patch_traces", - "full_name": "::Google::Cloud::Trace::V1::TraceService::Client#patch_traces", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Trace::V1::PatchTracesRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "TraceService::Client", - "full_name": "::Google::Cloud::Trace::V1::TraceService::Client" - }, - "method": { - "short_name": "PatchTraces", - "full_name": "google.devtools.cloudtrace.v1.TraceService.PatchTraces", - "service": { - "short_name": "TraceService", - "full_name": "google.devtools.cloudtrace.v1.TraceService" - } - } - }, - "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-trace-v1/snippets/trace_service/get_trace.rb b/owl-bot-staging/google-cloud-trace-v1/snippets/trace_service/get_trace.rb deleted file mode 100644 index cda36e0edbd3..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/snippets/trace_service/get_trace.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 cloudtrace_v1_generated_TraceService_GetTrace_sync] -require "google/cloud/trace/v1" - -## -# Snippet for the get_trace call in the TraceService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Trace::V1::TraceService::Client#get_trace. -# -def get_trace - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Trace::V1::TraceService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Trace::V1::GetTraceRequest.new - - # Call the get_trace method. - result = client.get_trace request - - # The returned object is of type Google::Cloud::Trace::V1::Trace. - p result -end -# [END cloudtrace_v1_generated_TraceService_GetTrace_sync] diff --git a/owl-bot-staging/google-cloud-trace-v1/snippets/trace_service/list_traces.rb b/owl-bot-staging/google-cloud-trace-v1/snippets/trace_service/list_traces.rb deleted file mode 100644 index 17cca45ee65e..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/snippets/trace_service/list_traces.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 cloudtrace_v1_generated_TraceService_ListTraces_sync] -require "google/cloud/trace/v1" - -## -# Snippet for the list_traces call in the TraceService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Trace::V1::TraceService::Client#list_traces. -# -def list_traces - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Trace::V1::TraceService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Trace::V1::ListTracesRequest.new - - # Call the list_traces method. - result = client.list_traces request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Trace::V1::Trace. - p item - end -end -# [END cloudtrace_v1_generated_TraceService_ListTraces_sync] diff --git a/owl-bot-staging/google-cloud-trace-v1/snippets/trace_service/patch_traces.rb b/owl-bot-staging/google-cloud-trace-v1/snippets/trace_service/patch_traces.rb deleted file mode 100644 index 1a9f634e125c..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/snippets/trace_service/patch_traces.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 cloudtrace_v1_generated_TraceService_PatchTraces_sync] -require "google/cloud/trace/v1" - -## -# Snippet for the patch_traces call in the TraceService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Trace::V1::TraceService::Client#patch_traces. -# -def patch_traces - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Trace::V1::TraceService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Trace::V1::PatchTracesRequest.new - - # Call the patch_traces method. - result = client.patch_traces request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END cloudtrace_v1_generated_TraceService_PatchTraces_sync] diff --git a/owl-bot-staging/google-cloud-trace-v1/test/google/cloud/trace/v1/trace_service_rest_test.rb b/owl-bot-staging/google-cloud-trace-v1/test/google/cloud/trace/v1/trace_service_rest_test.rb deleted file mode 100644 index 600d2460da19..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/test/google/cloud/trace/v1/trace_service_rest_test.rb +++ /dev/null @@ -1,270 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/devtools/cloudtrace/v1/trace_pb" -require "google/cloud/trace/v1/trace_service/rest" - - -class ::Google::Cloud::Trace::V1::TraceService::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_traces - # Create test objects. - client_result = ::Google::Cloud::Trace::V1::ListTracesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - project_id = "hello world" - view = :VIEW_TYPE_UNSPECIFIED - page_size = 42 - page_token = "hello world" - start_time = {} - end_time = {} - filter = "hello world" - order_by = "hello world" - - list_traces_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Trace::V1::TraceService::Rest::ServiceStub.stub :transcode_list_traces_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_traces_client_stub do - # Create client - client = ::Google::Cloud::Trace::V1::TraceService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_traces({ project_id: project_id, view: view, page_size: page_size, page_token: page_token, start_time: start_time, end_time: end_time, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_traces project_id: project_id, view: view, page_size: page_size, page_token: page_token, start_time: start_time, end_time: end_time, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_traces ::Google::Cloud::Trace::V1::ListTracesRequest.new(project_id: project_id, view: view, page_size: page_size, page_token: page_token, start_time: start_time, end_time: end_time, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_traces({ project_id: project_id, view: view, page_size: page_size, page_token: page_token, start_time: start_time, end_time: end_time, 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_traces(::Google::Cloud::Trace::V1::ListTracesRequest.new(project_id: project_id, view: view, page_size: page_size, page_token: page_token, start_time: start_time, end_time: end_time, 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_traces_client_stub.call_count - end - end - end - - def test_get_trace - # Create test objects. - client_result = ::Google::Cloud::Trace::V1::Trace.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - project_id = "hello world" - trace_id = "hello world" - - get_trace_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Trace::V1::TraceService::Rest::ServiceStub.stub :transcode_get_trace_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_trace_client_stub do - # Create client - client = ::Google::Cloud::Trace::V1::TraceService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_trace({ project_id: project_id, trace_id: trace_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_trace project_id: project_id, trace_id: trace_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_trace ::Google::Cloud::Trace::V1::GetTraceRequest.new(project_id: project_id, trace_id: trace_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_trace({ project_id: project_id, trace_id: trace_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_trace(::Google::Cloud::Trace::V1::GetTraceRequest.new(project_id: project_id, trace_id: trace_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_trace_client_stub.call_count - end - end - end - - def test_patch_traces - # 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. - project_id = "hello world" - traces = {} - - patch_traces_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Trace::V1::TraceService::Rest::ServiceStub.stub :transcode_patch_traces_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, patch_traces_client_stub do - # Create client - client = ::Google::Cloud::Trace::V1::TraceService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.patch_traces({ project_id: project_id, traces: traces }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.patch_traces project_id: project_id, traces: traces do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.patch_traces ::Google::Cloud::Trace::V1::PatchTracesRequest.new(project_id: project_id, traces: traces) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.patch_traces({ project_id: project_id, traces: traces }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.patch_traces(::Google::Cloud::Trace::V1::PatchTracesRequest.new(project_id: project_id, traces: traces), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, patch_traces_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::Trace::V1::TraceService::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::Trace::V1::TraceService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-trace-v1/test/google/cloud/trace/v1/trace_service_test.rb b/owl-bot-staging/google-cloud-trace-v1/test/google/cloud/trace/v1/trace_service_test.rb deleted file mode 100644 index cf06253597e4..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/test/google/cloud/trace/v1/trace_service_test.rb +++ /dev/null @@ -1,301 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/devtools/cloudtrace/v1/trace_pb" -require "google/cloud/trace/v1/trace_service" - -class ::Google::Cloud::Trace::V1::TraceService::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_traces - # Create GRPC objects. - grpc_response = ::Google::Cloud::Trace::V1::ListTracesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - project_id = "hello world" - view = :VIEW_TYPE_UNSPECIFIED - page_size = 42 - page_token = "hello world" - start_time = {} - end_time = {} - filter = "hello world" - order_by = "hello world" - - list_traces_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_traces, name - assert_kind_of ::Google::Cloud::Trace::V1::ListTracesRequest, request - assert_equal "hello world", request["project_id"] - assert_equal :VIEW_TYPE_UNSPECIFIED, request["view"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["start_time"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["end_time"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_traces_client_stub do - # Create client - client = ::Google::Cloud::Trace::V1::TraceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_traces({ project_id: project_id, view: view, page_size: page_size, page_token: page_token, start_time: start_time, end_time: end_time, filter: filter, order_by: 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_traces project_id: project_id, view: view, page_size: page_size, page_token: page_token, start_time: start_time, end_time: end_time, filter: filter, order_by: 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_traces ::Google::Cloud::Trace::V1::ListTracesRequest.new(project_id: project_id, view: view, page_size: page_size, page_token: page_token, start_time: start_time, end_time: end_time, filter: filter, order_by: 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_traces({ project_id: project_id, view: view, page_size: page_size, page_token: page_token, start_time: start_time, end_time: end_time, filter: filter, order_by: order_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_traces(::Google::Cloud::Trace::V1::ListTracesRequest.new(project_id: project_id, view: view, page_size: page_size, page_token: page_token, start_time: start_time, end_time: end_time, filter: filter, order_by: order_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_traces_client_stub.call_rpc_count - end - end - - def test_get_trace - # Create GRPC objects. - grpc_response = ::Google::Cloud::Trace::V1::Trace.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - project_id = "hello world" - trace_id = "hello world" - - get_trace_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_trace, name - assert_kind_of ::Google::Cloud::Trace::V1::GetTraceRequest, request - assert_equal "hello world", request["project_id"] - assert_equal "hello world", request["trace_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_trace_client_stub do - # Create client - client = ::Google::Cloud::Trace::V1::TraceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_trace({ project_id: project_id, trace_id: trace_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_trace project_id: project_id, trace_id: trace_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_trace ::Google::Cloud::Trace::V1::GetTraceRequest.new(project_id: project_id, trace_id: trace_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_trace({ project_id: project_id, trace_id: trace_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_trace(::Google::Cloud::Trace::V1::GetTraceRequest.new(project_id: project_id, trace_id: trace_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_trace_client_stub.call_rpc_count - end - end - - def test_patch_traces - # 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. - project_id = "hello world" - traces = {} - - patch_traces_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :patch_traces, name - assert_kind_of ::Google::Cloud::Trace::V1::PatchTracesRequest, request - assert_equal "hello world", request["project_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Trace::V1::Traces), request["traces"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, patch_traces_client_stub do - # Create client - client = ::Google::Cloud::Trace::V1::TraceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.patch_traces({ project_id: project_id, traces: traces }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.patch_traces project_id: project_id, traces: traces do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.patch_traces ::Google::Cloud::Trace::V1::PatchTracesRequest.new(project_id: project_id, traces: traces) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.patch_traces({ project_id: project_id, traces: traces }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.patch_traces(::Google::Cloud::Trace::V1::PatchTracesRequest.new(project_id: project_id, traces: traces), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, patch_traces_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::Trace::V1::TraceService::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::Trace::V1::TraceService::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::Trace::V1::TraceService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Trace::V1::TraceService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-trace-v1/test/helper.rb b/owl-bot-staging/google-cloud-trace-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-trace-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-trace-v2/.gitignore b/owl-bot-staging/google-cloud-trace-v2/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-trace-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-trace-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-trace-v2/.repo-metadata.json deleted file mode 100644 index 67811910934d..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "cloudtrace.googleapis.com", - "api_shortname": "cloudtrace", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-trace-v2/latest", - "distribution_name": "google-cloud-trace-v2", - "is_cloud": true, - "language": "ruby", - "name": "cloudtrace", - "name_pretty": "Cloud Trace V2 API", - "product_documentation": "https://cloud.google.com/trace", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The Cloud Trace API lets you send and retrieve latency data to and from Cloud Trace. This API provides low-level interfaces for interacting directly with the feature. For some languages, you can use OpenTelemetry, a set of open source tracing and stats instrumentation libraries that work with multiple backends. Note that google-cloud-trace-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-trace instead. See the readme for more details.", - "ruby-cloud-env-prefix": "TRACE", - "ruby-cloud-product-url": "https://cloud.google.com/trace", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-trace-v2/.rubocop.yml b/owl-bot-staging/google-cloud-trace-v2/.rubocop.yml deleted file mode 100644 index f3216e912f4e..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-trace-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-trace-v2.rb" diff --git a/owl-bot-staging/google-cloud-trace-v2/.toys.rb b/owl-bot-staging/google-cloud-trace-v2/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-trace-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-trace-v2/.yardopts b/owl-bot-staging/google-cloud-trace-v2/.yardopts deleted file mode 100644 index 6c8fa994b18f..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Trace 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-trace-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-trace-v2/AUTHENTICATION.md deleted file mode 100644 index cd2b7cadfb3d..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-trace-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-trace-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/trace/v2" - -client = ::Google::Cloud::Trace::V2::TraceService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/trace/v2" - -::Google::Cloud::Trace::V2::TraceService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Trace::V2::TraceService::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-trace-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/trace/v2" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Trace::V2::TraceService::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-trace-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-trace-v2/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-trace-v2/Gemfile b/owl-bot-staging/google-cloud-trace-v2/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-trace-v2/LICENSE.md b/owl-bot-staging/google-cloud-trace-v2/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-trace-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-trace-v2/README.md b/owl-bot-staging/google-cloud-trace-v2/README.md deleted file mode 100644 index 1ff702d96ad8..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Trace V2 API - -Sends application trace data to Stackdriver Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Trace API directly. If you are looking to instrument your application for Stackdriver Trace, we recommend using OpenTelemetry. - -The Cloud Trace API lets you send and retrieve latency data to and from Cloud Trace. This API provides low-level interfaces for interacting directly with the feature. For some languages, you can use OpenTelemetry, a set of open source tracing and stats instrumentation libraries that work with multiple backends. - -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 Trace V2 API. Most users should consider using -the main client gem, -[google-cloud-trace](https://rubygems.org/gems/google-cloud-trace). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-trace-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/cloudtrace.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/trace/v2" - -client = ::Google::Cloud::Trace::V2::TraceService::Client.new -request = ::Google::Cloud::Trace::V2::BatchWriteSpansRequest.new # (request fields as keyword arguments...) -response = client.batch_write_spans request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-trace-v2/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/trace) -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/trace/v2" -require "logger" - -client = ::Google::Cloud::Trace::V2::TraceService::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-trace`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-trace-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-trace`. -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-trace-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-trace-v2/Rakefile b/owl-bot-staging/google-cloud-trace-v2/Rakefile deleted file mode 100644 index 010c4e0623c1..000000000000 --- a/owl-bot-staging/google-cloud-trace-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-trace-v2 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["TRACE_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["TRACE_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["TRACE_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 TRACE_TEST_PROJECT=test123 TRACE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/trace/v2/trace_service/credentials" - ::Google::Cloud::Trace::V2::TraceService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["TRACE_PROJECT"] = project - ENV["TRACE_TEST_PROJECT"] = project - ENV["TRACE_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-trace-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-trace-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-trace-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-trace-v2 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-trace-v2" - header "google-cloud-trace-v2 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-trace-v2 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-trace-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-trace-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-trace-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-trace-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-trace-v2/gapic_metadata.json deleted file mode 100644 index 9cd82cbd9ba1..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/gapic_metadata.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.devtools.cloudtrace.v2", - "libraryPackage": "::Google::Cloud::Trace::V2", - "services": { - "TraceService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Trace::V2::TraceService::Client", - "rpcs": { - "BatchWriteSpans": { - "methods": [ - "batch_write_spans" - ] - }, - "CreateSpan": { - "methods": [ - "create_span" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-trace-v2/google-cloud-trace-v2.gemspec b/owl-bot-staging/google-cloud-trace-v2/google-cloud-trace-v2.gemspec deleted file mode 100644 index 93a50148c12a..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/google-cloud-trace-v2.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/trace/v2/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-trace-v2" - gem.version = Google::Cloud::Trace::V2::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The Cloud Trace API lets you send and retrieve latency data to and from Cloud Trace. This API provides low-level interfaces for interacting directly with the feature. For some languages, you can use OpenTelemetry, a set of open source tracing and stats instrumentation libraries that work with multiple backends. Note that google-cloud-trace-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-trace instead. See the readme for more details." - gem.summary = "Sends application trace data to Stackdriver Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Trace API directly. If you are looking to instrument your application for Stackdriver Trace, we recommend using OpenTelemetry." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google-cloud-trace-v2.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google-cloud-trace-v2.rb deleted file mode 100644 index f27f8272e44b..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/lib/google-cloud-trace-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/trace/v2" diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2.rb deleted file mode 100644 index c1e11a6a5167..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/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/trace/v2/trace_service" -require "google/cloud/trace/v2/version" - -module Google - module Cloud - module Trace - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/trace/v2" - # client = ::Google::Cloud::Trace::V2::TraceService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/trace/v2" - # client = ::Google::Cloud::Trace::V2::TraceService::Rest::Client.new - # - module V2 - end - end - end -end - -helper_path = ::File.join __dir__, "v2", "_helpers.rb" -require "google/cloud/trace/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/rest.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/rest.rb deleted file mode 100644 index 531187513daf..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/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/trace/v2/trace_service/rest" -require "google/cloud/trace/v2/version" - -module Google - module Cloud - module Trace - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/trace/v2/rest" - # client = ::Google::Cloud::Trace::V2::TraceService::Rest::Client.new - # - module V2 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service.rb deleted file mode 100644 index 71726f38d623..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_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/trace/v2/version" - -require "google/cloud/trace/v2/trace_service/credentials" -require "google/cloud/trace/v2/trace_service/paths" -require "google/cloud/trace/v2/trace_service/client" -require "google/cloud/trace/v2/trace_service/rest" - -module Google - module Cloud - module Trace - module V2 - ## - # Service for collecting and viewing traces and spans within a trace. - # - # A trace is a collection of spans corresponding to a single - # operation or a set of operations in an application. - # - # A span is an individual timed event which forms a node of the trace tree. - # A single trace can contain spans from multiple services. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/trace/v2/trace_service" - # client = ::Google::Cloud::Trace::V2::TraceService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/trace/v2/trace_service/rest" - # client = ::Google::Cloud::Trace::V2::TraceService::Rest::Client.new - # - module TraceService - end - end - end - end -end - -helper_path = ::File.join __dir__, "trace_service", "helpers.rb" -require "google/cloud/trace/v2/trace_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/client.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/client.rb deleted file mode 100644 index 1f59d76e257f..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/client.rb +++ /dev/null @@ -1,643 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/devtools/cloudtrace/v2/tracing_pb" - -module Google - module Cloud - module Trace - module V2 - module TraceService - ## - # Client for the TraceService service. - # - # Service for collecting and viewing traces and spans within a trace. - # - # A trace is a collection of spans corresponding to a single - # operation or a set of operations in an application. - # - # A span is an individual timed event which forms a node of the trace tree. - # A single trace can contain spans from multiple services. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudtrace.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :trace_service_stub - - ## - # Configure the TraceService Client class. - # - # See {::Google::Cloud::Trace::V2::TraceService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TraceService clients - # ::Google::Cloud::Trace::V2::TraceService::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", "Trace", "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.rpcs.batch_write_spans.timeout = 120.0 - default_config.rpcs.batch_write_spans.retry_policy = { - initial_delay: 0.1, max_delay: 30.0, multiplier: 2, retry_codes: [14, 4] - } - - default_config.rpcs.create_span.timeout = 120.0 - default_config.rpcs.create_span.retry_policy = { - initial_delay: 0.1, max_delay: 1.0, multiplier: 1.2, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TraceService 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::Trace::V2::TraceService::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 - @trace_service_stub.universe_domain - end - - ## - # Create a new TraceService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Trace::V2::TraceService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Trace::V2::TraceService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TraceService 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/devtools/cloudtrace/v2/tracing_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 - - @trace_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Trace::V2::TraceService::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 - ) - - @trace_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 - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @trace_service_stub.logger - end - - # Service calls - - ## - # Batch writes new spans to new or existing traces. You cannot update - # existing spans. - # - # @overload batch_write_spans(request, options = nil) - # Pass arguments to `batch_write_spans` via a request object, either of type - # {::Google::Cloud::Trace::V2::BatchWriteSpansRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Trace::V2::BatchWriteSpansRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_spans(name: nil, spans: nil) - # Pass arguments to `batch_write_spans` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 project where the spans belong. The format is - # `projects/[PROJECT_ID]`. - # @param spans [::Array<::Google::Cloud::Trace::V2::Span, ::Hash>] - # Required. A list of new spans. The span names must not match existing - # spans, otherwise the results are undefined. - # - # @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/trace/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Trace::V2::TraceService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Trace::V2::BatchWriteSpansRequest.new - # - # # Call the batch_write_spans method. - # result = client.batch_write_spans request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def batch_write_spans request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Trace::V2::BatchWriteSpansRequest - - # Converts hash and nil to 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_spans.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Trace::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.batch_write_spans.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_write_spans.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trace_service_stub.call_rpc :batch_write_spans, request, 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 span. - # - # @overload create_span(request, options = nil) - # Pass arguments to `create_span` via a request object, either of type - # {::Google::Cloud::Trace::V2::Span} or an equivalent Hash. - # - # @param request [::Google::Cloud::Trace::V2::Span, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_span(name: nil, span_id: nil, parent_span_id: nil, display_name: nil, start_time: nil, end_time: nil, attributes: nil, stack_trace: nil, time_events: nil, links: nil, status: nil, same_process_as_parent_span: nil, child_span_count: nil, span_kind: nil) - # Pass arguments to `create_span` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the span in the following format: - # - # * `projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]` - # - # `[TRACE_ID]` is a unique identifier for a trace within a project; - # it is a 32-character hexadecimal encoding of a 16-byte array. It should - # not be zero. - # - # `[SPAN_ID]` is a unique identifier for a span within a trace; it - # is a 16-character hexadecimal encoding of an 8-byte array. It should not - # be zero. - # . - # @param span_id [::String] - # Required. The `[SPAN_ID]` portion of the span's resource name. - # @param parent_span_id [::String] - # The `[SPAN_ID]` of this span's parent span. If this is a root span, - # then this field must be empty. - # @param display_name [::Google::Cloud::Trace::V2::TruncatableString, ::Hash] - # Required. A description of the span's operation (up to 128 bytes). - # Cloud Trace displays the description in the - # Cloud console. - # For example, the display name can be a qualified method name or a file name - # and a line number where the operation is called. A best practice is to use - # the same display name within an application and at the same call point. - # This makes it easier to correlate spans in different traces. - # @param start_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. The start time of the span. On the client side, this is the time - # kept by the local machine where the span execution starts. On the server - # side, this is the time when the server's application handler starts - # running. - # @param end_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. The end time of the span. On the client side, this is the time - # kept by the local machine where the span execution ends. On the server - # side, this is the time when the server application handler stops running. - # @param attributes [::Google::Cloud::Trace::V2::Span::Attributes, ::Hash] - # A set of attributes on the span. You can have up to 32 attributes per - # span. - # @param stack_trace [::Google::Cloud::Trace::V2::StackTrace, ::Hash] - # Stack trace captured at the start of the span. - # @param time_events [::Google::Cloud::Trace::V2::Span::TimeEvents, ::Hash] - # A set of time events. You can have up to 32 annotations and 128 message - # events per span. - # @param links [::Google::Cloud::Trace::V2::Span::Links, ::Hash] - # Links associated with the span. You can have up to 128 links per Span. - # @param status [::Google::Rpc::Status, ::Hash] - # Optional. The final status for this span. - # @param same_process_as_parent_span [::Google::Protobuf::BoolValue, ::Hash] - # Optional. Set this parameter to indicate whether this span is in - # the same process as its parent. If you do not set this parameter, - # Trace is unable to take advantage of this helpful information. - # @param child_span_count [::Google::Protobuf::Int32Value, ::Hash] - # Optional. The number of child spans that were generated while this span - # was active. If set, allows implementation to detect missing child spans. - # @param span_kind [::Google::Cloud::Trace::V2::Span::SpanKind] - # Optional. Distinguishes between spans generated in a particular context. - # For example, two spans with the same name may be distinguished using - # `CLIENT` (caller) and `SERVER` (callee) to identify an RPC call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Trace::V2::Span] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Trace::V2::Span] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/trace/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Trace::V2::TraceService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Trace::V2::Span.new - # - # # Call the create_span method. - # result = client.create_span request - # - # # The returned object is of type Google::Cloud::Trace::V2::Span. - # p result - # - def create_span request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Trace::V2::Span - - # Converts hash and nil to 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_span.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Trace::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.create_span.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_span.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trace_service_stub.call_rpc :create_span, request, 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 TraceService API. - # - # This class represents the configuration for TraceService, - # 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::Trace::V2::TraceService::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 - # # batch_write_spans to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Trace::V2::TraceService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.batch_write_spans.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Trace::V2::TraceService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.batch_write_spans.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::Trace::V2::TraceService::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 = "cloudtrace.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 TraceService 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 `batch_write_spans` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_write_spans - ## - # RPC-specific configuration for `create_span` - # @return [::Gapic::Config::Method] - # - attr_reader :create_span - - # @private - def initialize parent_rpcs = nil - batch_write_spans_config = parent_rpcs.batch_write_spans if parent_rpcs.respond_to? :batch_write_spans - @batch_write_spans = ::Gapic::Config::Method.new batch_write_spans_config - create_span_config = parent_rpcs.create_span if parent_rpcs.respond_to? :create_span - @create_span = ::Gapic::Config::Method.new create_span_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/credentials.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/credentials.rb deleted file mode 100644 index db91afb17b6c..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/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 Trace - module V2 - module TraceService - # Credentials for the TraceService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/trace.append" - ] - self.env_vars = [ - "TRACE_CREDENTIALS", - "TRACE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "TRACE_CREDENTIALS_JSON", - "TRACE_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-trace-v2/lib/google/cloud/trace/v2/trace_service/paths.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/paths.rb deleted file mode 100644 index 25d2b38e26ac..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/paths.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Trace - module V2 - module TraceService - # Path helper methods for the TraceService API. - module Paths - ## - # 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 Span resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/traces/{trace}/spans/{span}` - # - # @param project [String] - # @param trace [String] - # @param span [String] - # - # @return [::String] - def span_path project:, trace:, span: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "trace cannot contain /" if trace.to_s.include? "/" - - "projects/#{project}/traces/#{trace}/spans/#{span}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/rest.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/rest.rb deleted file mode 100644 index 0f21f9aa2181..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/rest.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/trace/v2/version" - -require "google/cloud/trace/v2/trace_service/credentials" -require "google/cloud/trace/v2/trace_service/paths" -require "google/cloud/trace/v2/trace_service/rest/client" - -module Google - module Cloud - module Trace - module V2 - ## - # Service for collecting and viewing traces and spans within a trace. - # - # A trace is a collection of spans corresponding to a single - # operation or a set of operations in an application. - # - # A span is an individual timed event which forms a node of the trace tree. - # A single trace can contain spans from multiple services. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/trace/v2/trace_service/rest" - # client = ::Google::Cloud::Trace::V2::TraceService::Rest::Client.new - # - module TraceService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/trace/v2/trace_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/rest/client.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/rest/client.rb deleted file mode 100644 index a96278916b0a..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/rest/client.rb +++ /dev/null @@ -1,586 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/devtools/cloudtrace/v2/tracing_pb" -require "google/cloud/trace/v2/trace_service/rest/service_stub" - -module Google - module Cloud - module Trace - module V2 - module TraceService - module Rest - ## - # REST client for the TraceService service. - # - # Service for collecting and viewing traces and spans within a trace. - # - # A trace is a collection of spans corresponding to a single - # operation or a set of operations in an application. - # - # A span is an individual timed event which forms a node of the trace tree. - # A single trace can contain spans from multiple services. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudtrace.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :trace_service_stub - - ## - # Configure the TraceService Client class. - # - # See {::Google::Cloud::Trace::V2::TraceService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TraceService clients - # ::Google::Cloud::Trace::V2::TraceService::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", "Trace", "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.rpcs.batch_write_spans.timeout = 120.0 - default_config.rpcs.batch_write_spans.retry_policy = { - initial_delay: 0.1, max_delay: 30.0, multiplier: 2, retry_codes: [14, 4] - } - - default_config.rpcs.create_span.timeout = 120.0 - default_config.rpcs.create_span.retry_policy = { - initial_delay: 0.1, max_delay: 1.0, multiplier: 1.2, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TraceService 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::Trace::V2::TraceService::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 - @trace_service_stub.universe_domain - end - - ## - # Create a new TraceService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Trace::V2::TraceService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Trace::V2::TraceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TraceService 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 - - @trace_service_stub = ::Google::Cloud::Trace::V2::TraceService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @trace_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 - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @trace_service_stub.logger - end - - # Service calls - - ## - # Batch writes new spans to new or existing traces. You cannot update - # existing spans. - # - # @overload batch_write_spans(request, options = nil) - # Pass arguments to `batch_write_spans` via a request object, either of type - # {::Google::Cloud::Trace::V2::BatchWriteSpansRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Trace::V2::BatchWriteSpansRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_spans(name: nil, spans: nil) - # Pass arguments to `batch_write_spans` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 project where the spans belong. The format is - # `projects/[PROJECT_ID]`. - # @param spans [::Array<::Google::Cloud::Trace::V2::Span, ::Hash>] - # Required. A list of new spans. The span names must not match existing - # spans, otherwise the results are undefined. - # @yield [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/trace/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Trace::V2::TraceService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Trace::V2::BatchWriteSpansRequest.new - # - # # Call the batch_write_spans method. - # result = client.batch_write_spans request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def batch_write_spans request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Trace::V2::BatchWriteSpansRequest - - # Converts hash and nil to an 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_spans.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Trace::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.batch_write_spans.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_write_spans.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trace_service_stub.batch_write_spans request, 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 span. - # - # @overload create_span(request, options = nil) - # Pass arguments to `create_span` via a request object, either of type - # {::Google::Cloud::Trace::V2::Span} or an equivalent Hash. - # - # @param request [::Google::Cloud::Trace::V2::Span, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_span(name: nil, span_id: nil, parent_span_id: nil, display_name: nil, start_time: nil, end_time: nil, attributes: nil, stack_trace: nil, time_events: nil, links: nil, status: nil, same_process_as_parent_span: nil, child_span_count: nil, span_kind: nil) - # Pass arguments to `create_span` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the span in the following format: - # - # * `projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]` - # - # `[TRACE_ID]` is a unique identifier for a trace within a project; - # it is a 32-character hexadecimal encoding of a 16-byte array. It should - # not be zero. - # - # `[SPAN_ID]` is a unique identifier for a span within a trace; it - # is a 16-character hexadecimal encoding of an 8-byte array. It should not - # be zero. - # . - # @param span_id [::String] - # Required. The `[SPAN_ID]` portion of the span's resource name. - # @param parent_span_id [::String] - # The `[SPAN_ID]` of this span's parent span. If this is a root span, - # then this field must be empty. - # @param display_name [::Google::Cloud::Trace::V2::TruncatableString, ::Hash] - # Required. A description of the span's operation (up to 128 bytes). - # Cloud Trace displays the description in the - # Cloud console. - # For example, the display name can be a qualified method name or a file name - # and a line number where the operation is called. A best practice is to use - # the same display name within an application and at the same call point. - # This makes it easier to correlate spans in different traces. - # @param start_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. The start time of the span. On the client side, this is the time - # kept by the local machine where the span execution starts. On the server - # side, this is the time when the server's application handler starts - # running. - # @param end_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. The end time of the span. On the client side, this is the time - # kept by the local machine where the span execution ends. On the server - # side, this is the time when the server application handler stops running. - # @param attributes [::Google::Cloud::Trace::V2::Span::Attributes, ::Hash] - # A set of attributes on the span. You can have up to 32 attributes per - # span. - # @param stack_trace [::Google::Cloud::Trace::V2::StackTrace, ::Hash] - # Stack trace captured at the start of the span. - # @param time_events [::Google::Cloud::Trace::V2::Span::TimeEvents, ::Hash] - # A set of time events. You can have up to 32 annotations and 128 message - # events per span. - # @param links [::Google::Cloud::Trace::V2::Span::Links, ::Hash] - # Links associated with the span. You can have up to 128 links per Span. - # @param status [::Google::Rpc::Status, ::Hash] - # Optional. The final status for this span. - # @param same_process_as_parent_span [::Google::Protobuf::BoolValue, ::Hash] - # Optional. Set this parameter to indicate whether this span is in - # the same process as its parent. If you do not set this parameter, - # Trace is unable to take advantage of this helpful information. - # @param child_span_count [::Google::Protobuf::Int32Value, ::Hash] - # Optional. The number of child spans that were generated while this span - # was active. If set, allows implementation to detect missing child spans. - # @param span_kind [::Google::Cloud::Trace::V2::Span::SpanKind] - # Optional. Distinguishes between spans generated in a particular context. - # For example, two spans with the same name may be distinguished using - # `CLIENT` (caller) and `SERVER` (callee) to identify an RPC call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Trace::V2::Span] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Trace::V2::Span] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/trace/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Trace::V2::TraceService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Trace::V2::Span.new - # - # # Call the create_span method. - # result = client.create_span request - # - # # The returned object is of type Google::Cloud::Trace::V2::Span. - # p result - # - def create_span request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Trace::V2::Span - - # Converts hash and nil to an 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_span.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Trace::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_span.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_span.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @trace_service_stub.create_span request, 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 TraceService REST API. - # - # This class represents the configuration for TraceService 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::Trace::V2::TraceService::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 - # # batch_write_spans to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Trace::V2::TraceService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.batch_write_spans.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Trace::V2::TraceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.batch_write_spans.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 = "cloudtrace.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 TraceService 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 `batch_write_spans` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_write_spans - ## - # RPC-specific configuration for `create_span` - # @return [::Gapic::Config::Method] - # - attr_reader :create_span - - # @private - def initialize parent_rpcs = nil - batch_write_spans_config = parent_rpcs.batch_write_spans if parent_rpcs.respond_to? :batch_write_spans - @batch_write_spans = ::Gapic::Config::Method.new batch_write_spans_config - create_span_config = parent_rpcs.create_span if parent_rpcs.respond_to? :create_span - @create_span = ::Gapic::Config::Method.new create_span_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/rest/service_stub.rb deleted file mode 100644 index bd1feae3a232..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/trace_service/rest/service_stub.rb +++ /dev/null @@ -1,205 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/devtools/cloudtrace/v2/tracing_pb" - -module Google - module Cloud - module Trace - module V2 - module TraceService - module Rest - ## - # REST service stub for the TraceService 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 batch_write_spans REST call - # - # @param request_pb [::Google::Cloud::Trace::V2::BatchWriteSpansRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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 batch_write_spans request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_write_spans_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_spans", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_span REST call - # - # @param request_pb [::Google::Cloud::Trace::V2::Span] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Trace::V2::Span] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Trace::V2::Span] - # A result object deserialized from the server's reply - def create_span request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_span_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_span", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Trace::V2::Span.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 batch_write_spans REST call - # - # @param request_pb [::Google::Cloud::Trace::V2::BatchWriteSpansRequest] - # 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_spans_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}/traces:batchWrite", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_span REST call - # - # @param request_pb [::Google::Cloud::Trace::V2::Span] - # 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_span_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/traces/[^/]+/spans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/version.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/v2/version.rb deleted file mode 100644 index d2142daddb36..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/lib/google/cloud/trace/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 Trace - module V2 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google/devtools/cloudtrace/v2/trace_pb.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/devtools/cloudtrace/v2/trace_pb.rb deleted file mode 100644 index f7c5cc2b9fdf..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/lib/google/devtools/cloudtrace/v2/trace_pb.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/cloudtrace/v2/trace.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n)google/devtools/cloudtrace/v2/trace.proto\x12\x1dgoogle.devtools.cloudtrace.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"\xf1\x11\n\x04Span\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07span_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x0eparent_span_id\x18\x03 \x01(\t\x12K\n\x0c\x64isplay_name\x18\x04 \x01(\x0b\x32\x30.google.devtools.cloudtrace.v2.TruncatableStringB\x03\xe0\x41\x02\x12\x33\n\nstart_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x31\n\x08\x65nd_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x42\n\nattributes\x18\x07 \x01(\x0b\x32..google.devtools.cloudtrace.v2.Span.Attributes\x12>\n\x0bstack_trace\x18\x08 \x01(\x0b\x32).google.devtools.cloudtrace.v2.StackTrace\x12\x43\n\x0btime_events\x18\t \x01(\x0b\x32..google.devtools.cloudtrace.v2.Span.TimeEvents\x12\x38\n\x05links\x18\n \x01(\x0b\x32).google.devtools.cloudtrace.v2.Span.Links\x12\'\n\x06status\x18\x0b \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x01\x12\x44\n\x1bsame_process_as_parent_span\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x01\x12:\n\x10\x63hild_span_count\x18\r \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x01\x12\x44\n\tspan_kind\x18\x0e \x01(\x0e\x32,.google.devtools.cloudtrace.v2.Span.SpanKindB\x03\xe0\x41\x01\x1a\xeb\x01\n\nAttributes\x12W\n\rattribute_map\x18\x01 \x03(\x0b\x32@.google.devtools.cloudtrace.v2.Span.Attributes.AttributeMapEntry\x12 \n\x18\x64ropped_attributes_count\x18\x02 \x01(\x05\x1a\x62\n\x11\x41ttributeMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12<\n\x05value\x18\x02 \x01(\x0b\x32-.google.devtools.cloudtrace.v2.AttributeValue:\x02\x38\x01\x1a\xdf\x04\n\tTimeEvent\x12(\n\x04time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12N\n\nannotation\x18\x02 \x01(\x0b\x32\x38.google.devtools.cloudtrace.v2.Span.TimeEvent.AnnotationH\x00\x12S\n\rmessage_event\x18\x03 \x01(\x0b\x32:.google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEventH\x00\x1a\x97\x01\n\nAnnotation\x12\x45\n\x0b\x64\x65scription\x18\x01 \x01(\x0b\x32\x30.google.devtools.cloudtrace.v2.TruncatableString\x12\x42\n\nattributes\x18\x02 \x01(\x0b\x32..google.devtools.cloudtrace.v2.Span.Attributes\x1a\xdf\x01\n\x0cMessageEvent\x12M\n\x04type\x18\x01 \x01(\x0e\x32?.google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent.Type\x12\n\n\x02id\x18\x02 \x01(\x03\x12\x1f\n\x17uncompressed_size_bytes\x18\x03 \x01(\x03\x12\x1d\n\x15\x63ompressed_size_bytes\x18\x04 \x01(\x03\"4\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04SENT\x10\x01\x12\x0c\n\x08RECEIVED\x10\x02\x42\x07\n\x05value\x1a\x98\x01\n\nTimeEvents\x12\x41\n\ntime_event\x18\x01 \x03(\x0b\x32-.google.devtools.cloudtrace.v2.Span.TimeEvent\x12!\n\x19\x64ropped_annotations_count\x18\x02 \x01(\x05\x12$\n\x1c\x64ropped_message_events_count\x18\x03 \x01(\x05\x1a\xf7\x01\n\x04Link\x12\x10\n\x08trace_id\x18\x01 \x01(\t\x12\x0f\n\x07span_id\x18\x02 \x01(\t\x12;\n\x04type\x18\x03 \x01(\x0e\x32-.google.devtools.cloudtrace.v2.Span.Link.Type\x12\x42\n\nattributes\x18\x04 \x01(\x0b\x32..google.devtools.cloudtrace.v2.Span.Attributes\"K\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x43HILD_LINKED_SPAN\x10\x01\x12\x16\n\x12PARENT_LINKED_SPAN\x10\x02\x1a\\\n\x05Links\x12\x36\n\x04link\x18\x01 \x03(\x0b\x32(.google.devtools.cloudtrace.v2.Span.Link\x12\x1b\n\x13\x64ropped_links_count\x18\x02 \x01(\x05\"g\n\x08SpanKind\x12\x19\n\x15SPAN_KIND_UNSPECIFIED\x10\x00\x12\x0c\n\x08INTERNAL\x10\x01\x12\n\n\x06SERVER\x10\x02\x12\n\n\x06\x43LIENT\x10\x03\x12\x0c\n\x08PRODUCER\x10\x04\x12\x0c\n\x08\x43ONSUMER\x10\x05:S\xea\x41P\n\x1e\x63loudtrace.googleapis.com/Span\x12.projects/{project}/traces/{trace}/spans/{span}\"\x8e\x01\n\x0e\x41ttributeValue\x12H\n\x0cstring_value\x18\x01 \x01(\x0b\x32\x30.google.devtools.cloudtrace.v2.TruncatableStringH\x00\x12\x13\n\tint_value\x18\x02 \x01(\x03H\x00\x12\x14\n\nbool_value\x18\x03 \x01(\x08H\x00\x42\x07\n\x05value\"\x89\x05\n\nStackTrace\x12K\n\x0cstack_frames\x18\x01 \x01(\x0b\x32\x35.google.devtools.cloudtrace.v2.StackTrace.StackFrames\x12\x1b\n\x13stack_trace_hash_id\x18\x02 \x01(\x03\x1a\x9e\x03\n\nStackFrame\x12G\n\rfunction_name\x18\x01 \x01(\x0b\x32\x30.google.devtools.cloudtrace.v2.TruncatableString\x12P\n\x16original_function_name\x18\x02 \x01(\x0b\x32\x30.google.devtools.cloudtrace.v2.TruncatableString\x12\x43\n\tfile_name\x18\x03 \x01(\x0b\x32\x30.google.devtools.cloudtrace.v2.TruncatableString\x12\x13\n\x0bline_number\x18\x04 \x01(\x03\x12\x15\n\rcolumn_number\x18\x05 \x01(\x03\x12:\n\x0bload_module\x18\x06 \x01(\x0b\x32%.google.devtools.cloudtrace.v2.Module\x12H\n\x0esource_version\x18\x07 \x01(\x0b\x32\x30.google.devtools.cloudtrace.v2.TruncatableString\x1ap\n\x0bStackFrames\x12\x43\n\x05\x66rame\x18\x01 \x03(\x0b\x32\x34.google.devtools.cloudtrace.v2.StackTrace.StackFrame\x12\x1c\n\x14\x64ropped_frames_count\x18\x02 \x01(\x05\"\x8e\x01\n\x06Module\x12@\n\x06module\x18\x01 \x01(\x0b\x32\x30.google.devtools.cloudtrace.v2.TruncatableString\x12\x42\n\x08\x62uild_id\x18\x02 \x01(\x0b\x32\x30.google.devtools.cloudtrace.v2.TruncatableString\"@\n\x11TruncatableString\x12\r\n\x05value\x18\x01 \x01(\t\x12\x1c\n\x14truncated_byte_count\x18\x02 \x01(\x05\x42\xad\x01\n!com.google.devtools.cloudtrace.v2B\nTraceProtoP\x01Z/cloud.google.com/go/trace/apiv2/tracepb;tracepb\xaa\x02\x15Google.Cloud.Trace.V2\xca\x02\x15Google\\Cloud\\Trace\\V2\xea\x02\x18Google::Cloud::Trace::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Trace - module V2 - Span = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.Span").msgclass - Span::Attributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.Span.Attributes").msgclass - Span::TimeEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.Span.TimeEvent").msgclass - Span::TimeEvent::Annotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation").msgclass - Span::TimeEvent::MessageEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent").msgclass - Span::TimeEvent::MessageEvent::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent.Type").enummodule - Span::TimeEvents = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.Span.TimeEvents").msgclass - Span::Link = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.Span.Link").msgclass - Span::Link::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.Span.Link.Type").enummodule - Span::Links = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.Span.Links").msgclass - Span::SpanKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.Span.SpanKind").enummodule - AttributeValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.AttributeValue").msgclass - StackTrace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.StackTrace").msgclass - StackTrace::StackFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.StackTrace.StackFrame").msgclass - StackTrace::StackFrames = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.StackTrace.StackFrames").msgclass - Module = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.Module").msgclass - TruncatableString = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.TruncatableString").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google/devtools/cloudtrace/v2/tracing_pb.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/devtools/cloudtrace/v2/tracing_pb.rb deleted file mode 100644 index 5358c8dce77e..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/lib/google/devtools/cloudtrace/v2/tracing_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/cloudtrace/v2/tracing.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/devtools/cloudtrace/v2/trace_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n+google/devtools/cloudtrace/v2/tracing.proto\x12\x1dgoogle.devtools.cloudtrace.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a)google/devtools/cloudtrace/v2/trace.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x94\x01\n\x16\x42\x61tchWriteSpansRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x37\n\x05spans\x18\x02 \x03(\x0b\x32#.google.devtools.cloudtrace.v2.SpanB\x03\xe0\x41\x02\x32\xba\x03\n\x0cTraceService\x12\xa1\x01\n\x0f\x42\x61tchWriteSpans\x12\x35.google.devtools.cloudtrace.v2.BatchWriteSpansRequest\x1a\x16.google.protobuf.Empty\"?\xda\x41\nname,spans\x82\xd3\xe4\x93\x02,\"\'/v2/{name=projects/*}/traces:batchWrite:\x01*\x12\x89\x01\n\nCreateSpan\x12#.google.devtools.cloudtrace.v2.Span\x1a#.google.devtools.cloudtrace.v2.Span\"1\x82\xd3\xe4\x93\x02+\"&/v2/{name=projects/*/traces/*/spans/*}:\x01*\x1az\xca\x41\x19\x63loudtrace.googleapis.com\xd2\x41[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/trace.appendB\xaf\x01\n!com.google.devtools.cloudtrace.v2B\x0cTracingProtoP\x01Z/cloud.google.com/go/trace/apiv2/tracepb;tracepb\xaa\x02\x15Google.Cloud.Trace.V2\xca\x02\x15Google\\Cloud\\Trace\\V2\xea\x02\x18Google::Cloud::Trace::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Trace - module V2 - BatchWriteSpansRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudtrace.v2.BatchWriteSpansRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-trace-v2/lib/google/devtools/cloudtrace/v2/tracing_services_pb.rb b/owl-bot-staging/google-cloud-trace-v2/lib/google/devtools/cloudtrace/v2/tracing_services_pb.rb deleted file mode 100644 index a6ad28a02fee..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/lib/google/devtools/cloudtrace/v2/tracing_services_pb.rb +++ /dev/null @@ -1,54 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/devtools/cloudtrace/v2/tracing.proto for package 'Google.Cloud.Trace.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/devtools/cloudtrace/v2/tracing_pb' - -module Google - module Cloud - module Trace - module V2 - module TraceService - # Service for collecting and viewing traces and spans within a trace. - # - # A trace is a collection of spans corresponding to a single - # operation or a set of operations in an application. - # - # A span is an individual timed event which forms a node of the trace tree. - # A single trace can contain spans from multiple services. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.devtools.cloudtrace.v2.TraceService' - - # Batch writes new spans to new or existing traces. You cannot update - # existing spans. - rpc :BatchWriteSpans, ::Google::Cloud::Trace::V2::BatchWriteSpansRequest, ::Google::Protobuf::Empty - # Creates a new span. - rpc :CreateSpan, ::Google::Cloud::Trace::V2::Span, ::Google::Cloud::Trace::V2::Span - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-trace-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-trace-v2/proto_docs/README.md deleted file mode 100644 index bcb9d2cdc0ae..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Trace 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-trace-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # 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. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - # - # Example: - # - # 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 - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # 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 - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # 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 - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-trace-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-trace-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-trace-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-trace-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-trace-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-trace-v2/proto_docs/google/devtools/cloudtrace/v2/trace.rb b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/devtools/cloudtrace/v2/trace.rb deleted file mode 100644 index 040d6c9b24da..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/devtools/cloudtrace/v2/trace.rb +++ /dev/null @@ -1,427 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Trace - module V2 - # A span represents a single operation within a trace. Spans can be - # nested to form a trace tree. Often, a trace contains a root span - # that describes the end-to-end latency, and one or more subspans for - # its sub-operations. - # - # A trace can also contain multiple root spans, or none at all. - # Spans do not need to be contiguous. There might be - # gaps or overlaps between spans in a trace. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the span in the following format: - # - # * `projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]` - # - # `[TRACE_ID]` is a unique identifier for a trace within a project; - # it is a 32-character hexadecimal encoding of a 16-byte array. It should - # not be zero. - # - # `[SPAN_ID]` is a unique identifier for a span within a trace; it - # is a 16-character hexadecimal encoding of an 8-byte array. It should not - # be zero. - # . - # @!attribute [rw] span_id - # @return [::String] - # Required. The `[SPAN_ID]` portion of the span's resource name. - # @!attribute [rw] parent_span_id - # @return [::String] - # The `[SPAN_ID]` of this span's parent span. If this is a root span, - # then this field must be empty. - # @!attribute [rw] display_name - # @return [::Google::Cloud::Trace::V2::TruncatableString] - # Required. A description of the span's operation (up to 128 bytes). - # Cloud Trace displays the description in the - # Cloud console. - # For example, the display name can be a qualified method name or a file name - # and a line number where the operation is called. A best practice is to use - # the same display name within an application and at the same call point. - # This makes it easier to correlate spans in different traces. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Required. The start time of the span. On the client side, this is the time - # kept by the local machine where the span execution starts. On the server - # side, this is the time when the server's application handler starts - # running. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Required. The end time of the span. On the client side, this is the time - # kept by the local machine where the span execution ends. On the server - # side, this is the time when the server application handler stops running. - # @!attribute [rw] attributes - # @return [::Google::Cloud::Trace::V2::Span::Attributes] - # A set of attributes on the span. You can have up to 32 attributes per - # span. - # @!attribute [rw] stack_trace - # @return [::Google::Cloud::Trace::V2::StackTrace] - # Stack trace captured at the start of the span. - # @!attribute [rw] time_events - # @return [::Google::Cloud::Trace::V2::Span::TimeEvents] - # A set of time events. You can have up to 32 annotations and 128 message - # events per span. - # @!attribute [rw] links - # @return [::Google::Cloud::Trace::V2::Span::Links] - # Links associated with the span. You can have up to 128 links per Span. - # @!attribute [rw] status - # @return [::Google::Rpc::Status] - # Optional. The final status for this span. - # @!attribute [rw] same_process_as_parent_span - # @return [::Google::Protobuf::BoolValue] - # Optional. Set this parameter to indicate whether this span is in - # the same process as its parent. If you do not set this parameter, - # Trace is unable to take advantage of this helpful information. - # @!attribute [rw] child_span_count - # @return [::Google::Protobuf::Int32Value] - # Optional. The number of child spans that were generated while this span - # was active. If set, allows implementation to detect missing child spans. - # @!attribute [rw] span_kind - # @return [::Google::Cloud::Trace::V2::Span::SpanKind] - # Optional. Distinguishes between spans generated in a particular context. - # For example, two spans with the same name may be distinguished using - # `CLIENT` (caller) and `SERVER` (callee) to identify an RPC call. - class Span - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A set of attributes as key-value pairs. - # @!attribute [rw] attribute_map - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Trace::V2::AttributeValue}] - # A set of attributes. Each attribute's key can be up to 128 bytes - # long. The value can be a string up to 256 bytes, a signed 64-bit integer, - # or the boolean values `true` or `false`. For example: - # - # "/instance_id": { "string_value": { "value": "my-instance" } } - # "/http/request_bytes": { "int_value": 300 } - # "abc.com/myattribute": { "bool_value": false } - # @!attribute [rw] dropped_attributes_count - # @return [::Integer] - # The number of attributes that were discarded. Attributes can be discarded - # because their keys are too long or because there are too many attributes. - # If this value is 0 then all attributes are valid. - class Attributes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Trace::V2::AttributeValue] - class AttributeMapEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A time-stamped annotation or message event in the Span. - # @!attribute [rw] time - # @return [::Google::Protobuf::Timestamp] - # The timestamp indicating the time the event occurred. - # @!attribute [rw] annotation - # @return [::Google::Cloud::Trace::V2::Span::TimeEvent::Annotation] - # Text annotation with a set of attributes. - # - # Note: The following fields are mutually exclusive: `annotation`, `message_event`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] message_event - # @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent] - # An event describing a message sent/received between Spans. - # - # Note: The following fields are mutually exclusive: `message_event`, `annotation`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class TimeEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Text annotation with a set of attributes. - # @!attribute [rw] description - # @return [::Google::Cloud::Trace::V2::TruncatableString] - # A user-supplied message describing the event. The maximum length for - # the description is 256 bytes. - # @!attribute [rw] attributes - # @return [::Google::Cloud::Trace::V2::Span::Attributes] - # A set of attributes on the annotation. You can have up to 4 attributes - # per Annotation. - class Annotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An event describing a message sent/received between Spans. - # @!attribute [rw] type - # @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent::Type] - # Type of MessageEvent. Indicates whether the message was sent or - # received. - # @!attribute [rw] id - # @return [::Integer] - # An identifier for the MessageEvent's message that can be used to match - # `SENT` and `RECEIVED` MessageEvents. - # @!attribute [rw] uncompressed_size_bytes - # @return [::Integer] - # The number of uncompressed bytes sent or received. - # @!attribute [rw] compressed_size_bytes - # @return [::Integer] - # The number of compressed bytes sent or received. If missing, the - # compressed size is assumed to be the same size as the uncompressed - # size. - class MessageEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Indicates whether the message was sent or received. - module Type - # Unknown event type. - TYPE_UNSPECIFIED = 0 - - # Indicates a sent message. - SENT = 1 - - # Indicates a received message. - RECEIVED = 2 - end - end - end - - # A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation - # on the span, consisting of either user-supplied key:value pairs, or - # details of a message sent/received between Spans. - # @!attribute [rw] time_event - # @return [::Array<::Google::Cloud::Trace::V2::Span::TimeEvent>] - # A collection of `TimeEvent`s. - # @!attribute [rw] dropped_annotations_count - # @return [::Integer] - # The number of dropped annotations in all the included time events. - # If the value is 0, then no annotations were dropped. - # @!attribute [rw] dropped_message_events_count - # @return [::Integer] - # The number of dropped message events in all the included time events. - # If the value is 0, then no message events were dropped. - class TimeEvents - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A pointer from the current span to another span in the same trace or in a - # different trace. For example, this can be used in batching operations, - # where a single batch handler processes multiple requests from different - # traces or when the handler receives a request from a different project. - # @!attribute [rw] trace_id - # @return [::String] - # The `[TRACE_ID]` for a trace within a project. - # @!attribute [rw] span_id - # @return [::String] - # The `[SPAN_ID]` for a span within a trace. - # @!attribute [rw] type - # @return [::Google::Cloud::Trace::V2::Span::Link::Type] - # The relationship of the current span relative to the linked span. - # @!attribute [rw] attributes - # @return [::Google::Cloud::Trace::V2::Span::Attributes] - # A set of attributes on the link. Up to 32 attributes can be - # specified per link. - class Link - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The relationship of the current span relative to the linked span: child, - # parent, or unspecified. - module Type - # The relationship of the two spans is unknown. - TYPE_UNSPECIFIED = 0 - - # The linked span is a child of the current span. - CHILD_LINKED_SPAN = 1 - - # The linked span is a parent of the current span. - PARENT_LINKED_SPAN = 2 - end - end - - # A collection of links, which are references from this span to a span - # in the same or different trace. - # @!attribute [rw] link - # @return [::Array<::Google::Cloud::Trace::V2::Span::Link>] - # A collection of links. - # @!attribute [rw] dropped_links_count - # @return [::Integer] - # The number of dropped links after the maximum size was enforced. If - # this value is 0, then no links were dropped. - class Links - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Type of span. Can be used to specify additional relationships between spans - # in addition to a parent/child relationship. - module SpanKind - # Unspecified. Do NOT use as default. - # Implementations MAY assume SpanKind.INTERNAL to be default. - SPAN_KIND_UNSPECIFIED = 0 - - # Indicates that the span is used internally. Default value. - INTERNAL = 1 - - # Indicates that the span covers server-side handling of an RPC or other - # remote network request. - SERVER = 2 - - # Indicates that the span covers the client-side wrapper around an RPC or - # other remote request. - CLIENT = 3 - - # Indicates that the span describes producer sending a message to a broker. - # Unlike client and server, there is no direct critical path latency - # relationship between producer and consumer spans (e.g. publishing a - # message to a pubsub service). - PRODUCER = 4 - - # Indicates that the span describes consumer receiving a message from a - # broker. Unlike client and server, there is no direct critical path - # latency relationship between producer and consumer spans (e.g. receiving - # a message from a pubsub service subscription). - CONSUMER = 5 - end - end - - # The allowed types for `[VALUE]` in a `[KEY]:[VALUE]` attribute. - # @!attribute [rw] string_value - # @return [::Google::Cloud::Trace::V2::TruncatableString] - # A string up to 256 bytes long. - # - # Note: The following fields are mutually exclusive: `string_value`, `int_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] int_value - # @return [::Integer] - # A 64-bit signed integer. - # - # Note: The following fields are mutually exclusive: `int_value`, `string_value`, `bool_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] - # A Boolean value represented by `true` or `false`. - # - # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `int_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class AttributeValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A call stack appearing in a trace. - # @!attribute [rw] stack_frames - # @return [::Google::Cloud::Trace::V2::StackTrace::StackFrames] - # Stack frames in this stack trace. A maximum of 128 frames are allowed. - # @!attribute [rw] stack_trace_hash_id - # @return [::Integer] - # The hash ID is used to conserve network bandwidth for duplicate - # stack traces within a single trace. - # - # Often multiple spans will have identical stack traces. - # The first occurrence of a stack trace should contain both the - # `stackFrame` content and a value in `stackTraceHashId`. - # - # Subsequent spans within the same request can refer - # to that stack trace by only setting `stackTraceHashId`. - class StackTrace - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents a single stack frame in a stack trace. - # @!attribute [rw] function_name - # @return [::Google::Cloud::Trace::V2::TruncatableString] - # The fully-qualified name that uniquely identifies the function or - # method that is active in this frame (up to 1024 bytes). - # @!attribute [rw] original_function_name - # @return [::Google::Cloud::Trace::V2::TruncatableString] - # An un-mangled function name, if `function_name` is mangled. - # To get information about name mangling, run - # [this search](https://www.google.com/search?q=cxx+name+mangling). - # The name can be fully-qualified (up to 1024 bytes). - # @!attribute [rw] file_name - # @return [::Google::Cloud::Trace::V2::TruncatableString] - # The name of the source file where the function call appears (up to 256 - # bytes). - # @!attribute [rw] line_number - # @return [::Integer] - # The line number in `file_name` where the function call appears. - # @!attribute [rw] column_number - # @return [::Integer] - # The column number where the function call appears, if available. - # This is important in JavaScript because of its anonymous functions. - # @!attribute [rw] load_module - # @return [::Google::Cloud::Trace::V2::Module] - # The binary module from where the code was loaded. - # @!attribute [rw] source_version - # @return [::Google::Cloud::Trace::V2::TruncatableString] - # The version of the deployed source code (up to 128 bytes). - class StackFrame - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A collection of stack frames, which can be truncated. - # @!attribute [rw] frame - # @return [::Array<::Google::Cloud::Trace::V2::StackTrace::StackFrame>] - # Stack frames in this call stack. - # @!attribute [rw] dropped_frames_count - # @return [::Integer] - # The number of stack frames that were dropped because there - # were too many stack frames. - # If this value is 0, then no stack frames were dropped. - class StackFrames - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Binary module. - # @!attribute [rw] module - # @return [::Google::Cloud::Trace::V2::TruncatableString] - # For example: main binary, kernel modules, and dynamic libraries - # such as libc.so, sharedlib.so (up to 256 bytes). - # @!attribute [rw] build_id - # @return [::Google::Cloud::Trace::V2::TruncatableString] - # A unique identifier for the module, usually a hash of its - # contents (up to 128 bytes). - class Module - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a string that might be shortened to a specified length. - # @!attribute [rw] value - # @return [::String] - # The shortened string. For example, if the original string is 500 - # bytes long and the limit of the string is 128 bytes, then - # `value` contains the first 128 bytes of the 500-byte string. - # - # Truncation always happens on a UTF8 character boundary. If there - # are multi-byte characters in the string, then the length of the - # shortened string might be less than the size limit. - # @!attribute [rw] truncated_byte_count - # @return [::Integer] - # The number of bytes removed from the original string. If this - # value is 0, then the string was not shortened. - class TruncatableString - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/devtools/cloudtrace/v2/tracing.rb b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/devtools/cloudtrace/v2/tracing.rb deleted file mode 100644 index cd7bfb705d2f..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/devtools/cloudtrace/v2/tracing.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Trace - module V2 - # The request message for the `BatchWriteSpans` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the project where the spans belong. The format is - # `projects/[PROJECT_ID]`. - # @!attribute [rw] spans - # @return [::Array<::Google::Cloud::Trace::V2::Span>] - # Required. A list of new spans. The span names must not match existing - # spans, otherwise the results are undefined. - class BatchWriteSpansRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-trace-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-trace-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-trace-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-trace-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-trace-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-trace-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-trace-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-trace-v2/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,148 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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`. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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-trace-v2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-trace-v2/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-trace-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-trace-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-trace-v2/snippets/Gemfile deleted file mode 100644 index d4b193b35cd6..000000000000 --- a/owl-bot-staging/google-cloud-trace-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-trace-v2", path: "../" -else - gem "google-cloud-trace-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-trace-v2/snippets/snippet_metadata_google.devtools.cloudtrace.v2.json b/owl-bot-staging/google-cloud-trace-v2/snippets/snippet_metadata_google.devtools.cloudtrace.v2.json deleted file mode 100644 index 3f9f5b451203..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/snippets/snippet_metadata_google.devtools.cloudtrace.v2.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-trace-v2", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.devtools.cloudtrace.v2", - "version": "v2" - } - ] - }, - "snippets": [ - { - "region_tag": "cloudtrace_v2_generated_TraceService_BatchWriteSpans_sync", - "title": "Snippet for the batch_write_spans call in the TraceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Trace::V2::TraceService::Client#batch_write_spans.", - "file": "trace_service/batch_write_spans.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_write_spans", - "full_name": "::Google::Cloud::Trace::V2::TraceService::Client#batch_write_spans", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Trace::V2::BatchWriteSpansRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "TraceService::Client", - "full_name": "::Google::Cloud::Trace::V2::TraceService::Client" - }, - "method": { - "short_name": "BatchWriteSpans", - "full_name": "google.devtools.cloudtrace.v2.TraceService.BatchWriteSpans", - "service": { - "short_name": "TraceService", - "full_name": "google.devtools.cloudtrace.v2.TraceService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudtrace_v2_generated_TraceService_CreateSpan_sync", - "title": "Snippet for the create_span call in the TraceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Trace::V2::TraceService::Client#create_span.", - "file": "trace_service/create_span.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_span", - "full_name": "::Google::Cloud::Trace::V2::TraceService::Client#create_span", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Trace::V2::Span", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Trace::V2::Span", - "client": { - "short_name": "TraceService::Client", - "full_name": "::Google::Cloud::Trace::V2::TraceService::Client" - }, - "method": { - "short_name": "CreateSpan", - "full_name": "google.devtools.cloudtrace.v2.TraceService.CreateSpan", - "service": { - "short_name": "TraceService", - "full_name": "google.devtools.cloudtrace.v2.TraceService" - } - } - }, - "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-trace-v2/snippets/trace_service/batch_write_spans.rb b/owl-bot-staging/google-cloud-trace-v2/snippets/trace_service/batch_write_spans.rb deleted file mode 100644 index e643549fe9fa..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/snippets/trace_service/batch_write_spans.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 cloudtrace_v2_generated_TraceService_BatchWriteSpans_sync] -require "google/cloud/trace/v2" - -## -# Snippet for the batch_write_spans call in the TraceService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Trace::V2::TraceService::Client#batch_write_spans. -# -def batch_write_spans - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Trace::V2::TraceService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Trace::V2::BatchWriteSpansRequest.new - - # Call the batch_write_spans method. - result = client.batch_write_spans request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END cloudtrace_v2_generated_TraceService_BatchWriteSpans_sync] diff --git a/owl-bot-staging/google-cloud-trace-v2/snippets/trace_service/create_span.rb b/owl-bot-staging/google-cloud-trace-v2/snippets/trace_service/create_span.rb deleted file mode 100644 index b5360303f20b..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/snippets/trace_service/create_span.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 cloudtrace_v2_generated_TraceService_CreateSpan_sync] -require "google/cloud/trace/v2" - -## -# Snippet for the create_span call in the TraceService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Trace::V2::TraceService::Client#create_span. -# -def create_span - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Trace::V2::TraceService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Trace::V2::Span.new - - # Call the create_span method. - result = client.create_span request - - # The returned object is of type Google::Cloud::Trace::V2::Span. - p result -end -# [END cloudtrace_v2_generated_TraceService_CreateSpan_sync] diff --git a/owl-bot-staging/google-cloud-trace-v2/test/google/cloud/trace/v2/trace_service_paths_test.rb b/owl-bot-staging/google-cloud-trace-v2/test/google/cloud/trace/v2/trace_service_paths_test.rb deleted file mode 100644 index 603da3b3b484..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/test/google/cloud/trace/v2/trace_service_paths_test.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/trace/v2/trace_service" - -class ::Google::Cloud::Trace::V2::TraceService::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_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::Trace::V2::TraceService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end - - def test_span_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Trace::V2::TraceService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.span_path project: "value0", trace: "value1", span: "value2" - assert_equal "projects/value0/traces/value1/spans/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-trace-v2/test/google/cloud/trace/v2/trace_service_rest_test.rb b/owl-bot-staging/google-cloud-trace-v2/test/google/cloud/trace/v2/trace_service_rest_test.rb deleted file mode 100644 index 8660e0c553e2..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/test/google/cloud/trace/v2/trace_service_rest_test.rb +++ /dev/null @@ -1,221 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/devtools/cloudtrace/v2/tracing_pb" -require "google/cloud/trace/v2/trace_service/rest" - - -class ::Google::Cloud::Trace::V2::TraceService::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_batch_write_spans - # 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" - spans = [{}] - - batch_write_spans_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Trace::V2::TraceService::Rest::ServiceStub.stub :transcode_batch_write_spans_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_write_spans_client_stub do - # Create client - client = ::Google::Cloud::Trace::V2::TraceService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.batch_write_spans({ name: name, spans: spans }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.batch_write_spans name: name, spans: spans do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.batch_write_spans ::Google::Cloud::Trace::V2::BatchWriteSpansRequest.new(name: name, spans: spans) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.batch_write_spans({ name: name, spans: spans }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.batch_write_spans(::Google::Cloud::Trace::V2::BatchWriteSpansRequest.new(name: name, spans: spans), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_write_spans_client_stub.call_count - end - end - end - - def test_create_span - # Create test objects. - client_result = ::Google::Cloud::Trace::V2::Span.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - span_id = "hello world" - parent_span_id = "hello world" - display_name = {} - start_time = {} - end_time = {} - attributes = {} - stack_trace = {} - time_events = {} - links = {} - status = {} - same_process_as_parent_span = {} - child_span_count = {} - span_kind = :SPAN_KIND_UNSPECIFIED - - create_span_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Trace::V2::TraceService::Rest::ServiceStub.stub :transcode_create_span_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_span_client_stub do - # Create client - client = ::Google::Cloud::Trace::V2::TraceService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_span({ name: name, span_id: span_id, parent_span_id: parent_span_id, display_name: display_name, start_time: start_time, end_time: end_time, attributes: attributes, stack_trace: stack_trace, time_events: time_events, links: links, status: status, same_process_as_parent_span: same_process_as_parent_span, child_span_count: child_span_count, span_kind: span_kind }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_span name: name, span_id: span_id, parent_span_id: parent_span_id, display_name: display_name, start_time: start_time, end_time: end_time, attributes: attributes, stack_trace: stack_trace, time_events: time_events, links: links, status: status, same_process_as_parent_span: same_process_as_parent_span, child_span_count: child_span_count, span_kind: span_kind do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_span ::Google::Cloud::Trace::V2::Span.new(name: name, span_id: span_id, parent_span_id: parent_span_id, display_name: display_name, start_time: start_time, end_time: end_time, attributes: attributes, stack_trace: stack_trace, time_events: time_events, links: links, status: status, same_process_as_parent_span: same_process_as_parent_span, child_span_count: child_span_count, span_kind: span_kind) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_span({ name: name, span_id: span_id, parent_span_id: parent_span_id, display_name: display_name, start_time: start_time, end_time: end_time, attributes: attributes, stack_trace: stack_trace, time_events: time_events, links: links, status: status, same_process_as_parent_span: same_process_as_parent_span, child_span_count: child_span_count, span_kind: span_kind }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_span(::Google::Cloud::Trace::V2::Span.new(name: name, span_id: span_id, parent_span_id: parent_span_id, display_name: display_name, start_time: start_time, end_time: end_time, attributes: attributes, stack_trace: stack_trace, time_events: time_events, links: links, status: status, same_process_as_parent_span: same_process_as_parent_span, child_span_count: child_span_count, span_kind: span_kind), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_span_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::Trace::V2::TraceService::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::Trace::V2::TraceService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-trace-v2/test/google/cloud/trace/v2/trace_service_test.rb b/owl-bot-staging/google-cloud-trace-v2/test/google/cloud/trace/v2/trace_service_test.rb deleted file mode 100644 index 3e5178e2ec6e..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/test/google/cloud/trace/v2/trace_service_test.rb +++ /dev/null @@ -1,248 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/devtools/cloudtrace/v2/tracing_pb" -require "google/cloud/trace/v2/trace_service" - -class ::Google::Cloud::Trace::V2::TraceService::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_batch_write_spans - # 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" - spans = [{}] - - batch_write_spans_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_write_spans, name - assert_kind_of ::Google::Cloud::Trace::V2::BatchWriteSpansRequest, request - assert_equal "hello world", request["name"] - assert_kind_of ::Google::Cloud::Trace::V2::Span, request["spans"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_write_spans_client_stub do - # Create client - client = ::Google::Cloud::Trace::V2::TraceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_write_spans({ name: name, spans: spans }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.batch_write_spans name: name, spans: spans do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.batch_write_spans ::Google::Cloud::Trace::V2::BatchWriteSpansRequest.new(name: name, spans: spans) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.batch_write_spans({ name: name, spans: spans }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.batch_write_spans(::Google::Cloud::Trace::V2::BatchWriteSpansRequest.new(name: name, spans: spans), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_write_spans_client_stub.call_rpc_count - end - end - - def test_create_span - # Create GRPC objects. - grpc_response = ::Google::Cloud::Trace::V2::Span.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - span_id = "hello world" - parent_span_id = "hello world" - display_name = {} - start_time = {} - end_time = {} - attributes = {} - stack_trace = {} - time_events = {} - links = {} - status = {} - same_process_as_parent_span = {} - child_span_count = {} - span_kind = :SPAN_KIND_UNSPECIFIED - - create_span_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_span, name - assert_kind_of ::Google::Cloud::Trace::V2::Span, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["span_id"] - assert_equal "hello world", request["parent_span_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Trace::V2::TruncatableString), request["display_name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["start_time"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["end_time"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Trace::V2::Span::Attributes), request["attributes"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Trace::V2::StackTrace), request["stack_trace"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Trace::V2::Span::TimeEvents), request["time_events"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Trace::V2::Span::Links), request["links"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Rpc::Status), request["status"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::BoolValue), request["same_process_as_parent_span"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Int32Value), request["child_span_count"] - assert_equal :SPAN_KIND_UNSPECIFIED, request["span_kind"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_span_client_stub do - # Create client - client = ::Google::Cloud::Trace::V2::TraceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_span({ name: name, span_id: span_id, parent_span_id: parent_span_id, display_name: display_name, start_time: start_time, end_time: end_time, attributes: attributes, stack_trace: stack_trace, time_events: time_events, links: links, status: status, same_process_as_parent_span: same_process_as_parent_span, child_span_count: child_span_count, span_kind: span_kind }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_span name: name, span_id: span_id, parent_span_id: parent_span_id, display_name: display_name, start_time: start_time, end_time: end_time, attributes: attributes, stack_trace: stack_trace, time_events: time_events, links: links, status: status, same_process_as_parent_span: same_process_as_parent_span, child_span_count: child_span_count, span_kind: span_kind do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_span ::Google::Cloud::Trace::V2::Span.new(name: name, span_id: span_id, parent_span_id: parent_span_id, display_name: display_name, start_time: start_time, end_time: end_time, attributes: attributes, stack_trace: stack_trace, time_events: time_events, links: links, status: status, same_process_as_parent_span: same_process_as_parent_span, child_span_count: child_span_count, span_kind: span_kind) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_span({ name: name, span_id: span_id, parent_span_id: parent_span_id, display_name: display_name, start_time: start_time, end_time: end_time, attributes: attributes, stack_trace: stack_trace, time_events: time_events, links: links, status: status, same_process_as_parent_span: same_process_as_parent_span, child_span_count: child_span_count, span_kind: span_kind }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_span(::Google::Cloud::Trace::V2::Span.new(name: name, span_id: span_id, parent_span_id: parent_span_id, display_name: display_name, start_time: start_time, end_time: end_time, attributes: attributes, stack_trace: stack_trace, time_events: time_events, links: links, status: status, same_process_as_parent_span: same_process_as_parent_span, child_span_count: child_span_count, span_kind: span_kind), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_span_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::Trace::V2::TraceService::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::Trace::V2::TraceService::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::Trace::V2::TraceService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Trace::V2::TraceService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-trace-v2/test/helper.rb b/owl-bot-staging/google-cloud-trace-v2/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-trace-v2/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-translate-v3/.gitignore b/owl-bot-staging/google-cloud-translate-v3/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/.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-translate-v3/.repo-metadata.json b/owl-bot-staging/google-cloud-translate-v3/.repo-metadata.json deleted file mode 100644 index 550038f3aaea..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "translate.googleapis.com", - "api_shortname": "translate", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-translate-v3/latest", - "distribution_name": "google-cloud-translate-v3", - "is_cloud": true, - "language": "ruby", - "name": "translate", - "name_pretty": "Cloud Translation V3 API", - "product_documentation": "https://cloud.google.com/translate", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Cloud Translation can dynamically translate text between thousands of language pairs. Translation lets websites and programs programmatically integrate with the translation service. Note that google-cloud-translate-v3 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-translate instead. See the readme for more details.", - "ruby-cloud-env-prefix": "TRANSLATE", - "ruby-cloud-product-url": "https://cloud.google.com/translate", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-translate-v3/.rubocop.yml b/owl-bot-staging/google-cloud-translate-v3/.rubocop.yml deleted file mode 100644 index 68b485677107..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-translate-v3.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-translate-v3.rb" diff --git a/owl-bot-staging/google-cloud-translate-v3/.toys.rb b/owl-bot-staging/google-cloud-translate-v3/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/.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-translate-v3/.yardopts b/owl-bot-staging/google-cloud-translate-v3/.yardopts deleted file mode 100644 index 6a5acb03bbde..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Translation V3 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-translate-v3/AUTHENTICATION.md b/owl-bot-staging/google-cloud-translate-v3/AUTHENTICATION.md deleted file mode 100644 index f67deb161865..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-translate-v3 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-translate-v3 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/translate/v3" - -client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/translate/v3" - -::Google::Cloud::Translate::V3::TranslationService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Translate::V3::TranslationService::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-translate-v3 -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/translate/v3" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Translate::V3::TranslationService::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-translate-v3/CHANGELOG.md b/owl-bot-staging/google-cloud-translate-v3/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-translate-v3/Gemfile b/owl-bot-staging/google-cloud-translate-v3/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-translate-v3/LICENSE.md b/owl-bot-staging/google-cloud-translate-v3/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/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-translate-v3/README.md b/owl-bot-staging/google-cloud-translate-v3/README.md deleted file mode 100644 index 99718bb0a50c..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Translation V3 API - -Integrates text translation into your website or application. - -Cloud Translation can dynamically translate text between thousands of language pairs. Translation lets websites and programs programmatically integrate with the translation service. - -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 Translation V3 API. Most users should consider using -the main client gem, -[google-cloud-translate](https://rubygems.org/gems/google-cloud-translate). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-translate-v3 -``` - -## 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/translate.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/translate/v3" - -client = ::Google::Cloud::Translate::V3::TranslationService::Client.new -request = ::Google::Cloud::Translate::V3::TranslateTextRequest.new # (request fields as keyword arguments...) -response = client.translate_text request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-translate-v3/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/translate) -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/translate/v3" -require "logger" - -client = ::Google::Cloud::Translate::V3::TranslationService::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-translate`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-translate-v3`. -_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-translate`. -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-translate-v3`. - -### 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-translate-v3/Rakefile b/owl-bot-staging/google-cloud-translate-v3/Rakefile deleted file mode 100644 index 06aca81cc0ab..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/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-translate-v3 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["TRANSLATE_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["TRANSLATE_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["TRANSLATE_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 TRANSLATE_TEST_PROJECT=test123 TRANSLATE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/translate/v3/translation_service/credentials" - ::Google::Cloud::Translate::V3::TranslationService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["TRANSLATE_PROJECT"] = project - ENV["TRANSLATE_TEST_PROJECT"] = project - ENV["TRANSLATE_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-translate-v3 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-translate-v3 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-translate-v3 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-translate-v3 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-translate-v3" - header "google-cloud-translate-v3 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-translate-v3 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-translate-v3 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-translate-v3 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-translate-v3 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-translate-v3/gapic_metadata.json b/owl-bot-staging/google-cloud-translate-v3/gapic_metadata.json deleted file mode 100644 index e12339b2e4a4..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/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.translation.v3", - "libraryPackage": "::Google::Cloud::Translate::V3", - "services": { - "TranslationService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Translate::V3::TranslationService::Client", - "rpcs": { - "TranslateText": { - "methods": [ - "translate_text" - ] - }, - "RomanizeText": { - "methods": [ - "romanize_text" - ] - }, - "DetectLanguage": { - "methods": [ - "detect_language" - ] - }, - "GetSupportedLanguages": { - "methods": [ - "get_supported_languages" - ] - }, - "TranslateDocument": { - "methods": [ - "translate_document" - ] - }, - "BatchTranslateText": { - "methods": [ - "batch_translate_text" - ] - }, - "BatchTranslateDocument": { - "methods": [ - "batch_translate_document" - ] - }, - "CreateGlossary": { - "methods": [ - "create_glossary" - ] - }, - "UpdateGlossary": { - "methods": [ - "update_glossary" - ] - }, - "ListGlossaries": { - "methods": [ - "list_glossaries" - ] - }, - "GetGlossary": { - "methods": [ - "get_glossary" - ] - }, - "DeleteGlossary": { - "methods": [ - "delete_glossary" - ] - }, - "GetGlossaryEntry": { - "methods": [ - "get_glossary_entry" - ] - }, - "ListGlossaryEntries": { - "methods": [ - "list_glossary_entries" - ] - }, - "CreateGlossaryEntry": { - "methods": [ - "create_glossary_entry" - ] - }, - "UpdateGlossaryEntry": { - "methods": [ - "update_glossary_entry" - ] - }, - "DeleteGlossaryEntry": { - "methods": [ - "delete_glossary_entry" - ] - }, - "CreateDataset": { - "methods": [ - "create_dataset" - ] - }, - "GetDataset": { - "methods": [ - "get_dataset" - ] - }, - "ListDatasets": { - "methods": [ - "list_datasets" - ] - }, - "DeleteDataset": { - "methods": [ - "delete_dataset" - ] - }, - "CreateAdaptiveMtDataset": { - "methods": [ - "create_adaptive_mt_dataset" - ] - }, - "DeleteAdaptiveMtDataset": { - "methods": [ - "delete_adaptive_mt_dataset" - ] - }, - "GetAdaptiveMtDataset": { - "methods": [ - "get_adaptive_mt_dataset" - ] - }, - "ListAdaptiveMtDatasets": { - "methods": [ - "list_adaptive_mt_datasets" - ] - }, - "AdaptiveMtTranslate": { - "methods": [ - "adaptive_mt_translate" - ] - }, - "GetAdaptiveMtFile": { - "methods": [ - "get_adaptive_mt_file" - ] - }, - "DeleteAdaptiveMtFile": { - "methods": [ - "delete_adaptive_mt_file" - ] - }, - "ImportAdaptiveMtFile": { - "methods": [ - "import_adaptive_mt_file" - ] - }, - "ListAdaptiveMtFiles": { - "methods": [ - "list_adaptive_mt_files" - ] - }, - "ListAdaptiveMtSentences": { - "methods": [ - "list_adaptive_mt_sentences" - ] - }, - "ImportData": { - "methods": [ - "import_data" - ] - }, - "ExportData": { - "methods": [ - "export_data" - ] - }, - "ListExamples": { - "methods": [ - "list_examples" - ] - }, - "CreateModel": { - "methods": [ - "create_model" - ] - }, - "ListModels": { - "methods": [ - "list_models" - ] - }, - "GetModel": { - "methods": [ - "get_model" - ] - }, - "DeleteModel": { - "methods": [ - "delete_model" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-translate-v3/google-cloud-translate-v3.gemspec b/owl-bot-staging/google-cloud-translate-v3/google-cloud-translate-v3.gemspec deleted file mode 100644 index b3eb7135a809..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/google-cloud-translate-v3.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/translate/v3/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-translate-v3" - gem.version = Google::Cloud::Translate::V3::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Cloud Translation can dynamically translate text between thousands of language pairs. Translation lets websites and programs programmatically integrate with the translation service. Note that google-cloud-translate-v3 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-translate instead. See the readme for more details." - gem.summary = "Integrates text translation into your website or application." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "google-iam-v1", "~> 1.3" -end diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google-cloud-translate-v3.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google-cloud-translate-v3.rb deleted file mode 100644 index 4feb19bf3cb3..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/lib/google-cloud-translate-v3.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/translate/v3" diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3.rb deleted file mode 100644 index 9da4decef7f8..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3.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/translate/v3/translation_service" -require "google/cloud/translate/v3/version" - -module Google - module Cloud - module Translate - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/translate/v3" - # client = ::Google::Cloud::Translate::V3::TranslationService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/translate/v3" - # client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - module V3 - end - end - end -end - -helper_path = ::File.join __dir__, "v3", "_helpers.rb" -require "google/cloud/translate/v3/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/adaptive_mt_pb.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/adaptive_mt_pb.rb deleted file mode 100644 index 0566c827303a..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/adaptive_mt_pb.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/translate/v3/adaptive_mt.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/translate/v3/common_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n+google/cloud/translate/v3/adaptive_mt.proto\x12\x1bgoogle.cloud.translation.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/translate/v3/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa1\x03\n\x11\x41\x64\x61ptiveMtDataset\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*translate.googleapis.com/AdaptiveMtDataset\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x1c\n\x14source_language_code\x18\x03 \x01(\t\x12\x1c\n\x14target_language_code\x18\x04 \x01(\t\x12\x15\n\rexample_count\x18\x05 \x01(\x05\x12\x34\n\x0b\x63reate_time\x18\t \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:u\xea\x41r\n*translate.googleapis.com/AdaptiveMtDataset\x12\x44projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}\"\xad\x01\n\x1e\x43reateAdaptiveMtDatasetRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12P\n\x13\x61\x64\x61ptive_mt_dataset\x18\x02 \x01(\x0b\x32..google.cloud.translation.v3.AdaptiveMtDatasetB\x03\xe0\x41\x02\"b\n\x1e\x44\x65leteAdaptiveMtDatasetRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*translate.googleapis.com/AdaptiveMtDataset\"_\n\x1bGetAdaptiveMtDatasetRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*translate.googleapis.com/AdaptiveMtDataset\"\xa0\x01\n\x1dListAdaptiveMtDatasetsRequest\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\"\x91\x01\n\x1eListAdaptiveMtDatasetsResponse\x12Q\n\x14\x61\x64\x61ptive_mt_datasets\x18\x01 \x03(\x0b\x32..google.cloud.translation.v3.AdaptiveMtDatasetB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x8b\x08\n\x1a\x41\x64\x61ptiveMtTranslateRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x43\n\x07\x64\x61taset\x18\x02 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*translate.googleapis.com/AdaptiveMtDataset\x12\x14\n\x07\x63ontent\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12w\n\x19reference_sentence_config\x18\x06 \x01(\x0b\x32O.google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfigH\x00\x88\x01\x01\x12i\n\x0fglossary_config\x18\x07 \x01(\x0b\x32\x46.google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfigB\x03\xe0\x41\x01H\x01\x88\x01\x01\x1aI\n\x15ReferenceSentencePair\x12\x17\n\x0fsource_sentence\x18\x01 \x01(\t\x12\x17\n\x0ftarget_sentence\x18\x02 \x01(\t\x1a\x8c\x01\n\x19ReferenceSentencePairList\x12o\n\x18reference_sentence_pairs\x18\x01 \x03(\x0b\x32M.google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePair\x1a\xcf\x01\n\x17ReferenceSentenceConfig\x12x\n\x1dreference_sentence_pair_lists\x18\x01 \x03(\x0b\x32Q.google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePairList\x12\x1c\n\x14source_language_code\x18\x02 \x01(\t\x12\x1c\n\x14target_language_code\x18\x03 \x01(\t\x1a\x94\x01\n\x0eGlossaryConfig\x12;\n\x08glossary\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary\x12\x18\n\x0bignore_case\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12+\n\x1e\x63ontextual_translation_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x42\x1c\n\x1a_reference_sentence_configB\x12\n\x10_glossary_config\"5\n\x15\x41\x64\x61ptiveMtTranslation\x12\x1c\n\x0ftranslated_text\x18\x01 \x01(\tB\x03\xe0\x41\x03\"\xdb\x01\n\x1b\x41\x64\x61ptiveMtTranslateResponse\x12M\n\x0ctranslations\x18\x01 \x03(\x0b\x32\x32.google.cloud.translation.v3.AdaptiveMtTranslationB\x03\xe0\x41\x03\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12Q\n\x15glossary_translations\x18\x04 \x03(\x0b\x32\x32.google.cloud.translation.v3.AdaptiveMtTranslation\"\x94\x03\n\x0e\x41\x64\x61ptiveMtFile\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'translate.googleapis.com/AdaptiveMtFile\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x65ntry_count\x18\x03 \x01(\x05\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:\xab\x01\xea\x41\xa7\x01\n\'translate.googleapis.com/AdaptiveMtFile\x12[projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}*\x0f\x61\x64\x61ptiveMtFiles2\x0e\x61\x64\x61ptiveMtFile\"Y\n\x18GetAdaptiveMtFileRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'translate.googleapis.com/AdaptiveMtFile\"\\\n\x1b\x44\x65leteAdaptiveMtFileRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'translate.googleapis.com/AdaptiveMtFile\"\xff\x01\n\x1bImportAdaptiveMtFileRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*translate.googleapis.com/AdaptiveMtDataset\x12I\n\x11\x66ile_input_source\x18\x02 \x01(\x0b\x32,.google.cloud.translation.v3.FileInputSourceH\x00\x12G\n\x10gcs_input_source\x18\x03 \x01(\x0b\x32+.google.cloud.translation.v3.GcsInputSourceH\x00\x42\x08\n\x06source\"j\n\x1cImportAdaptiveMtFileResponse\x12J\n\x10\x61\x64\x61ptive_mt_file\x18\x01 \x01(\x0b\x32+.google.cloud.translation.v3.AdaptiveMtFileB\x03\xe0\x41\x03\"\x91\x01\n\x1aListAdaptiveMtFilesRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*translate.googleapis.com/AdaptiveMtDataset\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x88\x01\n\x1bListAdaptiveMtFilesResponse\x12K\n\x11\x61\x64\x61ptive_mt_files\x18\x01 \x03(\x0b\x32+.google.cloud.translation.v3.AdaptiveMtFileB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xd8\x03\n\x12\x41\x64\x61ptiveMtSentence\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+translate.googleapis.com/AdaptiveMtSentence\x12\x1c\n\x0fsource_sentence\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0ftarget_sentence\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\xd6\x01\xea\x41\xd2\x01\n+translate.googleapis.com/AdaptiveMtSentence\x12zprojects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}/adaptiveMtSentences/{sentence}*\x13\x61\x64\x61ptiveMtSentences2\x12\x61\x64\x61ptiveMtSentence\"\x88\x01\n\x1eListAdaptiveMtSentencesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'translate.googleapis.com/AdaptiveMtFile\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x94\x01\n\x1fListAdaptiveMtSentencesResponse\x12S\n\x15\x61\x64\x61ptive_mt_sentences\x18\x01 \x03(\x0b\x32/.google.cloud.translation.v3.AdaptiveMtSentenceB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\xc6\x01\n\x1d\x63om.google.cloud.translate.v3B\x0f\x41\x64\x61ptiveMtProtoP\x01Z;cloud.google.com/go/translate/apiv3/translatepb;translatepb\xaa\x02\x19Google.Cloud.Translate.V3\xca\x02\x19Google\\Cloud\\Translate\\V3\xea\x02\x1cGoogle::Cloud::Translate::V3b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Translate - module V3 - AdaptiveMtDataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.AdaptiveMtDataset").msgclass - CreateAdaptiveMtDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.CreateAdaptiveMtDatasetRequest").msgclass - DeleteAdaptiveMtDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteAdaptiveMtDatasetRequest").msgclass - GetAdaptiveMtDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GetAdaptiveMtDatasetRequest").msgclass - ListAdaptiveMtDatasetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListAdaptiveMtDatasetsRequest").msgclass - ListAdaptiveMtDatasetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListAdaptiveMtDatasetsResponse").msgclass - AdaptiveMtTranslateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.AdaptiveMtTranslateRequest").msgclass - AdaptiveMtTranslateRequest::ReferenceSentencePair = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePair").msgclass - AdaptiveMtTranslateRequest::ReferenceSentencePairList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePairList").msgclass - AdaptiveMtTranslateRequest::ReferenceSentenceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig").msgclass - AdaptiveMtTranslateRequest::GlossaryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig").msgclass - AdaptiveMtTranslation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.AdaptiveMtTranslation").msgclass - AdaptiveMtTranslateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.AdaptiveMtTranslateResponse").msgclass - AdaptiveMtFile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.AdaptiveMtFile").msgclass - GetAdaptiveMtFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GetAdaptiveMtFileRequest").msgclass - DeleteAdaptiveMtFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteAdaptiveMtFileRequest").msgclass - ImportAdaptiveMtFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ImportAdaptiveMtFileRequest").msgclass - ImportAdaptiveMtFileResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ImportAdaptiveMtFileResponse").msgclass - ListAdaptiveMtFilesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListAdaptiveMtFilesRequest").msgclass - ListAdaptiveMtFilesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListAdaptiveMtFilesResponse").msgclass - AdaptiveMtSentence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.AdaptiveMtSentence").msgclass - ListAdaptiveMtSentencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListAdaptiveMtSentencesRequest").msgclass - ListAdaptiveMtSentencesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListAdaptiveMtSentencesResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/automl_translation_pb.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/automl_translation_pb.rb deleted file mode 100644 index a9711e27fbe7..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/automl_translation_pb.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/translate/v3/automl_translation.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/translate/v3/common_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n2google/cloud/translate/v3/automl_translation.proto\x12\x1bgoogle.cloud.translation.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/translate/v3/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"u\n\x11ImportDataRequest\x12\x14\n\x07\x64\x61taset\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12J\n\x0cinput_config\x18\x02 \x01(\x0b\x32/.google.cloud.translation.v3.DatasetInputConfigB\x03\xe0\x41\x02\"\xd2\x01\n\x12\x44\x61tasetInputConfig\x12N\n\x0binput_files\x18\x01 \x03(\x0b\x32\x39.google.cloud.translation.v3.DatasetInputConfig.InputFile\x1al\n\tInputFile\x12\x12\n\x05usage\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\ngcs_source\x18\x03 \x01(\x0b\x32+.google.cloud.translation.v3.GcsInputSourceH\x00\x42\x08\n\x06source\"\xd5\x01\n\x12ImportDataMetadata\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.translation.v3.OperationState\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"w\n\x11\x45xportDataRequest\x12\x14\n\x07\x64\x61taset\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12L\n\routput_config\x18\x02 \x01(\x0b\x32\x30.google.cloud.translation.v3.DatasetOutputConfigB\x03\xe0\x41\x02\"r\n\x13\x44\x61tasetOutputConfig\x12L\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32\x31.google.cloud.translation.v3.GcsOutputDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\xd5\x01\n\x12\x45xportDataMetadata\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.translation.v3.OperationState\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"N\n\x14\x44\x65leteDatasetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n translate.googleapis.com/Dataset\"\xd8\x01\n\x15\x44\x65leteDatasetMetadata\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.translation.v3.OperationState\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"K\n\x11GetDatasetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n translate.googleapis.com/Dataset\"\x81\x01\n\x13ListDatasetsRequest\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\"g\n\x14ListDatasetsResponse\x12\x36\n\x08\x64\x61tasets\x18\x01 \x03(\x0b\x32$.google.cloud.translation.v3.Dataset\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8d\x01\n\x14\x43reateDatasetRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12:\n\x07\x64\x61taset\x18\x02 \x01(\x0b\x32$.google.cloud.translation.v3.DatasetB\x03\xe0\x41\x02\"\xd8\x01\n\x15\x43reateDatasetMetadata\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.translation.v3.OperationState\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"\x95\x01\n\x13ListExamplesRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n translate.googleapis.com/Dataset\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"g\n\x14ListExamplesResponse\x12\x36\n\x08\x65xamples\x18\x01 \x03(\x0b\x32$.google.cloud.translation.v3.Example\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xd0\x01\n\x07\x45xample\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0bsource_text\x18\x02 \x01(\t\x12\x13\n\x0btarget_text\x18\x03 \x01(\t\x12\x12\n\x05usage\x18\x04 \x01(\tB\x03\xe0\x41\x03:t\xea\x41q\n translate.googleapis.com/Example\x12Mprojects/{project}/locations/{location}/datasets/{dataset}/examples/{example}\"\xe8\x01\n\x1e\x42\x61tchTransferResourcesResponse\x12g\n\tresponses\x18\x01 \x03(\x0b\x32T.google.cloud.translation.v3.BatchTransferResourcesResponse.TransferResourceResponse\x1a]\n\x18TransferResourceResponse\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x0e\n\x06target\x18\x02 \x01(\t\x12!\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\"\xbc\x03\n\x07\x44\x61taset\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x1c\n\x14source_language_code\x18\x03 \x01(\t\x12\x1c\n\x14target_language_code\x18\x04 \x01(\t\x12\x1a\n\rexample_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x12 \n\x13train_example_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x03\x12#\n\x16validate_example_count\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1f\n\x12test_example_count\x18\x08 \x01(\x05\x42\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\t \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:a\xea\x41^\n translate.googleapis.com/Dataset\x12:projects/{project}/locations/{location}/datasets/{dataset}\"\x87\x01\n\x12\x43reateModelRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x36\n\x05model\x18\x02 \x01(\x0b\x32\".google.cloud.translation.v3.ModelB\x03\xe0\x41\x02\"\xd6\x01\n\x13\x43reateModelMetadata\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.translation.v3.OperationState\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"\x94\x01\n\x11ListModelsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"a\n\x12ListModelsResponse\x12\x32\n\x06models\x18\x01 \x03(\x0b\x32\".google.cloud.translation.v3.Model\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"G\n\x0fGetModelRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1etranslate.googleapis.com/Model\"J\n\x12\x44\x65leteModelRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1etranslate.googleapis.com/Model\"\xd6\x01\n\x13\x44\x65leteModelMetadata\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.translation.v3.OperationState\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"\xb3\x03\n\x05Model\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0f\n\x07\x64\x61taset\x18\x03 \x01(\t\x12!\n\x14source_language_code\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12!\n\x14target_language_code\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12 \n\x13train_example_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x03\x12#\n\x16validate_example_count\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1f\n\x12test_example_count\x18\x0c \x01(\x05\x42\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x08 \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:[\xea\x41X\n\x1etranslate.googleapis.com/Model\x12\x36projects/{project}/locations/{location}/models/{model}B\xcd\x01\n\x1d\x63om.google.cloud.translate.v3B\x16\x41utoMLTranslationProtoP\x01Z;cloud.google.com/go/translate/apiv3/translatepb;translatepb\xaa\x02\x19Google.Cloud.Translate.V3\xca\x02\x19Google\\Cloud\\Translate\\V3\xea\x02\x1cGoogle::Cloud::Translate::V3b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Translate - module V3 - ImportDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ImportDataRequest").msgclass - DatasetInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DatasetInputConfig").msgclass - DatasetInputConfig::InputFile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DatasetInputConfig.InputFile").msgclass - ImportDataMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ImportDataMetadata").msgclass - ExportDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ExportDataRequest").msgclass - DatasetOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DatasetOutputConfig").msgclass - ExportDataMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ExportDataMetadata").msgclass - DeleteDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteDatasetRequest").msgclass - DeleteDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteDatasetMetadata").msgclass - GetDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GetDatasetRequest").msgclass - ListDatasetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListDatasetsRequest").msgclass - ListDatasetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListDatasetsResponse").msgclass - CreateDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.CreateDatasetRequest").msgclass - CreateDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.CreateDatasetMetadata").msgclass - ListExamplesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListExamplesRequest").msgclass - ListExamplesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListExamplesResponse").msgclass - Example = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.Example").msgclass - BatchTransferResourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTransferResourcesResponse").msgclass - BatchTransferResourcesResponse::TransferResourceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTransferResourcesResponse.TransferResourceResponse").msgclass - Dataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.Dataset").msgclass - CreateModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.CreateModelRequest").msgclass - CreateModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.CreateModelMetadata").msgclass - ListModelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListModelsRequest").msgclass - ListModelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListModelsResponse").msgclass - GetModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GetModelRequest").msgclass - DeleteModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteModelRequest").msgclass - DeleteModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteModelMetadata").msgclass - Model = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.Model").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/bindings_override.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/bindings_override.rb deleted file mode 100644 index 780f191863aa..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/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 Translate - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/translate/v3/rest" - # client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - module V3 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Translate"] - 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: "/v3/{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: "/v3/{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-translate-v3/lib/google/cloud/translate/v3/common_pb.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/common_pb.rb deleted file mode 100644 index a0a6b10db393..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/common_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/translate/v3/common.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n&google/cloud/translate/v3/common.proto\x12\x1bgoogle.cloud.translation.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"(\n\x0eGcsInputSource\x12\x16\n\tinput_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\"Z\n\x0f\x46ileInputSource\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07\x63ontent\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\"6\n\x14GcsOutputDestination\x12\x1e\n\x11output_uri_prefix\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xf8\x04\n\rGlossaryEntry\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12R\n\nterms_pair\x18\x02 \x01(\x0b\x32<.google.cloud.translation.v3.GlossaryEntry.GlossaryTermsPairH\x00\x12P\n\tterms_set\x18\x03 \x01(\x0b\x32;.google.cloud.translation.v3.GlossaryEntry.GlossaryTermsSetH\x00\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x1a\x93\x01\n\x11GlossaryTermsPair\x12>\n\x0bsource_term\x18\x01 \x01(\x0b\x32).google.cloud.translation.v3.GlossaryTerm\x12>\n\x0btarget_term\x18\x02 \x01(\x0b\x32).google.cloud.translation.v3.GlossaryTerm\x1aL\n\x10GlossaryTermsSet\x12\x38\n\x05terms\x18\x01 \x03(\x0b\x32).google.cloud.translation.v3.GlossaryTerm:\xac\x01\xea\x41\xa8\x01\n&translate.googleapis.com/GlossaryEntry\x12^projects/{project}/locations/{location}/glossaries/{glossary}/glossaryEntries/{glossary_entry}*\x0fglossaryEntries2\rglossaryEntryB\x06\n\x04\x64\x61ta\"3\n\x0cGlossaryTerm\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x0c\n\x04text\x18\x02 \x01(\t*\xc8\x01\n\x0eOperationState\x12\x1f\n\x1bOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x1b\n\x17OPERATION_STATE_RUNNING\x10\x01\x12\x1d\n\x19OPERATION_STATE_SUCCEEDED\x10\x02\x12\x1a\n\x16OPERATION_STATE_FAILED\x10\x03\x12\x1e\n\x1aOPERATION_STATE_CANCELLING\x10\x04\x12\x1d\n\x19OPERATION_STATE_CANCELLED\x10\x05\x42\xc2\x01\n\x1d\x63om.google.cloud.translate.v3B\x0b\x43ommonProtoP\x01Z;cloud.google.com/go/translate/apiv3/translatepb;translatepb\xaa\x02\x19Google.Cloud.Translate.V3\xca\x02\x19Google\\Cloud\\Translate\\V3\xea\x02\x1cGoogle::Cloud::Translate::V3b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Translate - module V3 - GcsInputSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GcsInputSource").msgclass - FileInputSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.FileInputSource").msgclass - GcsOutputDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GcsOutputDestination").msgclass - GlossaryEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GlossaryEntry").msgclass - GlossaryEntry::GlossaryTermsPair = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GlossaryEntry.GlossaryTermsPair").msgclass - GlossaryEntry::GlossaryTermsSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GlossaryEntry.GlossaryTermsSet").msgclass - GlossaryTerm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GlossaryTerm").msgclass - OperationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.OperationState").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/rest.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/rest.rb deleted file mode 100644 index a65a2908a2bd..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/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/translate/v3/translation_service/rest" -require "google/cloud/translate/v3/bindings_override" -require "google/cloud/translate/v3/version" - -module Google - module Cloud - module Translate - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/translate/v3/rest" - # client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - module V3 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service.rb deleted file mode 100644 index 95ca52623d45..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_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/translate/v3/version" - -require "google/cloud/translate/v3/translation_service/credentials" -require "google/cloud/translate/v3/translation_service/paths" -require "google/cloud/translate/v3/translation_service/operations" -require "google/cloud/translate/v3/translation_service/client" -require "google/cloud/translate/v3/translation_service/rest" - -module Google - module Cloud - module Translate - module V3 - ## - # Provides natural language translation operations. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/translate/v3/translation_service" - # client = ::Google::Cloud::Translate::V3::TranslationService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/translate/v3/translation_service/rest" - # client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - module TranslationService - end - end - end - end -end - -helper_path = ::File.join __dir__, "translation_service", "helpers.rb" -require "google/cloud/translate/v3/translation_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/client.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/client.rb deleted file mode 100644 index 98ad81401303..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/client.rb +++ /dev/null @@ -1,4614 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/translate/v3/translation_service_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module Translate - module V3 - module TranslationService - ## - # Client for the TranslationService service. - # - # Provides natural language translation operations. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "translate.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :translation_service_stub - - ## - # Configure the TranslationService Client class. - # - # See {::Google::Cloud::Translate::V3::TranslationService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TranslationService clients - # ::Google::Cloud::Translate::V3::TranslationService::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", "Translate", "V3"] - 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.translate_text.timeout = 600.0 - - default_config.rpcs.detect_language.timeout = 600.0 - - default_config.rpcs.get_supported_languages.timeout = 600.0 - default_config.rpcs.get_supported_languages.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.translate_document.timeout = 600.0 - - default_config.rpcs.batch_translate_text.timeout = 600.0 - - default_config.rpcs.batch_translate_document.timeout = 600.0 - - default_config.rpcs.create_glossary.timeout = 600.0 - - default_config.rpcs.list_glossaries.timeout = 600.0 - default_config.rpcs.list_glossaries.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_glossary.timeout = 600.0 - default_config.rpcs.get_glossary.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_glossary.timeout = 600.0 - default_config.rpcs.delete_glossary.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TranslationService 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::Translate::V3::TranslationService::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 - @translation_service_stub.universe_domain - end - - ## - # Create a new TranslationService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TranslationService 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/translate/v3/translation_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 - - @translation_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Translate::V3::TranslationService::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 - ) - - @translation_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 = @translation_service_stub.endpoint - config.universe_domain = @translation_service_stub.universe_domain - config.logger = @translation_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 = @translation_service_stub.endpoint - config.universe_domain = @translation_service_stub.universe_domain - config.logger = @translation_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Translate::V3::TranslationService::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 - @translation_service_stub.logger - end - - # Service calls - - ## - # Translates input text and returns translated text. - # - # @overload translate_text(request, options = nil) - # Pass arguments to `translate_text` via a request object, either of type - # {::Google::Cloud::Translate::V3::TranslateTextRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::TranslateTextRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload translate_text(contents: nil, mime_type: nil, source_language_code: nil, target_language_code: nil, parent: nil, model: nil, glossary_config: nil, transliteration_config: nil, labels: nil) - # Pass arguments to `translate_text` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param contents [::Array<::String>] - # Required. The content of the input in string format. - # We recommend the total content be less than 30,000 codepoints. The max - # length of this field is 1024. Use BatchTranslateText for larger text. - # @param mime_type [::String] - # Optional. The format of the source text, for example, "text/html", - # "text/plain". If left blank, the MIME type defaults to "text/html". - # @param source_language_code [::String] - # Optional. The ISO-639 language code of the input text if - # known, for example, "en-US" or "sr-Latn". Supported language codes are - # listed in [Language - # Support](https://cloud.google.com/translate/docs/languages). If the source - # language isn't specified, the API attempts to identify the source language - # automatically and returns the source language within the response. - # @param target_language_code [::String] - # Required. The ISO-639 language code to use for translation of the input - # text, set to one of the language codes listed in [Language - # Support](https://cloud.google.com/translate/docs/languages). - # @param parent [::String] - # Required. Project or location to make a call. Must refer to a caller's - # project. - # - # Format: `projects/{project-number-or-id}` or - # `projects/{project-number-or-id}/locations/{location-id}`. - # - # For global calls, use `projects/{project-number-or-id}/locations/global` or - # `projects/{project-number-or-id}`. - # - # Non-global location is required for requests using AutoML models or - # custom glossaries. - # - # Models and glossaries must be within the same region (have same - # location-id), otherwise an INVALID_ARGUMENT (400) error is returned. - # @param model [::String] - # Optional. The `model` type requested for this translation. - # - # The format depends on model type: - # - # - AutoML Translation models: - # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - # - # - General (built-in) models: - # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - # - # - Translation LLM models: - # `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, - # - # For global (non-regionalized) requests, use `location-id` `global`. - # For example, - # `projects/{project-number-or-id}/locations/global/models/general/nmt`. - # - # If not provided, the default Google model (NMT) will be used - # @param glossary_config [::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig, ::Hash] - # Optional. Glossary to be applied. The glossary must be - # within the same region (have the same location-id) as the model, otherwise - # an INVALID_ARGUMENT (400) error is returned. - # @param transliteration_config [::Google::Cloud::Translate::V3::TransliterationConfig, ::Hash] - # Optional. Transliteration to be applied. - # @param labels [::Hash{::String => ::String}] - # Optional. The labels with user-defined metadata for the request. - # - # Label keys and values can be no longer than 63 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # Label values are optional. Label keys must start with a letter. - # - # See https://cloud.google.com/translate/docs/advanced/labels for more - # information. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Translate::V3::TranslateTextResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Translate::V3::TranslateTextResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::TranslateTextRequest.new - # - # # Call the translate_text method. - # result = client.translate_text request - # - # # The returned object is of type Google::Cloud::Translate::V3::TranslateTextResponse. - # p result - # - def translate_text request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::TranslateTextRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.translate_text.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.translate_text.timeout, - metadata: metadata, - retry_policy: @config.rpcs.translate_text.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :translate_text, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Romanize input text written in non-Latin scripts to Latin text. - # - # @overload romanize_text(request, options = nil) - # Pass arguments to `romanize_text` via a request object, either of type - # {::Google::Cloud::Translate::V3::RomanizeTextRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::RomanizeTextRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload romanize_text(parent: nil, contents: nil, source_language_code: nil) - # Pass arguments to `romanize_text` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project or location to make a call. Must refer to a caller's - # project. - # - # Format: `projects/{project-number-or-id}/locations/{location-id}` or - # `projects/{project-number-or-id}`. - # - # For global calls, use `projects/{project-number-or-id}/locations/global` or - # `projects/{project-number-or-id}`. - # @param contents [::Array<::String>] - # Required. The content of the input in string format. - # @param source_language_code [::String] - # Optional. The ISO-639 language code of the input text if - # known, for example, "hi" or "zh". Supported language codes are - # listed in [Language - # Support](https://cloud.google.com/translate/docs/languages#roman). If the - # source language isn't specified, the API attempts to identify the source - # language automatically and returns the source language for each content in - # the response. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Translate::V3::RomanizeTextResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Translate::V3::RomanizeTextResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::RomanizeTextRequest.new - # - # # Call the romanize_text method. - # result = client.romanize_text request - # - # # The returned object is of type Google::Cloud::Translate::V3::RomanizeTextResponse. - # p result - # - def romanize_text request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::RomanizeTextRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.romanize_text.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.romanize_text.timeout, - metadata: metadata, - retry_policy: @config.rpcs.romanize_text.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :romanize_text, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Detects the language of text within a request. - # - # @overload detect_language(request, options = nil) - # Pass arguments to `detect_language` via a request object, either of type - # {::Google::Cloud::Translate::V3::DetectLanguageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::DetectLanguageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload detect_language(parent: nil, model: nil, content: nil, mime_type: nil, labels: nil) - # Pass arguments to `detect_language` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project or location to make a call. Must refer to a caller's - # project. - # - # Format: `projects/{project-number-or-id}/locations/{location-id}` or - # `projects/{project-number-or-id}`. - # - # For global calls, use `projects/{project-number-or-id}/locations/global` or - # `projects/{project-number-or-id}`. - # - # Only models within the same region (has same location-id) can be used. - # Otherwise an INVALID_ARGUMENT (400) error is returned. - # @param model [::String] - # Optional. The language detection model to be used. - # - # Format: - # `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` - # - # Only one language detection model is currently supported: - # `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. - # - # If not specified, the default model is used. - # @param content [::String] - # The content of the input stored as a string. - # @param mime_type [::String] - # Optional. The format of the source text, for example, "text/html", - # "text/plain". If left blank, the MIME type defaults to "text/html". - # @param labels [::Hash{::String => ::String}] - # Optional. The labels with user-defined metadata for the request. - # - # Label keys and values can be no longer than 63 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # Label values are optional. Label keys must start with a letter. - # - # See https://cloud.google.com/translate/docs/advanced/labels for more - # information. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Translate::V3::DetectLanguageResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Translate::V3::DetectLanguageResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::DetectLanguageRequest.new - # - # # Call the detect_language method. - # result = client.detect_language request - # - # # The returned object is of type Google::Cloud::Translate::V3::DetectLanguageResponse. - # p result - # - def detect_language request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::DetectLanguageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.detect_language.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.detect_language.timeout, - metadata: metadata, - retry_policy: @config.rpcs.detect_language.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :detect_language, request, 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 supported languages for translation. - # - # @overload get_supported_languages(request, options = nil) - # Pass arguments to `get_supported_languages` via a request object, either of type - # {::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_supported_languages(parent: nil, display_language_code: nil, model: nil) - # Pass arguments to `get_supported_languages` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project or location to make a call. Must refer to a caller's - # project. - # - # Format: `projects/{project-number-or-id}` or - # `projects/{project-number-or-id}/locations/{location-id}`. - # - # For global calls, use `projects/{project-number-or-id}/locations/global` or - # `projects/{project-number-or-id}`. - # - # Non-global location is required for AutoML models. - # - # Only models within the same region (have same location-id) can be used, - # otherwise an INVALID_ARGUMENT (400) error is returned. - # @param display_language_code [::String] - # Optional. The language to use to return localized, human readable names - # of supported languages. If missing, then display names are not returned - # in a response. - # @param model [::String] - # Optional. Get supported languages of this model. - # - # The format depends on model type: - # - # - AutoML Translation models: - # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - # - # - General (built-in) models: - # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - # - # - # Returns languages supported by the specified model. - # If missing, we get supported languages of Google general NMT model. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Translate::V3::SupportedLanguages] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Translate::V3::SupportedLanguages] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::GetSupportedLanguagesRequest.new - # - # # Call the get_supported_languages method. - # result = client.get_supported_languages request - # - # # The returned object is of type Google::Cloud::Translate::V3::SupportedLanguages. - # p result - # - def get_supported_languages request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_supported_languages.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_supported_languages.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_supported_languages.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :get_supported_languages, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Translates documents in synchronous mode. - # - # @overload translate_document(request, options = nil) - # Pass arguments to `translate_document` via a request object, either of type - # {::Google::Cloud::Translate::V3::TranslateDocumentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::TranslateDocumentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload translate_document(parent: nil, source_language_code: nil, target_language_code: nil, document_input_config: nil, document_output_config: nil, model: nil, glossary_config: nil, labels: nil, customized_attribution: nil, is_translate_native_pdf_only: nil, enable_shadow_removal_native_pdf: nil, enable_rotation_correction: nil) - # Pass arguments to `translate_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. Location to make a regional call. - # - # Format: `projects/{project-number-or-id}/locations/{location-id}`. - # - # For global calls, use `projects/{project-number-or-id}/locations/global` or - # `projects/{project-number-or-id}`. - # - # Non-global location is required for requests using AutoML models or custom - # glossaries. - # - # Models and glossaries must be within the same region (have the same - # location-id), otherwise an INVALID_ARGUMENT (400) error is returned. - # @param source_language_code [::String] - # Optional. The ISO-639 language code of the input document if known, for - # example, "en-US" or "sr-Latn". Supported language codes are listed in - # [Language Support](https://cloud.google.com/translate/docs/languages). If - # the source language isn't specified, the API attempts to identify the - # source language automatically and returns the source language within the - # response. Source language must be specified if the request contains a - # glossary or a custom model. - # @param target_language_code [::String] - # Required. The ISO-639 language code to use for translation of the input - # document, set to one of the language codes listed in [Language - # Support](https://cloud.google.com/translate/docs/languages). - # @param document_input_config [::Google::Cloud::Translate::V3::DocumentInputConfig, ::Hash] - # Required. Input configurations. - # @param document_output_config [::Google::Cloud::Translate::V3::DocumentOutputConfig, ::Hash] - # Optional. Output configurations. - # Defines if the output file should be stored within Cloud Storage as well - # as the desired output format. If not provided the translated file will - # only be returned through a byte-stream and its output mime type will be - # the same as the input file's mime type. - # @param model [::String] - # Optional. The `model` type requested for this translation. - # - # The format depends on model type: - # - # - AutoML Translation models: - # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - # - # - General (built-in) models: - # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - # - # - # If not provided, the default Google model (NMT) will be used for - # translation. - # @param glossary_config [::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig, ::Hash] - # Optional. Glossary to be applied. The glossary must be within the same - # region (have the same location-id) as the model, otherwise an - # INVALID_ARGUMENT (400) error is returned. - # @param labels [::Hash{::String => ::String}] - # Optional. The labels with user-defined metadata for the request. - # - # Label keys and values can be no longer than 63 characters (Unicode - # codepoints), can only contain lowercase letters, numeric characters, - # underscores and dashes. International characters are allowed. Label values - # are optional. Label keys must start with a letter. - # - # See https://cloud.google.com/translate/docs/advanced/labels for more - # information. - # @param customized_attribution [::String] - # Optional. This flag is to support user customized attribution. - # If not provided, the default is `Machine Translated by Google`. - # Customized attribution should follow rules in - # https://cloud.google.com/translate/attribution#attribution_and_logos - # @param is_translate_native_pdf_only [::Boolean] - # Optional. is_translate_native_pdf_only field for external customers. - # If true, the page limit of online native pdf translation is 300 and only - # native pdf pages will be translated. - # @param enable_shadow_removal_native_pdf [::Boolean] - # Optional. If true, use the text removal server to remove the shadow text on - # background image for native pdf translation. - # Shadow removal feature can only be enabled when - # is_translate_native_pdf_only: false && pdf_native_only: false - # @param enable_rotation_correction [::Boolean] - # Optional. If true, enable auto rotation correction in DVS. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Translate::V3::TranslateDocumentResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Translate::V3::TranslateDocumentResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::TranslateDocumentRequest.new - # - # # Call the translate_document method. - # result = client.translate_document request - # - # # The returned object is of type Google::Cloud::Translate::V3::TranslateDocumentResponse. - # p result - # - def translate_document request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::TranslateDocumentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.translate_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::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.translate_document.timeout, - metadata: metadata, - retry_policy: @config.rpcs.translate_document.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :translate_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 - - ## - # Translates a large volume of text in asynchronous batch mode. - # This function provides real-time output as the inputs are being processed. - # If caller cancels a request, the partial results (for an input file, it's - # all or nothing) may still be available on the specified output location. - # - # This call returns immediately and you can - # use google.longrunning.Operation.name to poll the status of the call. - # - # @overload batch_translate_text(request, options = nil) - # Pass arguments to `batch_translate_text` via a request object, either of type - # {::Google::Cloud::Translate::V3::BatchTranslateTextRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::BatchTranslateTextRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_translate_text(parent: nil, source_language_code: nil, target_language_codes: nil, models: nil, input_configs: nil, output_config: nil, glossaries: nil, labels: nil) - # Pass arguments to `batch_translate_text` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Location to make a call. Must refer to a caller's project. - # - # Format: `projects/{project-number-or-id}/locations/{location-id}`. - # - # The `global` location is not supported for batch translation. - # - # Only AutoML Translation models or glossaries within the same region (have - # the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) - # error is returned. - # @param source_language_code [::String] - # Required. Source language code. Supported language codes are listed in - # [Language - # Support](https://cloud.google.com/translate/docs/languages). - # @param target_language_codes [::Array<::String>] - # Required. Specify up to 10 language codes here. Supported language codes - # are listed in [Language - # Support](https://cloud.google.com/translate/docs/languages). - # @param models [::Hash{::String => ::String}] - # Optional. The models to use for translation. Map's key is target language - # code. Map's value is model name. Value can be a built-in general model, - # or an AutoML Translation model. - # - # The value format depends on model type: - # - # - AutoML Translation models: - # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - # - # - General (built-in) models: - # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - # - # - # If the map is empty or a specific model is - # not requested for a language pair, then default google model (nmt) is used. - # @param input_configs [::Array<::Google::Cloud::Translate::V3::InputConfig, ::Hash>] - # Required. Input configurations. - # The total number of files matched should be <= 100. - # The total content size should be <= 100M Unicode codepoints. - # The files must use UTF-8 encoding. - # @param output_config [::Google::Cloud::Translate::V3::OutputConfig, ::Hash] - # Required. Output configuration. - # If 2 input configs match to the same file (that is, same input path), - # we don't generate output for duplicate inputs. - # @param glossaries [::Hash{::String => ::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig, ::Hash}] - # Optional. Glossaries to be applied for translation. - # It's keyed by target language code. - # @param labels [::Hash{::String => ::String}] - # Optional. The labels with user-defined metadata for the request. - # - # Label keys and values can be no longer than 63 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # Label values are optional. Label keys must start with a letter. - # - # See https://cloud.google.com/translate/docs/advanced/labels for more - # information. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::BatchTranslateTextRequest.new - # - # # Call the batch_translate_text method. - # result = client.batch_translate_text request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def batch_translate_text request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::BatchTranslateTextRequest - - # Converts hash and nil to 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_translate_text.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_translate_text.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_translate_text.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :batch_translate_text, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Translates a large volume of document in asynchronous batch mode. - # This function provides real-time output as the inputs are being processed. - # If caller cancels a request, the partial results (for an input file, it's - # all or nothing) may still be available on the specified output location. - # - # This call returns immediately and you can use - # google.longrunning.Operation.name to poll the status of the call. - # - # @overload batch_translate_document(request, options = nil) - # Pass arguments to `batch_translate_document` via a request object, either of type - # {::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_translate_document(parent: nil, source_language_code: nil, target_language_codes: nil, input_configs: nil, output_config: nil, models: nil, glossaries: nil, format_conversions: nil, customized_attribution: nil, enable_shadow_removal_native_pdf: nil, enable_rotation_correction: nil) - # Pass arguments to `batch_translate_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. Location to make a regional call. - # - # Format: `projects/{project-number-or-id}/locations/{location-id}`. - # - # The `global` location is not supported for batch translation. - # - # Only AutoML Translation models or glossaries within the same region (have - # the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) - # error is returned. - # @param source_language_code [::String] - # Required. The ISO-639 language code of the input document if known, for - # example, "en-US" or "sr-Latn". Supported language codes are listed in - # [Language Support](https://cloud.google.com/translate/docs/languages). - # @param target_language_codes [::Array<::String>] - # Required. The ISO-639 language code to use for translation of the input - # document. Specify up to 10 language codes here. Supported language codes - # are listed in [Language - # Support](https://cloud.google.com/translate/docs/languages). - # @param input_configs [::Array<::Google::Cloud::Translate::V3::BatchDocumentInputConfig, ::Hash>] - # Required. Input configurations. - # The total number of files matched should be <= 100. - # The total content size to translate should be <= 100M Unicode codepoints. - # The files must use UTF-8 encoding. - # @param output_config [::Google::Cloud::Translate::V3::BatchDocumentOutputConfig, ::Hash] - # Required. Output configuration. - # If 2 input configs match to the same file (that is, same input path), - # we don't generate output for duplicate inputs. - # @param models [::Hash{::String => ::String}] - # Optional. The models to use for translation. Map's key is target language - # code. Map's value is the model name. Value can be a built-in general model, - # or an AutoML Translation model. - # - # The value format depends on model type: - # - # - AutoML Translation models: - # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - # - # - General (built-in) models: - # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - # - # - # If the map is empty or a specific model is - # not requested for a language pair, then default google model (nmt) is used. - # @param glossaries [::Hash{::String => ::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig, ::Hash}] - # Optional. Glossaries to be applied. It's keyed by target language code. - # @param format_conversions [::Hash{::String => ::String}] - # Optional. The file format conversion map that is applied to all input - # files. The map key is the original mime_type. The map value is the target - # mime_type of translated documents. - # - # Supported file format conversion includes: - # - `application/pdf` to - # `application/vnd.openxmlformats-officedocument.wordprocessingml.document` - # - # If nothing specified, output files will be in the same format as the - # original file. - # @param customized_attribution [::String] - # Optional. This flag is to support user customized attribution. - # If not provided, the default is `Machine Translated by Google`. - # Customized attribution should follow rules in - # https://cloud.google.com/translate/attribution#attribution_and_logos - # @param enable_shadow_removal_native_pdf [::Boolean] - # Optional. If true, use the text removal server to remove the shadow text on - # background image for native pdf translation. - # Shadow removal feature can only be enabled when - # is_translate_native_pdf_only: false && pdf_native_only: false - # @param enable_rotation_correction [::Boolean] - # Optional. If true, enable auto rotation correction in DVS. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::BatchTranslateDocumentRequest.new - # - # # Call the batch_translate_document method. - # result = client.batch_translate_document request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def batch_translate_document request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest - - # Converts hash and nil to 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_translate_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::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_translate_document.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_translate_document.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :batch_translate_document, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 glossary and returns the long-running operation. Returns - # NOT_FOUND, if the project doesn't exist. - # - # @overload create_glossary(request, options = nil) - # Pass arguments to `create_glossary` via a request object, either of type - # {::Google::Cloud::Translate::V3::CreateGlossaryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::CreateGlossaryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_glossary(parent: nil, glossary: nil) - # Pass arguments to `create_glossary` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project name. - # @param glossary [::Google::Cloud::Translate::V3::Glossary, ::Hash] - # Required. The glossary 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/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::CreateGlossaryRequest.new - # - # # Call the create_glossary method. - # result = client.create_glossary request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_glossary request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::CreateGlossaryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_glossary.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_glossary.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_glossary.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :create_glossary, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a glossary. A LRO is used since the update can be async if the - # glossary's entry file is updated. - # - # @overload update_glossary(request, options = nil) - # Pass arguments to `update_glossary` via a request object, either of type - # {::Google::Cloud::Translate::V3::UpdateGlossaryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::UpdateGlossaryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_glossary(glossary: nil, update_mask: nil) - # Pass arguments to `update_glossary` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param glossary [::Google::Cloud::Translate::V3::Glossary, ::Hash] - # Required. The glossary entry to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. Currently only `display_name` and - # 'input_config' - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::UpdateGlossaryRequest.new - # - # # Call the update_glossary method. - # result = client.update_glossary request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_glossary request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::UpdateGlossaryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_glossary.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.glossary&.name - header_params["glossary.name"] = request.glossary.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_glossary.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_glossary.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :update_glossary, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't - # exist. - # - # @overload list_glossaries(request, options = nil) - # Pass arguments to `list_glossaries` via a request object, either of type - # {::Google::Cloud::Translate::V3::ListGlossariesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::ListGlossariesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_glossaries(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_glossaries` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the project from which to list all of the glossaries. - # @param page_size [::Integer] - # Optional. Requested page size. The server may return fewer glossaries than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # Typically, this is the value of [ListGlossariesResponse.next_page_token] - # returned from the previous call to `ListGlossaries` method. - # The first page is returned if `page_token`is empty or missing. - # @param filter [::String] - # Optional. Filter specifying constraints of a list operation. - # Specify the constraint by the format of "key=value", where key must be - # "src" or "tgt", and the value must be a valid language code. - # For multiple restrictions, concatenate them by "AND" (uppercase only), - # such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used - # here, which means using 'en-US' and 'en' can lead to different results, - # which depends on the language code you used when you create the glossary. - # For the unidirectional glossaries, the "src" and "tgt" add restrictions - # on the source and target language code separately. - # For the equivalent term set glossaries, the "src" and/or "tgt" add - # restrictions on the term set. - # For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional - # glossaries which exactly match the source language code as "en-US" and the - # target language code "zh-CN", but all equivalent term set glossaries which - # contain "en-US" and "zh-CN" in their language set will be picked. - # If missing, no filtering is performed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::Glossary>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::Glossary>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::ListGlossariesRequest.new - # - # # Call the list_glossaries method. - # result = client.list_glossaries request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Translate::V3::Glossary. - # p item - # end - # - def list_glossaries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ListGlossariesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_glossaries.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_glossaries.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_glossaries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :list_glossaries, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @translation_service_stub, :list_glossaries, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a glossary. Returns NOT_FOUND, if the glossary doesn't - # exist. - # - # @overload get_glossary(request, options = nil) - # Pass arguments to `get_glossary` via a request object, either of type - # {::Google::Cloud::Translate::V3::GetGlossaryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::GetGlossaryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_glossary(name: nil) - # Pass arguments to `get_glossary` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the glossary to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Translate::V3::Glossary] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Translate::V3::Glossary] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::GetGlossaryRequest.new - # - # # Call the get_glossary method. - # result = client.get_glossary request - # - # # The returned object is of type Google::Cloud::Translate::V3::Glossary. - # p result - # - def get_glossary request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::GetGlossaryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_glossary.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_glossary.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_glossary.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :get_glossary, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a glossary, or cancels glossary construction - # if the glossary isn't created yet. - # Returns NOT_FOUND, if the glossary doesn't exist. - # - # @overload delete_glossary(request, options = nil) - # Pass arguments to `delete_glossary` via a request object, either of type - # {::Google::Cloud::Translate::V3::DeleteGlossaryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::DeleteGlossaryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_glossary(name: nil) - # Pass arguments to `delete_glossary` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the glossary to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::DeleteGlossaryRequest.new - # - # # Call the delete_glossary method. - # result = client.delete_glossary request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_glossary request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::DeleteGlossaryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_glossary.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_glossary.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_glossary.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :delete_glossary, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a single glossary entry by the given id. - # - # @overload get_glossary_entry(request, options = nil) - # Pass arguments to `get_glossary_entry` via a request object, either of type - # {::Google::Cloud::Translate::V3::GetGlossaryEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::GetGlossaryEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_glossary_entry(name: nil) - # Pass arguments to `get_glossary_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the glossary entry to get - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Translate::V3::GlossaryEntry] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Translate::V3::GlossaryEntry] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::GetGlossaryEntryRequest.new - # - # # Call the get_glossary_entry method. - # result = client.get_glossary_entry request - # - # # The returned object is of type Google::Cloud::Translate::V3::GlossaryEntry. - # p result - # - def get_glossary_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::GetGlossaryEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_glossary_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::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_glossary_entry.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_glossary_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :get_glossary_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 - - ## - # List the entries for the glossary. - # - # @overload list_glossary_entries(request, options = nil) - # Pass arguments to `list_glossary_entries` via a request object, either of type - # {::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_glossary_entries(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_glossary_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 parent glossary resource name for listing the glossary's - # entries. - # @param page_size [::Integer] - # Optional. Requested page size. The server may return fewer glossary entries - # than requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # Typically, this is the value of - # [ListGlossaryEntriesResponse.next_page_token] returned from the previous - # call. The first page is returned if `page_token`is empty or missing. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::GlossaryEntry>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::GlossaryEntry>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::ListGlossaryEntriesRequest.new - # - # # Call the list_glossary_entries method. - # result = client.list_glossary_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::Translate::V3::GlossaryEntry. - # p item - # end - # - def list_glossary_entries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_glossary_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::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_glossary_entries.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_glossary_entries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :list_glossary_entries, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @translation_service_stub, :list_glossary_entries, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a glossary entry. - # - # @overload create_glossary_entry(request, options = nil) - # Pass arguments to `create_glossary_entry` via a request object, either of type - # {::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_glossary_entry(parent: nil, glossary_entry: nil) - # Pass arguments to `create_glossary_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the glossary to create the entry under. - # @param glossary_entry [::Google::Cloud::Translate::V3::GlossaryEntry, ::Hash] - # Required. The glossary entry to create - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Translate::V3::GlossaryEntry] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Translate::V3::GlossaryEntry] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::CreateGlossaryEntryRequest.new - # - # # Call the create_glossary_entry method. - # result = client.create_glossary_entry request - # - # # The returned object is of type Google::Cloud::Translate::V3::GlossaryEntry. - # p result - # - def create_glossary_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_glossary_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::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_glossary_entry.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_glossary_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :create_glossary_entry, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a glossary entry. - # - # @overload update_glossary_entry(request, options = nil) - # Pass arguments to `update_glossary_entry` via a request object, either of type - # {::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_glossary_entry(glossary_entry: nil) - # Pass arguments to `update_glossary_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 glossary_entry [::Google::Cloud::Translate::V3::GlossaryEntry, ::Hash] - # Required. The glossary entry to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Translate::V3::GlossaryEntry] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Translate::V3::GlossaryEntry] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest.new - # - # # Call the update_glossary_entry method. - # result = client.update_glossary_entry request - # - # # The returned object is of type Google::Cloud::Translate::V3::GlossaryEntry. - # p result - # - def update_glossary_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_glossary_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::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.glossary_entry&.name - header_params["glossary_entry.name"] = request.glossary_entry.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_glossary_entry.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_glossary_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :update_glossary_entry, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single entry from the glossary - # - # @overload delete_glossary_entry(request, options = nil) - # Pass arguments to `delete_glossary_entry` via a request object, either of type - # {::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_glossary_entry(name: nil) - # Pass arguments to `delete_glossary_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the glossary entry to delete - # - # @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/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest.new - # - # # Call the delete_glossary_entry method. - # result = client.delete_glossary_entry request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_glossary_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_glossary_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::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_glossary_entry.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_glossary_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :delete_glossary_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 - - ## - # Creates a Dataset. - # - # @overload create_dataset(request, options = nil) - # Pass arguments to `create_dataset` via a request object, either of type - # {::Google::Cloud::Translate::V3::CreateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::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: 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 project name. - # @param dataset [::Google::Cloud::Translate::V3::Dataset, ::Hash] - # Required. The Dataset 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/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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 - - @translation_service_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 - - ## - # Gets a Dataset. - # - # @overload get_dataset(request, options = nil) - # Pass arguments to `get_dataset` via a request object, either of type - # {::Google::Cloud::Translate::V3::GetDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::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 to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Translate::V3::Dataset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Translate::V3::Dataset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::GetDatasetRequest.new - # - # # Call the get_dataset method. - # result = client.get_dataset request - # - # # The returned object is of type Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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 - - @translation_service_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 - - ## - # Lists datasets. - # - # @overload list_datasets(request, options = nil) - # Pass arguments to `list_datasets` via a request object, either of type - # {::Google::Cloud::Translate::V3::ListDatasetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::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) - # 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. Name of the parent project. In form of - # `projects/{project-number-or-id}/locations/{location-id}` - # @param page_size [::Integer] - # Optional. Requested page size. The server can return fewer results than - # requested. - # @param page_token [::String] - # Optional. A token identifying a page of results for the server to return. - # Typically obtained from next_page_token field in the response of a - # ListDatasets call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::Dataset>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::Dataset>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_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 - - @translation_service_stub.call_rpc :list_datasets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @translation_service_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 - - ## - # Deletes a dataset and all of its contents. - # - # @overload delete_dataset(request, options = nil) - # Pass arguments to `delete_dataset` via a request object, either of type - # {::Google::Cloud::Translate::V3::DeleteDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::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) - # 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 name of the dataset 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/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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 - - @translation_service_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 - - ## - # Creates an Adaptive MT dataset. - # - # @overload create_adaptive_mt_dataset(request, options = nil) - # Pass arguments to `create_adaptive_mt_dataset` via a request object, either of type - # {::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_adaptive_mt_dataset(parent: nil, adaptive_mt_dataset: nil) - # Pass arguments to `create_adaptive_mt_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. Name of the parent project. In form of - # `projects/{project-number-or-id}/locations/{location-id}` - # @param adaptive_mt_dataset [::Google::Cloud::Translate::V3::AdaptiveMtDataset, ::Hash] - # Required. The AdaptiveMtDataset to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Translate::V3::AdaptiveMtDataset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Translate::V3::AdaptiveMtDataset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest.new - # - # # Call the create_adaptive_mt_dataset method. - # result = client.create_adaptive_mt_dataset request - # - # # The returned object is of type Google::Cloud::Translate::V3::AdaptiveMtDataset. - # p result - # - def create_adaptive_mt_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest - - # Converts hash and nil to 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_adaptive_mt_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::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_adaptive_mt_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_adaptive_mt_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :create_adaptive_mt_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 - - ## - # Deletes an Adaptive MT dataset, including all its entries and associated - # metadata. - # - # @overload delete_adaptive_mt_dataset(request, options = nil) - # Pass arguments to `delete_adaptive_mt_dataset` via a request object, either of type - # {::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_adaptive_mt_dataset(name: nil) - # Pass arguments to `delete_adaptive_mt_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. Name of the dataset. In the form of - # `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-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/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest.new - # - # # Call the delete_adaptive_mt_dataset method. - # result = client.delete_adaptive_mt_dataset request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_adaptive_mt_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest - - # Converts hash and nil to 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_adaptive_mt_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::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_adaptive_mt_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_adaptive_mt_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :delete_adaptive_mt_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 - - ## - # Gets the Adaptive MT dataset. - # - # @overload get_adaptive_mt_dataset(request, options = nil) - # Pass arguments to `get_adaptive_mt_dataset` via a request object, either of type - # {::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_adaptive_mt_dataset(name: nil) - # Pass arguments to `get_adaptive_mt_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. Name of the dataset. In the form of - # `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Translate::V3::AdaptiveMtDataset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Translate::V3::AdaptiveMtDataset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest.new - # - # # Call the get_adaptive_mt_dataset method. - # result = client.get_adaptive_mt_dataset request - # - # # The returned object is of type Google::Cloud::Translate::V3::AdaptiveMtDataset. - # p result - # - def get_adaptive_mt_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_adaptive_mt_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::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_adaptive_mt_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_adaptive_mt_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :get_adaptive_mt_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 - - ## - # Lists all Adaptive MT datasets for which the caller has read permission. - # - # @overload list_adaptive_mt_datasets(request, options = nil) - # Pass arguments to `list_adaptive_mt_datasets` via a request object, either of type - # {::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_adaptive_mt_datasets(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_adaptive_mt_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 resource name of the project from which to list the Adaptive - # MT datasets. `projects/{project-number-or-id}/locations/{location-id}` - # @param page_size [::Integer] - # Optional. Requested page size. The server may return fewer results than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # Typically, this is the value of - # ListAdaptiveMtDatasetsResponse.next_page_token returned from the - # previous call to `ListAdaptiveMtDatasets` method. The first page is - # returned if `page_token`is empty or missing. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. - # Filter is not supported yet. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::AdaptiveMtDataset>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::AdaptiveMtDataset>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest.new - # - # # Call the list_adaptive_mt_datasets method. - # result = client.list_adaptive_mt_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::Translate::V3::AdaptiveMtDataset. - # p item - # end - # - def list_adaptive_mt_datasets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_adaptive_mt_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::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_adaptive_mt_datasets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_adaptive_mt_datasets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :list_adaptive_mt_datasets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @translation_service_stub, :list_adaptive_mt_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 - - ## - # Translate text using Adaptive MT. - # - # @overload adaptive_mt_translate(request, options = nil) - # Pass arguments to `adaptive_mt_translate` via a request object, either of type - # {::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload adaptive_mt_translate(parent: nil, dataset: nil, content: nil, reference_sentence_config: nil, glossary_config: nil) - # Pass arguments to `adaptive_mt_translate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Location to make a regional call. - # - # Format: `projects/{project-number-or-id}/locations/{location-id}`. - # @param dataset [::String] - # Required. The resource name for the dataset to use for adaptive MT. - # `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}` - # @param content [::Array<::String>] - # Required. The content of the input in string format. - # @param reference_sentence_config [::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::ReferenceSentenceConfig, ::Hash] - # Configuration for caller provided reference sentences. - # @param glossary_config [::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::GlossaryConfig, ::Hash] - # Optional. Glossary to be applied. The glossary must be - # within the same region (have the same location-id) as the model, otherwise - # an INVALID_ARGUMENT (400) error is returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest.new - # - # # Call the adaptive_mt_translate method. - # result = client.adaptive_mt_translate request - # - # # The returned object is of type Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse. - # p result - # - def adaptive_mt_translate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.adaptive_mt_translate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.adaptive_mt_translate.timeout, - metadata: metadata, - retry_policy: @config.rpcs.adaptive_mt_translate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :adaptive_mt_translate, request, 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 and AdaptiveMtFile - # - # @overload get_adaptive_mt_file(request, options = nil) - # Pass arguments to `get_adaptive_mt_file` via a request object, either of type - # {::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_adaptive_mt_file(name: nil) - # Pass arguments to `get_adaptive_mt_file` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the file, in form of - # `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Translate::V3::AdaptiveMtFile] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Translate::V3::AdaptiveMtFile] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest.new - # - # # Call the get_adaptive_mt_file method. - # result = client.get_adaptive_mt_file request - # - # # The returned object is of type Google::Cloud::Translate::V3::AdaptiveMtFile. - # p result - # - def get_adaptive_mt_file request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_adaptive_mt_file.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_adaptive_mt_file.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_adaptive_mt_file.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :get_adaptive_mt_file, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an AdaptiveMtFile along with its sentences. - # - # @overload delete_adaptive_mt_file(request, options = nil) - # Pass arguments to `delete_adaptive_mt_file` via a request object, either of type - # {::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_adaptive_mt_file(name: nil) - # Pass arguments to `delete_adaptive_mt_file` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the file to delete, in form of - # `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - # - # @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/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest.new - # - # # Call the delete_adaptive_mt_file method. - # result = client.delete_adaptive_mt_file request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_adaptive_mt_file request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest - - # Converts hash and nil to 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_adaptive_mt_file.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_adaptive_mt_file.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_adaptive_mt_file.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :delete_adaptive_mt_file, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports an AdaptiveMtFile and adds all of its sentences into the - # AdaptiveMtDataset. - # - # @overload import_adaptive_mt_file(request, options = nil) - # Pass arguments to `import_adaptive_mt_file` via a request object, either of type - # {::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_adaptive_mt_file(parent: nil, file_input_source: nil, gcs_input_source: nil) - # Pass arguments to `import_adaptive_mt_file` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the file, in form of - # `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}` - # @param file_input_source [::Google::Cloud::Translate::V3::FileInputSource, ::Hash] - # Inline file source. - # - # Note: The following parameters are mutually exclusive: `file_input_source`, `gcs_input_source`. 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 gcs_input_source [::Google::Cloud::Translate::V3::GcsInputSource, ::Hash] - # Google Cloud Storage file source. - # - # Note: The following parameters are mutually exclusive: `gcs_input_source`, `file_input_source`. 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::Translate::V3::ImportAdaptiveMtFileResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest.new - # - # # Call the import_adaptive_mt_file method. - # result = client.import_adaptive_mt_file request - # - # # The returned object is of type Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse. - # p result - # - def import_adaptive_mt_file request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest - - # Converts hash and nil to 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_adaptive_mt_file.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_adaptive_mt_file.timeout, - metadata: metadata, - retry_policy: @config.rpcs.import_adaptive_mt_file.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :import_adaptive_mt_file, request, 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 AdaptiveMtFiles associated to an AdaptiveMtDataset. - # - # @overload list_adaptive_mt_files(request, options = nil) - # Pass arguments to `list_adaptive_mt_files` via a request object, either of type - # {::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_adaptive_mt_files(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_adaptive_mt_files` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project from which to list the Adaptive - # MT files. - # `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` - # @param page_size [::Integer] - # Optional. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # Typically, this is the value of - # ListAdaptiveMtFilesResponse.next_page_token returned from the - # previous call to `ListAdaptiveMtFiles` method. The first page is - # returned if `page_token`is empty or missing. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::AdaptiveMtFile>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::AdaptiveMtFile>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest.new - # - # # Call the list_adaptive_mt_files method. - # result = client.list_adaptive_mt_files request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Translate::V3::AdaptiveMtFile. - # p item - # end - # - def list_adaptive_mt_files request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_adaptive_mt_files.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_adaptive_mt_files.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_adaptive_mt_files.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :list_adaptive_mt_files, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @translation_service_stub, :list_adaptive_mt_files, 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 - - ## - # Lists all AdaptiveMtSentences under a given file/dataset. - # - # @overload list_adaptive_mt_sentences(request, options = nil) - # Pass arguments to `list_adaptive_mt_sentences` via a request object, either of type - # {::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_adaptive_mt_sentences(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_adaptive_mt_sentences` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project from which to list the Adaptive - # MT files. The following format lists all sentences under a file. - # `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - # The following format lists all sentences within a dataset. - # `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` - # @param page_size [::Integer] - # @param page_token [::String] - # A token identifying a page of results the server should return. - # Typically, this is the value of - # ListAdaptiveMtSentencesRequest.next_page_token returned from the - # previous call to `ListTranslationMemories` method. The first page is - # returned if `page_token` is empty or missing. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::AdaptiveMtSentence>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::AdaptiveMtSentence>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest.new - # - # # Call the list_adaptive_mt_sentences method. - # result = client.list_adaptive_mt_sentences request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Translate::V3::AdaptiveMtSentence. - # p item - # end - # - def list_adaptive_mt_sentences request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_adaptive_mt_sentences.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_adaptive_mt_sentences.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_adaptive_mt_sentences.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :list_adaptive_mt_sentences, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @translation_service_stub, :list_adaptive_mt_sentences, 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 - - ## - # Import sentence pairs into translation Dataset. - # - # @overload import_data(request, options = nil) - # Pass arguments to `import_data` via a request object, either of type - # {::Google::Cloud::Translate::V3::ImportDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::ImportDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data(dataset: nil, input_config: nil) - # Pass arguments to `import_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param dataset [::String] - # Required. Name of the dataset. In form of - # `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` - # @param input_config [::Google::Cloud::Translate::V3::DatasetInputConfig, ::Hash] - # Required. The config for the input content. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::ImportDataRequest.new - # - # # Call the import_data method. - # result = client.import_data request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ImportDataRequest - - # Converts hash and nil to 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_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION - metadata[:"x-goog-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 - header_params["dataset"] = request.dataset - end - - request_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_data.timeout, - metadata: metadata, - retry_policy: @config.rpcs.import_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :import_data, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 dataset's data to the provided output location. - # - # @overload export_data(request, options = nil) - # Pass arguments to `export_data` via a request object, either of type - # {::Google::Cloud::Translate::V3::ExportDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::ExportDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data(dataset: nil, output_config: nil) - # Pass arguments to `export_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param dataset [::String] - # Required. Name of the dataset. In form of - # `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` - # @param output_config [::Google::Cloud::Translate::V3::DatasetOutputConfig, ::Hash] - # Required. The config for the output content. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::ExportDataRequest.new - # - # # Call the export_data method. - # result = client.export_data request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ExportDataRequest - - # Converts hash and nil to 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_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION - metadata[:"x-goog-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 - header_params["dataset"] = request.dataset - end - - request_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_data.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :export_data, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 sentence pairs in the dataset. - # - # @overload list_examples(request, options = nil) - # Pass arguments to `list_examples` via a request object, either of type - # {::Google::Cloud::Translate::V3::ListExamplesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::ListExamplesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_examples(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_examples` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the parent dataset. In form of - # `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` - # @param filter [::String] - # Optional. An expression for filtering the examples that will be returned. - # Example filter: - # * `usage=TRAIN` - # @param page_size [::Integer] - # Optional. Requested page size. The server can return fewer results than - # requested. - # @param page_token [::String] - # Optional. A token identifying a page of results for the server to return. - # Typically obtained from next_page_token field in the response of a - # ListExamples call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::Example>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::Example>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::ListExamplesRequest.new - # - # # Call the list_examples method. - # result = client.list_examples request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Translate::V3::Example. - # p item - # end - # - def list_examples request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ListExamplesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_examples.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_examples.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_examples.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.call_rpc :list_examples, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @translation_service_stub, :list_examples, 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 Model. - # - # @overload create_model(request, options = nil) - # Pass arguments to `create_model` via a request object, either of type - # {::Google::Cloud::Translate::V3::CreateModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::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: 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 project name, in form of - # `projects/{project}/locations/{location}` - # @param model [::Google::Cloud::Translate::V3::Model, ::Hash] - # Required. The Model 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/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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 - - @translation_service_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 - - ## - # Lists models. - # - # @overload list_models(request, options = nil) - # Pass arguments to `list_models` via a request object, either of type - # {::Google::Cloud::Translate::V3::ListModelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::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, filter: nil, page_size: nil, page_token: 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. Name of the parent project. In form of - # `projects/{project-number-or-id}/locations/{location-id}` - # @param filter [::String] - # Optional. An expression for filtering the models that will be returned. - # Supported filter: - # `dataset_id=${dataset_id}` - # @param page_size [::Integer] - # Optional. Requested page size. The server can return fewer results than - # requested. - # @param page_token [::String] - # Optional. A token identifying a page of results for the server to return. - # Typically obtained from next_page_token field in the response of a - # ListModels call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::Model>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Translate::V3::Model>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_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 - - @translation_service_stub.call_rpc :list_models, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @translation_service_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::Translate::V3::GetModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::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 to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Translate::V3::Model] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Translate::V3::Model] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::GetModelRequest.new - # - # # Call the get_model method. - # result = client.get_model request - # - # # The returned object is of type Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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 - - @translation_service_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 - - ## - # Deletes a model. - # - # @overload delete_model(request, options = nil) - # Pass arguments to `delete_model` via a request object, either of type - # {::Google::Cloud::Translate::V3::DeleteModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::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) - # 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 name of the model 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/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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 - - @translation_service_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 - - ## - # Configuration class for the TranslationService API. - # - # This class represents the configuration for TranslationService, - # 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::Translate::V3::TranslationService::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 - # # translate_text to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Translate::V3::TranslationService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.translate_text.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.translate_text.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::Translate::V3::TranslationService::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 = "translate.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 TranslationService 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 `translate_text` - # @return [::Gapic::Config::Method] - # - attr_reader :translate_text - ## - # RPC-specific configuration for `romanize_text` - # @return [::Gapic::Config::Method] - # - attr_reader :romanize_text - ## - # RPC-specific configuration for `detect_language` - # @return [::Gapic::Config::Method] - # - attr_reader :detect_language - ## - # RPC-specific configuration for `get_supported_languages` - # @return [::Gapic::Config::Method] - # - attr_reader :get_supported_languages - ## - # RPC-specific configuration for `translate_document` - # @return [::Gapic::Config::Method] - # - attr_reader :translate_document - ## - # RPC-specific configuration for `batch_translate_text` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_translate_text - ## - # RPC-specific configuration for `batch_translate_document` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_translate_document - ## - # RPC-specific configuration for `create_glossary` - # @return [::Gapic::Config::Method] - # - attr_reader :create_glossary - ## - # RPC-specific configuration for `update_glossary` - # @return [::Gapic::Config::Method] - # - attr_reader :update_glossary - ## - # RPC-specific configuration for `list_glossaries` - # @return [::Gapic::Config::Method] - # - attr_reader :list_glossaries - ## - # RPC-specific configuration for `get_glossary` - # @return [::Gapic::Config::Method] - # - attr_reader :get_glossary - ## - # RPC-specific configuration for `delete_glossary` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_glossary - ## - # RPC-specific configuration for `get_glossary_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :get_glossary_entry - ## - # RPC-specific configuration for `list_glossary_entries` - # @return [::Gapic::Config::Method] - # - attr_reader :list_glossary_entries - ## - # RPC-specific configuration for `create_glossary_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :create_glossary_entry - ## - # RPC-specific configuration for `update_glossary_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :update_glossary_entry - ## - # RPC-specific configuration for `delete_glossary_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_glossary_entry - ## - # RPC-specific configuration for `create_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_dataset - ## - # RPC-specific configuration for `get_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_dataset - ## - # RPC-specific configuration for `list_datasets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_datasets - ## - # RPC-specific configuration for `delete_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_dataset - ## - # RPC-specific configuration for `create_adaptive_mt_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_adaptive_mt_dataset - ## - # RPC-specific configuration for `delete_adaptive_mt_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_adaptive_mt_dataset - ## - # RPC-specific configuration for `get_adaptive_mt_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_adaptive_mt_dataset - ## - # RPC-specific configuration for `list_adaptive_mt_datasets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_adaptive_mt_datasets - ## - # RPC-specific configuration for `adaptive_mt_translate` - # @return [::Gapic::Config::Method] - # - attr_reader :adaptive_mt_translate - ## - # RPC-specific configuration for `get_adaptive_mt_file` - # @return [::Gapic::Config::Method] - # - attr_reader :get_adaptive_mt_file - ## - # RPC-specific configuration for `delete_adaptive_mt_file` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_adaptive_mt_file - ## - # RPC-specific configuration for `import_adaptive_mt_file` - # @return [::Gapic::Config::Method] - # - attr_reader :import_adaptive_mt_file - ## - # RPC-specific configuration for `list_adaptive_mt_files` - # @return [::Gapic::Config::Method] - # - attr_reader :list_adaptive_mt_files - ## - # RPC-specific configuration for `list_adaptive_mt_sentences` - # @return [::Gapic::Config::Method] - # - attr_reader :list_adaptive_mt_sentences - ## - # RPC-specific configuration for `import_data` - # @return [::Gapic::Config::Method] - # - attr_reader :import_data - ## - # RPC-specific configuration for `export_data` - # @return [::Gapic::Config::Method] - # - attr_reader :export_data - ## - # RPC-specific configuration for `list_examples` - # @return [::Gapic::Config::Method] - # - attr_reader :list_examples - ## - # RPC-specific configuration for `create_model` - # @return [::Gapic::Config::Method] - # - attr_reader :create_model - ## - # 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 `delete_model` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_model - - # @private - def initialize parent_rpcs = nil - translate_text_config = parent_rpcs.translate_text if parent_rpcs.respond_to? :translate_text - @translate_text = ::Gapic::Config::Method.new translate_text_config - romanize_text_config = parent_rpcs.romanize_text if parent_rpcs.respond_to? :romanize_text - @romanize_text = ::Gapic::Config::Method.new romanize_text_config - detect_language_config = parent_rpcs.detect_language if parent_rpcs.respond_to? :detect_language - @detect_language = ::Gapic::Config::Method.new detect_language_config - get_supported_languages_config = parent_rpcs.get_supported_languages if parent_rpcs.respond_to? :get_supported_languages - @get_supported_languages = ::Gapic::Config::Method.new get_supported_languages_config - translate_document_config = parent_rpcs.translate_document if parent_rpcs.respond_to? :translate_document - @translate_document = ::Gapic::Config::Method.new translate_document_config - batch_translate_text_config = parent_rpcs.batch_translate_text if parent_rpcs.respond_to? :batch_translate_text - @batch_translate_text = ::Gapic::Config::Method.new batch_translate_text_config - batch_translate_document_config = parent_rpcs.batch_translate_document if parent_rpcs.respond_to? :batch_translate_document - @batch_translate_document = ::Gapic::Config::Method.new batch_translate_document_config - create_glossary_config = parent_rpcs.create_glossary if parent_rpcs.respond_to? :create_glossary - @create_glossary = ::Gapic::Config::Method.new create_glossary_config - update_glossary_config = parent_rpcs.update_glossary if parent_rpcs.respond_to? :update_glossary - @update_glossary = ::Gapic::Config::Method.new update_glossary_config - list_glossaries_config = parent_rpcs.list_glossaries if parent_rpcs.respond_to? :list_glossaries - @list_glossaries = ::Gapic::Config::Method.new list_glossaries_config - get_glossary_config = parent_rpcs.get_glossary if parent_rpcs.respond_to? :get_glossary - @get_glossary = ::Gapic::Config::Method.new get_glossary_config - delete_glossary_config = parent_rpcs.delete_glossary if parent_rpcs.respond_to? :delete_glossary - @delete_glossary = ::Gapic::Config::Method.new delete_glossary_config - get_glossary_entry_config = parent_rpcs.get_glossary_entry if parent_rpcs.respond_to? :get_glossary_entry - @get_glossary_entry = ::Gapic::Config::Method.new get_glossary_entry_config - list_glossary_entries_config = parent_rpcs.list_glossary_entries if parent_rpcs.respond_to? :list_glossary_entries - @list_glossary_entries = ::Gapic::Config::Method.new list_glossary_entries_config - create_glossary_entry_config = parent_rpcs.create_glossary_entry if parent_rpcs.respond_to? :create_glossary_entry - @create_glossary_entry = ::Gapic::Config::Method.new create_glossary_entry_config - update_glossary_entry_config = parent_rpcs.update_glossary_entry if parent_rpcs.respond_to? :update_glossary_entry - @update_glossary_entry = ::Gapic::Config::Method.new update_glossary_entry_config - delete_glossary_entry_config = parent_rpcs.delete_glossary_entry if parent_rpcs.respond_to? :delete_glossary_entry - @delete_glossary_entry = ::Gapic::Config::Method.new delete_glossary_entry_config - create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset - @create_dataset = ::Gapic::Config::Method.new create_dataset_config - get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset - @get_dataset = ::Gapic::Config::Method.new get_dataset_config - list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets - @list_datasets = ::Gapic::Config::Method.new list_datasets_config - delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset - @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config - create_adaptive_mt_dataset_config = parent_rpcs.create_adaptive_mt_dataset if parent_rpcs.respond_to? :create_adaptive_mt_dataset - @create_adaptive_mt_dataset = ::Gapic::Config::Method.new create_adaptive_mt_dataset_config - delete_adaptive_mt_dataset_config = parent_rpcs.delete_adaptive_mt_dataset if parent_rpcs.respond_to? :delete_adaptive_mt_dataset - @delete_adaptive_mt_dataset = ::Gapic::Config::Method.new delete_adaptive_mt_dataset_config - get_adaptive_mt_dataset_config = parent_rpcs.get_adaptive_mt_dataset if parent_rpcs.respond_to? :get_adaptive_mt_dataset - @get_adaptive_mt_dataset = ::Gapic::Config::Method.new get_adaptive_mt_dataset_config - list_adaptive_mt_datasets_config = parent_rpcs.list_adaptive_mt_datasets if parent_rpcs.respond_to? :list_adaptive_mt_datasets - @list_adaptive_mt_datasets = ::Gapic::Config::Method.new list_adaptive_mt_datasets_config - adaptive_mt_translate_config = parent_rpcs.adaptive_mt_translate if parent_rpcs.respond_to? :adaptive_mt_translate - @adaptive_mt_translate = ::Gapic::Config::Method.new adaptive_mt_translate_config - get_adaptive_mt_file_config = parent_rpcs.get_adaptive_mt_file if parent_rpcs.respond_to? :get_adaptive_mt_file - @get_adaptive_mt_file = ::Gapic::Config::Method.new get_adaptive_mt_file_config - delete_adaptive_mt_file_config = parent_rpcs.delete_adaptive_mt_file if parent_rpcs.respond_to? :delete_adaptive_mt_file - @delete_adaptive_mt_file = ::Gapic::Config::Method.new delete_adaptive_mt_file_config - import_adaptive_mt_file_config = parent_rpcs.import_adaptive_mt_file if parent_rpcs.respond_to? :import_adaptive_mt_file - @import_adaptive_mt_file = ::Gapic::Config::Method.new import_adaptive_mt_file_config - list_adaptive_mt_files_config = parent_rpcs.list_adaptive_mt_files if parent_rpcs.respond_to? :list_adaptive_mt_files - @list_adaptive_mt_files = ::Gapic::Config::Method.new list_adaptive_mt_files_config - list_adaptive_mt_sentences_config = parent_rpcs.list_adaptive_mt_sentences if parent_rpcs.respond_to? :list_adaptive_mt_sentences - @list_adaptive_mt_sentences = ::Gapic::Config::Method.new list_adaptive_mt_sentences_config - import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data - @import_data = ::Gapic::Config::Method.new import_data_config - export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data - @export_data = ::Gapic::Config::Method.new export_data_config - list_examples_config = parent_rpcs.list_examples if parent_rpcs.respond_to? :list_examples - @list_examples = ::Gapic::Config::Method.new list_examples_config - create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model - @create_model = ::Gapic::Config::Method.new create_model_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 - delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model - @delete_model = ::Gapic::Config::Method.new delete_model_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/credentials.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/credentials.rb deleted file mode 100644 index 8cca11bc3a91..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/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 Translate - module V3 - module TranslationService - # Credentials for the TranslationService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-translation" - ] - self.env_vars = [ - "TRANSLATE_CREDENTIALS", - "TRANSLATE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "TRANSLATE_CREDENTIALS_JSON", - "TRANSLATE_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-translate-v3/lib/google/cloud/translate/v3/translation_service/operations.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/operations.rb deleted file mode 100644 index 6bd74364f287..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/operations.rb +++ /dev/null @@ -1,849 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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 Translate - module V3 - module TranslationService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "translate.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the TranslationService 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 TranslationService 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::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Translate::V3::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - 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 = "translate.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-translate-v3/lib/google/cloud/translate/v3/translation_service/paths.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/paths.rb deleted file mode 100644 index 1f51c2c96070..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/paths.rb +++ /dev/null @@ -1,168 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Translate - module V3 - module TranslationService - # Path helper methods for the TranslationService API. - module Paths - ## - # Create a fully-qualified AdaptiveMtDataset resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` - # - # @param project [String] - # @param location [String] - # @param dataset [String] - # - # @return [::String] - def adaptive_mt_dataset_path project:, location:, dataset: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/adaptiveMtDatasets/#{dataset}" - end - - ## - # Create a fully-qualified AdaptiveMtFile resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - # - # @param project [String] - # @param location [String] - # @param dataset [String] - # @param file [String] - # - # @return [::String] - def adaptive_mt_file_path project:, location:, dataset:, file: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" - - "projects/#{project}/locations/#{location}/adaptiveMtDatasets/#{dataset}/adaptiveMtFiles/#{file}" - end - - ## - # Create a fully-qualified Dataset resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/datasets/{dataset}` - # - # @param project [String] - # @param location [String] - # @param dataset [String] - # - # @return [::String] - def dataset_path project:, location:, dataset: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/datasets/#{dataset}" - end - - ## - # Create a fully-qualified Glossary resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/glossaries/{glossary}` - # - # @param project [String] - # @param location [String] - # @param glossary [String] - # - # @return [::String] - def glossary_path project:, location:, glossary: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/glossaries/#{glossary}" - end - - ## - # Create a fully-qualified GlossaryEntry resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/glossaries/{glossary}/glossaryEntries/{glossary_entry}` - # - # @param project [String] - # @param location [String] - # @param glossary [String] - # @param glossary_entry [String] - # - # @return [::String] - def glossary_entry_path project:, location:, glossary:, glossary_entry: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "glossary cannot contain /" if glossary.to_s.include? "/" - - "projects/#{project}/locations/#{location}/glossaries/#{glossary}/glossaryEntries/#{glossary_entry}" - 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}/locations/{location}/models/{model}` - # - # @param project [String] - # @param location [String] - # @param model [String] - # - # @return [::String] - def model_path project:, location:, model: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/models/#{model}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest.rb deleted file mode 100644 index 7aa1906ff964..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_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/translate/v3/version" -require "google/cloud/translate/v3/bindings_override" - -require "google/cloud/translate/v3/translation_service/credentials" -require "google/cloud/translate/v3/translation_service/paths" -require "google/cloud/translate/v3/translation_service/rest/operations" -require "google/cloud/translate/v3/translation_service/rest/client" - -module Google - module Cloud - module Translate - module V3 - ## - # Provides natural language translation operations. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/translate/v3/translation_service/rest" - # client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - module TranslationService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/translate/v3/translation_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/client.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/client.rb deleted file mode 100644 index bd67b608db1b..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/client.rb +++ /dev/null @@ -1,4313 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/translate/v3/translation_service_pb" -require "google/cloud/translate/v3/translation_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Translate - module V3 - module TranslationService - module Rest - ## - # REST client for the TranslationService service. - # - # Provides natural language translation operations. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "translate.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :translation_service_stub - - ## - # Configure the TranslationService Client class. - # - # See {::Google::Cloud::Translate::V3::TranslationService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TranslationService clients - # ::Google::Cloud::Translate::V3::TranslationService::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", "Translate", "V3"] - 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.translate_text.timeout = 600.0 - - default_config.rpcs.detect_language.timeout = 600.0 - - default_config.rpcs.get_supported_languages.timeout = 600.0 - default_config.rpcs.get_supported_languages.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.translate_document.timeout = 600.0 - - default_config.rpcs.batch_translate_text.timeout = 600.0 - - default_config.rpcs.batch_translate_document.timeout = 600.0 - - default_config.rpcs.create_glossary.timeout = 600.0 - - default_config.rpcs.list_glossaries.timeout = 600.0 - default_config.rpcs.list_glossaries.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_glossary.timeout = 600.0 - default_config.rpcs.get_glossary.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_glossary.timeout = 600.0 - default_config.rpcs.delete_glossary.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TranslationService 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::Translate::V3::TranslationService::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 - @translation_service_stub.universe_domain - end - - ## - # Create a new TranslationService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TranslationService 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::Translate::V3::TranslationService::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 - - @translation_service_stub = ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @translation_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 = @translation_service_stub.endpoint - config.universe_domain = @translation_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @translation_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 = @translation_service_stub.endpoint - config.universe_domain = @translation_service_stub.universe_domain - config.logger = @translation_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Translate::V3::TranslationService::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 - @translation_service_stub.logger - end - - # Service calls - - ## - # Translates input text and returns translated text. - # - # @overload translate_text(request, options = nil) - # Pass arguments to `translate_text` via a request object, either of type - # {::Google::Cloud::Translate::V3::TranslateTextRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::TranslateTextRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload translate_text(contents: nil, mime_type: nil, source_language_code: nil, target_language_code: nil, parent: nil, model: nil, glossary_config: nil, transliteration_config: nil, labels: nil) - # Pass arguments to `translate_text` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param contents [::Array<::String>] - # Required. The content of the input in string format. - # We recommend the total content be less than 30,000 codepoints. The max - # length of this field is 1024. Use BatchTranslateText for larger text. - # @param mime_type [::String] - # Optional. The format of the source text, for example, "text/html", - # "text/plain". If left blank, the MIME type defaults to "text/html". - # @param source_language_code [::String] - # Optional. The ISO-639 language code of the input text if - # known, for example, "en-US" or "sr-Latn". Supported language codes are - # listed in [Language - # Support](https://cloud.google.com/translate/docs/languages). If the source - # language isn't specified, the API attempts to identify the source language - # automatically and returns the source language within the response. - # @param target_language_code [::String] - # Required. The ISO-639 language code to use for translation of the input - # text, set to one of the language codes listed in [Language - # Support](https://cloud.google.com/translate/docs/languages). - # @param parent [::String] - # Required. Project or location to make a call. Must refer to a caller's - # project. - # - # Format: `projects/{project-number-or-id}` or - # `projects/{project-number-or-id}/locations/{location-id}`. - # - # For global calls, use `projects/{project-number-or-id}/locations/global` or - # `projects/{project-number-or-id}`. - # - # Non-global location is required for requests using AutoML models or - # custom glossaries. - # - # Models and glossaries must be within the same region (have same - # location-id), otherwise an INVALID_ARGUMENT (400) error is returned. - # @param model [::String] - # Optional. The `model` type requested for this translation. - # - # The format depends on model type: - # - # - AutoML Translation models: - # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - # - # - General (built-in) models: - # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - # - # - Translation LLM models: - # `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, - # - # For global (non-regionalized) requests, use `location-id` `global`. - # For example, - # `projects/{project-number-or-id}/locations/global/models/general/nmt`. - # - # If not provided, the default Google model (NMT) will be used - # @param glossary_config [::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig, ::Hash] - # Optional. Glossary to be applied. The glossary must be - # within the same region (have the same location-id) as the model, otherwise - # an INVALID_ARGUMENT (400) error is returned. - # @param transliteration_config [::Google::Cloud::Translate::V3::TransliterationConfig, ::Hash] - # Optional. Transliteration to be applied. - # @param labels [::Hash{::String => ::String}] - # Optional. The labels with user-defined metadata for the request. - # - # Label keys and values can be no longer than 63 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # Label values are optional. Label keys must start with a letter. - # - # See https://cloud.google.com/translate/docs/advanced/labels for more - # information. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::TranslateTextResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::TranslateTextResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::TranslateTextRequest.new - # - # # Call the translate_text method. - # result = client.translate_text request - # - # # The returned object is of type Google::Cloud::Translate::V3::TranslateTextResponse. - # p result - # - def translate_text request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::TranslateTextRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.translate_text.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.translate_text.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.translate_text.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.translate_text request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Romanize input text written in non-Latin scripts to Latin text. - # - # @overload romanize_text(request, options = nil) - # Pass arguments to `romanize_text` via a request object, either of type - # {::Google::Cloud::Translate::V3::RomanizeTextRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::RomanizeTextRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload romanize_text(parent: nil, contents: nil, source_language_code: nil) - # Pass arguments to `romanize_text` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project or location to make a call. Must refer to a caller's - # project. - # - # Format: `projects/{project-number-or-id}/locations/{location-id}` or - # `projects/{project-number-or-id}`. - # - # For global calls, use `projects/{project-number-or-id}/locations/global` or - # `projects/{project-number-or-id}`. - # @param contents [::Array<::String>] - # Required. The content of the input in string format. - # @param source_language_code [::String] - # Optional. The ISO-639 language code of the input text if - # known, for example, "hi" or "zh". Supported language codes are - # listed in [Language - # Support](https://cloud.google.com/translate/docs/languages#roman). If the - # source language isn't specified, the API attempts to identify the source - # language automatically and returns the source language for each content in - # the response. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::RomanizeTextResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::RomanizeTextResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::RomanizeTextRequest.new - # - # # Call the romanize_text method. - # result = client.romanize_text request - # - # # The returned object is of type Google::Cloud::Translate::V3::RomanizeTextResponse. - # p result - # - def romanize_text request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::RomanizeTextRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.romanize_text.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.romanize_text.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.romanize_text.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.romanize_text request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Detects the language of text within a request. - # - # @overload detect_language(request, options = nil) - # Pass arguments to `detect_language` via a request object, either of type - # {::Google::Cloud::Translate::V3::DetectLanguageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::DetectLanguageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload detect_language(parent: nil, model: nil, content: nil, mime_type: nil, labels: nil) - # Pass arguments to `detect_language` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project or location to make a call. Must refer to a caller's - # project. - # - # Format: `projects/{project-number-or-id}/locations/{location-id}` or - # `projects/{project-number-or-id}`. - # - # For global calls, use `projects/{project-number-or-id}/locations/global` or - # `projects/{project-number-or-id}`. - # - # Only models within the same region (has same location-id) can be used. - # Otherwise an INVALID_ARGUMENT (400) error is returned. - # @param model [::String] - # Optional. The language detection model to be used. - # - # Format: - # `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` - # - # Only one language detection model is currently supported: - # `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. - # - # If not specified, the default model is used. - # @param content [::String] - # The content of the input stored as a string. - # @param mime_type [::String] - # Optional. The format of the source text, for example, "text/html", - # "text/plain". If left blank, the MIME type defaults to "text/html". - # @param labels [::Hash{::String => ::String}] - # Optional. The labels with user-defined metadata for the request. - # - # Label keys and values can be no longer than 63 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # Label values are optional. Label keys must start with a letter. - # - # See https://cloud.google.com/translate/docs/advanced/labels for more - # information. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::DetectLanguageResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::DetectLanguageResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::DetectLanguageRequest.new - # - # # Call the detect_language method. - # result = client.detect_language request - # - # # The returned object is of type Google::Cloud::Translate::V3::DetectLanguageResponse. - # p result - # - def detect_language request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::DetectLanguageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.detect_language.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.detect_language.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.detect_language.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.detect_language request, 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 supported languages for translation. - # - # @overload get_supported_languages(request, options = nil) - # Pass arguments to `get_supported_languages` via a request object, either of type - # {::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_supported_languages(parent: nil, display_language_code: nil, model: nil) - # Pass arguments to `get_supported_languages` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project or location to make a call. Must refer to a caller's - # project. - # - # Format: `projects/{project-number-or-id}` or - # `projects/{project-number-or-id}/locations/{location-id}`. - # - # For global calls, use `projects/{project-number-or-id}/locations/global` or - # `projects/{project-number-or-id}`. - # - # Non-global location is required for AutoML models. - # - # Only models within the same region (have same location-id) can be used, - # otherwise an INVALID_ARGUMENT (400) error is returned. - # @param display_language_code [::String] - # Optional. The language to use to return localized, human readable names - # of supported languages. If missing, then display names are not returned - # in a response. - # @param model [::String] - # Optional. Get supported languages of this model. - # - # The format depends on model type: - # - # - AutoML Translation models: - # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - # - # - General (built-in) models: - # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - # - # - # Returns languages supported by the specified model. - # If missing, we get supported languages of Google general NMT model. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::SupportedLanguages] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::SupportedLanguages] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::GetSupportedLanguagesRequest.new - # - # # Call the get_supported_languages method. - # result = client.get_supported_languages request - # - # # The returned object is of type Google::Cloud::Translate::V3::SupportedLanguages. - # p result - # - def get_supported_languages request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_supported_languages.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_supported_languages.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_supported_languages.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.get_supported_languages request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Translates documents in synchronous mode. - # - # @overload translate_document(request, options = nil) - # Pass arguments to `translate_document` via a request object, either of type - # {::Google::Cloud::Translate::V3::TranslateDocumentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::TranslateDocumentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload translate_document(parent: nil, source_language_code: nil, target_language_code: nil, document_input_config: nil, document_output_config: nil, model: nil, glossary_config: nil, labels: nil, customized_attribution: nil, is_translate_native_pdf_only: nil, enable_shadow_removal_native_pdf: nil, enable_rotation_correction: nil) - # Pass arguments to `translate_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. Location to make a regional call. - # - # Format: `projects/{project-number-or-id}/locations/{location-id}`. - # - # For global calls, use `projects/{project-number-or-id}/locations/global` or - # `projects/{project-number-or-id}`. - # - # Non-global location is required for requests using AutoML models or custom - # glossaries. - # - # Models and glossaries must be within the same region (have the same - # location-id), otherwise an INVALID_ARGUMENT (400) error is returned. - # @param source_language_code [::String] - # Optional. The ISO-639 language code of the input document if known, for - # example, "en-US" or "sr-Latn". Supported language codes are listed in - # [Language Support](https://cloud.google.com/translate/docs/languages). If - # the source language isn't specified, the API attempts to identify the - # source language automatically and returns the source language within the - # response. Source language must be specified if the request contains a - # glossary or a custom model. - # @param target_language_code [::String] - # Required. The ISO-639 language code to use for translation of the input - # document, set to one of the language codes listed in [Language - # Support](https://cloud.google.com/translate/docs/languages). - # @param document_input_config [::Google::Cloud::Translate::V3::DocumentInputConfig, ::Hash] - # Required. Input configurations. - # @param document_output_config [::Google::Cloud::Translate::V3::DocumentOutputConfig, ::Hash] - # Optional. Output configurations. - # Defines if the output file should be stored within Cloud Storage as well - # as the desired output format. If not provided the translated file will - # only be returned through a byte-stream and its output mime type will be - # the same as the input file's mime type. - # @param model [::String] - # Optional. The `model` type requested for this translation. - # - # The format depends on model type: - # - # - AutoML Translation models: - # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - # - # - General (built-in) models: - # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - # - # - # If not provided, the default Google model (NMT) will be used for - # translation. - # @param glossary_config [::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig, ::Hash] - # Optional. Glossary to be applied. The glossary must be within the same - # region (have the same location-id) as the model, otherwise an - # INVALID_ARGUMENT (400) error is returned. - # @param labels [::Hash{::String => ::String}] - # Optional. The labels with user-defined metadata for the request. - # - # Label keys and values can be no longer than 63 characters (Unicode - # codepoints), can only contain lowercase letters, numeric characters, - # underscores and dashes. International characters are allowed. Label values - # are optional. Label keys must start with a letter. - # - # See https://cloud.google.com/translate/docs/advanced/labels for more - # information. - # @param customized_attribution [::String] - # Optional. This flag is to support user customized attribution. - # If not provided, the default is `Machine Translated by Google`. - # Customized attribution should follow rules in - # https://cloud.google.com/translate/attribution#attribution_and_logos - # @param is_translate_native_pdf_only [::Boolean] - # Optional. is_translate_native_pdf_only field for external customers. - # If true, the page limit of online native pdf translation is 300 and only - # native pdf pages will be translated. - # @param enable_shadow_removal_native_pdf [::Boolean] - # Optional. If true, use the text removal server to remove the shadow text on - # background image for native pdf translation. - # Shadow removal feature can only be enabled when - # is_translate_native_pdf_only: false && pdf_native_only: false - # @param enable_rotation_correction [::Boolean] - # Optional. If true, enable auto rotation correction in DVS. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::TranslateDocumentResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::TranslateDocumentResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::TranslateDocumentRequest.new - # - # # Call the translate_document method. - # result = client.translate_document request - # - # # The returned object is of type Google::Cloud::Translate::V3::TranslateDocumentResponse. - # p result - # - def translate_document request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::TranslateDocumentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.translate_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::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.translate_document.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.translate_document.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.translate_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 - - ## - # Translates a large volume of text in asynchronous batch mode. - # This function provides real-time output as the inputs are being processed. - # If caller cancels a request, the partial results (for an input file, it's - # all or nothing) may still be available on the specified output location. - # - # This call returns immediately and you can - # use google.longrunning.Operation.name to poll the status of the call. - # - # @overload batch_translate_text(request, options = nil) - # Pass arguments to `batch_translate_text` via a request object, either of type - # {::Google::Cloud::Translate::V3::BatchTranslateTextRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::BatchTranslateTextRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_translate_text(parent: nil, source_language_code: nil, target_language_codes: nil, models: nil, input_configs: nil, output_config: nil, glossaries: nil, labels: nil) - # Pass arguments to `batch_translate_text` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Location to make a call. Must refer to a caller's project. - # - # Format: `projects/{project-number-or-id}/locations/{location-id}`. - # - # The `global` location is not supported for batch translation. - # - # Only AutoML Translation models or glossaries within the same region (have - # the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) - # error is returned. - # @param source_language_code [::String] - # Required. Source language code. Supported language codes are listed in - # [Language - # Support](https://cloud.google.com/translate/docs/languages). - # @param target_language_codes [::Array<::String>] - # Required. Specify up to 10 language codes here. Supported language codes - # are listed in [Language - # Support](https://cloud.google.com/translate/docs/languages). - # @param models [::Hash{::String => ::String}] - # Optional. The models to use for translation. Map's key is target language - # code. Map's value is model name. Value can be a built-in general model, - # or an AutoML Translation model. - # - # The value format depends on model type: - # - # - AutoML Translation models: - # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - # - # - General (built-in) models: - # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - # - # - # If the map is empty or a specific model is - # not requested for a language pair, then default google model (nmt) is used. - # @param input_configs [::Array<::Google::Cloud::Translate::V3::InputConfig, ::Hash>] - # Required. Input configurations. - # The total number of files matched should be <= 100. - # The total content size should be <= 100M Unicode codepoints. - # The files must use UTF-8 encoding. - # @param output_config [::Google::Cloud::Translate::V3::OutputConfig, ::Hash] - # Required. Output configuration. - # If 2 input configs match to the same file (that is, same input path), - # we don't generate output for duplicate inputs. - # @param glossaries [::Hash{::String => ::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig, ::Hash}] - # Optional. Glossaries to be applied for translation. - # It's keyed by target language code. - # @param labels [::Hash{::String => ::String}] - # Optional. The labels with user-defined metadata for the request. - # - # Label keys and values can be no longer than 63 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # Label values are optional. Label keys must start with a letter. - # - # See https://cloud.google.com/translate/docs/advanced/labels for more - # information. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::BatchTranslateTextRequest.new - # - # # Call the batch_translate_text method. - # result = client.batch_translate_text request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def batch_translate_text request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::BatchTranslateTextRequest - - # Converts hash and nil to an 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_translate_text.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_translate_text.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_translate_text.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.batch_translate_text request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Translates a large volume of document in asynchronous batch mode. - # This function provides real-time output as the inputs are being processed. - # If caller cancels a request, the partial results (for an input file, it's - # all or nothing) may still be available on the specified output location. - # - # This call returns immediately and you can use - # google.longrunning.Operation.name to poll the status of the call. - # - # @overload batch_translate_document(request, options = nil) - # Pass arguments to `batch_translate_document` via a request object, either of type - # {::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_translate_document(parent: nil, source_language_code: nil, target_language_codes: nil, input_configs: nil, output_config: nil, models: nil, glossaries: nil, format_conversions: nil, customized_attribution: nil, enable_shadow_removal_native_pdf: nil, enable_rotation_correction: nil) - # Pass arguments to `batch_translate_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. Location to make a regional call. - # - # Format: `projects/{project-number-or-id}/locations/{location-id}`. - # - # The `global` location is not supported for batch translation. - # - # Only AutoML Translation models or glossaries within the same region (have - # the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) - # error is returned. - # @param source_language_code [::String] - # Required. The ISO-639 language code of the input document if known, for - # example, "en-US" or "sr-Latn". Supported language codes are listed in - # [Language Support](https://cloud.google.com/translate/docs/languages). - # @param target_language_codes [::Array<::String>] - # Required. The ISO-639 language code to use for translation of the input - # document. Specify up to 10 language codes here. Supported language codes - # are listed in [Language - # Support](https://cloud.google.com/translate/docs/languages). - # @param input_configs [::Array<::Google::Cloud::Translate::V3::BatchDocumentInputConfig, ::Hash>] - # Required. Input configurations. - # The total number of files matched should be <= 100. - # The total content size to translate should be <= 100M Unicode codepoints. - # The files must use UTF-8 encoding. - # @param output_config [::Google::Cloud::Translate::V3::BatchDocumentOutputConfig, ::Hash] - # Required. Output configuration. - # If 2 input configs match to the same file (that is, same input path), - # we don't generate output for duplicate inputs. - # @param models [::Hash{::String => ::String}] - # Optional. The models to use for translation. Map's key is target language - # code. Map's value is the model name. Value can be a built-in general model, - # or an AutoML Translation model. - # - # The value format depends on model type: - # - # - AutoML Translation models: - # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - # - # - General (built-in) models: - # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - # - # - # If the map is empty or a specific model is - # not requested for a language pair, then default google model (nmt) is used. - # @param glossaries [::Hash{::String => ::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig, ::Hash}] - # Optional. Glossaries to be applied. It's keyed by target language code. - # @param format_conversions [::Hash{::String => ::String}] - # Optional. The file format conversion map that is applied to all input - # files. The map key is the original mime_type. The map value is the target - # mime_type of translated documents. - # - # Supported file format conversion includes: - # - `application/pdf` to - # `application/vnd.openxmlformats-officedocument.wordprocessingml.document` - # - # If nothing specified, output files will be in the same format as the - # original file. - # @param customized_attribution [::String] - # Optional. This flag is to support user customized attribution. - # If not provided, the default is `Machine Translated by Google`. - # Customized attribution should follow rules in - # https://cloud.google.com/translate/attribution#attribution_and_logos - # @param enable_shadow_removal_native_pdf [::Boolean] - # Optional. If true, use the text removal server to remove the shadow text on - # background image for native pdf translation. - # Shadow removal feature can only be enabled when - # is_translate_native_pdf_only: false && pdf_native_only: false - # @param enable_rotation_correction [::Boolean] - # Optional. If true, enable auto rotation correction in DVS. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::BatchTranslateDocumentRequest.new - # - # # Call the batch_translate_document method. - # result = client.batch_translate_document request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def batch_translate_document request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest - - # Converts hash and nil to an 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_translate_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::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_translate_document.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_translate_document.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.batch_translate_document request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 glossary and returns the long-running operation. Returns - # NOT_FOUND, if the project doesn't exist. - # - # @overload create_glossary(request, options = nil) - # Pass arguments to `create_glossary` via a request object, either of type - # {::Google::Cloud::Translate::V3::CreateGlossaryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::CreateGlossaryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_glossary(parent: nil, glossary: nil) - # Pass arguments to `create_glossary` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project name. - # @param glossary [::Google::Cloud::Translate::V3::Glossary, ::Hash] - # Required. The glossary 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/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::CreateGlossaryRequest.new - # - # # Call the create_glossary method. - # result = client.create_glossary request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_glossary request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::CreateGlossaryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_glossary.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_glossary.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_glossary.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.create_glossary request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a glossary. A LRO is used since the update can be async if the - # glossary's entry file is updated. - # - # @overload update_glossary(request, options = nil) - # Pass arguments to `update_glossary` via a request object, either of type - # {::Google::Cloud::Translate::V3::UpdateGlossaryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::UpdateGlossaryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_glossary(glossary: nil, update_mask: nil) - # Pass arguments to `update_glossary` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param glossary [::Google::Cloud::Translate::V3::Glossary, ::Hash] - # Required. The glossary entry to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. Currently only `display_name` and - # 'input_config' - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::UpdateGlossaryRequest.new - # - # # Call the update_glossary method. - # result = client.update_glossary request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_glossary request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::UpdateGlossaryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_glossary.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_glossary.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_glossary.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.update_glossary request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't - # exist. - # - # @overload list_glossaries(request, options = nil) - # Pass arguments to `list_glossaries` via a request object, either of type - # {::Google::Cloud::Translate::V3::ListGlossariesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::ListGlossariesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_glossaries(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_glossaries` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the project from which to list all of the glossaries. - # @param page_size [::Integer] - # Optional. Requested page size. The server may return fewer glossaries than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # Typically, this is the value of [ListGlossariesResponse.next_page_token] - # returned from the previous call to `ListGlossaries` method. - # The first page is returned if `page_token`is empty or missing. - # @param filter [::String] - # Optional. Filter specifying constraints of a list operation. - # Specify the constraint by the format of "key=value", where key must be - # "src" or "tgt", and the value must be a valid language code. - # For multiple restrictions, concatenate them by "AND" (uppercase only), - # such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used - # here, which means using 'en-US' and 'en' can lead to different results, - # which depends on the language code you used when you create the glossary. - # For the unidirectional glossaries, the "src" and "tgt" add restrictions - # on the source and target language code separately. - # For the equivalent term set glossaries, the "src" and/or "tgt" add - # restrictions on the term set. - # For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional - # glossaries which exactly match the source language code as "en-US" and the - # target language code "zh-CN", but all equivalent term set glossaries which - # contain "en-US" and "zh-CN" in their language set will be picked. - # If missing, no filtering is performed. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::Glossary>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::Glossary>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::ListGlossariesRequest.new - # - # # Call the list_glossaries method. - # result = client.list_glossaries request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Translate::V3::Glossary. - # p item - # end - # - def list_glossaries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ListGlossariesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_glossaries.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_glossaries.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_glossaries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.list_glossaries request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @translation_service_stub, :list_glossaries, "glossaries", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a glossary. Returns NOT_FOUND, if the glossary doesn't - # exist. - # - # @overload get_glossary(request, options = nil) - # Pass arguments to `get_glossary` via a request object, either of type - # {::Google::Cloud::Translate::V3::GetGlossaryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::GetGlossaryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_glossary(name: nil) - # Pass arguments to `get_glossary` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the glossary to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::Glossary] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::Glossary] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::GetGlossaryRequest.new - # - # # Call the get_glossary method. - # result = client.get_glossary request - # - # # The returned object is of type Google::Cloud::Translate::V3::Glossary. - # p result - # - def get_glossary request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::GetGlossaryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_glossary.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_glossary.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_glossary.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.get_glossary request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a glossary, or cancels glossary construction - # if the glossary isn't created yet. - # Returns NOT_FOUND, if the glossary doesn't exist. - # - # @overload delete_glossary(request, options = nil) - # Pass arguments to `delete_glossary` via a request object, either of type - # {::Google::Cloud::Translate::V3::DeleteGlossaryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::DeleteGlossaryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_glossary(name: nil) - # Pass arguments to `delete_glossary` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the glossary to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::DeleteGlossaryRequest.new - # - # # Call the delete_glossary method. - # result = client.delete_glossary request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_glossary request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::DeleteGlossaryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_glossary.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_glossary.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_glossary.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.delete_glossary request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a single glossary entry by the given id. - # - # @overload get_glossary_entry(request, options = nil) - # Pass arguments to `get_glossary_entry` via a request object, either of type - # {::Google::Cloud::Translate::V3::GetGlossaryEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::GetGlossaryEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_glossary_entry(name: nil) - # Pass arguments to `get_glossary_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the glossary entry to get - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::GlossaryEntry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::GlossaryEntry] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::GetGlossaryEntryRequest.new - # - # # Call the get_glossary_entry method. - # result = client.get_glossary_entry request - # - # # The returned object is of type Google::Cloud::Translate::V3::GlossaryEntry. - # p result - # - def get_glossary_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::GetGlossaryEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_glossary_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::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_glossary_entry.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_glossary_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.get_glossary_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 - - ## - # List the entries for the glossary. - # - # @overload list_glossary_entries(request, options = nil) - # Pass arguments to `list_glossary_entries` via a request object, either of type - # {::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_glossary_entries(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_glossary_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 parent glossary resource name for listing the glossary's - # entries. - # @param page_size [::Integer] - # Optional. Requested page size. The server may return fewer glossary entries - # than requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # Typically, this is the value of - # [ListGlossaryEntriesResponse.next_page_token] returned from the previous - # call. The first page is returned if `page_token`is empty or missing. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::GlossaryEntry>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::GlossaryEntry>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::ListGlossaryEntriesRequest.new - # - # # Call the list_glossary_entries method. - # result = client.list_glossary_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::Translate::V3::GlossaryEntry. - # p item - # end - # - def list_glossary_entries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_glossary_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::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_glossary_entries.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_glossary_entries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.list_glossary_entries request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @translation_service_stub, :list_glossary_entries, "glossary_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 - - ## - # Creates a glossary entry. - # - # @overload create_glossary_entry(request, options = nil) - # Pass arguments to `create_glossary_entry` via a request object, either of type - # {::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_glossary_entry(parent: nil, glossary_entry: nil) - # Pass arguments to `create_glossary_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the glossary to create the entry under. - # @param glossary_entry [::Google::Cloud::Translate::V3::GlossaryEntry, ::Hash] - # Required. The glossary entry to create - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::GlossaryEntry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::GlossaryEntry] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::CreateGlossaryEntryRequest.new - # - # # Call the create_glossary_entry method. - # result = client.create_glossary_entry request - # - # # The returned object is of type Google::Cloud::Translate::V3::GlossaryEntry. - # p result - # - def create_glossary_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_glossary_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::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_glossary_entry.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_glossary_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.create_glossary_entry request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a glossary entry. - # - # @overload update_glossary_entry(request, options = nil) - # Pass arguments to `update_glossary_entry` via a request object, either of type - # {::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_glossary_entry(glossary_entry: nil) - # Pass arguments to `update_glossary_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 glossary_entry [::Google::Cloud::Translate::V3::GlossaryEntry, ::Hash] - # Required. The glossary entry to update. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::GlossaryEntry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::GlossaryEntry] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest.new - # - # # Call the update_glossary_entry method. - # result = client.update_glossary_entry request - # - # # The returned object is of type Google::Cloud::Translate::V3::GlossaryEntry. - # p result - # - def update_glossary_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_glossary_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::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_glossary_entry.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_glossary_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.update_glossary_entry request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single entry from the glossary - # - # @overload delete_glossary_entry(request, options = nil) - # Pass arguments to `delete_glossary_entry` via a request object, either of type - # {::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_glossary_entry(name: nil) - # Pass arguments to `delete_glossary_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the glossary entry to delete - # @yield [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/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest.new - # - # # Call the delete_glossary_entry method. - # result = client.delete_glossary_entry request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_glossary_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_glossary_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::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_glossary_entry.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_glossary_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.delete_glossary_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 - - ## - # Creates a Dataset. - # - # @overload create_dataset(request, options = nil) - # Pass arguments to `create_dataset` via a request object, either of type - # {::Google::Cloud::Translate::V3::CreateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::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: 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 project name. - # @param dataset [::Google::Cloud::Translate::V3::Dataset, ::Hash] - # Required. The Dataset 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/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @translation_service_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 - - ## - # Gets a Dataset. - # - # @overload get_dataset(request, options = nil) - # Pass arguments to `get_dataset` via a request object, either of type - # {::Google::Cloud::Translate::V3::GetDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::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 to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::Dataset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::GetDatasetRequest.new - # - # # Call the get_dataset method. - # result = client.get_dataset request - # - # # The returned object is of type Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @translation_service_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 - - ## - # Lists datasets. - # - # @overload list_datasets(request, options = nil) - # Pass arguments to `list_datasets` via a request object, either of type - # {::Google::Cloud::Translate::V3::ListDatasetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::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) - # 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. Name of the parent project. In form of - # `projects/{project-number-or-id}/locations/{location-id}` - # @param page_size [::Integer] - # Optional. Requested page size. The server can return fewer results than - # requested. - # @param page_token [::String] - # Optional. A token identifying a page of results for the server to return. - # Typically obtained from next_page_token field in the response of a - # ListDatasets call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::Dataset>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::Dataset>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @translation_service_stub.list_datasets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @translation_service_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 - - ## - # Deletes a dataset and all of its contents. - # - # @overload delete_dataset(request, options = nil) - # Pass arguments to `delete_dataset` via a request object, either of type - # {::Google::Cloud::Translate::V3::DeleteDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::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) - # 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 name of the dataset 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/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @translation_service_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 - - ## - # Creates an Adaptive MT dataset. - # - # @overload create_adaptive_mt_dataset(request, options = nil) - # Pass arguments to `create_adaptive_mt_dataset` via a request object, either of type - # {::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_adaptive_mt_dataset(parent: nil, adaptive_mt_dataset: nil) - # Pass arguments to `create_adaptive_mt_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. Name of the parent project. In form of - # `projects/{project-number-or-id}/locations/{location-id}` - # @param adaptive_mt_dataset [::Google::Cloud::Translate::V3::AdaptiveMtDataset, ::Hash] - # Required. The AdaptiveMtDataset to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::AdaptiveMtDataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::AdaptiveMtDataset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest.new - # - # # Call the create_adaptive_mt_dataset method. - # result = client.create_adaptive_mt_dataset request - # - # # The returned object is of type Google::Cloud::Translate::V3::AdaptiveMtDataset. - # p result - # - def create_adaptive_mt_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest - - # Converts hash and nil to an 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_adaptive_mt_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::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_adaptive_mt_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_adaptive_mt_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.create_adaptive_mt_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 - - ## - # Deletes an Adaptive MT dataset, including all its entries and associated - # metadata. - # - # @overload delete_adaptive_mt_dataset(request, options = nil) - # Pass arguments to `delete_adaptive_mt_dataset` via a request object, either of type - # {::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_adaptive_mt_dataset(name: nil) - # Pass arguments to `delete_adaptive_mt_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. Name of the dataset. In the form of - # `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-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/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest.new - # - # # Call the delete_adaptive_mt_dataset method. - # result = client.delete_adaptive_mt_dataset request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_adaptive_mt_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest - - # Converts hash and nil to an 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_adaptive_mt_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::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_adaptive_mt_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_adaptive_mt_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.delete_adaptive_mt_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 - - ## - # Gets the Adaptive MT dataset. - # - # @overload get_adaptive_mt_dataset(request, options = nil) - # Pass arguments to `get_adaptive_mt_dataset` via a request object, either of type - # {::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_adaptive_mt_dataset(name: nil) - # Pass arguments to `get_adaptive_mt_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. Name of the dataset. In the form of - # `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::AdaptiveMtDataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::AdaptiveMtDataset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest.new - # - # # Call the get_adaptive_mt_dataset method. - # result = client.get_adaptive_mt_dataset request - # - # # The returned object is of type Google::Cloud::Translate::V3::AdaptiveMtDataset. - # p result - # - def get_adaptive_mt_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_adaptive_mt_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::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_adaptive_mt_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_adaptive_mt_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.get_adaptive_mt_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 - - ## - # Lists all Adaptive MT datasets for which the caller has read permission. - # - # @overload list_adaptive_mt_datasets(request, options = nil) - # Pass arguments to `list_adaptive_mt_datasets` via a request object, either of type - # {::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_adaptive_mt_datasets(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_adaptive_mt_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 resource name of the project from which to list the Adaptive - # MT datasets. `projects/{project-number-or-id}/locations/{location-id}` - # @param page_size [::Integer] - # Optional. Requested page size. The server may return fewer results than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # Typically, this is the value of - # ListAdaptiveMtDatasetsResponse.next_page_token returned from the - # previous call to `ListAdaptiveMtDatasets` method. The first page is - # returned if `page_token`is empty or missing. - # @param filter [::String] - # Optional. An expression for filtering the results of the request. - # Filter is not supported yet. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::AdaptiveMtDataset>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::AdaptiveMtDataset>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest.new - # - # # Call the list_adaptive_mt_datasets method. - # result = client.list_adaptive_mt_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::Translate::V3::AdaptiveMtDataset. - # p item - # end - # - def list_adaptive_mt_datasets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_adaptive_mt_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::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_adaptive_mt_datasets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_adaptive_mt_datasets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.list_adaptive_mt_datasets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @translation_service_stub, :list_adaptive_mt_datasets, "adaptive_mt_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 - - ## - # Translate text using Adaptive MT. - # - # @overload adaptive_mt_translate(request, options = nil) - # Pass arguments to `adaptive_mt_translate` via a request object, either of type - # {::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload adaptive_mt_translate(parent: nil, dataset: nil, content: nil, reference_sentence_config: nil, glossary_config: nil) - # Pass arguments to `adaptive_mt_translate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Location to make a regional call. - # - # Format: `projects/{project-number-or-id}/locations/{location-id}`. - # @param dataset [::String] - # Required. The resource name for the dataset to use for adaptive MT. - # `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}` - # @param content [::Array<::String>] - # Required. The content of the input in string format. - # @param reference_sentence_config [::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::ReferenceSentenceConfig, ::Hash] - # Configuration for caller provided reference sentences. - # @param glossary_config [::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::GlossaryConfig, ::Hash] - # Optional. Glossary to be applied. The glossary must be - # within the same region (have the same location-id) as the model, otherwise - # an INVALID_ARGUMENT (400) error is returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest.new - # - # # Call the adaptive_mt_translate method. - # result = client.adaptive_mt_translate request - # - # # The returned object is of type Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse. - # p result - # - def adaptive_mt_translate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.adaptive_mt_translate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.adaptive_mt_translate.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.adaptive_mt_translate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.adaptive_mt_translate request, 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 and AdaptiveMtFile - # - # @overload get_adaptive_mt_file(request, options = nil) - # Pass arguments to `get_adaptive_mt_file` via a request object, either of type - # {::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_adaptive_mt_file(name: nil) - # Pass arguments to `get_adaptive_mt_file` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the file, in form of - # `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::AdaptiveMtFile] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::AdaptiveMtFile] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest.new - # - # # Call the get_adaptive_mt_file method. - # result = client.get_adaptive_mt_file request - # - # # The returned object is of type Google::Cloud::Translate::V3::AdaptiveMtFile. - # p result - # - def get_adaptive_mt_file request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_adaptive_mt_file.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_adaptive_mt_file.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_adaptive_mt_file.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.get_adaptive_mt_file request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an AdaptiveMtFile along with its sentences. - # - # @overload delete_adaptive_mt_file(request, options = nil) - # Pass arguments to `delete_adaptive_mt_file` via a request object, either of type - # {::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_adaptive_mt_file(name: nil) - # Pass arguments to `delete_adaptive_mt_file` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the file to delete, in form of - # `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - # @yield [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/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest.new - # - # # Call the delete_adaptive_mt_file method. - # result = client.delete_adaptive_mt_file request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_adaptive_mt_file request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest - - # Converts hash and nil to an 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_adaptive_mt_file.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_adaptive_mt_file.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_adaptive_mt_file.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.delete_adaptive_mt_file request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports an AdaptiveMtFile and adds all of its sentences into the - # AdaptiveMtDataset. - # - # @overload import_adaptive_mt_file(request, options = nil) - # Pass arguments to `import_adaptive_mt_file` via a request object, either of type - # {::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_adaptive_mt_file(parent: nil, file_input_source: nil, gcs_input_source: nil) - # Pass arguments to `import_adaptive_mt_file` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the file, in form of - # `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}` - # @param file_input_source [::Google::Cloud::Translate::V3::FileInputSource, ::Hash] - # Inline file source. - # - # Note: The following parameters are mutually exclusive: `file_input_source`, `gcs_input_source`. 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 gcs_input_source [::Google::Cloud::Translate::V3::GcsInputSource, ::Hash] - # Google Cloud Storage file source. - # - # Note: The following parameters are mutually exclusive: `gcs_input_source`, `file_input_source`. 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::Translate::V3::ImportAdaptiveMtFileResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest.new - # - # # Call the import_adaptive_mt_file method. - # result = client.import_adaptive_mt_file request - # - # # The returned object is of type Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse. - # p result - # - def import_adaptive_mt_file request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest - - # Converts hash and nil to an 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_adaptive_mt_file.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_adaptive_mt_file.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.import_adaptive_mt_file.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.import_adaptive_mt_file request, 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 AdaptiveMtFiles associated to an AdaptiveMtDataset. - # - # @overload list_adaptive_mt_files(request, options = nil) - # Pass arguments to `list_adaptive_mt_files` via a request object, either of type - # {::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_adaptive_mt_files(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_adaptive_mt_files` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project from which to list the Adaptive - # MT files. - # `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` - # @param page_size [::Integer] - # Optional. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # Typically, this is the value of - # ListAdaptiveMtFilesResponse.next_page_token returned from the - # previous call to `ListAdaptiveMtFiles` method. The first page is - # returned if `page_token`is empty or missing. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::AdaptiveMtFile>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::AdaptiveMtFile>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest.new - # - # # Call the list_adaptive_mt_files method. - # result = client.list_adaptive_mt_files request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Translate::V3::AdaptiveMtFile. - # p item - # end - # - def list_adaptive_mt_files request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_adaptive_mt_files.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_adaptive_mt_files.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_adaptive_mt_files.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.list_adaptive_mt_files request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @translation_service_stub, :list_adaptive_mt_files, "adaptive_mt_files", 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 AdaptiveMtSentences under a given file/dataset. - # - # @overload list_adaptive_mt_sentences(request, options = nil) - # Pass arguments to `list_adaptive_mt_sentences` via a request object, either of type - # {::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_adaptive_mt_sentences(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_adaptive_mt_sentences` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project from which to list the Adaptive - # MT files. The following format lists all sentences under a file. - # `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - # The following format lists all sentences within a dataset. - # `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` - # @param page_size [::Integer] - # @param page_token [::String] - # A token identifying a page of results the server should return. - # Typically, this is the value of - # ListAdaptiveMtSentencesRequest.next_page_token returned from the - # previous call to `ListTranslationMemories` method. The first page is - # returned if `page_token` is empty or missing. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::AdaptiveMtSentence>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::AdaptiveMtSentence>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest.new - # - # # Call the list_adaptive_mt_sentences method. - # result = client.list_adaptive_mt_sentences request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Translate::V3::AdaptiveMtSentence. - # p item - # end - # - def list_adaptive_mt_sentences request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_adaptive_mt_sentences.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_adaptive_mt_sentences.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_adaptive_mt_sentences.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.list_adaptive_mt_sentences request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @translation_service_stub, :list_adaptive_mt_sentences, "adaptive_mt_sentences", 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 - - ## - # Import sentence pairs into translation Dataset. - # - # @overload import_data(request, options = nil) - # Pass arguments to `import_data` via a request object, either of type - # {::Google::Cloud::Translate::V3::ImportDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::ImportDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data(dataset: nil, input_config: nil) - # Pass arguments to `import_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param dataset [::String] - # Required. Name of the dataset. In form of - # `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` - # @param input_config [::Google::Cloud::Translate::V3::DatasetInputConfig, ::Hash] - # Required. The config for the input content. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::ImportDataRequest.new - # - # # Call the import_data method. - # result = client.import_data request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ImportDataRequest - - # Converts hash and nil to an 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_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_data.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.import_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.import_data request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 dataset's data to the provided output location. - # - # @overload export_data(request, options = nil) - # Pass arguments to `export_data` via a request object, either of type - # {::Google::Cloud::Translate::V3::ExportDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::ExportDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data(dataset: nil, output_config: nil) - # Pass arguments to `export_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param dataset [::String] - # Required. Name of the dataset. In form of - # `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` - # @param output_config [::Google::Cloud::Translate::V3::DatasetOutputConfig, ::Hash] - # Required. The config for the output content. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::ExportDataRequest.new - # - # # Call the export_data method. - # result = client.export_data request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ExportDataRequest - - # Converts hash and nil to an 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_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_data.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.export_data request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 sentence pairs in the dataset. - # - # @overload list_examples(request, options = nil) - # Pass arguments to `list_examples` via a request object, either of type - # {::Google::Cloud::Translate::V3::ListExamplesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::ListExamplesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_examples(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_examples` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the parent dataset. In form of - # `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` - # @param filter [::String] - # Optional. An expression for filtering the examples that will be returned. - # Example filter: - # * `usage=TRAIN` - # @param page_size [::Integer] - # Optional. Requested page size. The server can return fewer results than - # requested. - # @param page_token [::String] - # Optional. A token identifying a page of results for the server to return. - # Typically obtained from next_page_token field in the response of a - # ListExamples call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::Example>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::Example>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::ListExamplesRequest.new - # - # # Call the list_examples method. - # result = client.list_examples request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Translate::V3::Example. - # p item - # end - # - def list_examples request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Translate::V3::ListExamplesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_examples.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_examples.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_examples.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @translation_service_stub.list_examples request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @translation_service_stub, :list_examples, "examples", 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 Model. - # - # @overload create_model(request, options = nil) - # Pass arguments to `create_model` via a request object, either of type - # {::Google::Cloud::Translate::V3::CreateModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::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: 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 project name, in form of - # `projects/{project}/locations/{location}` - # @param model [::Google::Cloud::Translate::V3::Model, ::Hash] - # Required. The Model 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/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @translation_service_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 - - ## - # Lists models. - # - # @overload list_models(request, options = nil) - # Pass arguments to `list_models` via a request object, either of type - # {::Google::Cloud::Translate::V3::ListModelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::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, filter: nil, page_size: nil, page_token: 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. Name of the parent project. In form of - # `projects/{project-number-or-id}/locations/{location-id}` - # @param filter [::String] - # Optional. An expression for filtering the models that will be returned. - # Supported filter: - # `dataset_id=${dataset_id}` - # @param page_size [::Integer] - # Optional. Requested page size. The server can return fewer results than - # requested. - # @param page_token [::String] - # Optional. A token identifying a page of results for the server to return. - # Typically obtained from next_page_token field in the response of a - # ListModels call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::Model>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::Model>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @translation_service_stub.list_models request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @translation_service_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::Translate::V3::GetModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::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 to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::Model] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::Model] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::GetModelRequest.new - # - # # Call the get_model method. - # result = client.get_model request - # - # # The returned object is of type Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @translation_service_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 - - ## - # Deletes a model. - # - # @overload delete_model(request, options = nil) - # Pass arguments to `delete_model` via a request object, either of type - # {::Google::Cloud::Translate::V3::DeleteModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Translate::V3::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) - # 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 name of the model 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/translate/v3" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @translation_service_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 - - ## - # Configuration class for the TranslationService REST API. - # - # This class represents the configuration for TranslationService 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::Translate::V3::TranslationService::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 - # # translate_text to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.translate_text.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.translate_text.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 = "translate.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 TranslationService 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 `translate_text` - # @return [::Gapic::Config::Method] - # - attr_reader :translate_text - ## - # RPC-specific configuration for `romanize_text` - # @return [::Gapic::Config::Method] - # - attr_reader :romanize_text - ## - # RPC-specific configuration for `detect_language` - # @return [::Gapic::Config::Method] - # - attr_reader :detect_language - ## - # RPC-specific configuration for `get_supported_languages` - # @return [::Gapic::Config::Method] - # - attr_reader :get_supported_languages - ## - # RPC-specific configuration for `translate_document` - # @return [::Gapic::Config::Method] - # - attr_reader :translate_document - ## - # RPC-specific configuration for `batch_translate_text` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_translate_text - ## - # RPC-specific configuration for `batch_translate_document` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_translate_document - ## - # RPC-specific configuration for `create_glossary` - # @return [::Gapic::Config::Method] - # - attr_reader :create_glossary - ## - # RPC-specific configuration for `update_glossary` - # @return [::Gapic::Config::Method] - # - attr_reader :update_glossary - ## - # RPC-specific configuration for `list_glossaries` - # @return [::Gapic::Config::Method] - # - attr_reader :list_glossaries - ## - # RPC-specific configuration for `get_glossary` - # @return [::Gapic::Config::Method] - # - attr_reader :get_glossary - ## - # RPC-specific configuration for `delete_glossary` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_glossary - ## - # RPC-specific configuration for `get_glossary_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :get_glossary_entry - ## - # RPC-specific configuration for `list_glossary_entries` - # @return [::Gapic::Config::Method] - # - attr_reader :list_glossary_entries - ## - # RPC-specific configuration for `create_glossary_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :create_glossary_entry - ## - # RPC-specific configuration for `update_glossary_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :update_glossary_entry - ## - # RPC-specific configuration for `delete_glossary_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_glossary_entry - ## - # RPC-specific configuration for `create_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_dataset - ## - # RPC-specific configuration for `get_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_dataset - ## - # RPC-specific configuration for `list_datasets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_datasets - ## - # RPC-specific configuration for `delete_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_dataset - ## - # RPC-specific configuration for `create_adaptive_mt_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_adaptive_mt_dataset - ## - # RPC-specific configuration for `delete_adaptive_mt_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_adaptive_mt_dataset - ## - # RPC-specific configuration for `get_adaptive_mt_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_adaptive_mt_dataset - ## - # RPC-specific configuration for `list_adaptive_mt_datasets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_adaptive_mt_datasets - ## - # RPC-specific configuration for `adaptive_mt_translate` - # @return [::Gapic::Config::Method] - # - attr_reader :adaptive_mt_translate - ## - # RPC-specific configuration for `get_adaptive_mt_file` - # @return [::Gapic::Config::Method] - # - attr_reader :get_adaptive_mt_file - ## - # RPC-specific configuration for `delete_adaptive_mt_file` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_adaptive_mt_file - ## - # RPC-specific configuration for `import_adaptive_mt_file` - # @return [::Gapic::Config::Method] - # - attr_reader :import_adaptive_mt_file - ## - # RPC-specific configuration for `list_adaptive_mt_files` - # @return [::Gapic::Config::Method] - # - attr_reader :list_adaptive_mt_files - ## - # RPC-specific configuration for `list_adaptive_mt_sentences` - # @return [::Gapic::Config::Method] - # - attr_reader :list_adaptive_mt_sentences - ## - # RPC-specific configuration for `import_data` - # @return [::Gapic::Config::Method] - # - attr_reader :import_data - ## - # RPC-specific configuration for `export_data` - # @return [::Gapic::Config::Method] - # - attr_reader :export_data - ## - # RPC-specific configuration for `list_examples` - # @return [::Gapic::Config::Method] - # - attr_reader :list_examples - ## - # RPC-specific configuration for `create_model` - # @return [::Gapic::Config::Method] - # - attr_reader :create_model - ## - # 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 `delete_model` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_model - - # @private - def initialize parent_rpcs = nil - translate_text_config = parent_rpcs.translate_text if parent_rpcs.respond_to? :translate_text - @translate_text = ::Gapic::Config::Method.new translate_text_config - romanize_text_config = parent_rpcs.romanize_text if parent_rpcs.respond_to? :romanize_text - @romanize_text = ::Gapic::Config::Method.new romanize_text_config - detect_language_config = parent_rpcs.detect_language if parent_rpcs.respond_to? :detect_language - @detect_language = ::Gapic::Config::Method.new detect_language_config - get_supported_languages_config = parent_rpcs.get_supported_languages if parent_rpcs.respond_to? :get_supported_languages - @get_supported_languages = ::Gapic::Config::Method.new get_supported_languages_config - translate_document_config = parent_rpcs.translate_document if parent_rpcs.respond_to? :translate_document - @translate_document = ::Gapic::Config::Method.new translate_document_config - batch_translate_text_config = parent_rpcs.batch_translate_text if parent_rpcs.respond_to? :batch_translate_text - @batch_translate_text = ::Gapic::Config::Method.new batch_translate_text_config - batch_translate_document_config = parent_rpcs.batch_translate_document if parent_rpcs.respond_to? :batch_translate_document - @batch_translate_document = ::Gapic::Config::Method.new batch_translate_document_config - create_glossary_config = parent_rpcs.create_glossary if parent_rpcs.respond_to? :create_glossary - @create_glossary = ::Gapic::Config::Method.new create_glossary_config - update_glossary_config = parent_rpcs.update_glossary if parent_rpcs.respond_to? :update_glossary - @update_glossary = ::Gapic::Config::Method.new update_glossary_config - list_glossaries_config = parent_rpcs.list_glossaries if parent_rpcs.respond_to? :list_glossaries - @list_glossaries = ::Gapic::Config::Method.new list_glossaries_config - get_glossary_config = parent_rpcs.get_glossary if parent_rpcs.respond_to? :get_glossary - @get_glossary = ::Gapic::Config::Method.new get_glossary_config - delete_glossary_config = parent_rpcs.delete_glossary if parent_rpcs.respond_to? :delete_glossary - @delete_glossary = ::Gapic::Config::Method.new delete_glossary_config - get_glossary_entry_config = parent_rpcs.get_glossary_entry if parent_rpcs.respond_to? :get_glossary_entry - @get_glossary_entry = ::Gapic::Config::Method.new get_glossary_entry_config - list_glossary_entries_config = parent_rpcs.list_glossary_entries if parent_rpcs.respond_to? :list_glossary_entries - @list_glossary_entries = ::Gapic::Config::Method.new list_glossary_entries_config - create_glossary_entry_config = parent_rpcs.create_glossary_entry if parent_rpcs.respond_to? :create_glossary_entry - @create_glossary_entry = ::Gapic::Config::Method.new create_glossary_entry_config - update_glossary_entry_config = parent_rpcs.update_glossary_entry if parent_rpcs.respond_to? :update_glossary_entry - @update_glossary_entry = ::Gapic::Config::Method.new update_glossary_entry_config - delete_glossary_entry_config = parent_rpcs.delete_glossary_entry if parent_rpcs.respond_to? :delete_glossary_entry - @delete_glossary_entry = ::Gapic::Config::Method.new delete_glossary_entry_config - create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset - @create_dataset = ::Gapic::Config::Method.new create_dataset_config - get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset - @get_dataset = ::Gapic::Config::Method.new get_dataset_config - list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets - @list_datasets = ::Gapic::Config::Method.new list_datasets_config - delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset - @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config - create_adaptive_mt_dataset_config = parent_rpcs.create_adaptive_mt_dataset if parent_rpcs.respond_to? :create_adaptive_mt_dataset - @create_adaptive_mt_dataset = ::Gapic::Config::Method.new create_adaptive_mt_dataset_config - delete_adaptive_mt_dataset_config = parent_rpcs.delete_adaptive_mt_dataset if parent_rpcs.respond_to? :delete_adaptive_mt_dataset - @delete_adaptive_mt_dataset = ::Gapic::Config::Method.new delete_adaptive_mt_dataset_config - get_adaptive_mt_dataset_config = parent_rpcs.get_adaptive_mt_dataset if parent_rpcs.respond_to? :get_adaptive_mt_dataset - @get_adaptive_mt_dataset = ::Gapic::Config::Method.new get_adaptive_mt_dataset_config - list_adaptive_mt_datasets_config = parent_rpcs.list_adaptive_mt_datasets if parent_rpcs.respond_to? :list_adaptive_mt_datasets - @list_adaptive_mt_datasets = ::Gapic::Config::Method.new list_adaptive_mt_datasets_config - adaptive_mt_translate_config = parent_rpcs.adaptive_mt_translate if parent_rpcs.respond_to? :adaptive_mt_translate - @adaptive_mt_translate = ::Gapic::Config::Method.new adaptive_mt_translate_config - get_adaptive_mt_file_config = parent_rpcs.get_adaptive_mt_file if parent_rpcs.respond_to? :get_adaptive_mt_file - @get_adaptive_mt_file = ::Gapic::Config::Method.new get_adaptive_mt_file_config - delete_adaptive_mt_file_config = parent_rpcs.delete_adaptive_mt_file if parent_rpcs.respond_to? :delete_adaptive_mt_file - @delete_adaptive_mt_file = ::Gapic::Config::Method.new delete_adaptive_mt_file_config - import_adaptive_mt_file_config = parent_rpcs.import_adaptive_mt_file if parent_rpcs.respond_to? :import_adaptive_mt_file - @import_adaptive_mt_file = ::Gapic::Config::Method.new import_adaptive_mt_file_config - list_adaptive_mt_files_config = parent_rpcs.list_adaptive_mt_files if parent_rpcs.respond_to? :list_adaptive_mt_files - @list_adaptive_mt_files = ::Gapic::Config::Method.new list_adaptive_mt_files_config - list_adaptive_mt_sentences_config = parent_rpcs.list_adaptive_mt_sentences if parent_rpcs.respond_to? :list_adaptive_mt_sentences - @list_adaptive_mt_sentences = ::Gapic::Config::Method.new list_adaptive_mt_sentences_config - import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data - @import_data = ::Gapic::Config::Method.new import_data_config - export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data - @export_data = ::Gapic::Config::Method.new export_data_config - list_examples_config = parent_rpcs.list_examples if parent_rpcs.respond_to? :list_examples - @list_examples = ::Gapic::Config::Method.new list_examples_config - create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model - @create_model = ::Gapic::Config::Method.new create_model_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 - delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model - @delete_model = ::Gapic::Config::Method.new delete_model_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/operations.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/operations.rb deleted file mode 100644 index fe150ccbe903..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/operations.rb +++ /dev/null @@ -1,1093 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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 Translate - module V3 - module TranslationService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "translate.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the TranslationService 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 TranslationService 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::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - ## - # 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 [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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::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 - call_metadata = @config.rpcs.wait_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::Translate::V3::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: call_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.wait_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 - - ## - # 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 = "translate.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 - ## - # 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 - - ## - # @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 - - ## - # Baseline implementation for the wait_operation REST call - # - # @param request_pb [::Google::Longrunning::WaitOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def wait_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_wait_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: "wait_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 - - ## - # @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: "/v3/{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: "/v3/{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: "/v3/{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: "/v3/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the wait_operation REST call - # - # @param request_pb [::Google::Longrunning::WaitOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_wait_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3/{name}:wait", - 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-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/service_stub.rb deleted file mode 100644 index 2bee326ee72a..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service/rest/service_stub.rb +++ /dev/null @@ -1,2454 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/translate/v3/translation_service_pb" - -module Google - module Cloud - module Translate - module V3 - module TranslationService - module Rest - ## - # REST service stub for the TranslationService 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 translate_text REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::TranslateTextRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::TranslateTextResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::TranslateTextResponse] - # A result object deserialized from the server's reply - def translate_text request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_translate_text_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "translate_text", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Translate::V3::TranslateTextResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the romanize_text REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::RomanizeTextRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::RomanizeTextResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::RomanizeTextResponse] - # A result object deserialized from the server's reply - def romanize_text request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_romanize_text_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "romanize_text", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Translate::V3::RomanizeTextResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the detect_language REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::DetectLanguageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::DetectLanguageResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::DetectLanguageResponse] - # A result object deserialized from the server's reply - def detect_language request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_detect_language_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "detect_language", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Translate::V3::DetectLanguageResponse.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_supported_languages REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::SupportedLanguages] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::SupportedLanguages] - # A result object deserialized from the server's reply - def get_supported_languages request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_supported_languages_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_supported_languages", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Translate::V3::SupportedLanguages.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the translate_document REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::TranslateDocumentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::TranslateDocumentResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::TranslateDocumentResponse] - # A result object deserialized from the server's reply - def translate_document request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_translate_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: "translate_document", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Translate::V3::TranslateDocumentResponse.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_translate_text REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::BatchTranslateTextRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def batch_translate_text request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_translate_text_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_translate_text", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_translate_document REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def batch_translate_document request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_translate_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: "batch_translate_document", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_glossary REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::CreateGlossaryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_glossary request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_glossary_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_glossary", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_glossary REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::UpdateGlossaryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_glossary request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_glossary_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_glossary", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_glossaries REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::ListGlossariesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::ListGlossariesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::ListGlossariesResponse] - # A result object deserialized from the server's reply - def list_glossaries request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_glossaries_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_glossaries", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Translate::V3::ListGlossariesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_glossary REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::GetGlossaryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::Glossary] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::Glossary] - # A result object deserialized from the server's reply - def get_glossary request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_glossary_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_glossary", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Translate::V3::Glossary.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_glossary REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::DeleteGlossaryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_glossary request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_glossary_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_glossary", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_glossary_entry REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::GetGlossaryEntryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::GlossaryEntry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::GlossaryEntry] - # A result object deserialized from the server's reply - def get_glossary_entry request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_glossary_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_glossary_entry", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Translate::V3::GlossaryEntry.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_glossary_entries REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::ListGlossaryEntriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::ListGlossaryEntriesResponse] - # A result object deserialized from the server's reply - def list_glossary_entries request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_glossary_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_glossary_entries", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Translate::V3::ListGlossaryEntriesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_glossary_entry REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::GlossaryEntry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::GlossaryEntry] - # A result object deserialized from the server's reply - def create_glossary_entry request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_glossary_entry_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_glossary_entry", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Translate::V3::GlossaryEntry.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_glossary_entry REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::GlossaryEntry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::GlossaryEntry] - # A result object deserialized from the server's reply - def update_glossary_entry request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_glossary_entry_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_glossary_entry", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Translate::V3::GlossaryEntry.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_glossary_entry REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_glossary_entry request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_glossary_entry_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_glossary_entry", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_dataset REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::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 get_dataset REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::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::Translate::V3::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::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::Translate::V3::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 list_datasets REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::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::Translate::V3::ListDatasetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::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::Translate::V3::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 delete_dataset REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::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 create_adaptive_mt_dataset REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::AdaptiveMtDataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::AdaptiveMtDataset] - # A result object deserialized from the server's reply - def create_adaptive_mt_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_adaptive_mt_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_adaptive_mt_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Translate::V3::AdaptiveMtDataset.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_adaptive_mt_dataset REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_adaptive_mt_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_adaptive_mt_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_adaptive_mt_dataset", - 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_adaptive_mt_dataset REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::AdaptiveMtDataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::AdaptiveMtDataset] - # A result object deserialized from the server's reply - def get_adaptive_mt_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_adaptive_mt_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_adaptive_mt_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Translate::V3::AdaptiveMtDataset.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_adaptive_mt_datasets REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsResponse] - # A result object deserialized from the server's reply - def list_adaptive_mt_datasets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_adaptive_mt_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_adaptive_mt_datasets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the adaptive_mt_translate REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse] - # A result object deserialized from the server's reply - def adaptive_mt_translate request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_adaptive_mt_translate_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "adaptive_mt_translate", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse.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_adaptive_mt_file REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::AdaptiveMtFile] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::AdaptiveMtFile] - # A result object deserialized from the server's reply - def get_adaptive_mt_file request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_adaptive_mt_file_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_adaptive_mt_file", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Translate::V3::AdaptiveMtFile.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_adaptive_mt_file REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_adaptive_mt_file request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_adaptive_mt_file_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_adaptive_mt_file", - 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 import_adaptive_mt_file REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse] - # A result object deserialized from the server's reply - def import_adaptive_mt_file request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_import_adaptive_mt_file_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_adaptive_mt_file", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse.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_adaptive_mt_files REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::ListAdaptiveMtFilesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::ListAdaptiveMtFilesResponse] - # A result object deserialized from the server's reply - def list_adaptive_mt_files request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_adaptive_mt_files_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_adaptive_mt_files", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Translate::V3::ListAdaptiveMtFilesResponse.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_adaptive_mt_sentences REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesResponse] - # A result object deserialized from the server's reply - def list_adaptive_mt_sentences request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_adaptive_mt_sentences_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_adaptive_mt_sentences", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesResponse.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_data REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::ImportDataRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_data request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_import_data_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_data", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_data REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::ExportDataRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_data request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_data_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_data", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_examples REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::ListExamplesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Translate::V3::ListExamplesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::ListExamplesResponse] - # A result object deserialized from the server's reply - def list_examples request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_examples_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_examples", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Translate::V3::ListExamplesResponse.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::Translate::V3::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 list_models REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::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::Translate::V3::ListModelsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::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::Translate::V3::Model] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Translate::V3::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::Translate::V3::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 delete_model REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::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 - - ## - # @private - # - # GRPC transcoding helper method for the translate_text REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::TranslateTextRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_translate_text_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}:translateText", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}:translateText", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the romanize_text REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::RomanizeTextRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_romanize_text_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}:romanizeText", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}:romanizeText", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the detect_language REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::DetectLanguageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_detect_language_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}:detectLanguage", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}:detectLanguage", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_supported_languages REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_supported_languages_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/supportedLanguages", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/supportedLanguages", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the translate_document REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::TranslateDocumentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_translate_document_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}:translateDocument", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_translate_text REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::BatchTranslateTextRequest] - # 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_translate_text_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}:batchTranslateText", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_translate_document REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest] - # 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_translate_document_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}:batchTranslateDocument", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_glossary REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::CreateGlossaryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_glossary_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}/glossaries", - body: "glossary", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_glossary REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::UpdateGlossaryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_glossary_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v3/{glossary.name}", - body: "glossary", - matches: [ - ["glossary.name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_glossaries REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::ListGlossariesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_glossaries_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/glossaries", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_glossary REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::GetGlossaryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_glossary_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_glossary REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::DeleteGlossaryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_glossary_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_glossary_entry REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::GetGlossaryEntryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_glossary_entry_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/glossaryEntries/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_glossary_entries REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_glossary_entries_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/glossaryEntries", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_glossary_entry REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_glossary_entry_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}/glossaryEntries", - body: "glossary_entry", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_glossary_entry REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_glossary_entry_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v3/{glossary_entry.name}", - body: "glossary_entry", - matches: [ - ["glossary_entry.name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/glossaryEntries/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_glossary_entry REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_glossary_entry_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/glossaryEntries/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_dataset REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::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: "/v3/{parent}/datasets", - body: "dataset", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_dataset REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::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: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_datasets REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::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: "/v3/{parent}/datasets", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_dataset REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::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: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_adaptive_mt_dataset REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest] - # 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_adaptive_mt_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}/adaptiveMtDatasets", - body: "adaptive_mt_dataset", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_adaptive_mt_dataset REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest] - # 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_adaptive_mt_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_adaptive_mt_dataset REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_adaptive_mt_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_adaptive_mt_datasets REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_adaptive_mt_datasets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/adaptiveMtDatasets", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the adaptive_mt_translate REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_adaptive_mt_translate_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}:adaptiveMtTranslate", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_adaptive_mt_file REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_adaptive_mt_file_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/adaptiveMtFiles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_adaptive_mt_file REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest] - # 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_adaptive_mt_file_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/adaptiveMtFiles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the import_adaptive_mt_file REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest] - # 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_adaptive_mt_file_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3/{parent}:importAdaptiveMtFile", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_adaptive_mt_files REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_adaptive_mt_files_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/adaptiveMtFiles", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_adaptive_mt_sentences REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_adaptive_mt_sentences_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/adaptiveMtSentences", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/adaptiveMtFiles/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/adaptiveMtSentences", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the import_data REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::ImportDataRequest] - # 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_data_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3/{dataset}:importData", - body: "*", - matches: [ - ["dataset", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_data REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::ExportDataRequest] - # 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_data_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v3/{dataset}:exportData", - body: "*", - matches: [ - ["dataset", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_examples REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::ListExamplesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_examples_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v3/{parent}/examples", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_model REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::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: "/v3/{parent}/models", - body: "model", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_models REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::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: "/v3/{parent}/models", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_model REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::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: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_model REST call - # - # @param request_pb [::Google::Cloud::Translate::V3::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: "/v3/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service_pb.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service_pb.rb deleted file mode 100644 index 23109d6811b2..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service_pb.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/translate/v3/translation_service.proto - -require 'google/protobuf' - -require 'google/cloud/translate/v3/adaptive_mt_pb' -require 'google/cloud/translate/v3/automl_translation_pb' -require 'google/cloud/translate/v3/common_pb' -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/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n3google/cloud/translate/v3/translation_service.proto\x12\x1bgoogle.cloud.translation.v3\x1a+google/cloud/translate/v3/adaptive_mt.proto\x1a\x32google/cloud/translate/v3/automl_translation.proto\x1a&google/cloud/translate/v3/common.proto\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\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"7\n\x15TransliterationConfig\x12\x1e\n\x16\x65nable_transliteration\x18\x01 \x01(\x08\"\x8e\x04\n\x14TranslateTextRequest\x12\x15\n\x08\x63ontents\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14source_language_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14target_language_code\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x06parent\x18\x08 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x12\n\x05model\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12V\n\x0fglossary_config\x18\x07 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfigB\x03\xe0\x41\x01\x12W\n\x16transliteration_config\x18\r \x01(\x0b\x32\x32.google.cloud.translation.v3.TransliterationConfigB\x03\xe0\x41\x01\x12R\n\x06labels\x18\n \x03(\x0b\x32=.google.cloud.translation.v3.TranslateTextRequest.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\"\xa0\x01\n\x15TranslateTextResponse\x12>\n\x0ctranslations\x18\x01 \x03(\x0b\x32(.google.cloud.translation.v3.Translation\x12G\n\x15glossary_translations\x18\x03 \x03(\x0b\x32(.google.cloud.translation.v3.Translation\"\xa8\x01\n\x0bTranslation\x12\x17\n\x0ftranslated_text\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t\x12\x1e\n\x16\x64\x65tected_language_code\x18\x04 \x01(\t\x12Q\n\x0fglossary_config\x18\x03 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfig\"\x8a\x01\n\x13RomanizeTextRequest\x12\x39\n\x06parent\x18\x04 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x15\n\x08\x63ontents\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12!\n\x14source_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\"F\n\x0cRomanization\x12\x16\n\x0eromanized_text\x18\x01 \x01(\t\x12\x1e\n\x16\x64\x65tected_language_code\x18\x02 \x01(\t\"X\n\x14RomanizeTextResponse\x12@\n\rromanizations\x18\x01 \x03(\x0b\x32).google.cloud.translation.v3.Romanization\"\x9f\x02\n\x15\x44\x65tectLanguageRequest\x12\x39\n\x06parent\x18\x05 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x12\n\x05model\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x07\x63ontent\x18\x01 \x01(\tH\x00\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12S\n\x06labels\x18\x06 \x03(\x0b\x32>.google.cloud.translation.v3.DetectLanguageRequest.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\x42\x08\n\x06source\"=\n\x10\x44\x65tectedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"Z\n\x16\x44\x65tectLanguageResponse\x12@\n\tlanguages\x18\x01 \x03(\x0b\x32-.google.cloud.translation.v3.DetectedLanguage\"\x91\x01\n\x1cGetSupportedLanguagesRequest\x12\x39\n\x06parent\x18\x03 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\"\n\x15\x64isplay_language_code\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05model\x18\x02 \x01(\tB\x03\xe0\x41\x01\"W\n\x12SupportedLanguages\x12\x41\n\tlanguages\x18\x01 \x03(\x0b\x32..google.cloud.translation.v3.SupportedLanguage\"p\n\x11SupportedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x16\n\x0esupport_source\x18\x03 \x01(\x08\x12\x16\n\x0esupport_target\x18\x04 \x01(\x08\"#\n\tGcsSource\x12\x16\n\tinput_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\"m\n\x0bInputConfig\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12<\n\ngcs_source\x18\x02 \x01(\x0b\x32&.google.cloud.translation.v3.GcsSourceH\x00\x42\x08\n\x06source\"0\n\x0eGcsDestination\x12\x1e\n\x11output_uri_prefix\x18\x01 \x01(\tB\x03\xe0\x41\x02\"e\n\x0cOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.translation.v3.GcsDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\x83\x01\n\x13\x44ocumentInputConfig\x12\x11\n\x07\x63ontent\x18\x01 \x01(\x0cH\x00\x12<\n\ngcs_source\x18\x02 \x01(\x0b\x32&.google.cloud.translation.v3.GcsSourceH\x00\x12\x11\n\tmime_type\x18\x04 \x01(\tB\x08\n\x06source\"\x8a\x01\n\x14\x44ocumentOutputConfig\x12K\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.translation.v3.GcsDestinationB\x03\xe0\x41\x01H\x00\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\r\n\x0b\x64\x65stination\"\xbe\x05\n\x18TranslateDocumentRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x14source_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14target_language_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12T\n\x15\x64ocument_input_config\x18\x04 \x01(\x0b\x32\x30.google.cloud.translation.v3.DocumentInputConfigB\x03\xe0\x41\x02\x12V\n\x16\x64ocument_output_config\x18\x05 \x01(\x0b\x32\x31.google.cloud.translation.v3.DocumentOutputConfigB\x03\xe0\x41\x01\x12\x12\n\x05model\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12V\n\x0fglossary_config\x18\x07 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfigB\x03\xe0\x41\x01\x12V\n\x06labels\x18\x08 \x03(\x0b\x32\x41.google.cloud.translation.v3.TranslateDocumentRequest.LabelsEntryB\x03\xe0\x41\x01\x12#\n\x16\x63ustomized_attribution\x18\n \x01(\tB\x03\xe0\x41\x01\x12)\n\x1cis_translate_native_pdf_only\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01\x12-\n enable_shadow_removal_native_pdf\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x12\'\n\x1a\x65nable_rotation_correction\x18\r \x01(\x08\x42\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\x13\x44ocumentTranslation\x12\x1b\n\x13\x62yte_stream_outputs\x18\x01 \x03(\x0c\x12\x11\n\tmime_type\x18\x02 \x01(\t\x12\x1e\n\x16\x64\x65tected_language_code\x18\x03 \x01(\t\"\xa6\x02\n\x19TranslateDocumentResponse\x12N\n\x14\x64ocument_translation\x18\x01 \x01(\x0b\x32\x30.google.cloud.translation.v3.DocumentTranslation\x12W\n\x1dglossary_document_translation\x18\x02 \x01(\x0b\x32\x30.google.cloud.translation.v3.DocumentTranslation\x12\r\n\x05model\x18\x03 \x01(\t\x12Q\n\x0fglossary_config\x18\x04 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfig\"\x88\x06\n\x19\x42\x61tchTranslateTextRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12!\n\x14source_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x15target_language_codes\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12W\n\x06models\x18\x04 \x03(\x0b\x32\x42.google.cloud.translation.v3.BatchTranslateTextRequest.ModelsEntryB\x03\xe0\x41\x01\x12\x44\n\rinput_configs\x18\x05 \x03(\x0b\x32(.google.cloud.translation.v3.InputConfigB\x03\xe0\x41\x02\x12\x45\n\routput_config\x18\x06 \x01(\x0b\x32).google.cloud.translation.v3.OutputConfigB\x03\xe0\x41\x02\x12_\n\nglossaries\x18\x07 \x03(\x0b\x32\x46.google.cloud.translation.v3.BatchTranslateTextRequest.GlossariesEntryB\x03\xe0\x41\x01\x12W\n\x06labels\x18\t \x03(\x0b\x32\x42.google.cloud.translation.v3.BatchTranslateTextRequest.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bModelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ak\n\x0fGlossariesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x05value\x18\x02 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfig:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xce\x02\n\x16\x42\x61tchTranslateMetadata\x12H\n\x05state\x18\x01 \x01(\x0e\x32\x39.google.cloud.translation.v3.BatchTranslateMetadata.State\x12\x1d\n\x15translated_characters\x18\x02 \x01(\x03\x12\x19\n\x11\x66\x61iled_characters\x18\x03 \x01(\x03\x12\x18\n\x10total_characters\x18\x04 \x01(\x03\x12/\n\x0bsubmit_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05\"\xcb\x01\n\x16\x42\x61tchTranslateResponse\x12\x18\n\x10total_characters\x18\x01 \x01(\x03\x12\x1d\n\x15translated_characters\x18\x02 \x01(\x03\x12\x19\n\x11\x66\x61iled_characters\x18\x03 \x01(\x03\x12/\n\x0bsubmit_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"]\n\x13GlossaryInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.translation.v3.GcsSourceH\x00\x42\x08\n\x06source\"\x9a\x05\n\x08Glossary\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12O\n\rlanguage_pair\x18\x03 \x01(\x0b\x32\x36.google.cloud.translation.v3.Glossary.LanguageCodePairH\x00\x12T\n\x12language_codes_set\x18\x04 \x01(\x0b\x32\x36.google.cloud.translation.v3.Glossary.LanguageCodesSetH\x00\x12\x46\n\x0cinput_config\x18\x05 \x01(\x0b\x32\x30.google.cloud.translation.v3.GlossaryInputConfig\x12\x18\n\x0b\x65ntry_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x03\x12\x34\n\x0bsubmit_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\t \x01(\tB\x03\xe0\x41\x01\x1aN\n\x10LanguageCodePair\x12\x1c\n\x14source_language_code\x18\x01 \x01(\t\x12\x1c\n\x14target_language_code\x18\x02 \x01(\t\x1a*\n\x10LanguageCodesSet\x12\x16\n\x0elanguage_codes\x18\x01 \x03(\t:e\xea\x41\x62\n!translate.googleapis.com/Glossary\x12=projects/{project}/locations/{location}/glossaries/{glossary}B\x0b\n\tlanguages\"\x90\x01\n\x15\x43reateGlossaryRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12<\n\x08glossary\x18\x02 \x01(\x0b\x32%.google.cloud.translation.v3.GlossaryB\x03\xe0\x41\x02\"\x86\x01\n\x15UpdateGlossaryRequest\x12<\n\x08glossary\x18\x01 \x01(\x0b\x32%.google.cloud.translation.v3.GlossaryB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"M\n\x12GetGlossaryRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary\"P\n\x15\x44\x65leteGlossaryRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary\"\x98\x01\n\x15ListGlossariesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"l\n\x16ListGlossariesResponse\x12\x39\n\nglossaries\x18\x01 \x03(\x0b\x32%.google.cloud.translation.v3.Glossary\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"W\n\x17GetGlossaryEntryRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&translate.googleapis.com/GlossaryEntry\"Z\n\x1a\x44\x65leteGlossaryEntryRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&translate.googleapis.com/GlossaryEntry\"\x88\x01\n\x1aListGlossaryEntriesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x86\x01\n\x1bListGlossaryEntriesResponse\x12I\n\x10glossary_entries\x18\x01 \x03(\x0b\x32*.google.cloud.translation.v3.GlossaryEntryB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xa0\x01\n\x1a\x43reateGlossaryEntryRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary\x12G\n\x0eglossary_entry\x18\x02 \x01(\x0b\x32*.google.cloud.translation.v3.GlossaryEntryB\x03\xe0\x41\x02\"e\n\x1aUpdateGlossaryEntryRequest\x12G\n\x0eglossary_entry\x18\x01 \x01(\x0b\x32*.google.cloud.translation.v3.GlossaryEntryB\x03\xe0\x41\x02\"\x88\x02\n\x16\x43reateGlossaryMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x39.google.cloud.translation.v3.CreateGlossaryMetadata.State\x12/\n\x0bsubmit_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05\"\xb3\x02\n\x16UpdateGlossaryMetadata\x12\x37\n\x08glossary\x18\x01 \x01(\x0b\x32%.google.cloud.translation.v3.Glossary\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x39.google.cloud.translation.v3.UpdateGlossaryMetadata.State\x12/\n\x0bsubmit_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05\"\x88\x02\n\x16\x44\x65leteGlossaryMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x39.google.cloud.translation.v3.DeleteGlossaryMetadata.State\x12/\n\x0bsubmit_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05\"\x85\x01\n\x16\x44\x65leteGlossaryResponse\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x0bsubmit_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xd1\x07\n\x1d\x42\x61tchTranslateDocumentRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12!\n\x14source_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x15target_language_codes\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12Q\n\rinput_configs\x18\x04 \x03(\x0b\x32\x35.google.cloud.translation.v3.BatchDocumentInputConfigB\x03\xe0\x41\x02\x12R\n\routput_config\x18\x05 \x01(\x0b\x32\x36.google.cloud.translation.v3.BatchDocumentOutputConfigB\x03\xe0\x41\x02\x12[\n\x06models\x18\x06 \x03(\x0b\x32\x46.google.cloud.translation.v3.BatchTranslateDocumentRequest.ModelsEntryB\x03\xe0\x41\x01\x12\x63\n\nglossaries\x18\x07 \x03(\x0b\x32J.google.cloud.translation.v3.BatchTranslateDocumentRequest.GlossariesEntryB\x03\xe0\x41\x01\x12r\n\x12\x66ormat_conversions\x18\x08 \x03(\x0b\x32Q.google.cloud.translation.v3.BatchTranslateDocumentRequest.FormatConversionsEntryB\x03\xe0\x41\x01\x12#\n\x16\x63ustomized_attribution\x18\n \x01(\tB\x03\xe0\x41\x01\x12-\n enable_shadow_removal_native_pdf\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01\x12\'\n\x1a\x65nable_rotation_correction\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bModelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ak\n\x0fGlossariesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x05value\x18\x02 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfig:\x02\x38\x01\x1a\x38\n\x16\x46ormatConversionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"b\n\x18\x42\x61tchDocumentInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.translation.v3.GcsSourceH\x00\x42\x08\n\x06source\"r\n\x19\x42\x61tchDocumentOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.translation.v3.GcsDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\xd9\x02\n\x1e\x42\x61tchTranslateDocumentResponse\x12\x13\n\x0btotal_pages\x18\x01 \x01(\x03\x12\x18\n\x10translated_pages\x18\x02 \x01(\x03\x12\x14\n\x0c\x66\x61iled_pages\x18\x03 \x01(\x03\x12\x1c\n\x14total_billable_pages\x18\x04 \x01(\x03\x12\x18\n\x10total_characters\x18\x05 \x01(\x03\x12\x1d\n\x15translated_characters\x18\x06 \x01(\x03\x12\x19\n\x11\x66\x61iled_characters\x18\x07 \x01(\x03\x12!\n\x19total_billable_characters\x18\x08 \x01(\x03\x12/\n\x0bsubmit_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xe4\x03\n\x1e\x42\x61tchTranslateDocumentMetadata\x12P\n\x05state\x18\x01 \x01(\x0e\x32\x41.google.cloud.translation.v3.BatchTranslateDocumentMetadata.State\x12\x13\n\x0btotal_pages\x18\x02 \x01(\x03\x12\x18\n\x10translated_pages\x18\x03 \x01(\x03\x12\x14\n\x0c\x66\x61iled_pages\x18\x04 \x01(\x03\x12\x1c\n\x14total_billable_pages\x18\x05 \x01(\x03\x12\x18\n\x10total_characters\x18\x06 \x01(\x03\x12\x1d\n\x15translated_characters\x18\x07 \x01(\x03\x12\x19\n\x11\x66\x61iled_characters\x18\x08 \x01(\x03\x12!\n\x19total_billable_characters\x18\t \x01(\x03\x12/\n\x0bsubmit_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05\"\xa1\x01\n\x1bTranslateTextGlossaryConfig\x12;\n\x08glossary\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary\x12\x18\n\x0bignore_case\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12+\n\x1e\x63ontextual_translation_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x32\xbd\x43\n\x12TranslationService\x12\xd4\x02\n\rTranslateText\x12\x31.google.cloud.translation.v3.TranslateTextRequest\x1a\x32.google.cloud.translation.v3.TranslateTextResponse\"\xdb\x01\xda\x41$parent,target_language_code,contents\xda\x41Iparent,model,mime_type,source_language_code,target_language_code,contents\x82\xd3\xe4\x93\x02\x62\"1/v3/{parent=projects/*/locations/*}:translateText:\x01*Z*\"%/v3/{parent=projects/*}:translateText:\x01*\x12\xed\x01\n\x0cRomanizeText\x12\x30.google.cloud.translation.v3.RomanizeTextRequest\x1a\x31.google.cloud.translation.v3.RomanizeTextResponse\"x\xda\x41\x0fparent,contents\x82\xd3\xe4\x93\x02`\"0/v3/{parent=projects/*/locations/*}:romanizeText:\x01*Z)\"$/v3/{parent=projects/*}:romanizeText:\x01*\x12\x87\x02\n\x0e\x44\x65tectLanguage\x12\x32.google.cloud.translation.v3.DetectLanguageRequest\x1a\x33.google.cloud.translation.v3.DetectLanguageResponse\"\x8b\x01\xda\x41\x1eparent,model,mime_type,content\x82\xd3\xe4\x93\x02\x64\"2/v3/{parent=projects/*/locations/*}:detectLanguage:\x01*Z+\"&/v3/{parent=projects/*}:detectLanguage:\x01*\x12\x97\x02\n\x15GetSupportedLanguages\x12\x39.google.cloud.translation.v3.GetSupportedLanguagesRequest\x1a/.google.cloud.translation.v3.SupportedLanguages\"\x91\x01\xda\x41\"parent,model,display_language_code\x82\xd3\xe4\x93\x02\x66\x12\x36/v3/{parent=projects/*/locations/*}/supportedLanguagesZ,\x12*/v3/{parent=projects/*}/supportedLanguages\x12\xc4\x01\n\x11TranslateDocument\x12\x35.google.cloud.translation.v3.TranslateDocumentRequest\x1a\x36.google.cloud.translation.v3.TranslateDocumentResponse\"@\x82\xd3\xe4\x93\x02:\"5/v3/{parent=projects/*/locations/*}:translateDocument:\x01*\x12\xe1\x01\n\x12\x42\x61tchTranslateText\x12\x36.google.cloud.translation.v3.BatchTranslateTextRequest\x1a\x1d.google.longrunning.Operation\"t\xca\x41\x30\n\x16\x42\x61tchTranslateResponse\x12\x16\x42\x61tchTranslateMetadata\x82\xd3\xe4\x93\x02;\"6/v3/{parent=projects/*/locations/*}:batchTranslateText:\x01*\x12\xce\x02\n\x16\x42\x61tchTranslateDocument\x12:.google.cloud.translation.v3.BatchTranslateDocumentRequest\x1a\x1d.google.longrunning.Operation\"\xd8\x01\xca\x41@\n\x1e\x42\x61tchTranslateDocumentResponse\x12\x1e\x42\x61tchTranslateDocumentMetadata\xda\x41Mparent,source_language_code,target_language_codes,input_configs,output_config\x82\xd3\xe4\x93\x02?\":/v3/{parent=projects/*/locations/*}:batchTranslateDocument:\x01*\x12\xdc\x01\n\x0e\x43reateGlossary\x12\x32.google.cloud.translation.v3.CreateGlossaryRequest\x1a\x1d.google.longrunning.Operation\"w\xca\x41\"\n\x08Glossary\x12\x16\x43reateGlossaryMetadata\xda\x41\x0fparent,glossary\x82\xd3\xe4\x93\x02:\"./v3/{parent=projects/*/locations/*}/glossaries:\x08glossary\x12\xeb\x01\n\x0eUpdateGlossary\x12\x32.google.cloud.translation.v3.UpdateGlossaryRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\xca\x41\"\n\x08Glossary\x12\x16UpdateGlossaryMetadata\xda\x41\x14glossary,update_mask\x82\xd3\xe4\x93\x02\x43\x32\x37/v3/{glossary.name=projects/*/locations/*/glossaries/*}:\x08glossary\x12\xba\x01\n\x0eListGlossaries\x12\x32.google.cloud.translation.v3.ListGlossariesRequest\x1a\x33.google.cloud.translation.v3.ListGlossariesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v3/{parent=projects/*/locations/*}/glossaries\x12\xa4\x01\n\x0bGetGlossary\x12/.google.cloud.translation.v3.GetGlossaryRequest\x1a%.google.cloud.translation.v3.Glossary\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v3/{name=projects/*/locations/*/glossaries/*}\x12\xd5\x01\n\x0e\x44\x65leteGlossary\x12\x32.google.cloud.translation.v3.DeleteGlossaryRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41\x30\n\x16\x44\x65leteGlossaryResponse\x12\x16\x44\x65leteGlossaryMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v3/{name=projects/*/locations/*/glossaries/*}\x12\xc5\x01\n\x10GetGlossaryEntry\x12\x34.google.cloud.translation.v3.GetGlossaryEntryRequest\x1a*.google.cloud.translation.v3.GlossaryEntry\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v3/{name=projects/*/locations/*/glossaries/*/glossaryEntries/*}\x12\xdb\x01\n\x13ListGlossaryEntries\x12\x37.google.cloud.translation.v3.ListGlossaryEntriesRequest\x1a\x38.google.cloud.translation.v3.ListGlossaryEntriesResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v3/{parent=projects/*/locations/*/glossaries/*}/glossaryEntries\x12\xec\x01\n\x13\x43reateGlossaryEntry\x12\x37.google.cloud.translation.v3.CreateGlossaryEntryRequest\x1a*.google.cloud.translation.v3.GlossaryEntry\"p\xda\x41\x15parent,glossary_entry\x82\xd3\xe4\x93\x02R\"@/v3/{parent=projects/*/locations/*/glossaries/*}/glossaryEntries:\x0eglossary_entry\x12\xf4\x01\n\x13UpdateGlossaryEntry\x12\x37.google.cloud.translation.v3.UpdateGlossaryEntryRequest\x1a*.google.cloud.translation.v3.GlossaryEntry\"x\xda\x41\x0eglossary_entry\x82\xd3\xe4\x93\x02\x61\x32O/v3/{glossary_entry.name=projects/*/locations/*/glossaries/*/glossaryEntries/*}:\x0eglossary_entry\x12\xb7\x01\n\x13\x44\x65leteGlossaryEntry\x12\x37.google.cloud.translation.v3.DeleteGlossaryEntryRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42*@/v3/{name=projects/*/locations/*/glossaries/*/glossaryEntries/*}\x12\xd4\x01\n\rCreateDataset\x12\x31.google.cloud.translation.v3.CreateDatasetRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41 \n\x07\x44\x61taset\x12\x15\x43reateDatasetMetadata\xda\x41\x0eparent,dataset\x82\xd3\xe4\x93\x02\x37\",/v3/{parent=projects/*/locations/*}/datasets:\x07\x64\x61taset\x12\x9f\x01\n\nGetDataset\x12..google.cloud.translation.v3.GetDatasetRequest\x1a$.google.cloud.translation.v3.Dataset\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v3/{name=projects/*/locations/*/datasets/*}\x12\xb2\x01\n\x0cListDatasets\x12\x30.google.cloud.translation.v3.ListDatasetsRequest\x1a\x31.google.cloud.translation.v3.ListDatasetsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v3/{parent=projects/*/locations/*}/datasets\x12\xcf\x01\n\rDeleteDataset\x12\x31.google.cloud.translation.v3.DeleteDatasetRequest\x1a\x1d.google.longrunning.Operation\"l\xca\x41.\n\x15google.protobuf.Empty\x12\x15\x44\x65leteDatasetMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v3/{name=projects/*/locations/*/datasets/*}\x12\xf8\x01\n\x17\x43reateAdaptiveMtDataset\x12;.google.cloud.translation.v3.CreateAdaptiveMtDatasetRequest\x1a..google.cloud.translation.v3.AdaptiveMtDataset\"p\xda\x41\x1aparent,adaptive_mt_dataset\x82\xd3\xe4\x93\x02M\"6/v3/{parent=projects/*/locations/*}/adaptiveMtDatasets:\x13\x61\x64\x61ptive_mt_dataset\x12\xb5\x01\n\x17\x44\x65leteAdaptiveMtDataset\x12;.google.cloud.translation.v3.DeleteAdaptiveMtDatasetRequest\x1a\x16.google.protobuf.Empty\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38*6/v3/{name=projects/*/locations/*/adaptiveMtDatasets/*}\x12\xc7\x01\n\x14GetAdaptiveMtDataset\x12\x38.google.cloud.translation.v3.GetAdaptiveMtDatasetRequest\x1a..google.cloud.translation.v3.AdaptiveMtDataset\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v3/{name=projects/*/locations/*/adaptiveMtDatasets/*}\x12\xda\x01\n\x16ListAdaptiveMtDatasets\x12:.google.cloud.translation.v3.ListAdaptiveMtDatasetsRequest\x1a;.google.cloud.translation.v3.ListAdaptiveMtDatasetsResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v3/{parent=projects/*/locations/*}/adaptiveMtDatasets\x12\xdd\x01\n\x13\x41\x64\x61ptiveMtTranslate\x12\x37.google.cloud.translation.v3.AdaptiveMtTranslateRequest\x1a\x38.google.cloud.translation.v3.AdaptiveMtTranslateResponse\"S\xda\x41\x0eparent,content\x82\xd3\xe4\x93\x02<\"7/v3/{parent=projects/*/locations/*}:adaptiveMtTranslate:\x01*\x12\xd0\x01\n\x11GetAdaptiveMtFile\x12\x35.google.cloud.translation.v3.GetAdaptiveMtFileRequest\x1a+.google.cloud.translation.v3.AdaptiveMtFile\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J\x12H/v3/{name=projects/*/locations/*/adaptiveMtDatasets/*/adaptiveMtFiles/*}\x12\xc1\x01\n\x14\x44\x65leteAdaptiveMtFile\x12\x38.google.cloud.translation.v3.DeleteAdaptiveMtFileRequest\x1a\x16.google.protobuf.Empty\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J*H/v3/{name=projects/*/locations/*/adaptiveMtDatasets/*/adaptiveMtFiles/*}\x12\xee\x01\n\x14ImportAdaptiveMtFile\x12\x38.google.cloud.translation.v3.ImportAdaptiveMtFileRequest\x1a\x39.google.cloud.translation.v3.ImportAdaptiveMtFileResponse\"a\xda\x41\x06parent\x82\xd3\xe4\x93\x02R\"M/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*}:importAdaptiveMtFile:\x01*\x12\xe3\x01\n\x13ListAdaptiveMtFiles\x12\x37.google.cloud.translation.v3.ListAdaptiveMtFilesRequest\x1a\x38.google.cloud.translation.v3.ListAdaptiveMtFilesResponse\"Y\xda\x41\x06parent\x82\xd3\xe4\x93\x02J\x12H/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*}/adaptiveMtFiles\x12\xd7\x02\n\x17ListAdaptiveMtSentences\x12;.google.cloud.translation.v3.ListAdaptiveMtSentencesRequest\x1a<.google.cloud.translation.v3.ListAdaptiveMtSentencesResponse\"\xc0\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xb0\x01\x12^/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*/adaptiveMtFiles/*}/adaptiveMtSentencesZN\x12L/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*}/adaptiveMtSentences\x12\xe8\x01\n\nImportData\x12..google.cloud.translation.v3.ImportDataRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41+\n\x15google.protobuf.Empty\x12\x12ImportDataMetadata\xda\x41\x14\x64\x61taset,input_config\x82\xd3\xe4\x93\x02?\":/v3/{dataset=projects/*/locations/*/datasets/*}:importData:\x01*\x12\xe9\x01\n\nExportData\x12..google.cloud.translation.v3.ExportDataRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\xca\x41+\n\x15google.protobuf.Empty\x12\x12\x45xportDataMetadata\xda\x41\x15\x64\x61taset,output_config\x82\xd3\xe4\x93\x02?\":/v3/{dataset=projects/*/locations/*/datasets/*}:exportData:\x01*\x12\xbd\x01\n\x0cListExamples\x12\x30.google.cloud.translation.v3.ListExamplesRequest\x1a\x31.google.cloud.translation.v3.ListExamplesResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v3/{parent=projects/*/locations/*/datasets/*}/examples\x12\xc6\x01\n\x0b\x43reateModel\x12/.google.cloud.translation.v3.CreateModelRequest\x1a\x1d.google.longrunning.Operation\"g\xca\x41\x1c\n\x05Model\x12\x13\x43reateModelMetadata\xda\x41\x0cparent,model\x82\xd3\xe4\x93\x02\x33\"*/v3/{parent=projects/*/locations/*}/models:\x05model\x12\xaa\x01\n\nListModels\x12..google.cloud.translation.v3.ListModelsRequest\x1a/.google.cloud.translation.v3.ListModelsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v3/{parent=projects/*/locations/*}/models\x12\x97\x01\n\x08GetModel\x12,.google.cloud.translation.v3.GetModelRequest\x1a\".google.cloud.translation.v3.Model\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v3/{name=projects/*/locations/*/models/*}\x12\xc7\x01\n\x0b\x44\x65leteModel\x12/.google.cloud.translation.v3.DeleteModelRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41,\n\x15google.protobuf.Empty\x12\x13\x44\x65leteModelMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v3/{name=projects/*/locations/*/models/*}\x1a~\xca\x41\x18translate.googleapis.com\xd2\x41`https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-translationB\xd6\x01\n\x1d\x63om.google.cloud.translate.v3B\x17TranslationServiceProtoP\x01Z;cloud.google.com/go/translate/apiv3/translatepb;translatepb\xa2\x02\x05\x43TRL3\xaa\x02\x19Google.Cloud.Translate.V3\xca\x02\x19Google\\Cloud\\Translate\\V3\xea\x02\x1cGoogle::Cloud::Translate::V3P\x00P\x01P\x02\x62\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Translate - module V3 - TransliterationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.TransliterationConfig").msgclass - TranslateTextRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.TranslateTextRequest").msgclass - TranslateTextResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.TranslateTextResponse").msgclass - Translation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.Translation").msgclass - RomanizeTextRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.RomanizeTextRequest").msgclass - Romanization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.Romanization").msgclass - RomanizeTextResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.RomanizeTextResponse").msgclass - DetectLanguageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DetectLanguageRequest").msgclass - DetectedLanguage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DetectedLanguage").msgclass - DetectLanguageResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DetectLanguageResponse").msgclass - GetSupportedLanguagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GetSupportedLanguagesRequest").msgclass - SupportedLanguages = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.SupportedLanguages").msgclass - SupportedLanguage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.SupportedLanguage").msgclass - GcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GcsSource").msgclass - InputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.InputConfig").msgclass - GcsDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GcsDestination").msgclass - OutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.OutputConfig").msgclass - DocumentInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DocumentInputConfig").msgclass - DocumentOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DocumentOutputConfig").msgclass - TranslateDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.TranslateDocumentRequest").msgclass - DocumentTranslation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DocumentTranslation").msgclass - TranslateDocumentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.TranslateDocumentResponse").msgclass - BatchTranslateTextRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTranslateTextRequest").msgclass - BatchTranslateMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTranslateMetadata").msgclass - BatchTranslateMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTranslateMetadata.State").enummodule - BatchTranslateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTranslateResponse").msgclass - GlossaryInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GlossaryInputConfig").msgclass - Glossary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.Glossary").msgclass - Glossary::LanguageCodePair = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.Glossary.LanguageCodePair").msgclass - Glossary::LanguageCodesSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.Glossary.LanguageCodesSet").msgclass - CreateGlossaryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.CreateGlossaryRequest").msgclass - UpdateGlossaryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.UpdateGlossaryRequest").msgclass - GetGlossaryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GetGlossaryRequest").msgclass - DeleteGlossaryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteGlossaryRequest").msgclass - ListGlossariesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListGlossariesRequest").msgclass - ListGlossariesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListGlossariesResponse").msgclass - GetGlossaryEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GetGlossaryEntryRequest").msgclass - DeleteGlossaryEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteGlossaryEntryRequest").msgclass - ListGlossaryEntriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListGlossaryEntriesRequest").msgclass - ListGlossaryEntriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListGlossaryEntriesResponse").msgclass - CreateGlossaryEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.CreateGlossaryEntryRequest").msgclass - UpdateGlossaryEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.UpdateGlossaryEntryRequest").msgclass - CreateGlossaryMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.CreateGlossaryMetadata").msgclass - CreateGlossaryMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.CreateGlossaryMetadata.State").enummodule - UpdateGlossaryMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.UpdateGlossaryMetadata").msgclass - UpdateGlossaryMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.UpdateGlossaryMetadata.State").enummodule - DeleteGlossaryMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteGlossaryMetadata").msgclass - DeleteGlossaryMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteGlossaryMetadata.State").enummodule - DeleteGlossaryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteGlossaryResponse").msgclass - BatchTranslateDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTranslateDocumentRequest").msgclass - BatchDocumentInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchDocumentInputConfig").msgclass - BatchDocumentOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchDocumentOutputConfig").msgclass - BatchTranslateDocumentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTranslateDocumentResponse").msgclass - BatchTranslateDocumentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTranslateDocumentMetadata").msgclass - BatchTranslateDocumentMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTranslateDocumentMetadata.State").enummodule - TranslateTextGlossaryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.TranslateTextGlossaryConfig").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service_services_pb.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service_services_pb.rb deleted file mode 100644 index d7dd9d8ae961..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/translation_service_services_pb.rb +++ /dev/null @@ -1,141 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/translate/v3/translation_service.proto for package 'Google.Cloud.Translate.V3' -# 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/translate/v3/translation_service_pb' - -module Google - module Cloud - module Translate - module V3 - module TranslationService - # Proto file for the Cloud Translation API (v3 GA). - # - # Provides natural language translation operations. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.translation.v3.TranslationService' - - # Translates input text and returns translated text. - rpc :TranslateText, ::Google::Cloud::Translate::V3::TranslateTextRequest, ::Google::Cloud::Translate::V3::TranslateTextResponse - # Romanize input text written in non-Latin scripts to Latin text. - rpc :RomanizeText, ::Google::Cloud::Translate::V3::RomanizeTextRequest, ::Google::Cloud::Translate::V3::RomanizeTextResponse - # Detects the language of text within a request. - rpc :DetectLanguage, ::Google::Cloud::Translate::V3::DetectLanguageRequest, ::Google::Cloud::Translate::V3::DetectLanguageResponse - # Returns a list of supported languages for translation. - rpc :GetSupportedLanguages, ::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest, ::Google::Cloud::Translate::V3::SupportedLanguages - # Translates documents in synchronous mode. - rpc :TranslateDocument, ::Google::Cloud::Translate::V3::TranslateDocumentRequest, ::Google::Cloud::Translate::V3::TranslateDocumentResponse - # Translates a large volume of text in asynchronous batch mode. - # This function provides real-time output as the inputs are being processed. - # If caller cancels a request, the partial results (for an input file, it's - # all or nothing) may still be available on the specified output location. - # - # This call returns immediately and you can - # use google.longrunning.Operation.name to poll the status of the call. - rpc :BatchTranslateText, ::Google::Cloud::Translate::V3::BatchTranslateTextRequest, ::Google::Longrunning::Operation - # Translates a large volume of document in asynchronous batch mode. - # This function provides real-time output as the inputs are being processed. - # If caller cancels a request, the partial results (for an input file, it's - # all or nothing) may still be available on the specified output location. - # - # This call returns immediately and you can use - # google.longrunning.Operation.name to poll the status of the call. - rpc :BatchTranslateDocument, ::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest, ::Google::Longrunning::Operation - # Creates a glossary and returns the long-running operation. Returns - # NOT_FOUND, if the project doesn't exist. - rpc :CreateGlossary, ::Google::Cloud::Translate::V3::CreateGlossaryRequest, ::Google::Longrunning::Operation - # Updates a glossary. A LRO is used since the update can be async if the - # glossary's entry file is updated. - rpc :UpdateGlossary, ::Google::Cloud::Translate::V3::UpdateGlossaryRequest, ::Google::Longrunning::Operation - # Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't - # exist. - rpc :ListGlossaries, ::Google::Cloud::Translate::V3::ListGlossariesRequest, ::Google::Cloud::Translate::V3::ListGlossariesResponse - # Gets a glossary. Returns NOT_FOUND, if the glossary doesn't - # exist. - rpc :GetGlossary, ::Google::Cloud::Translate::V3::GetGlossaryRequest, ::Google::Cloud::Translate::V3::Glossary - # Deletes a glossary, or cancels glossary construction - # if the glossary isn't created yet. - # Returns NOT_FOUND, if the glossary doesn't exist. - rpc :DeleteGlossary, ::Google::Cloud::Translate::V3::DeleteGlossaryRequest, ::Google::Longrunning::Operation - # Gets a single glossary entry by the given id. - rpc :GetGlossaryEntry, ::Google::Cloud::Translate::V3::GetGlossaryEntryRequest, ::Google::Cloud::Translate::V3::GlossaryEntry - # List the entries for the glossary. - rpc :ListGlossaryEntries, ::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest, ::Google::Cloud::Translate::V3::ListGlossaryEntriesResponse - # Creates a glossary entry. - rpc :CreateGlossaryEntry, ::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest, ::Google::Cloud::Translate::V3::GlossaryEntry - # Updates a glossary entry. - rpc :UpdateGlossaryEntry, ::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest, ::Google::Cloud::Translate::V3::GlossaryEntry - # Deletes a single entry from the glossary - rpc :DeleteGlossaryEntry, ::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest, ::Google::Protobuf::Empty - # Creates a Dataset. - rpc :CreateDataset, ::Google::Cloud::Translate::V3::CreateDatasetRequest, ::Google::Longrunning::Operation - # Gets a Dataset. - rpc :GetDataset, ::Google::Cloud::Translate::V3::GetDatasetRequest, ::Google::Cloud::Translate::V3::Dataset - # Lists datasets. - rpc :ListDatasets, ::Google::Cloud::Translate::V3::ListDatasetsRequest, ::Google::Cloud::Translate::V3::ListDatasetsResponse - # Deletes a dataset and all of its contents. - rpc :DeleteDataset, ::Google::Cloud::Translate::V3::DeleteDatasetRequest, ::Google::Longrunning::Operation - # Creates an Adaptive MT dataset. - rpc :CreateAdaptiveMtDataset, ::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest, ::Google::Cloud::Translate::V3::AdaptiveMtDataset - # Deletes an Adaptive MT dataset, including all its entries and associated - # metadata. - rpc :DeleteAdaptiveMtDataset, ::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest, ::Google::Protobuf::Empty - # Gets the Adaptive MT dataset. - rpc :GetAdaptiveMtDataset, ::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest, ::Google::Cloud::Translate::V3::AdaptiveMtDataset - # Lists all Adaptive MT datasets for which the caller has read permission. - rpc :ListAdaptiveMtDatasets, ::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest, ::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsResponse - # Translate text using Adaptive MT. - rpc :AdaptiveMtTranslate, ::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest, ::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse - # Gets and AdaptiveMtFile - rpc :GetAdaptiveMtFile, ::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest, ::Google::Cloud::Translate::V3::AdaptiveMtFile - # Deletes an AdaptiveMtFile along with its sentences. - rpc :DeleteAdaptiveMtFile, ::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest, ::Google::Protobuf::Empty - # Imports an AdaptiveMtFile and adds all of its sentences into the - # AdaptiveMtDataset. - rpc :ImportAdaptiveMtFile, ::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest, ::Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse - # Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset. - rpc :ListAdaptiveMtFiles, ::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest, ::Google::Cloud::Translate::V3::ListAdaptiveMtFilesResponse - # Lists all AdaptiveMtSentences under a given file/dataset. - rpc :ListAdaptiveMtSentences, ::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest, ::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesResponse - # Import sentence pairs into translation Dataset. - rpc :ImportData, ::Google::Cloud::Translate::V3::ImportDataRequest, ::Google::Longrunning::Operation - # Exports dataset's data to the provided output location. - rpc :ExportData, ::Google::Cloud::Translate::V3::ExportDataRequest, ::Google::Longrunning::Operation - # Lists sentence pairs in the dataset. - rpc :ListExamples, ::Google::Cloud::Translate::V3::ListExamplesRequest, ::Google::Cloud::Translate::V3::ListExamplesResponse - # Creates a Model. - rpc :CreateModel, ::Google::Cloud::Translate::V3::CreateModelRequest, ::Google::Longrunning::Operation - # Lists models. - rpc :ListModels, ::Google::Cloud::Translate::V3::ListModelsRequest, ::Google::Cloud::Translate::V3::ListModelsResponse - # Gets a model. - rpc :GetModel, ::Google::Cloud::Translate::V3::GetModelRequest, ::Google::Cloud::Translate::V3::Model - # Deletes a model. - rpc :DeleteModel, ::Google::Cloud::Translate::V3::DeleteModelRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/version.rb b/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/version.rb deleted file mode 100644 index dacb619abd34..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/lib/google/cloud/translate/v3/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 Translate - module V3 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-translate-v3/proto_docs/README.md b/owl-bot-staging/google-cloud-translate-v3/proto_docs/README.md deleted file mode 100644 index 4a5eb6a2d169..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Translation V3 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-translate-v3/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # 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. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - # - # Example: - # - # 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 - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # 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 - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # 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 - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/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-translate-v3/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/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-translate-v3/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/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-translate-v3/proto_docs/google/cloud/translate/v3/adaptive_mt.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/adaptive_mt.rb deleted file mode 100644 index 9c20fdd4d804..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/adaptive_mt.rb +++ /dev/null @@ -1,405 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Translate - module V3 - # An Adaptive MT Dataset. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the dataset, in form of - # `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_id}` - # @!attribute [rw] display_name - # @return [::String] - # The name of the dataset to show in the interface. The name can be - # up to 32 characters long and can consist only of ASCII Latin letters A-Z - # and a-z, underscores (_), and ASCII digits 0-9. - # @!attribute [rw] source_language_code - # @return [::String] - # The BCP-47 language code of the source language. - # @!attribute [rw] target_language_code - # @return [::String] - # The BCP-47 language code of the target language. - # @!attribute [rw] example_count - # @return [::Integer] - # The number of examples in the dataset. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this dataset was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this dataset was last updated. - class AdaptiveMtDataset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - #  Request message for creating an AdaptiveMtDataset. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the parent project. In form of - # `projects/{project-number-or-id}/locations/{location-id}` - # @!attribute [rw] adaptive_mt_dataset - # @return [::Google::Cloud::Translate::V3::AdaptiveMtDataset] - # Required. The AdaptiveMtDataset to be created. - class CreateAdaptiveMtDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting an AdaptiveMtDataset. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the dataset. In the form of - # `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` - class DeleteAdaptiveMtDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting an Adaptive MT dataset. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the dataset. In the form of - # `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` - class GetAdaptiveMtDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing all Adaptive MT datasets that the requestor has - # access to. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the project from which to list the Adaptive - # MT datasets. `projects/{project-number-or-id}/locations/{location-id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. The server may return fewer results than - # requested. If unspecified, the server picks an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # Typically, this is the value of - # ListAdaptiveMtDatasetsResponse.next_page_token returned from the - # previous call to `ListAdaptiveMtDatasets` method. The first page is - # returned if `page_token`is empty or missing. - # @!attribute [rw] filter - # @return [::String] - # Optional. An expression for filtering the results of the request. - # Filter is not supported yet. - class ListAdaptiveMtDatasetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A list of AdaptiveMtDatasets. - # @!attribute [r] adaptive_mt_datasets - # @return [::Array<::Google::Cloud::Translate::V3::AdaptiveMtDataset>] - # Output only. A list of Adaptive MT datasets. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token to retrieve a page of results. Pass this value in the - # [ListAdaptiveMtDatasetsRequest.page_token] field in the subsequent call to - # `ListAdaptiveMtDatasets` method to retrieve the next page of results. - class ListAdaptiveMtDatasetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for sending an AdaptiveMt translation query. - # @!attribute [rw] parent - # @return [::String] - # Required. Location to make a regional call. - # - # Format: `projects/{project-number-or-id}/locations/{location-id}`. - # @!attribute [rw] dataset - # @return [::String] - # Required. The resource name for the dataset to use for adaptive MT. - # `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}` - # @!attribute [rw] content - # @return [::Array<::String>] - # Required. The content of the input in string format. - # @!attribute [rw] reference_sentence_config - # @return [::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::ReferenceSentenceConfig] - # Configuration for caller provided reference sentences. - # @!attribute [rw] glossary_config - # @return [::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::GlossaryConfig] - # Optional. Glossary to be applied. The glossary must be - # within the same region (have the same location-id) as the model, otherwise - # an INVALID_ARGUMENT (400) error is returned. - class AdaptiveMtTranslateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A pair of sentences used as reference in source and target languages. - # @!attribute [rw] source_sentence - # @return [::String] - # Source sentence in the sentence pair. - # @!attribute [rw] target_sentence - # @return [::String] - # Target sentence in the sentence pair. - class ReferenceSentencePair - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A list of reference sentence pairs. - # @!attribute [rw] reference_sentence_pairs - # @return [::Array<::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::ReferenceSentencePair>] - # Reference sentence pairs. - class ReferenceSentencePairList - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message of caller-provided reference configuration. - # @!attribute [rw] reference_sentence_pair_lists - # @return [::Array<::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::ReferenceSentencePairList>] - # Reference sentences pair lists. Each list will be used as the references - # to translate the sentence under "content" field at the corresponding - # index. Length of the list is required to be equal to the length of - # "content" field. - # @!attribute [rw] source_language_code - # @return [::String] - # Source language code. - # @!attribute [rw] target_language_code - # @return [::String] - # Target language code. - class ReferenceSentenceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configures which glossary is used for a specific target language and - # defines - # options for applying that glossary. - # @!attribute [rw] glossary - # @return [::String] - # Required. The `glossary` to be applied for this translation. - # - # The format depends on the glossary: - # - # - User-provided custom glossary: - # `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}` - # @!attribute [rw] ignore_case - # @return [::Boolean] - # Optional. Indicates match is case insensitive. The default value is - # `false` if missing. - # @!attribute [rw] contextual_translation_enabled - # @return [::Boolean] - # Optional. If set to true, the glossary will be used for contextual - # translation. - class GlossaryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # An AdaptiveMt translation. - # @!attribute [r] translated_text - # @return [::String] - # Output only. The translated text. - class AdaptiveMtTranslation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An AdaptiveMtTranslate response. - # @!attribute [r] translations - # @return [::Array<::Google::Cloud::Translate::V3::AdaptiveMtTranslation>] - # Output only. The translation. - # @!attribute [r] language_code - # @return [::String] - # Output only. The translation's language code. - # @!attribute [rw] glossary_translations - # @return [::Array<::Google::Cloud::Translate::V3::AdaptiveMtTranslation>] - # Text translation response if a glossary is provided in the request. This - # could be the same as 'translation' above if no terms apply. - class AdaptiveMtTranslateResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An AdaptiveMtFile. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the file, in form of - # `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - # @!attribute [rw] display_name - # @return [::String] - # The file's display name. - # @!attribute [rw] entry_count - # @return [::Integer] - # The number of entries that the file contains. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this file was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this file was last updated. - class AdaptiveMtFile - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for getting an AdaptiveMtFile. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the file, in form of - # `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - class GetAdaptiveMtFileRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for deleting an AdaptiveMt file. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the file to delete, in form of - # `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - class DeleteAdaptiveMtFileRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for importing an AdaptiveMt file along with its sentences. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the file, in form of - # `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}` - # @!attribute [rw] file_input_source - # @return [::Google::Cloud::Translate::V3::FileInputSource] - # Inline file source. - # - # Note: The following fields are mutually exclusive: `file_input_source`, `gcs_input_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gcs_input_source - # @return [::Google::Cloud::Translate::V3::GcsInputSource] - # Google Cloud Storage file source. - # - # Note: The following fields are mutually exclusive: `gcs_input_source`, `file_input_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ImportAdaptiveMtFileRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for importing an AdaptiveMtFile - # @!attribute [r] adaptive_mt_file - # @return [::Google::Cloud::Translate::V3::AdaptiveMtFile] - # Output only. The Adaptive MT file that was imported. - class ImportAdaptiveMtFileResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to list all AdaptiveMt files under a given dataset. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the project from which to list the Adaptive - # MT files. - # `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # Typically, this is the value of - # ListAdaptiveMtFilesResponse.next_page_token returned from the - # previous call to `ListAdaptiveMtFiles` method. The first page is - # returned if `page_token`is empty or missing. - class ListAdaptiveMtFilesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for listing all AdaptiveMt files under a given dataset. - # @!attribute [r] adaptive_mt_files - # @return [::Array<::Google::Cloud::Translate::V3::AdaptiveMtFile>] - # Output only. The Adaptive MT files. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token to retrieve a page of results. Pass this value in the - # ListAdaptiveMtFilesRequest.page_token field in the subsequent call to - # `ListAdaptiveMtFiles` method to retrieve the next page of results. - class ListAdaptiveMtFilesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An AdaptiveMt sentence entry. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the file, in form of - # `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}/adaptiveMtSentences/{sentence}` - # @!attribute [rw] source_sentence - # @return [::String] - # Required. The source sentence. - # @!attribute [rw] target_sentence - # @return [::String] - # Required. The target sentence. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this sentence was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this sentence was last updated. - class AdaptiveMtSentence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for listing Adaptive MT sentences from a Dataset/File. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the project from which to list the Adaptive - # MT files. The following format lists all sentences under a file. - # `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - # The following format lists all sentences within a dataset. - # `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` - # @!attribute [rw] page_size - # @return [::Integer] - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results the server should return. - # Typically, this is the value of - # ListAdaptiveMtSentencesRequest.next_page_token returned from the - # previous call to `ListTranslationMemories` method. The first page is - # returned if `page_token` is empty or missing. - class ListAdaptiveMtSentencesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List AdaptiveMt sentences response. - # @!attribute [r] adaptive_mt_sentences - # @return [::Array<::Google::Cloud::Translate::V3::AdaptiveMtSentence>] - # Output only. The list of AdaptiveMtSentences. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. - class ListAdaptiveMtSentencesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/automl_translation.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/automl_translation.rb deleted file mode 100644 index 0c1912d9abd3..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/automl_translation.rb +++ /dev/null @@ -1,487 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Translate - module V3 - # Request message for ImportData. - # @!attribute [rw] dataset - # @return [::String] - # Required. Name of the dataset. In form of - # `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` - # @!attribute [rw] input_config - # @return [::Google::Cloud::Translate::V3::DatasetInputConfig] - # Required. The config for the input content. - class ImportDataRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Input configuration for datasets. - # @!attribute [rw] input_files - # @return [::Array<::Google::Cloud::Translate::V3::DatasetInputConfig::InputFile>] - # Files containing the sentence pairs to be imported to the dataset. - class DatasetInputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An input file. - # @!attribute [rw] usage - # @return [::String] - # Optional. Usage of the file contents. Options are TRAIN|VALIDATION|TEST, - # or UNASSIGNED (by default) for auto split. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::Translate::V3::GcsInputSource] - # Google Cloud Storage file source. - class InputFile - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Metadata of import data operation. - # @!attribute [rw] state - # @return [::Google::Cloud::Translate::V3::OperationState] - # The current state of the operation. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The creation time of the operation. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The last update time of the operation. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # Only populated when operation doesn't succeed. - class ImportDataMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ExportData. - # @!attribute [rw] dataset - # @return [::String] - # Required. Name of the dataset. In form of - # `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` - # @!attribute [rw] output_config - # @return [::Google::Cloud::Translate::V3::DatasetOutputConfig] - # Required. The config for the output content. - class ExportDataRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Output configuration for datasets. - # @!attribute [rw] gcs_destination - # @return [::Google::Cloud::Translate::V3::GcsOutputDestination] - # Google Cloud Storage destination to write the output. - class DatasetOutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata of export data operation. - # @!attribute [rw] state - # @return [::Google::Cloud::Translate::V3::OperationState] - # The current state of the operation. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The creation time of the operation. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The last update time of the operation. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # Only populated when operation doesn't succeed. - class ExportDataMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteDataset. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the dataset to delete. - class DeleteDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata of delete dataset operation. - # @!attribute [rw] state - # @return [::Google::Cloud::Translate::V3::OperationState] - # The current state of the operation. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The creation time of the operation. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The last update time of the operation. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # Only populated when operation doesn't succeed. - class DeleteDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetDataset. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the dataset to retrieve. - class GetDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListDatasets. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the parent project. In form of - # `projects/{project-number-or-id}/locations/{location-id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. The server can return fewer results than - # requested. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results for the server to return. - # Typically obtained from next_page_token field in the response of a - # ListDatasets call. - class ListDatasetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListDatasets. - # @!attribute [rw] datasets - # @return [::Array<::Google::Cloud::Translate::V3::Dataset>] - # The datasets read. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # Pass this token to the page_token field in the ListDatasetsRequest to - # obtain the corresponding page. - class ListDatasetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateDataset. - # @!attribute [rw] parent - # @return [::String] - # Required. The project name. - # @!attribute [rw] dataset - # @return [::Google::Cloud::Translate::V3::Dataset] - # Required. The Dataset to create. - class CreateDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata of create dataset operation. - # @!attribute [rw] state - # @return [::Google::Cloud::Translate::V3::OperationState] - # The current state of the operation. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The creation time of the operation. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The last update time of the operation. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # Only populated when operation doesn't succeed. - class CreateDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListExamples. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the parent dataset. In form of - # `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` - # @!attribute [rw] filter - # @return [::String] - # Optional. An expression for filtering the examples that will be returned. - # Example filter: - # * `usage=TRAIN` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. The server can return fewer results than - # requested. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results for the server to return. - # Typically obtained from next_page_token field in the response of a - # ListExamples call. - class ListExamplesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListExamples. - # @!attribute [rw] examples - # @return [::Array<::Google::Cloud::Translate::V3::Example>] - # The sentence pairs. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # Pass this token to the page_token field in the ListExamplesRequest to - # obtain the corresponding page. - class ListExamplesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A sentence pair. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the example, in form of - # `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}` - # @!attribute [rw] source_text - # @return [::String] - # Sentence in source language. - # @!attribute [rw] target_text - # @return [::String] - # Sentence in target language. - # @!attribute [r] usage - # @return [::String] - # Output only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST. - class Example - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for BatchTransferResources. - # @!attribute [rw] responses - # @return [::Array<::Google::Cloud::Translate::V3::BatchTransferResourcesResponse::TransferResourceResponse>] - # Responses of the transfer for individual resources. - class BatchTransferResourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Transfer response for a single resource. - # @!attribute [rw] source - # @return [::String] - # Full name of the resource to transfer as specified in the request. - # @!attribute [rw] target - # @return [::String] - # Full name of the new resource successfully transferred from the source - # hosted by Translation API. Target will be empty if the transfer failed. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result in case of failure. - class TransferResourceResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A dataset that hosts the examples (sentence pairs) used for translation - # models. - # @!attribute [rw] name - # @return [::String] - # The resource name of the dataset, in form of - # `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}` - # @!attribute [rw] display_name - # @return [::String] - # The name of the dataset to show in the interface. The name can be - # up to 32 characters long and can consist only of ASCII Latin letters A-Z - # and a-z, underscores (_), and ASCII digits 0-9. - # @!attribute [rw] source_language_code - # @return [::String] - # The BCP-47 language code of the source language. - # @!attribute [rw] target_language_code - # @return [::String] - # The BCP-47 language code of the target language. - # @!attribute [r] example_count - # @return [::Integer] - # Output only. The number of examples in the dataset. - # @!attribute [r] train_example_count - # @return [::Integer] - # Output only. Number of training examples (sentence pairs). - # @!attribute [r] validate_example_count - # @return [::Integer] - # Output only. Number of validation examples (sentence pairs). - # @!attribute [r] test_example_count - # @return [::Integer] - # Output only. Number of test examples (sentence pairs). - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this dataset was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this dataset was last updated. - class Dataset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateModel. - # @!attribute [rw] parent - # @return [::String] - # Required. The project name, in form of - # `projects/{project}/locations/{location}` - # @!attribute [rw] model - # @return [::Google::Cloud::Translate::V3::Model] - # Required. The Model to create. - class CreateModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata of create model operation. - # @!attribute [rw] state - # @return [::Google::Cloud::Translate::V3::OperationState] - # The current state of the operation. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The creation time of the operation. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The last update time of the operation. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # Only populated when operation doesn't succeed. - class CreateModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListModels. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the parent project. In form of - # `projects/{project-number-or-id}/locations/{location-id}` - # @!attribute [rw] filter - # @return [::String] - # Optional. An expression for filtering the models that will be returned. - # Supported filter: - # `dataset_id=${dataset_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. The server can return fewer results than - # requested. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results for the server to return. - # Typically obtained from next_page_token field in the response of a - # ListModels call. - class ListModelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListModels. - # @!attribute [rw] models - # @return [::Array<::Google::Cloud::Translate::V3::Model>] - # The models read. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # Pass this token to the page_token field in the ListModelsRequest to - # obtain the corresponding page. - class ListModelsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetModel. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the model to retrieve. - class GetModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteModel. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the model to delete. - class DeleteModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata of delete model operation. - # @!attribute [rw] state - # @return [::Google::Cloud::Translate::V3::OperationState] - # The current state of the operation. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The creation time of the operation. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The last update time of the operation. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # Only populated when operation doesn't succeed. - class DeleteModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A trained translation model. - # @!attribute [rw] name - # @return [::String] - # The resource name of the model, in form of - # `projects/{project-number-or-id}/locations/{location_id}/models/{model_id}` - # @!attribute [rw] display_name - # @return [::String] - # The name of the model to show in the interface. The name can be - # up to 32 characters long and can consist only of ASCII Latin letters A-Z - # and a-z, underscores (_), and ASCII digits 0-9. - # @!attribute [rw] dataset - # @return [::String] - # The dataset from which the model is trained, in form of - # `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}` - # @!attribute [r] source_language_code - # @return [::String] - # Output only. The BCP-47 language code of the source language. - # @!attribute [r] target_language_code - # @return [::String] - # Output only. The BCP-47 language code of the target language. - # @!attribute [r] train_example_count - # @return [::Integer] - # Output only. Number of examples (sentence pairs) used to train the model. - # @!attribute [r] validate_example_count - # @return [::Integer] - # Output only. Number of examples (sentence pairs) used to validate the - # model. - # @!attribute [r] test_example_count - # @return [::Integer] - # Output only. Number of examples (sentence pairs) used to test the model. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the model resource was created, which is also - # when the training started. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this model was last updated. - class Model - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/common.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/common.rb deleted file mode 100644 index 2309b07edac1..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/common.rb +++ /dev/null @@ -1,143 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Translate - module V3 - # The Google Cloud Storage location for the input content. - # @!attribute [rw] input_uri - # @return [::String] - # Required. Source data URI. For example, `gs://my_bucket/my_object`. - class GcsInputSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An inlined file. - # @!attribute [rw] mime_type - # @return [::String] - # Required. The file's mime type. - # @!attribute [rw] content - # @return [::String] - # Required. The file's byte contents. - # @!attribute [rw] display_name - # @return [::String] - # Required. The file's display name. - class FileInputSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The Google Cloud Storage location for the output content. - # @!attribute [rw] output_uri_prefix - # @return [::String] - # Required. Google Cloud Storage URI to output directory. For example, - # `gs://bucket/directory`. The requesting user must have write permission to - # the bucket. The directory will be created if it doesn't exist. - class GcsOutputDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a single entry in a glossary. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the entry. - # Format: - # `projects/*/locations/*/glossaries/*/glossaryEntries/*` - # @!attribute [rw] terms_pair - # @return [::Google::Cloud::Translate::V3::GlossaryEntry::GlossaryTermsPair] - # Used for an unidirectional glossary. - # - # Note: The following fields are mutually exclusive: `terms_pair`, `terms_set`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] terms_set - # @return [::Google::Cloud::Translate::V3::GlossaryEntry::GlossaryTermsSet] - # Used for an equivalent term sets glossary. - # - # Note: The following fields are mutually exclusive: `terms_set`, `terms_pair`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] description - # @return [::String] - # Describes the glossary entry. - class GlossaryEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents a single entry for an unidirectional glossary. - # @!attribute [rw] source_term - # @return [::Google::Cloud::Translate::V3::GlossaryTerm] - # The source term is the term that will get match in the text, - # @!attribute [rw] target_term - # @return [::Google::Cloud::Translate::V3::GlossaryTerm] - # The term that will replace the match source term. - class GlossaryTermsPair - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a single entry for an equivalent term set glossary. This is used - # for equivalent term sets where each term can be replaced by the other terms - # in the set. - # @!attribute [rw] terms - # @return [::Array<::Google::Cloud::Translate::V3::GlossaryTerm>] - # Each term in the set represents a term that can be replaced by the other - # terms. - class GlossaryTermsSet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Represents a single glossary term - # @!attribute [rw] language_code - # @return [::String] - # The language for this glossary term. - # @!attribute [rw] text - # @return [::String] - # The text for the glossary term. - class GlossaryTerm - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Possible states of long running operations. - module OperationState - # Invalid. - OPERATION_STATE_UNSPECIFIED = 0 - - # Request is being processed. - OPERATION_STATE_RUNNING = 1 - - # The operation was successful. - OPERATION_STATE_SUCCEEDED = 2 - - # Failed to process operation. - OPERATION_STATE_FAILED = 3 - - # Request is in the process of being canceled after caller invoked - # longrunning.Operations.CancelOperation on the request id. - OPERATION_STATE_CANCELLING = 4 - - # The operation request was successfully canceled. - OPERATION_STATE_CANCELLED = 5 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/translation_service.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/translation_service.rb deleted file mode 100644 index 314073d5ff59..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/cloud/translate/v3/translation_service.rb +++ /dev/null @@ -1,1657 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Translate - module V3 - # Configures transliteration feature on top of translation. - # @!attribute [rw] enable_transliteration - # @return [::Boolean] - # If true, source text in romanized form can be translated to the target - # language. - class TransliterationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for synchronous translation. - # @!attribute [rw] contents - # @return [::Array<::String>] - # Required. The content of the input in string format. - # We recommend the total content be less than 30,000 codepoints. The max - # length of this field is 1024. Use BatchTranslateText for larger text. - # @!attribute [rw] mime_type - # @return [::String] - # Optional. The format of the source text, for example, "text/html", - # "text/plain". If left blank, the MIME type defaults to "text/html". - # @!attribute [rw] source_language_code - # @return [::String] - # Optional. The ISO-639 language code of the input text if - # known, for example, "en-US" or "sr-Latn". Supported language codes are - # listed in [Language - # Support](https://cloud.google.com/translate/docs/languages). If the source - # language isn't specified, the API attempts to identify the source language - # automatically and returns the source language within the response. - # @!attribute [rw] target_language_code - # @return [::String] - # Required. The ISO-639 language code to use for translation of the input - # text, set to one of the language codes listed in [Language - # Support](https://cloud.google.com/translate/docs/languages). - # @!attribute [rw] parent - # @return [::String] - # Required. Project or location to make a call. Must refer to a caller's - # project. - # - # Format: `projects/{project-number-or-id}` or - # `projects/{project-number-or-id}/locations/{location-id}`. - # - # For global calls, use `projects/{project-number-or-id}/locations/global` or - # `projects/{project-number-or-id}`. - # - # Non-global location is required for requests using AutoML models or - # custom glossaries. - # - # Models and glossaries must be within the same region (have same - # location-id), otherwise an INVALID_ARGUMENT (400) error is returned. - # @!attribute [rw] model - # @return [::String] - # Optional. The `model` type requested for this translation. - # - # The format depends on model type: - # - # - AutoML Translation models: - # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - # - # - General (built-in) models: - # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - # - # - Translation LLM models: - # `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, - # - # For global (non-regionalized) requests, use `location-id` `global`. - # For example, - # `projects/{project-number-or-id}/locations/global/models/general/nmt`. - # - # If not provided, the default Google model (NMT) will be used - # @!attribute [rw] glossary_config - # @return [::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig] - # Optional. Glossary to be applied. The glossary must be - # within the same region (have the same location-id) as the model, otherwise - # an INVALID_ARGUMENT (400) error is returned. - # @!attribute [rw] transliteration_config - # @return [::Google::Cloud::Translate::V3::TransliterationConfig] - # Optional. Transliteration to be applied. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The labels with user-defined metadata for the request. - # - # Label keys and values can be no longer than 63 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # Label values are optional. Label keys must start with a letter. - # - # See https://cloud.google.com/translate/docs/advanced/labels for more - # information. - class TranslateTextRequest - 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 - - # @!attribute [rw] translations - # @return [::Array<::Google::Cloud::Translate::V3::Translation>] - # Text translation responses with no glossary applied. - # This field has the same length as - # {::Google::Cloud::Translate::V3::TranslateTextRequest#contents `contents`}. - # @!attribute [rw] glossary_translations - # @return [::Array<::Google::Cloud::Translate::V3::Translation>] - # Text translation responses if a glossary is provided in the request. - # This can be the same as - # {::Google::Cloud::Translate::V3::TranslateTextResponse#translations `translations`} - # if no terms apply. This field has the same length as - # {::Google::Cloud::Translate::V3::TranslateTextRequest#contents `contents`}. - class TranslateTextResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A single translation response. - # @!attribute [rw] translated_text - # @return [::String] - # Text translated into the target language. - # If an error occurs during translation, this field might be excluded from - # the response. - # @!attribute [rw] model - # @return [::String] - # Only present when `model` is present in the request. - # `model` here is normalized to have project number. - # - # For example: - # If the `model` requested in TranslationTextRequest is - # `projects/{project-id}/locations/{location-id}/models/general/nmt` then - # `model` here would be normalized to - # `projects/{project-number}/locations/{location-id}/models/general/nmt`. - # @!attribute [rw] detected_language_code - # @return [::String] - # The ISO-639 language code of source text in the initial request, detected - # automatically, if no source language was passed within the initial - # request. If the source language was passed, auto-detection of the language - # does not occur and this field is empty. - # @!attribute [rw] glossary_config - # @return [::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig] - # The `glossary_config` used for this translation. - class Translation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for synchronous romanization. - # @!attribute [rw] parent - # @return [::String] - # Required. Project or location to make a call. Must refer to a caller's - # project. - # - # Format: `projects/{project-number-or-id}/locations/{location-id}` or - # `projects/{project-number-or-id}`. - # - # For global calls, use `projects/{project-number-or-id}/locations/global` or - # `projects/{project-number-or-id}`. - # @!attribute [rw] contents - # @return [::Array<::String>] - # Required. The content of the input in string format. - # @!attribute [rw] source_language_code - # @return [::String] - # Optional. The ISO-639 language code of the input text if - # known, for example, "hi" or "zh". Supported language codes are - # listed in [Language - # Support](https://cloud.google.com/translate/docs/languages#roman). If the - # source language isn't specified, the API attempts to identify the source - # language automatically and returns the source language for each content in - # the response. - class RomanizeTextRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A single romanization response. - # @!attribute [rw] romanized_text - # @return [::String] - # Romanized text. - # If an error occurs during romanization, this field might be excluded from - # the response. - # @!attribute [rw] detected_language_code - # @return [::String] - # The ISO-639 language code of source text in the initial request, detected - # automatically, if no source language was passed within the initial - # request. If the source language was passed, auto-detection of the language - # does not occur and this field is empty. - class Romanization - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for synchronous romanization. - # @!attribute [rw] romanizations - # @return [::Array<::Google::Cloud::Translate::V3::Romanization>] - # Text romanization responses. - # This field has the same length as - # {::Google::Cloud::Translate::V3::RomanizeTextRequest#contents `contents`}. - class RomanizeTextResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for language detection. - # @!attribute [rw] parent - # @return [::String] - # Required. Project or location to make a call. Must refer to a caller's - # project. - # - # Format: `projects/{project-number-or-id}/locations/{location-id}` or - # `projects/{project-number-or-id}`. - # - # For global calls, use `projects/{project-number-or-id}/locations/global` or - # `projects/{project-number-or-id}`. - # - # Only models within the same region (has same location-id) can be used. - # Otherwise an INVALID_ARGUMENT (400) error is returned. - # @!attribute [rw] model - # @return [::String] - # Optional. The language detection model to be used. - # - # Format: - # `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` - # - # Only one language detection model is currently supported: - # `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. - # - # If not specified, the default model is used. - # @!attribute [rw] content - # @return [::String] - # The content of the input stored as a string. - # @!attribute [rw] mime_type - # @return [::String] - # Optional. The format of the source text, for example, "text/html", - # "text/plain". If left blank, the MIME type defaults to "text/html". - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The labels with user-defined metadata for the request. - # - # Label keys and values can be no longer than 63 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # Label values are optional. Label keys must start with a letter. - # - # See https://cloud.google.com/translate/docs/advanced/labels for more - # information. - class DetectLanguageRequest - 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 message for language detection. - # @!attribute [rw] language_code - # @return [::String] - # The ISO-639 language code of the source content in the request, detected - # automatically. - # @!attribute [rw] confidence - # @return [::Float] - # The confidence of the detection result for this language. - class DetectedLanguage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for language detection. - # @!attribute [rw] languages - # @return [::Array<::Google::Cloud::Translate::V3::DetectedLanguage>] - # The most probable language detected by the Translation API. For each - # request, the Translation API will always return only one result. - class DetectLanguageResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for discovering supported languages. - # @!attribute [rw] parent - # @return [::String] - # Required. Project or location to make a call. Must refer to a caller's - # project. - # - # Format: `projects/{project-number-or-id}` or - # `projects/{project-number-or-id}/locations/{location-id}`. - # - # For global calls, use `projects/{project-number-or-id}/locations/global` or - # `projects/{project-number-or-id}`. - # - # Non-global location is required for AutoML models. - # - # Only models within the same region (have same location-id) can be used, - # otherwise an INVALID_ARGUMENT (400) error is returned. - # @!attribute [rw] display_language_code - # @return [::String] - # Optional. The language to use to return localized, human readable names - # of supported languages. If missing, then display names are not returned - # in a response. - # @!attribute [rw] model - # @return [::String] - # Optional. Get supported languages of this model. - # - # The format depends on model type: - # - # - AutoML Translation models: - # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - # - # - General (built-in) models: - # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - # - # - # Returns languages supported by the specified model. - # If missing, we get supported languages of Google general NMT model. - class GetSupportedLanguagesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for discovering supported languages. - # @!attribute [rw] languages - # @return [::Array<::Google::Cloud::Translate::V3::SupportedLanguage>] - # A list of supported language responses. This list contains an entry - # for each language the Translation API supports. - class SupportedLanguages - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A single supported language response corresponds to information related - # to one supported language. - # @!attribute [rw] language_code - # @return [::String] - # Supported language code, generally consisting of its ISO 639-1 - # identifier, for example, 'en', 'ja'. In certain cases, ISO-639 codes - # including language and region identifiers are returned (for example, - # 'zh-TW' and 'zh-CN'). - # @!attribute [rw] display_name - # @return [::String] - # Human-readable name of the language localized in the display language - # specified in the request. - # @!attribute [rw] support_source - # @return [::Boolean] - # Can be used as a source language. - # @!attribute [rw] support_target - # @return [::Boolean] - # Can be used as a target language. - class SupportedLanguage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The Google Cloud Storage location for the input content. - # @!attribute [rw] input_uri - # @return [::String] - # Required. Source data URI. For example, `gs://my_bucket/my_object`. - class GcsSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Input configuration for BatchTranslateText request. - # @!attribute [rw] mime_type - # @return [::String] - # Optional. Can be "text/plain" or "text/html". - # For `.tsv`, "text/html" is used if mime_type is missing. - # For `.html`, this field must be "text/html" or empty. - # For `.txt`, this field must be "text/plain" or empty. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::Translate::V3::GcsSource] - # Required. Google Cloud Storage location for the source input. - # This can be a single file (for example, - # `gs://translation-test/input.tsv`) or a wildcard (for example, - # `gs://translation-test/*`). If a file extension is `.tsv`, it can - # contain either one or two columns. The first column (optional) is the id - # of the text request. If the first column is missing, we use the row - # number (0-based) from the input file as the ID in the output file. The - # second column is the actual text to be - # translated. We recommend each row be <= 10K Unicode codepoints, - # otherwise an error might be returned. - # Note that the input tsv must be RFC 4180 compliant. - # - # You could use https://github.com/Clever/csvlint to check potential - # formatting errors in your tsv file. - # csvlint --delimiter='\t' your_input_file.tsv - # - # The other supported file extensions are `.txt` or `.html`, which is - # treated as a single large chunk of text. - class InputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The Google Cloud Storage location for the output content. - # @!attribute [rw] output_uri_prefix - # @return [::String] - # Required. The bucket used in 'output_uri_prefix' must exist and there must - # be no files under 'output_uri_prefix'. 'output_uri_prefix' must end with - # "/" and start with "gs://". One 'output_uri_prefix' can only be used by one - # batch translation job at a time. Otherwise an INVALID_ARGUMENT (400) error - # is returned. - class GcsDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Output configuration for BatchTranslateText request. - # @!attribute [rw] gcs_destination - # @return [::Google::Cloud::Translate::V3::GcsDestination] - # Google Cloud Storage destination for output content. - # For every single input file (for example, gs://a/b/c.[extension]), we - # generate at most 2 * n output files. (n is the # of target_language_codes - # in the BatchTranslateTextRequest). - # - # Output files (tsv) generated are compliant with RFC 4180 except that - # record delimiters are '\n' instead of '\r\n'. We don't provide any way to - # change record delimiters. - # - # While the input files are being processed, we write/update an index file - # 'index.csv' under 'output_uri_prefix' (for example, - # gs://translation-test/index.csv) The index file is generated/updated as - # new files are being translated. The format is: - # - # input_file,target_language_code,translations_file,errors_file, - # glossary_translations_file,glossary_errors_file - # - # input_file is one file we matched using gcs_source.input_uri. - # target_language_code is provided in the request. - # translations_file contains the translations. (details provided below) - # errors_file contains the errors during processing of the file. (details - # below). Both translations_file and errors_file could be empty - # strings if we have no content to output. - # glossary_translations_file and glossary_errors_file are always empty - # strings if the input_file is tsv. They could also be empty if we have no - # content to output. - # - # Once a row is present in index.csv, the input/output matching never - # changes. Callers should also expect all the content in input_file are - # processed and ready to be consumed (that is, no partial output file is - # written). - # - # Since index.csv will be keeping updated during the process, please make - # sure there is no custom retention policy applied on the output bucket - # that may avoid file updating. - # (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) - # - # The format of translations_file (for target language code 'trg') is: - # `gs://translation_test/a_b_c_'trg'_translations.[extension]` - # - # If the input file extension is tsv, the output has the following - # columns: - # Column 1: ID of the request provided in the input, if it's not - # provided in the input, then the input row number is used (0-based). - # Column 2: source sentence. - # Column 3: translation without applying a glossary. Empty string if there - # is an error. - # Column 4 (only present if a glossary is provided in the request): - # translation after applying the glossary. Empty string if there is an - # error applying the glossary. Could be same string as column 3 if there is - # no glossary applied. - # - # If input file extension is a txt or html, the translation is directly - # written to the output file. If glossary is requested, a separate - # glossary_translations_file has format of - # `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]` - # - # The format of errors file (for target language code 'trg') is: - # `gs://translation_test/a_b_c_'trg'_errors.[extension]` - # - # If the input file extension is tsv, errors_file contains the following: - # Column 1: ID of the request provided in the input, if it's not - # provided in the input, then the input row number is used (0-based). - # Column 2: source sentence. - # Column 3: Error detail for the translation. Could be empty. - # Column 4 (only present if a glossary is provided in the request): - # Error when applying the glossary. - # - # If the input file extension is txt or html, glossary_error_file will be - # generated that contains error details. glossary_error_file has format of - # `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]` - class OutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A document translation request input config. - # @!attribute [rw] content - # @return [::String] - # Document's content represented as a stream of bytes. - # - # Note: The following fields are mutually exclusive: `content`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::Translate::V3::GcsSource] - # Google Cloud Storage location. This must be a single file. - # For example: gs://example_bucket/example_file.pdf - # - # Note: The following fields are mutually exclusive: `gcs_source`, `content`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] mime_type - # @return [::String] - # Specifies the input document's mime_type. - # - # If not specified it will be determined using the file extension for - # gcs_source provided files. For a file provided through bytes content the - # mime_type must be provided. - # Currently supported mime types are: - # - application/pdf - # - application/vnd.openxmlformats-officedocument.wordprocessingml.document - # - application/vnd.openxmlformats-officedocument.presentationml.presentation - # - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - class DocumentInputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A document translation request output config. - # @!attribute [rw] gcs_destination - # @return [::Google::Cloud::Translate::V3::GcsDestination] - # Optional. Google Cloud Storage destination for the translation output, - # e.g., `gs://my_bucket/my_directory/`. - # - # The destination directory provided does not have to be empty, but the - # bucket must exist. If a file with the same name as the output file - # already exists in the destination an error will be returned. - # - # For a DocumentInputConfig.contents provided document, the output file - # will have the name "output_[trg]_translations.[ext]", where - # - [trg] corresponds to the translated file's language code, - # - [ext] corresponds to the translated file's extension according to its - # mime type. - # - # - # For a DocumentInputConfig.gcs_uri provided document, the output file will - # have a name according to its URI. For example: an input file with URI: - # `gs://a/b/c.[extension]` stored in a gcs_destination bucket with name - # "my_bucket" will have an output URI: - # `gs://my_bucket/a_b_c_[trg]_translations.[ext]`, where - # - [trg] corresponds to the translated file's language code, - # - [ext] corresponds to the translated file's extension according to its - # mime type. - # - # - # If the document was directly provided through the request, then the - # output document will have the format: - # `gs://my_bucket/translated_document_[trg]_translations.[ext]`, where - # - [trg] corresponds to the translated file's language code, - # - [ext] corresponds to the translated file's extension according to its - # mime type. - # - # If a glossary was provided, then the output URI for the glossary - # translation will be equal to the default output URI but have - # `glossary_translations` instead of `translations`. For the previous - # example, its glossary URI would be: - # `gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]`. - # - # Thus the max number of output files will be 2 (Translated document, - # Glossary translated document). - # - # Callers should expect no partial outputs. If there is any error during - # document translation, no output will be stored in the Cloud Storage - # bucket. - # @!attribute [rw] mime_type - # @return [::String] - # Optional. Specifies the translated document's mime_type. - # If not specified, the translated file's mime type will be the same as the - # input file's mime type. - # Currently only support the output mime type to be the same as input mime - # type. - # - application/pdf - # - application/vnd.openxmlformats-officedocument.wordprocessingml.document - # - application/vnd.openxmlformats-officedocument.presentationml.presentation - # - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - class DocumentOutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A document translation request. - # @!attribute [rw] parent - # @return [::String] - # Required. Location to make a regional call. - # - # Format: `projects/{project-number-or-id}/locations/{location-id}`. - # - # For global calls, use `projects/{project-number-or-id}/locations/global` or - # `projects/{project-number-or-id}`. - # - # Non-global location is required for requests using AutoML models or custom - # glossaries. - # - # Models and glossaries must be within the same region (have the same - # location-id), otherwise an INVALID_ARGUMENT (400) error is returned. - # @!attribute [rw] source_language_code - # @return [::String] - # Optional. The ISO-639 language code of the input document if known, for - # example, "en-US" or "sr-Latn". Supported language codes are listed in - # [Language Support](https://cloud.google.com/translate/docs/languages). If - # the source language isn't specified, the API attempts to identify the - # source language automatically and returns the source language within the - # response. Source language must be specified if the request contains a - # glossary or a custom model. - # @!attribute [rw] target_language_code - # @return [::String] - # Required. The ISO-639 language code to use for translation of the input - # document, set to one of the language codes listed in [Language - # Support](https://cloud.google.com/translate/docs/languages). - # @!attribute [rw] document_input_config - # @return [::Google::Cloud::Translate::V3::DocumentInputConfig] - # Required. Input configurations. - # @!attribute [rw] document_output_config - # @return [::Google::Cloud::Translate::V3::DocumentOutputConfig] - # Optional. Output configurations. - # Defines if the output file should be stored within Cloud Storage as well - # as the desired output format. If not provided the translated file will - # only be returned through a byte-stream and its output mime type will be - # the same as the input file's mime type. - # @!attribute [rw] model - # @return [::String] - # Optional. The `model` type requested for this translation. - # - # The format depends on model type: - # - # - AutoML Translation models: - # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - # - # - General (built-in) models: - # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - # - # - # If not provided, the default Google model (NMT) will be used for - # translation. - # @!attribute [rw] glossary_config - # @return [::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig] - # Optional. Glossary to be applied. The glossary must be within the same - # region (have the same location-id) as the model, otherwise an - # INVALID_ARGUMENT (400) error is returned. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The labels with user-defined metadata for the request. - # - # Label keys and values can be no longer than 63 characters (Unicode - # codepoints), can only contain lowercase letters, numeric characters, - # underscores and dashes. International characters are allowed. Label values - # are optional. Label keys must start with a letter. - # - # See https://cloud.google.com/translate/docs/advanced/labels for more - # information. - # @!attribute [rw] customized_attribution - # @return [::String] - # Optional. This flag is to support user customized attribution. - # If not provided, the default is `Machine Translated by Google`. - # Customized attribution should follow rules in - # https://cloud.google.com/translate/attribution#attribution_and_logos - # @!attribute [rw] is_translate_native_pdf_only - # @return [::Boolean] - # Optional. is_translate_native_pdf_only field for external customers. - # If true, the page limit of online native pdf translation is 300 and only - # native pdf pages will be translated. - # @!attribute [rw] enable_shadow_removal_native_pdf - # @return [::Boolean] - # Optional. If true, use the text removal server to remove the shadow text on - # background image for native pdf translation. - # Shadow removal feature can only be enabled when - # is_translate_native_pdf_only: false && pdf_native_only: false - # @!attribute [rw] enable_rotation_correction - # @return [::Boolean] - # Optional. If true, enable auto rotation correction in DVS. - class TranslateDocumentRequest - 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 translated document message. - # @!attribute [rw] byte_stream_outputs - # @return [::Array<::String>] - # The array of translated documents. It is expected to be size 1 for now. We - # may produce multiple translated documents in the future for other type of - # file formats. - # @!attribute [rw] mime_type - # @return [::String] - # The translated document's mime type. - # @!attribute [rw] detected_language_code - # @return [::String] - # The detected language for the input document. - # If the user did not provide the source language for the input document, - # this field will have the language code automatically detected. If the - # source language was passed, auto-detection of the language does not occur - # and this field is empty. - class DocumentTranslation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A translated document response message. - # @!attribute [rw] document_translation - # @return [::Google::Cloud::Translate::V3::DocumentTranslation] - # Translated document. - # @!attribute [rw] glossary_document_translation - # @return [::Google::Cloud::Translate::V3::DocumentTranslation] - # The document's translation output if a glossary is provided in the request. - # This can be the same as [TranslateDocumentResponse.document_translation] - # if no glossary terms apply. - # @!attribute [rw] model - # @return [::String] - # Only present when 'model' is present in the request. - # 'model' is normalized to have a project number. - # - # For example: - # If the 'model' field in TranslateDocumentRequest is: - # `projects/{project-id}/locations/{location-id}/models/general/nmt` then - # `model` here would be normalized to - # `projects/{project-number}/locations/{location-id}/models/general/nmt`. - # @!attribute [rw] glossary_config - # @return [::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig] - # The `glossary_config` used for this translation. - class TranslateDocumentResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The batch translation request. - # @!attribute [rw] parent - # @return [::String] - # Required. Location to make a call. Must refer to a caller's project. - # - # Format: `projects/{project-number-or-id}/locations/{location-id}`. - # - # The `global` location is not supported for batch translation. - # - # Only AutoML Translation models or glossaries within the same region (have - # the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) - # error is returned. - # @!attribute [rw] source_language_code - # @return [::String] - # Required. Source language code. Supported language codes are listed in - # [Language - # Support](https://cloud.google.com/translate/docs/languages). - # @!attribute [rw] target_language_codes - # @return [::Array<::String>] - # Required. Specify up to 10 language codes here. Supported language codes - # are listed in [Language - # Support](https://cloud.google.com/translate/docs/languages). - # @!attribute [rw] models - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The models to use for translation. Map's key is target language - # code. Map's value is model name. Value can be a built-in general model, - # or an AutoML Translation model. - # - # The value format depends on model type: - # - # - AutoML Translation models: - # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - # - # - General (built-in) models: - # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - # - # - # If the map is empty or a specific model is - # not requested for a language pair, then default google model (nmt) is used. - # @!attribute [rw] input_configs - # @return [::Array<::Google::Cloud::Translate::V3::InputConfig>] - # Required. Input configurations. - # The total number of files matched should be <= 100. - # The total content size should be <= 100M Unicode codepoints. - # The files must use UTF-8 encoding. - # @!attribute [rw] output_config - # @return [::Google::Cloud::Translate::V3::OutputConfig] - # Required. Output configuration. - # If 2 input configs match to the same file (that is, same input path), - # we don't generate output for duplicate inputs. - # @!attribute [rw] glossaries - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig}] - # Optional. Glossaries to be applied for translation. - # It's keyed by target language code. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The labels with user-defined metadata for the request. - # - # Label keys and values can be no longer than 63 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # Label values are optional. Label keys must start with a letter. - # - # See https://cloud.google.com/translate/docs/advanced/labels for more - # information. - class BatchTranslateTextRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ModelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig] - class GlossariesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # State metadata for the batch translation operation. - # @!attribute [rw] state - # @return [::Google::Cloud::Translate::V3::BatchTranslateMetadata::State] - # The state of the operation. - # @!attribute [rw] translated_characters - # @return [::Integer] - # Number of successfully translated characters so far (Unicode codepoints). - # @!attribute [rw] failed_characters - # @return [::Integer] - # Number of characters that have failed to process so far (Unicode - # codepoints). - # @!attribute [rw] total_characters - # @return [::Integer] - # Total number of characters (Unicode codepoints). - # This is the total number of codepoints from input files times the number of - # target languages and appears here shortly after the call is submitted. - # @!attribute [rw] submit_time - # @return [::Google::Protobuf::Timestamp] - # Time when the operation was submitted. - class BatchTranslateMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # State of the job. - module State - # Invalid. - STATE_UNSPECIFIED = 0 - - # Request is being processed. - RUNNING = 1 - - # The batch is processed, and at least one item was successfully - # processed. - SUCCEEDED = 2 - - # The batch is done and no item was successfully processed. - FAILED = 3 - - # Request is in the process of being canceled after caller invoked - # longrunning.Operations.CancelOperation on the request id. - CANCELLING = 4 - - # The batch is done after the user has called the - # longrunning.Operations.CancelOperation. Any records processed before the - # cancel command are output as specified in the request. - CANCELLED = 5 - end - end - - # Stored in the - # {::Google::Longrunning::Operation#response google.longrunning.Operation.response} - # field returned by BatchTranslateText if at least one sentence is translated - # successfully. - # @!attribute [rw] total_characters - # @return [::Integer] - # Total number of characters (Unicode codepoints). - # @!attribute [rw] translated_characters - # @return [::Integer] - # Number of successfully translated characters (Unicode codepoints). - # @!attribute [rw] failed_characters - # @return [::Integer] - # Number of characters that have failed to process (Unicode codepoints). - # @!attribute [rw] submit_time - # @return [::Google::Protobuf::Timestamp] - # Time when the operation was submitted. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time when the operation is finished and - # {::Google::Longrunning::Operation#done google.longrunning.Operation.done} is - # set to true. - class BatchTranslateResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Input configuration for glossaries. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::Translate::V3::GcsSource] - # Required. Google Cloud Storage location of glossary data. - # File format is determined based on the filename extension. API returns - # [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file - # formats. Wildcards are not allowed. This must be a single file in one of - # the following formats: - # - # For unidirectional glossaries: - # - # - TSV/CSV (`.tsv`/`.csv`): Two column file, tab- or comma-separated. - # The first column is source text. The second column is target text. - # No headers in this file. The first row contains data and not column - # names. - # - # - TMX (`.tmx`): TMX file with parallel data defining source/target term - # pairs. - # - # For equivalent term sets glossaries: - # - # - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms - # in multiple languages. See documentation for more information - - # [glossaries](https://cloud.google.com/translate/docs/advanced/glossary). - class GlossaryInputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a glossary built from user-provided data. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the glossary. Glossary names have the form - # `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. - # @!attribute [rw] language_pair - # @return [::Google::Cloud::Translate::V3::Glossary::LanguageCodePair] - # Used with unidirectional glossaries. - # - # Note: The following fields are mutually exclusive: `language_pair`, `language_codes_set`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] language_codes_set - # @return [::Google::Cloud::Translate::V3::Glossary::LanguageCodesSet] - # Used with equivalent term set glossaries. - # - # Note: The following fields are mutually exclusive: `language_codes_set`, `language_pair`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] input_config - # @return [::Google::Cloud::Translate::V3::GlossaryInputConfig] - # Required. Provides examples to build the glossary from. - # Total glossary must not exceed 10M Unicode codepoints. - # @!attribute [r] entry_count - # @return [::Integer] - # Output only. The number of entries defined in the glossary. - # @!attribute [r] submit_time - # @return [::Google::Protobuf::Timestamp] - # Output only. When CreateGlossary was called. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. When the glossary creation was finished. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The display name of the glossary. - class Glossary - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Used with unidirectional glossaries. - # @!attribute [rw] source_language_code - # @return [::String] - # Required. The ISO-639 language code of the input text, for example, - # "en-US". Expected to be an exact match for GlossaryTerm.language_code. - # @!attribute [rw] target_language_code - # @return [::String] - # Required. The ISO-639 language code for translation output, for example, - # "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. - class LanguageCodePair - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Used with equivalent term set glossaries. - # @!attribute [rw] language_codes - # @return [::Array<::String>] - # The ISO-639 language code(s) for terms defined in the glossary. - # All entries are unique. The list contains at least two entries. - # Expected to be an exact match for GlossaryTerm.language_code. - class LanguageCodesSet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request message for CreateGlossary. - # @!attribute [rw] parent - # @return [::String] - # Required. The project name. - # @!attribute [rw] glossary - # @return [::Google::Cloud::Translate::V3::Glossary] - # Required. The glossary to create. - class CreateGlossaryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the update glossary flow - # @!attribute [rw] glossary - # @return [::Google::Cloud::Translate::V3::Glossary] - # Required. The glossary entry to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. Currently only `display_name` and - # 'input_config' - class UpdateGlossaryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetGlossary. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the glossary to retrieve. - class GetGlossaryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteGlossary. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the glossary to delete. - class DeleteGlossaryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListGlossaries. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the project from which to list all of the glossaries. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. The server may return fewer glossaries than - # requested. If unspecified, the server picks an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # Typically, this is the value of [ListGlossariesResponse.next_page_token] - # returned from the previous call to `ListGlossaries` method. - # The first page is returned if `page_token`is empty or missing. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter specifying constraints of a list operation. - # Specify the constraint by the format of "key=value", where key must be - # "src" or "tgt", and the value must be a valid language code. - # For multiple restrictions, concatenate them by "AND" (uppercase only), - # such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used - # here, which means using 'en-US' and 'en' can lead to different results, - # which depends on the language code you used when you create the glossary. - # For the unidirectional glossaries, the "src" and "tgt" add restrictions - # on the source and target language code separately. - # For the equivalent term set glossaries, the "src" and/or "tgt" add - # restrictions on the term set. - # For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional - # glossaries which exactly match the source language code as "en-US" and the - # target language code "zh-CN", but all equivalent term set glossaries which - # contain "en-US" and "zh-CN" in their language set will be picked. - # If missing, no filtering is performed. - class ListGlossariesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListGlossaries. - # @!attribute [rw] glossaries - # @return [::Array<::Google::Cloud::Translate::V3::Glossary>] - # The list of glossaries for a project. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve a page of results. Pass this value in the - # [ListGlossariesRequest.page_token] field in the subsequent call to - # `ListGlossaries` method to retrieve the next page of results. - class ListGlossariesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the Get Glossary Entry Api - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the glossary entry to get - class GetGlossaryEntryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for Delete Glossary Entry - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the glossary entry to delete - class DeleteGlossaryEntryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListGlossaryEntries - # @!attribute [rw] parent - # @return [::String] - # Required. The parent glossary resource name for listing the glossary's - # entries. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. The server may return fewer glossary entries - # than requested. If unspecified, the server picks an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # Typically, this is the value of - # [ListGlossaryEntriesResponse.next_page_token] returned from the previous - # call. The first page is returned if `page_token`is empty or missing. - class ListGlossaryEntriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListGlossaryEntries - # @!attribute [rw] glossary_entries - # @return [::Array<::Google::Cloud::Translate::V3::GlossaryEntry>] - # Optional. The Glossary Entries - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token to retrieve a page of results. Pass this value in the - # [ListGLossaryEntriesRequest.page_token] field in the subsequent calls. - class ListGlossaryEntriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateGlossaryEntry - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the glossary to create the entry under. - # @!attribute [rw] glossary_entry - # @return [::Google::Cloud::Translate::V3::GlossaryEntry] - # Required. The glossary entry to create - class CreateGlossaryEntryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateGlossaryEntry - # @!attribute [rw] glossary_entry - # @return [::Google::Cloud::Translate::V3::GlossaryEntry] - # Required. The glossary entry to update. - class UpdateGlossaryEntryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Stored in the - # {::Google::Longrunning::Operation#metadata google.longrunning.Operation.metadata} - # field returned by CreateGlossary. - # @!attribute [rw] name - # @return [::String] - # The name of the glossary that is being created. - # @!attribute [rw] state - # @return [::Google::Cloud::Translate::V3::CreateGlossaryMetadata::State] - # The current state of the glossary creation operation. - # @!attribute [rw] submit_time - # @return [::Google::Protobuf::Timestamp] - # The time when the operation was submitted to the server. - class CreateGlossaryMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enumerates the possible states that the creation request can be in. - module State - # Invalid. - STATE_UNSPECIFIED = 0 - - # Request is being processed. - RUNNING = 1 - - # The glossary was successfully created. - SUCCEEDED = 2 - - # Failed to create the glossary. - FAILED = 3 - - # Request is in the process of being canceled after caller invoked - # longrunning.Operations.CancelOperation on the request id. - CANCELLING = 4 - - # The glossary creation request was successfully canceled. - CANCELLED = 5 - end - end - - # Stored in the - # {::Google::Longrunning::Operation#metadata google.longrunning.Operation.metadata} - # field returned by UpdateGlossary. - # @!attribute [rw] glossary - # @return [::Google::Cloud::Translate::V3::Glossary] - # The updated glossary object. - # @!attribute [rw] state - # @return [::Google::Cloud::Translate::V3::UpdateGlossaryMetadata::State] - # The current state of the glossary update operation. If the glossary input - # file was not updated this will be completed immediately - # @!attribute [rw] submit_time - # @return [::Google::Protobuf::Timestamp] - # The time when the operation was submitted to the server. - class UpdateGlossaryMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enumerates the possible states that the update request can be in. - module State - # Invalid. - STATE_UNSPECIFIED = 0 - - # Request is being processed. - RUNNING = 1 - - # The glossary was successfully updated. - SUCCEEDED = 2 - - # Failed to update the glossary. - FAILED = 3 - - # Request is in the process of being canceled after caller invoked - # longrunning.Operations.CancelOperation on the request id. - CANCELLING = 4 - - # The glossary update request was successfully canceled. - CANCELLED = 5 - end - end - - # Stored in the - # {::Google::Longrunning::Operation#metadata google.longrunning.Operation.metadata} - # field returned by DeleteGlossary. - # @!attribute [rw] name - # @return [::String] - # The name of the glossary that is being deleted. - # @!attribute [rw] state - # @return [::Google::Cloud::Translate::V3::DeleteGlossaryMetadata::State] - # The current state of the glossary deletion operation. - # @!attribute [rw] submit_time - # @return [::Google::Protobuf::Timestamp] - # The time when the operation was submitted to the server. - class DeleteGlossaryMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enumerates the possible states that the creation request can be in. - module State - # Invalid. - STATE_UNSPECIFIED = 0 - - # Request is being processed. - RUNNING = 1 - - # The glossary was successfully deleted. - SUCCEEDED = 2 - - # Failed to delete the glossary. - FAILED = 3 - - # Request is in the process of being canceled after caller invoked - # longrunning.Operations.CancelOperation on the request id. - CANCELLING = 4 - - # The glossary deletion request was successfully canceled. - CANCELLED = 5 - end - end - - # Stored in the - # {::Google::Longrunning::Operation#response google.longrunning.Operation.response} - # field returned by DeleteGlossary. - # @!attribute [rw] name - # @return [::String] - # The name of the deleted glossary. - # @!attribute [rw] submit_time - # @return [::Google::Protobuf::Timestamp] - # The time when the operation was submitted to the server. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time when the glossary deletion is finished and - # {::Google::Longrunning::Operation#done google.longrunning.Operation.done} is - # set to true. - class DeleteGlossaryResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The BatchTranslateDocument request. - # @!attribute [rw] parent - # @return [::String] - # Required. Location to make a regional call. - # - # Format: `projects/{project-number-or-id}/locations/{location-id}`. - # - # The `global` location is not supported for batch translation. - # - # Only AutoML Translation models or glossaries within the same region (have - # the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) - # error is returned. - # @!attribute [rw] source_language_code - # @return [::String] - # Required. The ISO-639 language code of the input document if known, for - # example, "en-US" or "sr-Latn". Supported language codes are listed in - # [Language Support](https://cloud.google.com/translate/docs/languages). - # @!attribute [rw] target_language_codes - # @return [::Array<::String>] - # Required. The ISO-639 language code to use for translation of the input - # document. Specify up to 10 language codes here. Supported language codes - # are listed in [Language - # Support](https://cloud.google.com/translate/docs/languages). - # @!attribute [rw] input_configs - # @return [::Array<::Google::Cloud::Translate::V3::BatchDocumentInputConfig>] - # Required. Input configurations. - # The total number of files matched should be <= 100. - # The total content size to translate should be <= 100M Unicode codepoints. - # The files must use UTF-8 encoding. - # @!attribute [rw] output_config - # @return [::Google::Cloud::Translate::V3::BatchDocumentOutputConfig] - # Required. Output configuration. - # If 2 input configs match to the same file (that is, same input path), - # we don't generate output for duplicate inputs. - # @!attribute [rw] models - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The models to use for translation. Map's key is target language - # code. Map's value is the model name. Value can be a built-in general model, - # or an AutoML Translation model. - # - # The value format depends on model type: - # - # - AutoML Translation models: - # `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - # - # - General (built-in) models: - # `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - # - # - # If the map is empty or a specific model is - # not requested for a language pair, then default google model (nmt) is used. - # @!attribute [rw] glossaries - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig}] - # Optional. Glossaries to be applied. It's keyed by target language code. - # @!attribute [rw] format_conversions - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The file format conversion map that is applied to all input - # files. The map key is the original mime_type. The map value is the target - # mime_type of translated documents. - # - # Supported file format conversion includes: - # - `application/pdf` to - # `application/vnd.openxmlformats-officedocument.wordprocessingml.document` - # - # If nothing specified, output files will be in the same format as the - # original file. - # @!attribute [rw] customized_attribution - # @return [::String] - # Optional. This flag is to support user customized attribution. - # If not provided, the default is `Machine Translated by Google`. - # Customized attribution should follow rules in - # https://cloud.google.com/translate/attribution#attribution_and_logos - # @!attribute [rw] enable_shadow_removal_native_pdf - # @return [::Boolean] - # Optional. If true, use the text removal server to remove the shadow text on - # background image for native pdf translation. - # Shadow removal feature can only be enabled when - # is_translate_native_pdf_only: false && pdf_native_only: false - # @!attribute [rw] enable_rotation_correction - # @return [::Boolean] - # Optional. If true, enable auto rotation correction in DVS. - class BatchTranslateDocumentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ModelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig] - class GlossariesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class FormatConversionsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Input configuration for BatchTranslateDocument request. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::Translate::V3::GcsSource] - # Google Cloud Storage location for the source input. - # This can be a single file (for example, - # `gs://translation-test/input.docx`) or a wildcard (for example, - # `gs://translation-test/*`). - # - # File mime type is determined based on extension. Supported mime type - # includes: - # - `pdf`, application/pdf - # - `docx`, - # application/vnd.openxmlformats-officedocument.wordprocessingml.document - # - `pptx`, - # application/vnd.openxmlformats-officedocument.presentationml.presentation - # - `xlsx`, - # application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - # - # The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB. - # The max file size to support for `.pdf` is 1GB and the max page limit is - # 1000 pages. - # The max file size to support for all input documents is 1GB. - class BatchDocumentInputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Output configuration for BatchTranslateDocument request. - # @!attribute [rw] gcs_destination - # @return [::Google::Cloud::Translate::V3::GcsDestination] - # Google Cloud Storage destination for output content. - # For every single input document (for example, gs://a/b/c.[extension]), we - # generate at most 2 * n output files. (n is the # of target_language_codes - # in the BatchTranslateDocumentRequest). - # - # While the input documents are being processed, we write/update an index - # file `index.csv` under `gcs_destination.output_uri_prefix` (for example, - # gs://translation_output/index.csv) The index file is generated/updated as - # new files are being translated. The format is: - # - # input_document,target_language_code,translation_output,error_output, - # glossary_translation_output,glossary_error_output - # - # `input_document` is one file we matched using gcs_source.input_uri. - # `target_language_code` is provided in the request. - # `translation_output` contains the translations. (details provided below) - # `error_output` contains the error message during processing of the file. - # Both translations_file and errors_file could be empty strings if we have - # no content to output. - # `glossary_translation_output` and `glossary_error_output` are the - # translated output/error when we apply glossaries. They could also be - # empty if we have no content to output. - # - # Once a row is present in index.csv, the input/output matching never - # changes. Callers should also expect all the content in input_file are - # processed and ready to be consumed (that is, no partial output file is - # written). - # - # Since index.csv will be keeping updated during the process, please make - # sure there is no custom retention policy applied on the output bucket - # that may avoid file updating. - # (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) - # - # The naming format of translation output files follows (for target - # language code [trg]): `translation_output`: - # `gs://translation_output/a_b_c_[trg]_translation.[extension]` - # `glossary_translation_output`: - # `gs://translation_test/a_b_c_[trg]_glossary_translation.[extension]`. The - # output document will maintain the same file format as the input document. - # - # The naming format of error output files follows (for target language code - # [trg]): `error_output`: `gs://translation_test/a_b_c_[trg]_errors.txt` - # `glossary_error_output`: - # `gs://translation_test/a_b_c_[trg]_glossary_translation.txt`. The error - # output is a txt file containing error details. - class BatchDocumentOutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Stored in the - # {::Google::Longrunning::Operation#response google.longrunning.Operation.response} - # field returned by BatchTranslateDocument if at least one document is - # translated successfully. - # @!attribute [rw] total_pages - # @return [::Integer] - # Total number of pages to translate in all documents. Documents without - # clear page definition (such as XLSX) are not counted. - # @!attribute [rw] translated_pages - # @return [::Integer] - # Number of successfully translated pages in all documents. Documents without - # clear page definition (such as XLSX) are not counted. - # @!attribute [rw] failed_pages - # @return [::Integer] - # Number of pages that failed to process in all documents. Documents without - # clear page definition (such as XLSX) are not counted. - # @!attribute [rw] total_billable_pages - # @return [::Integer] - # Number of billable pages in documents with clear page definition (such as - # PDF, DOCX, PPTX) - # @!attribute [rw] total_characters - # @return [::Integer] - # Total number of characters (Unicode codepoints) in all documents. - # @!attribute [rw] translated_characters - # @return [::Integer] - # Number of successfully translated characters (Unicode codepoints) in all - # documents. - # @!attribute [rw] failed_characters - # @return [::Integer] - # Number of characters that have failed to process (Unicode codepoints) in - # all documents. - # @!attribute [rw] total_billable_characters - # @return [::Integer] - # Number of billable characters (Unicode codepoints) in documents without - # clear page definition, such as XLSX. - # @!attribute [rw] submit_time - # @return [::Google::Protobuf::Timestamp] - # Time when the operation was submitted. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time when the operation is finished and - # {::Google::Longrunning::Operation#done google.longrunning.Operation.done} is - # set to true. - class BatchTranslateDocumentResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # State metadata for the batch translation operation. - # @!attribute [rw] state - # @return [::Google::Cloud::Translate::V3::BatchTranslateDocumentMetadata::State] - # The state of the operation. - # @!attribute [rw] total_pages - # @return [::Integer] - # Total number of pages to translate in all documents so far. Documents - # without clear page definition (such as XLSX) are not counted. - # @!attribute [rw] translated_pages - # @return [::Integer] - # Number of successfully translated pages in all documents so far. Documents - # without clear page definition (such as XLSX) are not counted. - # @!attribute [rw] failed_pages - # @return [::Integer] - # Number of pages that failed to process in all documents so far. Documents - # without clear page definition (such as XLSX) are not counted. - # @!attribute [rw] total_billable_pages - # @return [::Integer] - # Number of billable pages in documents with clear page definition (such as - # PDF, DOCX, PPTX) so far. - # @!attribute [rw] total_characters - # @return [::Integer] - # Total number of characters (Unicode codepoints) in all documents so far. - # @!attribute [rw] translated_characters - # @return [::Integer] - # Number of successfully translated characters (Unicode codepoints) in all - # documents so far. - # @!attribute [rw] failed_characters - # @return [::Integer] - # Number of characters that have failed to process (Unicode codepoints) in - # all documents so far. - # @!attribute [rw] total_billable_characters - # @return [::Integer] - # Number of billable characters (Unicode codepoints) in documents without - # clear page definition (such as XLSX) so far. - # @!attribute [rw] submit_time - # @return [::Google::Protobuf::Timestamp] - # Time when the operation was submitted. - class BatchTranslateDocumentMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # State of the job. - module State - # Invalid. - STATE_UNSPECIFIED = 0 - - # Request is being processed. - RUNNING = 1 - - # The batch is processed, and at least one item was successfully processed. - SUCCEEDED = 2 - - # The batch is done and no item was successfully processed. - FAILED = 3 - - # Request is in the process of being canceled after caller invoked - # longrunning.Operations.CancelOperation on the request id. - CANCELLING = 4 - - # The batch is done after the user has called the - # longrunning.Operations.CancelOperation. Any records processed before the - # cancel command are output as specified in the request. - CANCELLED = 5 - end - end - - # Configures which glossary is used for a specific target language and defines - # options for applying that glossary. - # @!attribute [rw] glossary - # @return [::String] - # Required. The `glossary` to be applied for this translation. - # - # The format depends on the glossary: - # - # - User-provided custom glossary: - # `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}` - # @!attribute [rw] ignore_case - # @return [::Boolean] - # Optional. Indicates match is case insensitive. The default value is `false` - # if missing. - # @!attribute [rw] contextual_translation_enabled - # @return [::Boolean] - # Optional. If set to true, the glossary will be used for contextual - # translation. - class TranslateTextGlossaryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/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-translate-v3/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/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-translate-v3/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/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-translate-v3/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/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-translate-v3/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/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-translate-v3/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/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-translate-v3/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-translate-v3/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/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-translate-v3/snippets/Gemfile b/owl-bot-staging/google-cloud-translate-v3/snippets/Gemfile deleted file mode 100644 index bdff294d3cff..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/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-translate-v3", path: "../" -else - gem "google-cloud-translate-v3" -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-translate-v3/snippets/snippet_metadata_google.cloud.translation.v3.json b/owl-bot-staging/google-cloud-translate-v3/snippets/snippet_metadata_google.cloud.translation.v3.json deleted file mode 100644 index c234e2a00fb6..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/snippet_metadata_google.cloud.translation.v3.json +++ /dev/null @@ -1,1535 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-translate-v3", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.translation.v3", - "version": "v3" - } - ] - }, - "snippets": [ - { - "region_tag": "translate_v3_generated_TranslationService_TranslateText_sync", - "title": "Snippet for the translate_text call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#translate_text.", - "file": "translation_service/translate_text.rb", - "language": "RUBY", - "client_method": { - "short_name": "translate_text", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#translate_text", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::TranslateTextRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Translate::V3::TranslateTextResponse", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "TranslateText", - "full_name": "google.cloud.translation.v3.TranslationService.TranslateText", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_RomanizeText_sync", - "title": "Snippet for the romanize_text call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#romanize_text.", - "file": "translation_service/romanize_text.rb", - "language": "RUBY", - "client_method": { - "short_name": "romanize_text", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#romanize_text", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::RomanizeTextRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Translate::V3::RomanizeTextResponse", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "RomanizeText", - "full_name": "google.cloud.translation.v3.TranslationService.RomanizeText", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_DetectLanguage_sync", - "title": "Snippet for the detect_language call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#detect_language.", - "file": "translation_service/detect_language.rb", - "language": "RUBY", - "client_method": { - "short_name": "detect_language", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#detect_language", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::DetectLanguageRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Translate::V3::DetectLanguageResponse", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "DetectLanguage", - "full_name": "google.cloud.translation.v3.TranslationService.DetectLanguage", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_GetSupportedLanguages_sync", - "title": "Snippet for the get_supported_languages call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#get_supported_languages.", - "file": "translation_service/get_supported_languages.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_supported_languages", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#get_supported_languages", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Translate::V3::SupportedLanguages", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "GetSupportedLanguages", - "full_name": "google.cloud.translation.v3.TranslationService.GetSupportedLanguages", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_TranslateDocument_sync", - "title": "Snippet for the translate_document call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#translate_document.", - "file": "translation_service/translate_document.rb", - "language": "RUBY", - "client_method": { - "short_name": "translate_document", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#translate_document", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::TranslateDocumentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Translate::V3::TranslateDocumentResponse", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "TranslateDocument", - "full_name": "google.cloud.translation.v3.TranslationService.TranslateDocument", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_BatchTranslateText_sync", - "title": "Snippet for the batch_translate_text call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#batch_translate_text.", - "file": "translation_service/batch_translate_text.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_translate_text", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#batch_translate_text", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::BatchTranslateTextRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "BatchTranslateText", - "full_name": "google.cloud.translation.v3.TranslationService.BatchTranslateText", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_BatchTranslateDocument_sync", - "title": "Snippet for the batch_translate_document call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#batch_translate_document.", - "file": "translation_service/batch_translate_document.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_translate_document", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#batch_translate_document", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "BatchTranslateDocument", - "full_name": "google.cloud.translation.v3.TranslationService.BatchTranslateDocument", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_CreateGlossary_sync", - "title": "Snippet for the create_glossary call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#create_glossary.", - "file": "translation_service/create_glossary.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_glossary", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#create_glossary", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::CreateGlossaryRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "CreateGlossary", - "full_name": "google.cloud.translation.v3.TranslationService.CreateGlossary", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_UpdateGlossary_sync", - "title": "Snippet for the update_glossary call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#update_glossary.", - "file": "translation_service/update_glossary.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_glossary", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#update_glossary", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::UpdateGlossaryRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "UpdateGlossary", - "full_name": "google.cloud.translation.v3.TranslationService.UpdateGlossary", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_ListGlossaries_sync", - "title": "Snippet for the list_glossaries call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#list_glossaries.", - "file": "translation_service/list_glossaries.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_glossaries", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#list_glossaries", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::ListGlossariesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Translate::V3::ListGlossariesResponse", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "ListGlossaries", - "full_name": "google.cloud.translation.v3.TranslationService.ListGlossaries", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_GetGlossary_sync", - "title": "Snippet for the get_glossary call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#get_glossary.", - "file": "translation_service/get_glossary.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_glossary", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#get_glossary", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::GetGlossaryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Translate::V3::Glossary", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "GetGlossary", - "full_name": "google.cloud.translation.v3.TranslationService.GetGlossary", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_DeleteGlossary_sync", - "title": "Snippet for the delete_glossary call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#delete_glossary.", - "file": "translation_service/delete_glossary.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_glossary", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#delete_glossary", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::DeleteGlossaryRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "DeleteGlossary", - "full_name": "google.cloud.translation.v3.TranslationService.DeleteGlossary", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_GetGlossaryEntry_sync", - "title": "Snippet for the get_glossary_entry call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#get_glossary_entry.", - "file": "translation_service/get_glossary_entry.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_glossary_entry", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#get_glossary_entry", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::GetGlossaryEntryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Translate::V3::GlossaryEntry", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "GetGlossaryEntry", - "full_name": "google.cloud.translation.v3.TranslationService.GetGlossaryEntry", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_ListGlossaryEntries_sync", - "title": "Snippet for the list_glossary_entries call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#list_glossary_entries.", - "file": "translation_service/list_glossary_entries.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_glossary_entries", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#list_glossary_entries", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Translate::V3::ListGlossaryEntriesResponse", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "ListGlossaryEntries", - "full_name": "google.cloud.translation.v3.TranslationService.ListGlossaryEntries", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_CreateGlossaryEntry_sync", - "title": "Snippet for the create_glossary_entry call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#create_glossary_entry.", - "file": "translation_service/create_glossary_entry.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_glossary_entry", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#create_glossary_entry", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Translate::V3::GlossaryEntry", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "CreateGlossaryEntry", - "full_name": "google.cloud.translation.v3.TranslationService.CreateGlossaryEntry", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_UpdateGlossaryEntry_sync", - "title": "Snippet for the update_glossary_entry call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#update_glossary_entry.", - "file": "translation_service/update_glossary_entry.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_glossary_entry", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#update_glossary_entry", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Translate::V3::GlossaryEntry", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "UpdateGlossaryEntry", - "full_name": "google.cloud.translation.v3.TranslationService.UpdateGlossaryEntry", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_DeleteGlossaryEntry_sync", - "title": "Snippet for the delete_glossary_entry call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#delete_glossary_entry.", - "file": "translation_service/delete_glossary_entry.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_glossary_entry", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#delete_glossary_entry", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "DeleteGlossaryEntry", - "full_name": "google.cloud.translation.v3.TranslationService.DeleteGlossaryEntry", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_CreateDataset_sync", - "title": "Snippet for the create_dataset call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#create_dataset.", - "file": "translation_service/create_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_dataset", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#create_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::CreateDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "CreateDataset", - "full_name": "google.cloud.translation.v3.TranslationService.CreateDataset", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_GetDataset_sync", - "title": "Snippet for the get_dataset call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#get_dataset.", - "file": "translation_service/get_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_dataset", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#get_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::GetDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Translate::V3::Dataset", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "GetDataset", - "full_name": "google.cloud.translation.v3.TranslationService.GetDataset", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_ListDatasets_sync", - "title": "Snippet for the list_datasets call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#list_datasets.", - "file": "translation_service/list_datasets.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_datasets", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#list_datasets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::ListDatasetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Translate::V3::ListDatasetsResponse", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "ListDatasets", - "full_name": "google.cloud.translation.v3.TranslationService.ListDatasets", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_DeleteDataset_sync", - "title": "Snippet for the delete_dataset call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#delete_dataset.", - "file": "translation_service/delete_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_dataset", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#delete_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::DeleteDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "DeleteDataset", - "full_name": "google.cloud.translation.v3.TranslationService.DeleteDataset", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_CreateAdaptiveMtDataset_sync", - "title": "Snippet for the create_adaptive_mt_dataset call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#create_adaptive_mt_dataset.", - "file": "translation_service/create_adaptive_mt_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_adaptive_mt_dataset", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#create_adaptive_mt_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Translate::V3::AdaptiveMtDataset", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "CreateAdaptiveMtDataset", - "full_name": "google.cloud.translation.v3.TranslationService.CreateAdaptiveMtDataset", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_DeleteAdaptiveMtDataset_sync", - "title": "Snippet for the delete_adaptive_mt_dataset call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#delete_adaptive_mt_dataset.", - "file": "translation_service/delete_adaptive_mt_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_adaptive_mt_dataset", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#delete_adaptive_mt_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "DeleteAdaptiveMtDataset", - "full_name": "google.cloud.translation.v3.TranslationService.DeleteAdaptiveMtDataset", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_GetAdaptiveMtDataset_sync", - "title": "Snippet for the get_adaptive_mt_dataset call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#get_adaptive_mt_dataset.", - "file": "translation_service/get_adaptive_mt_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_adaptive_mt_dataset", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#get_adaptive_mt_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Translate::V3::AdaptiveMtDataset", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "GetAdaptiveMtDataset", - "full_name": "google.cloud.translation.v3.TranslationService.GetAdaptiveMtDataset", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_ListAdaptiveMtDatasets_sync", - "title": "Snippet for the list_adaptive_mt_datasets call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#list_adaptive_mt_datasets.", - "file": "translation_service/list_adaptive_mt_datasets.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_adaptive_mt_datasets", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#list_adaptive_mt_datasets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsResponse", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "ListAdaptiveMtDatasets", - "full_name": "google.cloud.translation.v3.TranslationService.ListAdaptiveMtDatasets", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_AdaptiveMtTranslate_sync", - "title": "Snippet for the adaptive_mt_translate call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#adaptive_mt_translate.", - "file": "translation_service/adaptive_mt_translate.rb", - "language": "RUBY", - "client_method": { - "short_name": "adaptive_mt_translate", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#adaptive_mt_translate", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "AdaptiveMtTranslate", - "full_name": "google.cloud.translation.v3.TranslationService.AdaptiveMtTranslate", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_GetAdaptiveMtFile_sync", - "title": "Snippet for the get_adaptive_mt_file call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#get_adaptive_mt_file.", - "file": "translation_service/get_adaptive_mt_file.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_adaptive_mt_file", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#get_adaptive_mt_file", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Translate::V3::AdaptiveMtFile", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "GetAdaptiveMtFile", - "full_name": "google.cloud.translation.v3.TranslationService.GetAdaptiveMtFile", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_DeleteAdaptiveMtFile_sync", - "title": "Snippet for the delete_adaptive_mt_file call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#delete_adaptive_mt_file.", - "file": "translation_service/delete_adaptive_mt_file.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_adaptive_mt_file", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#delete_adaptive_mt_file", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "DeleteAdaptiveMtFile", - "full_name": "google.cloud.translation.v3.TranslationService.DeleteAdaptiveMtFile", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_ImportAdaptiveMtFile_sync", - "title": "Snippet for the import_adaptive_mt_file call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#import_adaptive_mt_file.", - "file": "translation_service/import_adaptive_mt_file.rb", - "language": "RUBY", - "client_method": { - "short_name": "import_adaptive_mt_file", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#import_adaptive_mt_file", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "ImportAdaptiveMtFile", - "full_name": "google.cloud.translation.v3.TranslationService.ImportAdaptiveMtFile", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_ListAdaptiveMtFiles_sync", - "title": "Snippet for the list_adaptive_mt_files call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#list_adaptive_mt_files.", - "file": "translation_service/list_adaptive_mt_files.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_adaptive_mt_files", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#list_adaptive_mt_files", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Translate::V3::ListAdaptiveMtFilesResponse", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "ListAdaptiveMtFiles", - "full_name": "google.cloud.translation.v3.TranslationService.ListAdaptiveMtFiles", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_ListAdaptiveMtSentences_sync", - "title": "Snippet for the list_adaptive_mt_sentences call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#list_adaptive_mt_sentences.", - "file": "translation_service/list_adaptive_mt_sentences.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_adaptive_mt_sentences", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#list_adaptive_mt_sentences", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesResponse", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "ListAdaptiveMtSentences", - "full_name": "google.cloud.translation.v3.TranslationService.ListAdaptiveMtSentences", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_ImportData_sync", - "title": "Snippet for the import_data call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#import_data.", - "file": "translation_service/import_data.rb", - "language": "RUBY", - "client_method": { - "short_name": "import_data", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#import_data", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::ImportDataRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "ImportData", - "full_name": "google.cloud.translation.v3.TranslationService.ImportData", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_ExportData_sync", - "title": "Snippet for the export_data call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#export_data.", - "file": "translation_service/export_data.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_data", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#export_data", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::ExportDataRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "ExportData", - "full_name": "google.cloud.translation.v3.TranslationService.ExportData", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_ListExamples_sync", - "title": "Snippet for the list_examples call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#list_examples.", - "file": "translation_service/list_examples.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_examples", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#list_examples", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::ListExamplesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Translate::V3::ListExamplesResponse", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "ListExamples", - "full_name": "google.cloud.translation.v3.TranslationService.ListExamples", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_CreateModel_sync", - "title": "Snippet for the create_model call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#create_model.", - "file": "translation_service/create_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_model", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#create_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::CreateModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "CreateModel", - "full_name": "google.cloud.translation.v3.TranslationService.CreateModel", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_ListModels_sync", - "title": "Snippet for the list_models call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#list_models.", - "file": "translation_service/list_models.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_models", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#list_models", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::ListModelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Translate::V3::ListModelsResponse", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "ListModels", - "full_name": "google.cloud.translation.v3.TranslationService.ListModels", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_GetModel_sync", - "title": "Snippet for the get_model call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#get_model.", - "file": "translation_service/get_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_model", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#get_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::GetModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Translate::V3::Model", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "GetModel", - "full_name": "google.cloud.translation.v3.TranslationService.GetModel", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "translate_v3_generated_TranslationService_DeleteModel_sync", - "title": "Snippet for the delete_model call in the TranslationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Translate::V3::TranslationService::Client#delete_model.", - "file": "translation_service/delete_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_model", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client#delete_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Translate::V3::DeleteModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "TranslationService::Client", - "full_name": "::Google::Cloud::Translate::V3::TranslationService::Client" - }, - "method": { - "short_name": "DeleteModel", - "full_name": "google.cloud.translation.v3.TranslationService.DeleteModel", - "service": { - "short_name": "TranslationService", - "full_name": "google.cloud.translation.v3.TranslationService" - } - } - }, - "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-translate-v3/snippets/translation_service/adaptive_mt_translate.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/adaptive_mt_translate.rb deleted file mode 100644 index aa4ad9228411..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/adaptive_mt_translate.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 translate_v3_generated_TranslationService_AdaptiveMtTranslate_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the adaptive_mt_translate call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#adaptive_mt_translate. -# -def adaptive_mt_translate - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest.new - - # Call the adaptive_mt_translate method. - result = client.adaptive_mt_translate request - - # The returned object is of type Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse. - p result -end -# [END translate_v3_generated_TranslationService_AdaptiveMtTranslate_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/batch_translate_document.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/batch_translate_document.rb deleted file mode 100644 index 25d0fe3a2789..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/batch_translate_document.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 translate_v3_generated_TranslationService_BatchTranslateDocument_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the batch_translate_document call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#batch_translate_document. -# -def batch_translate_document - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::BatchTranslateDocumentRequest.new - - # Call the batch_translate_document method. - result = client.batch_translate_document request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END translate_v3_generated_TranslationService_BatchTranslateDocument_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/batch_translate_text.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/batch_translate_text.rb deleted file mode 100644 index 1ed61588014c..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/batch_translate_text.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 translate_v3_generated_TranslationService_BatchTranslateText_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the batch_translate_text call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#batch_translate_text. -# -def batch_translate_text - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::BatchTranslateTextRequest.new - - # Call the batch_translate_text method. - result = client.batch_translate_text request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END translate_v3_generated_TranslationService_BatchTranslateText_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_adaptive_mt_dataset.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_adaptive_mt_dataset.rb deleted file mode 100644 index a7e3243384ec..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_adaptive_mt_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 translate_v3_generated_TranslationService_CreateAdaptiveMtDataset_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the create_adaptive_mt_dataset call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#create_adaptive_mt_dataset. -# -def create_adaptive_mt_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest.new - - # Call the create_adaptive_mt_dataset method. - result = client.create_adaptive_mt_dataset request - - # The returned object is of type Google::Cloud::Translate::V3::AdaptiveMtDataset. - p result -end -# [END translate_v3_generated_TranslationService_CreateAdaptiveMtDataset_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_dataset.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_dataset.rb deleted file mode 100644 index 0ae3a139cb62..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/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 translate_v3_generated_TranslationService_CreateDataset_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the create_dataset call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#create_dataset. -# -def create_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::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 translate_v3_generated_TranslationService_CreateDataset_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_glossary.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_glossary.rb deleted file mode 100644 index 3ecab7c93861..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_glossary.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START translate_v3_generated_TranslationService_CreateGlossary_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the create_glossary call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#create_glossary. -# -def create_glossary - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::CreateGlossaryRequest.new - - # Call the create_glossary method. - result = client.create_glossary request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END translate_v3_generated_TranslationService_CreateGlossary_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_glossary_entry.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_glossary_entry.rb deleted file mode 100644 index 9f644113a2e5..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_glossary_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 translate_v3_generated_TranslationService_CreateGlossaryEntry_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the create_glossary_entry call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#create_glossary_entry. -# -def create_glossary_entry - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::CreateGlossaryEntryRequest.new - - # Call the create_glossary_entry method. - result = client.create_glossary_entry request - - # The returned object is of type Google::Cloud::Translate::V3::GlossaryEntry. - p result -end -# [END translate_v3_generated_TranslationService_CreateGlossaryEntry_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_model.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/create_model.rb deleted file mode 100644 index f13607493059..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/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 translate_v3_generated_TranslationService_CreateModel_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the create_model call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#create_model. -# -def create_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::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 translate_v3_generated_TranslationService_CreateModel_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_adaptive_mt_dataset.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_adaptive_mt_dataset.rb deleted file mode 100644 index f9f940bb5044..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_adaptive_mt_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 translate_v3_generated_TranslationService_DeleteAdaptiveMtDataset_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the delete_adaptive_mt_dataset call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#delete_adaptive_mt_dataset. -# -def delete_adaptive_mt_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest.new - - # Call the delete_adaptive_mt_dataset method. - result = client.delete_adaptive_mt_dataset request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END translate_v3_generated_TranslationService_DeleteAdaptiveMtDataset_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_adaptive_mt_file.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_adaptive_mt_file.rb deleted file mode 100644 index 469a91f67799..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_adaptive_mt_file.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 translate_v3_generated_TranslationService_DeleteAdaptiveMtFile_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the delete_adaptive_mt_file call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#delete_adaptive_mt_file. -# -def delete_adaptive_mt_file - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest.new - - # Call the delete_adaptive_mt_file method. - result = client.delete_adaptive_mt_file request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END translate_v3_generated_TranslationService_DeleteAdaptiveMtFile_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_dataset.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_dataset.rb deleted file mode 100644 index 36188a743141..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/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 translate_v3_generated_TranslationService_DeleteDataset_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the delete_dataset call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#delete_dataset. -# -def delete_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::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 translate_v3_generated_TranslationService_DeleteDataset_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_glossary.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_glossary.rb deleted file mode 100644 index 0d5258e5b7f2..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_glossary.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START translate_v3_generated_TranslationService_DeleteGlossary_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the delete_glossary call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#delete_glossary. -# -def delete_glossary - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::DeleteGlossaryRequest.new - - # Call the delete_glossary method. - result = client.delete_glossary request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END translate_v3_generated_TranslationService_DeleteGlossary_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_glossary_entry.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_glossary_entry.rb deleted file mode 100644 index f9a3a195e7df..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_glossary_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 translate_v3_generated_TranslationService_DeleteGlossaryEntry_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the delete_glossary_entry call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#delete_glossary_entry. -# -def delete_glossary_entry - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest.new - - # Call the delete_glossary_entry method. - result = client.delete_glossary_entry request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END translate_v3_generated_TranslationService_DeleteGlossaryEntry_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_model.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/delete_model.rb deleted file mode 100644 index f97403f97994..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/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 translate_v3_generated_TranslationService_DeleteModel_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the delete_model call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#delete_model. -# -def delete_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::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 translate_v3_generated_TranslationService_DeleteModel_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/detect_language.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/detect_language.rb deleted file mode 100644 index 55ecd2e01e60..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/detect_language.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 translate_v3_generated_TranslationService_DetectLanguage_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the detect_language call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#detect_language. -# -def detect_language - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::DetectLanguageRequest.new - - # Call the detect_language method. - result = client.detect_language request - - # The returned object is of type Google::Cloud::Translate::V3::DetectLanguageResponse. - p result -end -# [END translate_v3_generated_TranslationService_DetectLanguage_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/export_data.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/export_data.rb deleted file mode 100644 index 67e09245adad..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/export_data.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 translate_v3_generated_TranslationService_ExportData_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the export_data call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#export_data. -# -def export_data - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::ExportDataRequest.new - - # Call the export_data method. - result = client.export_data request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END translate_v3_generated_TranslationService_ExportData_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_adaptive_mt_dataset.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_adaptive_mt_dataset.rb deleted file mode 100644 index ba4e677c2358..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_adaptive_mt_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 translate_v3_generated_TranslationService_GetAdaptiveMtDataset_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the get_adaptive_mt_dataset call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#get_adaptive_mt_dataset. -# -def get_adaptive_mt_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest.new - - # Call the get_adaptive_mt_dataset method. - result = client.get_adaptive_mt_dataset request - - # The returned object is of type Google::Cloud::Translate::V3::AdaptiveMtDataset. - p result -end -# [END translate_v3_generated_TranslationService_GetAdaptiveMtDataset_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_adaptive_mt_file.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_adaptive_mt_file.rb deleted file mode 100644 index 0e7ebc6cc6ec..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_adaptive_mt_file.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 translate_v3_generated_TranslationService_GetAdaptiveMtFile_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the get_adaptive_mt_file call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#get_adaptive_mt_file. -# -def get_adaptive_mt_file - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest.new - - # Call the get_adaptive_mt_file method. - result = client.get_adaptive_mt_file request - - # The returned object is of type Google::Cloud::Translate::V3::AdaptiveMtFile. - p result -end -# [END translate_v3_generated_TranslationService_GetAdaptiveMtFile_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_dataset.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_dataset.rb deleted file mode 100644 index 3c560b5a9f1f..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/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 translate_v3_generated_TranslationService_GetDataset_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the get_dataset call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#get_dataset. -# -def get_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::GetDatasetRequest.new - - # Call the get_dataset method. - result = client.get_dataset request - - # The returned object is of type Google::Cloud::Translate::V3::Dataset. - p result -end -# [END translate_v3_generated_TranslationService_GetDataset_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_glossary.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_glossary.rb deleted file mode 100644 index b4d2ade127f7..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_glossary.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START translate_v3_generated_TranslationService_GetGlossary_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the get_glossary call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#get_glossary. -# -def get_glossary - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::GetGlossaryRequest.new - - # Call the get_glossary method. - result = client.get_glossary request - - # The returned object is of type Google::Cloud::Translate::V3::Glossary. - p result -end -# [END translate_v3_generated_TranslationService_GetGlossary_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_glossary_entry.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_glossary_entry.rb deleted file mode 100644 index 422026b30132..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_glossary_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 translate_v3_generated_TranslationService_GetGlossaryEntry_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the get_glossary_entry call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#get_glossary_entry. -# -def get_glossary_entry - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::GetGlossaryEntryRequest.new - - # Call the get_glossary_entry method. - result = client.get_glossary_entry request - - # The returned object is of type Google::Cloud::Translate::V3::GlossaryEntry. - p result -end -# [END translate_v3_generated_TranslationService_GetGlossaryEntry_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_model.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_model.rb deleted file mode 100644 index c7ddbabd9b88..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/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 translate_v3_generated_TranslationService_GetModel_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the get_model call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#get_model. -# -def get_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::GetModelRequest.new - - # Call the get_model method. - result = client.get_model request - - # The returned object is of type Google::Cloud::Translate::V3::Model. - p result -end -# [END translate_v3_generated_TranslationService_GetModel_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_supported_languages.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_supported_languages.rb deleted file mode 100644 index 3ee79de1a1de..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/get_supported_languages.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 translate_v3_generated_TranslationService_GetSupportedLanguages_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the get_supported_languages call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#get_supported_languages. -# -def get_supported_languages - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::GetSupportedLanguagesRequest.new - - # Call the get_supported_languages method. - result = client.get_supported_languages request - - # The returned object is of type Google::Cloud::Translate::V3::SupportedLanguages. - p result -end -# [END translate_v3_generated_TranslationService_GetSupportedLanguages_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/import_adaptive_mt_file.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/import_adaptive_mt_file.rb deleted file mode 100644 index e44c710d2853..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/import_adaptive_mt_file.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 translate_v3_generated_TranslationService_ImportAdaptiveMtFile_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the import_adaptive_mt_file call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#import_adaptive_mt_file. -# -def import_adaptive_mt_file - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest.new - - # Call the import_adaptive_mt_file method. - result = client.import_adaptive_mt_file request - - # The returned object is of type Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse. - p result -end -# [END translate_v3_generated_TranslationService_ImportAdaptiveMtFile_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/import_data.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/import_data.rb deleted file mode 100644 index 5b13e7a3f486..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/import_data.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 translate_v3_generated_TranslationService_ImportData_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the import_data call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#import_data. -# -def import_data - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::ImportDataRequest.new - - # Call the import_data method. - result = client.import_data request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END translate_v3_generated_TranslationService_ImportData_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_adaptive_mt_datasets.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_adaptive_mt_datasets.rb deleted file mode 100644 index 177ce32c2628..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_adaptive_mt_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 translate_v3_generated_TranslationService_ListAdaptiveMtDatasets_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the list_adaptive_mt_datasets call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#list_adaptive_mt_datasets. -# -def list_adaptive_mt_datasets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest.new - - # Call the list_adaptive_mt_datasets method. - result = client.list_adaptive_mt_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::Translate::V3::AdaptiveMtDataset. - p item - end -end -# [END translate_v3_generated_TranslationService_ListAdaptiveMtDatasets_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_adaptive_mt_files.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_adaptive_mt_files.rb deleted file mode 100644 index 29e1435d5606..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_adaptive_mt_files.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 translate_v3_generated_TranslationService_ListAdaptiveMtFiles_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the list_adaptive_mt_files call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#list_adaptive_mt_files. -# -def list_adaptive_mt_files - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest.new - - # Call the list_adaptive_mt_files method. - result = client.list_adaptive_mt_files request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Translate::V3::AdaptiveMtFile. - p item - end -end -# [END translate_v3_generated_TranslationService_ListAdaptiveMtFiles_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_adaptive_mt_sentences.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_adaptive_mt_sentences.rb deleted file mode 100644 index eac68d950a17..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_adaptive_mt_sentences.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 translate_v3_generated_TranslationService_ListAdaptiveMtSentences_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the list_adaptive_mt_sentences call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#list_adaptive_mt_sentences. -# -def list_adaptive_mt_sentences - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest.new - - # Call the list_adaptive_mt_sentences method. - result = client.list_adaptive_mt_sentences request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Translate::V3::AdaptiveMtSentence. - p item - end -end -# [END translate_v3_generated_TranslationService_ListAdaptiveMtSentences_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_datasets.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_datasets.rb deleted file mode 100644 index 5e51cd9506fe..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/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 translate_v3_generated_TranslationService_ListDatasets_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the list_datasets call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#list_datasets. -# -def list_datasets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::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::Translate::V3::Dataset. - p item - end -end -# [END translate_v3_generated_TranslationService_ListDatasets_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_examples.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_examples.rb deleted file mode 100644 index 43332205b3b9..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_examples.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 translate_v3_generated_TranslationService_ListExamples_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the list_examples call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#list_examples. -# -def list_examples - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::ListExamplesRequest.new - - # Call the list_examples method. - result = client.list_examples request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Translate::V3::Example. - p item - end -end -# [END translate_v3_generated_TranslationService_ListExamples_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_glossaries.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_glossaries.rb deleted file mode 100644 index 74b3307718fb..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_glossaries.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START translate_v3_generated_TranslationService_ListGlossaries_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the list_glossaries call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#list_glossaries. -# -def list_glossaries - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::ListGlossariesRequest.new - - # Call the list_glossaries method. - result = client.list_glossaries request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Translate::V3::Glossary. - p item - end -end -# [END translate_v3_generated_TranslationService_ListGlossaries_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_glossary_entries.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_glossary_entries.rb deleted file mode 100644 index f79260b875bb..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_glossary_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 translate_v3_generated_TranslationService_ListGlossaryEntries_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the list_glossary_entries call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#list_glossary_entries. -# -def list_glossary_entries - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::ListGlossaryEntriesRequest.new - - # Call the list_glossary_entries method. - result = client.list_glossary_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::Translate::V3::GlossaryEntry. - p item - end -end -# [END translate_v3_generated_TranslationService_ListGlossaryEntries_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_models.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/list_models.rb deleted file mode 100644 index 50a7a989b9ac..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/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 translate_v3_generated_TranslationService_ListModels_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the list_models call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#list_models. -# -def list_models - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::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::Translate::V3::Model. - p item - end -end -# [END translate_v3_generated_TranslationService_ListModels_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/romanize_text.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/romanize_text.rb deleted file mode 100644 index 83a2d907ca73..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/romanize_text.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 translate_v3_generated_TranslationService_RomanizeText_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the romanize_text call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#romanize_text. -# -def romanize_text - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::RomanizeTextRequest.new - - # Call the romanize_text method. - result = client.romanize_text request - - # The returned object is of type Google::Cloud::Translate::V3::RomanizeTextResponse. - p result -end -# [END translate_v3_generated_TranslationService_RomanizeText_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/translate_document.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/translate_document.rb deleted file mode 100644 index bb4283c41aa1..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/translate_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 translate_v3_generated_TranslationService_TranslateDocument_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the translate_document call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#translate_document. -# -def translate_document - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::TranslateDocumentRequest.new - - # Call the translate_document method. - result = client.translate_document request - - # The returned object is of type Google::Cloud::Translate::V3::TranslateDocumentResponse. - p result -end -# [END translate_v3_generated_TranslationService_TranslateDocument_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/translate_text.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/translate_text.rb deleted file mode 100644 index 78c5e7b91c60..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/translate_text.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 translate_v3_generated_TranslationService_TranslateText_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the translate_text call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#translate_text. -# -def translate_text - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::TranslateTextRequest.new - - # Call the translate_text method. - result = client.translate_text request - - # The returned object is of type Google::Cloud::Translate::V3::TranslateTextResponse. - p result -end -# [END translate_v3_generated_TranslationService_TranslateText_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/update_glossary.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/update_glossary.rb deleted file mode 100644 index fd1baaf19c5a..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/update_glossary.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START translate_v3_generated_TranslationService_UpdateGlossary_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the update_glossary call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#update_glossary. -# -def update_glossary - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::UpdateGlossaryRequest.new - - # Call the update_glossary method. - result = client.update_glossary request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END translate_v3_generated_TranslationService_UpdateGlossary_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/update_glossary_entry.rb b/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/update_glossary_entry.rb deleted file mode 100644 index 8ba803b74149..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/snippets/translation_service/update_glossary_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 translate_v3_generated_TranslationService_UpdateGlossaryEntry_sync] -require "google/cloud/translate/v3" - -## -# Snippet for the update_glossary_entry call in the TranslationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Translate::V3::TranslationService::Client#update_glossary_entry. -# -def update_glossary_entry - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Translate::V3::TranslationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest.new - - # Call the update_glossary_entry method. - result = client.update_glossary_entry request - - # The returned object is of type Google::Cloud::Translate::V3::GlossaryEntry. - p result -end -# [END translate_v3_generated_TranslationService_UpdateGlossaryEntry_sync] diff --git a/owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_operations_test.rb b/owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_operations_test.rb deleted file mode 100644 index 6095a4a5cd3c..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_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/translate/v3/translation_service_pb" -require "google/cloud/translate/v3/translation_service_services_pb" -require "google/cloud/translate/v3/translation_service" - -class ::Google::Cloud::Translate::V3::TranslationService::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::Translate::V3::TranslationService::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::Translate::V3::TranslationService::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::Translate::V3::TranslationService::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::Translate::V3::TranslationService::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::Translate::V3::TranslationService::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::Translate::V3::TranslationService::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::Translate::V3::TranslationService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_paths_test.rb b/owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_paths_test.rb deleted file mode 100644 index 9f8a19eacf25..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_paths_test.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/translate/v3/translation_service" - -class ::Google::Cloud::Translate::V3::TranslationService::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_adaptive_mt_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::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.adaptive_mt_dataset_path project: "value0", location: "value1", dataset: "value2" - assert_equal "projects/value0/locations/value1/adaptiveMtDatasets/value2", path - end - end - - def test_adaptive_mt_file_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.adaptive_mt_file_path project: "value0", location: "value1", dataset: "value2", file: "value3" - assert_equal "projects/value0/locations/value1/adaptiveMtDatasets/value2/adaptiveMtFiles/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::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dataset_path project: "value0", location: "value1", dataset: "value2" - assert_equal "projects/value0/locations/value1/datasets/value2", path - end - end - - def test_glossary_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.glossary_path project: "value0", location: "value1", glossary: "value2" - assert_equal "projects/value0/locations/value1/glossaries/value2", path - end - end - - def test_glossary_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::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.glossary_entry_path project: "value0", location: "value1", glossary: "value2", glossary_entry: "value3" - assert_equal "projects/value0/locations/value1/glossaries/value2/glossaryEntries/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::Translate::V3::TranslationService::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::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.model_path project: "value0", location: "value1", model: "value2" - assert_equal "projects/value0/locations/value1/models/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_rest_test.rb b/owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_rest_test.rb deleted file mode 100644 index 151151e4accd..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_rest_test.rb +++ /dev/null @@ -1,2228 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/translate/v3/translation_service_pb" -require "google/cloud/translate/v3/translation_service/rest" - - -class ::Google::Cloud::Translate::V3::TranslationService::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_translate_text - # Create test objects. - client_result = ::Google::Cloud::Translate::V3::TranslateTextResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - contents = ["hello world"] - mime_type = "hello world" - source_language_code = "hello world" - target_language_code = "hello world" - parent = "hello world" - model = "hello world" - glossary_config = {} - transliteration_config = {} - labels = {} - - translate_text_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_translate_text_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, translate_text_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.translate_text({ contents: contents, mime_type: mime_type, source_language_code: source_language_code, target_language_code: target_language_code, parent: parent, model: model, glossary_config: glossary_config, transliteration_config: transliteration_config, labels: labels }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.translate_text contents: contents, mime_type: mime_type, source_language_code: source_language_code, target_language_code: target_language_code, parent: parent, model: model, glossary_config: glossary_config, transliteration_config: transliteration_config, labels: labels do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.translate_text ::Google::Cloud::Translate::V3::TranslateTextRequest.new(contents: contents, mime_type: mime_type, source_language_code: source_language_code, target_language_code: target_language_code, parent: parent, model: model, glossary_config: glossary_config, transliteration_config: transliteration_config, labels: labels) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.translate_text({ contents: contents, mime_type: mime_type, source_language_code: source_language_code, target_language_code: target_language_code, parent: parent, model: model, glossary_config: glossary_config, transliteration_config: transliteration_config, labels: labels }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.translate_text(::Google::Cloud::Translate::V3::TranslateTextRequest.new(contents: contents, mime_type: mime_type, source_language_code: source_language_code, target_language_code: target_language_code, parent: parent, model: model, glossary_config: glossary_config, transliteration_config: transliteration_config, labels: labels), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, translate_text_client_stub.call_count - end - end - end - - def test_romanize_text - # Create test objects. - client_result = ::Google::Cloud::Translate::V3::RomanizeTextResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - contents = ["hello world"] - source_language_code = "hello world" - - romanize_text_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_romanize_text_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, romanize_text_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.romanize_text({ parent: parent, contents: contents, source_language_code: source_language_code }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.romanize_text parent: parent, contents: contents, source_language_code: source_language_code do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.romanize_text ::Google::Cloud::Translate::V3::RomanizeTextRequest.new(parent: parent, contents: contents, source_language_code: source_language_code) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.romanize_text({ parent: parent, contents: contents, source_language_code: source_language_code }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.romanize_text(::Google::Cloud::Translate::V3::RomanizeTextRequest.new(parent: parent, contents: contents, source_language_code: source_language_code), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, romanize_text_client_stub.call_count - end - end - end - - def test_detect_language - # Create test objects. - client_result = ::Google::Cloud::Translate::V3::DetectLanguageResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - model = "hello world" - content = "hello world" - mime_type = "hello world" - labels = {} - - detect_language_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_detect_language_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, detect_language_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.detect_language({ parent: parent, model: model, content: content, mime_type: mime_type, labels: labels }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.detect_language parent: parent, model: model, content: content, mime_type: mime_type, labels: labels do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.detect_language ::Google::Cloud::Translate::V3::DetectLanguageRequest.new(parent: parent, model: model, content: content, mime_type: mime_type, labels: labels) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.detect_language({ parent: parent, model: model, content: content, mime_type: mime_type, labels: labels }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.detect_language(::Google::Cloud::Translate::V3::DetectLanguageRequest.new(parent: parent, model: model, content: content, mime_type: mime_type, labels: labels), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, detect_language_client_stub.call_count - end - end - end - - def test_get_supported_languages - # Create test objects. - client_result = ::Google::Cloud::Translate::V3::SupportedLanguages.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - display_language_code = "hello world" - model = "hello world" - - get_supported_languages_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_get_supported_languages_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_supported_languages_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_supported_languages({ parent: parent, display_language_code: display_language_code, model: model }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_supported_languages parent: parent, display_language_code: display_language_code, model: model do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_supported_languages ::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest.new(parent: parent, display_language_code: display_language_code, model: model) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_supported_languages({ parent: parent, display_language_code: display_language_code, model: model }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_supported_languages(::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest.new(parent: parent, display_language_code: display_language_code, model: model), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_supported_languages_client_stub.call_count - end - end - end - - def test_translate_document - # Create test objects. - client_result = ::Google::Cloud::Translate::V3::TranslateDocumentResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - source_language_code = "hello world" - target_language_code = "hello world" - document_input_config = {} - document_output_config = {} - model = "hello world" - glossary_config = {} - labels = {} - customized_attribution = "hello world" - is_translate_native_pdf_only = true - enable_shadow_removal_native_pdf = true - enable_rotation_correction = true - - translate_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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_translate_document_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, translate_document_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.translate_document({ parent: parent, source_language_code: source_language_code, target_language_code: target_language_code, document_input_config: document_input_config, document_output_config: document_output_config, model: model, glossary_config: glossary_config, labels: labels, customized_attribution: customized_attribution, is_translate_native_pdf_only: is_translate_native_pdf_only, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.translate_document parent: parent, source_language_code: source_language_code, target_language_code: target_language_code, document_input_config: document_input_config, document_output_config: document_output_config, model: model, glossary_config: glossary_config, labels: labels, customized_attribution: customized_attribution, is_translate_native_pdf_only: is_translate_native_pdf_only, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.translate_document ::Google::Cloud::Translate::V3::TranslateDocumentRequest.new(parent: parent, source_language_code: source_language_code, target_language_code: target_language_code, document_input_config: document_input_config, document_output_config: document_output_config, model: model, glossary_config: glossary_config, labels: labels, customized_attribution: customized_attribution, is_translate_native_pdf_only: is_translate_native_pdf_only, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.translate_document({ parent: parent, source_language_code: source_language_code, target_language_code: target_language_code, document_input_config: document_input_config, document_output_config: document_output_config, model: model, glossary_config: glossary_config, labels: labels, customized_attribution: customized_attribution, is_translate_native_pdf_only: is_translate_native_pdf_only, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.translate_document(::Google::Cloud::Translate::V3::TranslateDocumentRequest.new(parent: parent, source_language_code: source_language_code, target_language_code: target_language_code, document_input_config: document_input_config, document_output_config: document_output_config, model: model, glossary_config: glossary_config, labels: labels, customized_attribution: customized_attribution, is_translate_native_pdf_only: is_translate_native_pdf_only, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, translate_document_client_stub.call_count - end - end - end - - def test_batch_translate_text - # Create test objects. - 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" - source_language_code = "hello world" - target_language_codes = ["hello world"] - models = {} - input_configs = [{}] - output_config = {} - glossaries = {} - labels = {} - - batch_translate_text_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_batch_translate_text_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_translate_text_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.batch_translate_text({ parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, models: models, input_configs: input_configs, output_config: output_config, glossaries: glossaries, labels: labels }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.batch_translate_text parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, models: models, input_configs: input_configs, output_config: output_config, glossaries: glossaries, labels: labels do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.batch_translate_text ::Google::Cloud::Translate::V3::BatchTranslateTextRequest.new(parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, models: models, input_configs: input_configs, output_config: output_config, glossaries: glossaries, labels: labels) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.batch_translate_text({ parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, models: models, input_configs: input_configs, output_config: output_config, glossaries: glossaries, labels: labels }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.batch_translate_text(::Google::Cloud::Translate::V3::BatchTranslateTextRequest.new(parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, models: models, input_configs: input_configs, output_config: output_config, glossaries: glossaries, labels: labels), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_translate_text_client_stub.call_count - end - end - end - - def test_batch_translate_document - # Create test objects. - 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" - source_language_code = "hello world" - target_language_codes = ["hello world"] - input_configs = [{}] - output_config = {} - models = {} - glossaries = {} - format_conversions = {} - customized_attribution = "hello world" - enable_shadow_removal_native_pdf = true - enable_rotation_correction = true - - batch_translate_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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_batch_translate_document_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_translate_document_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.batch_translate_document({ parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, input_configs: input_configs, output_config: output_config, models: models, glossaries: glossaries, format_conversions: format_conversions, customized_attribution: customized_attribution, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.batch_translate_document parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, input_configs: input_configs, output_config: output_config, models: models, glossaries: glossaries, format_conversions: format_conversions, customized_attribution: customized_attribution, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.batch_translate_document ::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest.new(parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, input_configs: input_configs, output_config: output_config, models: models, glossaries: glossaries, format_conversions: format_conversions, customized_attribution: customized_attribution, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.batch_translate_document({ parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, input_configs: input_configs, output_config: output_config, models: models, glossaries: glossaries, format_conversions: format_conversions, customized_attribution: customized_attribution, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.batch_translate_document(::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest.new(parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, input_configs: input_configs, output_config: output_config, models: models, glossaries: glossaries, format_conversions: format_conversions, customized_attribution: customized_attribution, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_translate_document_client_stub.call_count - end - end - end - - def test_create_glossary - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - glossary = {} - - create_glossary_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_create_glossary_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_glossary_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_glossary({ parent: parent, glossary: glossary }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_glossary parent: parent, glossary: glossary do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_glossary ::Google::Cloud::Translate::V3::CreateGlossaryRequest.new(parent: parent, glossary: glossary) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_glossary({ parent: parent, glossary: glossary }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_glossary(::Google::Cloud::Translate::V3::CreateGlossaryRequest.new(parent: parent, glossary: glossary), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_glossary_client_stub.call_count - end - end - end - - def test_update_glossary - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - glossary = {} - update_mask = {} - - update_glossary_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_update_glossary_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_glossary_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_glossary({ glossary: glossary, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_glossary glossary: glossary, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_glossary ::Google::Cloud::Translate::V3::UpdateGlossaryRequest.new(glossary: glossary, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_glossary({ glossary: glossary, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_glossary(::Google::Cloud::Translate::V3::UpdateGlossaryRequest.new(glossary: glossary, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_glossary_client_stub.call_count - end - end - end - - def test_list_glossaries - # Create test objects. - client_result = ::Google::Cloud::Translate::V3::ListGlossariesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_glossaries_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_list_glossaries_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_glossaries_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_glossaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_glossaries parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_glossaries ::Google::Cloud::Translate::V3::ListGlossariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_glossaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_glossaries(::Google::Cloud::Translate::V3::ListGlossariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_glossaries_client_stub.call_count - end - end - end - - def test_get_glossary - # Create test objects. - client_result = ::Google::Cloud::Translate::V3::Glossary.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_glossary_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_get_glossary_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_glossary_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_glossary({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_glossary name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_glossary ::Google::Cloud::Translate::V3::GetGlossaryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_glossary({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_glossary(::Google::Cloud::Translate::V3::GetGlossaryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_glossary_client_stub.call_count - end - end - end - - def test_delete_glossary - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_glossary_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_delete_glossary_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_glossary_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_glossary({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_glossary name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_glossary ::Google::Cloud::Translate::V3::DeleteGlossaryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_glossary({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_glossary(::Google::Cloud::Translate::V3::DeleteGlossaryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_glossary_client_stub.call_count - end - end - end - - def test_get_glossary_entry - # Create test objects. - client_result = ::Google::Cloud::Translate::V3::GlossaryEntry.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_glossary_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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_get_glossary_entry_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_glossary_entry_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_glossary_entry({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_glossary_entry name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_glossary_entry ::Google::Cloud::Translate::V3::GetGlossaryEntryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_glossary_entry({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_glossary_entry(::Google::Cloud::Translate::V3::GetGlossaryEntryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_glossary_entry_client_stub.call_count - end - end - end - - def test_list_glossary_entries - # Create test objects. - client_result = ::Google::Cloud::Translate::V3::ListGlossaryEntriesResponse.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_glossary_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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_list_glossary_entries_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_glossary_entries_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_glossary_entries({ 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_glossary_entries 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_glossary_entries ::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest.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_glossary_entries({ 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_glossary_entries(::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest.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_glossary_entries_client_stub.call_count - end - end - end - - def test_create_glossary_entry - # Create test objects. - client_result = ::Google::Cloud::Translate::V3::GlossaryEntry.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - glossary_entry = {} - - create_glossary_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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_create_glossary_entry_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_glossary_entry_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_glossary_entry({ parent: parent, glossary_entry: glossary_entry }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_glossary_entry parent: parent, glossary_entry: glossary_entry do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_glossary_entry ::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest.new(parent: parent, glossary_entry: glossary_entry) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_glossary_entry({ parent: parent, glossary_entry: glossary_entry }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_glossary_entry(::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest.new(parent: parent, glossary_entry: glossary_entry), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_glossary_entry_client_stub.call_count - end - end - end - - def test_update_glossary_entry - # Create test objects. - client_result = ::Google::Cloud::Translate::V3::GlossaryEntry.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - glossary_entry = {} - - update_glossary_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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_update_glossary_entry_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_glossary_entry_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_glossary_entry({ glossary_entry: glossary_entry }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_glossary_entry glossary_entry: glossary_entry do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_glossary_entry ::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest.new(glossary_entry: glossary_entry) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_glossary_entry({ glossary_entry: glossary_entry }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_glossary_entry(::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest.new(glossary_entry: glossary_entry), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_glossary_entry_client_stub.call_count - end - end - end - - def test_delete_glossary_entry - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_glossary_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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_delete_glossary_entry_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_glossary_entry_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_glossary_entry({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_glossary_entry name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_glossary_entry ::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_glossary_entry({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_glossary_entry(::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_glossary_entry_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 = {} - - 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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_create_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_dataset_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_dataset({ parent: parent, dataset: dataset }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_dataset parent: parent, dataset: dataset do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_dataset ::Google::Cloud::Translate::V3::CreateDatasetRequest.new(parent: parent, dataset: dataset) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_dataset({ parent: parent, dataset: dataset }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_dataset(::Google::Cloud::Translate::V3::CreateDatasetRequest.new(parent: parent, dataset: dataset), 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_get_dataset - # Create test objects. - client_result = ::Google::Cloud::Translate::V3::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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_get_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_dataset_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::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::Translate::V3::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::Translate::V3::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_list_datasets - # Create test objects. - client_result = ::Google::Cloud::Translate::V3::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" - - 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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_list_datasets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_datasets_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::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 }) 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 do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_datasets ::Google::Cloud::Translate::V3::ListDatasetsRequest.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_datasets({ 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_datasets(::Google::Cloud::Translate::V3::ListDatasetsRequest.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_datasets_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" - - 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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_delete_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_dataset_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_dataset({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_dataset name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_dataset ::Google::Cloud::Translate::V3::DeleteDatasetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_dataset({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_dataset(::Google::Cloud::Translate::V3::DeleteDatasetRequest.new(name: name), 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_create_adaptive_mt_dataset - # Create test objects. - client_result = ::Google::Cloud::Translate::V3::AdaptiveMtDataset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - adaptive_mt_dataset = {} - - create_adaptive_mt_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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_create_adaptive_mt_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_adaptive_mt_dataset_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_adaptive_mt_dataset({ parent: parent, adaptive_mt_dataset: adaptive_mt_dataset }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_adaptive_mt_dataset parent: parent, adaptive_mt_dataset: adaptive_mt_dataset do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_adaptive_mt_dataset ::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest.new(parent: parent, adaptive_mt_dataset: adaptive_mt_dataset) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_adaptive_mt_dataset({ parent: parent, adaptive_mt_dataset: adaptive_mt_dataset }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_adaptive_mt_dataset(::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest.new(parent: parent, adaptive_mt_dataset: adaptive_mt_dataset), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_adaptive_mt_dataset_client_stub.call_count - end - end - end - - def test_delete_adaptive_mt_dataset - # 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_adaptive_mt_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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_delete_adaptive_mt_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_adaptive_mt_dataset_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_adaptive_mt_dataset({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_adaptive_mt_dataset name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_adaptive_mt_dataset ::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_adaptive_mt_dataset({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_adaptive_mt_dataset(::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_adaptive_mt_dataset_client_stub.call_count - end - end - end - - def test_get_adaptive_mt_dataset - # Create test objects. - client_result = ::Google::Cloud::Translate::V3::AdaptiveMtDataset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_adaptive_mt_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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_get_adaptive_mt_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_adaptive_mt_dataset_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_adaptive_mt_dataset({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_adaptive_mt_dataset name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_adaptive_mt_dataset ::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_adaptive_mt_dataset({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_adaptive_mt_dataset(::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_adaptive_mt_dataset_client_stub.call_count - end - end - end - - def test_list_adaptive_mt_datasets - # Create test objects. - client_result = ::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_adaptive_mt_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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_list_adaptive_mt_datasets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_adaptive_mt_datasets_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_adaptive_mt_datasets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_adaptive_mt_datasets parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_adaptive_mt_datasets ::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_adaptive_mt_datasets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_adaptive_mt_datasets(::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_adaptive_mt_datasets_client_stub.call_count - end - end - end - - def test_adaptive_mt_translate - # Create test objects. - client_result = ::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - dataset = "hello world" - content = ["hello world"] - reference_sentence_config = {} - glossary_config = {} - - adaptive_mt_translate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_adaptive_mt_translate_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, adaptive_mt_translate_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.adaptive_mt_translate({ parent: parent, dataset: dataset, content: content, reference_sentence_config: reference_sentence_config, glossary_config: glossary_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.adaptive_mt_translate parent: parent, dataset: dataset, content: content, reference_sentence_config: reference_sentence_config, glossary_config: glossary_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.adaptive_mt_translate ::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest.new(parent: parent, dataset: dataset, content: content, reference_sentence_config: reference_sentence_config, glossary_config: glossary_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.adaptive_mt_translate({ parent: parent, dataset: dataset, content: content, reference_sentence_config: reference_sentence_config, glossary_config: glossary_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.adaptive_mt_translate(::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest.new(parent: parent, dataset: dataset, content: content, reference_sentence_config: reference_sentence_config, glossary_config: glossary_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, adaptive_mt_translate_client_stub.call_count - end - end - end - - def test_get_adaptive_mt_file - # Create test objects. - client_result = ::Google::Cloud::Translate::V3::AdaptiveMtFile.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_adaptive_mt_file_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_get_adaptive_mt_file_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_adaptive_mt_file_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_adaptive_mt_file({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_adaptive_mt_file name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_adaptive_mt_file ::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_adaptive_mt_file({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_adaptive_mt_file(::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_adaptive_mt_file_client_stub.call_count - end - end - end - - def test_delete_adaptive_mt_file - # 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_adaptive_mt_file_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_delete_adaptive_mt_file_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_adaptive_mt_file_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_adaptive_mt_file({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_adaptive_mt_file name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_adaptive_mt_file ::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_adaptive_mt_file({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_adaptive_mt_file(::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_adaptive_mt_file_client_stub.call_count - end - end - end - - def test_import_adaptive_mt_file - # Create test objects. - client_result = ::Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - file_input_source = {} - - import_adaptive_mt_file_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_import_adaptive_mt_file_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, import_adaptive_mt_file_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.import_adaptive_mt_file({ parent: parent, file_input_source: file_input_source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.import_adaptive_mt_file parent: parent, file_input_source: file_input_source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.import_adaptive_mt_file ::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest.new(parent: parent, file_input_source: file_input_source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.import_adaptive_mt_file({ parent: parent, file_input_source: file_input_source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.import_adaptive_mt_file(::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest.new(parent: parent, file_input_source: file_input_source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, import_adaptive_mt_file_client_stub.call_count - end - end - end - - def test_list_adaptive_mt_files - # Create test objects. - client_result = ::Google::Cloud::Translate::V3::ListAdaptiveMtFilesResponse.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_adaptive_mt_files_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_list_adaptive_mt_files_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_adaptive_mt_files_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_adaptive_mt_files({ 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_adaptive_mt_files 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_adaptive_mt_files ::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest.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_adaptive_mt_files({ 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_adaptive_mt_files(::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest.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_adaptive_mt_files_client_stub.call_count - end - end - end - - def test_list_adaptive_mt_sentences - # Create test objects. - client_result = ::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesResponse.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_adaptive_mt_sentences_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_list_adaptive_mt_sentences_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_adaptive_mt_sentences_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_adaptive_mt_sentences({ 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_adaptive_mt_sentences 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_adaptive_mt_sentences ::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest.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_adaptive_mt_sentences({ 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_adaptive_mt_sentences(::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest.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_adaptive_mt_sentences_client_stub.call_count - end - end - end - - def test_import_data - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - dataset = "hello world" - input_config = {} - - import_data_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_import_data_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, import_data_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.import_data({ dataset: dataset, input_config: input_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.import_data dataset: dataset, input_config: input_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.import_data ::Google::Cloud::Translate::V3::ImportDataRequest.new(dataset: dataset, input_config: input_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.import_data({ dataset: dataset, input_config: input_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.import_data(::Google::Cloud::Translate::V3::ImportDataRequest.new(dataset: dataset, input_config: input_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, import_data_client_stub.call_count - end - end - end - - def test_export_data - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - dataset = "hello world" - output_config = {} - - export_data_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_export_data_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_data_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.export_data({ dataset: dataset, output_config: output_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.export_data dataset: dataset, output_config: output_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.export_data ::Google::Cloud::Translate::V3::ExportDataRequest.new(dataset: dataset, output_config: output_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.export_data({ dataset: dataset, output_config: output_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.export_data(::Google::Cloud::Translate::V3::ExportDataRequest.new(dataset: dataset, output_config: output_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_data_client_stub.call_count - end - end - end - - def test_list_examples - # Create test objects. - client_result = ::Google::Cloud::Translate::V3::ListExamplesResponse.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_examples_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_list_examples_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_examples_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_examples({ 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_examples 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_examples ::Google::Cloud::Translate::V3::ListExamplesRequest.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_examples({ 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_examples(::Google::Cloud::Translate::V3::ListExamplesRequest.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_examples_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 = {} - - 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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_create_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_model_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_model({ parent: parent, model: model }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_model parent: parent, model: model do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_model ::Google::Cloud::Translate::V3::CreateModelRequest.new(parent: parent, model: model) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_model({ parent: parent, model: model }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_model(::Google::Cloud::Translate::V3::CreateModelRequest.new(parent: parent, model: model), 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_list_models - # Create test objects. - client_result = ::Google::Cloud::Translate::V3::ListModelsResponse.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_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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_list_models_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_models_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_models({ 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_models 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_models ::Google::Cloud::Translate::V3::ListModelsRequest.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_models({ 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_models(::Google::Cloud::Translate::V3::ListModelsRequest.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_models_client_stub.call_count - end - end - end - - def test_get_model - # Create test objects. - client_result = ::Google::Cloud::Translate::V3::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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_get_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_model_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::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::Translate::V3::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::Translate::V3::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_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" - - 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::Translate::V3::TranslationService::Rest::ServiceStub.stub :transcode_delete_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_model_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_model({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_model name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_model ::Google::Cloud::Translate::V3::DeleteModelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_model({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_model(::Google::Cloud::Translate::V3::DeleteModelRequest.new(name: name), 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_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::Translate::V3::TranslationService::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::Translate::V3::TranslationService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_test.rb b/owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_test.rb deleted file mode 100644 index 26223607f22b..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/test/google/cloud/translate/v3/translation_service_test.rb +++ /dev/null @@ -1,2575 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/translate/v3/translation_service_pb" -require "google/cloud/translate/v3/translation_service" - -class ::Google::Cloud::Translate::V3::TranslationService::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_translate_text - # Create GRPC objects. - grpc_response = ::Google::Cloud::Translate::V3::TranslateTextResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - contents = ["hello world"] - mime_type = "hello world" - source_language_code = "hello world" - target_language_code = "hello world" - parent = "hello world" - model = "hello world" - glossary_config = {} - transliteration_config = {} - labels = {} - - translate_text_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :translate_text, name - assert_kind_of ::Google::Cloud::Translate::V3::TranslateTextRequest, request - assert_equal ["hello world"], request["contents"] - assert_equal "hello world", request["mime_type"] - assert_equal "hello world", request["source_language_code"] - assert_equal "hello world", request["target_language_code"] - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["model"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig), request["glossary_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::TransliterationConfig), request["transliteration_config"] - assert_equal({}, request["labels"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, translate_text_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.translate_text({ contents: contents, mime_type: mime_type, source_language_code: source_language_code, target_language_code: target_language_code, parent: parent, model: model, glossary_config: glossary_config, transliteration_config: transliteration_config, labels: labels }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.translate_text contents: contents, mime_type: mime_type, source_language_code: source_language_code, target_language_code: target_language_code, parent: parent, model: model, glossary_config: glossary_config, transliteration_config: transliteration_config, labels: labels do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.translate_text ::Google::Cloud::Translate::V3::TranslateTextRequest.new(contents: contents, mime_type: mime_type, source_language_code: source_language_code, target_language_code: target_language_code, parent: parent, model: model, glossary_config: glossary_config, transliteration_config: transliteration_config, labels: labels) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.translate_text({ contents: contents, mime_type: mime_type, source_language_code: source_language_code, target_language_code: target_language_code, parent: parent, model: model, glossary_config: glossary_config, transliteration_config: transliteration_config, labels: labels }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.translate_text(::Google::Cloud::Translate::V3::TranslateTextRequest.new(contents: contents, mime_type: mime_type, source_language_code: source_language_code, target_language_code: target_language_code, parent: parent, model: model, glossary_config: glossary_config, transliteration_config: transliteration_config, labels: labels), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, translate_text_client_stub.call_rpc_count - end - end - - def test_romanize_text - # Create GRPC objects. - grpc_response = ::Google::Cloud::Translate::V3::RomanizeTextResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - contents = ["hello world"] - source_language_code = "hello world" - - romanize_text_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :romanize_text, name - assert_kind_of ::Google::Cloud::Translate::V3::RomanizeTextRequest, request - assert_equal "hello world", request["parent"] - assert_equal ["hello world"], request["contents"] - assert_equal "hello world", request["source_language_code"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, romanize_text_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.romanize_text({ parent: parent, contents: contents, source_language_code: source_language_code }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.romanize_text parent: parent, contents: contents, source_language_code: source_language_code do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.romanize_text ::Google::Cloud::Translate::V3::RomanizeTextRequest.new(parent: parent, contents: contents, source_language_code: source_language_code) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.romanize_text({ parent: parent, contents: contents, source_language_code: source_language_code }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.romanize_text(::Google::Cloud::Translate::V3::RomanizeTextRequest.new(parent: parent, contents: contents, source_language_code: source_language_code), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, romanize_text_client_stub.call_rpc_count - end - end - - def test_detect_language - # Create GRPC objects. - grpc_response = ::Google::Cloud::Translate::V3::DetectLanguageResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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 = "hello world" - content = "hello world" - mime_type = "hello world" - labels = {} - - detect_language_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :detect_language, name - assert_kind_of ::Google::Cloud::Translate::V3::DetectLanguageRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["model"] - assert_equal "hello world", request["content"] - assert_equal :content, request.source - assert_equal "hello world", request["mime_type"] - assert_equal({}, request["labels"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, detect_language_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.detect_language({ parent: parent, model: model, content: content, mime_type: mime_type, labels: labels }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.detect_language parent: parent, model: model, content: content, mime_type: mime_type, labels: labels do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.detect_language ::Google::Cloud::Translate::V3::DetectLanguageRequest.new(parent: parent, model: model, content: content, mime_type: mime_type, labels: labels) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.detect_language({ parent: parent, model: model, content: content, mime_type: mime_type, labels: labels }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.detect_language(::Google::Cloud::Translate::V3::DetectLanguageRequest.new(parent: parent, model: model, content: content, mime_type: mime_type, labels: labels), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, detect_language_client_stub.call_rpc_count - end - end - - def test_get_supported_languages - # Create GRPC objects. - grpc_response = ::Google::Cloud::Translate::V3::SupportedLanguages.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - display_language_code = "hello world" - model = "hello world" - - get_supported_languages_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_supported_languages, name - assert_kind_of ::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["display_language_code"] - assert_equal "hello world", request["model"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_supported_languages_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_supported_languages({ parent: parent, display_language_code: display_language_code, model: model }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_supported_languages parent: parent, display_language_code: display_language_code, model: model do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_supported_languages ::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest.new(parent: parent, display_language_code: display_language_code, model: model) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_supported_languages({ parent: parent, display_language_code: display_language_code, model: model }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_supported_languages(::Google::Cloud::Translate::V3::GetSupportedLanguagesRequest.new(parent: parent, display_language_code: display_language_code, model: model), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_supported_languages_client_stub.call_rpc_count - end - end - - def test_translate_document - # Create GRPC objects. - grpc_response = ::Google::Cloud::Translate::V3::TranslateDocumentResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - source_language_code = "hello world" - target_language_code = "hello world" - document_input_config = {} - document_output_config = {} - model = "hello world" - glossary_config = {} - labels = {} - customized_attribution = "hello world" - is_translate_native_pdf_only = true - enable_shadow_removal_native_pdf = true - enable_rotation_correction = true - - translate_document_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :translate_document, name - assert_kind_of ::Google::Cloud::Translate::V3::TranslateDocumentRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["source_language_code"] - assert_equal "hello world", request["target_language_code"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::DocumentInputConfig), request["document_input_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::DocumentOutputConfig), request["document_output_config"] - assert_equal "hello world", request["model"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig), request["glossary_config"] - assert_equal({}, request["labels"].to_h) - assert_equal "hello world", request["customized_attribution"] - assert_equal true, request["is_translate_native_pdf_only"] - assert_equal true, request["enable_shadow_removal_native_pdf"] - assert_equal true, request["enable_rotation_correction"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, translate_document_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.translate_document({ parent: parent, source_language_code: source_language_code, target_language_code: target_language_code, document_input_config: document_input_config, document_output_config: document_output_config, model: model, glossary_config: glossary_config, labels: labels, customized_attribution: customized_attribution, is_translate_native_pdf_only: is_translate_native_pdf_only, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.translate_document parent: parent, source_language_code: source_language_code, target_language_code: target_language_code, document_input_config: document_input_config, document_output_config: document_output_config, model: model, glossary_config: glossary_config, labels: labels, customized_attribution: customized_attribution, is_translate_native_pdf_only: is_translate_native_pdf_only, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.translate_document ::Google::Cloud::Translate::V3::TranslateDocumentRequest.new(parent: parent, source_language_code: source_language_code, target_language_code: target_language_code, document_input_config: document_input_config, document_output_config: document_output_config, model: model, glossary_config: glossary_config, labels: labels, customized_attribution: customized_attribution, is_translate_native_pdf_only: is_translate_native_pdf_only, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.translate_document({ parent: parent, source_language_code: source_language_code, target_language_code: target_language_code, document_input_config: document_input_config, document_output_config: document_output_config, model: model, glossary_config: glossary_config, labels: labels, customized_attribution: customized_attribution, is_translate_native_pdf_only: is_translate_native_pdf_only, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.translate_document(::Google::Cloud::Translate::V3::TranslateDocumentRequest.new(parent: parent, source_language_code: source_language_code, target_language_code: target_language_code, document_input_config: document_input_config, document_output_config: document_output_config, model: model, glossary_config: glossary_config, labels: labels, customized_attribution: customized_attribution, is_translate_native_pdf_only: is_translate_native_pdf_only, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, translate_document_client_stub.call_rpc_count - end - end - - def test_batch_translate_text - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - source_language_code = "hello world" - target_language_codes = ["hello world"] - models = {} - input_configs = [{}] - output_config = {} - glossaries = {} - labels = {} - - batch_translate_text_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_translate_text, name - assert_kind_of ::Google::Cloud::Translate::V3::BatchTranslateTextRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["source_language_code"] - assert_equal ["hello world"], request["target_language_codes"] - assert_equal({}, request["models"].to_h) - assert_kind_of ::Google::Cloud::Translate::V3::InputConfig, request["input_configs"].first - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::OutputConfig), request["output_config"] - assert_equal({}, request["glossaries"].to_h) - assert_equal({}, request["labels"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_translate_text_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_translate_text({ parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, models: models, input_configs: input_configs, output_config: output_config, glossaries: glossaries, labels: labels }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.batch_translate_text parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, models: models, input_configs: input_configs, output_config: output_config, glossaries: glossaries, labels: labels do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.batch_translate_text ::Google::Cloud::Translate::V3::BatchTranslateTextRequest.new(parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, models: models, input_configs: input_configs, output_config: output_config, glossaries: glossaries, labels: labels) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.batch_translate_text({ parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, models: models, input_configs: input_configs, output_config: output_config, glossaries: glossaries, labels: labels }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.batch_translate_text(::Google::Cloud::Translate::V3::BatchTranslateTextRequest.new(parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, models: models, input_configs: input_configs, output_config: output_config, glossaries: glossaries, labels: labels), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_translate_text_client_stub.call_rpc_count - end - end - - def test_batch_translate_document - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - source_language_code = "hello world" - target_language_codes = ["hello world"] - input_configs = [{}] - output_config = {} - models = {} - glossaries = {} - format_conversions = {} - customized_attribution = "hello world" - enable_shadow_removal_native_pdf = true - enable_rotation_correction = true - - batch_translate_document_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_translate_document, name - assert_kind_of ::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["source_language_code"] - assert_equal ["hello world"], request["target_language_codes"] - assert_kind_of ::Google::Cloud::Translate::V3::BatchDocumentInputConfig, request["input_configs"].first - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::BatchDocumentOutputConfig), request["output_config"] - assert_equal({}, request["models"].to_h) - assert_equal({}, request["glossaries"].to_h) - assert_equal({}, request["format_conversions"].to_h) - assert_equal "hello world", request["customized_attribution"] - assert_equal true, request["enable_shadow_removal_native_pdf"] - assert_equal true, request["enable_rotation_correction"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_translate_document_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_translate_document({ parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, input_configs: input_configs, output_config: output_config, models: models, glossaries: glossaries, format_conversions: format_conversions, customized_attribution: customized_attribution, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.batch_translate_document parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, input_configs: input_configs, output_config: output_config, models: models, glossaries: glossaries, format_conversions: format_conversions, customized_attribution: customized_attribution, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.batch_translate_document ::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest.new(parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, input_configs: input_configs, output_config: output_config, models: models, glossaries: glossaries, format_conversions: format_conversions, customized_attribution: customized_attribution, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.batch_translate_document({ parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, input_configs: input_configs, output_config: output_config, models: models, glossaries: glossaries, format_conversions: format_conversions, customized_attribution: customized_attribution, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.batch_translate_document(::Google::Cloud::Translate::V3::BatchTranslateDocumentRequest.new(parent: parent, source_language_code: source_language_code, target_language_codes: target_language_codes, input_configs: input_configs, output_config: output_config, models: models, glossaries: glossaries, format_conversions: format_conversions, customized_attribution: customized_attribution, enable_shadow_removal_native_pdf: enable_shadow_removal_native_pdf, enable_rotation_correction: enable_rotation_correction), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_translate_document_client_stub.call_rpc_count - end - end - - def test_create_glossary - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - glossary = {} - - create_glossary_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_glossary, name - assert_kind_of ::Google::Cloud::Translate::V3::CreateGlossaryRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::Glossary), request["glossary"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_glossary_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_glossary({ parent: parent, glossary: glossary }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_glossary parent: parent, glossary: glossary do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_glossary ::Google::Cloud::Translate::V3::CreateGlossaryRequest.new(parent: parent, glossary: glossary) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_glossary({ parent: parent, glossary: glossary }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_glossary(::Google::Cloud::Translate::V3::CreateGlossaryRequest.new(parent: parent, glossary: glossary), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_glossary_client_stub.call_rpc_count - end - end - - def test_update_glossary - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - glossary = {} - update_mask = {} - - update_glossary_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_glossary, name - assert_kind_of ::Google::Cloud::Translate::V3::UpdateGlossaryRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::Glossary), request["glossary"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_glossary_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_glossary({ glossary: glossary, 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_glossary glossary: glossary, 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_glossary ::Google::Cloud::Translate::V3::UpdateGlossaryRequest.new(glossary: glossary, 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_glossary({ glossary: glossary, 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_glossary(::Google::Cloud::Translate::V3::UpdateGlossaryRequest.new(glossary: glossary, 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_glossary_client_stub.call_rpc_count - end - end - - def test_list_glossaries - # Create GRPC objects. - grpc_response = ::Google::Cloud::Translate::V3::ListGlossariesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_glossaries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_glossaries, name - assert_kind_of ::Google::Cloud::Translate::V3::ListGlossariesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_glossaries_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_glossaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_glossaries parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_glossaries ::Google::Cloud::Translate::V3::ListGlossariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_glossaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_glossaries(::Google::Cloud::Translate::V3::ListGlossariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_glossaries_client_stub.call_rpc_count - end - end - - def test_get_glossary - # Create GRPC objects. - grpc_response = ::Google::Cloud::Translate::V3::Glossary.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_glossary_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_glossary, name - assert_kind_of ::Google::Cloud::Translate::V3::GetGlossaryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_glossary_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_glossary({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_glossary name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_glossary ::Google::Cloud::Translate::V3::GetGlossaryRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_glossary({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_glossary(::Google::Cloud::Translate::V3::GetGlossaryRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_glossary_client_stub.call_rpc_count - end - end - - def test_delete_glossary - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_glossary_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_glossary, name - assert_kind_of ::Google::Cloud::Translate::V3::DeleteGlossaryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_glossary_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_glossary({ name: 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_glossary name: 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_glossary ::Google::Cloud::Translate::V3::DeleteGlossaryRequest.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_glossary({ 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_glossary(::Google::Cloud::Translate::V3::DeleteGlossaryRequest.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_glossary_client_stub.call_rpc_count - end - end - - def test_get_glossary_entry - # Create GRPC objects. - grpc_response = ::Google::Cloud::Translate::V3::GlossaryEntry.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_glossary_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_glossary_entry, name - assert_kind_of ::Google::Cloud::Translate::V3::GetGlossaryEntryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_glossary_entry_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_glossary_entry({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_glossary_entry name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_glossary_entry ::Google::Cloud::Translate::V3::GetGlossaryEntryRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_glossary_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_glossary_entry(::Google::Cloud::Translate::V3::GetGlossaryEntryRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_glossary_entry_client_stub.call_rpc_count - end - end - - def test_list_glossary_entries - # Create GRPC objects. - grpc_response = ::Google::Cloud::Translate::V3::ListGlossaryEntriesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_glossary_entries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_glossary_entries, name - assert_kind_of ::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest, 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_glossary_entries_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_glossary_entries({ 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_glossary_entries 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_glossary_entries ::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest.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_glossary_entries({ 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_glossary_entries(::Google::Cloud::Translate::V3::ListGlossaryEntriesRequest.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_glossary_entries_client_stub.call_rpc_count - end - end - - def test_create_glossary_entry - # Create GRPC objects. - grpc_response = ::Google::Cloud::Translate::V3::GlossaryEntry.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - glossary_entry = {} - - create_glossary_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_glossary_entry, name - assert_kind_of ::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::GlossaryEntry), request["glossary_entry"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_glossary_entry_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_glossary_entry({ parent: parent, glossary_entry: glossary_entry }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_glossary_entry parent: parent, glossary_entry: glossary_entry do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_glossary_entry ::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest.new(parent: parent, glossary_entry: glossary_entry) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_glossary_entry({ parent: parent, glossary_entry: glossary_entry }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_glossary_entry(::Google::Cloud::Translate::V3::CreateGlossaryEntryRequest.new(parent: parent, glossary_entry: glossary_entry), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_glossary_entry_client_stub.call_rpc_count - end - end - - def test_update_glossary_entry - # Create GRPC objects. - grpc_response = ::Google::Cloud::Translate::V3::GlossaryEntry.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - glossary_entry = {} - - update_glossary_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_glossary_entry, name - assert_kind_of ::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::GlossaryEntry), request["glossary_entry"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_glossary_entry_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_glossary_entry({ glossary_entry: glossary_entry }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_glossary_entry glossary_entry: glossary_entry do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_glossary_entry ::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest.new(glossary_entry: glossary_entry) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_glossary_entry({ glossary_entry: glossary_entry }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_glossary_entry(::Google::Cloud::Translate::V3::UpdateGlossaryEntryRequest.new(glossary_entry: glossary_entry), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_glossary_entry_client_stub.call_rpc_count - end - end - - def test_delete_glossary_entry - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_glossary_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_glossary_entry, name - assert_kind_of ::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_glossary_entry_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_glossary_entry({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_glossary_entry name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_glossary_entry ::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_glossary_entry({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_glossary_entry(::Google::Cloud::Translate::V3::DeleteGlossaryEntryRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_glossary_entry_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 = {} - - create_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_dataset, name - assert_kind_of ::Google::Cloud::Translate::V3::CreateDatasetRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::Dataset), request["dataset"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_dataset_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_dataset({ parent: parent, dataset: dataset }) do |response, 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: dataset do |response, 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::Translate::V3::CreateDatasetRequest.new(parent: parent, dataset: dataset) do |response, operation| - assert_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: dataset }, grpc_options) do |response, operation| - assert_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::Translate::V3::CreateDatasetRequest.new(parent: parent, dataset: dataset), grpc_options) do |response, operation| - assert_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_get_dataset - # Create GRPC objects. - grpc_response = ::Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::TranslationService::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::Translate::V3::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::Translate::V3::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_list_datasets - # Create GRPC objects. - grpc_response = ::Google::Cloud::Translate::V3::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" - - list_datasets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_datasets, name - assert_kind_of ::Google::Cloud::Translate::V3::ListDatasetsRequest, 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_datasets_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::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 }) do |response, 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 do |response, 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::Translate::V3::ListDatasetsRequest.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_datasets({ 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_datasets(::Google::Cloud::Translate::V3::ListDatasetsRequest.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_datasets_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" - - delete_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_dataset, name - assert_kind_of ::Google::Cloud::Translate::V3::DeleteDatasetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_dataset_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_dataset({ name: 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_dataset name: 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_dataset ::Google::Cloud::Translate::V3::DeleteDatasetRequest.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_dataset({ 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_dataset(::Google::Cloud::Translate::V3::DeleteDatasetRequest.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_dataset_client_stub.call_rpc_count - end - end - - def test_create_adaptive_mt_dataset - # Create GRPC objects. - grpc_response = ::Google::Cloud::Translate::V3::AdaptiveMtDataset.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - adaptive_mt_dataset = {} - - create_adaptive_mt_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_adaptive_mt_dataset, name - assert_kind_of ::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::AdaptiveMtDataset), request["adaptive_mt_dataset"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_adaptive_mt_dataset_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_adaptive_mt_dataset({ parent: parent, adaptive_mt_dataset: adaptive_mt_dataset }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_adaptive_mt_dataset parent: parent, adaptive_mt_dataset: adaptive_mt_dataset do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_adaptive_mt_dataset ::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest.new(parent: parent, adaptive_mt_dataset: adaptive_mt_dataset) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_adaptive_mt_dataset({ parent: parent, adaptive_mt_dataset: adaptive_mt_dataset }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_adaptive_mt_dataset(::Google::Cloud::Translate::V3::CreateAdaptiveMtDatasetRequest.new(parent: parent, adaptive_mt_dataset: adaptive_mt_dataset), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_adaptive_mt_dataset_client_stub.call_rpc_count - end - end - - def test_delete_adaptive_mt_dataset - # 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_adaptive_mt_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_adaptive_mt_dataset, name - assert_kind_of ::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_adaptive_mt_dataset_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_adaptive_mt_dataset({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_adaptive_mt_dataset name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_adaptive_mt_dataset ::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_adaptive_mt_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.delete_adaptive_mt_dataset(::Google::Cloud::Translate::V3::DeleteAdaptiveMtDatasetRequest.new(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_adaptive_mt_dataset_client_stub.call_rpc_count - end - end - - def test_get_adaptive_mt_dataset - # Create GRPC objects. - grpc_response = ::Google::Cloud::Translate::V3::AdaptiveMtDataset.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_adaptive_mt_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_adaptive_mt_dataset, name - assert_kind_of ::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_adaptive_mt_dataset_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_adaptive_mt_dataset({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_adaptive_mt_dataset name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_adaptive_mt_dataset ::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_adaptive_mt_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_adaptive_mt_dataset(::Google::Cloud::Translate::V3::GetAdaptiveMtDatasetRequest.new(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_adaptive_mt_dataset_client_stub.call_rpc_count - end - end - - def test_list_adaptive_mt_datasets - # Create GRPC objects. - grpc_response = ::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_adaptive_mt_datasets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_adaptive_mt_datasets, name - assert_kind_of ::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_adaptive_mt_datasets_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_adaptive_mt_datasets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_adaptive_mt_datasets parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_adaptive_mt_datasets ::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_adaptive_mt_datasets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_adaptive_mt_datasets(::Google::Cloud::Translate::V3::ListAdaptiveMtDatasetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_adaptive_mt_datasets_client_stub.call_rpc_count - end - end - - def test_adaptive_mt_translate - # Create GRPC objects. - grpc_response = ::Google::Cloud::Translate::V3::AdaptiveMtTranslateResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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 = "hello world" - content = ["hello world"] - reference_sentence_config = {} - glossary_config = {} - - adaptive_mt_translate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :adaptive_mt_translate, name - assert_kind_of ::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["dataset"] - assert_equal ["hello world"], request["content"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::ReferenceSentenceConfig), request["reference_sentence_config"] - assert request.has_reference_sentence_config? - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::GlossaryConfig), request["glossary_config"] - assert request.has_glossary_config? - refute_nil options - end - - Gapic::ServiceStub.stub :new, adaptive_mt_translate_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.adaptive_mt_translate({ parent: parent, dataset: dataset, content: content, reference_sentence_config: reference_sentence_config, glossary_config: glossary_config }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.adaptive_mt_translate parent: parent, dataset: dataset, content: content, reference_sentence_config: reference_sentence_config, glossary_config: glossary_config do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.adaptive_mt_translate ::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest.new(parent: parent, dataset: dataset, content: content, reference_sentence_config: reference_sentence_config, glossary_config: glossary_config) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.adaptive_mt_translate({ parent: parent, dataset: dataset, content: content, reference_sentence_config: reference_sentence_config, glossary_config: glossary_config }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.adaptive_mt_translate(::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest.new(parent: parent, dataset: dataset, content: content, reference_sentence_config: reference_sentence_config, glossary_config: glossary_config), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, adaptive_mt_translate_client_stub.call_rpc_count - end - end - - def test_get_adaptive_mt_file - # Create GRPC objects. - grpc_response = ::Google::Cloud::Translate::V3::AdaptiveMtFile.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_adaptive_mt_file_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_adaptive_mt_file, name - assert_kind_of ::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_adaptive_mt_file_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_adaptive_mt_file({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_adaptive_mt_file name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_adaptive_mt_file ::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_adaptive_mt_file({ 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_adaptive_mt_file(::Google::Cloud::Translate::V3::GetAdaptiveMtFileRequest.new(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_adaptive_mt_file_client_stub.call_rpc_count - end - end - - def test_delete_adaptive_mt_file - # 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_adaptive_mt_file_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_adaptive_mt_file, name - assert_kind_of ::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_adaptive_mt_file_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_adaptive_mt_file({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_adaptive_mt_file name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_adaptive_mt_file ::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_adaptive_mt_file({ 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_adaptive_mt_file(::Google::Cloud::Translate::V3::DeleteAdaptiveMtFileRequest.new(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_adaptive_mt_file_client_stub.call_rpc_count - end - end - - def test_import_adaptive_mt_file - # Create GRPC objects. - grpc_response = ::Google::Cloud::Translate::V3::ImportAdaptiveMtFileResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - file_input_source = {} - - import_adaptive_mt_file_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :import_adaptive_mt_file, name - assert_kind_of ::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::FileInputSource), request["file_input_source"] - assert_equal :file_input_source, request.source - refute_nil options - end - - Gapic::ServiceStub.stub :new, import_adaptive_mt_file_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.import_adaptive_mt_file({ parent: parent, file_input_source: file_input_source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.import_adaptive_mt_file parent: parent, file_input_source: file_input_source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.import_adaptive_mt_file ::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest.new(parent: parent, file_input_source: file_input_source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.import_adaptive_mt_file({ parent: parent, file_input_source: file_input_source }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.import_adaptive_mt_file(::Google::Cloud::Translate::V3::ImportAdaptiveMtFileRequest.new(parent: parent, file_input_source: file_input_source), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, import_adaptive_mt_file_client_stub.call_rpc_count - end - end - - def test_list_adaptive_mt_files - # Create GRPC objects. - grpc_response = ::Google::Cloud::Translate::V3::ListAdaptiveMtFilesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_adaptive_mt_files_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_adaptive_mt_files, name - assert_kind_of ::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest, 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_adaptive_mt_files_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_adaptive_mt_files({ 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_adaptive_mt_files 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_adaptive_mt_files ::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest.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_adaptive_mt_files({ 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_adaptive_mt_files(::Google::Cloud::Translate::V3::ListAdaptiveMtFilesRequest.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_adaptive_mt_files_client_stub.call_rpc_count - end - end - - def test_list_adaptive_mt_sentences - # Create GRPC objects. - grpc_response = ::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_adaptive_mt_sentences_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_adaptive_mt_sentences, name - assert_kind_of ::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest, 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_adaptive_mt_sentences_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_adaptive_mt_sentences({ 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_adaptive_mt_sentences 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_adaptive_mt_sentences ::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest.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_adaptive_mt_sentences({ 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_adaptive_mt_sentences(::Google::Cloud::Translate::V3::ListAdaptiveMtSentencesRequest.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_adaptive_mt_sentences_client_stub.call_rpc_count - end - end - - def test_import_data - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - dataset = "hello world" - input_config = {} - - import_data_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :import_data, name - assert_kind_of ::Google::Cloud::Translate::V3::ImportDataRequest, request - assert_equal "hello world", request["dataset"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::DatasetInputConfig), request["input_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, import_data_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.import_data({ dataset: dataset, input_config: input_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.import_data dataset: dataset, input_config: input_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.import_data ::Google::Cloud::Translate::V3::ImportDataRequest.new(dataset: dataset, input_config: input_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.import_data({ dataset: dataset, input_config: input_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.import_data(::Google::Cloud::Translate::V3::ImportDataRequest.new(dataset: dataset, input_config: input_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, import_data_client_stub.call_rpc_count - end - end - - def test_export_data - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - dataset = "hello world" - output_config = {} - - export_data_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_data, name - assert_kind_of ::Google::Cloud::Translate::V3::ExportDataRequest, request - assert_equal "hello world", request["dataset"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::DatasetOutputConfig), request["output_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_data_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.export_data({ dataset: dataset, output_config: output_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.export_data dataset: dataset, output_config: output_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.export_data ::Google::Cloud::Translate::V3::ExportDataRequest.new(dataset: dataset, output_config: output_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.export_data({ dataset: dataset, output_config: output_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.export_data(::Google::Cloud::Translate::V3::ExportDataRequest.new(dataset: dataset, output_config: output_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_data_client_stub.call_rpc_count - end - end - - def test_list_examples - # Create GRPC objects. - grpc_response = ::Google::Cloud::Translate::V3::ListExamplesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_examples_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_examples, name - assert_kind_of ::Google::Cloud::Translate::V3::ListExamplesRequest, 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_examples_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_examples({ 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_examples 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_examples ::Google::Cloud::Translate::V3::ListExamplesRequest.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_examples({ 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_examples(::Google::Cloud::Translate::V3::ListExamplesRequest.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_examples_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 = {} - - create_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_model, name - assert_kind_of ::Google::Cloud::Translate::V3::CreateModelRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Translate::V3::Model), request["model"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_model_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_model({ parent: parent, model: model }) do |response, 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: model do |response, 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::Translate::V3::CreateModelRequest.new(parent: parent, model: model) do |response, operation| - assert_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: model }, grpc_options) do |response, operation| - assert_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::Translate::V3::CreateModelRequest.new(parent: parent, model: model), grpc_options) do |response, operation| - assert_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_list_models - # Create GRPC objects. - grpc_response = ::Google::Cloud::Translate::V3::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" - filter = "hello world" - page_size = 42 - page_token = "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::Translate::V3::ListModelsRequest, 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_models_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_models({ 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_models 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_models ::Google::Cloud::Translate::V3::ListModelsRequest.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_models({ 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_models(::Google::Cloud::Translate::V3::ListModelsRequest.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_models_client_stub.call_rpc_count - end - end - - def test_get_model - # Create GRPC objects. - grpc_response = ::Google::Cloud::Translate::V3::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::Translate::V3::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::Translate::V3::TranslationService::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::Translate::V3::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::Translate::V3::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_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" - - delete_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_model, name - assert_kind_of ::Google::Cloud::Translate::V3::DeleteModelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_model_client_stub do - # Create client - client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_model({ name: 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_model name: 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_model ::Google::Cloud::Translate::V3::DeleteModelRequest.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_model({ 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_model(::Google::Cloud::Translate::V3::DeleteModelRequest.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_model_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::Translate::V3::TranslationService::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::Translate::V3::TranslationService::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::Translate::V3::TranslationService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Translate::V3::TranslationService::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::Translate::V3::TranslationService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Translate::V3::TranslationService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-translate-v3/test/helper.rb b/owl-bot-staging/google-cloud-translate-v3/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-translate-v3/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/.gitignore b/owl-bot-staging/google-cloud-video-live_stream-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-video-live_stream-v1/.repo-metadata.json deleted file mode 100644 index aeab9c64ff17..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "livestream.googleapis.com", - "api_shortname": "livestream", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest", - "distribution_name": "google-cloud-video-live_stream-v1", - "is_cloud": true, - "language": "ruby", - "name": "livestream", - "name_pretty": "Live Stream V1 API", - "product_documentation": "https://cloud.google.com/livestream/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The Live Stream API transcodes mezzanine live signals into direct-to-consumer streaming formats, including Dynamic Adaptive Streaming over HTTP (DASH/MPEG-DASH), and HTTP Live Streaming (HLS), for multiple device platforms. Note that google-cloud-video-live_stream-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video-live_stream instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/livestream/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/.rubocop.yml b/owl-bot-staging/google-cloud-video-live_stream-v1/.rubocop.yml deleted file mode 100644 index 3d8359eaee07..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-video-live_stream-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-video-live_stream-v1.rb" diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/.toys.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/.yardopts b/owl-bot-staging/google-cloud-video-live_stream-v1/.yardopts deleted file mode 100644 index ab2ac4451b9f..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Live Stream 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-video-live_stream-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-video-live_stream-v1/AUTHENTICATION.md deleted file mode 100644 index 7132dc94ea28..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-video-live_stream-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-video-live_stream-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/video/live_stream/v1" - -client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/video/live_stream/v1" - -::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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-video-live_stream-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/video/live_stream/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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-video-live_stream-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-video-live_stream-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/Gemfile b/owl-bot-staging/google-cloud-video-live_stream-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/LICENSE.md b/owl-bot-staging/google-cloud-video-live_stream-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/README.md b/owl-bot-staging/google-cloud-video-live_stream-v1/README.md deleted file mode 100644 index 1cce01e33fdb..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Live Stream V1 API - -API Client library for the Live Stream V1 API - -The Live Stream API transcodes mezzanine live signals into direct-to-consumer streaming formats, including Dynamic Adaptive Streaming over HTTP (DASH/MPEG-DASH), and HTTP Live Streaming (HLS), for multiple device platforms. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Live Stream V1 API. Most users should consider using -the main client gem, -[google-cloud-video-live_stream](https://rubygems.org/gems/google-cloud-video-live_stream). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-video-live_stream-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/livestream.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/video/live_stream/v1" - -client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new -request = ::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest.new # (request fields as keyword arguments...) -response = client.create_channel request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/livestream/) -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/video/live_stream/v1" -require "logger" - -client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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-video-live_stream`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-video-live_stream-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-video-live_stream`. -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-video-live_stream-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-video-live_stream-v1/Rakefile b/owl-bot-staging/google-cloud-video-live_stream-v1/Rakefile deleted file mode 100644 index b9de32a98243..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-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/video/live_stream/v1/livestream_service/credentials" - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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-video-live_stream-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-video-live_stream-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-video-live_stream-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-video-live_stream-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-video-live_stream-v1" - header "google-cloud-video-live_stream-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-video-live_stream-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-video-live_stream-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-video-live_stream-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-video-live_stream-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-video-live_stream-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-video-live_stream-v1/gapic_metadata.json deleted file mode 100644 index 3b108930e5f2..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/gapic_metadata.json +++ /dev/null @@ -1,188 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.video.livestream.v1", - "libraryPackage": "::Google::Cloud::Video::LiveStream::V1", - "services": { - "LivestreamService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client", - "rpcs": { - "CreateChannel": { - "methods": [ - "create_channel" - ] - }, - "ListChannels": { - "methods": [ - "list_channels" - ] - }, - "GetChannel": { - "methods": [ - "get_channel" - ] - }, - "DeleteChannel": { - "methods": [ - "delete_channel" - ] - }, - "UpdateChannel": { - "methods": [ - "update_channel" - ] - }, - "StartChannel": { - "methods": [ - "start_channel" - ] - }, - "StopChannel": { - "methods": [ - "stop_channel" - ] - }, - "StartDistribution": { - "methods": [ - "start_distribution" - ] - }, - "StopDistribution": { - "methods": [ - "stop_distribution" - ] - }, - "CreateInput": { - "methods": [ - "create_input" - ] - }, - "ListInputs": { - "methods": [ - "list_inputs" - ] - }, - "GetInput": { - "methods": [ - "get_input" - ] - }, - "DeleteInput": { - "methods": [ - "delete_input" - ] - }, - "UpdateInput": { - "methods": [ - "update_input" - ] - }, - "PreviewInput": { - "methods": [ - "preview_input" - ] - }, - "CreateEvent": { - "methods": [ - "create_event" - ] - }, - "ListEvents": { - "methods": [ - "list_events" - ] - }, - "GetEvent": { - "methods": [ - "get_event" - ] - }, - "DeleteEvent": { - "methods": [ - "delete_event" - ] - }, - "ListClips": { - "methods": [ - "list_clips" - ] - }, - "GetClip": { - "methods": [ - "get_clip" - ] - }, - "CreateClip": { - "methods": [ - "create_clip" - ] - }, - "DeleteClip": { - "methods": [ - "delete_clip" - ] - }, - "CreateDvrSession": { - "methods": [ - "create_dvr_session" - ] - }, - "ListDvrSessions": { - "methods": [ - "list_dvr_sessions" - ] - }, - "GetDvrSession": { - "methods": [ - "get_dvr_session" - ] - }, - "DeleteDvrSession": { - "methods": [ - "delete_dvr_session" - ] - }, - "UpdateDvrSession": { - "methods": [ - "update_dvr_session" - ] - }, - "CreateAsset": { - "methods": [ - "create_asset" - ] - }, - "DeleteAsset": { - "methods": [ - "delete_asset" - ] - }, - "GetAsset": { - "methods": [ - "get_asset" - ] - }, - "ListAssets": { - "methods": [ - "list_assets" - ] - }, - "GetPool": { - "methods": [ - "get_pool" - ] - }, - "UpdatePool": { - "methods": [ - "update_pool" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/google-cloud-video-live_stream-v1.gemspec b/owl-bot-staging/google-cloud-video-live_stream-v1/google-cloud-video-live_stream-v1.gemspec deleted file mode 100644 index ecdca90c5349..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/google-cloud-video-live_stream-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/video/live_stream/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-video-live_stream-v1" - gem.version = Google::Cloud::Video::LiveStream::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The Live Stream API transcodes mezzanine live signals into direct-to-consumer streaming formats, including Dynamic Adaptive Streaming over HTTP (DASH/MPEG-DASH), and HTTP Live Streaming (HLS), for multiple device platforms. Note that google-cloud-video-live_stream-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video-live_stream instead. See the readme for more details." - gem.summary = "API Client library for the Live Stream 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.2" - - 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-video-live_stream-v1/lib/google-cloud-video-live_stream-v1.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google-cloud-video-live_stream-v1.rb deleted file mode 100644 index 581cf388ce2b..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google-cloud-video-live_stream-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/video/live_stream/v1" diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1.rb deleted file mode 100644 index 49926cffb929..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/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/video/live_stream/v1/livestream_service" -require "google/cloud/video/live_stream/v1/version" - -module Google - module Cloud - module Video - module LiveStream - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/video/live_stream/v1" - # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/video/live_stream/v1" - # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/video/live_stream/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/bindings_override.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/bindings_override.rb deleted file mode 100644 index b9059d78ec3f..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/bindings_override.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! - -require "gapic/rest" - -module Google - module Cloud - module Video - module LiveStream - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/video/live_stream/v1/rest" - # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Video", "LiveStream"] - 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 -end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service.rb deleted file mode 100644 index a24205f13b01..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/video/live_stream/v1/version" - -require "google/cloud/video/live_stream/v1/livestream_service/credentials" -require "google/cloud/video/live_stream/v1/livestream_service/paths" -require "google/cloud/video/live_stream/v1/livestream_service/operations" -require "google/cloud/video/live_stream/v1/livestream_service/client" -require "google/cloud/video/live_stream/v1/livestream_service/rest" - -module Google - module Cloud - module Video - module LiveStream - module V1 - ## - # Using Live Stream API, you can generate live streams in the various - # renditions and streaming formats. The streaming format include HTTP Live - # Streaming (HLS) and Dynamic Adaptive Streaming over HTTP (DASH). You can send - # a source stream in the various ways, including Real-Time Messaging - # Protocol (RTMP) and Secure Reliable Transport (SRT). - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/video/live_stream/v1/livestream_service" - # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/video/live_stream/v1/livestream_service/rest" - # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - module LivestreamService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "livestream_service", "helpers.rb" -require "google/cloud/video/live_stream/v1/livestream_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/client.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/client.rb deleted file mode 100644 index 06812729aaca..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/client.rb +++ /dev/null @@ -1,4350 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/video/livestream/v1/service_pb" -require "google/cloud/location" - -module Google - module Cloud - module Video - module LiveStream - module V1 - module LivestreamService - ## - # Client for the LivestreamService service. - # - # Using Live Stream API, you can generate live streams in the various - # renditions and streaming formats. The streaming format include HTTP Live - # Streaming (HLS) and Dynamic Adaptive Streaming over HTTP (DASH). You can send - # a source stream in the various ways, including Real-Time Messaging - # Protocol (RTMP) and Secure Reliable Transport (SRT). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "livestream.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :livestream_service_stub - - ## - # Configure the LivestreamService Client class. - # - # See {::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LivestreamService clients - # ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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", "Video", "LiveStream", "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_channel.timeout = 60.0 - - default_config.rpcs.list_channels.timeout = 60.0 - default_config.rpcs.list_channels.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_channel.timeout = 60.0 - default_config.rpcs.get_channel.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_channel.timeout = 60.0 - - default_config.rpcs.update_channel.timeout = 60.0 - - default_config.rpcs.start_channel.timeout = 60.0 - - default_config.rpcs.stop_channel.timeout = 60.0 - - default_config.rpcs.start_distribution.timeout = 60.0 - - default_config.rpcs.stop_distribution.timeout = 60.0 - - default_config.rpcs.create_input.timeout = 60.0 - - default_config.rpcs.list_inputs.timeout = 60.0 - default_config.rpcs.list_inputs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_input.timeout = 60.0 - default_config.rpcs.get_input.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_input.timeout = 60.0 - - default_config.rpcs.update_input.timeout = 60.0 - - default_config.rpcs.preview_input.timeout = 60.0 - - default_config.rpcs.create_event.timeout = 60.0 - - default_config.rpcs.list_events.timeout = 60.0 - default_config.rpcs.list_events.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_event.timeout = 60.0 - default_config.rpcs.get_event.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_event.timeout = 60.0 - - default_config.rpcs.list_clips.timeout = 60.0 - default_config.rpcs.list_clips.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_clip.timeout = 60.0 - default_config.rpcs.get_clip.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_clip.timeout = 60.0 - - default_config.rpcs.delete_clip.timeout = 60.0 - - default_config.rpcs.create_dvr_session.timeout = 60.0 - - default_config.rpcs.list_dvr_sessions.timeout = 60.0 - default_config.rpcs.list_dvr_sessions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_dvr_session.timeout = 60.0 - default_config.rpcs.get_dvr_session.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_dvr_session.timeout = 60.0 - - default_config.rpcs.update_dvr_session.timeout = 60.0 - - default_config.rpcs.create_asset.timeout = 60.0 - - default_config.rpcs.delete_asset.timeout = 60.0 - - default_config.rpcs.get_asset.timeout = 60.0 - default_config.rpcs.get_asset.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_assets.timeout = 60.0 - default_config.rpcs.list_assets.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_pool.timeout = 60.0 - default_config.rpcs.get_pool.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_pool.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LivestreamService 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::Video::LiveStream::V1::LivestreamService::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 - @livestream_service_stub.universe_domain - end - - ## - # Create a new LivestreamService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LivestreamService 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/video/livestream/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 - - @livestream_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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 - ) - - @livestream_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 = @livestream_service_stub.endpoint - config.universe_domain = @livestream_service_stub.universe_domain - config.logger = @livestream_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Video::LiveStream::V1::LivestreamService::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 - @livestream_service_stub.logger - end - - # Service calls - - ## - # Creates a channel with the provided unique ID in the specified - # region. - # - # @overload create_channel(request, options = nil) - # Pass arguments to `create_channel` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::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, request_id: 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 location for the resource, in the form of: - # `projects/{project}/locations/{location}`. - # @param channel [::Google::Cloud::Video::LiveStream::V1::Channel, ::Hash] - # Required. The channel resource to be created. - # @param channel_id [::String] - # Required. The ID of the channel resource to be created. - # - # This value must be 1-63 characters, begin and end with a lower-case letter - # or a number, and consist of only lower-case letters, numbers, and hyphens. - # In other words, it must match the following regex: - # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @param request_id [::String] - # A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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 - - @livestream_service_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 - - ## - # Returns a list of all channels in the specified region. - # - # @overload list_channels(request, options = nil) - # Pass arguments to `list_channels` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::ListChannelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::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, filter: 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 location for the resource, in the form of: - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # The maximum number of items to return. If unspecified, server - # will pick an appropriate default. Server may return fewer items than - # requested. A caller should only rely on response's - # {::Google::Cloud::Video::LiveStream::V1::ListChannelsResponse#next_page_token next_page_token} - # to determine if there are more items left to be queried. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # @param filter [::String] - # The filter to apply to list results. - # @param order_by [::String] - # Specifies the ordering of results following syntax at - # https://cloud.google.com/apis/design/design_patterns#sorting_order. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Channel>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Channel>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_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 - - @livestream_service_stub.call_rpc :list_channels, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @livestream_service_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 - - ## - # Returns the specified channel. - # - # @overload get_channel(request, options = nil) - # Pass arguments to `get_channel` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::GetChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::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 resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Video::LiveStream::V1::Channel] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::Channel] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::GetChannelRequest.new - # - # # Call the get_channel method. - # result = client.get_channel request - # - # # The returned object is of type Google::Cloud::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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 - - @livestream_service_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 - - ## - # Deletes the specified channel. - # - # @overload delete_channel(request, options = nil) - # Pass arguments to `delete_channel` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::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, request_id: nil, force: 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 resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @param request_id [::String] - # A 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)`. - # @param force [::Boolean] - # If the `force` field is set to the default value of `false`, you must - # delete all of a channel's events before you can delete the channel itself. - # If the field is set to `true`, requests to delete a channel also delete - # associated channel events. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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 - - @livestream_service_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 - - ## - # Updates the specified channel. - # - # @overload update_channel(request, options = nil) - # Pass arguments to `update_channel` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::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(update_mask: nil, channel: nil, request_id: 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Field mask is used to specify the fields to be overwritten in the Channel - # resource by the update. You can only update the following fields: - # - # * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) - # * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) - # * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) - # * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) - # * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) - # * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) - # * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) - # * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) - # * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) - # * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) - # - # 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 mask is not present, then each field from the list above is updated - # if the field appears in the request payload. To unset a field, add the - # field to the update mask and remove it from the request payload. - # @param channel [::Google::Cloud::Video::LiveStream::V1::Channel, ::Hash] - # Required. The channel resource to be updated. - # @param request_id [::String] - # A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::V1::VERSION - metadata[:"x-goog-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 - - @livestream_service_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 - - ## - # Starts the specified channel. Part of the video pipeline will be created - # only when the StartChannel request is received by the server. - # - # @overload start_channel(request, options = nil) - # Pass arguments to `start_channel` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::StartChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::StartChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload start_channel(name: nil, request_id: nil) - # Pass arguments to `start_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 resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @param request_id [::String] - # A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::StartChannelRequest.new - # - # # Call the start_channel method. - # result = client.start_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 start_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::StartChannelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.start_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::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.start_channel.timeout, - metadata: metadata, - retry_policy: @config.rpcs.start_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :start_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 - - ## - # Stops the specified channel. Part of the video pipeline will be released - # when the StopChannel request is received by the server. - # - # @overload stop_channel(request, options = nil) - # Pass arguments to `stop_channel` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::StopChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::StopChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload stop_channel(name: nil, request_id: nil) - # Pass arguments to `stop_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 resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @param request_id [::String] - # A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::StopChannelRequest.new - # - # # Call the stop_channel method. - # result = client.stop_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 stop_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::StopChannelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.stop_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::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.stop_channel.timeout, - metadata: metadata, - retry_policy: @config.rpcs.stop_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :stop_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 - - ## - # Starts distribution which delivers outputs to the destination indicated by - # the Distribution configuration. - # - # @overload start_distribution(request, options = nil) - # Pass arguments to `start_distribution` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload start_distribution(name: nil, distribution_keys: nil, request_id: nil) - # Pass arguments to `start_distribution` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @param distribution_keys [::Array<::String>] - # Optional. A list of keys to identify the distribution configuration in the - # channel resource. If left empty, all the distributions in the channel - # specification will be started. - # @param request_id [::String] - # Optional. A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::StartDistributionRequest.new - # - # # Call the start_distribution method. - # result = client.start_distribution request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def start_distribution request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.start_distribution.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.start_distribution.timeout, - metadata: metadata, - retry_policy: @config.rpcs.start_distribution.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :start_distribution, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Stops the specified distribution. - # - # @overload stop_distribution(request, options = nil) - # Pass arguments to `stop_distribution` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload stop_distribution(name: nil, distribution_keys: nil, request_id: nil) - # Pass arguments to `stop_distribution` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @param distribution_keys [::Array<::String>] - # Optional. A list of key to identify the distribution configuration in the - # channel resource. If left empty, all the distributions in the channel - # specification will be stopped. - # @param request_id [::String] - # Optional. A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::StopDistributionRequest.new - # - # # Call the stop_distribution method. - # result = client.stop_distribution request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def stop_distribution request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.stop_distribution.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.stop_distribution.timeout, - metadata: metadata, - retry_policy: @config.rpcs.stop_distribution.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :stop_distribution, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 an input with the provided unique ID in the specified region. - # - # @overload create_input(request, options = nil) - # Pass arguments to `create_input` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::CreateInputRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::CreateInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_input(parent: nil, input: nil, input_id: nil, request_id: nil) - # Pass arguments to `create_input` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 location for the resource, in the form of: - # `projects/{project}/locations/{location}`. - # @param input [::Google::Cloud::Video::LiveStream::V1::Input, ::Hash] - # Required. The input resource to be created. - # @param input_id [::String] - # Required. The ID of the input resource to be created. - # - # This value must be 1-63 characters, begin and end with a lower-case letter - # or a number, and consist of only lower-case letters, numbers, and hyphens. - # In other words, it must match the following regex: - # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @param request_id [::String] - # A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::CreateInputRequest.new - # - # # Call the create_input method. - # result = client.create_input request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateInputRequest - - # Converts hash and nil to 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_input.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_input.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :create_input, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 list of all inputs in the specified region. - # - # @overload list_inputs(request, options = nil) - # Pass arguments to `list_inputs` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::ListInputsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::ListInputsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_inputs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_inputs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 location for the resource, in the form of: - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # The maximum number of items to return. If unspecified, server - # will pick an appropriate default. Server may return fewer items than - # requested. A caller should only rely on response's - # {::Google::Cloud::Video::LiveStream::V1::ListInputsResponse#next_page_token next_page_token} - # to determine if there are more items left to be queried. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # @param filter [::String] - # The filter to apply to list results. - # @param order_by [::String] - # Specifies the ordering of results following syntax at [Sorting - # Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Input>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Input>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::ListInputsRequest.new - # - # # Call the list_inputs method. - # result = client.list_inputs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Input. - # p item - # end - # - def list_inputs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListInputsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_inputs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_inputs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_inputs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :list_inputs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @livestream_service_stub, :list_inputs, 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 the specified input. - # - # @overload get_input(request, options = nil) - # Pass arguments to `get_input` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::GetInputRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::GetInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_input(name: nil) - # Pass arguments to `get_input` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 input resource, in the form of: - # `projects/{project}/locations/{location}/inputs/{inputId}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Video::LiveStream::V1::Input] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::Input] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::GetInputRequest.new - # - # # Call the get_input method. - # result = client.get_input request - # - # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Input. - # p result - # - def get_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_input.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_input.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :get_input, request, 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 the specified input. - # - # @overload delete_input(request, options = nil) - # Pass arguments to `delete_input` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_input(name: nil, request_id: nil) - # Pass arguments to `delete_input` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 input resource, in the form of: - # `projects/{project}/locations/{location}/inputs/{inputId}`. - # @param request_id [::String] - # A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::DeleteInputRequest.new - # - # # Call the delete_input method. - # result = client.delete_input request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest - - # Converts hash and nil to 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_input.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_input.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :delete_input, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 specified input. - # - # @overload update_input(request, options = nil) - # Pass arguments to `update_input` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_input(update_mask: nil, input: nil, request_id: nil) - # Pass arguments to `update_input` via keyword arguments. Note that at - # least one keyword argument is 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] - # Field mask is used to specify the fields to be overwritten in the Input - # resource by the update. You can only update the following fields: - # - # * [`tier`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#Tier) - # * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) - # * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) - # - # 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 mask is not present, then each field from the list above is updated - # if the field appears in the request payload. To unset a field, add the - # field to the update mask and remove it from the request payload. - # @param input [::Google::Cloud::Video::LiveStream::V1::Input, ::Hash] - # Required. The input resource to be updated. - # @param request_id [::String] - # A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::UpdateInputRequest.new - # - # # Call the update_input method. - # result = client.update_input request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest - - # Converts hash and nil to 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_input.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.input&.name - header_params["input.name"] = request.input.name - end - - request_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_input.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :update_input, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Preview the streaming content of the specified input. - # - # @overload preview_input(request, options = nil) - # Pass arguments to `preview_input` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload preview_input(name: nil) - # Pass arguments to `preview_input` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 input resource, in the form of: - # `projects/{project}/locations/{location}/inputs/{inputId}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Video::LiveStream::V1::PreviewInputResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::PreviewInputResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::PreviewInputRequest.new - # - # # Call the preview_input method. - # result = client.preview_input request - # - # # The returned object is of type Google::Cloud::Video::LiveStream::V1::PreviewInputResponse. - # p result - # - def preview_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.preview_input.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.preview_input.timeout, - metadata: metadata, - retry_policy: @config.rpcs.preview_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :preview_input, request, 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 event with the provided unique ID in the specified channel. - # - # @overload create_event(request, options = nil) - # Pass arguments to `create_event` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::CreateEventRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::CreateEventRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_event(parent: nil, event: nil, event_id: nil, request_id: nil) - # Pass arguments to `create_event` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 channel for the resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @param event [::Google::Cloud::Video::LiveStream::V1::Event, ::Hash] - # Required. The event resource to be created. - # @param event_id [::String] - # Required. The ID of the event resource to be created. - # - # This value must be 1-63 characters, begin and end with a lower-case letter - # or a number, and consist of only lower-case letters, numbers, and hyphens. - # In other words, it must match the following regex: - # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @param request_id [::String] - # A 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 [::Google::Cloud::Video::LiveStream::V1::Event] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::Event] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::CreateEventRequest.new - # - # # Call the create_event method. - # result = client.create_event request - # - # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Event. - # p result - # - def create_event request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateEventRequest - - # Converts hash and nil to 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_event.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_event.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_event.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :create_event, request, 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 all events in the specified channel. - # - # @overload list_events(request, options = nil) - # Pass arguments to `list_events` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::ListEventsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::ListEventsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_events(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_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 parent [::String] - # Required. The parent channel for the resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @param page_size [::Integer] - # The maximum number of items to return. If unspecified, server - # will pick an appropriate default. Server may return fewer items than - # requested. A caller should only rely on response's - # {::Google::Cloud::Video::LiveStream::V1::ListEventsResponse#next_page_token next_page_token} - # to determine if there are more items left to be queried. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # @param filter [::String] - # The filter to apply to list results. - # @param order_by [::String] - # Specifies the ordering of results following syntax at - # https://cloud.google.com/apis/design/design_patterns#sorting_order. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Event>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Event>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::ListEventsRequest.new - # - # # Call the list_events method. - # result = client.list_events request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Event. - # p item - # end - # - def list_events request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListEventsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_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::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_events.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_events.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :list_events, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @livestream_service_stub, :list_events, 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 the specified event. - # - # @overload get_event(request, options = nil) - # Pass arguments to `get_event` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::GetEventRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::GetEventRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_event(name: nil) - # Pass arguments to `get_event` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 event resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Video::LiveStream::V1::Event] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::Event] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::GetEventRequest.new - # - # # Call the get_event method. - # result = client.get_event request - # - # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Event. - # p result - # - def get_event request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetEventRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_event.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_event.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_event.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :get_event, request, 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 the specified event. - # - # @overload delete_event(request, options = nil) - # Pass arguments to `delete_event` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_event(name: nil, request_id: nil) - # Pass arguments to `delete_event` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 event resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - # @param request_id [::String] - # A 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 [::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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::DeleteEventRequest.new - # - # # Call the delete_event method. - # result = client.delete_event request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_event request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest - - # Converts hash and nil to 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_event.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_event.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_event.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :delete_event, request, 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 all clips in the specified channel. - # - # @overload list_clips(request, options = nil) - # Pass arguments to `list_clips` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::ListClipsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::ListClipsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_clips(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_clips` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListClipsRequest - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filtering results - # @param order_by [::String] - # Hint for how to order the results - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Clip>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Clip>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::ListClipsRequest.new - # - # # Call the list_clips method. - # result = client.list_clips request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Clip. - # p item - # end - # - def list_clips request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListClipsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_clips.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_clips.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_clips.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :list_clips, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @livestream_service_stub, :list_clips, 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 the specified clip. - # - # @overload get_clip(request, options = nil) - # Pass arguments to `get_clip` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::GetClipRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::GetClipRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_clip(name: nil) - # Pass arguments to `get_clip` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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, in the following form: - # `projects/{project}/locations/{location}/channels/{channel}/clips/{clip}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Video::LiveStream::V1::Clip] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::Clip] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::GetClipRequest.new - # - # # Call the get_clip method. - # result = client.get_clip request - # - # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Clip. - # p result - # - def get_clip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetClipRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_clip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_clip.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_clip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :get_clip, request, 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 clip with the provided clip ID in the specified channel. - # - # @overload create_clip(request, options = nil) - # Pass arguments to `create_clip` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::CreateClipRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::CreateClipRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_clip(parent: nil, clip_id: nil, clip: nil, request_id: nil) - # Pass arguments to `create_clip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 following form: - # `projects/{project}/locations/{location}/channels/{channel}`. - # @param clip_id [::String] - # Required. The ID of the clip resource to be created. - # - # This value must be 1-63 characters, begin and end with a lower-case letter - # or a number, and consist of only lower-case letters, numbers, and hyphens. - # In other words, it must match the following regex: - # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @param clip [::Google::Cloud::Video::LiveStream::V1::Clip, ::Hash] - # Required. The resource being 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::CreateClipRequest.new - # - # # Call the create_clip method. - # result = client.create_clip request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_clip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateClipRequest - - # Converts hash and nil to 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_clip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_clip.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_clip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :create_clip, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 the specified clip job resource. This method only deletes the clip - # job and does not delete the VOD clip stored in Cloud Storage. - # - # @overload delete_clip(request, options = nil) - # Pass arguments to `delete_clip` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_clip(name: nil, request_id: nil) - # Pass arguments to `delete_clip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 clip resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`. - # @param request_id [::String] - # Optional. A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::DeleteClipRequest.new - # - # # Call the delete_clip method. - # result = client.delete_clip request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_clip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest - - # Converts hash and nil to 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_clip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_clip.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_clip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :delete_clip, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 DVR session with the provided unique ID in the specified channel. - # - # @overload create_dvr_session(request, options = nil) - # Pass arguments to `create_dvr_session` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_dvr_session(parent: nil, dvr_session_id: nil, dvr_session: nil, request_id: nil) - # Pass arguments to `create_dvr_session` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 following form: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @param dvr_session_id [::String] - # Required. The ID of the DVR session resource to be created. - # - # This value must be 1-63 characters, begin and end with a lower-case letter - # or a number, and consist of only lower-case letters, numbers, and hyphens. - # In other words, it must match the following regex: - # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @param dvr_session [::Google::Cloud::Video::LiveStream::V1::DvrSession, ::Hash] - # Required. The resource being 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest.new - # - # # Call the create_dvr_session method. - # result = client.create_dvr_session request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_dvr_session request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest - - # Converts hash and nil to 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_dvr_session.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_dvr_session.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_dvr_session.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :create_dvr_session, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 list of all DVR sessions in the specified channel. - # - # @overload list_dvr_sessions(request, options = nil) - # Pass arguments to `list_dvr_sessions` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_dvr_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_dvr_sessions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListDvrSessionsRequest - # @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 results - # @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::Video::LiveStream::V1::DvrSession>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::DvrSession>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest.new - # - # # Call the list_dvr_sessions method. - # result = client.list_dvr_sessions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::DvrSession. - # p item - # end - # - def list_dvr_sessions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_dvr_sessions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_dvr_sessions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_dvr_sessions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :list_dvr_sessions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @livestream_service_stub, :list_dvr_sessions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the specified DVR session. - # - # @overload get_dvr_session(request, options = nil) - # Pass arguments to `get_dvr_session` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_dvr_session(name: nil) - # Pass arguments to `get_dvr_session` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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, in the following form: - # `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Video::LiveStream::V1::DvrSession] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::DvrSession] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest.new - # - # # Call the get_dvr_session method. - # result = client.get_dvr_session request - # - # # The returned object is of type Google::Cloud::Video::LiveStream::V1::DvrSession. - # p result - # - def get_dvr_session request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_dvr_session.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_dvr_session.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_dvr_session.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :get_dvr_session, request, 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 the specified DVR session. - # - # @overload delete_dvr_session(request, options = nil) - # Pass arguments to `delete_dvr_session` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_dvr_session(name: nil, request_id: nil) - # Pass arguments to `delete_dvr_session` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 event resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`. - # @param request_id [::String] - # Optional. A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest.new - # - # # Call the delete_dvr_session method. - # result = client.delete_dvr_session request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_dvr_session request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest - - # Converts hash and nil to 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_dvr_session.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_dvr_session.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_dvr_session.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :delete_dvr_session, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 specified DVR session. - # - # @overload update_dvr_session(request, options = nil) - # Pass arguments to `update_dvr_session` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_dvr_session(update_mask: nil, dvr_session: nil, request_id: nil) - # Pass arguments to `update_dvr_session` via keyword arguments. Note that at - # least one keyword argument is 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. Field mask is used to specify the fields to be overwritten in the - # DvrSession resource by the update. You can only update the following - # fields: - # - # * `dvrWindows` - # - # 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. - # @param dvr_session [::Google::Cloud::Video::LiveStream::V1::DvrSession, ::Hash] - # Required. The DVR session resource to be updated. - # @param request_id [::String] - # Optional. A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest.new - # - # # Call the update_dvr_session method. - # result = client.update_dvr_session request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_dvr_session request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest - - # Converts hash and nil to 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_dvr_session.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.dvr_session&.name - header_params["dvr_session.name"] = request.dvr_session.name - end - - request_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_dvr_session.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_dvr_session.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :update_dvr_session, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 Asset with the provided unique ID in the specified - # region. - # - # @overload create_asset(request, options = nil) - # Pass arguments to `create_asset` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_asset(parent: nil, asset: nil, asset_id: nil, request_id: nil) - # Pass arguments to `create_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent location for the resource, in the form of: - # `projects/{project}/locations/{location}`. - # @param asset [::Google::Cloud::Video::LiveStream::V1::Asset, ::Hash] - # Required. The asset resource to be created. - # @param asset_id [::String] - # Required. The ID of the asset resource to be created. - # - # This value must be 1-63 characters, begin and end with a lower-case letter - # or a number, and consist of only lower-case letters, numbers, and hyphens. - # In other words, it must match the following regex: - # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @param request_id [::String] - # A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::CreateAssetRequest.new - # - # # Call the create_asset method. - # result = client.create_asset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_asset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_asset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :create_asset, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified asset if it is not used. - # - # @overload delete_asset(request, options = nil) - # Pass arguments to `delete_asset` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_asset(name: nil, request_id: nil) - # Pass arguments to `delete_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the asset resource, in the form of: - # `projects/{project}/locations/{location}/assets/{assetId}`. - # @param request_id [::String] - # A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest.new - # - # # Call the delete_asset method. - # result = client.delete_asset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_asset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_asset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :delete_asset, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the specified asset. - # - # @overload get_asset(request, options = nil) - # Pass arguments to `get_asset` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::GetAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::GetAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_asset(name: nil) - # Pass arguments to `get_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource, in the following form: - # `projects/{project}/locations/{location}/assets/{asset}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Video::LiveStream::V1::Asset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::Asset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::GetAssetRequest.new - # - # # Call the get_asset method. - # result = client.get_asset request - # - # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Asset. - # p result - # - def get_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_asset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_asset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :get_asset, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of all assets in the specified region. - # - # @overload list_assets(request, options = nil) - # Pass arguments to `list_assets` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent location for the resource, in the form of: - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filtering results - # @param order_by [::String] - # Hint for how to order the results - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Asset>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Asset>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::ListAssetsRequest.new - # - # # Call the list_assets method. - # result = client.list_assets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Asset. - # p item - # end - # - def list_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_assets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_assets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :list_assets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @livestream_service_stub, :list_assets, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the specified pool. - # - # @overload get_pool(request, options = nil) - # Pass arguments to `get_pool` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::GetPoolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::GetPoolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_pool(name: nil) - # Pass arguments to `get_pool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 pool resource, in the form of: - # `projects/{project}/locations/{location}/pools/{poolId}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Video::LiveStream::V1::Pool] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::Pool] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::GetPoolRequest.new - # - # # Call the get_pool method. - # result = client.get_pool request - # - # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Pool. - # p result - # - def get_pool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetPoolRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_pool.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_pool.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_pool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :get_pool, request, 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 the specified pool. - # - # @overload update_pool(request, options = nil) - # Pass arguments to `update_pool` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_pool(update_mask: nil, pool: nil, request_id: nil) - # Pass arguments to `update_pool` via keyword arguments. Note that at - # least one keyword argument is 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] - # Field mask is used to specify the fields to be overwritten in the Pool - # resource by the update. You can only update the following fields: - # - # * `networkConfig` - # - # 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. - # @param pool [::Google::Cloud::Video::LiveStream::V1::Pool, ::Hash] - # Required. The pool resource to be updated. - # @param request_id [::String] - # A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest.new - # - # # Call the update_pool method. - # result = client.update_pool request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_pool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest - - # Converts hash and nil to 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_pool.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.pool&.name - header_params["pool.name"] = request.pool.name - end - - request_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_pool.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_pool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.call_rpc :update_pool, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 LivestreamService API. - # - # This class represents the configuration for LivestreamService, - # 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::Video::LiveStream::V1::LivestreamService::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_channel to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_channel.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_channel.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::Video::LiveStream::V1::LivestreamService::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 = "livestream.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 LivestreamService 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_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :create_channel - ## - # RPC-specific configuration for `list_channels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_channels - ## - # RPC-specific configuration for `get_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :get_channel - ## - # RPC-specific configuration for `delete_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_channel - ## - # RPC-specific configuration for `update_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :update_channel - ## - # RPC-specific configuration for `start_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :start_channel - ## - # RPC-specific configuration for `stop_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :stop_channel - ## - # RPC-specific configuration for `start_distribution` - # @return [::Gapic::Config::Method] - # - attr_reader :start_distribution - ## - # RPC-specific configuration for `stop_distribution` - # @return [::Gapic::Config::Method] - # - attr_reader :stop_distribution - ## - # RPC-specific configuration for `create_input` - # @return [::Gapic::Config::Method] - # - attr_reader :create_input - ## - # RPC-specific configuration for `list_inputs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_inputs - ## - # RPC-specific configuration for `get_input` - # @return [::Gapic::Config::Method] - # - attr_reader :get_input - ## - # RPC-specific configuration for `delete_input` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_input - ## - # RPC-specific configuration for `update_input` - # @return [::Gapic::Config::Method] - # - attr_reader :update_input - ## - # RPC-specific configuration for `preview_input` - # @return [::Gapic::Config::Method] - # - attr_reader :preview_input - ## - # RPC-specific configuration for `create_event` - # @return [::Gapic::Config::Method] - # - attr_reader :create_event - ## - # RPC-specific configuration for `list_events` - # @return [::Gapic::Config::Method] - # - attr_reader :list_events - ## - # RPC-specific configuration for `get_event` - # @return [::Gapic::Config::Method] - # - attr_reader :get_event - ## - # RPC-specific configuration for `delete_event` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_event - ## - # RPC-specific configuration for `list_clips` - # @return [::Gapic::Config::Method] - # - attr_reader :list_clips - ## - # RPC-specific configuration for `get_clip` - # @return [::Gapic::Config::Method] - # - attr_reader :get_clip - ## - # RPC-specific configuration for `create_clip` - # @return [::Gapic::Config::Method] - # - attr_reader :create_clip - ## - # RPC-specific configuration for `delete_clip` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_clip - ## - # RPC-specific configuration for `create_dvr_session` - # @return [::Gapic::Config::Method] - # - attr_reader :create_dvr_session - ## - # RPC-specific configuration for `list_dvr_sessions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_dvr_sessions - ## - # RPC-specific configuration for `get_dvr_session` - # @return [::Gapic::Config::Method] - # - attr_reader :get_dvr_session - ## - # RPC-specific configuration for `delete_dvr_session` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_dvr_session - ## - # RPC-specific configuration for `update_dvr_session` - # @return [::Gapic::Config::Method] - # - attr_reader :update_dvr_session - ## - # RPC-specific configuration for `create_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_asset - ## - # RPC-specific configuration for `delete_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_asset - ## - # RPC-specific configuration for `get_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_asset - ## - # RPC-specific configuration for `list_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_assets - ## - # RPC-specific configuration for `get_pool` - # @return [::Gapic::Config::Method] - # - attr_reader :get_pool - ## - # RPC-specific configuration for `update_pool` - # @return [::Gapic::Config::Method] - # - attr_reader :update_pool - - # @private - def initialize parent_rpcs = nil - create_channel_config = parent_rpcs.create_channel if parent_rpcs.respond_to? :create_channel - @create_channel = ::Gapic::Config::Method.new create_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 - get_channel_config = parent_rpcs.get_channel if parent_rpcs.respond_to? :get_channel - @get_channel = ::Gapic::Config::Method.new get_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 - update_channel_config = parent_rpcs.update_channel if parent_rpcs.respond_to? :update_channel - @update_channel = ::Gapic::Config::Method.new update_channel_config - start_channel_config = parent_rpcs.start_channel if parent_rpcs.respond_to? :start_channel - @start_channel = ::Gapic::Config::Method.new start_channel_config - stop_channel_config = parent_rpcs.stop_channel if parent_rpcs.respond_to? :stop_channel - @stop_channel = ::Gapic::Config::Method.new stop_channel_config - start_distribution_config = parent_rpcs.start_distribution if parent_rpcs.respond_to? :start_distribution - @start_distribution = ::Gapic::Config::Method.new start_distribution_config - stop_distribution_config = parent_rpcs.stop_distribution if parent_rpcs.respond_to? :stop_distribution - @stop_distribution = ::Gapic::Config::Method.new stop_distribution_config - create_input_config = parent_rpcs.create_input if parent_rpcs.respond_to? :create_input - @create_input = ::Gapic::Config::Method.new create_input_config - list_inputs_config = parent_rpcs.list_inputs if parent_rpcs.respond_to? :list_inputs - @list_inputs = ::Gapic::Config::Method.new list_inputs_config - get_input_config = parent_rpcs.get_input if parent_rpcs.respond_to? :get_input - @get_input = ::Gapic::Config::Method.new get_input_config - delete_input_config = parent_rpcs.delete_input if parent_rpcs.respond_to? :delete_input - @delete_input = ::Gapic::Config::Method.new delete_input_config - update_input_config = parent_rpcs.update_input if parent_rpcs.respond_to? :update_input - @update_input = ::Gapic::Config::Method.new update_input_config - preview_input_config = parent_rpcs.preview_input if parent_rpcs.respond_to? :preview_input - @preview_input = ::Gapic::Config::Method.new preview_input_config - create_event_config = parent_rpcs.create_event if parent_rpcs.respond_to? :create_event - @create_event = ::Gapic::Config::Method.new create_event_config - list_events_config = parent_rpcs.list_events if parent_rpcs.respond_to? :list_events - @list_events = ::Gapic::Config::Method.new list_events_config - get_event_config = parent_rpcs.get_event if parent_rpcs.respond_to? :get_event - @get_event = ::Gapic::Config::Method.new get_event_config - delete_event_config = parent_rpcs.delete_event if parent_rpcs.respond_to? :delete_event - @delete_event = ::Gapic::Config::Method.new delete_event_config - list_clips_config = parent_rpcs.list_clips if parent_rpcs.respond_to? :list_clips - @list_clips = ::Gapic::Config::Method.new list_clips_config - get_clip_config = parent_rpcs.get_clip if parent_rpcs.respond_to? :get_clip - @get_clip = ::Gapic::Config::Method.new get_clip_config - create_clip_config = parent_rpcs.create_clip if parent_rpcs.respond_to? :create_clip - @create_clip = ::Gapic::Config::Method.new create_clip_config - delete_clip_config = parent_rpcs.delete_clip if parent_rpcs.respond_to? :delete_clip - @delete_clip = ::Gapic::Config::Method.new delete_clip_config - create_dvr_session_config = parent_rpcs.create_dvr_session if parent_rpcs.respond_to? :create_dvr_session - @create_dvr_session = ::Gapic::Config::Method.new create_dvr_session_config - list_dvr_sessions_config = parent_rpcs.list_dvr_sessions if parent_rpcs.respond_to? :list_dvr_sessions - @list_dvr_sessions = ::Gapic::Config::Method.new list_dvr_sessions_config - get_dvr_session_config = parent_rpcs.get_dvr_session if parent_rpcs.respond_to? :get_dvr_session - @get_dvr_session = ::Gapic::Config::Method.new get_dvr_session_config - delete_dvr_session_config = parent_rpcs.delete_dvr_session if parent_rpcs.respond_to? :delete_dvr_session - @delete_dvr_session = ::Gapic::Config::Method.new delete_dvr_session_config - update_dvr_session_config = parent_rpcs.update_dvr_session if parent_rpcs.respond_to? :update_dvr_session - @update_dvr_session = ::Gapic::Config::Method.new update_dvr_session_config - create_asset_config = parent_rpcs.create_asset if parent_rpcs.respond_to? :create_asset - @create_asset = ::Gapic::Config::Method.new create_asset_config - delete_asset_config = parent_rpcs.delete_asset if parent_rpcs.respond_to? :delete_asset - @delete_asset = ::Gapic::Config::Method.new delete_asset_config - get_asset_config = parent_rpcs.get_asset if parent_rpcs.respond_to? :get_asset - @get_asset = ::Gapic::Config::Method.new get_asset_config - list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets - @list_assets = ::Gapic::Config::Method.new list_assets_config - get_pool_config = parent_rpcs.get_pool if parent_rpcs.respond_to? :get_pool - @get_pool = ::Gapic::Config::Method.new get_pool_config - update_pool_config = parent_rpcs.update_pool if parent_rpcs.respond_to? :update_pool - @update_pool = ::Gapic::Config::Method.new update_pool_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/credentials.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/credentials.rb deleted file mode 100644 index ebdda67ff801..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Video - module LiveStream - module V1 - module LivestreamService - # Credentials for the LivestreamService 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 -end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/operations.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/operations.rb deleted file mode 100644 index dc29b6a405f4..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/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 Video - module LiveStream - module V1 - module LivestreamService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "livestream.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the LivestreamService 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 LivestreamService 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::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Video::LiveStream::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Video::LiveStream::V1::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 = "livestream.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-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/paths.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/paths.rb deleted file mode 100644 index f3bbcf7af848..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/paths.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 Video - module LiveStream - module V1 - module LivestreamService - # Path helper methods for the LivestreamService API. - module Paths - ## - # Create a fully-qualified Asset resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/assets/{asset}` - # - # @param project [String] - # @param location [String] - # @param asset [String] - # - # @return [::String] - def asset_path project:, location:, asset: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/assets/#{asset}" - 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 Clip resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/channels/{channel}/clips/{clip}` - # - # @param project [String] - # @param location [String] - # @param channel [String] - # @param clip [String] - # - # @return [::String] - def clip_path project:, location:, channel:, clip: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "channel cannot contain /" if channel.to_s.include? "/" - - "projects/#{project}/locations/#{location}/channels/#{channel}/clips/#{clip}" - end - - ## - # Create a fully-qualified DvrSession resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/channels/{channel}/dvrSessions/{dvr_session}` - # - # @param project [String] - # @param location [String] - # @param channel [String] - # @param dvr_session [String] - # - # @return [::String] - def dvr_session_path project:, location:, channel:, dvr_session: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "channel cannot contain /" if channel.to_s.include? "/" - - "projects/#{project}/locations/#{location}/channels/#{channel}/dvrSessions/#{dvr_session}" - end - - ## - # Create a fully-qualified Event resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/channels/{channel}/events/{event}` - # - # @param project [String] - # @param location [String] - # @param channel [String] - # @param event [String] - # - # @return [::String] - def event_path project:, location:, channel:, event: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "channel cannot contain /" if channel.to_s.include? "/" - - "projects/#{project}/locations/#{location}/channels/#{channel}/events/#{event}" - end - - ## - # Create a fully-qualified Input resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/inputs/{input}` - # - # @param project [String] - # @param location [String] - # @param input [String] - # - # @return [::String] - def input_path project:, location:, input: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/inputs/#{input}" - 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 Network resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/global/networks/{network}` - # - # @param project [String] - # @param network [String] - # - # @return [::String] - def network_path project:, network: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/global/networks/#{network}" - end - - ## - # Create a fully-qualified Pool resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/pools/{pool}` - # - # @param project [String] - # @param location [String] - # @param pool [String] - # - # @return [::String] - def pool_path project:, location:, 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}/pools/#{pool}" - end - - ## - # Create a fully-qualified SecretVersion resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/secrets/{secret}/versions/{version}` - # - # @param project [String] - # @param secret [String] - # @param version [String] - # - # @return [::String] - def secret_version_path project:, secret:, version: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" - - "projects/#{project}/secrets/#{secret}/versions/#{version}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest.rb deleted file mode 100644 index 54fae79a7d2a..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/video/live_stream/v1/version" -require "google/cloud/video/live_stream/v1/bindings_override" - -require "google/cloud/video/live_stream/v1/livestream_service/credentials" -require "google/cloud/video/live_stream/v1/livestream_service/paths" -require "google/cloud/video/live_stream/v1/livestream_service/rest/operations" -require "google/cloud/video/live_stream/v1/livestream_service/rest/client" - -module Google - module Cloud - module Video - module LiveStream - module V1 - ## - # Using Live Stream API, you can generate live streams in the various - # renditions and streaming formats. The streaming format include HTTP Live - # Streaming (HLS) and Dynamic Adaptive Streaming over HTTP (DASH). You can send - # a source stream in the various ways, including Real-Time Messaging - # Protocol (RTMP) and Secure Reliable Transport (SRT). - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/video/live_stream/v1/livestream_service/rest" - # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - module LivestreamService - # 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/video/live_stream/v1/livestream_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest/client.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest/client.rb deleted file mode 100644 index 6704ac62a245..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest/client.rb +++ /dev/null @@ -1,4077 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/video/livestream/v1/service_pb" -require "google/cloud/video/live_stream/v1/livestream_service/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module Video - module LiveStream - module V1 - module LivestreamService - module Rest - ## - # REST client for the LivestreamService service. - # - # Using Live Stream API, you can generate live streams in the various - # renditions and streaming formats. The streaming format include HTTP Live - # Streaming (HLS) and Dynamic Adaptive Streaming over HTTP (DASH). You can send - # a source stream in the various ways, including Real-Time Messaging - # Protocol (RTMP) and Secure Reliable Transport (SRT). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "livestream.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :livestream_service_stub - - ## - # Configure the LivestreamService Client class. - # - # See {::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LivestreamService clients - # ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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", "Video", "LiveStream", "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_channel.timeout = 60.0 - - default_config.rpcs.list_channels.timeout = 60.0 - default_config.rpcs.list_channels.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_channel.timeout = 60.0 - default_config.rpcs.get_channel.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_channel.timeout = 60.0 - - default_config.rpcs.update_channel.timeout = 60.0 - - default_config.rpcs.start_channel.timeout = 60.0 - - default_config.rpcs.stop_channel.timeout = 60.0 - - default_config.rpcs.start_distribution.timeout = 60.0 - - default_config.rpcs.stop_distribution.timeout = 60.0 - - default_config.rpcs.create_input.timeout = 60.0 - - default_config.rpcs.list_inputs.timeout = 60.0 - default_config.rpcs.list_inputs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_input.timeout = 60.0 - default_config.rpcs.get_input.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_input.timeout = 60.0 - - default_config.rpcs.update_input.timeout = 60.0 - - default_config.rpcs.preview_input.timeout = 60.0 - - default_config.rpcs.create_event.timeout = 60.0 - - default_config.rpcs.list_events.timeout = 60.0 - default_config.rpcs.list_events.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_event.timeout = 60.0 - default_config.rpcs.get_event.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_event.timeout = 60.0 - - default_config.rpcs.list_clips.timeout = 60.0 - default_config.rpcs.list_clips.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_clip.timeout = 60.0 - default_config.rpcs.get_clip.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_clip.timeout = 60.0 - - default_config.rpcs.delete_clip.timeout = 60.0 - - default_config.rpcs.create_dvr_session.timeout = 60.0 - - default_config.rpcs.list_dvr_sessions.timeout = 60.0 - default_config.rpcs.list_dvr_sessions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_dvr_session.timeout = 60.0 - default_config.rpcs.get_dvr_session.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_dvr_session.timeout = 60.0 - - default_config.rpcs.update_dvr_session.timeout = 60.0 - - default_config.rpcs.create_asset.timeout = 60.0 - - default_config.rpcs.delete_asset.timeout = 60.0 - - default_config.rpcs.get_asset.timeout = 60.0 - default_config.rpcs.get_asset.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_assets.timeout = 60.0 - default_config.rpcs.list_assets.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_pool.timeout = 60.0 - default_config.rpcs.get_pool.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_pool.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LivestreamService 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::Video::LiveStream::V1::LivestreamService::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 - @livestream_service_stub.universe_domain - end - - ## - # Create a new LivestreamService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LivestreamService 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::Video::LiveStream::V1::LivestreamService::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 - - @livestream_service_stub = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @livestream_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 = @livestream_service_stub.endpoint - config.universe_domain = @livestream_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @livestream_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Video::LiveStream::V1::LivestreamService::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 - @livestream_service_stub.logger - end - - # Service calls - - ## - # Creates a channel with the provided unique ID in the specified - # region. - # - # @overload create_channel(request, options = nil) - # Pass arguments to `create_channel` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::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, request_id: 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 location for the resource, in the form of: - # `projects/{project}/locations/{location}`. - # @param channel [::Google::Cloud::Video::LiveStream::V1::Channel, ::Hash] - # Required. The channel resource to be created. - # @param channel_id [::String] - # Required. The ID of the channel resource to be created. - # - # This value must be 1-63 characters, begin and end with a lower-case letter - # or a number, and consist of only lower-case letters, numbers, and hyphens. - # In other words, it must match the following regex: - # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @param request_id [::String] - # A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @livestream_service_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 - - ## - # Returns a list of all channels in the specified region. - # - # @overload list_channels(request, options = nil) - # Pass arguments to `list_channels` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::ListChannelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::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, filter: 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 location for the resource, in the form of: - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # The maximum number of items to return. If unspecified, server - # will pick an appropriate default. Server may return fewer items than - # requested. A caller should only rely on response's - # {::Google::Cloud::Video::LiveStream::V1::ListChannelsResponse#next_page_token next_page_token} - # to determine if there are more items left to be queried. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # @param filter [::String] - # The filter to apply to list results. - # @param order_by [::String] - # Specifies the ordering of results following syntax at - # https://cloud.google.com/apis/design/design_patterns#sorting_order. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Channel>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Channel>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @livestream_service_stub.list_channels request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @livestream_service_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 - - ## - # Returns the specified channel. - # - # @overload get_channel(request, options = nil) - # Pass arguments to `get_channel` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::GetChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::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 resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Channel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::Channel] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::GetChannelRequest.new - # - # # Call the get_channel method. - # result = client.get_channel request - # - # # The returned object is of type Google::Cloud::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @livestream_service_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 - - ## - # Deletes the specified channel. - # - # @overload delete_channel(request, options = nil) - # Pass arguments to `delete_channel` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::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, request_id: nil, force: 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 resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @param request_id [::String] - # A 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)`. - # @param force [::Boolean] - # If the `force` field is set to the default value of `false`, you must - # delete all of a channel's events before you can delete the channel itself. - # If the field is set to `true`, requests to delete a channel also delete - # associated channel events. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @livestream_service_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 - - ## - # Updates the specified channel. - # - # @overload update_channel(request, options = nil) - # Pass arguments to `update_channel` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::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(update_mask: nil, channel: nil, request_id: 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Field mask is used to specify the fields to be overwritten in the Channel - # resource by the update. You can only update the following fields: - # - # * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) - # * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) - # * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) - # * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) - # * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) - # * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) - # * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) - # * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) - # * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) - # * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) - # - # 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 mask is not present, then each field from the list above is updated - # if the field appears in the request payload. To unset a field, add the - # field to the update mask and remove it from the request payload. - # @param channel [::Google::Cloud::Video::LiveStream::V1::Channel, ::Hash] - # Required. The channel resource to be updated. - # @param request_id [::String] - # A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @livestream_service_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 - - ## - # Starts the specified channel. Part of the video pipeline will be created - # only when the StartChannel request is received by the server. - # - # @overload start_channel(request, options = nil) - # Pass arguments to `start_channel` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::StartChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::StartChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload start_channel(name: nil, request_id: nil) - # Pass arguments to `start_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 resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @param request_id [::String] - # A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::StartChannelRequest.new - # - # # Call the start_channel method. - # result = client.start_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 start_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::StartChannelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.start_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::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.start_channel.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.start_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.start_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 - - ## - # Stops the specified channel. Part of the video pipeline will be released - # when the StopChannel request is received by the server. - # - # @overload stop_channel(request, options = nil) - # Pass arguments to `stop_channel` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::StopChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::StopChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload stop_channel(name: nil, request_id: nil) - # Pass arguments to `stop_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 resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @param request_id [::String] - # A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::StopChannelRequest.new - # - # # Call the stop_channel method. - # result = client.stop_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 stop_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::StopChannelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.stop_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::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.stop_channel.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.stop_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.stop_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 - - ## - # Starts distribution which delivers outputs to the destination indicated by - # the Distribution configuration. - # - # @overload start_distribution(request, options = nil) - # Pass arguments to `start_distribution` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload start_distribution(name: nil, distribution_keys: nil, request_id: nil) - # Pass arguments to `start_distribution` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @param distribution_keys [::Array<::String>] - # Optional. A list of keys to identify the distribution configuration in the - # channel resource. If left empty, all the distributions in the channel - # specification will be started. - # @param request_id [::String] - # Optional. A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::StartDistributionRequest.new - # - # # Call the start_distribution method. - # result = client.start_distribution request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def start_distribution request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.start_distribution.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.start_distribution.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.start_distribution.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.start_distribution request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Stops the specified distribution. - # - # @overload stop_distribution(request, options = nil) - # Pass arguments to `stop_distribution` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload stop_distribution(name: nil, distribution_keys: nil, request_id: nil) - # Pass arguments to `stop_distribution` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @param distribution_keys [::Array<::String>] - # Optional. A list of key to identify the distribution configuration in the - # channel resource. If left empty, all the distributions in the channel - # specification will be stopped. - # @param request_id [::String] - # Optional. A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::StopDistributionRequest.new - # - # # Call the stop_distribution method. - # result = client.stop_distribution request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def stop_distribution request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.stop_distribution.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.stop_distribution.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.stop_distribution.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.stop_distribution request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an input with the provided unique ID in the specified region. - # - # @overload create_input(request, options = nil) - # Pass arguments to `create_input` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::CreateInputRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::CreateInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_input(parent: nil, input: nil, input_id: nil, request_id: nil) - # Pass arguments to `create_input` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 location for the resource, in the form of: - # `projects/{project}/locations/{location}`. - # @param input [::Google::Cloud::Video::LiveStream::V1::Input, ::Hash] - # Required. The input resource to be created. - # @param input_id [::String] - # Required. The ID of the input resource to be created. - # - # This value must be 1-63 characters, begin and end with a lower-case letter - # or a number, and consist of only lower-case letters, numbers, and hyphens. - # In other words, it must match the following regex: - # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @param request_id [::String] - # A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::CreateInputRequest.new - # - # # Call the create_input method. - # result = client.create_input request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateInputRequest - - # Converts hash and nil to an 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_input.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_input.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.create_input request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 list of all inputs in the specified region. - # - # @overload list_inputs(request, options = nil) - # Pass arguments to `list_inputs` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::ListInputsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::ListInputsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_inputs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_inputs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 location for the resource, in the form of: - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # The maximum number of items to return. If unspecified, server - # will pick an appropriate default. Server may return fewer items than - # requested. A caller should only rely on response's - # {::Google::Cloud::Video::LiveStream::V1::ListInputsResponse#next_page_token next_page_token} - # to determine if there are more items left to be queried. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # @param filter [::String] - # The filter to apply to list results. - # @param order_by [::String] - # Specifies the ordering of results following syntax at [Sorting - # Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Input>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Input>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::ListInputsRequest.new - # - # # Call the list_inputs method. - # result = client.list_inputs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Input. - # p item - # end - # - def list_inputs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListInputsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_inputs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_inputs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_inputs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.list_inputs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @livestream_service_stub, :list_inputs, "inputs", 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 the specified input. - # - # @overload get_input(request, options = nil) - # Pass arguments to `get_input` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::GetInputRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::GetInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_input(name: nil) - # Pass arguments to `get_input` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 input resource, in the form of: - # `projects/{project}/locations/{location}/inputs/{inputId}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Input] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::Input] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::GetInputRequest.new - # - # # Call the get_input method. - # result = client.get_input request - # - # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Input. - # p result - # - def get_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_input.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_input.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.get_input request, 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 the specified input. - # - # @overload delete_input(request, options = nil) - # Pass arguments to `delete_input` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_input(name: nil, request_id: nil) - # Pass arguments to `delete_input` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 input resource, in the form of: - # `projects/{project}/locations/{location}/inputs/{inputId}`. - # @param request_id [::String] - # A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::DeleteInputRequest.new - # - # # Call the delete_input method. - # result = client.delete_input request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest - - # Converts hash and nil to an 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_input.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_input.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.delete_input request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 specified input. - # - # @overload update_input(request, options = nil) - # Pass arguments to `update_input` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_input(update_mask: nil, input: nil, request_id: nil) - # Pass arguments to `update_input` via keyword arguments. Note that at - # least one keyword argument is 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] - # Field mask is used to specify the fields to be overwritten in the Input - # resource by the update. You can only update the following fields: - # - # * [`tier`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#Tier) - # * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) - # * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) - # - # 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 mask is not present, then each field from the list above is updated - # if the field appears in the request payload. To unset a field, add the - # field to the update mask and remove it from the request payload. - # @param input [::Google::Cloud::Video::LiveStream::V1::Input, ::Hash] - # Required. The input resource to be updated. - # @param request_id [::String] - # A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::UpdateInputRequest.new - # - # # Call the update_input method. - # result = client.update_input request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest - - # Converts hash and nil to an 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_input.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_input.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.update_input request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Preview the streaming content of the specified input. - # - # @overload preview_input(request, options = nil) - # Pass arguments to `preview_input` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload preview_input(name: nil) - # Pass arguments to `preview_input` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 input resource, in the form of: - # `projects/{project}/locations/{location}/inputs/{inputId}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::PreviewInputResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::PreviewInputResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::PreviewInputRequest.new - # - # # Call the preview_input method. - # result = client.preview_input request - # - # # The returned object is of type Google::Cloud::Video::LiveStream::V1::PreviewInputResponse. - # p result - # - def preview_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.preview_input.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.preview_input.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.preview_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.preview_input request, 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 event with the provided unique ID in the specified channel. - # - # @overload create_event(request, options = nil) - # Pass arguments to `create_event` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::CreateEventRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::CreateEventRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_event(parent: nil, event: nil, event_id: nil, request_id: nil) - # Pass arguments to `create_event` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 channel for the resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @param event [::Google::Cloud::Video::LiveStream::V1::Event, ::Hash] - # Required. The event resource to be created. - # @param event_id [::String] - # Required. The ID of the event resource to be created. - # - # This value must be 1-63 characters, begin and end with a lower-case letter - # or a number, and consist of only lower-case letters, numbers, and hyphens. - # In other words, it must match the following regex: - # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @param request_id [::String] - # A 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 [::Google::Cloud::Video::LiveStream::V1::Event] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::Event] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::CreateEventRequest.new - # - # # Call the create_event method. - # result = client.create_event request - # - # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Event. - # p result - # - def create_event request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateEventRequest - - # Converts hash and nil to an 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_event.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_event.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_event.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.create_event request, 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 all events in the specified channel. - # - # @overload list_events(request, options = nil) - # Pass arguments to `list_events` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::ListEventsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::ListEventsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_events(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_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 parent [::String] - # Required. The parent channel for the resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @param page_size [::Integer] - # The maximum number of items to return. If unspecified, server - # will pick an appropriate default. Server may return fewer items than - # requested. A caller should only rely on response's - # {::Google::Cloud::Video::LiveStream::V1::ListEventsResponse#next_page_token next_page_token} - # to determine if there are more items left to be queried. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # @param filter [::String] - # The filter to apply to list results. - # @param order_by [::String] - # Specifies the ordering of results following syntax at - # https://cloud.google.com/apis/design/design_patterns#sorting_order. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Event>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Event>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::ListEventsRequest.new - # - # # Call the list_events method. - # result = client.list_events request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Event. - # p item - # end - # - def list_events request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListEventsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_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::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_events.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_events.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.list_events request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @livestream_service_stub, :list_events, "events", 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 the specified event. - # - # @overload get_event(request, options = nil) - # Pass arguments to `get_event` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::GetEventRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::GetEventRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_event(name: nil) - # Pass arguments to `get_event` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 event resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Event] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::Event] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::GetEventRequest.new - # - # # Call the get_event method. - # result = client.get_event request - # - # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Event. - # p result - # - def get_event request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetEventRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_event.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_event.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_event.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.get_event request, 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 the specified event. - # - # @overload delete_event(request, options = nil) - # Pass arguments to `delete_event` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_event(name: nil, request_id: nil) - # Pass arguments to `delete_event` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 event resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - # @param request_id [::String] - # A 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 [::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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::DeleteEventRequest.new - # - # # Call the delete_event method. - # result = client.delete_event request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_event request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest - - # Converts hash and nil to an 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_event.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_event.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_event.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.delete_event request, 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 all clips in the specified channel. - # - # @overload list_clips(request, options = nil) - # Pass arguments to `list_clips` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::ListClipsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::ListClipsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_clips(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_clips` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListClipsRequest - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filtering results - # @param order_by [::String] - # 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::Video::LiveStream::V1::Clip>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Clip>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::ListClipsRequest.new - # - # # Call the list_clips method. - # result = client.list_clips request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Clip. - # p item - # end - # - def list_clips request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListClipsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_clips.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_clips.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_clips.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.list_clips request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @livestream_service_stub, :list_clips, "clips", 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 the specified clip. - # - # @overload get_clip(request, options = nil) - # Pass arguments to `get_clip` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::GetClipRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::GetClipRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_clip(name: nil) - # Pass arguments to `get_clip` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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, in the following form: - # `projects/{project}/locations/{location}/channels/{channel}/clips/{clip}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Clip] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::Clip] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::GetClipRequest.new - # - # # Call the get_clip method. - # result = client.get_clip request - # - # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Clip. - # p result - # - def get_clip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetClipRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_clip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_clip.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_clip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.get_clip request, 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 clip with the provided clip ID in the specified channel. - # - # @overload create_clip(request, options = nil) - # Pass arguments to `create_clip` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::CreateClipRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::CreateClipRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_clip(parent: nil, clip_id: nil, clip: nil, request_id: nil) - # Pass arguments to `create_clip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 following form: - # `projects/{project}/locations/{location}/channels/{channel}`. - # @param clip_id [::String] - # Required. The ID of the clip resource to be created. - # - # This value must be 1-63 characters, begin and end with a lower-case letter - # or a number, and consist of only lower-case letters, numbers, and hyphens. - # In other words, it must match the following regex: - # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @param clip [::Google::Cloud::Video::LiveStream::V1::Clip, ::Hash] - # Required. The resource being 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::CreateClipRequest.new - # - # # Call the create_clip method. - # result = client.create_clip request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_clip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateClipRequest - - # Converts hash and nil to an 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_clip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_clip.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_clip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.create_clip request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 the specified clip job resource. This method only deletes the clip - # job and does not delete the VOD clip stored in Cloud Storage. - # - # @overload delete_clip(request, options = nil) - # Pass arguments to `delete_clip` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_clip(name: nil, request_id: nil) - # Pass arguments to `delete_clip` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 clip resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`. - # @param request_id [::String] - # Optional. A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::DeleteClipRequest.new - # - # # Call the delete_clip method. - # result = client.delete_clip request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_clip request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest - - # Converts hash and nil to an 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_clip.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_clip.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_clip.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.delete_clip request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 DVR session with the provided unique ID in the specified channel. - # - # @overload create_dvr_session(request, options = nil) - # Pass arguments to `create_dvr_session` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_dvr_session(parent: nil, dvr_session_id: nil, dvr_session: nil, request_id: nil) - # Pass arguments to `create_dvr_session` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 following form: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @param dvr_session_id [::String] - # Required. The ID of the DVR session resource to be created. - # - # This value must be 1-63 characters, begin and end with a lower-case letter - # or a number, and consist of only lower-case letters, numbers, and hyphens. - # In other words, it must match the following regex: - # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @param dvr_session [::Google::Cloud::Video::LiveStream::V1::DvrSession, ::Hash] - # Required. The resource being 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest.new - # - # # Call the create_dvr_session method. - # result = client.create_dvr_session request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_dvr_session request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest - - # Converts hash and nil to an 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_dvr_session.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_dvr_session.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_dvr_session.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.create_dvr_session request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 list of all DVR sessions in the specified channel. - # - # @overload list_dvr_sessions(request, options = nil) - # Pass arguments to `list_dvr_sessions` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_dvr_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_dvr_sessions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListDvrSessionsRequest - # @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 results - # @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::Video::LiveStream::V1::DvrSession>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::DvrSession>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest.new - # - # # Call the list_dvr_sessions method. - # result = client.list_dvr_sessions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::DvrSession. - # p item - # end - # - def list_dvr_sessions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_dvr_sessions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_dvr_sessions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_dvr_sessions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.list_dvr_sessions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @livestream_service_stub, :list_dvr_sessions, "dvr_sessions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the specified DVR session. - # - # @overload get_dvr_session(request, options = nil) - # Pass arguments to `get_dvr_session` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_dvr_session(name: nil) - # Pass arguments to `get_dvr_session` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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, in the following form: - # `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::DvrSession] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::DvrSession] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest.new - # - # # Call the get_dvr_session method. - # result = client.get_dvr_session request - # - # # The returned object is of type Google::Cloud::Video::LiveStream::V1::DvrSession. - # p result - # - def get_dvr_session request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_dvr_session.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_dvr_session.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_dvr_session.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.get_dvr_session request, 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 the specified DVR session. - # - # @overload delete_dvr_session(request, options = nil) - # Pass arguments to `delete_dvr_session` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_dvr_session(name: nil, request_id: nil) - # Pass arguments to `delete_dvr_session` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 event resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`. - # @param request_id [::String] - # Optional. A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest.new - # - # # Call the delete_dvr_session method. - # result = client.delete_dvr_session request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_dvr_session request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest - - # Converts hash and nil to an 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_dvr_session.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_dvr_session.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_dvr_session.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.delete_dvr_session request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 specified DVR session. - # - # @overload update_dvr_session(request, options = nil) - # Pass arguments to `update_dvr_session` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_dvr_session(update_mask: nil, dvr_session: nil, request_id: nil) - # Pass arguments to `update_dvr_session` via keyword arguments. Note that at - # least one keyword argument is 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. Field mask is used to specify the fields to be overwritten in the - # DvrSession resource by the update. You can only update the following - # fields: - # - # * `dvrWindows` - # - # 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. - # @param dvr_session [::Google::Cloud::Video::LiveStream::V1::DvrSession, ::Hash] - # Required. The DVR session resource to be updated. - # @param request_id [::String] - # Optional. A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest.new - # - # # Call the update_dvr_session method. - # result = client.update_dvr_session request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_dvr_session request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest - - # Converts hash and nil to an 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_dvr_session.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_dvr_session.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_dvr_session.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.update_dvr_session request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 Asset with the provided unique ID in the specified - # region. - # - # @overload create_asset(request, options = nil) - # Pass arguments to `create_asset` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_asset(parent: nil, asset: nil, asset_id: nil, request_id: nil) - # Pass arguments to `create_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent location for the resource, in the form of: - # `projects/{project}/locations/{location}`. - # @param asset [::Google::Cloud::Video::LiveStream::V1::Asset, ::Hash] - # Required. The asset resource to be created. - # @param asset_id [::String] - # Required. The ID of the asset resource to be created. - # - # This value must be 1-63 characters, begin and end with a lower-case letter - # or a number, and consist of only lower-case letters, numbers, and hyphens. - # In other words, it must match the following regex: - # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @param request_id [::String] - # A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::CreateAssetRequest.new - # - # # Call the create_asset method. - # result = client.create_asset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_asset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_asset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.create_asset request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified asset if it is not used. - # - # @overload delete_asset(request, options = nil) - # Pass arguments to `delete_asset` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_asset(name: nil, request_id: nil) - # Pass arguments to `delete_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the asset resource, in the form of: - # `projects/{project}/locations/{location}/assets/{assetId}`. - # @param request_id [::String] - # A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest.new - # - # # Call the delete_asset method. - # result = client.delete_asset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_asset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_asset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.delete_asset request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the specified asset. - # - # @overload get_asset(request, options = nil) - # Pass arguments to `get_asset` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::GetAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::GetAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_asset(name: nil) - # Pass arguments to `get_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource, in the following form: - # `projects/{project}/locations/{location}/assets/{asset}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Asset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::Asset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::GetAssetRequest.new - # - # # Call the get_asset method. - # result = client.get_asset request - # - # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Asset. - # p result - # - def get_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_asset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_asset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.get_asset request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of all assets in the specified region. - # - # @overload list_assets(request, options = nil) - # Pass arguments to `list_assets` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent location for the resource, in the form of: - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filtering results - # @param order_by [::String] - # 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::Video::LiveStream::V1::Asset>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Asset>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::ListAssetsRequest.new - # - # # Call the list_assets method. - # result = client.list_assets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Asset. - # p item - # end - # - def list_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_assets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_assets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.list_assets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @livestream_service_stub, :list_assets, "assets", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the specified pool. - # - # @overload get_pool(request, options = nil) - # Pass arguments to `get_pool` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::GetPoolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::GetPoolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_pool(name: nil) - # Pass arguments to `get_pool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 pool resource, in the form of: - # `projects/{project}/locations/{location}/pools/{poolId}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Pool] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::Pool] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::GetPoolRequest.new - # - # # Call the get_pool method. - # result = client.get_pool request - # - # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Pool. - # p result - # - def get_pool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetPoolRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_pool.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_pool.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_pool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.get_pool request, 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 the specified pool. - # - # @overload update_pool(request, options = nil) - # Pass arguments to `update_pool` via a request object, either of type - # {::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_pool(update_mask: nil, pool: nil, request_id: nil) - # Pass arguments to `update_pool` via keyword arguments. Note that at - # least one keyword argument is 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] - # Field mask is used to specify the fields to be overwritten in the Pool - # resource by the update. You can only update the following fields: - # - # * `networkConfig` - # - # 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. - # @param pool [::Google::Cloud::Video::LiveStream::V1::Pool, ::Hash] - # Required. The pool resource to be updated. - # @param request_id [::String] - # A 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/video/live_stream/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest.new - # - # # Call the update_pool method. - # result = client.update_pool request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_pool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest - - # Converts hash and nil to an 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_pool.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_pool.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_pool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @livestream_service_stub.update_pool request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 LivestreamService REST API. - # - # This class represents the configuration for LivestreamService 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::Video::LiveStream::V1::LivestreamService::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_channel to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_channel.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_channel.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 = "livestream.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 LivestreamService 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_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :create_channel - ## - # RPC-specific configuration for `list_channels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_channels - ## - # RPC-specific configuration for `get_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :get_channel - ## - # RPC-specific configuration for `delete_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_channel - ## - # RPC-specific configuration for `update_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :update_channel - ## - # RPC-specific configuration for `start_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :start_channel - ## - # RPC-specific configuration for `stop_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :stop_channel - ## - # RPC-specific configuration for `start_distribution` - # @return [::Gapic::Config::Method] - # - attr_reader :start_distribution - ## - # RPC-specific configuration for `stop_distribution` - # @return [::Gapic::Config::Method] - # - attr_reader :stop_distribution - ## - # RPC-specific configuration for `create_input` - # @return [::Gapic::Config::Method] - # - attr_reader :create_input - ## - # RPC-specific configuration for `list_inputs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_inputs - ## - # RPC-specific configuration for `get_input` - # @return [::Gapic::Config::Method] - # - attr_reader :get_input - ## - # RPC-specific configuration for `delete_input` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_input - ## - # RPC-specific configuration for `update_input` - # @return [::Gapic::Config::Method] - # - attr_reader :update_input - ## - # RPC-specific configuration for `preview_input` - # @return [::Gapic::Config::Method] - # - attr_reader :preview_input - ## - # RPC-specific configuration for `create_event` - # @return [::Gapic::Config::Method] - # - attr_reader :create_event - ## - # RPC-specific configuration for `list_events` - # @return [::Gapic::Config::Method] - # - attr_reader :list_events - ## - # RPC-specific configuration for `get_event` - # @return [::Gapic::Config::Method] - # - attr_reader :get_event - ## - # RPC-specific configuration for `delete_event` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_event - ## - # RPC-specific configuration for `list_clips` - # @return [::Gapic::Config::Method] - # - attr_reader :list_clips - ## - # RPC-specific configuration for `get_clip` - # @return [::Gapic::Config::Method] - # - attr_reader :get_clip - ## - # RPC-specific configuration for `create_clip` - # @return [::Gapic::Config::Method] - # - attr_reader :create_clip - ## - # RPC-specific configuration for `delete_clip` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_clip - ## - # RPC-specific configuration for `create_dvr_session` - # @return [::Gapic::Config::Method] - # - attr_reader :create_dvr_session - ## - # RPC-specific configuration for `list_dvr_sessions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_dvr_sessions - ## - # RPC-specific configuration for `get_dvr_session` - # @return [::Gapic::Config::Method] - # - attr_reader :get_dvr_session - ## - # RPC-specific configuration for `delete_dvr_session` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_dvr_session - ## - # RPC-specific configuration for `update_dvr_session` - # @return [::Gapic::Config::Method] - # - attr_reader :update_dvr_session - ## - # RPC-specific configuration for `create_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_asset - ## - # RPC-specific configuration for `delete_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_asset - ## - # RPC-specific configuration for `get_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_asset - ## - # RPC-specific configuration for `list_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_assets - ## - # RPC-specific configuration for `get_pool` - # @return [::Gapic::Config::Method] - # - attr_reader :get_pool - ## - # RPC-specific configuration for `update_pool` - # @return [::Gapic::Config::Method] - # - attr_reader :update_pool - - # @private - def initialize parent_rpcs = nil - create_channel_config = parent_rpcs.create_channel if parent_rpcs.respond_to? :create_channel - @create_channel = ::Gapic::Config::Method.new create_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 - get_channel_config = parent_rpcs.get_channel if parent_rpcs.respond_to? :get_channel - @get_channel = ::Gapic::Config::Method.new get_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 - update_channel_config = parent_rpcs.update_channel if parent_rpcs.respond_to? :update_channel - @update_channel = ::Gapic::Config::Method.new update_channel_config - start_channel_config = parent_rpcs.start_channel if parent_rpcs.respond_to? :start_channel - @start_channel = ::Gapic::Config::Method.new start_channel_config - stop_channel_config = parent_rpcs.stop_channel if parent_rpcs.respond_to? :stop_channel - @stop_channel = ::Gapic::Config::Method.new stop_channel_config - start_distribution_config = parent_rpcs.start_distribution if parent_rpcs.respond_to? :start_distribution - @start_distribution = ::Gapic::Config::Method.new start_distribution_config - stop_distribution_config = parent_rpcs.stop_distribution if parent_rpcs.respond_to? :stop_distribution - @stop_distribution = ::Gapic::Config::Method.new stop_distribution_config - create_input_config = parent_rpcs.create_input if parent_rpcs.respond_to? :create_input - @create_input = ::Gapic::Config::Method.new create_input_config - list_inputs_config = parent_rpcs.list_inputs if parent_rpcs.respond_to? :list_inputs - @list_inputs = ::Gapic::Config::Method.new list_inputs_config - get_input_config = parent_rpcs.get_input if parent_rpcs.respond_to? :get_input - @get_input = ::Gapic::Config::Method.new get_input_config - delete_input_config = parent_rpcs.delete_input if parent_rpcs.respond_to? :delete_input - @delete_input = ::Gapic::Config::Method.new delete_input_config - update_input_config = parent_rpcs.update_input if parent_rpcs.respond_to? :update_input - @update_input = ::Gapic::Config::Method.new update_input_config - preview_input_config = parent_rpcs.preview_input if parent_rpcs.respond_to? :preview_input - @preview_input = ::Gapic::Config::Method.new preview_input_config - create_event_config = parent_rpcs.create_event if parent_rpcs.respond_to? :create_event - @create_event = ::Gapic::Config::Method.new create_event_config - list_events_config = parent_rpcs.list_events if parent_rpcs.respond_to? :list_events - @list_events = ::Gapic::Config::Method.new list_events_config - get_event_config = parent_rpcs.get_event if parent_rpcs.respond_to? :get_event - @get_event = ::Gapic::Config::Method.new get_event_config - delete_event_config = parent_rpcs.delete_event if parent_rpcs.respond_to? :delete_event - @delete_event = ::Gapic::Config::Method.new delete_event_config - list_clips_config = parent_rpcs.list_clips if parent_rpcs.respond_to? :list_clips - @list_clips = ::Gapic::Config::Method.new list_clips_config - get_clip_config = parent_rpcs.get_clip if parent_rpcs.respond_to? :get_clip - @get_clip = ::Gapic::Config::Method.new get_clip_config - create_clip_config = parent_rpcs.create_clip if parent_rpcs.respond_to? :create_clip - @create_clip = ::Gapic::Config::Method.new create_clip_config - delete_clip_config = parent_rpcs.delete_clip if parent_rpcs.respond_to? :delete_clip - @delete_clip = ::Gapic::Config::Method.new delete_clip_config - create_dvr_session_config = parent_rpcs.create_dvr_session if parent_rpcs.respond_to? :create_dvr_session - @create_dvr_session = ::Gapic::Config::Method.new create_dvr_session_config - list_dvr_sessions_config = parent_rpcs.list_dvr_sessions if parent_rpcs.respond_to? :list_dvr_sessions - @list_dvr_sessions = ::Gapic::Config::Method.new list_dvr_sessions_config - get_dvr_session_config = parent_rpcs.get_dvr_session if parent_rpcs.respond_to? :get_dvr_session - @get_dvr_session = ::Gapic::Config::Method.new get_dvr_session_config - delete_dvr_session_config = parent_rpcs.delete_dvr_session if parent_rpcs.respond_to? :delete_dvr_session - @delete_dvr_session = ::Gapic::Config::Method.new delete_dvr_session_config - update_dvr_session_config = parent_rpcs.update_dvr_session if parent_rpcs.respond_to? :update_dvr_session - @update_dvr_session = ::Gapic::Config::Method.new update_dvr_session_config - create_asset_config = parent_rpcs.create_asset if parent_rpcs.respond_to? :create_asset - @create_asset = ::Gapic::Config::Method.new create_asset_config - delete_asset_config = parent_rpcs.delete_asset if parent_rpcs.respond_to? :delete_asset - @delete_asset = ::Gapic::Config::Method.new delete_asset_config - get_asset_config = parent_rpcs.get_asset if parent_rpcs.respond_to? :get_asset - @get_asset = ::Gapic::Config::Method.new get_asset_config - list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets - @list_assets = ::Gapic::Config::Method.new list_assets_config - get_pool_config = parent_rpcs.get_pool if parent_rpcs.respond_to? :get_pool - @get_pool = ::Gapic::Config::Method.new get_pool_config - update_pool_config = parent_rpcs.update_pool if parent_rpcs.respond_to? :update_pool - @update_pool = ::Gapic::Config::Method.new update_pool_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-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest/operations.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest/operations.rb deleted file mode 100644 index 8db54d1cdab6..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/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 Video - module LiveStream - module V1 - module LivestreamService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "livestream.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the LivestreamService 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 LivestreamService 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::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Video::LiveStream::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "livestream.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 -end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest/service_stub.rb deleted file mode 100644 index 544178ad6b12..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/livestream_service/rest/service_stub.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 "google/cloud/video/livestream/v1/service_pb" - -module Google - module Cloud - module Video - module LiveStream - module V1 - module LivestreamService - module Rest - ## - # REST service stub for the LivestreamService 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_channel REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::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 list_channels REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::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::Video::LiveStream::V1::ListChannelsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::LiveStream::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::Video::LiveStream::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 get_channel REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::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::Video::LiveStream::V1::Channel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::LiveStream::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::Video::LiveStream::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 delete_channel REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::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 update_channel REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::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 start_channel REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::StartChannelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def start_channel request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_start_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: "start_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 stop_channel REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::StopChannelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def stop_channel request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_stop_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: "stop_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 start_distribution REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def start_distribution request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_start_distribution_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "start_distribution", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the stop_distribution REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def stop_distribution request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_stop_distribution_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "stop_distribution", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_input REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateInputRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_input request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_input_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_input", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_inputs REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListInputsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::ListInputsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::ListInputsResponse] - # A result object deserialized from the server's reply - def list_inputs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_inputs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_inputs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Video::LiveStream::V1::ListInputsResponse.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_input REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetInputRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Input] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::Input] - # A result object deserialized from the server's reply - def get_input request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_input_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_input", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Video::LiveStream::V1::Input.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_input REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_input request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_input_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_input", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_input REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_input request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_input_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_input", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the preview_input REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::PreviewInputResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::PreviewInputResponse] - # A result object deserialized from the server's reply - def preview_input request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_preview_input_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "preview_input", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Video::LiveStream::V1::PreviewInputResponse.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_event REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateEventRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Event] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::Event] - # A result object deserialized from the server's reply - def create_event request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_event_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_event", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Video::LiveStream::V1::Event.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_events REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListEventsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::ListEventsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::ListEventsResponse] - # A result object deserialized from the server's reply - def list_events request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_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: "list_events", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Video::LiveStream::V1::ListEventsResponse.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_event REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetEventRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Event] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::Event] - # A result object deserialized from the server's reply - def get_event request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_event_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_event", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Video::LiveStream::V1::Event.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_event REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_event request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_event_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_event", - 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 list_clips REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListClipsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::ListClipsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::ListClipsResponse] - # A result object deserialized from the server's reply - def list_clips request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_clips_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_clips", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Video::LiveStream::V1::ListClipsResponse.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_clip REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetClipRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Clip] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::Clip] - # A result object deserialized from the server's reply - def get_clip request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_clip_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_clip", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Video::LiveStream::V1::Clip.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_clip REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateClipRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_clip request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_clip_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_clip", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_clip REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_clip request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_clip_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_clip", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_dvr_session REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_dvr_session request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_dvr_session_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_dvr_session", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_dvr_sessions REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsResponse] - # A result object deserialized from the server's reply - def list_dvr_sessions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_dvr_sessions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_dvr_sessions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsResponse.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_dvr_session REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::DvrSession] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::DvrSession] - # A result object deserialized from the server's reply - def get_dvr_session request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_dvr_session_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_dvr_session", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Video::LiveStream::V1::DvrSession.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_dvr_session REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_dvr_session request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_dvr_session_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_dvr_session", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_dvr_session REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_dvr_session request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_dvr_session_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_dvr_session", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_asset REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_asset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_asset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_asset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_asset REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_asset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_asset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_asset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_asset REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetAssetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Asset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::Asset] - # A result object deserialized from the server's reply - def get_asset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_asset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_asset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Video::LiveStream::V1::Asset.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_assets REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::ListAssetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::ListAssetsResponse] - # A result object deserialized from the server's reply - def list_assets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_assets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_assets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Video::LiveStream::V1::ListAssetsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_pool REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetPoolRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Pool] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::LiveStream::V1::Pool] - # A result object deserialized from the server's reply - def get_pool request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_pool_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_pool", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Video::LiveStream::V1::Pool.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_pool REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_pool request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_pool_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_pool", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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_channel REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::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 list_channels REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::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 get_channel REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::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 delete_channel REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::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 update_channel REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::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 start_channel REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::StartChannelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_start_channel_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:start", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the stop_channel REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::StopChannelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_stop_channel_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:stop", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the start_distribution REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_start_distribution_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:startdistribution", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the stop_distribution REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_stop_distribution_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:stopdistribution", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_input REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateInputRequest] - # 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_input_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/inputs", - body: "input", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_inputs REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListInputsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_inputs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/inputs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_input REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetInputRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_input_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/inputs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_input REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest] - # 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_input_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/inputs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_input REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest] - # 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_input_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{input.name}", - body: "input", - matches: [ - ["input.name", %r{^projects/[^/]+/locations/[^/]+/inputs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the preview_input REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_preview_input_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:preview", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/inputs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_event REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateEventRequest] - # 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_event_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/events", - body: "event", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_events REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListEventsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_events_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/events", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_event REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetEventRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_event_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/events/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_event REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest] - # 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_event_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/events/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_clips REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListClipsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_clips_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/clips", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_clip REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetClipRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_clip_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/clips/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_clip REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateClipRequest] - # 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_clip_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/clips", - body: "clip", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_clip REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest] - # 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_clip_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/clips/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_dvr_session REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest] - # 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_dvr_session_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dvrSessions", - body: "dvr_session", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_dvr_sessions REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_dvr_sessions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dvrSessions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_dvr_session REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_dvr_session_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/dvrSessions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_dvr_session REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest] - # 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_dvr_session_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/dvrSessions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_dvr_session REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest] - # 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_dvr_session_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{dvr_session.name}", - body: "dvr_session", - matches: [ - ["dvr_session.name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/dvrSessions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_asset REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_asset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/assets", - body: "asset", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_asset REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_asset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/assets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_asset REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetAssetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_asset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/assets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_assets REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_assets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/assets", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_pool REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetPoolRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_pool_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/pools/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_pool REST call - # - # @param request_pb [::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest] - # 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_pool_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{pool.name}", - body: "pool", - matches: [ - ["pool.name", %r{^projects/[^/]+/locations/[^/]+/pools/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/rest.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/rest.rb deleted file mode 100644 index ed1016097c8a..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/rest.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/video/live_stream/v1/livestream_service/rest" -require "google/cloud/video/live_stream/v1/bindings_override" -require "google/cloud/video/live_stream/v1/version" - -module Google - module Cloud - module Video - module LiveStream - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/video/live_stream/v1/rest" - # client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/version.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/v1/version.rb deleted file mode 100644 index cdd336eff66a..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/live_stream/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 Video - module LiveStream - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/outputs_pb.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/outputs_pb.rb deleted file mode 100644 index 4a7af12f248a..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/outputs_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/video/livestream/v1/outputs.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/rpc/status_pb' -require 'google/type/datetime_pb' - - -descriptor_data = "\n.google/cloud/video/livestream/v1/outputs.proto\x12 google.cloud.video.livestream.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x17google/rpc/status.proto\x1a\x1agoogle/type/datetime.proto\"\x87\x02\n\x10\x45lementaryStream\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x45\n\x0cvideo_stream\x18\x01 \x01(\x0b\x32-.google.cloud.video.livestream.v1.VideoStreamH\x00\x12\x45\n\x0c\x61udio_stream\x18\x02 \x01(\x0b\x32-.google.cloud.video.livestream.v1.AudioStreamH\x00\x12\x43\n\x0btext_stream\x18\x03 \x01(\x0b\x32,.google.cloud.video.livestream.v1.TextStreamH\x00\x42\x13\n\x11\x65lementary_stream\"\xab\x01\n\tMuxStream\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x11\n\tcontainer\x18\x03 \x01(\t\x12\x1a\n\x12\x65lementary_streams\x18\x04 \x03(\t\x12K\n\x10segment_settings\x18\x05 \x01(\x0b\x32\x31.google.cloud.video.livestream.v1.SegmentSettings\x12\x15\n\rencryption_id\x18\x06 \x01(\t\"\xce\x02\n\x08Manifest\x12\x11\n\tfile_name\x18\x01 \x01(\t\x12J\n\x04type\x18\x02 \x01(\x0e\x32\x37.google.cloud.video.livestream.v1.Manifest.ManifestTypeB\x03\xe0\x41\x02\x12\x18\n\x0bmux_streams\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12\x19\n\x11max_segment_count\x18\x04 \x01(\x05\x12\x38\n\x15segment_keep_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12 \n\x18use_timecode_as_timeline\x18\x06 \x01(\x08\x12\x10\n\x03key\x18\x07 \x01(\tB\x03\xe0\x41\x01\"@\n\x0cManifestType\x12\x1d\n\x19MANIFEST_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03HLS\x10\x01\x12\x08\n\x04\x44\x41SH\x10\x02\"_\n\x12\x44istributionStream\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tcontainer\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12\x65lementary_streams\x18\x03 \x03(\tB\x03\xe0\x41\x02\"\xc7\x03\n\x0c\x44istribution\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13\x64istribution_stream\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12H\n\x05state\x18\x03 \x01(\x0e\x32\x34.google.cloud.video.livestream.v1.Distribution.StateB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12K\n\x08srt_push\x18\x05 \x01(\x0b\x32\x37.google.cloud.video.livestream.v1.SrtPushOutputEndpointH\x00\x12M\n\trtmp_push\x18\x06 \x01(\x0b\x32\x38.google.cloud.video.livestream.v1.RtmpPushOutputEndpointH\x00\"i\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05\x45RROR\x10\x05\x12\r\n\tNOT_READY\x10\x06\x12\t\n\x05READY\x10\x07\x12\x12\n\x0e\x41WAITING_INPUT\x10\x08\x12\x10\n\x0c\x44ISTRIBUTING\x10\tB\n\n\x08\x65ndpoint\"\x94\x01\n\x15SrtPushOutputEndpoint\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12T\n\x19passphrase_secret_version\x18\x02 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersionH\x00\x42\x13\n\x11passphrase_source\"C\n\x16RtmpPushOutputEndpoint\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nstream_key\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xe3\x01\n\x0bSpriteSheet\x12\x0e\n\x06\x66ormat\x18\x01 \x01(\t\x12\x18\n\x0b\x66ile_prefix\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13sprite_width_pixels\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\x12!\n\x14sprite_height_pixels\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x14\n\x0c\x63olumn_count\x18\x05 \x01(\x05\x12\x11\n\trow_count\x18\x06 \x01(\x05\x12+\n\x08interval\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0f\n\x07quality\x18\x08 \x01(\x05\"\xc5\x03\n\x13PreprocessingConfig\x12J\n\x05\x61udio\x18\x01 \x01(\x0b\x32;.google.cloud.video.livestream.v1.PreprocessingConfig.Audio\x12H\n\x04\x63rop\x18\x02 \x01(\x0b\x32:.google.cloud.video.livestream.v1.PreprocessingConfig.Crop\x12\x46\n\x03pad\x18\x03 \x01(\x0b\x32\x39.google.cloud.video.livestream.v1.PreprocessingConfig.Pad\x1a\x15\n\x05\x41udio\x12\x0c\n\x04lufs\x18\x01 \x01(\x01\x1a\\\n\x04\x43rop\x12\x12\n\ntop_pixels\x18\x01 \x01(\x05\x12\x15\n\rbottom_pixels\x18\x02 \x01(\x05\x12\x13\n\x0bleft_pixels\x18\x03 \x01(\x05\x12\x14\n\x0cright_pixels\x18\x04 \x01(\x05\x1a[\n\x03Pad\x12\x12\n\ntop_pixels\x18\x01 \x01(\x05\x12\x15\n\rbottom_pixels\x18\x02 \x01(\x05\x12\x13\n\x0bleft_pixels\x18\x03 \x01(\x05\x12\x14\n\x0cright_pixels\x18\x04 \x01(\x05\"\xbe\x07\n\x0bVideoStream\x12O\n\x04h264\x18\x14 \x01(\x0b\x32?.google.cloud.video.livestream.v1.VideoStream.H264CodecSettingsH\x00\x12O\n\x04h265\x18\x15 \x01(\x0b\x32?.google.cloud.video.livestream.v1.VideoStream.H265CodecSettingsH\x00\x1a\x8c\x03\n\x11H264CodecSettings\x12\x14\n\x0cwidth_pixels\x18\x01 \x01(\x05\x12\x15\n\rheight_pixels\x18\x02 \x01(\x05\x12\x17\n\nframe_rate\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\x12\x18\n\x0b\x62itrate_bps\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x16\n\x0e\x61llow_open_gop\x18\x06 \x01(\x08\x12\x19\n\x0fgop_frame_count\x18\x07 \x01(\x05H\x00\x12\x31\n\x0cgop_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x15\n\rvbv_size_bits\x18\t \x01(\x05\x12\x19\n\x11vbv_fullness_bits\x18\n \x01(\x05\x12\x15\n\rentropy_coder\x18\x0b \x01(\t\x12\x11\n\tb_pyramid\x18\x0c \x01(\x08\x12\x15\n\rb_frame_count\x18\r \x01(\x05\x12\x13\n\x0b\x61q_strength\x18\x0e \x01(\x01\x12\x0f\n\x07profile\x18\x0f \x01(\t\x12\x0c\n\x04tune\x18\x10 \x01(\tB\n\n\x08gop_mode\x1a\xeb\x02\n\x11H265CodecSettings\x12\x19\n\x0cwidth_pixels\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1a\n\rheight_pixels\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\nframe_rate\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\x12\x18\n\x0b\x62itrate_bps\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1e\n\x0fgop_frame_count\x18\x07 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x12\x36\n\x0cgop_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01H\x00\x12\x1a\n\rvbv_size_bits\x18\t \x01(\x05\x42\x03\xe0\x41\x01\x12\x1e\n\x11vbv_fullness_bits\x18\n \x01(\x05\x42\x03\xe0\x41\x01\x12\x16\n\tb_pyramid\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rb_frame_count\x18\x0c \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0b\x61q_strength\x18\r \x01(\x01\x42\x03\xe0\x41\x01\x42\n\n\x08gop_modeB\x10\n\x0e\x63odec_settings\"\xec\x02\n\x0b\x41udioStream\x12\x10\n\x08transmux\x18\x08 \x01(\x08\x12\r\n\x05\x63odec\x18\x01 \x01(\t\x12\x18\n\x0b\x62itrate_bps\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12\x15\n\rchannel_count\x18\x03 \x01(\x05\x12\x16\n\x0e\x63hannel_layout\x18\x04 \x03(\t\x12K\n\x07mapping\x18\x05 \x03(\x0b\x32:.google.cloud.video.livestream.v1.AudioStream.AudioMapping\x12\x19\n\x11sample_rate_hertz\x18\x06 \x01(\x05\x1a\x8a\x01\n\x0c\x41udioMapping\x12\x16\n\tinput_key\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0binput_track\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1a\n\rinput_channel\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1b\n\x0eoutput_channel\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x0f\n\x07gain_db\x18\x05 \x01(\x01\"\xcb\x02\n\nTextStream\x12\x12\n\x05\x63odec\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12output_cea_channel\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12N\n\x07mapping\x18\x03 \x03(\x0b\x32\x38.google.cloud.video.livestream.v1.TextStream.TextMappingB\x03\xe0\x41\x01\x1a\x80\x01\n\x0bTextMapping\x12\x16\n\tinput_key\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0binput_track\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1e\n\x11input_cea_channel\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12\x66rom_language_code\x18\x06 \x01(\tB\x03\xe0\x41\x01\"F\n\x0fSegmentSettings\x12\x33\n\x10segment_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xac\x02\n\x0eTimecodeConfig\x12O\n\x06source\x18\x01 \x01(\x0e\x32?.google.cloud.video.livestream.v1.TimecodeConfig.TimecodeSource\x12/\n\nutc_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12*\n\ttime_zone\x18\x03 \x01(\x0b\x32\x15.google.type.TimeZoneH\x00\"]\n\x0eTimecodeSource\x12\x1f\n\x1bTIMECODE_SOURCE_UNSPECIFIED\x10\x00\x12\x13\n\x0fMEDIA_TIMESTAMP\x10\x01\x12\x15\n\x11\x45MBEDDED_TIMECODE\x10\x02\x42\r\n\x0btime_offsetB\xe9\x01\n$com.google.cloud.video.livestream.v1B\x0cOutputsProtoP\x01ZDcloud.google.com/go/video/livestream/apiv1/livestreampb;livestreampb\xaa\x02 Google.Cloud.Video.LiveStream.V1\xca\x02 Google\\Cloud\\Video\\LiveStream\\V1\xea\x02$Google::Cloud::Video::LiveStream::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Video - module LiveStream - module V1 - ElementaryStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ElementaryStream").msgclass - MuxStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.MuxStream").msgclass - Manifest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Manifest").msgclass - Manifest::ManifestType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Manifest.ManifestType").enummodule - DistributionStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.DistributionStream").msgclass - Distribution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Distribution").msgclass - Distribution::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Distribution.State").enummodule - SrtPushOutputEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.SrtPushOutputEndpoint").msgclass - RtmpPushOutputEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.RtmpPushOutputEndpoint").msgclass - SpriteSheet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.SpriteSheet").msgclass - PreprocessingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.PreprocessingConfig").msgclass - PreprocessingConfig::Audio = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.PreprocessingConfig.Audio").msgclass - PreprocessingConfig::Crop = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.PreprocessingConfig.Crop").msgclass - PreprocessingConfig::Pad = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.PreprocessingConfig.Pad").msgclass - VideoStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.VideoStream").msgclass - VideoStream::H264CodecSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.VideoStream.H264CodecSettings").msgclass - VideoStream::H265CodecSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.VideoStream.H265CodecSettings").msgclass - AudioStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.AudioStream").msgclass - AudioStream::AudioMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.AudioStream.AudioMapping").msgclass - TextStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.TextStream").msgclass - TextStream::TextMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.TextStream.TextMapping").msgclass - SegmentSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.SegmentSettings").msgclass - TimecodeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.TimecodeConfig").msgclass - TimecodeConfig::TimecodeSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.TimecodeConfig.TimecodeSource").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/resources_pb.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/resources_pb.rb deleted file mode 100644 index dae144e5d270..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/resources_pb.rb +++ /dev/null @@ -1,91 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/video/livestream/v1/resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/video/livestream/v1/outputs_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n0google/cloud/video/livestream/v1/resources.proto\x12 google.cloud.video.livestream.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/video/livestream/v1/outputs.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x98\x07\n\x05Input\x12\x0c\n\x04name\x18\x01 \x01(\t\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\x33.google.cloud.video.livestream.v1.Input.LabelsEntry\x12:\n\x04type\x18\x05 \x01(\x0e\x32,.google.cloud.video.livestream.v1.Input.Type\x12:\n\x04tier\x18\x0e \x01(\x0e\x32,.google.cloud.video.livestream.v1.Input.Tier\x12\x10\n\x03uri\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12S\n\x14preprocessing_config\x18\t \x01(\x0b\x32\x35.google.cloud.video.livestream.v1.PreprocessingConfig\x12L\n\x0esecurity_rules\x18\x0c \x01(\x0b\x32\x34.google.cloud.video.livestream.v1.Input.SecurityRule\x12Y\n\x15input_stream_property\x18\x0f \x01(\x0b\x32\x35.google.cloud.video.livestream.v1.InputStreamPropertyB\x03\xe0\x41\x03\x1a!\n\x0cSecurityRule\x12\x11\n\tip_ranges\x18\x01 \x03(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"9\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tRTMP_PUSH\x10\x01\x12\x0c\n\x08SRT_PUSH\x10\x02\"]\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\x06\n\x02SD\x10\x01\x12\x06\n\x02HD\x10\x02\x12\x07\n\x03UHD\x10\x03\x12\x0b\n\x07SD_H265\x10\x04\x12\x0b\n\x07HD_H265\x10\x05\x12\x0c\n\x08UHD_H265\x10\x06:\\\xea\x41Y\n\x1flivestream.googleapis.com/Input\x12\x36projects/{project}/locations/{location}/inputs/{input}\"\xb4\x0e\n\x07\x43hannel\x12\x0c\n\x04name\x18\x01 \x01(\t\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\x45\n\x06labels\x18\x04 \x03(\x0b\x32\x35.google.cloud.video.livestream.v1.Channel.LabelsEntry\x12L\n\x11input_attachments\x18\x10 \x03(\x0b\x32\x31.google.cloud.video.livestream.v1.InputAttachment\x12\x19\n\x0c\x61\x63tive_input\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x06output\x18\t \x01(\x0b\x32\x30.google.cloud.video.livestream.v1.Channel.OutputB\x03\xe0\x41\x02\x12N\n\x12\x65lementary_streams\x18\n \x03(\x0b\x32\x32.google.cloud.video.livestream.v1.ElementaryStream\x12@\n\x0bmux_streams\x18\x0b \x03(\x0b\x32+.google.cloud.video.livestream.v1.MuxStream\x12=\n\tmanifests\x18\x0c \x03(\x0b\x32*.google.cloud.video.livestream.v1.Manifest\x12W\n\x14\x64istribution_streams\x18\x1c \x03(\x0b\x32\x34.google.cloud.video.livestream.v1.DistributionStreamB\x03\xe0\x41\x01\x12J\n\rdistributions\x18\x1d \x03(\x0b\x32..google.cloud.video.livestream.v1.DistributionB\x03\xe0\x41\x01\x12\x44\n\rsprite_sheets\x18\r \x03(\x0b\x32-.google.cloud.video.livestream.v1.SpriteSheet\x12V\n\x0fstreaming_state\x18\x0e \x01(\x0e\x32\x38.google.cloud.video.livestream.v1.Channel.StreamingStateB\x03\xe0\x41\x03\x12\x30\n\x0fstreaming_error\x18\x12 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12?\n\nlog_config\x18\x13 \x01(\x0b\x32+.google.cloud.video.livestream.v1.LogConfig\x12I\n\x0ftimecode_config\x18\x15 \x01(\x0b\x32\x30.google.cloud.video.livestream.v1.TimecodeConfig\x12\x46\n\x0b\x65ncryptions\x18\x18 \x03(\x0b\x32,.google.cloud.video.livestream.v1.EncryptionB\x03\xe0\x41\x01\x12\x43\n\x0cinput_config\x18\x19 \x01(\x0b\x32-.google.cloud.video.livestream.v1.InputConfig\x12P\n\x10retention_config\x18\x1a \x01(\x0b\x32\x31.google.cloud.video.livestream.v1.RetentionConfigB\x03\xe0\x41\x01\x12M\n\x0fstatic_overlays\x18\x1b \x03(\x0b\x32/.google.cloud.video.livestream.v1.StaticOverlayB\x03\xe0\x41\x01\x12\x61\n\x19\x61uto_transcription_config\x18\x1e \x01(\x0b\x32\x39.google.cloud.video.livestream.v1.AutoTranscriptionConfigB\x03\xe0\x41\x01\x1a\x15\n\x06Output\x12\x0b\n\x03uri\x18\x01 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xaa\x01\n\x0eStreamingState\x12\x1f\n\x1bSTREAMING_STATE_UNSPECIFIED\x10\x00\x12\r\n\tSTREAMING\x10\x01\x12\x12\n\x0e\x41WAITING_INPUT\x10\x02\x12\x13\n\x0fSTREAMING_ERROR\x10\x04\x12\x16\n\x12STREAMING_NO_INPUT\x10\x05\x12\x0b\n\x07STOPPED\x10\x06\x12\x0c\n\x08STARTING\x10\x07\x12\x0c\n\x08STOPPING\x10\x08:b\xea\x41_\n!livestream.googleapis.com/Channel\x12:projects/{project}/locations/{location}/channels/{channel}\"6\n\x14NormalizedCoordinate\x12\x0e\n\x01x\x18\x01 \x01(\x01\x42\x03\xe0\x41\x01\x12\x0e\n\x01y\x18\x02 \x01(\x01\x42\x03\xe0\x41\x01\"6\n\x14NormalizedResolution\x12\x0e\n\x01w\x18\x01 \x01(\x01\x42\x03\xe0\x41\x01\x12\x0e\n\x01h\x18\x02 \x01(\x01\x42\x03\xe0\x41\x01\"\xfd\x01\n\rStaticOverlay\x12\x36\n\x05\x61sset\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1flivestream.googleapis.com/Asset\x12O\n\nresolution\x18\x02 \x01(\x0b\x32\x36.google.cloud.video.livestream.v1.NormalizedResolutionB\x03\xe0\x41\x01\x12M\n\x08position\x18\x03 \x01(\x0b\x32\x36.google.cloud.video.livestream.v1.NormalizedCoordinateB\x03\xe0\x41\x01\x12\x14\n\x07opacity\x18\x04 \x01(\x01\x42\x03\xe0\x41\x01\"\xc6\x01\n\x0bInputConfig\x12X\n\x11input_switch_mode\x18\x01 \x01(\x0e\x32=.google.cloud.video.livestream.v1.InputConfig.InputSwitchMode\"]\n\x0fInputSwitchMode\x12!\n\x1dINPUT_SWITCH_MODE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x46\x41ILOVER_PREFER_PRIMARY\x10\x01\x12\n\n\x06MANUAL\x10\x03\"\xc0\x01\n\tLogConfig\x12M\n\x0clog_severity\x18\x01 \x01(\x0e\x32\x37.google.cloud.video.livestream.v1.LogConfig.LogSeverity\"d\n\x0bLogSeverity\x12\x1c\n\x18LOG_SEVERITY_UNSPECIFIED\x10\x00\x12\x07\n\x03OFF\x10\x01\x12\t\n\x05\x44\x45\x42UG\x10\x64\x12\t\n\x04INFO\x10\xc8\x01\x12\x0c\n\x07WARNING\x10\x90\x03\x12\n\n\x05\x45RROR\x10\xf4\x03\"O\n\x0fRetentionConfig\x12<\n\x19retention_window_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xea\x01\n\x13InputStreamProperty\x12\x37\n\x13last_establish_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12L\n\rvideo_streams\x18\x02 \x03(\x0b\x32\x35.google.cloud.video.livestream.v1.VideoStreamProperty\x12L\n\raudio_streams\x18\x03 \x03(\x0b\x32\x35.google.cloud.video.livestream.v1.AudioStreamProperty\"i\n\x13VideoStreamProperty\x12\r\n\x05index\x18\x01 \x01(\x05\x12\x43\n\x0cvideo_format\x18\x02 \x01(\x0b\x32-.google.cloud.video.livestream.v1.VideoFormat\"]\n\x0bVideoFormat\x12\r\n\x05\x63odec\x18\x01 \x01(\t\x12\x14\n\x0cwidth_pixels\x18\x02 \x01(\x05\x12\x15\n\rheight_pixels\x18\x03 \x01(\x05\x12\x12\n\nframe_rate\x18\x04 \x01(\x01\"i\n\x13\x41udioStreamProperty\x12\r\n\x05index\x18\x01 \x01(\x05\x12\x43\n\x0c\x61udio_format\x18\x02 \x01(\x0b\x32-.google.cloud.video.livestream.v1.AudioFormat\"K\n\x0b\x41udioFormat\x12\r\n\x05\x63odec\x18\x01 \x01(\t\x12\x15\n\rchannel_count\x18\x02 \x01(\x05\x12\x16\n\x0e\x63hannel_layout\x18\x03 \x03(\t\"\xdd\x01\n\x0fInputAttachment\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x33\n\x05input\x18\x02 \x01(\tB$\xfa\x41!\n\x1flivestream.googleapis.com/Input\x12_\n\x12\x61utomatic_failover\x18\x03 \x01(\x0b\x32\x43.google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover\x1a\'\n\x11\x41utomaticFailover\x12\x12\n\ninput_keys\x18\x01 \x03(\t\"\x99\x03\n\x17\x41utoTranscriptionConfig\x12\x64\n\x0e\x64isplay_timing\x18\x01 \x01(\x0e\x32G.google.cloud.video.livestream.v1.AutoTranscriptionConfig.DisplayTimingB\x03\xe0\x41\x01\x12\x64\n\x0equality_preset\x18\x02 \x01(\x0e\x32G.google.cloud.video.livestream.v1.AutoTranscriptionConfig.QualityPresetB\x03\xe0\x41\x01\"D\n\rDisplayTiming\x12\x1e\n\x1a\x44ISPLAY_TIMING_UNSPECIFIED\x10\x00\x12\t\n\x05\x41SYNC\x10\x01\x12\x08\n\x04SYNC\x10\x02\"l\n\rQualityPreset\x12\x1e\n\x1aQUALITY_PRESET_UNSPECIFIED\x10\x00\x12\x0f\n\x0bLOW_LATENCY\x10\x01\x12\x14\n\x10\x42\x41LANCED_QUALITY\x10\x02\x12\x14\n\x10IMPROVED_QUALITY\x10\x03\"\xc6\x0c\n\x05\x45vent\x12\x0c\n\x04name\x18\x01 \x01(\t\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\x33.google.cloud.video.livestream.v1.Event.LabelsEntry\x12O\n\x0cinput_switch\x18\x05 \x01(\x0b\x32\x37.google.cloud.video.livestream.v1.Event.InputSwitchTaskH\x00\x12G\n\x08\x61\x64_break\x18\x06 \x01(\x0b\x32\x33.google.cloud.video.livestream.v1.Event.AdBreakTaskH\x00\x12X\n\x11return_to_program\x18\r \x01(\x0b\x32;.google.cloud.video.livestream.v1.Event.ReturnToProgramTaskH\x00\x12\x42\n\x05slate\x18\x0e \x01(\x0b\x32\x31.google.cloud.video.livestream.v1.Event.SlateTaskH\x00\x12@\n\x04mute\x18\x0f \x01(\x0b\x32\x30.google.cloud.video.livestream.v1.Event.MuteTaskH\x00\x12\x44\n\x06unmute\x18\x10 \x01(\x0b\x32\x32.google.cloud.video.livestream.v1.Event.UnmuteTaskH\x00\x12[\n\x12update_encryptions\x18\x11 \x01(\x0b\x32=.google.cloud.video.livestream.v1.Event.UpdateEncryptionsTaskH\x00\x12\x13\n\x0b\x65xecute_now\x18\t \x01(\x08\x12\x32\n\x0e\x65xecution_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x41\n\x05state\x18\x0b \x01(\x0e\x32-.google.cloud.video.livestream.v1.Event.StateB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\x0c \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x1a$\n\x0fInputSwitchTask\x12\x11\n\tinput_key\x18\x01 \x01(\t\x1a:\n\x0b\x41\x64\x42reakTask\x12+\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x1am\n\tSlateTask\x12+\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x33\n\x05\x61sset\x18\x02 \x01(\tB$\xfa\x41!\n\x1flivestream.googleapis.com/Asset\x1a\x15\n\x13ReturnToProgramTask\x1a\x37\n\x08MuteTask\x12+\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x0c\n\nUnmuteTask\x1a\x65\n\x15UpdateEncryptionsTask\x12L\n\x0b\x65ncryptions\x18\x01 \x03(\x0b\x32\x32.google.cloud.video.livestream.v1.EncryptionUpdateB\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\"o\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSCHEDULED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0b\n\x07PENDING\x10\x05\x12\x0b\n\x07STOPPED\x10\x06:o\xea\x41l\n\x1flivestream.googleapis.com/Event\x12Iprojects/{project}/locations/{location}/channels/{channel}/events/{event}B\x06\n\x04task\"\x96\t\n\x04\x43lip\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_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\x06labels\x18\x05 \x03(\x0b\x32\x32.google.cloud.video.livestream.v1.Clip.LabelsEntry\x12@\n\x05state\x18\x06 \x01(\x0e\x32,.google.cloud.video.livestream.v1.Clip.StateB\x03\xe0\x41\x03\x12\x12\n\noutput_uri\x18\x07 \x01(\t\x12&\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12<\n\x06slices\x18\n \x03(\x0b\x32,.google.cloud.video.livestream.v1.Clip.Slice\x12P\n\x0e\x63lip_manifests\x18\x0c \x03(\x0b\x32\x33.google.cloud.video.livestream.v1.Clip.ClipManifestB\x03\xe0\x41\x02\x12K\n\x0boutput_type\x18\r \x01(\x0e\x32\x31.google.cloud.video.livestream.v1.Clip.OutputTypeB\x03\xe0\x41\x01\x1an\n\tTimeSlice\x12/\n\x0bmarkin_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cmarkout_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aW\n\x05Slice\x12\x46\n\ntime_slice\x18\x01 \x01(\x0b\x32\x30.google.cloud.video.livestream.v1.Clip.TimeSliceH\x00\x42\x06\n\x04kind\x1a\x42\n\x0c\x43lipManifest\x12\x19\n\x0cmanifest_key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\noutput_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"T\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\"@\n\nOutputType\x12\x1b\n\x17OUTPUT_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08MANIFEST\x10\x01\x12\x07\n\x03MP4\x10\x02:l\xea\x41i\n\x1elivestream.googleapis.com/Clip\x12Gprojects/{project}/locations/{location}/channels/{channel}/clips/{clip}\"v\n\x0cTimeInterval\x12\x33\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"\x8c\x08\n\nDvrSession\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\x12M\n\x06labels\x18\x04 \x03(\x0b\x32\x38.google.cloud.video.livestream.v1.DvrSession.LabelsEntryB\x03\xe0\x41\x01\x12\x46\n\x05state\x18\x05 \x01(\x0e\x32\x32.google.cloud.video.livestream.v1.DvrSession.StateB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\x06 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12T\n\rdvr_manifests\x18\x07 \x03(\x0b\x32\x38.google.cloud.video.livestream.v1.DvrSession.DvrManifestB\x03\xe0\x41\x02\x12P\n\x0b\x64vr_windows\x18\x08 \x03(\x0b\x32\x36.google.cloud.video.livestream.v1.DvrSession.DvrWindowB\x03\xe0\x41\x02\x1a\x41\n\x0b\x44vrManifest\x12\x19\n\x0cmanifest_key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\noutput_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a\\\n\tDvrWindow\x12G\n\rtime_interval\x18\x01 \x01(\x0b\x32..google.cloud.video.livestream.v1.TimeIntervalH\x00\x42\x06\n\x04kind\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xab\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08UPDATING\x10\x02\x12\r\n\tSCHEDULED\x10\x03\x12\x08\n\x04LIVE\x10\x04\x12\x0c\n\x08\x46INISHED\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\x0c\n\x08\x44\x45LETING\x10\x07\x12\x13\n\x0fPOST_PROCESSING\x10\x08\x12\x0c\n\x08\x43OOLDOWN\x10\t\x12\x0c\n\x08STOPPING\x10\n:\x99\x01\xea\x41\x95\x01\n$livestream.googleapis.com/DvrSession\x12Tprojects/{project}/locations/{location}/channels/{channel}/dvrSessions/{dvr_session}*\x0b\x64vrSessions2\ndvrSession\"\xed\x05\n\x05\x41sset\x12\x0c\n\x04name\x18\x01 \x01(\t\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\x33.google.cloud.video.livestream.v1.Asset.LabelsEntry\x12\x43\n\x05video\x18\x05 \x01(\x0b\x32\x32.google.cloud.video.livestream.v1.Asset.VideoAssetH\x00\x12\x43\n\x05image\x18\x06 \x01(\x0b\x32\x32.google.cloud.video.livestream.v1.Asset.ImageAssetH\x00\x12\x0e\n\x06\x63rc32c\x18\x07 \x01(\t\x12\x41\n\x05state\x18\x08 \x01(\x0e\x32-.google.cloud.video.livestream.v1.Asset.StateB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x1a\x19\n\nVideoAsset\x12\x0b\n\x03uri\x18\x01 \x01(\t\x1a\x19\n\nImageAsset\x12\x0b\n\x03uri\x18\x01 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\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\x0c\n\x08\x44\x45LETING\x10\x03\x12\t\n\x05\x45RROR\x10\x04:\\\xea\x41Y\n\x1flivestream.googleapis.com/Asset\x12\x36projects/{project}/locations/{location}/assets/{asset}B\n\n\x08resource\"\xb1\x08\n\nEncryption\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x65\n\x19secret_manager_key_source\x18\x07 \x01(\x0b\x32@.google.cloud.video.livestream.v1.Encryption.SecretManagerSourceH\x00\x12Q\n\x0b\x64rm_systems\x18\x03 \x01(\x0b\x32\x37.google.cloud.video.livestream.v1.Encryption.DrmSystemsB\x03\xe0\x41\x02\x12O\n\x06\x61\x65s128\x18\x04 \x01(\x0b\x32=.google.cloud.video.livestream.v1.Encryption.Aes128EncryptionH\x01\x12V\n\nsample_aes\x18\x05 \x01(\x0b\x32@.google.cloud.video.livestream.v1.Encryption.SampleAesEncryptionH\x01\x12V\n\tmpeg_cenc\x18\x06 \x01(\x0b\x32\x41.google.cloud.video.livestream.v1.Encryption.MpegCommonEncryptionH\x01\x1a\x61\n\x13SecretManagerSource\x12J\n\x0esecret_version\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x1a\n\n\x08Widevine\x1a\n\n\x08\x46\x61irplay\x1a\x0b\n\tPlayready\x1a\n\n\x08\x43learkey\x1a\xc6\x02\n\nDrmSystems\x12L\n\x08widevine\x18\x01 \x01(\x0b\x32\x35.google.cloud.video.livestream.v1.Encryption.WidevineB\x03\xe0\x41\x01\x12L\n\x08\x66\x61irplay\x18\x02 \x01(\x0b\x32\x35.google.cloud.video.livestream.v1.Encryption.FairplayB\x03\xe0\x41\x01\x12N\n\tplayready\x18\x03 \x01(\x0b\x32\x36.google.cloud.video.livestream.v1.Encryption.PlayreadyB\x03\xe0\x41\x01\x12L\n\x08\x63learkey\x18\x04 \x01(\x0b\x32\x35.google.cloud.video.livestream.v1.Encryption.ClearkeyB\x03\xe0\x41\x01\x1a\x12\n\x10\x41\x65s128Encryption\x1a\x15\n\x13SampleAesEncryption\x1a+\n\x14MpegCommonEncryption\x12\x13\n\x06scheme\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x0f\n\rsecret_sourceB\x11\n\x0f\x65ncryption_mode\"\x9b\x01\n\x10\x45ncryptionUpdate\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x65\n\x19secret_manager_key_source\x18\x02 \x01(\x0b\x32@.google.cloud.video.livestream.v1.Encryption.SecretManagerSourceH\x00\x42\x0f\n\rsecret_source\"\xea\x03\n\x04Pool\x12\x0c\n\x04name\x18\x01 \x01(\t\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\x42\n\x06labels\x18\x04 \x03(\x0b\x32\x32.google.cloud.video.livestream.v1.Pool.LabelsEntry\x12L\n\x0enetwork_config\x18\x05 \x01(\x0b\x32\x34.google.cloud.video.livestream.v1.Pool.NetworkConfig\x1aL\n\rNetworkConfig\x12;\n\x0epeered_network\x18\x01 \x01(\tB#\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:Y\xea\x41V\n\x1elivestream.googleapis.com/Pool\x12\x34projects/{project}/locations/{location}/pools/{pool}B\xeb\x01\n$com.google.cloud.video.livestream.v1B\x0eResourcesProtoP\x01ZDcloud.google.com/go/video/livestream/apiv1/livestreampb;livestreampb\xaa\x02 Google.Cloud.Video.LiveStream.V1\xca\x02 Google\\Cloud\\Video\\LiveStream\\V1\xea\x02$Google::Cloud::Video::LiveStream::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Video - module LiveStream - module V1 - Input = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Input").msgclass - Input::SecurityRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Input.SecurityRule").msgclass - Input::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Input.Type").enummodule - Input::Tier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Input.Tier").enummodule - Channel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Channel").msgclass - Channel::Output = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Channel.Output").msgclass - Channel::StreamingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Channel.StreamingState").enummodule - NormalizedCoordinate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.NormalizedCoordinate").msgclass - NormalizedResolution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.NormalizedResolution").msgclass - StaticOverlay = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.StaticOverlay").msgclass - InputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.InputConfig").msgclass - InputConfig::InputSwitchMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.InputConfig.InputSwitchMode").enummodule - LogConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.LogConfig").msgclass - LogConfig::LogSeverity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.LogConfig.LogSeverity").enummodule - RetentionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.RetentionConfig").msgclass - InputStreamProperty = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.InputStreamProperty").msgclass - VideoStreamProperty = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.VideoStreamProperty").msgclass - VideoFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.VideoFormat").msgclass - AudioStreamProperty = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.AudioStreamProperty").msgclass - AudioFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.AudioFormat").msgclass - InputAttachment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.InputAttachment").msgclass - InputAttachment::AutomaticFailover = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover").msgclass - AutoTranscriptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.AutoTranscriptionConfig").msgclass - AutoTranscriptionConfig::DisplayTiming = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.AutoTranscriptionConfig.DisplayTiming").enummodule - AutoTranscriptionConfig::QualityPreset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.AutoTranscriptionConfig.QualityPreset").enummodule - Event = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Event").msgclass - Event::InputSwitchTask = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Event.InputSwitchTask").msgclass - Event::AdBreakTask = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Event.AdBreakTask").msgclass - Event::SlateTask = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Event.SlateTask").msgclass - Event::ReturnToProgramTask = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Event.ReturnToProgramTask").msgclass - Event::MuteTask = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Event.MuteTask").msgclass - Event::UnmuteTask = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Event.UnmuteTask").msgclass - Event::UpdateEncryptionsTask = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Event.UpdateEncryptionsTask").msgclass - Event::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Event.State").enummodule - Clip = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Clip").msgclass - Clip::TimeSlice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Clip.TimeSlice").msgclass - Clip::Slice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Clip.Slice").msgclass - Clip::ClipManifest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Clip.ClipManifest").msgclass - Clip::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Clip.State").enummodule - Clip::OutputType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Clip.OutputType").enummodule - TimeInterval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.TimeInterval").msgclass - DvrSession = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.DvrSession").msgclass - DvrSession::DvrManifest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.DvrSession.DvrManifest").msgclass - DvrSession::DvrWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.DvrSession.DvrWindow").msgclass - DvrSession::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.DvrSession.State").enummodule - Asset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Asset").msgclass - Asset::VideoAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Asset.VideoAsset").msgclass - Asset::ImageAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Asset.ImageAsset").msgclass - Asset::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Asset.State").enummodule - Encryption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Encryption").msgclass - Encryption::SecretManagerSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Encryption.SecretManagerSource").msgclass - Encryption::Widevine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Encryption.Widevine").msgclass - Encryption::Fairplay = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Encryption.Fairplay").msgclass - Encryption::Playready = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Encryption.Playready").msgclass - Encryption::Clearkey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Encryption.Clearkey").msgclass - Encryption::DrmSystems = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Encryption.DrmSystems").msgclass - Encryption::Aes128Encryption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Encryption.Aes128Encryption").msgclass - Encryption::SampleAesEncryption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Encryption.SampleAesEncryption").msgclass - Encryption::MpegCommonEncryption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption").msgclass - EncryptionUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.EncryptionUpdate").msgclass - Pool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Pool").msgclass - Pool::NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.Pool.NetworkConfig").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/service_pb.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/service_pb.rb deleted file mode 100644 index ce89bdaa2ec1..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/service_pb.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/video/livestream/v1/service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/cloud/video/livestream/v1/resources_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/video/livestream/v1/service.proto\x12 google.cloud.video.livestream.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/video/livestream/v1/resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb5\x01\n\x12\x43reateAssetRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1flivestream.googleapis.com/Asset\x12;\n\x05\x61sset\x18\x02 \x01(\x0b\x32\'.google.cloud.video.livestream.v1.AssetB\x03\xe0\x41\x02\x12\x15\n\x08\x61sset_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"_\n\x12\x44\x65leteAssetRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1flivestream.googleapis.com/Asset\x12\x12\n\nrequest_id\x18\x02 \x01(\t\"\x95\x01\n\x11ListAssetsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1flivestream.googleapis.com/Asset\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\x12ListAssetsResponse\x12\x37\n\x06\x61ssets\x18\x01 \x03(\x0b\x32\'.google.cloud.video.livestream.v1.Asset\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"H\n\x0fGetAssetRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1flivestream.googleapis.com/Asset\"\xbf\x01\n\x14\x43reateChannelRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!livestream.googleapis.com/Channel\x12?\n\x07\x63hannel\x18\x02 \x01(\x0b\x32).google.cloud.video.livestream.v1.ChannelB\x03\xe0\x41\x02\x12\x17\n\nchannel_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"\x99\x01\n\x13ListChannelsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!livestream.googleapis.com/Channel\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\"\x81\x01\n\x14ListChannelsResponse\x12;\n\x08\x63hannels\x18\x01 \x03(\x0b\x32).google.cloud.video.livestream.v1.Channel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"L\n\x11GetChannelRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!livestream.googleapis.com/Channel\"r\n\x14\x44\x65leteChannelRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!livestream.googleapis.com/Channel\x12\x12\n\nrequest_id\x18\x02 \x01(\t\x12\r\n\x05\x66orce\x18\x03 \x01(\x08\"\x9c\x01\n\x14UpdateChannelRequest\x12/\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12?\n\x07\x63hannel\x18\x02 \x01(\x0b\x32).google.cloud.video.livestream.v1.ChannelB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x03 \x01(\t\"b\n\x13StartChannelRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!livestream.googleapis.com/Channel\x12\x12\n\nrequest_id\x18\x02 \x01(\t\"a\n\x12StopChannelRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!livestream.googleapis.com/Channel\x12\x12\n\nrequest_id\x18\x02 \x01(\t\"\x94\x01\n\x18StartDistributionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!livestream.googleapis.com/Channel\x12\x1e\n\x11\x64istribution_keys\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x93\x01\n\x17StopDistributionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!livestream.googleapis.com/Channel\x12\x1e\n\x11\x64istribution_keys\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb5\x01\n\x12\x43reateInputRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1flivestream.googleapis.com/Input\x12;\n\x05input\x18\x02 \x01(\x0b\x32\'.google.cloud.video.livestream.v1.InputB\x03\xe0\x41\x02\x12\x15\n\x08input_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"\x95\x01\n\x11ListInputsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1flivestream.googleapis.com/Input\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\x12ListInputsResponse\x12\x37\n\x06inputs\x18\x01 \x03(\x0b\x32\'.google.cloud.video.livestream.v1.Input\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"H\n\x0fGetInputRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1flivestream.googleapis.com/Input\"_\n\x12\x44\x65leteInputRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1flivestream.googleapis.com/Input\x12\x12\n\nrequest_id\x18\x02 \x01(\t\"\x96\x01\n\x12UpdateInputRequest\x12/\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12;\n\x05input\x18\x02 \x01(\x0b\x32\'.google.cloud.video.livestream.v1.InputB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x03 \x01(\t\"\xb5\x01\n\x12\x43reateEventRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1flivestream.googleapis.com/Event\x12;\n\x05\x65vent\x18\x02 \x01(\x0b\x32\'.google.cloud.video.livestream.v1.EventB\x03\xe0\x41\x02\x12\x15\n\x08\x65vent_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"\x95\x01\n\x11ListEventsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1flivestream.googleapis.com/Event\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\x12ListEventsResponse\x12\x37\n\x06\x65vents\x18\x01 \x03(\x0b\x32\'.google.cloud.video.livestream.v1.Event\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"H\n\x0fGetEventRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1flivestream.googleapis.com/Event\"_\n\x12\x44\x65leteEventRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1flivestream.googleapis.com/Event\x12\x12\n\nrequest_id\x18\x02 \x01(\t\"\x1a\n\x18\x43hannelOperationResponse\"\x93\x01\n\x10ListClipsRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1elivestream.googleapis.com/Clip\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\"x\n\x11ListClipsResponse\x12\x35\n\x05\x63lips\x18\x01 \x03(\x0b\x32&.google.cloud.video.livestream.v1.Clip\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"F\n\x0eGetClipRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elivestream.googleapis.com/Clip\"\xb5\x01\n\x11\x43reateClipRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1elivestream.googleapis.com/Clip\x12\x14\n\x07\x63lip_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x04\x63lip\x18\x03 \x01(\x0b\x32&.google.cloud.video.livestream.v1.ClipB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"j\n\x11\x44\x65leteClipRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elivestream.googleapis.com/Clip\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb3\x01\n\x16ListDvrSessionsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$livestream.googleapis.com/DvrSession\x12\x16\n\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\x17ListDvrSessionsResponse\x12\x42\n\x0c\x64vr_sessions\x18\x01 \x03(\x0b\x32,.google.cloud.video.livestream.v1.DvrSession\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"R\n\x14GetDvrSessionRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$livestream.googleapis.com/DvrSession\"\xdd\x01\n\x17\x43reateDvrSessionRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$livestream.googleapis.com/DvrSession\x12\x1b\n\x0e\x64vr_session_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x46\n\x0b\x64vr_session\x18\x03 \x01(\x0b\x32,.google.cloud.video.livestream.v1.DvrSessionB\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\"v\n\x17\x44\x65leteDvrSessionRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$livestream.googleapis.com/DvrSession\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb8\x01\n\x17UpdateDvrSessionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x46\n\x0b\x64vr_session\x18\x02 \x01(\x0b\x32,.google.cloud.video.livestream.v1.DvrSessionB\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\"\xe3\x01\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#\n\x16requested_cancellation\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x06 \x01(\tB\x03\xe0\x41\x03\"F\n\x0eGetPoolRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elivestream.googleapis.com/Pool\"\x93\x01\n\x11UpdatePoolRequest\x12/\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x39\n\x04pool\x18\x02 \x01(\x0b\x32&.google.cloud.video.livestream.v1.PoolB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x03 \x01(\t\"L\n\x13PreviewInputRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1flivestream.googleapis.com/Input\"9\n\x14PreviewInputResponse\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x14\n\x0c\x62\x65\x61rer_token\x18\x02 \x01(\t2\xb8\x37\n\x11LivestreamService\x12\xe0\x01\n\rCreateChannel\x12\x36.google.cloud.video.livestream.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\xbc\x01\n\x0cListChannels\x12\x35.google.cloud.video.livestream.v1.ListChannelsRequest\x1a\x36.google.cloud.video.livestream.v1.ListChannelsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/channels\x12\xa9\x01\n\nGetChannel\x12\x33.google.cloud.video.livestream.v1.GetChannelRequest\x1a).google.cloud.video.livestream.v1.Channel\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/channels/*}\x12\xd0\x01\n\rDeleteChannel\x12\x36.google.cloud.video.livestream.v1.DeleteChannelRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/channels/*}\x12\xe2\x01\n\rUpdateChannel\x12\x36.google.cloud.video.livestream.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\xda\x01\n\x0cStartChannel\x12\x35.google.cloud.video.livestream.v1.StartChannelRequest\x1a\x1d.google.longrunning.Operation\"t\xca\x41-\n\x18\x43hannelOperationResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\"2/v1/{name=projects/*/locations/*/channels/*}:start:\x01*\x12\xd7\x01\n\x0bStopChannel\x12\x34.google.cloud.video.livestream.v1.StopChannelRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41-\n\x18\x43hannelOperationResponse\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/locations/*/channels/*}:stop:\x01*\x12\x83\x02\n\x11StartDistribution\x12:.google.cloud.video.livestream.v1.StartDistributionRequest\x1a\x1d.google.longrunning.Operation\"\x92\x01\xca\x41-\n\x18\x43hannelOperationResponse\x12\x11OperationMetadata\xda\x41\x16name,distribution_keys\x82\xd3\xe4\x93\x02\x43\">/v1/{name=projects/*/locations/*/channels/*}:startdistribution:\x01*\x12\x80\x02\n\x10StopDistribution\x12\x39.google.cloud.video.livestream.v1.StopDistributionRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41-\n\x18\x43hannelOperationResponse\x12\x11OperationMetadata\xda\x41\x16name,distribution_keys\x82\xd3\xe4\x93\x02\x42\"=/v1/{name=projects/*/locations/*/channels/*}:stopdistribution:\x01*\x12\xd2\x01\n\x0b\x43reateInput\x12\x34.google.cloud.video.livestream.v1.CreateInputRequest\x1a\x1d.google.longrunning.Operation\"n\xca\x41\x1a\n\x05Input\x12\x11OperationMetadata\xda\x41\x15parent,input,input_id\x82\xd3\xe4\x93\x02\x33\"*/v1/{parent=projects/*/locations/*}/inputs:\x05input\x12\xb4\x01\n\nListInputs\x12\x33.google.cloud.video.livestream.v1.ListInputsRequest\x1a\x34.google.cloud.video.livestream.v1.ListInputsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/inputs\x12\xa1\x01\n\x08GetInput\x12\x31.google.cloud.video.livestream.v1.GetInputRequest\x1a\'.google.cloud.video.livestream.v1.Input\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/inputs/*}\x12\xca\x01\n\x0b\x44\x65leteInput\x12\x34.google.cloud.video.livestream.v1.DeleteInputRequest\x1a\x1d.google.longrunning.Operation\"f\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/inputs/*}\x12\xd4\x01\n\x0bUpdateInput\x12\x34.google.cloud.video.livestream.v1.UpdateInputRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41\x1a\n\x05Input\x12\x11OperationMetadata\xda\x41\x11input,update_mask\x82\xd3\xe4\x93\x02\x39\x32\x30/v1/{input.name=projects/*/locations/*/inputs/*}:\x05input\x12\xc3\x01\n\x0cPreviewInput\x12\x35.google.cloud.video.livestream.v1.PreviewInputRequest\x1a\x36.google.cloud.video.livestream.v1.PreviewInputResponse\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\"2/v1/{name=projects/*/locations/*/inputs/*}:preview:\x01*\x12\xca\x01\n\x0b\x43reateEvent\x12\x34.google.cloud.video.livestream.v1.CreateEventRequest\x1a\'.google.cloud.video.livestream.v1.Event\"\\\xda\x41\x15parent,event,event_id\x82\xd3\xe4\x93\x02>\"5/v1/{parent=projects/*/locations/*/channels/*}/events:\x05\x65vent\x12\xbf\x01\n\nListEvents\x12\x33.google.cloud.video.livestream.v1.ListEventsRequest\x1a\x34.google.cloud.video.livestream.v1.ListEventsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*/channels/*}/events\x12\xac\x01\n\x08GetEvent\x12\x31.google.cloud.video.livestream.v1.GetEventRequest\x1a\'.google.cloud.video.livestream.v1.Event\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/channels/*/events/*}\x12\xa1\x01\n\x0b\x44\x65leteEvent\x12\x34.google.cloud.video.livestream.v1.DeleteEventRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/channels/*/events/*}\x12\xbb\x01\n\tListClips\x12\x32.google.cloud.video.livestream.v1.ListClipsRequest\x1a\x33.google.cloud.video.livestream.v1.ListClipsResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*/channels/*}/clips\x12\xa8\x01\n\x07GetClip\x12\x30.google.cloud.video.livestream.v1.GetClipRequest\x1a&.google.cloud.video.livestream.v1.Clip\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/channels/*/clips/*}\x12\xd6\x01\n\nCreateClip\x12\x33.google.cloud.video.livestream.v1.CreateClipRequest\x1a\x1d.google.longrunning.Operation\"t\xca\x41\x19\n\x04\x43lip\x12\x11OperationMetadata\xda\x41\x13parent,clip,clip_id\x82\xd3\xe4\x93\x02<\"4/v1/{parent=projects/*/locations/*/channels/*}/clips:\x04\x63lip\x12\xd2\x01\n\nDeleteClip\x12\x33.google.cloud.video.livestream.v1.DeleteClipRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36*4/v1/{name=projects/*/locations/*/channels/*/clips/*}\x12\x84\x02\n\x10\x43reateDvrSession\x12\x39.google.cloud.video.livestream.v1.CreateDvrSessionRequest\x1a\x1d.google.longrunning.Operation\"\x95\x01\xca\x41\x1f\n\nDvrSession\x12\x11OperationMetadata\xda\x41!parent,dvr_session,dvr_session_id\x82\xd3\xe4\x93\x02I\":/v1/{parent=projects/*/locations/*/channels/*}/dvrSessions:\x0b\x64vr_session\x12\xd3\x01\n\x0fListDvrSessions\x12\x38.google.cloud.video.livestream.v1.ListDvrSessionsRequest\x1a\x39.google.cloud.video.livestream.v1.ListDvrSessionsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/channels/*}/dvrSessions\x12\xc0\x01\n\rGetDvrSession\x12\x36.google.cloud.video.livestream.v1.GetDvrSessionRequest\x1a,.google.cloud.video.livestream.v1.DvrSession\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/channels/*/dvrSessions/*}\x12\xe4\x01\n\x10\x44\x65leteDvrSession\x12\x39.google.cloud.video.livestream.v1.DeleteDvrSessionRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/channels/*/dvrSessions/*}\x12\x86\x02\n\x10UpdateDvrSession\x12\x39.google.cloud.video.livestream.v1.UpdateDvrSessionRequest\x1a\x1d.google.longrunning.Operation\"\x97\x01\xca\x41\x1f\n\nDvrSession\x12\x11OperationMetadata\xda\x41\x17\x64vr_session,update_mask\x82\xd3\xe4\x93\x02U2F/v1/{dvr_session.name=projects/*/locations/*/channels/*/dvrSessions/*}:\x0b\x64vr_session\x12\xd2\x01\n\x0b\x43reateAsset\x12\x34.google.cloud.video.livestream.v1.CreateAssetRequest\x1a\x1d.google.longrunning.Operation\"n\xca\x41\x1a\n\x05\x41sset\x12\x11OperationMetadata\xda\x41\x15parent,asset,asset_id\x82\xd3\xe4\x93\x02\x33\"*/v1/{parent=projects/*/locations/*}/assets:\x05\x61sset\x12\xca\x01\n\x0b\x44\x65leteAsset\x12\x34.google.cloud.video.livestream.v1.DeleteAssetRequest\x1a\x1d.google.longrunning.Operation\"f\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/assets/*}\x12\xa1\x01\n\x08GetAsset\x12\x31.google.cloud.video.livestream.v1.GetAssetRequest\x1a\'.google.cloud.video.livestream.v1.Asset\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/assets/*}\x12\xb4\x01\n\nListAssets\x12\x33.google.cloud.video.livestream.v1.ListAssetsRequest\x1a\x34.google.cloud.video.livestream.v1.ListAssetsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/assets\x12\x9d\x01\n\x07GetPool\x12\x30.google.cloud.video.livestream.v1.GetPoolRequest\x1a&.google.cloud.video.livestream.v1.Pool\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+\x12)/v1/{name=projects/*/locations/*/pools/*}\x12\xcd\x01\n\nUpdatePool\x12\x33.google.cloud.video.livestream.v1.UpdatePoolRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41\x19\n\x04Pool\x12\x11OperationMetadata\xda\x41\x10pool,update_mask\x82\xd3\xe4\x93\x02\x36\x32./v1/{pool.name=projects/*/locations/*/pools/*}:\x04pool\x1aM\xca\x41\x19livestream.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa1\x03\n$com.google.cloud.video.livestream.v1B\x0cServiceProtoP\x01ZDcloud.google.com/go/video/livestream/apiv1/livestreampb;livestreampb\xaa\x02 Google.Cloud.Video.LiveStream.V1\xca\x02 Google\\Cloud\\Video\\LiveStream\\V1\xea\x02$Google::Cloud::Video::LiveStream::V1\xea\x41\x64\n*secretmanager.googleapis.com/SecretVersion\x12\x36projects/{project}/secrets/{secret}/versions/{version}\xea\x41N\n\x1e\x63ompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Video - module LiveStream - module V1 - CreateAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.CreateAssetRequest").msgclass - DeleteAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.DeleteAssetRequest").msgclass - ListAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ListAssetsRequest").msgclass - ListAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ListAssetsResponse").msgclass - GetAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.GetAssetRequest").msgclass - CreateChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.CreateChannelRequest").msgclass - ListChannelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ListChannelsRequest").msgclass - ListChannelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ListChannelsResponse").msgclass - GetChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.GetChannelRequest").msgclass - DeleteChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.DeleteChannelRequest").msgclass - UpdateChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.UpdateChannelRequest").msgclass - StartChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.StartChannelRequest").msgclass - StopChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.StopChannelRequest").msgclass - StartDistributionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.StartDistributionRequest").msgclass - StopDistributionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.StopDistributionRequest").msgclass - CreateInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.CreateInputRequest").msgclass - ListInputsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ListInputsRequest").msgclass - ListInputsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ListInputsResponse").msgclass - GetInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.GetInputRequest").msgclass - DeleteInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.DeleteInputRequest").msgclass - UpdateInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.UpdateInputRequest").msgclass - CreateEventRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.CreateEventRequest").msgclass - ListEventsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ListEventsRequest").msgclass - ListEventsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ListEventsResponse").msgclass - GetEventRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.GetEventRequest").msgclass - DeleteEventRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.DeleteEventRequest").msgclass - ChannelOperationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ChannelOperationResponse").msgclass - ListClipsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ListClipsRequest").msgclass - ListClipsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ListClipsResponse").msgclass - GetClipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.GetClipRequest").msgclass - CreateClipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.CreateClipRequest").msgclass - DeleteClipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.DeleteClipRequest").msgclass - ListDvrSessionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ListDvrSessionsRequest").msgclass - ListDvrSessionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.ListDvrSessionsResponse").msgclass - GetDvrSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.GetDvrSessionRequest").msgclass - CreateDvrSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.CreateDvrSessionRequest").msgclass - DeleteDvrSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.DeleteDvrSessionRequest").msgclass - UpdateDvrSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.UpdateDvrSessionRequest").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.OperationMetadata").msgclass - GetPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.GetPoolRequest").msgclass - UpdatePoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.UpdatePoolRequest").msgclass - PreviewInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.PreviewInputRequest").msgclass - PreviewInputResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.livestream.v1.PreviewInputResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/service_services_pb.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/service_services_pb.rb deleted file mode 100644 index 23027c3880c5..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/lib/google/cloud/video/livestream/v1/service_services_pb.rb +++ /dev/null @@ -1,123 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/video/livestream/v1/service.proto for package 'Google.Cloud.Video.LiveStream.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/video/livestream/v1/service_pb' - -module Google - module Cloud - module Video - module LiveStream - module V1 - module LivestreamService - # Using Live Stream API, you can generate live streams in the various - # renditions and streaming formats. The streaming format include HTTP Live - # Streaming (HLS) and Dynamic Adaptive Streaming over HTTP (DASH). You can send - # a source stream in the various ways, including Real-Time Messaging - # Protocol (RTMP) and Secure Reliable Transport (SRT). - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.video.livestream.v1.LivestreamService' - - # Creates a channel with the provided unique ID in the specified - # region. - rpc :CreateChannel, ::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest, ::Google::Longrunning::Operation - # Returns a list of all channels in the specified region. - rpc :ListChannels, ::Google::Cloud::Video::LiveStream::V1::ListChannelsRequest, ::Google::Cloud::Video::LiveStream::V1::ListChannelsResponse - # Returns the specified channel. - rpc :GetChannel, ::Google::Cloud::Video::LiveStream::V1::GetChannelRequest, ::Google::Cloud::Video::LiveStream::V1::Channel - # Deletes the specified channel. - rpc :DeleteChannel, ::Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest, ::Google::Longrunning::Operation - # Updates the specified channel. - rpc :UpdateChannel, ::Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest, ::Google::Longrunning::Operation - # Starts the specified channel. Part of the video pipeline will be created - # only when the StartChannel request is received by the server. - rpc :StartChannel, ::Google::Cloud::Video::LiveStream::V1::StartChannelRequest, ::Google::Longrunning::Operation - # Stops the specified channel. Part of the video pipeline will be released - # when the StopChannel request is received by the server. - rpc :StopChannel, ::Google::Cloud::Video::LiveStream::V1::StopChannelRequest, ::Google::Longrunning::Operation - # Starts distribution which delivers outputs to the destination indicated by - # the Distribution configuration. - rpc :StartDistribution, ::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest, ::Google::Longrunning::Operation - # Stops the specified distribution. - rpc :StopDistribution, ::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest, ::Google::Longrunning::Operation - # Creates an input with the provided unique ID in the specified region. - rpc :CreateInput, ::Google::Cloud::Video::LiveStream::V1::CreateInputRequest, ::Google::Longrunning::Operation - # Returns a list of all inputs in the specified region. - rpc :ListInputs, ::Google::Cloud::Video::LiveStream::V1::ListInputsRequest, ::Google::Cloud::Video::LiveStream::V1::ListInputsResponse - # Returns the specified input. - rpc :GetInput, ::Google::Cloud::Video::LiveStream::V1::GetInputRequest, ::Google::Cloud::Video::LiveStream::V1::Input - # Deletes the specified input. - rpc :DeleteInput, ::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest, ::Google::Longrunning::Operation - # Updates the specified input. - rpc :UpdateInput, ::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest, ::Google::Longrunning::Operation - # Preview the streaming content of the specified input. - rpc :PreviewInput, ::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest, ::Google::Cloud::Video::LiveStream::V1::PreviewInputResponse - # Creates an event with the provided unique ID in the specified channel. - rpc :CreateEvent, ::Google::Cloud::Video::LiveStream::V1::CreateEventRequest, ::Google::Cloud::Video::LiveStream::V1::Event - # Returns a list of all events in the specified channel. - rpc :ListEvents, ::Google::Cloud::Video::LiveStream::V1::ListEventsRequest, ::Google::Cloud::Video::LiveStream::V1::ListEventsResponse - # Returns the specified event. - rpc :GetEvent, ::Google::Cloud::Video::LiveStream::V1::GetEventRequest, ::Google::Cloud::Video::LiveStream::V1::Event - # Deletes the specified event. - rpc :DeleteEvent, ::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest, ::Google::Protobuf::Empty - # Returns a list of all clips in the specified channel. - rpc :ListClips, ::Google::Cloud::Video::LiveStream::V1::ListClipsRequest, ::Google::Cloud::Video::LiveStream::V1::ListClipsResponse - # Returns the specified clip. - rpc :GetClip, ::Google::Cloud::Video::LiveStream::V1::GetClipRequest, ::Google::Cloud::Video::LiveStream::V1::Clip - # Creates a clip with the provided clip ID in the specified channel. - rpc :CreateClip, ::Google::Cloud::Video::LiveStream::V1::CreateClipRequest, ::Google::Longrunning::Operation - # Deletes the specified clip job resource. This method only deletes the clip - # job and does not delete the VOD clip stored in Cloud Storage. - rpc :DeleteClip, ::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest, ::Google::Longrunning::Operation - # Creates a DVR session with the provided unique ID in the specified channel. - rpc :CreateDvrSession, ::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest, ::Google::Longrunning::Operation - # Returns a list of all DVR sessions in the specified channel. - rpc :ListDvrSessions, ::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest, ::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsResponse - # Returns the specified DVR session. - rpc :GetDvrSession, ::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest, ::Google::Cloud::Video::LiveStream::V1::DvrSession - # Deletes the specified DVR session. - rpc :DeleteDvrSession, ::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest, ::Google::Longrunning::Operation - # Updates the specified DVR session. - rpc :UpdateDvrSession, ::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest, ::Google::Longrunning::Operation - # Creates a Asset with the provided unique ID in the specified - # region. - rpc :CreateAsset, ::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest, ::Google::Longrunning::Operation - # Deletes the specified asset if it is not used. - rpc :DeleteAsset, ::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest, ::Google::Longrunning::Operation - # Returns the specified asset. - rpc :GetAsset, ::Google::Cloud::Video::LiveStream::V1::GetAssetRequest, ::Google::Cloud::Video::LiveStream::V1::Asset - # Returns a list of all assets in the specified region. - rpc :ListAssets, ::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest, ::Google::Cloud::Video::LiveStream::V1::ListAssetsResponse - # Returns the specified pool. - rpc :GetPool, ::Google::Cloud::Video::LiveStream::V1::GetPoolRequest, ::Google::Cloud::Video::LiveStream::V1::Pool - # Updates the specified pool. - rpc :UpdatePool, ::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/README.md deleted file mode 100644 index 10dc79685a07..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Live Stream 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-video-live_stream-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # 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. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - # - # Example: - # - # 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 - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # 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 - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # 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 - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/proto_docs/google/cloud/video/livestream/v1/outputs.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/cloud/video/livestream/v1/outputs.rb deleted file mode 100644 index 2da5118a4897..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/cloud/video/livestream/v1/outputs.rb +++ /dev/null @@ -1,788 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Video - module LiveStream - module V1 - # Encoding of an input element such as an audio, video, or text track. - # Elementary streams must be packaged before mapping and sharing between - # different output formats. - # @!attribute [rw] key - # @return [::String] - # A unique key for this elementary stream. The key must be 1-63 - # characters in length. The key must begin and end with a letter (regardless - # of case) or a number, but can contain dashes or underscores in between. - # @!attribute [rw] video_stream - # @return [::Google::Cloud::Video::LiveStream::V1::VideoStream] - # Encoding of a video stream. - # - # Note: The following fields are mutually exclusive: `video_stream`, `audio_stream`, `text_stream`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] audio_stream - # @return [::Google::Cloud::Video::LiveStream::V1::AudioStream] - # Encoding of an audio stream. - # - # Note: The following fields are mutually exclusive: `audio_stream`, `video_stream`, `text_stream`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_stream - # @return [::Google::Cloud::Video::LiveStream::V1::TextStream] - # Encoding of a text stream. For example, closed captions or subtitles. - # - # Note: The following fields are mutually exclusive: `text_stream`, `video_stream`, `audio_stream`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ElementaryStream - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Multiplexing settings for output stream. - # @!attribute [rw] key - # @return [::String] - # A unique key for this multiplexed stream. The key must be 1-63 - # characters in length. The key must begin and end with a letter (regardless - # of case) or a number, but can contain dashes or underscores in between. - # @!attribute [rw] container - # @return [::String] - # The container format. The default is `fmp4`. - # - # Supported container formats: - # - # - `fmp4` - the corresponding file extension is `.m4s` - # - `ts` - the corresponding file extension is `.ts` - # @!attribute [rw] elementary_streams - # @return [::Array<::String>] - # List of `ElementaryStream` - # {::Google::Cloud::Video::LiveStream::V1::ElementaryStream#key key}s multiplexed - # in this stream. - # - # - For `fmp4` container, must contain either one video or one audio stream. - # - For `ts` container, must contain exactly one audio stream and up to one - # video stream. - # @!attribute [rw] segment_settings - # @return [::Google::Cloud::Video::LiveStream::V1::SegmentSettings] - # Segment settings for `fmp4` and `ts`. - # @!attribute [rw] encryption_id - # @return [::String] - # Identifier of the encryption configuration to use. If omitted, output - # will be unencrypted. - class MuxStream - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Manifest configuration. - # @!attribute [rw] file_name - # @return [::String] - # The name of the generated file. The default is `manifest` with the - # extension suffix corresponding to the `Manifest` - # {::Google::Cloud::Video::LiveStream::V1::Manifest#type type}. If multiple - # manifests are added to the channel, each must have a unique file name. - # @!attribute [rw] type - # @return [::Google::Cloud::Video::LiveStream::V1::Manifest::ManifestType] - # Required. Type of the manifest, can be `HLS` or `DASH`. - # @!attribute [rw] mux_streams - # @return [::Array<::String>] - # Required. List of `MuxStream` - # {::Google::Cloud::Video::LiveStream::V1::MuxStream#key key}s that should appear - # in this manifest. - # - # - For HLS, either `fmp4` or `ts` mux streams can be specified but not - # mixed. - # - For DASH, only `fmp4` mux streams can be specified. - # @!attribute [rw] max_segment_count - # @return [::Integer] - # Maximum number of segments that this manifest holds. Once the manifest - # reaches this maximum number of segments, whenever a new segment is added to - # the manifest, the oldest segment will be removed from the manifest. - # The minimum value is 3 and the default value is 5. - # @!attribute [rw] segment_keep_duration - # @return [::Google::Protobuf::Duration] - # How long to keep a segment on the output Google Cloud Storage bucket after - # it is removed from the manifest. This field should be large enough to cover - # the manifest propagation delay. Otherwise, a player could receive 404 - # errors while accessing segments which are listed in the manifest that the - # player has, but were already deleted from the output Google Cloud Storage - # bucket. Default value is `60s`. - # - # If both segment_keep_duration and - # {::Google::Cloud::Video::LiveStream::V1::RetentionConfig#retention_window_duration RetentionConfig.retention_window_duration} - # are set, - # {::Google::Cloud::Video::LiveStream::V1::RetentionConfig#retention_window_duration RetentionConfig.retention_window_duration} - # is used and segment_keep_duration is ignored. - # @!attribute [rw] use_timecode_as_timeline - # @return [::Boolean] - # Whether to use the timecode, as specified in timecode config, when setting: - # - # - `availabilityStartTime` attribute in DASH manifests. - # - `#EXT-X-PROGRAM-DATE-TIME` tag in HLS manifests. - # - # If false, ignore the input timecode and use the time from system clock - # when the manifest is first generated. This is the default behavior. - # @!attribute [rw] key - # @return [::String] - # Optional. A unique key for this manifest. - class Manifest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The manifest type can be either `HLS` or `DASH`. - module ManifestType - # The manifest type is not specified. - MANIFEST_TYPE_UNSPECIFIED = 0 - - # Create an `HLS` manifest. The corresponding file extension is `.m3u8`. - HLS = 1 - - # Create a `DASH` manifest. The corresponding file extension is `.mpd`. - DASH = 2 - end - end - - # Multiplexing settings for output streams used in - # {::Google::Cloud::Video::LiveStream::V1::Distribution Distribution}. - # @!attribute [rw] key - # @return [::String] - # Required. A unique key for this distribution stream. The key must be 1-63 - # characters in length. The key must begin and end with a letter (regardless - # of case) or a number, but can contain dashes or underscores in between. - # @!attribute [rw] container - # @return [::String] - # Required. The container format. - # - # Supported container formats: - # - # - `ts`, must contain exactly one audio stream and up to one video stream. - # - `flv`, must contain at most one audio stream and at most one video - # stream. - # @!attribute [rw] elementary_streams - # @return [::Array<::String>] - # Required. List of `ElementaryStream` - # {::Google::Cloud::Video::LiveStream::V1::ElementaryStream#key key}s multiplexed - # in this stream. Must contain at least one audio stream and up to one video - # stream. - class DistributionStream - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Distribution configuration. - # @!attribute [rw] key - # @return [::String] - # Required. A unique key for this distribution. The key must be 1-63 - # characters in length. The key must begin and end with a letter (regardless - # of case) or a number, but can contain dashes or underscores in between. - # @!attribute [rw] distribution_stream - # @return [::String] - # Required. `DistributionStream` - # {::Google::Cloud::Video::LiveStream::V1::DistributionStream#key key}s that should - # appear in this distribution output. - # - # - For SRT protocol, only `ts` distribution streams can be specified. - # - For RTMP protocol, only `flv` distribution streams can be specified. - # @!attribute [r] state - # @return [::Google::Cloud::Video::LiveStream::V1::Distribution::State] - # Output only. State of the distribution. - # @!attribute [r] error - # @return [::Google::Rpc::Status] - # Output only. Only present when the `state` is `ERROR`. The reason for the - # error state of the distribution. - # @!attribute [rw] srt_push - # @return [::Google::Cloud::Video::LiveStream::V1::SrtPushOutputEndpoint] - # Output endpoint using SRT_PUSH. - # - # Note: The following fields are mutually exclusive: `srt_push`, `rtmp_push`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] rtmp_push - # @return [::Google::Cloud::Video::LiveStream::V1::RtmpPushOutputEndpoint] - # Output endpoint using RTMP_PUSH. - # - # Note: The following fields are mutually exclusive: `rtmp_push`, `srt_push`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Distribution - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # State of this distribution. - module State - # State is not specified. - STATE_UNSPECIFIED = 0 - - # Distribution has trouble to produce or deliver the output. - ERROR = 5 - - # Distribution is not ready to be started. - NOT_READY = 6 - - # Distribution is ready to be started. - READY = 7 - - # Distribution is already started and is waiting for input. - AWAITING_INPUT = 8 - - # Distribution is already started and is generating output. - DISTRIBUTING = 9 - end - end - - # Configurations for an output endpoint using SRT_PUSH as the streaming - # protocol. - # @!attribute [rw] uri - # @return [::String] - # Required. The full URI of the remote SRT server. - # @!attribute [rw] passphrase_secret_version - # @return [::String] - # The name of the Secret Version containing the SRT encryption passphrase, - # which is stored in Google Secret Manager. It should be in the format of - # `projects/{project}/secrets/{secret_id}/versions/{version_number}`. - class SrtPushOutputEndpoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configurations for an output endpoint using RTMP_PUSH as the streaming - # protocol. - # @!attribute [rw] uri - # @return [::String] - # Required. The full URI of the remote RTMP server. For example: - # `rtmp://192.168.123.321/live/my-stream` or `rtmp://somedomain.com/someapp`. - # @!attribute [rw] stream_key - # @return [::String] - # Required. Stream key for RTMP protocol. - class RtmpPushOutputEndpoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Sprite sheet configuration. - # @!attribute [rw] format - # @return [::String] - # Format type. The default is `jpeg`. - # - # Supported formats: - # - # - `jpeg` - # @!attribute [rw] file_prefix - # @return [::String] - # Required. File name prefix for the generated sprite sheets. If multiple - # sprite sheets are added to the channel, each must have a unique file - # prefix. - # Each sprite sheet has an incremental 10-digit zero-padded suffix starting - # from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. - # @!attribute [rw] sprite_width_pixels - # @return [::Integer] - # Required. The width of the sprite in pixels. Must be an even integer. - # @!attribute [rw] sprite_height_pixels - # @return [::Integer] - # Required. The height of the sprite in pixels. Must be an even integer. - # @!attribute [rw] column_count - # @return [::Integer] - # The maximum number of sprites per row in a sprite sheet. Valid range is - # [1, 10] and the default value is 1. - # @!attribute [rw] row_count - # @return [::Integer] - # The maximum number of rows per sprite sheet. When the sprite sheet is full, - # a new sprite sheet is created. Valid range is [1, 10] and the default value - # is 1. - # @!attribute [rw] interval - # @return [::Google::Protobuf::Duration] - # Create sprites at regular intervals. Valid range is [1 second, 1 hour] and - # the default value is `10s`. - # @!attribute [rw] quality - # @return [::Integer] - # The quality of the generated sprite sheet. Enter a value between 1 - # and 100, where 1 is the lowest quality and 100 is the highest quality. - # The default is 100. A high quality value corresponds to a low image data - # compression ratio. - class SpriteSheet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Preprocessing configurations. - # @!attribute [rw] audio - # @return [::Google::Cloud::Video::LiveStream::V1::PreprocessingConfig::Audio] - # Audio preprocessing configuration. - # @!attribute [rw] crop - # @return [::Google::Cloud::Video::LiveStream::V1::PreprocessingConfig::Crop] - # Specify the video cropping configuration. - # @!attribute [rw] pad - # @return [::Google::Cloud::Video::LiveStream::V1::PreprocessingConfig::Pad] - # Specify the video pad filter configuration. - class PreprocessingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Audio preprocessing configuration. - # @!attribute [rw] lufs - # @return [::Float] - # Specify audio loudness normalization in loudness units relative to full - # scale (LUFS). Enter a value between -24 and 0 according to the following: - # - # - -24 is the Advanced Television Systems Committee (ATSC A/85) - # - -23 is the EU R128 broadcast standard - # - -19 is the prior standard for online mono audio - # - -18 is the ReplayGain standard - # - -16 is the prior standard for stereo audio - # - -14 is the new online audio standard recommended by Spotify, as well as - # Amazon Echo - # - 0 disables normalization. The default is 0. - class Audio - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video cropping configuration for the input video. The cropped input video - # is scaled to match the output resolution. - # @!attribute [rw] top_pixels - # @return [::Integer] - # The number of pixels to crop from the top. The default is 0. - # @!attribute [rw] bottom_pixels - # @return [::Integer] - # The number of pixels to crop from the bottom. The default is 0. - # @!attribute [rw] left_pixels - # @return [::Integer] - # The number of pixels to crop from the left. The default is 0. - # @!attribute [rw] right_pixels - # @return [::Integer] - # The number of pixels to crop from the right. The default is 0. - class Crop - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Pad filter configuration for the input video. The padded input video - # is scaled after padding with black to match the output resolution. - # @!attribute [rw] top_pixels - # @return [::Integer] - # The number of pixels to add to the top. The default is 0. - # @!attribute [rw] bottom_pixels - # @return [::Integer] - # The number of pixels to add to the bottom. The default is 0. - # @!attribute [rw] left_pixels - # @return [::Integer] - # The number of pixels to add to the left. The default is 0. - # @!attribute [rw] right_pixels - # @return [::Integer] - # The number of pixels to add to the right. The default is 0. - class Pad - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Video stream resource. - # @!attribute [rw] h264 - # @return [::Google::Cloud::Video::LiveStream::V1::VideoStream::H264CodecSettings] - # H264 codec settings. - # - # Note: The following fields are mutually exclusive: `h264`, `h265`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] h265 - # @return [::Google::Cloud::Video::LiveStream::V1::VideoStream::H265CodecSettings] - # H265 codec settings. - # - # Note: The following fields are mutually exclusive: `h265`, `h264`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class VideoStream - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # H264 codec settings. - # @!attribute [rw] width_pixels - # @return [::Integer] - # Required. The width of the video in pixels. Must be an even integer. - # Valid range is [320, 4096]. - # @!attribute [rw] height_pixels - # @return [::Integer] - # Required. The height of the video in pixels. Must be an even integer. - # Valid range is [180, 2160]. - # @!attribute [rw] frame_rate - # @return [::Float] - # Required. The target video frame rate in frames per second (FPS). Must be - # less than or equal to 60. Will default to the input frame rate if larger - # than the input frame rate. The API will generate an output FPS that is - # divisible by the input FPS, and smaller or equal to the target FPS. See - # [Calculating frame - # rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - # more information. - # @!attribute [rw] bitrate_bps - # @return [::Integer] - # Required. The video bitrate in bits per second. Minimum value is 10,000. - # - # - For SD resolution (< 720p), must be <= 3,000,000 (3 Mbps). - # - For HD resolution (<= 1080p), must be <= 15,000,000 (15 Mbps). - # - For UHD resolution (<= 2160p), must be <= 25,000,000 (25 Mbps). - # @!attribute [rw] allow_open_gop - # @return [::Boolean] - # Specifies whether an open Group of Pictures (GOP) structure should be - # allowed or not. The default is `false`. - # @!attribute [rw] gop_frame_count - # @return [::Integer] - # Select the GOP size based on the specified frame count. - # If GOP frame count is set instead of GOP duration, GOP duration will be - # calculated by `gopFrameCount`/`frameRate`. The calculated GOP duration - # must satisfy the limitations on `gopDuration` as well. - # Valid range is [60, 600]. - # - # Note: The following fields are mutually exclusive: `gop_frame_count`, `gop_duration`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gop_duration - # @return [::Google::Protobuf::Duration] - # Select the GOP size based on the specified duration. The default is - # `2s`. Note that `gopDuration` must be less than or equal to - # {::Google::Cloud::Video::LiveStream::V1::SegmentSettings#segment_duration segment_duration}, - # and - # {::Google::Cloud::Video::LiveStream::V1::SegmentSettings#segment_duration segment_duration} - # must be divisible by `gopDuration`. Valid range is [2s, 20s]. - # - # All video streams in the same channel must have the same GOP size. - # - # Note: The following fields are mutually exclusive: `gop_duration`, `gop_frame_count`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] vbv_size_bits - # @return [::Integer] - # Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - # greater than zero. The default is equal to - # {::Google::Cloud::Video::LiveStream::V1::VideoStream::H264CodecSettings#bitrate_bps bitrate_bps}. - # @!attribute [rw] vbv_fullness_bits - # @return [::Integer] - # Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - # Must be greater than zero. The default is equal to 90% of - # {::Google::Cloud::Video::LiveStream::V1::VideoStream::H264CodecSettings#vbv_size_bits vbv_size_bits}. - # @!attribute [rw] entropy_coder - # @return [::String] - # The entropy coder to use. The default is `cabac`. - # - # Supported entropy coders: - # - # - `cavlc` - # - `cabac` - # @!attribute [rw] b_pyramid - # @return [::Boolean] - # Allow B-pyramid for reference frame selection. This may not be supported - # on all decoders. The default is `false`. - # @!attribute [rw] b_frame_count - # @return [::Integer] - # The number of consecutive B-frames. Must be greater than or equal to - # zero. Must be less than - # {::Google::Cloud::Video::LiveStream::V1::VideoStream::H264CodecSettings#gop_frame_count gop_frame_count} - # if set. The default is 0. - # @!attribute [rw] aq_strength - # @return [::Float] - # Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - # and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - # higher value equals a lower bitrate but smoother image. The default is 0. - # @!attribute [rw] profile - # @return [::String] - # Enforces the specified codec profile. The following profiles are - # supported: - # - # * `baseline` - # * `main` (default) - # * `high` - # - # The available options are [FFmpeg-compatible Profile - # Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Profile). - # Note that certain values for this field may cause the - # transcoder to override other fields you set in the - # {::Google::Cloud::Video::LiveStream::V1::VideoStream::H264CodecSettings H264CodecSettings} - # message. - # @!attribute [rw] tune - # @return [::String] - # Enforces the specified codec tune. The available options are - # [FFmpeg-compatible Encode - # Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune) - # Note that certain values for this field may cause the transcoder to - # override other fields you set in the - # {::Google::Cloud::Video::LiveStream::V1::VideoStream::H264CodecSettings H264CodecSettings} - # message. - class H264CodecSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # H265 codec settings. - # @!attribute [rw] width_pixels - # @return [::Integer] - # Optional. The width of the video in pixels. Must be an even integer. - # When not specified, the width is adjusted to match the specified height - # and input aspect ratio. If both are omitted, the input width is used. - # Valid range is [320, 4096]. - # @!attribute [rw] height_pixels - # @return [::Integer] - # Optional. The height of the video in pixels. Must be an even integer. - # When not specified, the height is adjusted to match the specified width - # and input aspect ratio. If both are omitted, the input height is used. - # Valid range is [180, 2160]. - # @!attribute [rw] frame_rate - # @return [::Float] - # Required. The target video frame rate in frames per second (FPS). Must be - # less than or equal to 120. Will default to the input frame rate if larger - # than the input frame rate. The API will generate an output FPS that is - # divisible by the input FPS, and smaller or equal to the target FPS. See - # [Calculating frame - # rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - # more information. - # @!attribute [rw] bitrate_bps - # @return [::Integer] - # Required. The video bitrate in bits per second. Minimum value is 10,000. - # - # - For SD resolution (< 720p), must be <= 3,000,000 (3 Mbps). - # - For HD resolution (<= 1080p), must be <= 15,000,000 (15 Mbps). - # - For UHD resolution (<= 2160p), must be <= 25,000,000 (25 Mbps). - # @!attribute [rw] gop_frame_count - # @return [::Integer] - # Optional. Select the GOP size based on the specified frame count. - # If GOP frame count is set instead of GOP duration, GOP duration will be - # calculated by `gopFrameCount`/`frameRate`. The calculated GOP duration - # must satisfy the limitations on `gopDuration` as well. - # Valid range is [60, 600]. - # - # Note: The following fields are mutually exclusive: `gop_frame_count`, `gop_duration`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gop_duration - # @return [::Google::Protobuf::Duration] - # Optional. Select the GOP size based on the specified duration. The - # default is `2s`. Note that `gopDuration` must be less than or equal to - # {::Google::Cloud::Video::LiveStream::V1::SegmentSettings#segment_duration segment_duration}, - # and - # {::Google::Cloud::Video::LiveStream::V1::SegmentSettings#segment_duration segment_duration} - # must be divisible by `gopDuration`. Valid range is [2s, 20s]. - # - # All video streams in the same channel must have the same GOP size. - # - # Note: The following fields are mutually exclusive: `gop_duration`, `gop_frame_count`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] vbv_size_bits - # @return [::Integer] - # Optional. Size of the Video Buffering Verifier (VBV) buffer in bits. Must - # be greater than zero. The default is equal to - # {::Google::Cloud::Video::LiveStream::V1::VideoStream::H265CodecSettings#bitrate_bps bitrate_bps}. - # @!attribute [rw] vbv_fullness_bits - # @return [::Integer] - # Optional. Initial fullness of the Video Buffering Verifier (VBV) buffer - # in bits. Must be greater than zero. The default is equal to 90% of - # {::Google::Cloud::Video::LiveStream::V1::VideoStream::H265CodecSettings#vbv_size_bits vbv_size_bits}. - # @!attribute [rw] b_pyramid - # @return [::Boolean] - # Optional. Allow B-pyramid for reference frame selection. This may not be - # supported on all decoders. The default is `false`. - # @!attribute [rw] b_frame_count - # @return [::Integer] - # Optional. The number of consecutive B-frames. Must be greater than or - # equal to zero. Must be less than - # {::Google::Cloud::Video::LiveStream::V1::VideoStream::H265CodecSettings#gop_frame_count gop_frame_count} - # if set. The default is 0. - # @!attribute [rw] aq_strength - # @return [::Float] - # Optional. Specify the intensity of the adaptive quantizer (AQ). Must be - # between 0 and 1, where 0 disables the quantizer and 1 maximizes the - # quantizer. A higher value equals a lower bitrate but smoother image. The - # default is 0. - class H265CodecSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Audio stream resource. - # @!attribute [rw] transmux - # @return [::Boolean] - # Specifies whether pass through (transmuxing) is enabled or not. - # If set to `true`, the rest of the settings, other than `mapping`, will be - # ignored. The default is `false`. - # @!attribute [rw] codec - # @return [::String] - # The codec for this audio stream. The default is `aac`. - # - # Supported audio codecs: - # - # - `aac` - # @!attribute [rw] bitrate_bps - # @return [::Integer] - # Required. Audio bitrate in bits per second. Must be between 1 and - # 10,000,000. - # @!attribute [rw] channel_count - # @return [::Integer] - # Number of audio channels. Must be between 1 and 6. The default is 2. - # @!attribute [rw] channel_layout - # @return [::Array<::String>] - # A list of channel names specifying layout of the audio channels. - # This only affects the metadata embedded in the container headers, if - # supported by the specified format. The default is `[fl, fr]`. - # - # Supported channel names: - # - # - `fl` - Front left channel - # - `fr` - Front right channel - # - `sl` - Side left channel - # - `sr` - Side right channel - # - `fc` - Front center channel - # - `lfe` - Low frequency - # @!attribute [rw] mapping - # @return [::Array<::Google::Cloud::Video::LiveStream::V1::AudioStream::AudioMapping>] - # The mapping for the input streams and audio channels. - # @!attribute [rw] sample_rate_hertz - # @return [::Integer] - # The audio sample rate in Hertz. The default is 48000 Hertz. - class AudioStream - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The mapping for the input streams and audio channels. - # @!attribute [rw] input_key - # @return [::String] - # Required. The `Channel` - # {::Google::Cloud::Video::LiveStream::V1::InputAttachment#key InputAttachment.key} - # that identifies the input that this audio mapping applies to. If an - # active input doesn't have an audio mapping, the primary audio track in - # the input stream will be selected. - # @!attribute [rw] input_track - # @return [::Integer] - # Required. The zero-based index of the track in the input stream. - # All {::Google::Cloud::Video::LiveStream::V1::AudioStream#mapping mapping}s in - # the same {::Google::Cloud::Video::LiveStream::V1::AudioStream AudioStream} must - # have the same input track. - # @!attribute [rw] input_channel - # @return [::Integer] - # Required. The zero-based index of the channel in the input stream. - # @!attribute [rw] output_channel - # @return [::Integer] - # Required. The zero-based index of the channel in the output audio stream. - # Must be consistent with the - # {::Google::Cloud::Video::LiveStream::V1::AudioStream::AudioMapping#input_channel input_channel}. - # @!attribute [rw] gain_db - # @return [::Float] - # Audio volume control in dB. Negative values decrease volume, - # positive values increase. The default is 0. - class AudioMapping - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Encoding of a text stream. For example, closed captions or subtitles. - # @!attribute [rw] codec - # @return [::String] - # Required. The codec for this text stream. - # - # Supported text codecs: - # - # - `cea608` - # - `cea708` - # - `webvtt` - # @!attribute [rw] language_code - # @return [::String] - # Optional. The BCP-47 language code, such as `en-US` or `sr-Latn`. For more - # information, see - # https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The name for this particular text stream that will be added to - # the HLS/DASH manifest. - # @!attribute [rw] output_cea_channel - # @return [::String] - # Optional. The channel of the closed caption in the output stream. - # This field should only be set when textstream is used for partner - # distribution. - # Must be one of `CC1`, `CC2`, `CC3`, and `CC4`, if the - # {::Google::Cloud::Video::LiveStream::V1::TextStream#codec codec} is `cea608`; - # Must be one between `SERVICE1` and `SERVICE63`, if the - # {::Google::Cloud::Video::LiveStream::V1::TextStream#codec codec} is `cea708`. - # @!attribute [rw] mapping - # @return [::Array<::Google::Cloud::Video::LiveStream::V1::TextStream::TextMapping>] - # Optional. The mapping for the input streams and text tracks. - class TextStream - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The mapping for the input streams and text tracks. - # @!attribute [rw] input_key - # @return [::String] - # Optional. The `Channel` - # {::Google::Cloud::Video::LiveStream::V1::InputAttachment#key InputAttachment.key} - # that identifies the input that this text mapping applies to. - # @!attribute [rw] input_track - # @return [::Integer] - # Optional. The zero-based index of the track in the input stream. - # @!attribute [rw] input_cea_channel - # @return [::String] - # Optional. The channel of the closed caption in the input stream. - # If this field is set, the output - # {::Google::Cloud::Video::LiveStream::V1::TextStream#codec codec} must be - # `webvtt`. Must be one of `CC1`, `CC2`, `CC3`, and `CC4`, if the codec of - # the input closed caption is `cea608`; Must be one between `SERVICE1` and - # `SERVICE64`, if the codec of the input closed caption is `cea708`. - # @!attribute [rw] from_language_code - # @return [::String] - # Optional. The BCP-47 source language code, such as `en-US` or `sr-Latn`. - # If differ from the textStream's language code, enable translation. For - # more information on BCP-47 language codes, see - # https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - class TextMapping - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Segment settings for `fmp4` and `ts`. - # @!attribute [rw] segment_duration - # @return [::Google::Protobuf::Duration] - # Duration of the segments in seconds. The default is `6s`. Note that - # `segmentDuration` must be greater than or equal to - # {::Google::Cloud::Video::LiveStream::V1::VideoStream::H264CodecSettings#gop_duration gop_duration}, - # and `segmentDuration` must be divisible by - # {::Google::Cloud::Video::LiveStream::V1::VideoStream::H264CodecSettings#gop_duration gop_duration}. - # Valid range is [2s, 20s]. - # - # All {::Google::Cloud::Video::LiveStream::V1::Manifest#mux_streams mux_streams} in - # the same manifest must have the same segment duration. - class SegmentSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Timecode configuration. - # @!attribute [rw] source - # @return [::Google::Cloud::Video::LiveStream::V1::TimecodeConfig::TimecodeSource] - # The source of the timecode that will later be used in outputs/manifests. - # It determines the initial timecode/timestamp (first frame) of output - # streams. - # @!attribute [rw] utc_offset - # @return [::Google::Protobuf::Duration] - # UTC offset. Must be whole seconds, between -18 hours and +18 hours. - # - # 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 e.g. "America/Los_Angeles". - # - # 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 TimecodeConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The source of timecode. - module TimecodeSource - # The timecode source is not specified. - TIMECODE_SOURCE_UNSPECIFIED = 0 - - # Use input media timestamp. - MEDIA_TIMESTAMP = 1 - - # Use input embedded timecode e.g. picture timing SEI message. - EMBEDDED_TIMECODE = 2 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/cloud/video/livestream/v1/resources.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/cloud/video/livestream/v1/resources.rb deleted file mode 100644 index 5d4f8a305dd4..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/cloud/video/livestream/v1/resources.rb +++ /dev/null @@ -1,1294 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Video - module LiveStream - module V1 - # Input resource represents the endpoint from which the channel ingests - # the input stream. - # @!attribute [rw] name - # @return [::String] - # The resource name of the input, in the form of: - # `projects/{project}/locations/{location}/inputs/{inputId}`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The update time. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # User-defined key/value metadata. - # @!attribute [rw] type - # @return [::Google::Cloud::Video::LiveStream::V1::Input::Type] - # Source type. - # @!attribute [rw] tier - # @return [::Google::Cloud::Video::LiveStream::V1::Input::Tier] - # Tier defines the maximum input specification that is accepted by the - # video pipeline. The billing is charged based on the tier specified here. - # See [Pricing](https://cloud.google.com/livestream/pricing) for more detail. - # The default is `HD`. - # @!attribute [r] uri - # @return [::String] - # Output only. URI to push the input stream to. - # Its format depends on the input - # {::Google::Cloud::Video::LiveStream::V1::Input#type type}, for example: - # - # * `RTMP_PUSH`: `rtmp://1.2.3.4/live/{STREAM-ID}` - # * `SRT_PUSH`: `srt://1.2.3.4:4201?streamid={STREAM-ID}` - # @!attribute [rw] preprocessing_config - # @return [::Google::Cloud::Video::LiveStream::V1::PreprocessingConfig] - # Preprocessing configurations. - # @!attribute [rw] security_rules - # @return [::Google::Cloud::Video::LiveStream::V1::Input::SecurityRule] - # Security rule for access control. - # @!attribute [r] input_stream_property - # @return [::Google::Cloud::Video::LiveStream::V1::InputStreamProperty] - # Output only. The information for the input stream. This field will be - # present only when this input receives the input stream. - class Input - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Security rules for access control. Each field represents one security rule. - # Only when the source of the input stream satisfies all the fields, this - # input stream can be accepted. - # @!attribute [rw] ip_ranges - # @return [::Array<::String>] - # At least one ip range must match unless none specified. The IP range is - # defined by CIDR block: for example, `192.0.1.0/24` for a range and - # `192.0.1.0/32` for a single IP address. - class SecurityRule - 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 type of the input. - module Type - # Input type is not specified. - TYPE_UNSPECIFIED = 0 - - # Input will take an rtmp input stream. - RTMP_PUSH = 1 - - # Input will take an srt (Secure Reliable Transport) input stream. - SRT_PUSH = 2 - end - - # Tier of the input specification. - module Tier - # Tier is not specified. - TIER_UNSPECIFIED = 0 - - # Resolution < 1280x720. Bitrate <= 6 Mbps. FPS <= 60. - SD = 1 - - # Resolution <= 1920x1080. Bitrate <= 25 Mbps. FPS <= 60. - HD = 2 - - # Resolution <= 4096x2160. Bitrate <= 50 Mbps. FPS <= 60. - UHD = 3 - - # Resolution <= 1280x720. Bitrate <= 6 Mbps. FPS <= 60. H265 codec. - SD_H265 = 4 - - # Resolution <= 1920x1080. Bitrate <= 25 Mbps. FPS <= 60. H265 codec. - HD_H265 = 5 - - # Resolution <= 4096x2160. Bitrate <= 50 Mbps. FPS <= 60. H265 codec. - UHD_H265 = 6 - end - end - - # Channel resource represents the processor that does a user-defined - # "streaming" operation, which includes getting an input stream through an - # input, transcoding it to multiple renditions, and publishing output live - # streams in certain formats (for example, HLS or DASH) to the specified - # location. - # @!attribute [rw] name - # @return [::String] - # The resource name of the channel, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The update time. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # User-defined key/value metadata. - # @!attribute [rw] input_attachments - # @return [::Array<::Google::Cloud::Video::LiveStream::V1::InputAttachment>] - # A list of input attachments that this channel uses. - # One channel can have multiple inputs as the input sources. Only one - # input can be selected as the input source at one time. - # @!attribute [r] active_input - # @return [::String] - # Output only. The - # {::Google::Cloud::Video::LiveStream::V1::InputAttachment#key InputAttachment.key} - # that serves as the current input source. The first input in the - # {::Google::Cloud::Video::LiveStream::V1::Channel#input_attachments input_attachments} - # is the initial input source. - # @!attribute [rw] output - # @return [::Google::Cloud::Video::LiveStream::V1::Channel::Output] - # Required. Information about the output (that is, the Cloud Storage bucket - # to store the generated live stream). - # @!attribute [rw] elementary_streams - # @return [::Array<::Google::Cloud::Video::LiveStream::V1::ElementaryStream>] - # List of elementary streams. - # @!attribute [rw] mux_streams - # @return [::Array<::Google::Cloud::Video::LiveStream::V1::MuxStream>] - # List of multiplexing settings for output streams. - # @!attribute [rw] manifests - # @return [::Array<::Google::Cloud::Video::LiveStream::V1::Manifest>] - # List of output manifests. - # @!attribute [rw] distribution_streams - # @return [::Array<::Google::Cloud::Video::LiveStream::V1::DistributionStream>] - # Optional. List of multiplexing settings of streams for distributions. - # @!attribute [rw] distributions - # @return [::Array<::Google::Cloud::Video::LiveStream::V1::Distribution>] - # Optional. List of distributions. - # @!attribute [rw] sprite_sheets - # @return [::Array<::Google::Cloud::Video::LiveStream::V1::SpriteSheet>] - # List of output sprite sheets. - # @!attribute [r] streaming_state - # @return [::Google::Cloud::Video::LiveStream::V1::Channel::StreamingState] - # Output only. State of the streaming operation. - # @!attribute [r] streaming_error - # @return [::Google::Rpc::Status] - # Output only. A description of the reason for the streaming error. This - # property is always present when - # {::Google::Cloud::Video::LiveStream::V1::Channel#streaming_state streaming_state} - # is - # {::Google::Cloud::Video::LiveStream::V1::Channel::StreamingState::STREAMING_ERROR STREAMING_ERROR}. - # @!attribute [rw] log_config - # @return [::Google::Cloud::Video::LiveStream::V1::LogConfig] - # Configuration of platform logs for this channel. - # @!attribute [rw] timecode_config - # @return [::Google::Cloud::Video::LiveStream::V1::TimecodeConfig] - # Configuration of timecode for this channel. - # @!attribute [rw] encryptions - # @return [::Array<::Google::Cloud::Video::LiveStream::V1::Encryption>] - # Optional. Encryption configurations for this channel. Each configuration - # has an ID which is referred to by each MuxStream to indicate which - # configuration is used for that output. - # @!attribute [rw] input_config - # @return [::Google::Cloud::Video::LiveStream::V1::InputConfig] - # The configuration for input sources defined in - # {::Google::Cloud::Video::LiveStream::V1::Channel#input_attachments input_attachments}. - # @!attribute [rw] retention_config - # @return [::Google::Cloud::Video::LiveStream::V1::RetentionConfig] - # Optional. Configuration for retention of output files for this channel. - # @!attribute [rw] static_overlays - # @return [::Array<::Google::Cloud::Video::LiveStream::V1::StaticOverlay>] - # Optional. List of static overlay images. Those images display over the - # output content for the whole duration of the live stream. - # @!attribute [rw] auto_transcription_config - # @return [::Google::Cloud::Video::LiveStream::V1::AutoTranscriptionConfig] - # Optional. Advanced configurations for auto-generated text streams. - class Channel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Location of output file(s) in a Google Cloud Storage bucket. - # @!attribute [rw] uri - # @return [::String] - # URI for the output file(s). For example, `gs://my-bucket/outputs/`. - class Output - 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 of streaming operation that the channel is running. - module StreamingState - # Streaming state is not specified. - STREAMING_STATE_UNSPECIFIED = 0 - - # Channel is getting the input stream, generating the live streams to the - # specified output location. - STREAMING = 1 - - # Channel is waiting for the input stream through the input. - AWAITING_INPUT = 2 - - # Channel is running, but has trouble publishing the live streams onto the - # specified output location (for example, the specified Cloud Storage - # bucket is not writable). - STREAMING_ERROR = 4 - - # Channel is generating live streams with no input stream. Live streams are - # filled out with black screen, while input stream is missing. - # Not supported yet. - STREAMING_NO_INPUT = 5 - - # Channel is stopped, finishing live streams. - STOPPED = 6 - - # Channel is starting. - STARTING = 7 - - # Channel is stopping. - STOPPING = 8 - end - end - - # 2D normalized coordinates. - # @!attribute [rw] x - # @return [::Float] - # Optional. Normalized x coordinate. Valid range is [0.0, 1.0]. Default is 0. - # @!attribute [rw] y - # @return [::Float] - # Optional. Normalized y coordinate. Valid range is [0.0, 1.0]. Default is 0. - class NormalizedCoordinate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Normalized resolution. - # @!attribute [rw] w - # @return [::Float] - # Optional. Normalized width. Valid range is [0.0, 1.0]. Default is 0. - # @!attribute [rw] h - # @return [::Float] - # Optional. Normalized height. Valid range is [0.0, 1.0]. Default is 0. - class NormalizedResolution - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for the static overlay. - # @!attribute [rw] asset - # @return [::String] - # Required. Asset to use for the overlaid image. - # The asset must be represented in the form of: - # `projects/{project}/locations/{location}/assets/{assetId}`. - # The asset's resource type must be image. - # @!attribute [rw] resolution - # @return [::Google::Cloud::Video::LiveStream::V1::NormalizedResolution] - # Optional. Normalized image resolution, based on output video resolution. - # Valid values are [0.0, 1.0]. To respect the original image aspect ratio, - # set either `w` or `h` to 0. To use the original image resolution, set both - # `w` and `h` to 0. The default is \\{0, 0}. - # @!attribute [rw] position - # @return [::Google::Cloud::Video::LiveStream::V1::NormalizedCoordinate] - # Optional. Position of the image in terms of normalized coordinates of the - # upper-left corner of the image, based on output video resolution. For - # example, use the x and y coordinates \\{0, 0} to position the top-left corner - # of the overlay animation in the top-left corner of the output video. - # @!attribute [rw] opacity - # @return [::Float] - # Optional. Target image opacity. Valid values are from `1.0` (solid, - # default) to `0.0` (transparent), exclusive. Set this to a value greater - # than `0.0`. - class StaticOverlay - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for the input sources of a channel. - # @!attribute [rw] input_switch_mode - # @return [::Google::Cloud::Video::LiveStream::V1::InputConfig::InputSwitchMode] - # Input switch mode. Default mode is `FAILOVER_PREFER_PRIMARY`. - class InputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Input switch mode. - module InputSwitchMode - # The input switch mode is not specified. - INPUT_SWITCH_MODE_UNSPECIFIED = 0 - - # Automatic failover is enabled. The primary input stream is always - # preferred over its backup input streams configured using the - # {::Google::Cloud::Video::LiveStream::V1::InputAttachment::AutomaticFailover AutomaticFailover} - # field. - FAILOVER_PREFER_PRIMARY = 1 - - # Automatic failover is disabled. You must use the - # {::Google::Cloud::Video::LiveStream::V1::Event#input_switch inputSwitch} event - # to switch the active input source for the channel to stream from. When - # this mode is chosen, the - # {::Google::Cloud::Video::LiveStream::V1::InputAttachment::AutomaticFailover AutomaticFailover} - # field is ignored. - MANUAL = 3 - end - end - - # Configuration of platform logs. - # See [Using and managing platform - # logs](https://cloud.google.com/logging/docs/api/platform-logs#managing-logs) - # for more information about how to view platform logs through Cloud Logging. - # @!attribute [rw] log_severity - # @return [::Google::Cloud::Video::LiveStream::V1::LogConfig::LogSeverity] - # The severity level of platform logging for this resource. - class LogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The severity level of platform logging for this channel. Logs with a - # severity level higher than or equal to the chosen severity level will be - # logged and can be viewed through Cloud Logging. - # The severity level of a log is ranked as followed from low to high: DEBUG < - # INFO < NOTICE < WARNING < ERROR < CRITICAL < ALERT < EMERGENCY. - # See - # [LogSeverity](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#logseverity) - # for more information. - module LogSeverity - # Log severity is not specified. This is the same as log severity is OFF. - LOG_SEVERITY_UNSPECIFIED = 0 - - # Log is turned off. - OFF = 1 - - # Log with severity higher than or equal to DEBUG are logged. - DEBUG = 100 - - # Logs with severity higher than or equal to INFO are logged. - INFO = 200 - - # Logs with severity higher than or equal to WARNING are logged. - WARNING = 400 - - # Logs with severity higher than or equal to ERROR are logged. - ERROR = 500 - end - end - - # Configuration for retention of output files. - # @!attribute [rw] retention_window_duration - # @return [::Google::Protobuf::Duration] - # The minimum duration for which the output files from the channel will - # remain in the output bucket. After this duration, output files are - # deleted asynchronously. - # - # When the channel is deleted, all output files are deleted from the output - # bucket asynchronously. - # - # If omitted or set to zero, output files will remain in the output bucket - # based on - # {::Google::Cloud::Video::LiveStream::V1::Manifest#segment_keep_duration Manifest.segment_keep_duration}, - # which defaults to 60s. - # - # If both retention_window_duration and - # {::Google::Cloud::Video::LiveStream::V1::Manifest#segment_keep_duration Manifest.segment_keep_duration} - # are set, retention_window_duration is used and - # {::Google::Cloud::Video::LiveStream::V1::Manifest#segment_keep_duration Manifest.segment_keep_duration} - # is ignored. - class RetentionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Properties of the input stream. - # @!attribute [rw] last_establish_time - # @return [::Google::Protobuf::Timestamp] - # The time that the current input stream is accepted and the connection is - # established. - # @!attribute [rw] video_streams - # @return [::Array<::Google::Cloud::Video::LiveStream::V1::VideoStreamProperty>] - # Properties of the video streams. - # @!attribute [rw] audio_streams - # @return [::Array<::Google::Cloud::Video::LiveStream::V1::AudioStreamProperty>] - # Properties of the audio streams. - class InputStreamProperty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Properties of the video stream. - # @!attribute [rw] index - # @return [::Integer] - # Index of this video stream. - # @!attribute [rw] video_format - # @return [::Google::Cloud::Video::LiveStream::V1::VideoFormat] - # Properties of the video format. - class VideoStreamProperty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Properties of the video format. - # @!attribute [rw] codec - # @return [::String] - # Video codec used in this video stream. - # @!attribute [rw] width_pixels - # @return [::Integer] - # The width of the video stream in pixels. - # @!attribute [rw] height_pixels - # @return [::Integer] - # The height of the video stream in pixels. - # @!attribute [rw] frame_rate - # @return [::Float] - # The frame rate of the input video stream. - class VideoFormat - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Properties of the audio stream. - # @!attribute [rw] index - # @return [::Integer] - # Index of this audio stream. - # @!attribute [rw] audio_format - # @return [::Google::Cloud::Video::LiveStream::V1::AudioFormat] - # Properties of the audio format. - class AudioStreamProperty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Properties of the audio format. - # @!attribute [rw] codec - # @return [::String] - # Audio codec used in this audio stream. - # @!attribute [rw] channel_count - # @return [::Integer] - # The number of audio channels. - # @!attribute [rw] channel_layout - # @return [::Array<::String>] - # A list of channel names specifying the layout of the audio channels. - class AudioFormat - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A group of information for attaching an input resource to this channel. - # @!attribute [rw] key - # @return [::String] - # A unique key for this input attachment. The key must be 1-63 - # characters in length. The key must begin and end with a letter (regardless - # of case) or a number, but can contain dashes or underscores in between. - # @!attribute [rw] input - # @return [::String] - # The resource name of an existing input, in the form of: - # `projects/{project}/locations/{location}/inputs/{inputId}`. - # @!attribute [rw] automatic_failover - # @return [::Google::Cloud::Video::LiveStream::V1::InputAttachment::AutomaticFailover] - # Automatic failover configurations. - class InputAttachment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configurations to follow when automatic failover happens. - # @!attribute [rw] input_keys - # @return [::Array<::String>] - # The - # {::Google::Cloud::Video::LiveStream::V1::InputAttachment#key InputAttachment.key}s - # of inputs to failover to when this input is disconnected. Currently, only - # up to one backup input is supported. - class AutomaticFailover - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Advanced configurations for auto-generated text streams. - # @!attribute [rw] display_timing - # @return [::Google::Cloud::Video::LiveStream::V1::AutoTranscriptionConfig::DisplayTiming] - # Optional. Whether auto-generated text streams are displayed synchronously - # or asynchronously with the original audio. - # @!attribute [rw] quality_preset - # @return [::Google::Cloud::Video::LiveStream::V1::AutoTranscriptionConfig::QualityPreset] - # Optional. Tunes the latency and quality of auto-generated captions. - class AutoTranscriptionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Whether auto-generated text streams are displayed synchronously or - # asynchronously with the original audio. - module DisplayTiming - # Display timing is not specified. Caption display will be asynchronous by - # default. - DISPLAY_TIMING_UNSPECIFIED = 0 - - # Caption will be displayed asynchronous with audio. - ASYNC = 1 - - # Caption will be displayed synchronous with audio. This option increases - # overall media output latency, and reduces viewing latency between audio - # and auto-generated captions. - SYNC = 2 - end - - # Presets to tune the latency and quality of auto-generated captions. - module QualityPreset - # Quality Preset is not specified. By default, BALANCED_QUALITY will be - # used. - QUALITY_PRESET_UNSPECIFIED = 0 - - # Reduce the latency of auto-generated captions. This may reduce the - # quality of the captions. - LOW_LATENCY = 1 - - # Default behavior when QualityPreset is not specified. - BALANCED_QUALITY = 2 - - # Increases the quality of the auto-generated captions at the cost of - # higher latency. - IMPROVED_QUALITY = 3 - end - end - - # Event is a sub-resource of a channel, which can be scheduled by the user to - # execute operations on a channel resource without having to stop the channel. - # @!attribute [rw] name - # @return [::String] - # The resource name of the event, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The update time. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # User-defined key/value metadata. - # @!attribute [rw] input_switch - # @return [::Google::Cloud::Video::LiveStream::V1::Event::InputSwitchTask] - # Switches to another input stream. - # - # Note: The following fields are mutually exclusive: `input_switch`, `ad_break`, `return_to_program`, `slate`, `mute`, `unmute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] ad_break - # @return [::Google::Cloud::Video::LiveStream::V1::Event::AdBreakTask] - # Inserts a new ad opportunity. - # - # Note: The following fields are mutually exclusive: `ad_break`, `input_switch`, `return_to_program`, `slate`, `mute`, `unmute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] return_to_program - # @return [::Google::Cloud::Video::LiveStream::V1::Event::ReturnToProgramTask] - # Stops any running ad break. - # - # Note: The following fields are mutually exclusive: `return_to_program`, `input_switch`, `ad_break`, `slate`, `mute`, `unmute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] slate - # @return [::Google::Cloud::Video::LiveStream::V1::Event::SlateTask] - # Inserts a slate. - # - # Note: The following fields are mutually exclusive: `slate`, `input_switch`, `ad_break`, `return_to_program`, `mute`, `unmute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] mute - # @return [::Google::Cloud::Video::LiveStream::V1::Event::MuteTask] - # Mutes the stream. - # - # Note: The following fields are mutually exclusive: `mute`, `input_switch`, `ad_break`, `return_to_program`, `slate`, `unmute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] unmute - # @return [::Google::Cloud::Video::LiveStream::V1::Event::UnmuteTask] - # Unmutes the stream. - # - # Note: The following fields are mutually exclusive: `unmute`, `input_switch`, `ad_break`, `return_to_program`, `slate`, `mute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] update_encryptions - # @return [::Google::Cloud::Video::LiveStream::V1::Event::UpdateEncryptionsTask] - # Updates encryption settings. - # - # Note: The following fields are mutually exclusive: `update_encryptions`, `input_switch`, `ad_break`, `return_to_program`, `slate`, `mute`, `unmute`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] execute_now - # @return [::Boolean] - # When this field is set to true, the event will be executed at the earliest - # time that the server can schedule the event and - # {::Google::Cloud::Video::LiveStream::V1::Event#execution_time execution_time} - # will be populated with the time that the server actually schedules the - # event. - # @!attribute [rw] execution_time - # @return [::Google::Protobuf::Timestamp] - # The time to execute the event. If you set - # {::Google::Cloud::Video::LiveStream::V1::Event#execute_now execute_now} to - # `true`, then do not set this field in the `CreateEvent` request. In - # this case, the server schedules the event and populates this field. If you - # set {::Google::Cloud::Video::LiveStream::V1::Event#execute_now execute_now} to - # `false`, then you must set this field to at least 10 seconds in the future - # or else the event can't be created. - # @!attribute [r] state - # @return [::Google::Cloud::Video::LiveStream::V1::Event::State] - # Output only. The state of the event. - # @!attribute [r] error - # @return [::Google::Rpc::Status] - # Output only. An error object that describes the reason for the failure. - # This property is always present when `state` is `FAILED`. - class Event - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Switches to another input stream. Automatic failover is then disabled. - # @!attribute [rw] input_key - # @return [::String] - # The - # {::Google::Cloud::Video::LiveStream::V1::InputAttachment#key InputAttachment.key} - # of the input to switch to. - class InputSwitchTask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Inserts a new ad opportunity. - # @!attribute [rw] duration - # @return [::Google::Protobuf::Duration] - # Duration of an ad opportunity. Must be greater than 0. - class AdBreakTask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Inserts a slate. - # @!attribute [rw] duration - # @return [::Google::Protobuf::Duration] - # Optional. Duration of the slate. Must be greater than 0 if specified. - # Omit this field for a long running slate. - # @!attribute [rw] asset - # @return [::String] - # Slate asset to use for the duration. If its duration is less than the - # duration of the SlateTask, then the slate loops. The slate must be - # represented in the form of: - # `projects/{project}/locations/{location}/assets/{assetId}`. - class SlateTask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Stops any events which are currently running. This only applies to events - # with a duration. - class ReturnToProgramTask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Mutes the stream. - # @!attribute [rw] duration - # @return [::Google::Protobuf::Duration] - # Duration for which the stream should be muted. If omitted, the stream - # will be muted until an UnmuteTask event is sent. - class MuteTask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Unmutes the stream. The task fails if the stream is not currently muted. - class UnmuteTask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update encryption settings. - # @!attribute [rw] encryptions - # @return [::Array<::Google::Cloud::Video::LiveStream::V1::EncryptionUpdate>] - # Required. A list of - # {::Google::Cloud::Video::LiveStream::V1::EncryptionUpdate EncryptionUpdate}s - # that updates the existing encryption settings. - class UpdateEncryptionsTask - 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 of the event - module State - # Event state is not specified. - STATE_UNSPECIFIED = 0 - - # Event is scheduled but not executed yet. - SCHEDULED = 1 - - # Event is being executed. - RUNNING = 2 - - # Event has been successfully executed. - SUCCEEDED = 3 - - # Event fails to be executed. - FAILED = 4 - - # Event has been created but not scheduled yet. - PENDING = 5 - - # Event was stopped before running for its full duration. - STOPPED = 6 - end - end - - # Clip is a sub-resource under channel. Each clip represents a clipping - # operation that generates a VOD playlist from its channel given a set of - # timestamp ranges. - # @!attribute [rw] name - # @return [::String] - # The resource name of the clip, in the following format: - # `projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`. - # `{clipId}` is a user-specified resource id that conforms to the following - # criteria: - # - # 1. 1 character minimum, 63 characters maximum - # 2. Only contains letters, digits, underscores, and hyphens - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation timestamp of the clip resource. - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the clip request starts to be processed. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The update timestamp of the clip resource. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # The labels associated with this resource. Each label is a key-value pair. - # @!attribute [r] state - # @return [::Google::Cloud::Video::LiveStream::V1::Clip::State] - # Output only. The state of the clip. - # @!attribute [rw] output_uri - # @return [::String] - # Specify the `output_uri` to determine where to place the clip segments and - # clip manifest files in Cloud Storage. The manifests specified in - # `clip_manifests` fields will be placed under this URI. The exact URI of the - # generated manifests will be provided in `clip_manifests.output_uri` for - # each manifest. - # Example: - # "output_uri": "gs://my-bucket/clip-outputs" - # "clip_manifests.output_uri": "gs://my-bucket/clip-outputs/main.m3u8" - # @!attribute [r] error - # @return [::Google::Rpc::Status] - # Output only. An error object that describes the reason for the failure. - # This property only presents when `state` is `FAILED`. - # @!attribute [rw] slices - # @return [::Array<::Google::Cloud::Video::LiveStream::V1::Clip::Slice>] - # The specified ranges of segments to generate a clip. - # @!attribute [rw] clip_manifests - # @return [::Array<::Google::Cloud::Video::LiveStream::V1::Clip::ClipManifest>] - # Required. A list of clip manifests. Currently only one clip manifest is - # allowed. - # @!attribute [rw] output_type - # @return [::Google::Cloud::Video::LiveStream::V1::Clip::OutputType] - # Optional. OutputType of the clip. If not specified, the default value is - # MANIFEST. - class Clip - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # TimeSlice represents a tuple of Unix epoch timestamps that specifies a time - # range. - # @!attribute [rw] markin_time - # @return [::Google::Protobuf::Timestamp] - # The mark-in Unix epoch time in the original live stream manifest. - # @!attribute [rw] markout_time - # @return [::Google::Protobuf::Timestamp] - # The mark-out Unix epoch time in the original live stream manifest. - class TimeSlice - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Slice represents a slice of the requested clip. - # @!attribute [rw] time_slice - # @return [::Google::Cloud::Video::LiveStream::V1::Clip::TimeSlice] - # A slice in form of a tuple of Unix epoch time. - class Slice - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ClipManifest identifies a source manifest for the generated clip manifest. - # @!attribute [rw] manifest_key - # @return [::String] - # Required. A unique key that identifies a manifest config in the parent - # channel. This key is the same as `channel.manifests.key` for the selected - # manifest. - # @!attribute [r] output_uri - # @return [::String] - # Output only. The output URI of the generated clip manifest. This field - # will be populated when the CreateClip request is accepted. Current output - # format is provided below but may change in the future. Please read this - # field to get the uri to the generated clip manifest. Format: - # \\{clip.output_uri}/\\{channel.manifest.fileName} Example: - # gs://my-bucket/clip-outputs/main.m3u8 - class ClipManifest - 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 of clipping operation. - module State - # State is not specified. - STATE_UNSPECIFIED = 0 - - # The operation is pending to be picked up by the server. - PENDING = 1 - - # The server admitted this create clip request, and - # outputs are under processing. - CREATING = 2 - - # Outputs are available in the specified Cloud Storage bucket. For - # additional information, see the `outputs` field. - SUCCEEDED = 3 - - # The operation has failed. For additional information, see the `error` - # field. - FAILED = 4 - end - - # OutputType represents the output type of the clip. - module OutputType - # OutputType is not specified. - OUTPUT_TYPE_UNSPECIFIED = 0 - - # OutputType is a VOD manifest. This is the default value. - MANIFEST = 1 - - # OutputType is an MP4 file. - MP4 = 2 - end - end - - # TimeInterval represents a time interval. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The start time of the interval. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The end time of the interval. - class TimeInterval - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DvrSession is a sub-resource under channel. Each DvrSession represents a DVR - # recording of the live stream for a specific time range. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the DVR session, in the following format: - # `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`. - # `{dvrSessionId}` is a user-specified resource id that conforms to the - # following criteria: - # - # 1. 1 character minimum, 63 characters maximum - # 2. Only contains letters, digits, underscores, and hyphens - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The update time. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined key/value metadata. - # @!attribute [r] state - # @return [::Google::Cloud::Video::LiveStream::V1::DvrSession::State] - # Output only. The state of the clip. - # @!attribute [r] error - # @return [::Google::Rpc::Status] - # Output only. An error object that describes the reason for the failure. - # This property only presents when `state` is `FAILED`. - # @!attribute [rw] dvr_manifests - # @return [::Array<::Google::Cloud::Video::LiveStream::V1::DvrSession::DvrManifest>] - # Required. A list of DVR manifests. Currently only one DVR manifest is - # allowed. - # @!attribute [rw] dvr_windows - # @return [::Array<::Google::Cloud::Video::LiveStream::V1::DvrSession::DvrWindow>] - # Required. The specified ranges of segments to generate a DVR recording. - class DvrSession - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # DvrManifest identifies a source manifest and specifies a file name for the - # generated DVR manifest. - # @!attribute [rw] manifest_key - # @return [::String] - # Required. A unique key that identifies a manifest config in the parent - # channel. This key is the same as `channel.manifests.key` for the selected - # manifest. - # @!attribute [r] output_uri - # @return [::String] - # Output only. The output URI of the DVR manifest. The DVR output will be - # placed in a directory named `dvr/dvrSessionId/` under the parent - # channel's output uri. Format: - # \\{channel.output.uri}/dvr/\\{dvrSessionId}/\\{channel.manifests.fileName} - # Example: gs://my-bucket/outputs/dvr/my-dvr-session/main.m3u8 - class DvrManifest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DvrWindow represents a DVR window. - # @!attribute [rw] time_interval - # @return [::Google::Cloud::Video::LiveStream::V1::TimeInterval] - # A time interval in the form of a tuple of Unix epoch time. - class DvrWindow - 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 of the DVR session. - module State - # State is not specified. - STATE_UNSPECIFIED = 0 - - # The operation is pending to be picked up by the server. - PENDING = 1 - - # The session is being updated. - UPDATING = 2 - - # The session is scheduled and waiting for the start time. - SCHEDULED = 3 - - # The session is currently in progress and the outputs are available in the - # specified Cloud Storage bucket. For additional information, see the - # `dvr_manifests.output_uri` field. - LIVE = 4 - - # Outputs are available in the specified Cloud Storage bucket. For - # additional information, see the `dvr_manifests.output_uri` field. - FINISHED = 5 - - # The operation has failed. For additional information, see the `error` - # field. - FAILED = 6 - - # The session is being deleted. - DELETING = 7 - - # The session is being post processed. - POST_PROCESSING = 8 - - # The session is in cooldown. The cooldown period lasts for 60 seconds. - # When the DVR session is updated by the user to have a new end time that - # is likely already in the past, the DVR manifest will end as soon as - # possible and the DVR session will move to this state. This is done to - # prevent the players to receive a manifest update that removes a segment - # that has already been played. After the cooldown period ends, a new - # manifest is generated that honors the new end time. - COOLDOWN = 9 - - # The session is being stopped. The session will move to STOPPING state, if - # the parent channel is updated. - STOPPING = 10 - end - end - - # An asset represents a video or an image. - # @!attribute [rw] name - # @return [::String] - # The resource name of the asset, in the form of: - # `projects/{project}/locations/{location}/assets/{assetId}`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The update time. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # User-defined key/value metadata. - # @!attribute [rw] video - # @return [::Google::Cloud::Video::LiveStream::V1::Asset::VideoAsset] - # VideoAsset represents a video. - # - # Note: The following fields are mutually exclusive: `video`, `image`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image - # @return [::Google::Cloud::Video::LiveStream::V1::Asset::ImageAsset] - # ImageAsset represents an image. - # - # Note: The following fields are mutually exclusive: `image`, `video`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] crc32c - # @return [::String] - # Based64-encoded CRC32c checksum of the asset file. For more information, - # see the crc32c checksum of the [Cloud Storage Objects - # resource](https://cloud.google.com/storage/docs/json_api/v1/objects). - # If crc32c is omitted or left empty when the asset is created, this field is - # filled by the crc32c checksum of the Cloud Storage object indicated by - # {::Google::Cloud::Video::LiveStream::V1::Asset::VideoAsset#uri VideoAsset.uri} or - # {::Google::Cloud::Video::LiveStream::V1::Asset::ImageAsset#uri ImageAsset.uri}. If - # crc32c is set, the asset can't be created if the crc32c value does not - # match with the crc32c checksum of the Cloud Storage object indicated by - # {::Google::Cloud::Video::LiveStream::V1::Asset::VideoAsset#uri VideoAsset.uri} or - # {::Google::Cloud::Video::LiveStream::V1::Asset::ImageAsset#uri ImageAsset.uri}. - # @!attribute [r] state - # @return [::Google::Cloud::Video::LiveStream::V1::Asset::State] - # Output only. The state of the asset resource. - # @!attribute [r] error - # @return [::Google::Rpc::Status] - # Output only. Only present when `state` is `ERROR`. The reason for the error - # state of the asset. - class Asset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # VideoAsset represents a video. The supported formats are MP4, MPEG-TS, and - # FLV. The supported video codec is H264. The supported audio codecs are - # AAC, AC3, MP2, and MP3. - # @!attribute [rw] uri - # @return [::String] - # Cloud Storage URI of the video. The format is `gs://my-bucket/my-object`. - class VideoAsset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Image represents an image. The supported formats are JPEG, PNG. - # @!attribute [rw] uri - # @return [::String] - # Cloud Storage URI of the image. The format is `gs://my-bucket/my-object`. - class ImageAsset - 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 of the asset resource. - module State - # State is not specified. - STATE_UNSPECIFIED = 0 - - # The asset is being created. - CREATING = 1 - - # The asset is ready for use. - ACTIVE = 2 - - # The asset is being deleted. - DELETING = 3 - - # The asset has an error. - ERROR = 4 - end - end - - # Encryption settings. - # @!attribute [rw] id - # @return [::String] - # Required. Identifier for this set of encryption options. The ID must be - # 1-63 characters in length. The ID must begin and end with a letter - # (regardless of case) or a number, but can contain dashes or underscores in - # between. - # @!attribute [rw] secret_manager_key_source - # @return [::Google::Cloud::Video::LiveStream::V1::Encryption::SecretManagerSource] - # For keys stored in Google Secret Manager. - # @!attribute [rw] drm_systems - # @return [::Google::Cloud::Video::LiveStream::V1::Encryption::DrmSystems] - # Required. Configuration for DRM systems. - # @!attribute [rw] aes128 - # @return [::Google::Cloud::Video::LiveStream::V1::Encryption::Aes128Encryption] - # Configuration for HLS AES-128 encryption. - # - # Note: The following fields are mutually exclusive: `aes128`, `sample_aes`, `mpeg_cenc`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] sample_aes - # @return [::Google::Cloud::Video::LiveStream::V1::Encryption::SampleAesEncryption] - # Configuration for HLS SAMPLE-AES encryption. - # - # Note: The following fields are mutually exclusive: `sample_aes`, `aes128`, `mpeg_cenc`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] mpeg_cenc - # @return [::Google::Cloud::Video::LiveStream::V1::Encryption::MpegCommonEncryption] - # Configuration for MPEG-Dash Common Encryption (MPEG-CENC). - # - # Note: The following fields are mutually exclusive: `mpeg_cenc`, `aes128`, `sample_aes`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Encryption - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for secrets stored in Google Secret Manager. - # @!attribute [rw] secret_version - # @return [::String] - # Required. The name of the Secret Version containing the encryption key. - # `projects/{project}/secrets/{secret_id}/versions/{version_number}` - class SecretManagerSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Widevine configuration. - class Widevine - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Fairplay configuration. - class Fairplay - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Playready configuration. - class Playready - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Clearkey configuration. - class Clearkey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines configuration for DRM systems in use. If a field is omitted, - # that DRM system will be considered to be disabled. - # @!attribute [rw] widevine - # @return [::Google::Cloud::Video::LiveStream::V1::Encryption::Widevine] - # Optional. Widevine configuration. - # @!attribute [rw] fairplay - # @return [::Google::Cloud::Video::LiveStream::V1::Encryption::Fairplay] - # Optional. Fairplay configuration. - # @!attribute [rw] playready - # @return [::Google::Cloud::Video::LiveStream::V1::Encryption::Playready] - # Optional. Playready configuration. - # @!attribute [rw] clearkey - # @return [::Google::Cloud::Video::LiveStream::V1::Encryption::Clearkey] - # Optional. Clearkey configuration. - class DrmSystems - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for HLS AES-128 encryption. - class Aes128Encryption - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for HLS SAMPLE-AES encryption. - class SampleAesEncryption - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for MPEG-Dash Common Encryption (MPEG-CENC). - # @!attribute [rw] scheme - # @return [::String] - # Required. Specify the encryption scheme, supported schemes: - # - `cenc` - AES-CTR subsample - # - `cbcs`- AES-CBC subsample pattern - class MpegCommonEncryption - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Encryption setting when updating encryption. - # @!attribute [rw] id - # @return [::String] - # Required. Identifier for the encryption option to be updated. - # @!attribute [rw] secret_manager_key_source - # @return [::Google::Cloud::Video::LiveStream::V1::Encryption::SecretManagerSource] - # For keys stored in Google Secret Manager. - class EncryptionUpdate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Pool resource defines the configuration of Live Stream pools for a specific - # location. Currently we support only one pool resource per project per - # location. After the creation of the first input, a default pool is created - # automatically at "projects/\\{project}/locations/\\{location}/pools/default". - # @!attribute [rw] name - # @return [::String] - # The resource name of the pool, in the form of: - # `projects/{project}/locations/{location}/pools/{poolId}`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The update time. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # User-defined key/value metadata. - # @!attribute [rw] network_config - # @return [::Google::Cloud::Video::LiveStream::V1::Pool::NetworkConfig] - # Network configuration for the pool. - class Pool - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines the network configuration for the pool. - # @!attribute [rw] peered_network - # @return [::String] - # peered_network is the network resource URL of the network that is peered - # to the service provider network. Must be of the format - # projects/NETWORK_PROJECT_NUMBER/global/networks/NETWORK_NAME, where - # NETWORK_PROJECT_NUMBER is the project number of the Cloud project that - # holds your VPC network and NETWORK_NAME is the name of your VPC network. - # If peered_network is omitted or empty, the pool will use endpoints that - # are publicly available. - class NetworkConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/cloud/video/livestream/v1/service.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/cloud/video/livestream/v1/service.rb deleted file mode 100644 index 47f17459c530..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/cloud/video/livestream/v1/service.rb +++ /dev/null @@ -1,1032 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Video - module LiveStream - module V1 - # Request message for "LivestreamService.CreateAsset". - # @!attribute [rw] parent - # @return [::String] - # Required. The parent location for the resource, in the form of: - # `projects/{project}/locations/{location}`. - # @!attribute [rw] asset - # @return [::Google::Cloud::Video::LiveStream::V1::Asset] - # Required. The asset resource to be created. - # @!attribute [rw] asset_id - # @return [::String] - # Required. The ID of the asset resource to be created. - # - # This value must be 1-63 characters, begin and end with a lower-case letter - # or a number, and consist of only lower-case letters, numbers, and hyphens. - # In other words, it must match the following regex: - # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @!attribute [rw] request_id - # @return [::String] - # A 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 CreateAssetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.DeleteAsset". - # @!attribute [rw] name - # @return [::String] - # Required. The name of the asset resource, in the form of: - # `projects/{project}/locations/{location}/assets/{assetId}`. - # @!attribute [rw] request_id - # @return [::String] - # A 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 DeleteAssetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.ListAssets". - # @!attribute [rw] parent - # @return [::String] - # Required. The parent location for the resource, in the form of: - # `projects/{project}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Filtering results - # @!attribute [rw] order_by - # @return [::String] - # Hint for how to order the results - class ListAssetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for "LivestreamService.ListAssets". - # @!attribute [rw] assets - # @return [::Array<::Google::Cloud::Video::LiveStream::V1::Asset>] - # The list of Assets - # @!attribute [rw] next_page_token - # @return [::String] - # The next_page_token value returned from a previous List request, if any. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListAssetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.GetAsset". - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource, in the following form: - # `projects/{project}/locations/{location}/assets/{asset}`. - class GetAssetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.CreateChannel". - # @!attribute [rw] parent - # @return [::String] - # Required. The parent location for the resource, in the form of: - # `projects/{project}/locations/{location}`. - # @!attribute [rw] channel - # @return [::Google::Cloud::Video::LiveStream::V1::Channel] - # Required. The channel resource to be created. - # @!attribute [rw] channel_id - # @return [::String] - # Required. The ID of the channel resource to be created. - # - # This value must be 1-63 characters, begin and end with a lower-case letter - # or a number, and consist of only lower-case letters, numbers, and hyphens. - # In other words, it must match the following regex: - # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @!attribute [rw] request_id - # @return [::String] - # A 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 CreateChannelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.ListChannels". - # @!attribute [rw] parent - # @return [::String] - # Required. The parent location for the resource, in the form of: - # `projects/{project}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return. If unspecified, server - # will pick an appropriate default. Server may return fewer items than - # requested. A caller should only rely on response's - # {::Google::Cloud::Video::LiveStream::V1::ListChannelsResponse#next_page_token next_page_token} - # to determine if there are more items left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous List request, if any. - # @!attribute [rw] filter - # @return [::String] - # The filter to apply to list results. - # @!attribute [rw] order_by - # @return [::String] - # Specifies the ordering of results following syntax at - # https://cloud.google.com/apis/design/design_patterns#sorting_order. - class ListChannelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for "LivestreamService.ListChannels". - # @!attribute [rw] channels - # @return [::Array<::Google::Cloud::Video::LiveStream::V1::Channel>] - # A list of channels. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListChannelsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.GetChannel". - # @!attribute [rw] name - # @return [::String] - # Required. The name of the channel resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}`. - class GetChannelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.DeleteChannel". - # @!attribute [rw] name - # @return [::String] - # Required. The name of the channel resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @!attribute [rw] request_id - # @return [::String] - # A 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)`. - # @!attribute [rw] force - # @return [::Boolean] - # If the `force` field is set to the default value of `false`, you must - # delete all of a channel's events before you can delete the channel itself. - # If the field is set to `true`, requests to delete a channel also delete - # associated channel events. - class DeleteChannelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.UpdateChannel". - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Field mask is used to specify the fields to be overwritten in the Channel - # resource by the update. You can only update the following fields: - # - # * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) - # * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) - # * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) - # * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) - # * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) - # * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) - # * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) - # * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) - # * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) - # * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) - # - # 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 mask is not present, then each field from the list above is updated - # if the field appears in the request payload. To unset a field, add the - # field to the update mask and remove it from the request payload. - # @!attribute [rw] channel - # @return [::Google::Cloud::Video::LiveStream::V1::Channel] - # Required. The channel resource to be updated. - # @!attribute [rw] request_id - # @return [::String] - # A 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 UpdateChannelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.StartChannel". - # @!attribute [rw] name - # @return [::String] - # Required. The name of the channel resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @!attribute [rw] request_id - # @return [::String] - # A 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 StartChannelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.StopChannel". - # @!attribute [rw] name - # @return [::String] - # Required. The name of the channel resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @!attribute [rw] request_id - # @return [::String] - # A 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 StopChannelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.StartDistribution". - # @!attribute [rw] name - # @return [::String] - # Required. The name of the channel resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @!attribute [rw] distribution_keys - # @return [::Array<::String>] - # Optional. A list of keys to identify the distribution configuration in the - # channel resource. If left empty, all the distributions in the channel - # specification will be started. - # @!attribute [rw] request_id - # @return [::String] - # Optional. A 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 StartDistributionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.StopDistribution". - # @!attribute [rw] name - # @return [::String] - # Required. The name of the channel resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @!attribute [rw] distribution_keys - # @return [::Array<::String>] - # Optional. A list of key to identify the distribution configuration in the - # channel resource. If left empty, all the distributions in the channel - # specification will be stopped. - # @!attribute [rw] request_id - # @return [::String] - # Optional. A 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 StopDistributionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.CreateInput". - # @!attribute [rw] parent - # @return [::String] - # Required. The parent location for the resource, in the form of: - # `projects/{project}/locations/{location}`. - # @!attribute [rw] input - # @return [::Google::Cloud::Video::LiveStream::V1::Input] - # Required. The input resource to be created. - # @!attribute [rw] input_id - # @return [::String] - # Required. The ID of the input resource to be created. - # - # This value must be 1-63 characters, begin and end with a lower-case letter - # or a number, and consist of only lower-case letters, numbers, and hyphens. - # In other words, it must match the following regex: - # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @!attribute [rw] request_id - # @return [::String] - # A 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 CreateInputRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.ListInputs". - # @!attribute [rw] parent - # @return [::String] - # Required. The parent location for the resource, in the form of: - # `projects/{project}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return. If unspecified, server - # will pick an appropriate default. Server may return fewer items than - # requested. A caller should only rely on response's - # {::Google::Cloud::Video::LiveStream::V1::ListInputsResponse#next_page_token next_page_token} - # to determine if there are more items left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous List request, if any. - # @!attribute [rw] filter - # @return [::String] - # The filter to apply to list results. - # @!attribute [rw] order_by - # @return [::String] - # Specifies the ordering of results following syntax at [Sorting - # Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). - class ListInputsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for "LivestreamService.ListInputs". - # @!attribute [rw] inputs - # @return [::Array<::Google::Cloud::Video::LiveStream::V1::Input>] - # A list of inputs. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListInputsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.GetInput". - # @!attribute [rw] name - # @return [::String] - # Required. The name of the input resource, in the form of: - # `projects/{project}/locations/{location}/inputs/{inputId}`. - class GetInputRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.DeleteInput". - # @!attribute [rw] name - # @return [::String] - # Required. The name of the input resource, in the form of: - # `projects/{project}/locations/{location}/inputs/{inputId}`. - # @!attribute [rw] request_id - # @return [::String] - # A 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 DeleteInputRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.UpdateInput". - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Field mask is used to specify the fields to be overwritten in the Input - # resource by the update. You can only update the following fields: - # - # * [`tier`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#Tier) - # * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) - # * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) - # - # 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 mask is not present, then each field from the list above is updated - # if the field appears in the request payload. To unset a field, add the - # field to the update mask and remove it from the request payload. - # @!attribute [rw] input - # @return [::Google::Cloud::Video::LiveStream::V1::Input] - # Required. The input resource to be updated. - # @!attribute [rw] request_id - # @return [::String] - # A 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 UpdateInputRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.CreateEvent". - # @!attribute [rw] parent - # @return [::String] - # Required. The parent channel for the resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @!attribute [rw] event - # @return [::Google::Cloud::Video::LiveStream::V1::Event] - # Required. The event resource to be created. - # @!attribute [rw] event_id - # @return [::String] - # Required. The ID of the event resource to be created. - # - # This value must be 1-63 characters, begin and end with a lower-case letter - # or a number, and consist of only lower-case letters, numbers, and hyphens. - # In other words, it must match the following regex: - # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @!attribute [rw] request_id - # @return [::String] - # A 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 CreateEventRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.ListEvents". - # @!attribute [rw] parent - # @return [::String] - # Required. The parent channel for the resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return. If unspecified, server - # will pick an appropriate default. Server may return fewer items than - # requested. A caller should only rely on response's - # {::Google::Cloud::Video::LiveStream::V1::ListEventsResponse#next_page_token next_page_token} - # to determine if there are more items left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous List request, if any. - # @!attribute [rw] filter - # @return [::String] - # The filter to apply to list results. - # @!attribute [rw] order_by - # @return [::String] - # Specifies the ordering of results following syntax at - # https://cloud.google.com/apis/design/design_patterns#sorting_order. - class ListEventsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for "LivestreamService.ListEvents". - # @!attribute [rw] events - # @return [::Array<::Google::Cloud::Video::LiveStream::V1::Event>] - # A list of events. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListEventsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.GetEvent". - # @!attribute [rw] name - # @return [::String] - # Required. The name of the event resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - class GetEventRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.DeleteEvent". - # @!attribute [rw] name - # @return [::String] - # Required. The name of the event resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - # @!attribute [rw] request_id - # @return [::String] - # A 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 DeleteEventRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for Start/Stop Channel long-running operations. - class ChannelOperationResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.ListClips". - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListClipsRequest - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Filtering results - # @!attribute [rw] order_by - # @return [::String] - # Hint for how to order the results - class ListClipsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for "LivestreamService.ListClips". - # @!attribute [rw] clips - # @return [::Array<::Google::Cloud::Video::LiveStream::V1::Clip>] - # The list of Clip - # @!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 ListClipsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.GetClip". - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource, in the following form: - # `projects/{project}/locations/{location}/channels/{channel}/clips/{clip}`. - class GetClipRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.CreateClip". - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name, in the following form: - # `projects/{project}/locations/{location}/channels/{channel}`. - # @!attribute [rw] clip_id - # @return [::String] - # Required. The ID of the clip resource to be created. - # - # This value must be 1-63 characters, begin and end with a lower-case letter - # or a number, and consist of only lower-case letters, numbers, and hyphens. - # In other words, it must match the following regex: - # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @!attribute [rw] clip - # @return [::Google::Cloud::Video::LiveStream::V1::Clip] - # Required. The resource being 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 CreateClipRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.DeleteClip". - # @!attribute [rw] name - # @return [::String] - # Required. The name of the clip resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. A 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 DeleteClipRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.ListDvrSessions". - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListDvrSessionsRequest - # @!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 results - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results - class ListDvrSessionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for "LivestreamService.ListDvrSessions". - # @!attribute [rw] dvr_sessions - # @return [::Array<::Google::Cloud::Video::LiveStream::V1::DvrSession>] - # The list of DVR sessions - # @!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 ListDvrSessionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.GetDvrSession". - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource, in the following form: - # `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`. - class GetDvrSessionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.CreateDvrSession". - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name, in the following form: - # `projects/{project}/locations/{location}/channels/{channelId}`. - # @!attribute [rw] dvr_session_id - # @return [::String] - # Required. The ID of the DVR session resource to be created. - # - # This value must be 1-63 characters, begin and end with a lower-case letter - # or a number, and consist of only lower-case letters, numbers, and hyphens. - # In other words, it must match the following regex: - # `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @!attribute [rw] dvr_session - # @return [::Google::Cloud::Video::LiveStream::V1::DvrSession] - # Required. The resource being 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 CreateDvrSessionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.DeleteDvrSession". - # @!attribute [rw] name - # @return [::String] - # Required. The name of the event resource, in the form of: - # `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. A 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 DeleteDvrSessionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.UpdateDvrSession". - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Field mask is used to specify the fields to be overwritten in the - # DvrSession resource by the update. You can only update the following - # fields: - # - # * `dvrWindows` - # - # 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. - # @!attribute [rw] dvr_session - # @return [::Google::Cloud::Video::LiveStream::V1::DvrSession] - # Required. The DVR session resource to be updated. - # @!attribute [rw] request_id - # @return [::String] - # Optional. A 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 UpdateDvrSessionRequest - 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] 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 "LivestreamService.GetPool". - # @!attribute [rw] name - # @return [::String] - # Required. The name of the pool resource, in the form of: - # `projects/{project}/locations/{location}/pools/{poolId}`. - class GetPoolRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.UpdatePool". - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Field mask is used to specify the fields to be overwritten in the Pool - # resource by the update. You can only update the following fields: - # - # * `networkConfig` - # - # 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. - # @!attribute [rw] pool - # @return [::Google::Cloud::Video::LiveStream::V1::Pool] - # Required. The pool resource to be updated. - # @!attribute [rw] request_id - # @return [::String] - # A 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 UpdatePoolRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for "LivestreamService.PreviewInput" - # @!attribute [rw] name - # @return [::String] - # Required. The name of the input resource, in the form of: - # `projects/{project}/locations/{location}/inputs/{inputId}`. - class PreviewInputRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for "LivestreamService.PreviewInput" - # @!attribute [rw] uri - # @return [::String] - # URI to display the preview content. - # @!attribute [rw] bearer_token - # @return [::String] - # A bearer token used to authenticate connections that display the preview - # content. The token expires after one hour. For HTTP connections, this token - # should be included as a bearer token inside the Authorization header. - class PreviewInputResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/proto_docs/google/type/datetime.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/proto_docs/google/type/datetime.rb deleted file mode 100644 index d15ba7af54e4..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/Gemfile deleted file mode 100644 index ce646e3d1d3b..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-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-video-live_stream-v1", path: "../" -else - gem "google-cloud-video-live_stream-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-video-live_stream-v1/snippets/livestream_service/create_asset.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_asset.rb deleted file mode 100644 index 1cd597923642..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_asset.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START livestream_v1_generated_LivestreamService_CreateAsset_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the create_asset call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_asset. -# -def create_asset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::CreateAssetRequest.new - - # Call the create_asset method. - result = client.create_asset request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END livestream_v1_generated_LivestreamService_CreateAsset_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_channel.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_channel.rb deleted file mode 100644 index dac75f9c51b1..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/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 livestream_v1_generated_LivestreamService_CreateChannel_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the create_channel call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_channel. -# -def create_channel - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::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 livestream_v1_generated_LivestreamService_CreateChannel_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_clip.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_clip.rb deleted file mode 100644 index 263b1fbd6a78..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_clip.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 livestream_v1_generated_LivestreamService_CreateClip_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the create_clip call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_clip. -# -def create_clip - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::CreateClipRequest.new - - # Call the create_clip method. - result = client.create_clip request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END livestream_v1_generated_LivestreamService_CreateClip_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_dvr_session.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_dvr_session.rb deleted file mode 100644 index be10cb5c574b..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_dvr_session.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 livestream_v1_generated_LivestreamService_CreateDvrSession_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the create_dvr_session call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_dvr_session. -# -def create_dvr_session - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest.new - - # Call the create_dvr_session method. - result = client.create_dvr_session request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END livestream_v1_generated_LivestreamService_CreateDvrSession_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_event.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_event.rb deleted file mode 100644 index 6ef860baaa1f..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_event.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 livestream_v1_generated_LivestreamService_CreateEvent_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the create_event call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_event. -# -def create_event - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::CreateEventRequest.new - - # Call the create_event method. - result = client.create_event request - - # The returned object is of type Google::Cloud::Video::LiveStream::V1::Event. - p result -end -# [END livestream_v1_generated_LivestreamService_CreateEvent_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_input.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_input.rb deleted file mode 100644 index 2e25d9fe3e52..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/create_input.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 livestream_v1_generated_LivestreamService_CreateInput_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the create_input call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_input. -# -def create_input - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::CreateInputRequest.new - - # Call the create_input method. - result = client.create_input request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END livestream_v1_generated_LivestreamService_CreateInput_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_asset.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_asset.rb deleted file mode 100644 index c85eed4d8460..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_asset.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START livestream_v1_generated_LivestreamService_DeleteAsset_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the delete_asset call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_asset. -# -def delete_asset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest.new - - # Call the delete_asset method. - result = client.delete_asset request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END livestream_v1_generated_LivestreamService_DeleteAsset_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_channel.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_channel.rb deleted file mode 100644 index d78c007e161b..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/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 livestream_v1_generated_LivestreamService_DeleteChannel_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the delete_channel call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_channel. -# -def delete_channel - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::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 livestream_v1_generated_LivestreamService_DeleteChannel_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_clip.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_clip.rb deleted file mode 100644 index be654078b442..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_clip.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 livestream_v1_generated_LivestreamService_DeleteClip_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the delete_clip call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_clip. -# -def delete_clip - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::DeleteClipRequest.new - - # Call the delete_clip method. - result = client.delete_clip request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END livestream_v1_generated_LivestreamService_DeleteClip_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_dvr_session.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_dvr_session.rb deleted file mode 100644 index 733d7fa61a1c..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_dvr_session.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 livestream_v1_generated_LivestreamService_DeleteDvrSession_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the delete_dvr_session call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_dvr_session. -# -def delete_dvr_session - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest.new - - # Call the delete_dvr_session method. - result = client.delete_dvr_session request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END livestream_v1_generated_LivestreamService_DeleteDvrSession_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_event.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_event.rb deleted file mode 100644 index bf4b8ad1c01d..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_event.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 livestream_v1_generated_LivestreamService_DeleteEvent_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the delete_event call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_event. -# -def delete_event - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::DeleteEventRequest.new - - # Call the delete_event method. - result = client.delete_event request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END livestream_v1_generated_LivestreamService_DeleteEvent_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_input.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_input.rb deleted file mode 100644 index 7f32c9a49824..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/delete_input.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 livestream_v1_generated_LivestreamService_DeleteInput_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the delete_input call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_input. -# -def delete_input - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::DeleteInputRequest.new - - # Call the delete_input method. - result = client.delete_input request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END livestream_v1_generated_LivestreamService_DeleteInput_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_asset.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_asset.rb deleted file mode 100644 index 4f9f71971649..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_asset.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START livestream_v1_generated_LivestreamService_GetAsset_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the get_asset call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_asset. -# -def get_asset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::GetAssetRequest.new - - # Call the get_asset method. - result = client.get_asset request - - # The returned object is of type Google::Cloud::Video::LiveStream::V1::Asset. - p result -end -# [END livestream_v1_generated_LivestreamService_GetAsset_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_channel.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_channel.rb deleted file mode 100644 index 98a538f10b25..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/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 livestream_v1_generated_LivestreamService_GetChannel_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the get_channel call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_channel. -# -def get_channel - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::GetChannelRequest.new - - # Call the get_channel method. - result = client.get_channel request - - # The returned object is of type Google::Cloud::Video::LiveStream::V1::Channel. - p result -end -# [END livestream_v1_generated_LivestreamService_GetChannel_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_clip.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_clip.rb deleted file mode 100644 index 62488fe46f26..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_clip.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 livestream_v1_generated_LivestreamService_GetClip_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the get_clip call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_clip. -# -def get_clip - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::GetClipRequest.new - - # Call the get_clip method. - result = client.get_clip request - - # The returned object is of type Google::Cloud::Video::LiveStream::V1::Clip. - p result -end -# [END livestream_v1_generated_LivestreamService_GetClip_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_dvr_session.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_dvr_session.rb deleted file mode 100644 index 6a651d07ac87..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_dvr_session.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 livestream_v1_generated_LivestreamService_GetDvrSession_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the get_dvr_session call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_dvr_session. -# -def get_dvr_session - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest.new - - # Call the get_dvr_session method. - result = client.get_dvr_session request - - # The returned object is of type Google::Cloud::Video::LiveStream::V1::DvrSession. - p result -end -# [END livestream_v1_generated_LivestreamService_GetDvrSession_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_event.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_event.rb deleted file mode 100644 index e0376dfa6af5..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_event.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 livestream_v1_generated_LivestreamService_GetEvent_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the get_event call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_event. -# -def get_event - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::GetEventRequest.new - - # Call the get_event method. - result = client.get_event request - - # The returned object is of type Google::Cloud::Video::LiveStream::V1::Event. - p result -end -# [END livestream_v1_generated_LivestreamService_GetEvent_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_input.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_input.rb deleted file mode 100644 index 2b5a8ccf03f4..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_input.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 livestream_v1_generated_LivestreamService_GetInput_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the get_input call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_input. -# -def get_input - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::GetInputRequest.new - - # Call the get_input method. - result = client.get_input request - - # The returned object is of type Google::Cloud::Video::LiveStream::V1::Input. - p result -end -# [END livestream_v1_generated_LivestreamService_GetInput_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_pool.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_pool.rb deleted file mode 100644 index 8ea9da19a6cf..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/get_pool.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 livestream_v1_generated_LivestreamService_GetPool_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the get_pool call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_pool. -# -def get_pool - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::GetPoolRequest.new - - # Call the get_pool method. - result = client.get_pool request - - # The returned object is of type Google::Cloud::Video::LiveStream::V1::Pool. - p result -end -# [END livestream_v1_generated_LivestreamService_GetPool_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_assets.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_assets.rb deleted file mode 100644 index 3756f6096bdb..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_assets.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START livestream_v1_generated_LivestreamService_ListAssets_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the list_assets call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_assets. -# -def list_assets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::ListAssetsRequest.new - - # Call the list_assets method. - result = client.list_assets request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Asset. - p item - end -end -# [END livestream_v1_generated_LivestreamService_ListAssets_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_channels.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_channels.rb deleted file mode 100644 index d91e8936af0b..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/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 livestream_v1_generated_LivestreamService_ListChannels_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the list_channels call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_channels. -# -def list_channels - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::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::Video::LiveStream::V1::Channel. - p item - end -end -# [END livestream_v1_generated_LivestreamService_ListChannels_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_clips.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_clips.rb deleted file mode 100644 index c38a77a4210e..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_clips.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 livestream_v1_generated_LivestreamService_ListClips_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the list_clips call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_clips. -# -def list_clips - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::ListClipsRequest.new - - # Call the list_clips method. - result = client.list_clips request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Clip. - p item - end -end -# [END livestream_v1_generated_LivestreamService_ListClips_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_dvr_sessions.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_dvr_sessions.rb deleted file mode 100644 index f3882aac3b1f..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_dvr_sessions.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 livestream_v1_generated_LivestreamService_ListDvrSessions_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the list_dvr_sessions call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_dvr_sessions. -# -def list_dvr_sessions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest.new - - # Call the list_dvr_sessions method. - result = client.list_dvr_sessions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Video::LiveStream::V1::DvrSession. - p item - end -end -# [END livestream_v1_generated_LivestreamService_ListDvrSessions_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_events.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_events.rb deleted file mode 100644 index ad81a5f24b7f..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_events.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 livestream_v1_generated_LivestreamService_ListEvents_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the list_events call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_events. -# -def list_events - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::ListEventsRequest.new - - # Call the list_events method. - result = client.list_events request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Event. - p item - end -end -# [END livestream_v1_generated_LivestreamService_ListEvents_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_inputs.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_inputs.rb deleted file mode 100644 index 3806909b0944..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/list_inputs.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 livestream_v1_generated_LivestreamService_ListInputs_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the list_inputs call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_inputs. -# -def list_inputs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::ListInputsRequest.new - - # Call the list_inputs method. - result = client.list_inputs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Input. - p item - end -end -# [END livestream_v1_generated_LivestreamService_ListInputs_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/preview_input.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/preview_input.rb deleted file mode 100644 index d550a09e0211..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/preview_input.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 livestream_v1_generated_LivestreamService_PreviewInput_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the preview_input call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#preview_input. -# -def preview_input - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::PreviewInputRequest.new - - # Call the preview_input method. - result = client.preview_input request - - # The returned object is of type Google::Cloud::Video::LiveStream::V1::PreviewInputResponse. - p result -end -# [END livestream_v1_generated_LivestreamService_PreviewInput_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/start_channel.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/start_channel.rb deleted file mode 100644 index df968f3cb54a..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/start_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 livestream_v1_generated_LivestreamService_StartChannel_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the start_channel call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#start_channel. -# -def start_channel - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::StartChannelRequest.new - - # Call the start_channel method. - result = client.start_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 livestream_v1_generated_LivestreamService_StartChannel_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/start_distribution.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/start_distribution.rb deleted file mode 100644 index 844445f7f9b3..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/start_distribution.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 livestream_v1_generated_LivestreamService_StartDistribution_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the start_distribution call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#start_distribution. -# -def start_distribution - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::StartDistributionRequest.new - - # Call the start_distribution method. - result = client.start_distribution request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END livestream_v1_generated_LivestreamService_StartDistribution_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/stop_channel.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/stop_channel.rb deleted file mode 100644 index 8c3b49c350c7..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/stop_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 livestream_v1_generated_LivestreamService_StopChannel_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the stop_channel call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#stop_channel. -# -def stop_channel - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::StopChannelRequest.new - - # Call the stop_channel method. - result = client.stop_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 livestream_v1_generated_LivestreamService_StopChannel_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/stop_distribution.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/stop_distribution.rb deleted file mode 100644 index e6250762bc48..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/stop_distribution.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 livestream_v1_generated_LivestreamService_StopDistribution_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the stop_distribution call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#stop_distribution. -# -def stop_distribution - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::StopDistributionRequest.new - - # Call the stop_distribution method. - result = client.stop_distribution request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END livestream_v1_generated_LivestreamService_StopDistribution_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_channel.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_channel.rb deleted file mode 100644 index 69b1b71701ab..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/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 livestream_v1_generated_LivestreamService_UpdateChannel_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the update_channel call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#update_channel. -# -def update_channel - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::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 livestream_v1_generated_LivestreamService_UpdateChannel_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_dvr_session.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_dvr_session.rb deleted file mode 100644 index 71198791fe7c..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_dvr_session.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 livestream_v1_generated_LivestreamService_UpdateDvrSession_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the update_dvr_session call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#update_dvr_session. -# -def update_dvr_session - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest.new - - # Call the update_dvr_session method. - result = client.update_dvr_session request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END livestream_v1_generated_LivestreamService_UpdateDvrSession_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_input.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_input.rb deleted file mode 100644 index ecbc94e34893..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_input.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 livestream_v1_generated_LivestreamService_UpdateInput_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the update_input call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#update_input. -# -def update_input - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::UpdateInputRequest.new - - # Call the update_input method. - result = client.update_input request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END livestream_v1_generated_LivestreamService_UpdateInput_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_pool.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_pool.rb deleted file mode 100644 index 07fb543dd597..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/livestream_service/update_pool.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 livestream_v1_generated_LivestreamService_UpdatePool_sync] -require "google/cloud/video/live_stream/v1" - -## -# Snippet for the update_pool call in the LivestreamService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#update_pool. -# -def update_pool - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest.new - - # Call the update_pool method. - result = client.update_pool request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END livestream_v1_generated_LivestreamService_UpdatePool_sync] diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/snippet_metadata_google.cloud.video.livestream.v1.json b/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/snippet_metadata_google.cloud.video.livestream.v1.json deleted file mode 100644 index 7a2c0afa9929..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/snippets/snippet_metadata_google.cloud.video.livestream.v1.json +++ /dev/null @@ -1,1375 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-video-live_stream-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.video.livestream.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "livestream_v1_generated_LivestreamService_CreateChannel_sync", - "title": "Snippet for the create_channel call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_channel.", - "file": "livestream_service/create_channel.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_channel", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_channel", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "CreateChannel", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.CreateChannel", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_ListChannels_sync", - "title": "Snippet for the list_channels call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_channels.", - "file": "livestream_service/list_channels.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_channels", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_channels", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::ListChannelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::LiveStream::V1::ListChannelsResponse", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "ListChannels", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.ListChannels", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_GetChannel_sync", - "title": "Snippet for the get_channel call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_channel.", - "file": "livestream_service/get_channel.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_channel", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_channel", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::GetChannelRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::LiveStream::V1::Channel", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "GetChannel", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.GetChannel", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_DeleteChannel_sync", - "title": "Snippet for the delete_channel call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_channel.", - "file": "livestream_service/delete_channel.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_channel", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_channel", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "DeleteChannel", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.DeleteChannel", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_UpdateChannel_sync", - "title": "Snippet for the update_channel call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#update_channel.", - "file": "livestream_service/update_channel.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_channel", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#update_channel", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "UpdateChannel", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.UpdateChannel", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_StartChannel_sync", - "title": "Snippet for the start_channel call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#start_channel.", - "file": "livestream_service/start_channel.rb", - "language": "RUBY", - "client_method": { - "short_name": "start_channel", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#start_channel", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::StartChannelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "StartChannel", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.StartChannel", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_StopChannel_sync", - "title": "Snippet for the stop_channel call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#stop_channel.", - "file": "livestream_service/stop_channel.rb", - "language": "RUBY", - "client_method": { - "short_name": "stop_channel", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#stop_channel", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::StopChannelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "StopChannel", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.StopChannel", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_StartDistribution_sync", - "title": "Snippet for the start_distribution call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#start_distribution.", - "file": "livestream_service/start_distribution.rb", - "language": "RUBY", - "client_method": { - "short_name": "start_distribution", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#start_distribution", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "StartDistribution", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.StartDistribution", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_StopDistribution_sync", - "title": "Snippet for the stop_distribution call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#stop_distribution.", - "file": "livestream_service/stop_distribution.rb", - "language": "RUBY", - "client_method": { - "short_name": "stop_distribution", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#stop_distribution", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "StopDistribution", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.StopDistribution", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_CreateInput_sync", - "title": "Snippet for the create_input call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_input.", - "file": "livestream_service/create_input.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_input", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_input", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::CreateInputRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "CreateInput", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.CreateInput", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_ListInputs_sync", - "title": "Snippet for the list_inputs call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_inputs.", - "file": "livestream_service/list_inputs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_inputs", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_inputs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::ListInputsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::LiveStream::V1::ListInputsResponse", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "ListInputs", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.ListInputs", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_GetInput_sync", - "title": "Snippet for the get_input call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_input.", - "file": "livestream_service/get_input.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_input", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_input", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::GetInputRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::LiveStream::V1::Input", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "GetInput", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.GetInput", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_DeleteInput_sync", - "title": "Snippet for the delete_input call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_input.", - "file": "livestream_service/delete_input.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_input", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_input", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "DeleteInput", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.DeleteInput", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_UpdateInput_sync", - "title": "Snippet for the update_input call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#update_input.", - "file": "livestream_service/update_input.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_input", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#update_input", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "UpdateInput", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.UpdateInput", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_PreviewInput_sync", - "title": "Snippet for the preview_input call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#preview_input.", - "file": "livestream_service/preview_input.rb", - "language": "RUBY", - "client_method": { - "short_name": "preview_input", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#preview_input", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::LiveStream::V1::PreviewInputResponse", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "PreviewInput", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.PreviewInput", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_CreateEvent_sync", - "title": "Snippet for the create_event call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_event.", - "file": "livestream_service/create_event.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_event", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_event", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::CreateEventRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::LiveStream::V1::Event", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "CreateEvent", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.CreateEvent", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_ListEvents_sync", - "title": "Snippet for the list_events call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_events.", - "file": "livestream_service/list_events.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_events", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_events", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::ListEventsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::LiveStream::V1::ListEventsResponse", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "ListEvents", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.ListEvents", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_GetEvent_sync", - "title": "Snippet for the get_event call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_event.", - "file": "livestream_service/get_event.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_event", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_event", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::GetEventRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::LiveStream::V1::Event", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "GetEvent", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.GetEvent", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_DeleteEvent_sync", - "title": "Snippet for the delete_event call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_event.", - "file": "livestream_service/delete_event.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_event", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_event", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "DeleteEvent", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.DeleteEvent", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_ListClips_sync", - "title": "Snippet for the list_clips call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_clips.", - "file": "livestream_service/list_clips.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_clips", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_clips", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::ListClipsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::LiveStream::V1::ListClipsResponse", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "ListClips", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.ListClips", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_GetClip_sync", - "title": "Snippet for the get_clip call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_clip.", - "file": "livestream_service/get_clip.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_clip", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_clip", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::GetClipRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::LiveStream::V1::Clip", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "GetClip", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.GetClip", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_CreateClip_sync", - "title": "Snippet for the create_clip call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_clip.", - "file": "livestream_service/create_clip.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_clip", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_clip", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::CreateClipRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "CreateClip", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.CreateClip", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_DeleteClip_sync", - "title": "Snippet for the delete_clip call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_clip.", - "file": "livestream_service/delete_clip.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_clip", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_clip", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "DeleteClip", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.DeleteClip", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_CreateDvrSession_sync", - "title": "Snippet for the create_dvr_session call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_dvr_session.", - "file": "livestream_service/create_dvr_session.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_dvr_session", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_dvr_session", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "CreateDvrSession", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.CreateDvrSession", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_ListDvrSessions_sync", - "title": "Snippet for the list_dvr_sessions call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_dvr_sessions.", - "file": "livestream_service/list_dvr_sessions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_dvr_sessions", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_dvr_sessions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsResponse", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "ListDvrSessions", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.ListDvrSessions", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_GetDvrSession_sync", - "title": "Snippet for the get_dvr_session call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_dvr_session.", - "file": "livestream_service/get_dvr_session.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_dvr_session", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_dvr_session", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::LiveStream::V1::DvrSession", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "GetDvrSession", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.GetDvrSession", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_DeleteDvrSession_sync", - "title": "Snippet for the delete_dvr_session call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_dvr_session.", - "file": "livestream_service/delete_dvr_session.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_dvr_session", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_dvr_session", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "DeleteDvrSession", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.DeleteDvrSession", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_UpdateDvrSession_sync", - "title": "Snippet for the update_dvr_session call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#update_dvr_session.", - "file": "livestream_service/update_dvr_session.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_dvr_session", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#update_dvr_session", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "UpdateDvrSession", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.UpdateDvrSession", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_CreateAsset_sync", - "title": "Snippet for the create_asset call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_asset.", - "file": "livestream_service/create_asset.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_asset", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#create_asset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "CreateAsset", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.CreateAsset", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_DeleteAsset_sync", - "title": "Snippet for the delete_asset call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_asset.", - "file": "livestream_service/delete_asset.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_asset", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#delete_asset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "DeleteAsset", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.DeleteAsset", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_GetAsset_sync", - "title": "Snippet for the get_asset call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_asset.", - "file": "livestream_service/get_asset.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_asset", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_asset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::GetAssetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::LiveStream::V1::Asset", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "GetAsset", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.GetAsset", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_ListAssets_sync", - "title": "Snippet for the list_assets call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_assets.", - "file": "livestream_service/list_assets.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_assets", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#list_assets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::LiveStream::V1::ListAssetsResponse", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "ListAssets", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.ListAssets", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_GetPool_sync", - "title": "Snippet for the get_pool call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_pool.", - "file": "livestream_service/get_pool.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_pool", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#get_pool", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::GetPoolRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::LiveStream::V1::Pool", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "GetPool", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.GetPool", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "livestream_v1_generated_LivestreamService_UpdatePool_sync", - "title": "Snippet for the update_pool call in the LivestreamService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#update_pool.", - "file": "livestream_service/update_pool.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_pool", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client#update_pool", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "LivestreamService::Client", - "full_name": "::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client" - }, - "method": { - "short_name": "UpdatePool", - "full_name": "google.cloud.video.livestream.v1.LivestreamService.UpdatePool", - "service": { - "short_name": "LivestreamService", - "full_name": "google.cloud.video.livestream.v1.LivestreamService" - } - } - }, - "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-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_operations_test.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_operations_test.rb deleted file mode 100644 index 6d395ffb507e..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_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/video/livestream/v1/service_pb" -require "google/cloud/video/livestream/v1/service_services_pb" -require "google/cloud/video/live_stream/v1/livestream_service" - -class ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::V1::LivestreamService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_paths_test.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_paths_test.rb deleted file mode 100644 index ae4c7b52909c..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_paths_test.rb +++ /dev/null @@ -1,163 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/video/live_stream/v1/livestream_service" - -class ::Google::Cloud::Video::LiveStream::V1::LivestreamService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_asset_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.asset_path project: "value0", location: "value1", asset: "value2" - assert_equal "projects/value0/locations/value1/assets/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::Video::LiveStream::V1::LivestreamService::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_clip_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.clip_path project: "value0", location: "value1", channel: "value2", clip: "value3" - assert_equal "projects/value0/locations/value1/channels/value2/clips/value3", path - end - end - - def test_dvr_session_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dvr_session_path project: "value0", location: "value1", channel: "value2", dvr_session: "value3" - assert_equal "projects/value0/locations/value1/channels/value2/dvrSessions/value3", path - end - end - - def test_event_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.event_path project: "value0", location: "value1", channel: "value2", event: "value3" - assert_equal "projects/value0/locations/value1/channels/value2/events/value3", path - end - end - - def test_input_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.input_path project: "value0", location: "value1", input: "value2" - assert_equal "projects/value0/locations/value1/inputs/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::Video::LiveStream::V1::LivestreamService::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_network_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.network_path project: "value0", network: "value1" - assert_equal "projects/value0/global/networks/value1", path - end - end - - def test_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::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.pool_path project: "value0", location: "value1", pool: "value2" - assert_equal "projects/value0/locations/value1/pools/value2", path - end - end - - def test_secret_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::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.secret_version_path project: "value0", secret: "value1", version: "value2" - assert_equal "projects/value0/secrets/value1/versions/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_rest_test.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_rest_test.rb deleted file mode 100644 index c116c36189e7..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_rest_test.rb +++ /dev/null @@ -1,1998 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/video/livestream/v1/service_pb" -require "google/cloud/video/live_stream/v1/livestream_service/rest" - - -class ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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_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" - request_id = "hello world" - - 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::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_create_channel_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_channel_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_channel({ parent: parent, channel: channel, channel_id: channel_id, request_id: request_id }) 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, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_channel ::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest.new(parent: parent, channel: channel, channel_id: channel_id, request_id: request_id) 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, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_channel(::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest.new(parent: parent, channel: channel, channel_id: channel_id, request_id: request_id), 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_list_channels - # Create test objects. - client_result = ::Google::Cloud::Video::LiveStream::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" - filter = "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::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_list_channels_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_channels_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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, filter: filter, 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, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_channels ::Google::Cloud::Video::LiveStream::V1::ListChannelsRequest.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_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_channels(::Google::Cloud::Video::LiveStream::V1::ListChannelsRequest.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_channels_client_stub.call_count - end - end - end - - def test_get_channel - # Create test objects. - client_result = ::Google::Cloud::Video::LiveStream::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::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_get_channel_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_channel_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::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::Video::LiveStream::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_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" - request_id = "hello world" - force = 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::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_delete_channel_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_channel_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_channel({ name: name, request_id: request_id, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_channel name: name, request_id: request_id, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_channel ::Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest.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_channel({ 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_channel(::Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest.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_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. - update_mask = {} - channel = {} - request_id = "hello world" - - 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::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_update_channel_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_channel_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_channel({ update_mask: update_mask, channel: channel, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_channel update_mask: update_mask, channel: channel, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_channel ::Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest.new(update_mask: update_mask, channel: channel, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_channel({ update_mask: update_mask, channel: channel, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_channel(::Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest.new(update_mask: update_mask, channel: channel, request_id: request_id), 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_start_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" - request_id = "hello world" - - start_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::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_start_channel_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, start_channel_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.start_channel({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.start_channel name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.start_channel ::Google::Cloud::Video::LiveStream::V1::StartChannelRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.start_channel({ 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.start_channel(::Google::Cloud::Video::LiveStream::V1::StartChannelRequest.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, start_channel_client_stub.call_count - end - end - end - - def test_stop_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" - request_id = "hello world" - - stop_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::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_stop_channel_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, stop_channel_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.stop_channel({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.stop_channel name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.stop_channel ::Google::Cloud::Video::LiveStream::V1::StopChannelRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.stop_channel({ 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.stop_channel(::Google::Cloud::Video::LiveStream::V1::StopChannelRequest.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, stop_channel_client_stub.call_count - end - end - end - - def test_start_distribution - # Create test objects. - 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" - distribution_keys = ["hello world"] - request_id = "hello world" - - start_distribution_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_start_distribution_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, start_distribution_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.start_distribution({ name: name, distribution_keys: distribution_keys, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.start_distribution name: name, distribution_keys: distribution_keys, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.start_distribution ::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest.new(name: name, distribution_keys: distribution_keys, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.start_distribution({ name: name, distribution_keys: distribution_keys, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.start_distribution(::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest.new(name: name, distribution_keys: distribution_keys, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, start_distribution_client_stub.call_count - end - end - end - - def test_stop_distribution - # Create test objects. - 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" - distribution_keys = ["hello world"] - request_id = "hello world" - - stop_distribution_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_stop_distribution_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, stop_distribution_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.stop_distribution({ name: name, distribution_keys: distribution_keys, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.stop_distribution name: name, distribution_keys: distribution_keys, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.stop_distribution ::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest.new(name: name, distribution_keys: distribution_keys, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.stop_distribution({ name: name, distribution_keys: distribution_keys, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.stop_distribution(::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest.new(name: name, distribution_keys: distribution_keys, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, stop_distribution_client_stub.call_count - end - end - end - - def test_create_input - # Create test objects. - 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" - input = {} - input_id = "hello world" - request_id = "hello world" - - create_input_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_create_input_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_input_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_input({ parent: parent, input: input, input_id: input_id, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_input parent: parent, input: input, input_id: input_id, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_input ::Google::Cloud::Video::LiveStream::V1::CreateInputRequest.new(parent: parent, input: input, input_id: input_id, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_input({ parent: parent, input: input, input_id: input_id, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_input(::Google::Cloud::Video::LiveStream::V1::CreateInputRequest.new(parent: parent, input: input, input_id: input_id, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_input_client_stub.call_count - end - end - end - - def test_list_inputs - # Create test objects. - client_result = ::Google::Cloud::Video::LiveStream::V1::ListInputsResponse.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_inputs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_list_inputs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_inputs_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_inputs({ parent: parent, page_size: 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_inputs parent: parent, page_size: 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_inputs ::Google::Cloud::Video::LiveStream::V1::ListInputsRequest.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_inputs({ parent: parent, page_size: page_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_inputs(::Google::Cloud::Video::LiveStream::V1::ListInputsRequest.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_inputs_client_stub.call_count - end - end - end - - def test_get_input - # Create test objects. - client_result = ::Google::Cloud::Video::LiveStream::V1::Input.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_input_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_get_input_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_input_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_input({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_input name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_input ::Google::Cloud::Video::LiveStream::V1::GetInputRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_input({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_input(::Google::Cloud::Video::LiveStream::V1::GetInputRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_input_client_stub.call_count - end - end - end - - def test_delete_input - # Create test objects. - 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_input_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_delete_input_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_input_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_input({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_input name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_input ::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest.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_input({ 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_input(::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest.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_input_client_stub.call_count - end - end - end - - def test_update_input - # Create test objects. - 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 = {} - input = {} - request_id = "hello world" - - update_input_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_update_input_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_input_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_input({ update_mask: update_mask, input: input, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_input update_mask: update_mask, input: input, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_input ::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest.new(update_mask: update_mask, input: input, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_input({ update_mask: update_mask, input: input, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_input(::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest.new(update_mask: update_mask, input: input, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_input_client_stub.call_count - end - end - end - - def test_preview_input - # Create test objects. - client_result = ::Google::Cloud::Video::LiveStream::V1::PreviewInputResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - preview_input_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_preview_input_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, preview_input_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.preview_input({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.preview_input name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.preview_input ::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.preview_input({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.preview_input(::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, preview_input_client_stub.call_count - end - end - end - - def test_create_event - # Create test objects. - client_result = ::Google::Cloud::Video::LiveStream::V1::Event.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - event = {} - event_id = "hello world" - request_id = "hello world" - - create_event_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_create_event_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_event_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_event({ parent: parent, event: event, event_id: event_id, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_event parent: parent, event: event, event_id: event_id, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_event ::Google::Cloud::Video::LiveStream::V1::CreateEventRequest.new(parent: parent, event: event, event_id: event_id, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_event({ parent: parent, event: event, event_id: event_id, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_event(::Google::Cloud::Video::LiveStream::V1::CreateEventRequest.new(parent: parent, event: event, event_id: event_id, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_event_client_stub.call_count - end - end - end - - def test_list_events - # Create test objects. - client_result = ::Google::Cloud::Video::LiveStream::V1::ListEventsResponse.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_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::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_list_events_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_events_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_events({ parent: parent, page_size: 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_events parent: parent, page_size: 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_events ::Google::Cloud::Video::LiveStream::V1::ListEventsRequest.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_events({ parent: parent, page_size: page_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_events(::Google::Cloud::Video::LiveStream::V1::ListEventsRequest.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_events_client_stub.call_count - end - end - end - - def test_get_event - # Create test objects. - client_result = ::Google::Cloud::Video::LiveStream::V1::Event.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_event_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_get_event_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_event_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_event({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_event name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_event ::Google::Cloud::Video::LiveStream::V1::GetEventRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_event({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_event(::Google::Cloud::Video::LiveStream::V1::GetEventRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_event_client_stub.call_count - end - end - end - - def test_delete_event - # 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" - request_id = "hello world" - - delete_event_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_delete_event_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_event_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_event({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_event name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_event ::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest.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_event({ 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_event(::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest.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_event_client_stub.call_count - end - end - end - - def test_list_clips - # Create test objects. - client_result = ::Google::Cloud::Video::LiveStream::V1::ListClipsResponse.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_clips_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_list_clips_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_clips_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_clips({ parent: parent, page_size: 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_clips parent: parent, page_size: 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_clips ::Google::Cloud::Video::LiveStream::V1::ListClipsRequest.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_clips({ parent: parent, page_size: page_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_clips(::Google::Cloud::Video::LiveStream::V1::ListClipsRequest.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_clips_client_stub.call_count - end - end - end - - def test_get_clip - # Create test objects. - client_result = ::Google::Cloud::Video::LiveStream::V1::Clip.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_clip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_get_clip_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_clip_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_clip({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_clip name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_clip ::Google::Cloud::Video::LiveStream::V1::GetClipRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_clip({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_clip(::Google::Cloud::Video::LiveStream::V1::GetClipRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_clip_client_stub.call_count - end - end - end - - def test_create_clip - # Create test objects. - 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" - clip_id = "hello world" - clip = {} - request_id = "hello world" - - create_clip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_create_clip_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_clip_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_clip({ parent: parent, clip_id: clip_id, clip: clip, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_clip parent: parent, clip_id: clip_id, clip: clip, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_clip ::Google::Cloud::Video::LiveStream::V1::CreateClipRequest.new(parent: parent, clip_id: clip_id, clip: clip, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_clip({ parent: parent, clip_id: clip_id, clip: clip, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_clip(::Google::Cloud::Video::LiveStream::V1::CreateClipRequest.new(parent: parent, clip_id: clip_id, clip: clip, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_clip_client_stub.call_count - end - end - end - - def test_delete_clip - # Create test objects. - 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_clip_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_delete_clip_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_clip_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_clip({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_clip name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_clip ::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest.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_clip({ 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_clip(::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest.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_clip_client_stub.call_count - end - end - end - - def test_create_dvr_session - # Create test objects. - 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" - dvr_session_id = "hello world" - dvr_session = {} - request_id = "hello world" - - create_dvr_session_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_create_dvr_session_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_dvr_session_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_dvr_session({ parent: parent, dvr_session_id: dvr_session_id, dvr_session: dvr_session, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_dvr_session parent: parent, dvr_session_id: dvr_session_id, dvr_session: dvr_session, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_dvr_session ::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest.new(parent: parent, dvr_session_id: dvr_session_id, dvr_session: dvr_session, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_dvr_session({ parent: parent, dvr_session_id: dvr_session_id, dvr_session: dvr_session, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_dvr_session(::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest.new(parent: parent, dvr_session_id: dvr_session_id, dvr_session: dvr_session, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_dvr_session_client_stub.call_count - end - end - end - - def test_list_dvr_sessions - # Create test objects. - client_result = ::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsResponse.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_dvr_sessions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_list_dvr_sessions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_dvr_sessions_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_dvr_sessions({ parent: parent, page_size: 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_dvr_sessions parent: parent, page_size: 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_dvr_sessions ::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest.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_dvr_sessions({ parent: parent, page_size: page_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_dvr_sessions(::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest.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_dvr_sessions_client_stub.call_count - end - end - end - - def test_get_dvr_session - # Create test objects. - client_result = ::Google::Cloud::Video::LiveStream::V1::DvrSession.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_dvr_session_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_get_dvr_session_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_dvr_session_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_dvr_session({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_dvr_session name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_dvr_session ::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_dvr_session({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_dvr_session(::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_dvr_session_client_stub.call_count - end - end - end - - def test_delete_dvr_session - # Create test objects. - 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_dvr_session_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_delete_dvr_session_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_dvr_session_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_dvr_session({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_dvr_session name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_dvr_session ::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest.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_dvr_session({ 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_dvr_session(::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest.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_dvr_session_client_stub.call_count - end - end - end - - def test_update_dvr_session - # Create test objects. - 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 = {} - dvr_session = {} - request_id = "hello world" - - update_dvr_session_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_update_dvr_session_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_dvr_session_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_dvr_session({ update_mask: update_mask, dvr_session: dvr_session, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_dvr_session update_mask: update_mask, dvr_session: dvr_session, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_dvr_session ::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest.new(update_mask: update_mask, dvr_session: dvr_session, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_dvr_session({ update_mask: update_mask, dvr_session: dvr_session, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_dvr_session(::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest.new(update_mask: update_mask, dvr_session: dvr_session, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_dvr_session_client_stub.call_count - end - end - end - - def test_create_asset - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - asset = {} - asset_id = "hello world" - request_id = "hello world" - - create_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_create_asset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_asset_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_asset({ parent: parent, asset: asset, asset_id: asset_id, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_asset parent: parent, asset: asset, asset_id: asset_id, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_asset ::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest.new(parent: parent, asset: asset, asset_id: asset_id, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_asset({ parent: parent, asset: asset, asset_id: asset_id, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_asset(::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest.new(parent: parent, asset: asset, asset_id: asset_id, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_asset_client_stub.call_count - end - end - end - - def test_delete_asset - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_delete_asset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_asset_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_asset({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_asset name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_asset ::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest.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_asset({ 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_asset(::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest.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_asset_client_stub.call_count - end - end - end - - def test_get_asset - # Create test objects. - client_result = ::Google::Cloud::Video::LiveStream::V1::Asset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_get_asset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_asset_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_asset({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_asset name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_asset ::Google::Cloud::Video::LiveStream::V1::GetAssetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_asset({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_asset(::Google::Cloud::Video::LiveStream::V1::GetAssetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_asset_client_stub.call_count - end - end - end - - def test_list_assets - # Create test objects. - client_result = ::Google::Cloud::Video::LiveStream::V1::ListAssetsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_list_assets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_assets_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_assets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_assets ::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_assets(::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_assets_client_stub.call_count - end - end - end - - def test_get_pool - # Create test objects. - client_result = ::Google::Cloud::Video::LiveStream::V1::Pool.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_pool_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_get_pool_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_pool_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_pool({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_pool name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_pool ::Google::Cloud::Video::LiveStream::V1::GetPoolRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_pool({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_pool(::Google::Cloud::Video::LiveStream::V1::GetPoolRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_pool_client_stub.call_count - end - end - end - - def test_update_pool - # Create test objects. - 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 = {} - pool = {} - request_id = "hello world" - - update_pool_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::ServiceStub.stub :transcode_update_pool_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_pool_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_pool({ update_mask: update_mask, pool: pool, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_pool update_mask: update_mask, pool: pool, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_pool ::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest.new(update_mask: update_mask, pool: pool, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_pool({ update_mask: update_mask, pool: pool, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_pool(::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest.new(update_mask: update_mask, pool: pool, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_pool_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::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::V1::LivestreamService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_test.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_test.rb deleted file mode 100644 index bf117eb14fe0..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/test/google/cloud/video/live_stream/v1/livestream_service_test.rb +++ /dev/null @@ -1,2336 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/video/livestream/v1/service_pb" -require "google/cloud/video/live_stream/v1/livestream_service" - -class ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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_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" - request_id = "hello world" - - create_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_channel, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::LiveStream::V1::Channel), request["channel"] - assert_equal "hello world", request["channel_id"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_channel_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_channel({ parent: parent, channel: channel, channel_id: channel_id, 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_channel parent: parent, channel: channel, channel_id: channel_id, 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_channel ::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest.new(parent: parent, channel: channel, channel_id: channel_id, 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_channel({ parent: parent, channel: channel, channel_id: channel_id, 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_channel(::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest.new(parent: parent, channel: channel, channel_id: channel_id, 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_channel_client_stub.call_rpc_count - end - end - - def test_list_channels - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::LiveStream::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" - filter = "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::Video::LiveStream::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["filter"] - 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::Video::LiveStream::V1::LivestreamService::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, filter: filter, order_by: 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, filter: filter, order_by: 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::Video::LiveStream::V1::ListChannelsRequest.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_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_channels(::Google::Cloud::Video::LiveStream::V1::ListChannelsRequest.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_channels_client_stub.call_rpc_count - end - end - - def test_get_channel - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::LiveStream::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::Video::LiveStream::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::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::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::Video::LiveStream::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_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" - request_id = "hello world" - force = 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::Video::LiveStream::V1::DeleteChannelRequest, 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_channel_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_channel({ 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_channel 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_channel ::Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest.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_channel({ 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_channel(::Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest.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_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. - update_mask = {} - channel = {} - request_id = "hello world" - - update_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_channel, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::LiveStream::V1::Channel), request["channel"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_channel_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_channel({ update_mask: update_mask, channel: channel, 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_channel update_mask: update_mask, channel: channel, 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_channel ::Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest.new(update_mask: update_mask, channel: channel, 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_channel({ update_mask: update_mask, channel: channel, 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_channel(::Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest.new(update_mask: update_mask, channel: channel, 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_channel_client_stub.call_rpc_count - end - end - - def test_start_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" - request_id = "hello world" - - start_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :start_channel, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::StartChannelRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, start_channel_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.start_channel({ 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.start_channel 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.start_channel ::Google::Cloud::Video::LiveStream::V1::StartChannelRequest.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.start_channel({ 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.start_channel(::Google::Cloud::Video::LiveStream::V1::StartChannelRequest.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, start_channel_client_stub.call_rpc_count - end - end - - def test_stop_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" - request_id = "hello world" - - stop_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :stop_channel, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::StopChannelRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, stop_channel_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.stop_channel({ 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.stop_channel 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.stop_channel ::Google::Cloud::Video::LiveStream::V1::StopChannelRequest.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.stop_channel({ 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.stop_channel(::Google::Cloud::Video::LiveStream::V1::StopChannelRequest.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, stop_channel_client_stub.call_rpc_count - end - end - - def test_start_distribution - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - distribution_keys = ["hello world"] - request_id = "hello world" - - start_distribution_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :start_distribution, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest, request - assert_equal "hello world", request["name"] - assert_equal ["hello world"], request["distribution_keys"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, start_distribution_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.start_distribution({ name: name, distribution_keys: distribution_keys, 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.start_distribution name: name, distribution_keys: distribution_keys, 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.start_distribution ::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest.new(name: name, distribution_keys: distribution_keys, 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.start_distribution({ name: name, distribution_keys: distribution_keys, 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.start_distribution(::Google::Cloud::Video::LiveStream::V1::StartDistributionRequest.new(name: name, distribution_keys: distribution_keys, 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, start_distribution_client_stub.call_rpc_count - end - end - - def test_stop_distribution - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - distribution_keys = ["hello world"] - request_id = "hello world" - - stop_distribution_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :stop_distribution, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest, request - assert_equal "hello world", request["name"] - assert_equal ["hello world"], request["distribution_keys"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, stop_distribution_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.stop_distribution({ name: name, distribution_keys: distribution_keys, 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.stop_distribution name: name, distribution_keys: distribution_keys, 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.stop_distribution ::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest.new(name: name, distribution_keys: distribution_keys, 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.stop_distribution({ name: name, distribution_keys: distribution_keys, 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.stop_distribution(::Google::Cloud::Video::LiveStream::V1::StopDistributionRequest.new(name: name, distribution_keys: distribution_keys, 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, stop_distribution_client_stub.call_rpc_count - end - end - - def test_create_input - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - input = {} - input_id = "hello world" - request_id = "hello world" - - create_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_input, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::CreateInputRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::LiveStream::V1::Input), request["input"] - assert_equal "hello world", request["input_id"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_input_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_input({ parent: parent, input: input, input_id: input_id, 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_input parent: parent, input: input, input_id: input_id, 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_input ::Google::Cloud::Video::LiveStream::V1::CreateInputRequest.new(parent: parent, input: input, input_id: input_id, 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_input({ parent: parent, input: input, input_id: input_id, 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_input(::Google::Cloud::Video::LiveStream::V1::CreateInputRequest.new(parent: parent, input: input, input_id: input_id, 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_input_client_stub.call_rpc_count - end - end - - def test_list_inputs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::LiveStream::V1::ListInputsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_inputs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_inputs, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::ListInputsRequest, 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_inputs_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_inputs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_inputs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_inputs ::Google::Cloud::Video::LiveStream::V1::ListInputsRequest.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_inputs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_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_inputs(::Google::Cloud::Video::LiveStream::V1::ListInputsRequest.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_inputs_client_stub.call_rpc_count - end - end - - def test_get_input - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::LiveStream::V1::Input.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_input, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::GetInputRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_input_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_input({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_input name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_input ::Google::Cloud::Video::LiveStream::V1::GetInputRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_input({ 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_input(::Google::Cloud::Video::LiveStream::V1::GetInputRequest.new(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_input_client_stub.call_rpc_count - end - end - - def test_delete_input - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_input, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_input_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_input({ 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_input 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_input ::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest.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_input({ 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_input(::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest.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_input_client_stub.call_rpc_count - end - end - - def test_update_input - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.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 = {} - input = {} - request_id = "hello world" - - update_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_input, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::LiveStream::V1::Input), request["input"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_input_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_input({ update_mask: update_mask, input: input, 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_input update_mask: update_mask, input: input, 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_input ::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest.new(update_mask: update_mask, input: input, 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_input({ update_mask: update_mask, input: input, 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_input(::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest.new(update_mask: update_mask, input: input, 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_input_client_stub.call_rpc_count - end - end - - def test_preview_input - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::LiveStream::V1::PreviewInputResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - preview_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :preview_input, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, preview_input_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.preview_input({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.preview_input name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.preview_input ::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.preview_input({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.preview_input(::Google::Cloud::Video::LiveStream::V1::PreviewInputRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, preview_input_client_stub.call_rpc_count - end - end - - def test_create_event - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::LiveStream::V1::Event.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - event = {} - event_id = "hello world" - request_id = "hello world" - - create_event_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_event, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::CreateEventRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::LiveStream::V1::Event), request["event"] - assert_equal "hello world", request["event_id"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_event_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_event({ parent: parent, event: event, event_id: event_id, request_id: request_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_event parent: parent, event: event, event_id: event_id, request_id: request_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_event ::Google::Cloud::Video::LiveStream::V1::CreateEventRequest.new(parent: parent, event: event, event_id: event_id, request_id: request_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_event({ parent: parent, event: event, event_id: event_id, request_id: request_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_event(::Google::Cloud::Video::LiveStream::V1::CreateEventRequest.new(parent: parent, event: event, event_id: event_id, request_id: request_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_event_client_stub.call_rpc_count - end - end - - def test_list_events - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::LiveStream::V1::ListEventsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_events_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_events, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::ListEventsRequest, 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_events_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_events parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_events ::Google::Cloud::Video::LiveStream::V1::ListEventsRequest.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_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_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_events(::Google::Cloud::Video::LiveStream::V1::ListEventsRequest.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_events_client_stub.call_rpc_count - end - end - - def test_get_event - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::LiveStream::V1::Event.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_event_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_event, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::GetEventRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_event_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_event({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_event name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_event ::Google::Cloud::Video::LiveStream::V1::GetEventRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_event({ 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_event(::Google::Cloud::Video::LiveStream::V1::GetEventRequest.new(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_event_client_stub.call_rpc_count - end - end - - def test_delete_event - # 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" - request_id = "hello world" - - delete_event_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_event, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_event_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_event({ name: name, request_id: request_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_event name: name, request_id: request_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_event ::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest.new(name: name, request_id: request_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_event({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_event(::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_event_client_stub.call_rpc_count - end - end - - def test_list_clips - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::LiveStream::V1::ListClipsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_clips_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_clips, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::ListClipsRequest, 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_clips_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_clips({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_clips parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_clips ::Google::Cloud::Video::LiveStream::V1::ListClipsRequest.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_clips({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_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_clips(::Google::Cloud::Video::LiveStream::V1::ListClipsRequest.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_clips_client_stub.call_rpc_count - end - end - - def test_get_clip - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::LiveStream::V1::Clip.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_clip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_clip, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::GetClipRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_clip_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_clip({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_clip name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_clip ::Google::Cloud::Video::LiveStream::V1::GetClipRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_clip({ 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_clip(::Google::Cloud::Video::LiveStream::V1::GetClipRequest.new(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_clip_client_stub.call_rpc_count - end - end - - def test_create_clip - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - clip_id = "hello world" - clip = {} - request_id = "hello world" - - create_clip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_clip, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::CreateClipRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["clip_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::LiveStream::V1::Clip), request["clip"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_clip_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_clip({ parent: parent, clip_id: clip_id, clip: clip, 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_clip parent: parent, clip_id: clip_id, clip: clip, 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_clip ::Google::Cloud::Video::LiveStream::V1::CreateClipRequest.new(parent: parent, clip_id: clip_id, clip: clip, 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_clip({ parent: parent, clip_id: clip_id, clip: clip, 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_clip(::Google::Cloud::Video::LiveStream::V1::CreateClipRequest.new(parent: parent, clip_id: clip_id, clip: clip, 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_clip_client_stub.call_rpc_count - end - end - - def test_delete_clip - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_clip_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_clip, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_clip_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_clip({ 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_clip 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_clip ::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest.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_clip({ 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_clip(::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest.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_clip_client_stub.call_rpc_count - end - end - - def test_create_dvr_session - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - dvr_session_id = "hello world" - dvr_session = {} - request_id = "hello world" - - create_dvr_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_dvr_session, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["dvr_session_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::LiveStream::V1::DvrSession), request["dvr_session"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_dvr_session_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_dvr_session({ parent: parent, dvr_session_id: dvr_session_id, dvr_session: dvr_session, 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_dvr_session parent: parent, dvr_session_id: dvr_session_id, dvr_session: dvr_session, 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_dvr_session ::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest.new(parent: parent, dvr_session_id: dvr_session_id, dvr_session: dvr_session, 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_dvr_session({ parent: parent, dvr_session_id: dvr_session_id, dvr_session: dvr_session, 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_dvr_session(::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest.new(parent: parent, dvr_session_id: dvr_session_id, dvr_session: dvr_session, 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_dvr_session_client_stub.call_rpc_count - end - end - - def test_list_dvr_sessions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_dvr_sessions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_dvr_sessions, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest, 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_dvr_sessions_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_dvr_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_dvr_sessions parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_dvr_sessions ::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest.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_dvr_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_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_dvr_sessions(::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest.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_dvr_sessions_client_stub.call_rpc_count - end - end - - def test_get_dvr_session - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::LiveStream::V1::DvrSession.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_dvr_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_dvr_session, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_dvr_session_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_dvr_session({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_dvr_session name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_dvr_session ::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_dvr_session({ 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_dvr_session(::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest.new(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_dvr_session_client_stub.call_rpc_count - end - end - - def test_delete_dvr_session - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_dvr_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_dvr_session, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_dvr_session_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_dvr_session({ 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_dvr_session 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_dvr_session ::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest.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_dvr_session({ 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_dvr_session(::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest.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_dvr_session_client_stub.call_rpc_count - end - end - - def test_update_dvr_session - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.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 = {} - dvr_session = {} - request_id = "hello world" - - update_dvr_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_dvr_session, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::LiveStream::V1::DvrSession), request["dvr_session"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_dvr_session_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_dvr_session({ update_mask: update_mask, dvr_session: dvr_session, 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_dvr_session update_mask: update_mask, dvr_session: dvr_session, 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_dvr_session ::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest.new(update_mask: update_mask, dvr_session: dvr_session, 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_dvr_session({ update_mask: update_mask, dvr_session: dvr_session, 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_dvr_session(::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest.new(update_mask: update_mask, dvr_session: dvr_session, 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_dvr_session_client_stub.call_rpc_count - end - end - - def test_create_asset - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - asset = {} - asset_id = "hello world" - request_id = "hello world" - - create_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_asset, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::LiveStream::V1::Asset), request["asset"] - assert_equal "hello world", request["asset_id"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_asset_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_asset({ parent: parent, asset: asset, asset_id: asset_id, 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_asset parent: parent, asset: asset, asset_id: asset_id, 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_asset ::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest.new(parent: parent, asset: asset, asset_id: asset_id, 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_asset({ parent: parent, asset: asset, asset_id: asset_id, 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_asset(::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest.new(parent: parent, asset: asset, asset_id: asset_id, 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_asset_client_stub.call_rpc_count - end - end - - def test_delete_asset - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_asset, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_asset_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_asset({ 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_asset 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_asset ::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest.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_asset({ 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_asset(::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest.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_asset_client_stub.call_rpc_count - end - end - - def test_get_asset - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::LiveStream::V1::Asset.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_asset, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::GetAssetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_asset_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_asset({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_asset name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_asset ::Google::Cloud::Video::LiveStream::V1::GetAssetRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_asset({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_asset(::Google::Cloud::Video::LiveStream::V1::GetAssetRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_asset_client_stub.call_rpc_count - end - end - - def test_list_assets - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::LiveStream::V1::ListAssetsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_assets, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_assets_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_assets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_assets ::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_assets(::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_assets_client_stub.call_rpc_count - end - end - - def test_get_pool - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::LiveStream::V1::Pool.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_pool, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::GetPoolRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_pool_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_pool({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_pool name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_pool ::Google::Cloud::Video::LiveStream::V1::GetPoolRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_pool({ 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_pool(::Google::Cloud::Video::LiveStream::V1::GetPoolRequest.new(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_pool_client_stub.call_rpc_count - end - end - - def test_update_pool - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.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 = {} - pool = {} - request_id = "hello world" - - update_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_pool, name - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::LiveStream::V1::Pool), request["pool"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_pool_client_stub do - # Create client - client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_pool({ update_mask: update_mask, pool: pool, 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_pool update_mask: update_mask, pool: pool, 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_pool ::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest.new(update_mask: update_mask, pool: pool, 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_pool({ update_mask: update_mask, pool: pool, 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_pool(::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest.new(update_mask: update_mask, pool: pool, 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_pool_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::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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::Video::LiveStream::V1::LivestreamService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-video-live_stream-v1/test/helper.rb b/owl-bot-staging/google-cloud-video-live_stream-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-video-live_stream-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/.gitignore b/owl-bot-staging/google-cloud-video-stitcher-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-video-stitcher-v1/.repo-metadata.json deleted file mode 100644 index 5c95871d9709..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "videostitcher.googleapis.com", - "api_shortname": "videostitcher", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-video-stitcher-v1/latest", - "distribution_name": "google-cloud-video-stitcher-v1", - "is_cloud": true, - "language": "ruby", - "name": "videostitcher", - "name_pretty": "Video Stitcher V1 API", - "product_documentation": "https://cloud.google.com/video-stitcher/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The Video Stitcher API allows you to manipulate video content to dynamically insert ads prior to delivery to client devices. Using the Video Stitcher API, you can monetize your video-on-demand (VOD) and livestreaming videos by inserting ads as described by metadata stored on ad servers. Note that google-cloud-video-stitcher-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video-stitcher instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/video-stitcher/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/.rubocop.yml b/owl-bot-staging/google-cloud-video-stitcher-v1/.rubocop.yml deleted file mode 100644 index 6750e6a72b64..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-video-stitcher-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-video-stitcher-v1.rb" diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/.toys.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/.yardopts b/owl-bot-staging/google-cloud-video-stitcher-v1/.yardopts deleted file mode 100644 index a71ced3203b4..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Video Stitcher 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-video-stitcher-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-video-stitcher-v1/AUTHENTICATION.md deleted file mode 100644 index 85cec40eba69..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-video-stitcher-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-video-stitcher-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/video/stitcher/v1" - -client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/video/stitcher/v1" - -::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::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-video-stitcher-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/video/stitcher/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::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-video-stitcher-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-video-stitcher-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/Gemfile b/owl-bot-staging/google-cloud-video-stitcher-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/LICENSE.md b/owl-bot-staging/google-cloud-video-stitcher-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/README.md b/owl-bot-staging/google-cloud-video-stitcher-v1/README.md deleted file mode 100644 index 06f29ac75e2b..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Video Stitcher V1 API - -API Client library for the Video Stitcher V1 API - -The Video Stitcher API allows you to manipulate video content to dynamically insert ads prior to delivery to client devices. Using the Video Stitcher API, you can monetize your video-on-demand (VOD) and livestreaming videos by inserting ads as described by metadata stored on ad servers. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Video Stitcher V1 API. Most users should consider using -the main client gem, -[google-cloud-video-stitcher](https://rubygems.org/gems/google-cloud-video-stitcher). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-video-stitcher-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/videostitcher.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/video/stitcher/v1" - -client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new -request = ::Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest.new # (request fields as keyword arguments...) -response = client.create_cdn_key request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-video-stitcher-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/video-stitcher/) -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/video/stitcher/v1" -require "logger" - -client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::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-video-stitcher`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-video-stitcher-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-video-stitcher`. -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-video-stitcher-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-video-stitcher-v1/Rakefile b/owl-bot-staging/google-cloud-video-stitcher-v1/Rakefile deleted file mode 100644 index 9dc332412105..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-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/video/stitcher/v1/video_stitcher_service/credentials" - ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::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-video-stitcher-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-video-stitcher-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-video-stitcher-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-video-stitcher-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-video-stitcher-v1" - header "google-cloud-video-stitcher-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-video-stitcher-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-video-stitcher-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-video-stitcher-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-video-stitcher-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-video-stitcher-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-video-stitcher-v1/gapic_metadata.json deleted file mode 100644 index fc4ef14efe88..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/gapic_metadata.json +++ /dev/null @@ -1,168 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.video.stitcher.v1", - "libraryPackage": "::Google::Cloud::Video::Stitcher::V1", - "services": { - "VideoStitcherService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client", - "rpcs": { - "CreateCdnKey": { - "methods": [ - "create_cdn_key" - ] - }, - "ListCdnKeys": { - "methods": [ - "list_cdn_keys" - ] - }, - "GetCdnKey": { - "methods": [ - "get_cdn_key" - ] - }, - "DeleteCdnKey": { - "methods": [ - "delete_cdn_key" - ] - }, - "UpdateCdnKey": { - "methods": [ - "update_cdn_key" - ] - }, - "CreateVodSession": { - "methods": [ - "create_vod_session" - ] - }, - "GetVodSession": { - "methods": [ - "get_vod_session" - ] - }, - "ListVodStitchDetails": { - "methods": [ - "list_vod_stitch_details" - ] - }, - "GetVodStitchDetail": { - "methods": [ - "get_vod_stitch_detail" - ] - }, - "ListVodAdTagDetails": { - "methods": [ - "list_vod_ad_tag_details" - ] - }, - "GetVodAdTagDetail": { - "methods": [ - "get_vod_ad_tag_detail" - ] - }, - "ListLiveAdTagDetails": { - "methods": [ - "list_live_ad_tag_details" - ] - }, - "GetLiveAdTagDetail": { - "methods": [ - "get_live_ad_tag_detail" - ] - }, - "CreateSlate": { - "methods": [ - "create_slate" - ] - }, - "ListSlates": { - "methods": [ - "list_slates" - ] - }, - "GetSlate": { - "methods": [ - "get_slate" - ] - }, - "UpdateSlate": { - "methods": [ - "update_slate" - ] - }, - "DeleteSlate": { - "methods": [ - "delete_slate" - ] - }, - "CreateLiveSession": { - "methods": [ - "create_live_session" - ] - }, - "GetLiveSession": { - "methods": [ - "get_live_session" - ] - }, - "CreateLiveConfig": { - "methods": [ - "create_live_config" - ] - }, - "ListLiveConfigs": { - "methods": [ - "list_live_configs" - ] - }, - "GetLiveConfig": { - "methods": [ - "get_live_config" - ] - }, - "DeleteLiveConfig": { - "methods": [ - "delete_live_config" - ] - }, - "UpdateLiveConfig": { - "methods": [ - "update_live_config" - ] - }, - "CreateVodConfig": { - "methods": [ - "create_vod_config" - ] - }, - "ListVodConfigs": { - "methods": [ - "list_vod_configs" - ] - }, - "GetVodConfig": { - "methods": [ - "get_vod_config" - ] - }, - "DeleteVodConfig": { - "methods": [ - "delete_vod_config" - ] - }, - "UpdateVodConfig": { - "methods": [ - "update_vod_config" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/google-cloud-video-stitcher-v1.gemspec b/owl-bot-staging/google-cloud-video-stitcher-v1/google-cloud-video-stitcher-v1.gemspec deleted file mode 100644 index 17089d5a2781..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/google-cloud-video-stitcher-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/video/stitcher/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-video-stitcher-v1" - gem.version = Google::Cloud::Video::Stitcher::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The Video Stitcher API allows you to manipulate video content to dynamically insert ads prior to delivery to client devices. Using the Video Stitcher API, you can monetize your video-on-demand (VOD) and livestreaming videos by inserting ads as described by metadata stored on ad servers. Note that google-cloud-video-stitcher-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video-stitcher instead. See the readme for more details." - gem.summary = "API Client library for the Video Stitcher 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.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google-cloud-video-stitcher-v1.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google-cloud-video-stitcher-v1.rb deleted file mode 100644 index 3ec70b3fd9d9..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google-cloud-video-stitcher-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/video/stitcher/v1" diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1.rb deleted file mode 100644 index a222bc758760..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/video/stitcher/v1/video_stitcher_service" -require "google/cloud/video/stitcher/v1/version" - -module Google - module Cloud - module Video - module Stitcher - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/video/stitcher/v1" - # client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/video/stitcher/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/ad_tag_details_pb.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/ad_tag_details_pb.rb deleted file mode 100644 index df61dc7bfc94..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/ad_tag_details_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/video/stitcher/v1/ad_tag_details.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/struct_pb' - - -descriptor_data = "\n3google/cloud/video/stitcher/v1/ad_tag_details.proto\x12\x1egoogle.cloud.video.stitcher.v1\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xff\x01\n\x0fLiveAdTagDetail\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x0b\x61\x64_requests\x18\x02 \x03(\x0b\x32).google.cloud.video.stitcher.v1.AdRequest:\x9d\x01\xea\x41\x99\x01\n,videostitcher.googleapis.com/LiveAdTagDetail\x12iprojects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}\"\xf9\x01\n\x0eVodAdTagDetail\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x0b\x61\x64_requests\x18\x02 \x03(\x0b\x32).google.cloud.video.stitcher.v1.AdRequest:\x98\x01\xea\x41\x94\x01\n+videostitcher.googleapis.com/VodAdTagDetail\x12\x65projects/{project}/locations/{location}/vodSessions/{vod_session}/vodAdTagDetails/{vod_ad_tag_detail}\"\xb0\x01\n\tAdRequest\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12I\n\x10request_metadata\x18\x02 \x01(\x0b\x32/.google.cloud.video.stitcher.v1.RequestMetadata\x12K\n\x11response_metadata\x18\x03 \x01(\x0b\x32\x30.google.cloud.video.stitcher.v1.ResponseMetadata\";\n\x0fRequestMetadata\x12(\n\x07headers\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xaf\x01\n\x10ResponseMetadata\x12\r\n\x05\x65rror\x18\x01 \x01(\t\x12(\n\x07headers\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x13\n\x0bstatus_code\x18\x03 \x01(\t\x12\x12\n\nsize_bytes\x18\x04 \x01(\x05\x12+\n\x08\x64uration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0c\n\x04\x62ody\x18\x06 \x01(\tBy\n\"com.google.cloud.video.stitcher.v1B\x11\x41\x64TagDetailsProtoP\x01Z>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Video - module Stitcher - module V1 - LiveAdTagDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.LiveAdTagDetail").msgclass - VodAdTagDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.VodAdTagDetail").msgclass - AdRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.AdRequest").msgclass - RequestMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.RequestMetadata").msgclass - ResponseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ResponseMetadata").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/cdn_keys_pb.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/cdn_keys_pb.rb deleted file mode 100644 index dc1c4e7c12cb..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/cdn_keys_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/video/stitcher/v1/cdn_keys.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n-google/cloud/video/stitcher/v1/cdn_keys.proto\x12\x1egoogle.cloud.video.stitcher.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xf5\x02\n\x06\x43\x64nKey\x12\x46\n\x0egoogle_cdn_key\x18\x05 \x01(\x0b\x32,.google.cloud.video.stitcher.v1.GoogleCdnKeyH\x00\x12\x46\n\x0e\x61kamai_cdn_key\x18\x06 \x01(\x0b\x32,.google.cloud.video.stitcher.v1.AkamaiCdnKeyH\x00\x12\x44\n\rmedia_cdn_key\x18\x08 \x01(\x0b\x32+.google.cloud.video.stitcher.v1.MediaCdnKeyH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08hostname\x18\x04 \x01(\t:c\xea\x41`\n#videostitcher.googleapis.com/CdnKey\x12\x39projects/{project}/locations/{location}/cdnKeys/{cdn_key}B\x10\n\x0e\x63\x64n_key_config\":\n\x0cGoogleCdnKey\x12\x18\n\x0bprivate_key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x04\x12\x10\n\x08key_name\x18\x02 \x01(\t\"&\n\x0c\x41kamaiCdnKey\x12\x16\n\ttoken_key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x04\"\xba\x01\n\x0bMediaCdnKey\x12\x18\n\x0bprivate_key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x04\x12\x10\n\x08key_name\x18\x02 \x01(\t\x12R\n\x0ctoken_config\x18\x03 \x01(\x0b\x32\x37.google.cloud.video.stitcher.v1.MediaCdnKey.TokenConfigB\x03\xe0\x41\x01\x1a+\n\x0bTokenConfig\x12\x1c\n\x0fquery_parameter\x18\x01 \x01(\tB\x03\xe0\x41\x01\x42t\n\"com.google.cloud.video.stitcher.v1B\x0c\x43\x64nKeysProtoP\x01Z>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Video - module Stitcher - module V1 - CdnKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.CdnKey").msgclass - GoogleCdnKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.GoogleCdnKey").msgclass - AkamaiCdnKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.AkamaiCdnKey").msgclass - MediaCdnKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.MediaCdnKey").msgclass - MediaCdnKey::TokenConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.MediaCdnKey.TokenConfig").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/companions_pb.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/companions_pb.rb deleted file mode 100644 index 5ee3fc8a67fe..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/companions_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/video/stitcher/v1/companions.proto - -require 'google/protobuf' - -require 'google/cloud/video/stitcher/v1/events_pb' - - -descriptor_data = "\n/google/cloud/video/stitcher/v1/companions.proto\x12\x1egoogle.cloud.video.stitcher.v1\x1a+google/cloud/video/stitcher/v1/events.proto\"\x82\x02\n\x0c\x43ompanionAds\x12\\\n\x13\x64isplay_requirement\x18\x01 \x01(\x0e\x32?.google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement\x12=\n\ncompanions\x18\x02 \x03(\x0b\x32).google.cloud.video.stitcher.v1.Companion\"U\n\x12\x44isplayRequirement\x12#\n\x1f\x44ISPLAY_REQUIREMENT_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41LL\x10\x01\x12\x07\n\x03\x41NY\x10\x02\x12\x08\n\x04NONE\x10\x03\"\xf5\x03\n\tCompanion\x12N\n\x12iframe_ad_resource\x18\n \x01(\x0b\x32\x30.google.cloud.video.stitcher.v1.IframeAdResourceH\x00\x12N\n\x12static_ad_resource\x18\x0b \x01(\x0b\x32\x30.google.cloud.video.stitcher.v1.StaticAdResourceH\x00\x12J\n\x10html_ad_resource\x18\x0c \x01(\x0b\x32..google.cloud.video.stitcher.v1.HtmlAdResourceH\x00\x12\x15\n\rapi_framework\x18\x01 \x01(\t\x12\x11\n\theight_px\x18\x02 \x01(\x05\x12\x10\n\x08width_px\x18\x03 \x01(\x05\x12\x17\n\x0f\x61sset_height_px\x18\x04 \x01(\x05\x12\x1a\n\x12\x65xpanded_height_px\x18\x05 \x01(\x05\x12\x16\n\x0e\x61sset_width_px\x18\x06 \x01(\x05\x12\x19\n\x11\x65xpanded_width_px\x18\x07 \x01(\x05\x12\x12\n\nad_slot_id\x18\x08 \x01(\t\x12\x35\n\x06\x65vents\x18\t \x03(\x0b\x32%.google.cloud.video.stitcher.v1.EventB\r\n\x0b\x61\x64_resource\"%\n\x0eHtmlAdResource\x12\x13\n\x0bhtml_source\x18\x01 \x01(\t\"\x1f\n\x10IframeAdResource\x12\x0b\n\x03uri\x18\x01 \x01(\t\"6\n\x10StaticAdResource\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x15\n\rcreative_type\x18\x02 \x01(\tBw\n\"com.google.cloud.video.stitcher.v1B\x0f\x43ompanionsProtoP\x01Z>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Video - module Stitcher - module V1 - CompanionAds = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.CompanionAds").msgclass - CompanionAds::DisplayRequirement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement").enummodule - Companion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.Companion").msgclass - HtmlAdResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.HtmlAdResource").msgclass - IframeAdResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.IframeAdResource").msgclass - StaticAdResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.StaticAdResource").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/events_pb.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/events_pb.rb deleted file mode 100644 index b0a9c9265b93..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/events_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/video/stitcher/v1/events.proto - -require 'google/protobuf' - -require 'google/protobuf/duration_pb' - - -descriptor_data = "\n+google/cloud/video/stitcher/v1/events.proto\x12\x1egoogle.cloud.video.stitcher.v1\x1a\x1egoogle/protobuf/duration.proto\"\x8e\x04\n\x05\x45vent\x12=\n\x04type\x18\x01 \x01(\x0e\x32/.google.cloud.video.stitcher.v1.Event.EventType\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\n\n\x02id\x18\x03 \x01(\t\x12)\n\x06offset\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x81\x03\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rCREATIVE_VIEW\x10\x01\x12\t\n\x05START\x10\x02\x12\x0f\n\x0b\x42REAK_START\x10\x03\x12\r\n\tBREAK_END\x10\x04\x12\x0e\n\nIMPRESSION\x10\x05\x12\x12\n\x0e\x46IRST_QUARTILE\x10\x06\x12\x0c\n\x08MIDPOINT\x10\x07\x12\x12\n\x0eTHIRD_QUARTILE\x10\x08\x12\x0c\n\x08\x43OMPLETE\x10\t\x12\x0c\n\x08PROGRESS\x10\n\x12\x08\n\x04MUTE\x10\x0b\x12\n\n\x06UNMUTE\x10\x0c\x12\t\n\x05PAUSE\x10\r\x12\t\n\x05\x43LICK\x10\x0e\x12\x11\n\rCLICK_THROUGH\x10\x0f\x12\n\n\x06REWIND\x10\x10\x12\n\n\x06RESUME\x10\x11\x12\t\n\x05\x45RROR\x10\x12\x12\n\n\x06\x45XPAND\x10\x15\x12\x0c\n\x08\x43OLLAPSE\x10\x16\x12\t\n\x05\x43LOSE\x10\x18\x12\x10\n\x0c\x43LOSE_LINEAR\x10\x19\x12\x08\n\x04SKIP\x10\x1a\x12\x15\n\x11\x41\x43\x43\x45PT_INVITATION\x10\x1b\"v\n\rProgressEvent\x12.\n\x0btime_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x06\x65vents\x18\x02 \x03(\x0b\x32%.google.cloud.video.stitcher.v1.EventBs\n\"com.google.cloud.video.stitcher.v1B\x0b\x45ventsProtoP\x01Z>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Video - module Stitcher - module V1 - Event = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.Event").msgclass - Event::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.Event.EventType").enummodule - ProgressEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ProgressEvent").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/fetch_options_pb.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/fetch_options_pb.rb deleted file mode 100644 index 2bf23c9feba0..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/fetch_options_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/video/stitcher/v1/fetch_options.proto - -require 'google/protobuf' - - -descriptor_data = "\n2google/cloud/video/stitcher/v1/fetch_options.proto\x12\x1egoogle.cloud.video.stitcher.v1\"\x8a\x01\n\x0c\x46\x65tchOptions\x12J\n\x07headers\x18\x01 \x03(\x0b\x32\x39.google.cloud.video.stitcher.v1.FetchOptions.HeadersEntry\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42y\n\"com.google.cloud.video.stitcher.v1B\x11\x46\x65tchOptionsProtoP\x01Z>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Video - module Stitcher - module V1 - FetchOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.FetchOptions").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/live_configs_pb.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/live_configs_pb.rb deleted file mode 100644 index 967531ee3d21..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/live_configs_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/video/stitcher/v1/live_configs.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/video/stitcher/v1/fetch_options_pb' -require 'google/protobuf/duration_pb' - - -descriptor_data = "\n1google/cloud/video/stitcher/v1/live_configs.proto\x12\x1egoogle.cloud.video.stitcher.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/video/stitcher/v1/fetch_options.proto\x1a\x1egoogle/protobuf/duration.proto\"\xda\x06\n\nLiveConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nsource_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nad_tag_uri\x18\x03 \x01(\t\x12\x46\n\x0fgam_live_config\x18\x04 \x01(\x0b\x32-.google.cloud.video.stitcher.v1.GamLiveConfig\x12\x44\n\x05state\x18\x05 \x01(\x0e\x32\x30.google.cloud.video.stitcher.v1.LiveConfig.StateB\x03\xe0\x41\x03\x12\x44\n\x0b\x61\x64_tracking\x18\x06 \x01(\x0e\x32*.google.cloud.video.stitcher.v1.AdTrackingB\x03\xe0\x41\x02\x12>\n\rdefault_slate\x18\x07 \x01(\tB\'\xfa\x41$\n\"videostitcher.googleapis.com/Slate\x12T\n\x10stitching_policy\x18\x08 \x01(\x0e\x32:.google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy\x12G\n\x0fprefetch_config\x18\n \x01(\x0b\x32..google.cloud.video.stitcher.v1.PrefetchConfig\x12J\n\x14source_fetch_options\x18\x10 \x01(\x0b\x32,.google.cloud.video.stitcher.v1.FetchOptions\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\"U\n\x0fStitchingPolicy\x12 \n\x1cSTITCHING_POLICY_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x43UT_CURRENT\x10\x01\x12\x0f\n\x0b\x43OMPLETE_AD\x10\x02:o\xea\x41l\n\'videostitcher.googleapis.com/LiveConfig\x12\x41projects/{project}/locations/{location}/liveConfigs/{live_config}\"f\n\x0ePrefetchConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12>\n\x1binitial_ad_request_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"a\n\rGamLiveConfig\x12\x19\n\x0cnetwork_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tasset_key\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x63ustom_asset_key\x18\x03 \x01(\tB\x03\xe0\x41\x03*A\n\nAdTracking\x12\x1b\n\x17\x41\x44_TRACKING_UNSPECIFIED\x10\x00\x12\n\n\x06\x43LIENT\x10\x01\x12\n\n\x06SERVER\x10\x02\x42x\n\"com.google.cloud.video.stitcher.v1B\x10LiveConfigsProtoP\x01Z>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Video - module Stitcher - module V1 - LiveConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.LiveConfig").msgclass - LiveConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.LiveConfig.State").enummodule - LiveConfig::StitchingPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy").enummodule - PrefetchConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.PrefetchConfig").msgclass - GamLiveConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.GamLiveConfig").msgclass - AdTracking = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.AdTracking").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/sessions_pb.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/sessions_pb.rb deleted file mode 100644 index 6d8a8b838511..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/sessions_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/video/stitcher/v1/sessions.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/video/stitcher/v1/companions_pb' -require 'google/cloud/video/stitcher/v1/events_pb' -require 'google/cloud/video/stitcher/v1/live_configs_pb' -require 'google/protobuf/duration_pb' - - -descriptor_data = "\n-google/cloud/video/stitcher/v1/sessions.proto\x12\x1egoogle.cloud.video.stitcher.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/cloud/video/stitcher/v1/companions.proto\x1a+google/cloud/video/stitcher/v1/events.proto\x1a\x31google/cloud/video/stitcher/v1/live_configs.proto\x1a\x1egoogle/protobuf/duration.proto\"\xa2\x06\n\nVodSession\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12I\n\rinterstitials\x18\x02 \x01(\x0b\x32-.google.cloud.video.stitcher.v1.InterstitialsB\x03\xe0\x41\x03\x12\x15\n\x08play_uri\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\nsource_uri\x18\x05 \x01(\t\x12\x12\n\nad_tag_uri\x18\x06 \x01(\t\x12W\n\x10\x61\x64_tag_macro_map\x18\x07 \x03(\x0b\x32=.google.cloud.video.stitcher.v1.VodSession.AdTagMacroMapEntry\x12I\n\x10manifest_options\x18\t \x01(\x0b\x32/.google.cloud.video.stitcher.v1.ManifestOptions\x12\x15\n\x08\x61sset_id\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x44\n\x0b\x61\x64_tracking\x18\x0b \x01(\x0e\x32*.google.cloud.video.stitcher.v1.AdTrackingB\x03\xe0\x41\x02\x12L\n\x0cgam_settings\x18\r \x01(\x0b\x32\x36.google.cloud.video.stitcher.v1.VodSession.GamSettings\x12?\n\nvod_config\x18\x0e \x01(\tB+\xfa\x41(\n&videostitcher.googleapis.com/VodConfig\x1a@\n\x0bGamSettings\x12\x19\n\x0cnetwork_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tstream_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\x34\n\x12\x41\x64TagMacroMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:o\xea\x41l\n\'videostitcher.googleapis.com/VodSession\x12\x41projects/{project}/locations/{location}/vodSessions/{vod_session}\"\xa1\x01\n\rInterstitials\x12\x44\n\tad_breaks\x18\x01 \x03(\x0b\x32\x31.google.cloud.video.stitcher.v1.VodSessionAdBreak\x12J\n\x0fsession_content\x18\x02 \x01(\x0b\x32\x31.google.cloud.video.stitcher.v1.VodSessionContent\"\xc0\x01\n\x0cVodSessionAd\x12+\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x43\n\rcompanion_ads\x18\x02 \x01(\x0b\x32,.google.cloud.video.stitcher.v1.CompanionAds\x12>\n\x0f\x61\x63tivity_events\x18\x03 \x03(\x0b\x32%.google.cloud.video.stitcher.v1.Event\"@\n\x11VodSessionContent\x12+\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x80\x02\n\x11VodSessionAdBreak\x12\x46\n\x0fprogress_events\x18\x01 \x03(\x0b\x32-.google.cloud.video.stitcher.v1.ProgressEvent\x12\x39\n\x03\x61\x64s\x18\x02 \x03(\x0b\x32,.google.cloud.video.stitcher.v1.VodSessionAd\x12\x32\n\x0f\x65nd_time_offset\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11start_time_offset\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xa9\x06\n\x0bLiveSession\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08play_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12S\n\rad_tag_macros\x18\x06 \x03(\x0b\x32<.google.cloud.video.stitcher.v1.LiveSession.AdTagMacrosEntry\x12I\n\x10manifest_options\x18\n \x01(\x0b\x32/.google.cloud.video.stitcher.v1.ManifestOptions\x12M\n\x0cgam_settings\x18\x0f \x01(\x0b\x32\x37.google.cloud.video.stitcher.v1.LiveSession.GamSettings\x12\x44\n\x0blive_config\x18\x10 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'videostitcher.googleapis.com/LiveConfig\x12?\n\x0b\x61\x64_tracking\x18\x11 \x01(\x0e\x32*.google.cloud.video.stitcher.v1.AdTracking\x1a\xd1\x01\n\x0bGamSettings\x12\x16\n\tstream_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12n\n\x14targeting_parameters\x18\x04 \x03(\x0b\x32P.google.cloud.video.stitcher.v1.LiveSession.GamSettings.TargetingParametersEntry\x1a:\n\x18TargetingParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41\x64TagMacrosEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:r\xea\x41o\n(videostitcher.googleapis.com/LiveSession\x12\x43projects/{project}/locations/{location}/liveSessions/{live_session}\"\xfe\x01\n\x0fManifestOptions\x12K\n\x12include_renditions\x18\x01 \x03(\x0b\x32/.google.cloud.video.stitcher.v1.RenditionFilter\x12R\n\rbitrate_order\x18\x02 \x01(\x0e\x32;.google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy\"J\n\x0bOrderPolicy\x12\x1c\n\x18ORDER_POLICY_UNSPECIFIED\x10\x00\x12\r\n\tASCENDING\x10\x01\x12\x0e\n\nDESCENDING\x10\x02\"6\n\x0fRenditionFilter\x12\x13\n\x0b\x62itrate_bps\x18\x01 \x01(\x05\x12\x0e\n\x06\x63odecs\x18\x02 \x01(\tBu\n\"com.google.cloud.video.stitcher.v1B\rSessionsProtoP\x01Z>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Video - module Stitcher - module V1 - VodSession = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.VodSession").msgclass - VodSession::GamSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.VodSession.GamSettings").msgclass - Interstitials = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.Interstitials").msgclass - VodSessionAd = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.VodSessionAd").msgclass - VodSessionContent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.VodSessionContent").msgclass - VodSessionAdBreak = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.VodSessionAdBreak").msgclass - LiveSession = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.LiveSession").msgclass - LiveSession::GamSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.LiveSession.GamSettings").msgclass - ManifestOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ManifestOptions").msgclass - ManifestOptions::OrderPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy").enummodule - RenditionFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.RenditionFilter").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/slates_pb.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/slates_pb.rb deleted file mode 100644 index 2e7747c94ad6..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/slates_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/video/stitcher/v1/slates.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n+google/cloud/video/stitcher/v1/slates.proto\x12\x1egoogle.cloud.video.stitcher.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x8d\x02\n\x05Slate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x41\n\tgam_slate\x18\x03 \x01(\x0b\x32..google.cloud.video.stitcher.v1.Slate.GamSlate\x1a@\n\x08GamSlate\x12\x19\n\x0cnetwork_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cgam_slate_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03:_\xea\x41\\\n\"videostitcher.googleapis.com/Slate\x12\x36projects/{project}/locations/{location}/slates/{slate}Bs\n\"com.google.cloud.video.stitcher.v1B\x0bSlatesProtoP\x01Z>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Video - module Stitcher - module V1 - Slate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.Slate").msgclass - Slate::GamSlate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.Slate.GamSlate").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/stitch_details_pb.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/stitch_details_pb.rb deleted file mode 100644 index f5b143c0483a..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/stitch_details_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/video/stitcher/v1/stitch_details.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/struct_pb' - - -descriptor_data = "\n3google/cloud/video/stitcher/v1/stitch_details.proto\x12\x1egoogle.cloud.video.stitcher.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x87\x02\n\x0fVodStitchDetail\x12\x0c\n\x04name\x18\x01 \x01(\t\x12I\n\x11\x61\x64_stitch_details\x18\x03 \x03(\x0b\x32..google.cloud.video.stitcher.v1.AdStitchDetail:\x9a\x01\xea\x41\x96\x01\n,videostitcher.googleapis.com/VodStitchDetail\x12\x66projects/{project}/locations/{location}/vodSessions/{vod_session}/vodStitchDetails/{vod_stitch_detail}\"\xa5\x02\n\x0e\x41\x64StitchDetail\x12\x18\n\x0b\x61\x64_break_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05\x61\x64_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x0e\x61\x64_time_offset\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12\x18\n\x0bskip_reason\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12M\n\x05media\x18\x05 \x03(\x0b\x32\x39.google.cloud.video.stitcher.v1.AdStitchDetail.MediaEntryB\x03\xe0\x41\x01\x1a\x44\n\nMediaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x42z\n\"com.google.cloud.video.stitcher.v1B\x12StitchDetailsProtoP\x01Z>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Video - module Stitcher - module V1 - VodStitchDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.VodStitchDetail").msgclass - AdStitchDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.AdStitchDetail").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/version.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/version.rb deleted file mode 100644 index eb990bd3df9c..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/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 Video - module Stitcher - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service.rb deleted file mode 100644 index e17ce9b8d1a7..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_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/video/stitcher/v1/version" - -require "google/cloud/video/stitcher/v1/video_stitcher_service/credentials" -require "google/cloud/video/stitcher/v1/video_stitcher_service/paths" -require "google/cloud/video/stitcher/v1/video_stitcher_service/operations" -require "google/cloud/video/stitcher/v1/video_stitcher_service/client" - -module Google - module Cloud - module Video - module Stitcher - module V1 - ## - # Video-On-Demand content stitching API allows you to insert ads - # into (VoD) video on demand files. You will be able to render custom - # scrubber bars with highlighted ads, enforce ad policies, allow - # seamless playback and tracking on native players and monetize - # content with any standard VMAP compliant ad server. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/video/stitcher/v1/video_stitcher_service" - # client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - module VideoStitcherService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "video_stitcher_service", "helpers.rb" -require "google/cloud/video/stitcher/v1/video_stitcher_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/client.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/client.rb deleted file mode 100644 index 4df154cf568e..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/client.rb +++ /dev/null @@ -1,3545 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/video/stitcher/v1/video_stitcher_service_pb" - -module Google - module Cloud - module Video - module Stitcher - module V1 - module VideoStitcherService - ## - # Client for the VideoStitcherService service. - # - # Video-On-Demand content stitching API allows you to insert ads - # into (VoD) video on demand files. You will be able to render custom - # scrubber bars with highlighted ads, enforce ad policies, allow - # seamless playback and tracking on native players and monetize - # content with any standard VMAP compliant ad server. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "videostitcher.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :video_stitcher_service_stub - - ## - # Configure the VideoStitcherService Client class. - # - # See {::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all VideoStitcherService clients - # ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::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", "Video", "Stitcher", "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.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_cdn_key.timeout = 60.0 - - default_config.rpcs.list_cdn_keys.timeout = 60.0 - - default_config.rpcs.get_cdn_key.timeout = 60.0 - - default_config.rpcs.delete_cdn_key.timeout = 60.0 - - default_config.rpcs.update_cdn_key.timeout = 60.0 - - default_config.rpcs.create_vod_session.timeout = 60.0 - - default_config.rpcs.get_vod_session.timeout = 60.0 - - default_config.rpcs.list_vod_stitch_details.timeout = 60.0 - - default_config.rpcs.get_vod_stitch_detail.timeout = 60.0 - - default_config.rpcs.list_vod_ad_tag_details.timeout = 60.0 - - default_config.rpcs.get_vod_ad_tag_detail.timeout = 60.0 - - default_config.rpcs.list_live_ad_tag_details.timeout = 60.0 - - default_config.rpcs.get_live_ad_tag_detail.timeout = 60.0 - - default_config.rpcs.create_slate.timeout = 60.0 - - default_config.rpcs.list_slates.timeout = 60.0 - - default_config.rpcs.get_slate.timeout = 60.0 - - default_config.rpcs.update_slate.timeout = 60.0 - - default_config.rpcs.delete_slate.timeout = 60.0 - - default_config.rpcs.create_live_session.timeout = 60.0 - - default_config.rpcs.get_live_session.timeout = 60.0 - - default_config.rpcs.create_live_config.timeout = 60.0 - - default_config.rpcs.list_live_configs.timeout = 60.0 - - default_config.rpcs.get_live_config.timeout = 60.0 - - default_config.rpcs.delete_live_config.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the VideoStitcherService 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::Video::Stitcher::V1::VideoStitcherService::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 - @video_stitcher_service_stub.universe_domain - end - - ## - # Create a new VideoStitcherService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the VideoStitcherService 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/video/stitcher/v1/video_stitcher_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 - - @video_stitcher_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::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 - ) - - @video_stitcher_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 - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @video_stitcher_service_stub.logger - end - - # Service calls - - ## - # Creates a new CDN key. - # - # @overload create_cdn_key(request, options = nil) - # Pass arguments to `create_cdn_key` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_cdn_key(parent: nil, cdn_key: nil, cdn_key_id: nil) - # Pass arguments to `create_cdn_key` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 in which the CDN key should be created, in the form - # of `projects/{project_number}/locations/{location}`. - # @param cdn_key [::Google::Cloud::Video::Stitcher::V1::CdnKey, ::Hash] - # Required. The CDN key resource to create. - # @param cdn_key_id [::String] - # Required. The ID to use for the CDN key, which will become the final - # component of the CDN key's resource name. - # - # This value should conform to RFC-1034, which restricts to - # lower-case letters, numbers, and hyphen, with the first character a - # letter, the last a letter or a number, and a 63 character maximum. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest.new - # - # # Call the create_cdn_key method. - # result = client.create_cdn_key request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_cdn_key request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest - - # Converts hash and nil to 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_cdn_key.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_cdn_key.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_cdn_key.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :create_cdn_key, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 CDN keys in the specified project and location. - # - # @overload list_cdn_keys(request, options = nil) - # Pass arguments to `list_cdn_keys` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::ListCdnKeysRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::ListCdnKeysRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_cdn_keys(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_cdn_keys` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 that contains the list of CDN keys, in the form of - # `projects/{project_number}/locations/{location}`. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filtering results - # @param order_by [::String] - # Hint for how to order the results - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::CdnKey>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::CdnKey>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::ListCdnKeysRequest.new - # - # # Call the list_cdn_keys method. - # result = client.list_cdn_keys request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Video::Stitcher::V1::CdnKey. - # p item - # end - # - def list_cdn_keys request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::ListCdnKeysRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_cdn_keys.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_cdn_keys.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_cdn_keys.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :list_cdn_keys, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @video_stitcher_service_stub, :list_cdn_keys, 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 the specified CDN key. - # - # @overload get_cdn_key(request, options = nil) - # Pass arguments to `get_cdn_key` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::GetCdnKeyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::GetCdnKeyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_cdn_key(name: nil) - # Pass arguments to `get_cdn_key` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 CDN key to be retrieved, in the form of - # `projects/{project}/locations/{location}/cdnKeys/{id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::CdnKey] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Video::Stitcher::V1::CdnKey] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::GetCdnKeyRequest.new - # - # # Call the get_cdn_key method. - # result = client.get_cdn_key request - # - # # The returned object is of type Google::Cloud::Video::Stitcher::V1::CdnKey. - # p result - # - def get_cdn_key request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetCdnKeyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_cdn_key.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_cdn_key.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_cdn_key.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :get_cdn_key, request, 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 the specified CDN key. - # - # @overload delete_cdn_key(request, options = nil) - # Pass arguments to `delete_cdn_key` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::DeleteCdnKeyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::DeleteCdnKeyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_cdn_key(name: nil) - # Pass arguments to `delete_cdn_key` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 CDN key to be deleted, in the form of - # `projects/{project_number}/locations/{location}/cdnKeys/{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/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::DeleteCdnKeyRequest.new - # - # # Call the delete_cdn_key method. - # result = client.delete_cdn_key request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_cdn_key request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::DeleteCdnKeyRequest - - # Converts hash and nil to 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_cdn_key.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_cdn_key.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_cdn_key.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :delete_cdn_key, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 specified CDN key. Only update fields specified - # in the call method body. - # - # @overload update_cdn_key(request, options = nil) - # Pass arguments to `update_cdn_key` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::UpdateCdnKeyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::UpdateCdnKeyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_cdn_key(cdn_key: nil, update_mask: nil) - # Pass arguments to `update_cdn_key` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param cdn_key [::Google::Cloud::Video::Stitcher::V1::CdnKey, ::Hash] - # Required. The CDN key resource which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask applies to the resource. - # For the `FieldMask` definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::UpdateCdnKeyRequest.new - # - # # Call the update_cdn_key method. - # result = client.update_cdn_key request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_cdn_key request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::UpdateCdnKeyRequest - - # Converts hash and nil to 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_cdn_key.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.cdn_key&.name - header_params["cdn_key.name"] = request.cdn_key.name - end - - request_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_cdn_key.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_cdn_key.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :update_cdn_key, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 client side playback VOD session and returns the full - # tracking and playback metadata of the session. - # - # @overload create_vod_session(request, options = nil) - # Pass arguments to `create_vod_session` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::CreateVodSessionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::CreateVodSessionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_vod_session(parent: nil, vod_session: nil) - # Pass arguments to `create_vod_session` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 VOD session should be - # created, in the form of `projects/{project_number}/locations/{location}`. - # @param vod_session [::Google::Cloud::Video::Stitcher::V1::VodSession, ::Hash] - # Required. Parameters for creating a session. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::VodSession] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Video::Stitcher::V1::VodSession] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::CreateVodSessionRequest.new - # - # # Call the create_vod_session method. - # result = client.create_vod_session request - # - # # The returned object is of type Google::Cloud::Video::Stitcher::V1::VodSession. - # p result - # - def create_vod_session request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::CreateVodSessionRequest - - # Converts hash and nil to 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_vod_session.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_vod_session.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_vod_session.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :create_vod_session, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the full tracking, playback metadata, and relevant ad-ops - # logs for the specified VOD session. - # - # @overload get_vod_session(request, options = nil) - # Pass arguments to `get_vod_session` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::GetVodSessionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::GetVodSessionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_vod_session(name: nil) - # Pass arguments to `get_vod_session` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 VOD session to be retrieved, in the form of - # `projects/{project_number}/locations/{location}/vodSessions/{id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::VodSession] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Video::Stitcher::V1::VodSession] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::GetVodSessionRequest.new - # - # # Call the get_vod_session method. - # result = client.get_vod_session request - # - # # The returned object is of type Google::Cloud::Video::Stitcher::V1::VodSession. - # p result - # - def get_vod_session request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetVodSessionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_vod_session.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_vod_session.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_vod_session.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :get_vod_session, request, 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 detailed stitching information of the specified VOD - # session. - # - # @overload list_vod_stitch_details(request, options = nil) - # Pass arguments to `list_vod_stitch_details` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_vod_stitch_details(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_vod_stitch_details` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The VOD session where the stitch details belong to, in the form - # of `projects/{project}/locations/{location}/vodSessions/{id}`. - # @param page_size [::Integer] - # The maximum number of items to return. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::VodStitchDetail>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::VodStitchDetail>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsRequest.new - # - # # Call the list_vod_stitch_details method. - # result = client.list_vod_stitch_details request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Video::Stitcher::V1::VodStitchDetail. - # p item - # end - # - def list_vod_stitch_details request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_vod_stitch_details.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_vod_stitch_details.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_vod_stitch_details.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :list_vod_stitch_details, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @video_stitcher_service_stub, :list_vod_stitch_details, 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 the specified stitching information for the specified VOD session. - # - # @overload get_vod_stitch_detail(request, options = nil) - # Pass arguments to `get_vod_stitch_detail` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::GetVodStitchDetailRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::GetVodStitchDetailRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_vod_stitch_detail(name: nil) - # Pass arguments to `get_vod_stitch_detail` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 stitch detail in the specified VOD session, in - # the form of - # `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::VodStitchDetail] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Video::Stitcher::V1::VodStitchDetail] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::GetVodStitchDetailRequest.new - # - # # Call the get_vod_stitch_detail method. - # result = client.get_vod_stitch_detail request - # - # # The returned object is of type Google::Cloud::Video::Stitcher::V1::VodStitchDetail. - # p result - # - def get_vod_stitch_detail request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetVodStitchDetailRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_vod_stitch_detail.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_vod_stitch_detail.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_vod_stitch_detail.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :get_vod_stitch_detail, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Return the list of ad tag details for the specified VOD session. - # - # @overload list_vod_ad_tag_details(request, options = nil) - # Pass arguments to `list_vod_ad_tag_details` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_vod_ad_tag_details(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_vod_ad_tag_details` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The VOD session which the ad tag details belong to, in the form - # of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. - # @param page_size [::Integer] - # The maximum number of items to return. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsRequest.new - # - # # Call the list_vod_ad_tag_details method. - # result = client.list_vod_ad_tag_details request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail. - # p item - # end - # - def list_vod_ad_tag_details request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_vod_ad_tag_details.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_vod_ad_tag_details.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_vod_ad_tag_details.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :list_vod_ad_tag_details, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @video_stitcher_service_stub, :list_vod_ad_tag_details, 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 the specified ad tag detail for the specified VOD session. - # - # @overload get_vod_ad_tag_detail(request, options = nil) - # Pass arguments to `get_vod_ad_tag_detail` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::GetVodAdTagDetailRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::GetVodAdTagDetailRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_vod_ad_tag_detail(name: nil) - # Pass arguments to `get_vod_ad_tag_detail` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 ad tag detail for the specified VOD session, in - # the form of - # `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::GetVodAdTagDetailRequest.new - # - # # Call the get_vod_ad_tag_detail method. - # result = client.get_vod_ad_tag_detail request - # - # # The returned object is of type Google::Cloud::Video::Stitcher::V1::VodAdTagDetail. - # p result - # - def get_vod_ad_tag_detail request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetVodAdTagDetailRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_vod_ad_tag_detail.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_vod_ad_tag_detail.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_vod_ad_tag_detail.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :get_vod_ad_tag_detail, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Return the list of ad tag details for the specified live session. - # - # @overload list_live_ad_tag_details(request, options = nil) - # Pass arguments to `list_live_ad_tag_details` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_live_ad_tag_details(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_live_ad_tag_details` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource parent in the form of - # `projects/{project}/locations/{location}/liveSessions/{live_session}`. - # @param page_size [::Integer] - # The maximum number of items to return. - # @param page_token [::String] - # The pagination token returned from a previous List request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsRequest.new - # - # # Call the list_live_ad_tag_details method. - # result = client.list_live_ad_tag_details request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail. - # p item - # end - # - def list_live_ad_tag_details request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_live_ad_tag_details.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_live_ad_tag_details.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_live_ad_tag_details.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :list_live_ad_tag_details, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @video_stitcher_service_stub, :list_live_ad_tag_details, 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 the specified ad tag detail for the specified live session. - # - # @overload get_live_ad_tag_detail(request, options = nil) - # Pass arguments to `get_live_ad_tag_detail` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::GetLiveAdTagDetailRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::GetLiveAdTagDetailRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_live_ad_tag_detail(name: nil) - # Pass arguments to `get_live_ad_tag_detail` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name in the form of - # `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::GetLiveAdTagDetailRequest.new - # - # # Call the get_live_ad_tag_detail method. - # result = client.get_live_ad_tag_detail request - # - # # The returned object is of type Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail. - # p result - # - def get_live_ad_tag_detail request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetLiveAdTagDetailRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_live_ad_tag_detail.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_live_ad_tag_detail.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_live_ad_tag_detail.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :get_live_ad_tag_detail, request, 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 slate. - # - # @overload create_slate(request, options = nil) - # Pass arguments to `create_slate` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::CreateSlateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::CreateSlateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_slate(parent: nil, slate_id: nil, slate: nil, request_id: nil) - # Pass arguments to `create_slate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 in which the slate should be created, in the form of - # `projects/{project_number}/locations/{location}`. - # @param slate_id [::String] - # Required. The unique identifier for the slate. - # This value should conform to RFC-1034, which restricts to - # lower-case letters, numbers, and hyphen, with the first character a - # letter, the last a letter or a number, and a 63 character maximum. - # @param slate [::Google::Cloud::Video::Stitcher::V1::Slate, ::Hash] - # Required. The slate to create. - # @param request_id [::String] - # A 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/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::CreateSlateRequest.new - # - # # Call the create_slate method. - # result = client.create_slate request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_slate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::CreateSlateRequest - - # Converts hash and nil to 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_slate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_slate.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_slate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :create_slate, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 slates in the specified project and location. - # - # @overload list_slates(request, options = nil) - # Pass arguments to `list_slates` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::ListSlatesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::ListSlatesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_slates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_slates` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 list slates, in the form of - # `projects/{project_number}/locations/{location}`. - # @param page_size [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. - # @param filter [::String] - # Filtering results - # @param order_by [::String] - # Hint for how to order the results - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::Slate>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::Slate>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::ListSlatesRequest.new - # - # # Call the list_slates method. - # result = client.list_slates request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Video::Stitcher::V1::Slate. - # p item - # end - # - def list_slates request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::ListSlatesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_slates.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_slates.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_slates.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :list_slates, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @video_stitcher_service_stub, :list_slates, 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 the specified slate. - # - # @overload get_slate(request, options = nil) - # Pass arguments to `get_slate` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::GetSlateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::GetSlateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_slate(name: nil) - # Pass arguments to `get_slate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 slate to be retrieved, of the slate, in the form - # of `projects/{project_number}/locations/{location}/slates/{id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::Slate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Video::Stitcher::V1::Slate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::GetSlateRequest.new - # - # # Call the get_slate method. - # result = client.get_slate request - # - # # The returned object is of type Google::Cloud::Video::Stitcher::V1::Slate. - # p result - # - def get_slate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetSlateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_slate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_slate.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_slate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :get_slate, request, 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 the specified slate. - # - # @overload update_slate(request, options = nil) - # Pass arguments to `update_slate` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::UpdateSlateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::UpdateSlateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_slate(slate: nil, update_mask: nil) - # Pass arguments to `update_slate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param slate [::Google::Cloud::Video::Stitcher::V1::Slate, ::Hash] - # Required. The resource with updated fields. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask which specifies fields which should 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/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::UpdateSlateRequest.new - # - # # Call the update_slate method. - # result = client.update_slate request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_slate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::UpdateSlateRequest - - # Converts hash and nil to 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_slate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.slate&.name - header_params["slate.name"] = request.slate.name - end - - request_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_slate.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_slate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :update_slate, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 the specified slate. - # - # @overload delete_slate(request, options = nil) - # Pass arguments to `delete_slate` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::DeleteSlateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::DeleteSlateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_slate(name: nil) - # Pass arguments to `delete_slate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 slate to be deleted, in the form of - # `projects/{project_number}/locations/{location}/slates/{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/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::DeleteSlateRequest.new - # - # # Call the delete_slate method. - # result = client.delete_slate request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_slate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::DeleteSlateRequest - - # Converts hash and nil to 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_slate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_slate.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_slate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :delete_slate, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 live session. - # - # @overload create_live_session(request, options = nil) - # Pass arguments to `create_live_session` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::CreateLiveSessionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::CreateLiveSessionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_live_session(parent: nil, live_session: nil) - # Pass arguments to `create_live_session` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 live session should be - # created, in the form of `projects/{project_number}/locations/{location}`. - # @param live_session [::Google::Cloud::Video::Stitcher::V1::LiveSession, ::Hash] - # Required. Parameters for creating a live session. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::LiveSession] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Video::Stitcher::V1::LiveSession] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::CreateLiveSessionRequest.new - # - # # Call the create_live_session method. - # result = client.create_live_session request - # - # # The returned object is of type Google::Cloud::Video::Stitcher::V1::LiveSession. - # p result - # - def create_live_session request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::CreateLiveSessionRequest - - # Converts hash and nil to 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_live_session.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_live_session.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_live_session.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :create_live_session, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the details for the specified live session. - # - # @overload get_live_session(request, options = nil) - # Pass arguments to `get_live_session` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::GetLiveSessionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::GetLiveSessionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_live_session(name: nil) - # Pass arguments to `get_live_session` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 live session, in the form of - # `projects/{project_number}/locations/{location}/liveSessions/{id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::LiveSession] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Video::Stitcher::V1::LiveSession] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::GetLiveSessionRequest.new - # - # # Call the get_live_session method. - # result = client.get_live_session request - # - # # The returned object is of type Google::Cloud::Video::Stitcher::V1::LiveSession. - # p result - # - def get_live_session request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetLiveSessionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_live_session.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_live_session.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_live_session.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :get_live_session, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Registers the live config with the provided unique ID in - # the specified region. - # - # @overload create_live_config(request, options = nil) - # Pass arguments to `create_live_config` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::CreateLiveConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::CreateLiveConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_live_config(parent: nil, live_config_id: nil, live_config: nil, request_id: nil) - # Pass arguments to `create_live_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 project in which the live config should be created, in - # the form of `projects/{project_number}/locations/{location}`. - # @param live_config_id [::String] - # Required. The unique identifier ID to use for the live config. - # @param live_config [::Google::Cloud::Video::Stitcher::V1::LiveConfig, ::Hash] - # Required. The live config resource to create. - # @param request_id [::String] - # A 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/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::CreateLiveConfigRequest.new - # - # # Call the create_live_config method. - # result = client.create_live_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_live_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::CreateLiveConfigRequest - - # Converts hash and nil to 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_live_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::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_live_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_live_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :create_live_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 - - ## - # Lists all live configs managed by the Video Stitcher that - # belong to the specified project and region. - # - # @overload list_live_configs(request, options = nil) - # Pass arguments to `list_live_configs` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::ListLiveConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::ListLiveConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_live_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_live_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 project that contains the list of live configs, in the - # form of `projects/{project_number}/locations/{location}`. - # @param page_size [::Integer] - # The maximum number of items to return. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # @param filter [::String] - # Optional. The filter to apply to list results (see - # [Filtering](https://google.aip.dev/160)). - # @param order_by [::String] - # Optional. Specifies the ordering of results following - # [Cloud API - # syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::LiveConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::LiveConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::ListLiveConfigsRequest.new - # - # # Call the list_live_configs method. - # result = client.list_live_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::Video::Stitcher::V1::LiveConfig. - # p item - # end - # - def list_live_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::ListLiveConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_live_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::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_live_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_live_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :list_live_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @video_stitcher_service_stub, :list_live_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 - - ## - # Returns the specified live config managed by the Video - # Stitcher service. - # - # @overload get_live_config(request, options = nil) - # Pass arguments to `get_live_config` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::GetLiveConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::GetLiveConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_live_config(name: nil) - # Pass arguments to `get_live_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 live config to be retrieved, in the form - # of - # `projects/{project_number}/locations/{location}/liveConfigs/{id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::LiveConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Video::Stitcher::V1::LiveConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::GetLiveConfigRequest.new - # - # # Call the get_live_config method. - # result = client.get_live_config request - # - # # The returned object is of type Google::Cloud::Video::Stitcher::V1::LiveConfig. - # p result - # - def get_live_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetLiveConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_live_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::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_live_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_live_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :get_live_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 - - ## - # Deletes the specified live config. - # - # @overload delete_live_config(request, options = nil) - # Pass arguments to `delete_live_config` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::DeleteLiveConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::DeleteLiveConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_live_config(name: nil) - # Pass arguments to `delete_live_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 live config to be deleted, in the form of - # `projects/{project_number}/locations/{location}/liveConfigs/{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/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::DeleteLiveConfigRequest.new - # - # # Call the delete_live_config method. - # result = client.delete_live_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_live_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::DeleteLiveConfigRequest - - # Converts hash and nil to 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_live_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::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_live_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_live_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :delete_live_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 specified LiveConfig. Only update fields specified - # in the call method body. - # - # @overload update_live_config(request, options = nil) - # Pass arguments to `update_live_config` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::UpdateLiveConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::UpdateLiveConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_live_config(live_config: nil, update_mask: nil) - # Pass arguments to `update_live_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 live_config [::Google::Cloud::Video::Stitcher::V1::LiveConfig, ::Hash] - # Required. The LiveConfig resource which replaces the resource on the - # server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask applies to the resource. - # For the `FieldMask` definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::UpdateLiveConfigRequest.new - # - # # Call the update_live_config method. - # result = client.update_live_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_live_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::UpdateLiveConfigRequest - - # Converts hash and nil to 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_live_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::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.live_config&.name - header_params["live_config.name"] = request.live_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_live_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_live_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :update_live_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 - - ## - # Registers the VOD config with the provided unique ID in - # the specified region. - # - # @overload create_vod_config(request, options = nil) - # Pass arguments to `create_vod_config` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::CreateVodConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::CreateVodConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_vod_config(parent: nil, vod_config_id: nil, vod_config: nil, request_id: nil) - # Pass arguments to `create_vod_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 project in which the VOD config should be created, in - # the form of `projects/{project_number}/locations/{location}`. - # @param vod_config_id [::String] - # Required. The unique identifier ID to use for the VOD config. - # @param vod_config [::Google::Cloud::Video::Stitcher::V1::VodConfig, ::Hash] - # Required. The VOD config resource to create. - # @param request_id [::String] - # Optional. A 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/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::CreateVodConfigRequest.new - # - # # Call the create_vod_config method. - # result = client.create_vod_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_vod_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::CreateVodConfigRequest - - # Converts hash and nil to 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_vod_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::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_vod_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_vod_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :create_vod_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 - - ## - # Lists all VOD configs managed by the Video Stitcher API that - # belong to the specified project and region. - # - # @overload list_vod_configs(request, options = nil) - # Pass arguments to `list_vod_configs` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::ListVodConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::ListVodConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_vod_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_vod_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 project that contains the list of VOD configs, in the - # form of `projects/{project_number}/locations/{location}`. - # @param page_size [::Integer] - # Optional. The maximum number of items to return. - # @param page_token [::String] - # Optional. The next_page_token value returned from a previous List request, - # if any. - # @param filter [::String] - # Optional. The filter to apply to list results (see - # [Filtering](https://google.aip.dev/160)). - # @param order_by [::String] - # Optional. Specifies the ordering of results following - # [Cloud API - # syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::VodConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::VodConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::ListVodConfigsRequest.new - # - # # Call the list_vod_configs method. - # result = client.list_vod_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::Video::Stitcher::V1::VodConfig. - # p item - # end - # - def list_vod_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::ListVodConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_vod_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::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_vod_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_vod_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :list_vod_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @video_stitcher_service_stub, :list_vod_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 - - ## - # Returns the specified VOD config managed by the Video - # Stitcher API service. - # - # @overload get_vod_config(request, options = nil) - # Pass arguments to `get_vod_config` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::GetVodConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::GetVodConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_vod_config(name: nil) - # Pass arguments to `get_vod_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 VOD config to be retrieved, in the form - # of `projects/{project_number}/locations/{location}/vodConfigs/{id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::VodConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Video::Stitcher::V1::VodConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::GetVodConfigRequest.new - # - # # Call the get_vod_config method. - # result = client.get_vod_config request - # - # # The returned object is of type Google::Cloud::Video::Stitcher::V1::VodConfig. - # p result - # - def get_vod_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetVodConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_vod_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::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_vod_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_vod_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :get_vod_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 - - ## - # Deletes the specified VOD config. - # - # @overload delete_vod_config(request, options = nil) - # Pass arguments to `delete_vod_config` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::DeleteVodConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::DeleteVodConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_vod_config(name: nil) - # Pass arguments to `delete_vod_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 VOD config to be deleted, in the form of - # `projects/{project_number}/locations/{location}/vodConfigs/{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/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::DeleteVodConfigRequest.new - # - # # Call the delete_vod_config method. - # result = client.delete_vod_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_vod_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::DeleteVodConfigRequest - - # Converts hash and nil to 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_vod_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::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_vod_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_vod_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :delete_vod_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 specified VOD config. Only update fields specified - # in the call method body. - # - # @overload update_vod_config(request, options = nil) - # Pass arguments to `update_vod_config` via a request object, either of type - # {::Google::Cloud::Video::Stitcher::V1::UpdateVodConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Stitcher::V1::UpdateVodConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_vod_config(vod_config: nil, update_mask: nil) - # Pass arguments to `update_vod_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 vod_config [::Google::Cloud::Video::Stitcher::V1::VodConfig, ::Hash] - # Required. The VOD config resource which replaces the resource on the - # server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask applies to the resource. - # For the `FieldMask` definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/stitcher/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Stitcher::V1::UpdateVodConfigRequest.new - # - # # Call the update_vod_config method. - # result = client.update_vod_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_vod_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::UpdateVodConfigRequest - - # Converts hash and nil to 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_vod_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::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.vod_config&.name - header_params["vod_config.name"] = request.vod_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_vod_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_vod_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_stitcher_service_stub.call_rpc :update_vod_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 - - ## - # Configuration class for the VideoStitcherService API. - # - # This class represents the configuration for VideoStitcherService, - # 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::Video::Stitcher::V1::VideoStitcherService::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_cdn_key to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_cdn_key.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_cdn_key.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::Video::Stitcher::V1::VideoStitcherService::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 = "videostitcher.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 VideoStitcherService 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_cdn_key` - # @return [::Gapic::Config::Method] - # - attr_reader :create_cdn_key - ## - # RPC-specific configuration for `list_cdn_keys` - # @return [::Gapic::Config::Method] - # - attr_reader :list_cdn_keys - ## - # RPC-specific configuration for `get_cdn_key` - # @return [::Gapic::Config::Method] - # - attr_reader :get_cdn_key - ## - # RPC-specific configuration for `delete_cdn_key` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_cdn_key - ## - # RPC-specific configuration for `update_cdn_key` - # @return [::Gapic::Config::Method] - # - attr_reader :update_cdn_key - ## - # RPC-specific configuration for `create_vod_session` - # @return [::Gapic::Config::Method] - # - attr_reader :create_vod_session - ## - # RPC-specific configuration for `get_vod_session` - # @return [::Gapic::Config::Method] - # - attr_reader :get_vod_session - ## - # RPC-specific configuration for `list_vod_stitch_details` - # @return [::Gapic::Config::Method] - # - attr_reader :list_vod_stitch_details - ## - # RPC-specific configuration for `get_vod_stitch_detail` - # @return [::Gapic::Config::Method] - # - attr_reader :get_vod_stitch_detail - ## - # RPC-specific configuration for `list_vod_ad_tag_details` - # @return [::Gapic::Config::Method] - # - attr_reader :list_vod_ad_tag_details - ## - # RPC-specific configuration for `get_vod_ad_tag_detail` - # @return [::Gapic::Config::Method] - # - attr_reader :get_vod_ad_tag_detail - ## - # RPC-specific configuration for `list_live_ad_tag_details` - # @return [::Gapic::Config::Method] - # - attr_reader :list_live_ad_tag_details - ## - # RPC-specific configuration for `get_live_ad_tag_detail` - # @return [::Gapic::Config::Method] - # - attr_reader :get_live_ad_tag_detail - ## - # RPC-specific configuration for `create_slate` - # @return [::Gapic::Config::Method] - # - attr_reader :create_slate - ## - # RPC-specific configuration for `list_slates` - # @return [::Gapic::Config::Method] - # - attr_reader :list_slates - ## - # RPC-specific configuration for `get_slate` - # @return [::Gapic::Config::Method] - # - attr_reader :get_slate - ## - # RPC-specific configuration for `update_slate` - # @return [::Gapic::Config::Method] - # - attr_reader :update_slate - ## - # RPC-specific configuration for `delete_slate` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_slate - ## - # RPC-specific configuration for `create_live_session` - # @return [::Gapic::Config::Method] - # - attr_reader :create_live_session - ## - # RPC-specific configuration for `get_live_session` - # @return [::Gapic::Config::Method] - # - attr_reader :get_live_session - ## - # RPC-specific configuration for `create_live_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_live_config - ## - # RPC-specific configuration for `list_live_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_live_configs - ## - # RPC-specific configuration for `get_live_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_live_config - ## - # RPC-specific configuration for `delete_live_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_live_config - ## - # RPC-specific configuration for `update_live_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_live_config - ## - # RPC-specific configuration for `create_vod_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_vod_config - ## - # RPC-specific configuration for `list_vod_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_vod_configs - ## - # RPC-specific configuration for `get_vod_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_vod_config - ## - # RPC-specific configuration for `delete_vod_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_vod_config - ## - # RPC-specific configuration for `update_vod_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_vod_config - - # @private - def initialize parent_rpcs = nil - create_cdn_key_config = parent_rpcs.create_cdn_key if parent_rpcs.respond_to? :create_cdn_key - @create_cdn_key = ::Gapic::Config::Method.new create_cdn_key_config - list_cdn_keys_config = parent_rpcs.list_cdn_keys if parent_rpcs.respond_to? :list_cdn_keys - @list_cdn_keys = ::Gapic::Config::Method.new list_cdn_keys_config - get_cdn_key_config = parent_rpcs.get_cdn_key if parent_rpcs.respond_to? :get_cdn_key - @get_cdn_key = ::Gapic::Config::Method.new get_cdn_key_config - delete_cdn_key_config = parent_rpcs.delete_cdn_key if parent_rpcs.respond_to? :delete_cdn_key - @delete_cdn_key = ::Gapic::Config::Method.new delete_cdn_key_config - update_cdn_key_config = parent_rpcs.update_cdn_key if parent_rpcs.respond_to? :update_cdn_key - @update_cdn_key = ::Gapic::Config::Method.new update_cdn_key_config - create_vod_session_config = parent_rpcs.create_vod_session if parent_rpcs.respond_to? :create_vod_session - @create_vod_session = ::Gapic::Config::Method.new create_vod_session_config - get_vod_session_config = parent_rpcs.get_vod_session if parent_rpcs.respond_to? :get_vod_session - @get_vod_session = ::Gapic::Config::Method.new get_vod_session_config - list_vod_stitch_details_config = parent_rpcs.list_vod_stitch_details if parent_rpcs.respond_to? :list_vod_stitch_details - @list_vod_stitch_details = ::Gapic::Config::Method.new list_vod_stitch_details_config - get_vod_stitch_detail_config = parent_rpcs.get_vod_stitch_detail if parent_rpcs.respond_to? :get_vod_stitch_detail - @get_vod_stitch_detail = ::Gapic::Config::Method.new get_vod_stitch_detail_config - list_vod_ad_tag_details_config = parent_rpcs.list_vod_ad_tag_details if parent_rpcs.respond_to? :list_vod_ad_tag_details - @list_vod_ad_tag_details = ::Gapic::Config::Method.new list_vod_ad_tag_details_config - get_vod_ad_tag_detail_config = parent_rpcs.get_vod_ad_tag_detail if parent_rpcs.respond_to? :get_vod_ad_tag_detail - @get_vod_ad_tag_detail = ::Gapic::Config::Method.new get_vod_ad_tag_detail_config - list_live_ad_tag_details_config = parent_rpcs.list_live_ad_tag_details if parent_rpcs.respond_to? :list_live_ad_tag_details - @list_live_ad_tag_details = ::Gapic::Config::Method.new list_live_ad_tag_details_config - get_live_ad_tag_detail_config = parent_rpcs.get_live_ad_tag_detail if parent_rpcs.respond_to? :get_live_ad_tag_detail - @get_live_ad_tag_detail = ::Gapic::Config::Method.new get_live_ad_tag_detail_config - create_slate_config = parent_rpcs.create_slate if parent_rpcs.respond_to? :create_slate - @create_slate = ::Gapic::Config::Method.new create_slate_config - list_slates_config = parent_rpcs.list_slates if parent_rpcs.respond_to? :list_slates - @list_slates = ::Gapic::Config::Method.new list_slates_config - get_slate_config = parent_rpcs.get_slate if parent_rpcs.respond_to? :get_slate - @get_slate = ::Gapic::Config::Method.new get_slate_config - update_slate_config = parent_rpcs.update_slate if parent_rpcs.respond_to? :update_slate - @update_slate = ::Gapic::Config::Method.new update_slate_config - delete_slate_config = parent_rpcs.delete_slate if parent_rpcs.respond_to? :delete_slate - @delete_slate = ::Gapic::Config::Method.new delete_slate_config - create_live_session_config = parent_rpcs.create_live_session if parent_rpcs.respond_to? :create_live_session - @create_live_session = ::Gapic::Config::Method.new create_live_session_config - get_live_session_config = parent_rpcs.get_live_session if parent_rpcs.respond_to? :get_live_session - @get_live_session = ::Gapic::Config::Method.new get_live_session_config - create_live_config_config = parent_rpcs.create_live_config if parent_rpcs.respond_to? :create_live_config - @create_live_config = ::Gapic::Config::Method.new create_live_config_config - list_live_configs_config = parent_rpcs.list_live_configs if parent_rpcs.respond_to? :list_live_configs - @list_live_configs = ::Gapic::Config::Method.new list_live_configs_config - get_live_config_config = parent_rpcs.get_live_config if parent_rpcs.respond_to? :get_live_config - @get_live_config = ::Gapic::Config::Method.new get_live_config_config - delete_live_config_config = parent_rpcs.delete_live_config if parent_rpcs.respond_to? :delete_live_config - @delete_live_config = ::Gapic::Config::Method.new delete_live_config_config - update_live_config_config = parent_rpcs.update_live_config if parent_rpcs.respond_to? :update_live_config - @update_live_config = ::Gapic::Config::Method.new update_live_config_config - create_vod_config_config = parent_rpcs.create_vod_config if parent_rpcs.respond_to? :create_vod_config - @create_vod_config = ::Gapic::Config::Method.new create_vod_config_config - list_vod_configs_config = parent_rpcs.list_vod_configs if parent_rpcs.respond_to? :list_vod_configs - @list_vod_configs = ::Gapic::Config::Method.new list_vod_configs_config - get_vod_config_config = parent_rpcs.get_vod_config if parent_rpcs.respond_to? :get_vod_config - @get_vod_config = ::Gapic::Config::Method.new get_vod_config_config - delete_vod_config_config = parent_rpcs.delete_vod_config if parent_rpcs.respond_to? :delete_vod_config - @delete_vod_config = ::Gapic::Config::Method.new delete_vod_config_config - update_vod_config_config = parent_rpcs.update_vod_config if parent_rpcs.respond_to? :update_vod_config - @update_vod_config = ::Gapic::Config::Method.new update_vod_config_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/credentials.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/credentials.rb deleted file mode 100644 index b20edb5b337f..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/credentials.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Video - module Stitcher - module V1 - module VideoStitcherService - # Credentials for the VideoStitcherService 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 -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/operations.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/operations.rb deleted file mode 100644 index 36f8c246e596..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/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 Video - module Stitcher - module V1 - module VideoStitcherService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "videostitcher.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the VideoStitcherService 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 VideoStitcherService 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::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Video::Stitcher::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Video::Stitcher::V1::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 = "videostitcher.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-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/paths.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/paths.rb deleted file mode 100644 index 632a487b123e..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service/paths.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 Cloud - module Video - module Stitcher - module V1 - module VideoStitcherService - # Path helper methods for the VideoStitcherService API. - module Paths - ## - # Create a fully-qualified CdnKey resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/cdnKeys/{cdn_key}` - # - # @param project [String] - # @param location [String] - # @param cdn_key [String] - # - # @return [::String] - def cdn_key_path project:, location:, cdn_key: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/cdnKeys/#{cdn_key}" - end - - ## - # Create a fully-qualified LiveAdTagDetail resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}` - # - # @param project [String] - # @param location [String] - # @param live_session [String] - # @param live_ad_tag_detail [String] - # - # @return [::String] - def live_ad_tag_detail_path project:, location:, live_session:, live_ad_tag_detail: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "live_session cannot contain /" if live_session.to_s.include? "/" - - "projects/#{project}/locations/#{location}/liveSessions/#{live_session}/liveAdTagDetails/#{live_ad_tag_detail}" - end - - ## - # Create a fully-qualified LiveConfig resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/liveConfigs/{live_config}` - # - # @param project [String] - # @param location [String] - # @param live_config [String] - # - # @return [::String] - def live_config_path project:, location:, live_config: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/liveConfigs/#{live_config}" - end - - ## - # Create a fully-qualified LiveSession resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/liveSessions/{live_session}` - # - # @param project [String] - # @param location [String] - # @param live_session [String] - # - # @return [::String] - def live_session_path project:, location:, live_session: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/liveSessions/#{live_session}" - 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 Slate resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/slates/{slate}` - # - # @param project [String] - # @param location [String] - # @param slate [String] - # - # @return [::String] - def slate_path project:, location:, slate: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/slates/#{slate}" - end - - ## - # Create a fully-qualified VodAdTagDetail resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/vodSessions/{vod_session}/vodAdTagDetails/{vod_ad_tag_detail}` - # - # @param project [String] - # @param location [String] - # @param vod_session [String] - # @param vod_ad_tag_detail [String] - # - # @return [::String] - def vod_ad_tag_detail_path project:, location:, vod_session:, vod_ad_tag_detail: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "vod_session cannot contain /" if vod_session.to_s.include? "/" - - "projects/#{project}/locations/#{location}/vodSessions/#{vod_session}/vodAdTagDetails/#{vod_ad_tag_detail}" - end - - ## - # Create a fully-qualified VodConfig resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/vodConfigs/{vod_config}` - # - # @param project [String] - # @param location [String] - # @param vod_config [String] - # - # @return [::String] - def vod_config_path project:, location:, vod_config: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/vodConfigs/#{vod_config}" - end - - ## - # Create a fully-qualified VodSession resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/vodSessions/{vod_session}` - # - # @param project [String] - # @param location [String] - # @param vod_session [String] - # - # @return [::String] - def vod_session_path project:, location:, vod_session: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/vodSessions/#{vod_session}" - end - - ## - # Create a fully-qualified VodStitchDetail resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/vodSessions/{vod_session}/vodStitchDetails/{vod_stitch_detail}` - # - # @param project [String] - # @param location [String] - # @param vod_session [String] - # @param vod_stitch_detail [String] - # - # @return [::String] - def vod_stitch_detail_path project:, location:, vod_session:, vod_stitch_detail: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "vod_session cannot contain /" if vod_session.to_s.include? "/" - - "projects/#{project}/locations/#{location}/vodSessions/#{vod_session}/vodStitchDetails/#{vod_stitch_detail}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service_pb.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service_pb.rb deleted file mode 100644 index 1ceaa82ca026..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service_pb.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/video/stitcher/v1/video_stitcher_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/video/stitcher/v1/ad_tag_details_pb' -require 'google/cloud/video/stitcher/v1/cdn_keys_pb' -require 'google/cloud/video/stitcher/v1/live_configs_pb' -require 'google/cloud/video/stitcher/v1/sessions_pb' -require 'google/cloud/video/stitcher/v1/slates_pb' -require 'google/cloud/video/stitcher/v1/stitch_details_pb' -require 'google/cloud/video/stitcher/v1/vod_configs_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/video/stitcher/v1/video_stitcher_service.proto\x12\x1egoogle.cloud.video.stitcher.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x33google/cloud/video/stitcher/v1/ad_tag_details.proto\x1a-google/cloud/video/stitcher/v1/cdn_keys.proto\x1a\x31google/cloud/video/stitcher/v1/live_configs.proto\x1a-google/cloud/video/stitcher/v1/sessions.proto\x1a+google/cloud/video/stitcher/v1/slates.proto\x1a\x33google/cloud/video/stitcher/v1/stitch_details.proto\x1a\x30google/cloud/video/stitcher/v1/vod_configs.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa9\x01\n\x13\x43reateCdnKeyRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#videostitcher.googleapis.com/CdnKey\x12<\n\x07\x63\x64n_key\x18\x02 \x01(\x0b\x32&.google.cloud.video.stitcher.v1.CdnKeyB\x03\xe0\x41\x02\x12\x17\n\ncdn_key_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x9a\x01\n\x12ListCdnKeysRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#videostitcher.googleapis.com/CdnKey\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\x13ListCdnKeysResponse\x12\x38\n\x08\x63\x64n_keys\x18\x01 \x03(\x0b\x32&.google.cloud.video.stitcher.v1.CdnKey\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"M\n\x10GetCdnKeyRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#videostitcher.googleapis.com/CdnKey\"P\n\x13\x44\x65leteCdnKeyRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#videostitcher.googleapis.com/CdnKey\"\x89\x01\n\x13UpdateCdnKeyRequest\x12<\n\x07\x63\x64n_key\x18\x01 \x01(\x0b\x32&.google.cloud.video.stitcher.v1.CdnKeyB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xa0\x01\n\x17\x43reateVodSessionRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'videostitcher.googleapis.com/VodSession\x12\x44\n\x0bvod_session\x18\x02 \x01(\x0b\x32*.google.cloud.video.stitcher.v1.VodSessionB\x03\xe0\x41\x02\"U\n\x14GetVodSessionRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'videostitcher.googleapis.com/VodSession\"\x8a\x01\n\x1bListVodStitchDetailsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,videostitcher.googleapis.com/VodStitchDetail\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x84\x01\n\x1cListVodStitchDetailsResponse\x12K\n\x12vod_stitch_details\x18\x01 \x03(\x0b\x32/.google.cloud.video.stitcher.v1.VodStitchDetail\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"_\n\x19GetVodStitchDetailRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,videostitcher.googleapis.com/VodStitchDetail\"\x88\x01\n\x1aListVodAdTagDetailsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+videostitcher.googleapis.com/VodAdTagDetail\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x82\x01\n\x1bListVodAdTagDetailsResponse\x12J\n\x12vod_ad_tag_details\x18\x01 \x03(\x0b\x32..google.cloud.video.stitcher.v1.VodAdTagDetail\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"]\n\x18GetVodAdTagDetailRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+videostitcher.googleapis.com/VodAdTagDetail\"\x8a\x01\n\x1bListLiveAdTagDetailsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,videostitcher.googleapis.com/LiveAdTagDetail\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x85\x01\n\x1cListLiveAdTagDetailsResponse\x12L\n\x13live_ad_tag_details\x18\x01 \x03(\x0b\x32/.google.cloud.video.stitcher.v1.LiveAdTagDetail\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"_\n\x19GetLiveAdTagDetailRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,videostitcher.googleapis.com/LiveAdTagDetail\"\xb6\x01\n\x12\x43reateSlateRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"videostitcher.googleapis.com/Slate\x12\x15\n\x08slate_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x05slate\x18\x03 \x01(\x0b\x32%.google.cloud.video.stitcher.v1.SlateB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"K\n\x0fGetSlateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"videostitcher.googleapis.com/Slate\"\x98\x01\n\x11ListSlatesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"videostitcher.googleapis.com/Slate\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\"y\n\x12ListSlatesResponse\x12\x35\n\x06slates\x18\x01 \x03(\x0b\x32%.google.cloud.video.stitcher.v1.Slate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x85\x01\n\x12UpdateSlateRequest\x12\x39\n\x05slate\x18\x01 \x01(\x0b\x32%.google.cloud.video.stitcher.v1.SlateB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"N\n\x12\x44\x65leteSlateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"videostitcher.googleapis.com/Slate\"\xa4\x01\n\x18\x43reateLiveSessionRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(videostitcher.googleapis.com/LiveSession\x12\x46\n\x0clive_session\x18\x02 \x01(\x0b\x32+.google.cloud.video.stitcher.v1.LiveSessionB\x03\xe0\x41\x02\"W\n\x15GetLiveSessionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(videostitcher.googleapis.com/LiveSession\"\xd1\x01\n\x17\x43reateLiveConfigRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'videostitcher.googleapis.com/LiveConfig\x12\x1b\n\x0elive_config_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x0blive_config\x18\x03 \x01(\x0b\x32*.google.cloud.video.stitcher.v1.LiveConfigB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"\xac\x01\n\x16ListLiveConfigsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'videostitcher.googleapis.com/LiveConfig\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\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\"\x89\x01\n\x17ListLiveConfigsResponse\x12@\n\x0clive_configs\x18\x01 \x03(\x0b\x32*.google.cloud.video.stitcher.v1.LiveConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"U\n\x14GetLiveConfigRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'videostitcher.googleapis.com/LiveConfig\"X\n\x17\x44\x65leteLiveConfigRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'videostitcher.googleapis.com/LiveConfig\"\x95\x01\n\x17UpdateLiveConfigRequest\x12\x44\n\x0blive_config\x18\x01 \x01(\x0b\x32*.google.cloud.video.stitcher.v1.LiveConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xd1\x01\n\x16\x43reateVodConfigRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&videostitcher.googleapis.com/VodConfig\x12\x1a\n\rvod_config_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x42\n\nvod_config\x18\x03 \x01(\x0b\x32).google.cloud.video.stitcher.v1.VodConfigB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xb4\x01\n\x15ListVodConfigsRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&videostitcher.googleapis.com/VodConfig\x12\x16\n\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\"\x86\x01\n\x16ListVodConfigsResponse\x12>\n\x0bvod_configs\x18\x01 \x03(\x0b\x32).google.cloud.video.stitcher.v1.VodConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"S\n\x13GetVodConfigRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&videostitcher.googleapis.com/VodConfig\"V\n\x16\x44\x65leteVodConfigRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&videostitcher.googleapis.com/VodConfig\"\x92\x01\n\x16UpdateVodConfigRequest\x12\x42\n\nvod_config\x18\x01 \x01(\x0b\x32).google.cloud.video.stitcher.v1.VodConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x90\x01\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(\t2\xd7\x36\n\x14VideoStitcherService\x12\x99\x02\n\x0c\x43reateCdnKey\x12\x33.google.cloud.video.stitcher.v1.CreateCdnKeyRequest\x1a\x1d.google.longrunning.Operation\"\xb4\x01\xca\x41Y\n%google.cloud.video.stitcher.v1.CdnKey\x12\x30google.cloud.video.stitcher.v1.OperationMetadata\xda\x41\x19parent,cdn_key,cdn_key_id\x82\xd3\xe4\x93\x02\x36\"+/v1/{parent=projects/*/locations/*}/cdnKeys:\x07\x63\x64n_key\x12\xb4\x01\n\x0bListCdnKeys\x12\x32.google.cloud.video.stitcher.v1.ListCdnKeysRequest\x1a\x33.google.cloud.video.stitcher.v1.ListCdnKeysResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=projects/*/locations/*}/cdnKeys\x12\xa1\x01\n\tGetCdnKey\x12\x30.google.cloud.video.stitcher.v1.GetCdnKeyRequest\x1a&.google.cloud.video.stitcher.v1.CdnKey\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v1/{name=projects/*/locations/*/cdnKeys/*}\x12\xeb\x01\n\x0c\x44\x65leteCdnKey\x12\x33.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest\x1a\x1d.google.longrunning.Operation\"\x86\x01\xca\x41I\n\x15google.protobuf.Empty\x12\x30google.cloud.video.stitcher.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02-*+/v1/{name=projects/*/locations/*/cdnKeys/*}\x12\x9b\x02\n\x0cUpdateCdnKey\x12\x33.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest\x1a\x1d.google.longrunning.Operation\"\xb6\x01\xca\x41Y\n%google.cloud.video.stitcher.v1.CdnKey\x12\x30google.cloud.video.stitcher.v1.OperationMetadata\xda\x41\x13\x63\x64n_key,update_mask\x82\xd3\xe4\x93\x02>23/v1/{cdn_key.name=projects/*/locations/*/cdnKeys/*}:\x07\x63\x64n_key\x12\xd2\x01\n\x10\x43reateVodSession\x12\x37.google.cloud.video.stitcher.v1.CreateVodSessionRequest\x1a*.google.cloud.video.stitcher.v1.VodSession\"Y\xda\x41\x12parent,vod_session\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/vodSessions:\x0bvod_session\x12\xb1\x01\n\rGetVodSession\x12\x34.google.cloud.video.stitcher.v1.GetVodSessionRequest\x1a*.google.cloud.video.stitcher.v1.VodSession\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/vodSessions/*}\x12\xe6\x01\n\x14ListVodStitchDetails\x12;.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest\x1a<.google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{parent=projects/*/locations/*/vodSessions/*}/vodStitchDetails\x12\xd3\x01\n\x12GetVodStitchDetail\x12\x39.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest\x1a/.google.cloud.video.stitcher.v1.VodStitchDetail\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{name=projects/*/locations/*/vodSessions/*/vodStitchDetails/*}\x12\xe2\x01\n\x13ListVodAdTagDetails\x12:.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest\x1a;.google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse\"R\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{parent=projects/*/locations/*/vodSessions/*}/vodAdTagDetails\x12\xcf\x01\n\x11GetVodAdTagDetail\x12\x38.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest\x1a..google.cloud.video.stitcher.v1.VodAdTagDetail\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{name=projects/*/locations/*/vodSessions/*/vodAdTagDetails/*}\x12\xe7\x01\n\x14ListLiveAdTagDetails\x12;.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest\x1a<.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse\"T\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\x12\x43/v1/{parent=projects/*/locations/*/liveSessions/*}/liveAdTagDetails\x12\xd4\x01\n\x12GetLiveAdTagDetail\x12\x39.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest\x1a/.google.cloud.video.stitcher.v1.LiveAdTagDetail\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45\x12\x43/v1/{name=projects/*/locations/*/liveSessions/*/liveAdTagDetails/*}\x12\x8f\x02\n\x0b\x43reateSlate\x12\x32.google.cloud.video.stitcher.v1.CreateSlateRequest\x1a\x1d.google.longrunning.Operation\"\xac\x01\xca\x41X\n$google.cloud.video.stitcher.v1.Slate\x12\x30google.cloud.video.stitcher.v1.OperationMetadata\xda\x41\x15parent,slate,slate_id\x82\xd3\xe4\x93\x02\x33\"*/v1/{parent=projects/*/locations/*}/slates:\x05slate\x12\xb0\x01\n\nListSlates\x12\x31.google.cloud.video.stitcher.v1.ListSlatesRequest\x1a\x32.google.cloud.video.stitcher.v1.ListSlatesResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/slates\x12\x9d\x01\n\x08GetSlate\x12/.google.cloud.video.stitcher.v1.GetSlateRequest\x1a%.google.cloud.video.stitcher.v1.Slate\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/slates/*}\x12\x91\x02\n\x0bUpdateSlate\x12\x32.google.cloud.video.stitcher.v1.UpdateSlateRequest\x1a\x1d.google.longrunning.Operation\"\xae\x01\xca\x41X\n$google.cloud.video.stitcher.v1.Slate\x12\x30google.cloud.video.stitcher.v1.OperationMetadata\xda\x41\x11slate,update_mask\x82\xd3\xe4\x93\x02\x39\x32\x30/v1/{slate.name=projects/*/locations/*/slates/*}:\x05slate\x12\xe8\x01\n\x0b\x44\x65leteSlate\x12\x32.google.cloud.video.stitcher.v1.DeleteSlateRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\xca\x41I\n\x15google.protobuf.Empty\x12\x30google.cloud.video.stitcher.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/slates/*}\x12\xd8\x01\n\x11\x43reateLiveSession\x12\x38.google.cloud.video.stitcher.v1.CreateLiveSessionRequest\x1a+.google.cloud.video.stitcher.v1.LiveSession\"\\\xda\x41\x13parent,live_session\x82\xd3\xe4\x93\x02@\"0/v1/{parent=projects/*/locations/*}/liveSessions:\x0clive_session\x12\xb5\x01\n\x0eGetLiveSession\x12\x35.google.cloud.video.stitcher.v1.GetLiveSessionRequest\x1a+.google.cloud.video.stitcher.v1.LiveSession\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/liveSessions/*}\x12\xb5\x02\n\x10\x43reateLiveConfig\x12\x37.google.cloud.video.stitcher.v1.CreateLiveConfigRequest\x1a\x1d.google.longrunning.Operation\"\xc8\x01\xca\x41]\n)google.cloud.video.stitcher.v1.LiveConfig\x12\x30google.cloud.video.stitcher.v1.OperationMetadata\xda\x41!parent,live_config,live_config_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/liveConfigs:\x0blive_config\x12\xc4\x01\n\x0fListLiveConfigs\x12\x36.google.cloud.video.stitcher.v1.ListLiveConfigsRequest\x1a\x37.google.cloud.video.stitcher.v1.ListLiveConfigsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/liveConfigs\x12\xb1\x01\n\rGetLiveConfig\x12\x34.google.cloud.video.stitcher.v1.GetLiveConfigRequest\x1a*.google.cloud.video.stitcher.v1.LiveConfig\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/liveConfigs/*}\x12\xf7\x01\n\x10\x44\x65leteLiveConfig\x12\x37.google.cloud.video.stitcher.v1.DeleteLiveConfigRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41I\n\x15google.protobuf.Empty\x12\x30google.cloud.video.stitcher.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/liveConfigs/*}\x12\xb7\x02\n\x10UpdateLiveConfig\x12\x37.google.cloud.video.stitcher.v1.UpdateLiveConfigRequest\x1a\x1d.google.longrunning.Operation\"\xca\x01\xca\x41]\n)google.cloud.video.stitcher.v1.LiveConfig\x12\x30google.cloud.video.stitcher.v1.OperationMetadata\xda\x41\x17live_config,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{live_config.name=projects/*/locations/*/liveConfigs/*}:\x0blive_config\x12\xae\x02\n\x0f\x43reateVodConfig\x12\x36.google.cloud.video.stitcher.v1.CreateVodConfigRequest\x1a\x1d.google.longrunning.Operation\"\xc3\x01\xca\x41\\\n(google.cloud.video.stitcher.v1.VodConfig\x12\x30google.cloud.video.stitcher.v1.OperationMetadata\xda\x41\x1fparent,vod_config,vod_config_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/vodConfigs:\nvod_config\x12\xc0\x01\n\x0eListVodConfigs\x12\x35.google.cloud.video.stitcher.v1.ListVodConfigsRequest\x1a\x36.google.cloud.video.stitcher.v1.ListVodConfigsResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/vodConfigs\x12\xad\x01\n\x0cGetVodConfig\x12\x33.google.cloud.video.stitcher.v1.GetVodConfigRequest\x1a).google.cloud.video.stitcher.v1.VodConfig\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/vodConfigs/*}\x12\xf4\x01\n\x0f\x44\x65leteVodConfig\x12\x36.google.cloud.video.stitcher.v1.DeleteVodConfigRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41I\n\x15google.protobuf.Empty\x12\x30google.cloud.video.stitcher.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/vodConfigs/*}\x12\xb0\x02\n\x0fUpdateVodConfig\x12\x36.google.cloud.video.stitcher.v1.UpdateVodConfigRequest\x1a\x1d.google.longrunning.Operation\"\xc5\x01\xca\x41\\\n(google.cloud.video.stitcher.v1.VodConfig\x12\x30google.cloud.video.stitcher.v1.OperationMetadata\xda\x41\x16vod_config,update_mask\x82\xd3\xe4\x93\x02G29/v1/{vod_config.name=projects/*/locations/*/vodConfigs/*}:\nvod_config\x1aP\xca\x41\x1cvideostitcher.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x81\x01\n\"com.google.cloud.video.stitcher.v1B\x19VideoStitcherServiceProtoP\x01Z>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Video - module Stitcher - module V1 - CreateCdnKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.CreateCdnKeyRequest").msgclass - ListCdnKeysRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListCdnKeysRequest").msgclass - ListCdnKeysResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListCdnKeysResponse").msgclass - GetCdnKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.GetCdnKeyRequest").msgclass - DeleteCdnKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.DeleteCdnKeyRequest").msgclass - UpdateCdnKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.UpdateCdnKeyRequest").msgclass - CreateVodSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.CreateVodSessionRequest").msgclass - GetVodSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.GetVodSessionRequest").msgclass - ListVodStitchDetailsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest").msgclass - ListVodStitchDetailsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse").msgclass - GetVodStitchDetailRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.GetVodStitchDetailRequest").msgclass - ListVodAdTagDetailsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest").msgclass - ListVodAdTagDetailsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse").msgclass - GetVodAdTagDetailRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest").msgclass - ListLiveAdTagDetailsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest").msgclass - ListLiveAdTagDetailsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse").msgclass - GetLiveAdTagDetailRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest").msgclass - CreateSlateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.CreateSlateRequest").msgclass - GetSlateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.GetSlateRequest").msgclass - ListSlatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListSlatesRequest").msgclass - ListSlatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListSlatesResponse").msgclass - UpdateSlateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.UpdateSlateRequest").msgclass - DeleteSlateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.DeleteSlateRequest").msgclass - CreateLiveSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.CreateLiveSessionRequest").msgclass - GetLiveSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.GetLiveSessionRequest").msgclass - CreateLiveConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.CreateLiveConfigRequest").msgclass - ListLiveConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListLiveConfigsRequest").msgclass - ListLiveConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListLiveConfigsResponse").msgclass - GetLiveConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.GetLiveConfigRequest").msgclass - DeleteLiveConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.DeleteLiveConfigRequest").msgclass - UpdateLiveConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.UpdateLiveConfigRequest").msgclass - CreateVodConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.CreateVodConfigRequest").msgclass - ListVodConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListVodConfigsRequest").msgclass - ListVodConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.ListVodConfigsResponse").msgclass - GetVodConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.GetVodConfigRequest").msgclass - DeleteVodConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.DeleteVodConfigRequest").msgclass - UpdateVodConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.UpdateVodConfigRequest").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.OperationMetadata").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service_services_pb.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service_services_pb.rb deleted file mode 100644 index 479a2a7e25d7..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/video_stitcher_service_services_pb.rb +++ /dev/null @@ -1,121 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/video/stitcher/v1/video_stitcher_service.proto for package 'google.cloud.video.stitcher.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/video/stitcher/v1/video_stitcher_service_pb' - -module Google - module Cloud - module Video - module Stitcher - module V1 - module VideoStitcherService - # Video-On-Demand content stitching API allows you to insert ads - # into (VoD) video on demand files. You will be able to render custom - # scrubber bars with highlighted ads, enforce ad policies, allow - # seamless playback and tracking on native players and monetize - # content with any standard VMAP compliant ad server. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.video.stitcher.v1.VideoStitcherService' - - # Creates a new CDN key. - rpc :CreateCdnKey, ::Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest, ::Google::Longrunning::Operation - # Lists all CDN keys in the specified project and location. - rpc :ListCdnKeys, ::Google::Cloud::Video::Stitcher::V1::ListCdnKeysRequest, ::Google::Cloud::Video::Stitcher::V1::ListCdnKeysResponse - # Returns the specified CDN key. - rpc :GetCdnKey, ::Google::Cloud::Video::Stitcher::V1::GetCdnKeyRequest, ::Google::Cloud::Video::Stitcher::V1::CdnKey - # Deletes the specified CDN key. - rpc :DeleteCdnKey, ::Google::Cloud::Video::Stitcher::V1::DeleteCdnKeyRequest, ::Google::Longrunning::Operation - # Updates the specified CDN key. Only update fields specified - # in the call method body. - rpc :UpdateCdnKey, ::Google::Cloud::Video::Stitcher::V1::UpdateCdnKeyRequest, ::Google::Longrunning::Operation - # Creates a client side playback VOD session and returns the full - # tracking and playback metadata of the session. - rpc :CreateVodSession, ::Google::Cloud::Video::Stitcher::V1::CreateVodSessionRequest, ::Google::Cloud::Video::Stitcher::V1::VodSession - # Returns the full tracking, playback metadata, and relevant ad-ops - # logs for the specified VOD session. - rpc :GetVodSession, ::Google::Cloud::Video::Stitcher::V1::GetVodSessionRequest, ::Google::Cloud::Video::Stitcher::V1::VodSession - # Returns a list of detailed stitching information of the specified VOD - # session. - rpc :ListVodStitchDetails, ::Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsRequest, ::Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsResponse - # Returns the specified stitching information for the specified VOD session. - rpc :GetVodStitchDetail, ::Google::Cloud::Video::Stitcher::V1::GetVodStitchDetailRequest, ::Google::Cloud::Video::Stitcher::V1::VodStitchDetail - # Return the list of ad tag details for the specified VOD session. - rpc :ListVodAdTagDetails, ::Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsRequest, ::Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsResponse - # Returns the specified ad tag detail for the specified VOD session. - rpc :GetVodAdTagDetail, ::Google::Cloud::Video::Stitcher::V1::GetVodAdTagDetailRequest, ::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail - # Return the list of ad tag details for the specified live session. - rpc :ListLiveAdTagDetails, ::Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsRequest, ::Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsResponse - # Returns the specified ad tag detail for the specified live session. - rpc :GetLiveAdTagDetail, ::Google::Cloud::Video::Stitcher::V1::GetLiveAdTagDetailRequest, ::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail - # Creates a slate. - rpc :CreateSlate, ::Google::Cloud::Video::Stitcher::V1::CreateSlateRequest, ::Google::Longrunning::Operation - # Lists all slates in the specified project and location. - rpc :ListSlates, ::Google::Cloud::Video::Stitcher::V1::ListSlatesRequest, ::Google::Cloud::Video::Stitcher::V1::ListSlatesResponse - # Returns the specified slate. - rpc :GetSlate, ::Google::Cloud::Video::Stitcher::V1::GetSlateRequest, ::Google::Cloud::Video::Stitcher::V1::Slate - # Updates the specified slate. - rpc :UpdateSlate, ::Google::Cloud::Video::Stitcher::V1::UpdateSlateRequest, ::Google::Longrunning::Operation - # Deletes the specified slate. - rpc :DeleteSlate, ::Google::Cloud::Video::Stitcher::V1::DeleteSlateRequest, ::Google::Longrunning::Operation - # Creates a new live session. - rpc :CreateLiveSession, ::Google::Cloud::Video::Stitcher::V1::CreateLiveSessionRequest, ::Google::Cloud::Video::Stitcher::V1::LiveSession - # Returns the details for the specified live session. - rpc :GetLiveSession, ::Google::Cloud::Video::Stitcher::V1::GetLiveSessionRequest, ::Google::Cloud::Video::Stitcher::V1::LiveSession - # Registers the live config with the provided unique ID in - # the specified region. - rpc :CreateLiveConfig, ::Google::Cloud::Video::Stitcher::V1::CreateLiveConfigRequest, ::Google::Longrunning::Operation - # Lists all live configs managed by the Video Stitcher that - # belong to the specified project and region. - rpc :ListLiveConfigs, ::Google::Cloud::Video::Stitcher::V1::ListLiveConfigsRequest, ::Google::Cloud::Video::Stitcher::V1::ListLiveConfigsResponse - # Returns the specified live config managed by the Video - # Stitcher service. - rpc :GetLiveConfig, ::Google::Cloud::Video::Stitcher::V1::GetLiveConfigRequest, ::Google::Cloud::Video::Stitcher::V1::LiveConfig - # Deletes the specified live config. - rpc :DeleteLiveConfig, ::Google::Cloud::Video::Stitcher::V1::DeleteLiveConfigRequest, ::Google::Longrunning::Operation - # Updates the specified LiveConfig. Only update fields specified - # in the call method body. - rpc :UpdateLiveConfig, ::Google::Cloud::Video::Stitcher::V1::UpdateLiveConfigRequest, ::Google::Longrunning::Operation - # Registers the VOD config with the provided unique ID in - # the specified region. - rpc :CreateVodConfig, ::Google::Cloud::Video::Stitcher::V1::CreateVodConfigRequest, ::Google::Longrunning::Operation - # Lists all VOD configs managed by the Video Stitcher API that - # belong to the specified project and region. - rpc :ListVodConfigs, ::Google::Cloud::Video::Stitcher::V1::ListVodConfigsRequest, ::Google::Cloud::Video::Stitcher::V1::ListVodConfigsResponse - # Returns the specified VOD config managed by the Video - # Stitcher API service. - rpc :GetVodConfig, ::Google::Cloud::Video::Stitcher::V1::GetVodConfigRequest, ::Google::Cloud::Video::Stitcher::V1::VodConfig - # Deletes the specified VOD config. - rpc :DeleteVodConfig, ::Google::Cloud::Video::Stitcher::V1::DeleteVodConfigRequest, ::Google::Longrunning::Operation - # Updates the specified VOD config. Only update fields specified - # in the call method body. - rpc :UpdateVodConfig, ::Google::Cloud::Video::Stitcher::V1::UpdateVodConfigRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/vod_configs_pb.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/vod_configs_pb.rb deleted file mode 100644 index 1933f42a2c65..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/lib/google/cloud/video/stitcher/v1/vod_configs_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/video/stitcher/v1/vod_configs.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/video/stitcher/v1/fetch_options_pb' - - -descriptor_data = "\n0google/cloud/video/stitcher/v1/vod_configs.proto\x12\x1egoogle.cloud.video.stitcher.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/video/stitcher/v1/fetch_options.proto\"\xe1\x03\n\tVodConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nsource_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nad_tag_uri\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12I\n\x0egam_vod_config\x18\x04 \x01(\x0b\x32,.google.cloud.video.stitcher.v1.GamVodConfigB\x03\xe0\x41\x01\x12\x43\n\x05state\x18\x05 \x01(\x0e\x32/.google.cloud.video.stitcher.v1.VodConfig.StateB\x03\xe0\x41\x03\x12J\n\x14source_fetch_options\x18\x08 \x01(\x0b\x32,.google.cloud.video.stitcher.v1.FetchOptions\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03:l\xea\x41i\n&videostitcher.googleapis.com/VodConfig\x12?projects/{project}/locations/{location}/vodConfigs/{vod_config}\")\n\x0cGamVodConfig\x12\x19\n\x0cnetwork_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42w\n\"com.google.cloud.video.stitcher.v1B\x0fVodConfigsProtoP\x01Z>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Video - module Stitcher - module V1 - VodConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.VodConfig").msgclass - VodConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.VodConfig.State").enummodule - GamVodConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.stitcher.v1.GamVodConfig").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/README.md deleted file mode 100644 index ea625720640c..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Video Stitcher 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-video-stitcher-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # 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. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - # - # Example: - # - # 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 - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # 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 - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # 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 - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/ad_tag_details.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/ad_tag_details.rb deleted file mode 100644 index 932420cbd12b..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/ad_tag_details.rb +++ /dev/null @@ -1,106 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Video - module Stitcher - module V1 - # Information related to the details for one ad tag. This resource is only - # available for live sessions that do not implement Google Ad Manager ad - # insertion. - # @!attribute [rw] name - # @return [::String] - # The resource name in the form of - # `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{id}`. - # @!attribute [rw] ad_requests - # @return [::Array<::Google::Cloud::Video::Stitcher::V1::AdRequest>] - # A list of ad requests. - class LiveAdTagDetail - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information related to the details for one ad tag. This resource is only - # available for VOD sessions that do not implement Google Ad Manager ad - # insertion. - # @!attribute [rw] name - # @return [::String] - # The name of the ad tag detail for the specified VOD session, in the form of - # `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{id}`. - # @!attribute [rw] ad_requests - # @return [::Array<::Google::Cloud::Video::Stitcher::V1::AdRequest>] - # A list of ad requests for one ad tag. - class VodAdTagDetail - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of an ad request to an ad server. - # @!attribute [rw] uri - # @return [::String] - # The ad tag URI processed with integrated macros. - # @!attribute [rw] request_metadata - # @return [::Google::Cloud::Video::Stitcher::V1::RequestMetadata] - # The request metadata used to make the ad request. - # @!attribute [rw] response_metadata - # @return [::Google::Cloud::Video::Stitcher::V1::ResponseMetadata] - # The response metadata received from the ad request. - class AdRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for an ad request. - # @!attribute [rw] headers - # @return [::Google::Protobuf::Struct] - # The HTTP headers of the ad request. - class RequestMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for the response of an ad request. - # @!attribute [rw] error - # @return [::String] - # Error message received when making the ad request. - # @!attribute [rw] headers - # @return [::Google::Protobuf::Struct] - # Headers from the response. - # @!attribute [rw] status_code - # @return [::String] - # Status code for the response. - # @!attribute [rw] size_bytes - # @return [::Integer] - # Size in bytes of the response. - # @!attribute [rw] duration - # @return [::Google::Protobuf::Duration] - # Total time elapsed for the response. - # @!attribute [rw] body - # @return [::String] - # The body of the response. - class ResponseMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/cdn_keys.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/cdn_keys.rb deleted file mode 100644 index 103d90b49c20..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/cdn_keys.rb +++ /dev/null @@ -1,112 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Video - module Stitcher - module V1 - # Configuration for a CDN key. Used by the Video Stitcher - # to sign URIs for fetching video manifests and signing - # media segments for playback. - # @!attribute [rw] google_cdn_key - # @return [::Google::Cloud::Video::Stitcher::V1::GoogleCdnKey] - # The configuration for a Google Cloud CDN key. - # - # Note: The following fields are mutually exclusive: `google_cdn_key`, `akamai_cdn_key`, `media_cdn_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] akamai_cdn_key - # @return [::Google::Cloud::Video::Stitcher::V1::AkamaiCdnKey] - # The configuration for an Akamai CDN key. - # - # Note: The following fields are mutually exclusive: `akamai_cdn_key`, `google_cdn_key`, `media_cdn_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] media_cdn_key - # @return [::Google::Cloud::Video::Stitcher::V1::MediaCdnKey] - # The configuration for a Media CDN key. - # - # Note: The following fields are mutually exclusive: `media_cdn_key`, `google_cdn_key`, `akamai_cdn_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # The resource name of the CDN key, in the form of - # `projects/{project}/locations/{location}/cdnKeys/{id}`. - # The name is ignored when creating a CDN key. - # @!attribute [rw] hostname - # @return [::String] - # The hostname this key applies to. - class CdnKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for a Google Cloud CDN key. - # @!attribute [rw] private_key - # @return [::String] - # Input only. Secret for this Google Cloud CDN key. - # @!attribute [rw] key_name - # @return [::String] - # The public name of the Google Cloud CDN key. - class GoogleCdnKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for an Akamai CDN key. - # @!attribute [rw] token_key - # @return [::String] - # Input only. Token key for the Akamai CDN edge configuration. - class AkamaiCdnKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for a Media CDN key. - # @!attribute [rw] private_key - # @return [::String] - # Input only. 64-byte ed25519 private key for this Media CDN key. - # @!attribute [rw] key_name - # @return [::String] - # The keyset name of the Media CDN key. - # @!attribute [rw] token_config - # @return [::Google::Cloud::Video::Stitcher::V1::MediaCdnKey::TokenConfig] - # Optional. If set, the URL will be signed using the Media CDN token. - # Otherwise, the URL would be signed using the standard Media CDN signature. - class MediaCdnKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for a Media CDN token. - # @!attribute [rw] query_parameter - # @return [::String] - # Optional. The query parameter in which to find the token. - # - # The name must be 1-64 characters long and match - # the regular expression `[a-zA-Z]([a-zA-Z0-9_-])*` which means the - # first character must be a letter, and all following characters - # must be a dash, underscore, letter or digit. - # - # Defaults to `edge-cache-token`. - class TokenConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/companions.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/companions.rb deleted file mode 100644 index 6815f91d8f6b..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/companions.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 Cloud - module Video - module Stitcher - module V1 - # Metadata for companion ads. - # @!attribute [rw] display_requirement - # @return [::Google::Cloud::Video::Stitcher::V1::CompanionAds::DisplayRequirement] - # Indicates how many of the companions should be displayed with the ad. - # @!attribute [rw] companions - # @return [::Array<::Google::Cloud::Video::Stitcher::V1::Companion>] - # List of companion ads. - class CompanionAds - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Indicates how many of the companions should be displayed with the ad. - module DisplayRequirement - # Required companions are not specified. The default is ALL. - DISPLAY_REQUIREMENT_UNSPECIFIED = 0 - - # All companions are required to be displayed. - ALL = 1 - - # At least one of companions needs to be displayed. - ANY = 2 - - # All companions are optional for display. - NONE = 3 - end - end - - # Metadata for a companion. - # @!attribute [rw] iframe_ad_resource - # @return [::Google::Cloud::Video::Stitcher::V1::IframeAdResource] - # The IFrame ad resource associated with the companion ad. - # - # Note: The following fields are mutually exclusive: `iframe_ad_resource`, `static_ad_resource`, `html_ad_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] static_ad_resource - # @return [::Google::Cloud::Video::Stitcher::V1::StaticAdResource] - # The static ad resource associated with the companion ad. - # - # Note: The following fields are mutually exclusive: `static_ad_resource`, `iframe_ad_resource`, `html_ad_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] html_ad_resource - # @return [::Google::Cloud::Video::Stitcher::V1::HtmlAdResource] - # The HTML ad resource associated with the companion ad. - # - # Note: The following fields are mutually exclusive: `html_ad_resource`, `iframe_ad_resource`, `static_ad_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] api_framework - # @return [::String] - # The API necessary to communicate with the creative if available. - # @!attribute [rw] height_px - # @return [::Integer] - # The pixel height of the placement slot for the intended creative. - # @!attribute [rw] width_px - # @return [::Integer] - # The pixel width of the placement slot for the intended creative. - # @!attribute [rw] asset_height_px - # @return [::Integer] - # The pixel height of the creative. - # @!attribute [rw] expanded_height_px - # @return [::Integer] - # The maximum pixel height of the creative in its expanded state. - # @!attribute [rw] asset_width_px - # @return [::Integer] - # The pixel width of the creative. - # @!attribute [rw] expanded_width_px - # @return [::Integer] - # The maximum pixel width of the creative in its expanded state. - # @!attribute [rw] ad_slot_id - # @return [::String] - # The ID used to identify the desired placement on a publisher's page. - # Values to be used should be discussed between publishers and - # advertisers. - # @!attribute [rw] events - # @return [::Array<::Google::Cloud::Video::Stitcher::V1::Event>] - # The list of tracking events for the companion. - class Companion - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for an HTML ad resource. - # @!attribute [rw] html_source - # @return [::String] - # The HTML to display for the ad resource. - class HtmlAdResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for an IFrame ad resource. - # @!attribute [rw] uri - # @return [::String] - # URI source for an IFrame to display for the ad resource. - class IframeAdResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for a static ad resource. - # @!attribute [rw] uri - # @return [::String] - # URI to the static file for the ad resource. - # @!attribute [rw] creative_type - # @return [::String] - # Describes the MIME type of the ad resource. - class StaticAdResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/events.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/events.rb deleted file mode 100644 index 1e4391d24bc9..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/events.rb +++ /dev/null @@ -1,141 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Video - module Stitcher - module V1 - # Describes an event and a trigger URI. - # @!attribute [rw] type - # @return [::Google::Cloud::Video::Stitcher::V1::Event::EventType] - # Describes the event that occurred. - # @!attribute [rw] uri - # @return [::String] - # The URI to trigger for this event. - # @!attribute [rw] id - # @return [::String] - # The ID of the event. - # @!attribute [rw] offset - # @return [::Google::Protobuf::Duration] - # The offset in seconds if the event type is `PROGRESS`. - class Event - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes the event that occurred. - module EventType - # The event type is unspecified. - EVENT_TYPE_UNSPECIFIED = 0 - - # First frame of creative ad viewed. - CREATIVE_VIEW = 1 - - # Creative ad started. - START = 2 - - # Start of an ad break. - BREAK_START = 3 - - # End of an ad break. - BREAK_END = 4 - - # Impression. - IMPRESSION = 5 - - # First quartile progress. - FIRST_QUARTILE = 6 - - # Midpoint progress. - MIDPOINT = 7 - - # Third quartile progress. - THIRD_QUARTILE = 8 - - # Ad progress completed. - COMPLETE = 9 - - # Specific progress event with an offset. - PROGRESS = 10 - - # Player muted. - MUTE = 11 - - # Player unmuted. - UNMUTE = 12 - - # Player paused. - PAUSE = 13 - - # Click event. - CLICK = 14 - - # Click-through event. - CLICK_THROUGH = 15 - - # Player rewinding. - REWIND = 16 - - # Player resumed. - RESUME = 17 - - # Error event. - ERROR = 18 - - # Ad expanded to a larger size. - EXPAND = 21 - - # Ad collapsed to a smaller size. - COLLAPSE = 22 - - # Non-linear ad closed. - CLOSE = 24 - - # Linear ad closed. - CLOSE_LINEAR = 25 - - # Ad skipped. - SKIP = 26 - - # Accept invitation event. - ACCEPT_INVITATION = 27 - end - end - - # Indicates a time in which a list of events should be triggered - # during media playback. - # @!attribute [rw] time_offset - # @return [::Google::Protobuf::Duration] - # The time when the following tracking events occurs. The time is in - # seconds relative to the start of the VOD asset. - # @!attribute [rw] events - # @return [::Array<::Google::Cloud::Video::Stitcher::V1::Event>] - # The list of progress tracking events for the ad break. These can be of - # the following IAB types: `BREAK_START`, `BREAK_END`, `IMPRESSION`, - # `CREATIVE_VIEW`, `START`, `FIRST_QUARTILE`, `MIDPOINT`, `THIRD_QUARTILE`, - # `COMPLETE`, `PROGRESS`. - class ProgressEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/fetch_options.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/fetch_options.rb deleted file mode 100644 index aec79c174015..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/fetch_options.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 Cloud - module Video - module Stitcher - module V1 - # Options on how fetches should be made. - # @!attribute [rw] headers - # @return [::Google::Protobuf::Map{::String => ::String}] - # Custom headers to pass into fetch request. - # Headers must have a maximum of 3 key value pairs. - # Each key value pair must have a maximum of 256 characters per key and 256 - # characters per value. - class FetchOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class HeadersEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/live_configs.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/live_configs.rb deleted file mode 100644 index 03f3943a9f9f..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/live_configs.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 Cloud - module Video - module Stitcher - module V1 - # Metadata for used to register live configs. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the live config, in the form of - # `projects/{project}/locations/{location}/liveConfigs/{id}`. - # @!attribute [rw] source_uri - # @return [::String] - # Required. Source URI for the live stream manifest. - # @!attribute [rw] ad_tag_uri - # @return [::String] - # The default ad tag associated with this live stream config. - # @!attribute [rw] gam_live_config - # @return [::Google::Cloud::Video::Stitcher::V1::GamLiveConfig] - # Additional metadata used to register a live stream with Google Ad Manager - # (GAM) - # @!attribute [r] state - # @return [::Google::Cloud::Video::Stitcher::V1::LiveConfig::State] - # Output only. State of the live config. - # @!attribute [rw] ad_tracking - # @return [::Google::Cloud::Video::Stitcher::V1::AdTracking] - # Required. Determines how the ads are tracked. - # @!attribute [rw] default_slate - # @return [::String] - # This must refer to a slate in the same - # project. If Google Ad Manager (GAM) is used for ads, this string sets the - # value of `slateCreativeId` in - # https://developers.google.com/ad-manager/api/reference/v202211/LiveStreamEventService.LiveStreamEvent#slateCreativeId - # @!attribute [rw] stitching_policy - # @return [::Google::Cloud::Video::Stitcher::V1::LiveConfig::StitchingPolicy] - # Defines the stitcher behavior in case an ad does not align exactly with - # the ad break boundaries. If not specified, the default is `CUT_CURRENT`. - # @!attribute [rw] prefetch_config - # @return [::Google::Cloud::Video::Stitcher::V1::PrefetchConfig] - # The configuration for prefetching ads. - # @!attribute [rw] source_fetch_options - # @return [::Google::Cloud::Video::Stitcher::V1::FetchOptions] - # Options for fetching source manifests and segments. - class LiveConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # State of the live config. - module State - # State is not specified. - STATE_UNSPECIFIED = 0 - - # Live config is being created. - CREATING = 1 - - # Live config is ready for use. - READY = 2 - - # Live config is queued up for deletion. - DELETING = 3 - end - - # Defines the ad stitching behavior in case the ad duration does not align - # exactly with the ad break boundaries. If not specified, the default is - # `CUT_CURRENT`. - module StitchingPolicy - # Stitching policy is not specified. - STITCHING_POLICY_UNSPECIFIED = 0 - - # Cuts an ad short and returns to content in the middle of the ad. - CUT_CURRENT = 1 - - # Finishes stitching the current ad before returning to content. - COMPLETE_AD = 2 - end - end - - # The configuration for prefetch ads. - # @!attribute [rw] enabled - # @return [::Boolean] - # Required. Indicates whether the option to prefetch ad requests is enabled. - # @!attribute [rw] initial_ad_request_duration - # @return [::Google::Protobuf::Duration] - # The duration in seconds of the part of the break to be prefetched. - # This field is only relevant if prefetch is enabled. - # You should set this duration to as long as possible to increase the - # benefits of prefetching, but not longer than the shortest ad break - # expected. For example, for a live event with 30s and 60s ad breaks, the - # initial duration should be set to 30s. - class PrefetchConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata used to register a live stream with Google Ad Manager (GAM) - # @!attribute [rw] network_code - # @return [::String] - # Required. Ad Manager network code to associate with the live config. - # @!attribute [r] asset_key - # @return [::String] - # Output only. The asset key identifier generated for the live config. - # @!attribute [r] custom_asset_key - # @return [::String] - # Output only. The custom asset key identifier generated for the live config. - class GamLiveConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Determines the ad tracking policy. - module AdTracking - # The ad tracking policy is not specified. - AD_TRACKING_UNSPECIFIED = 0 - - # Client-side ad tracking is specified. The client player is expected to - # trigger playback and activity events itself. - CLIENT = 1 - - # The Video Stitcher API will trigger playback events on behalf of - # the client player. - SERVER = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/sessions.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/sessions.rb deleted file mode 100644 index 538a72d08006..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/sessions.rb +++ /dev/null @@ -1,285 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Video - module Stitcher - module V1 - # Metadata for a VOD session. The session expires 4 hours after its creation. - # @!attribute [r] name - # @return [::String] - # Output only. The name of the VOD session, in the form of - # `projects/{project_number}/locations/{location}/vodSessions/{id}`. - # @!attribute [r] interstitials - # @return [::Google::Cloud::Video::Stitcher::V1::Interstitials] - # Output only. Metadata of what was stitched into the content. - # @!attribute [r] play_uri - # @return [::String] - # Output only. The playback URI of the stitched content. - # @!attribute [rw] source_uri - # @return [::String] - # URI of the media to stitch. For most use cases, you should create a - # {::Google::Cloud::Video::Stitcher::V1::VodConfig VodConfig} with this information - # rather than setting this field directly. - # @!attribute [rw] ad_tag_uri - # @return [::String] - # Ad tag URI. For most use cases, you should create a - # {::Google::Cloud::Video::Stitcher::V1::VodConfig VodConfig} with this information - # rather than setting this field directly. - # @!attribute [rw] ad_tag_macro_map - # @return [::Google::Protobuf::Map{::String => ::String}] - # Key value pairs for ad tag macro replacement, only available for VOD - # sessions that do not implement Google Ad manager ad insertion. If the - # specified ad tag URI has macros, this field provides the mapping to the - # value that will replace the macro in the ad tag URI. - # - # Macros are designated by square brackets, for example: - # - # Ad tag URI: `"https://doubleclick.google.com/ad/1?geo_id=[geoId]"` - # - # Ad tag macro map: `{"geoId": "123"}` - # - # Fully qualified ad tag: - # `"https://doubleclick.google.com/ad/1?geo_id=123"` - # @!attribute [rw] manifest_options - # @return [::Google::Cloud::Video::Stitcher::V1::ManifestOptions] - # Additional options that affect the output of the manifest. - # @!attribute [r] asset_id - # @return [::String] - # Output only. The generated ID of the VodSession's source media. - # @!attribute [rw] ad_tracking - # @return [::Google::Cloud::Video::Stitcher::V1::AdTracking] - # Required. Determines how the ad should be tracked. - # @!attribute [rw] gam_settings - # @return [::Google::Cloud::Video::Stitcher::V1::VodSession::GamSettings] - # This field should be set with appropriate values if GAM is being used for - # ads. - # @!attribute [rw] vod_config - # @return [::String] - # The resource name of the VOD config for this session, in the form of - # `projects/{project}/locations/{location}/vodConfigs/{id}`. - class VodSession - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines fields related to Google Ad Manager (GAM). This should be set if - # GAM is being used for ads. - # @!attribute [rw] network_code - # @return [::String] - # Required. Ad Manager network code. - # @!attribute [rw] stream_id - # @return [::String] - # Required. The stream ID generated by Ad Manager. - class GamSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AdTagMacroMapEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes what was stitched into a VOD session's manifest. - # @!attribute [rw] ad_breaks - # @return [::Array<::Google::Cloud::Video::Stitcher::V1::VodSessionAdBreak>] - # List of ad breaks ordered by time. - # @!attribute [rw] session_content - # @return [::Google::Cloud::Video::Stitcher::V1::VodSessionContent] - # Information related to the content of the VOD session. - class Interstitials - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for an inserted ad in a VOD session. - # @!attribute [rw] duration - # @return [::Google::Protobuf::Duration] - # Duration in seconds of the ad. - # @!attribute [rw] companion_ads - # @return [::Google::Cloud::Video::Stitcher::V1::CompanionAds] - # Metadata of companion ads associated with the ad. - # @!attribute [rw] activity_events - # @return [::Array<::Google::Cloud::Video::Stitcher::V1::Event>] - # The list of progress tracking events for the ad break. These can be of - # the following IAB types: `MUTE`, `UNMUTE`, `PAUSE`, `CLICK`, - # `CLICK_THROUGH`, `REWIND`, `RESUME`, `ERROR`, `FULLSCREEN`, - # `EXIT_FULLSCREEN`, `EXPAND`, `COLLAPSE`, `ACCEPT_INVITATION_LINEAR`, - # `CLOSE_LINEAR`, `SKIP`. - class VodSessionAd - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for the entire stitched content in a VOD session. - # @!attribute [rw] duration - # @return [::Google::Protobuf::Duration] - # The total duration in seconds of the content including the ads stitched - # in. - class VodSessionContent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for an inserted ad break. - # @!attribute [rw] progress_events - # @return [::Array<::Google::Cloud::Video::Stitcher::V1::ProgressEvent>] - # List of events that are expected to be triggered, ordered by time. - # @!attribute [rw] ads - # @return [::Array<::Google::Cloud::Video::Stitcher::V1::VodSessionAd>] - # Ordered list of ads stitched into the ad break. - # @!attribute [rw] end_time_offset - # @return [::Google::Protobuf::Duration] - # Ad break end time in seconds relative to the start of the VOD asset. - # @!attribute [rw] start_time_offset - # @return [::Google::Protobuf::Duration] - # Ad break start time in seconds relative to the start of the VOD asset. - class VodSessionAdBreak - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for a live session. The session expires 5 minutes after the client - # stops fetching the session's playlists. - # @!attribute [r] name - # @return [::String] - # Output only. The name of the live session, in the form of - # `projects/{project}/locations/{location}/liveSessions/{id}`. - # @!attribute [r] play_uri - # @return [::String] - # Output only. The URI to play the live session's ad-stitched stream. - # @!attribute [rw] ad_tag_macros - # @return [::Google::Protobuf::Map{::String => ::String}] - # Key value pairs for ad tag macro replacement, only available for live - # sessions that do not implement Google Ad manager ad insertion. If the - # specified ad tag URI has macros, this field provides the mapping to the - # value that will replace the macro in the ad tag URI. - # - # Macros are designated by square brackets, for example: - # - # Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]" - # - # Ad tag macros: `{"geoId": "123"}` - # - # Fully qualified ad tag: - # `"https://doubleclick.google.com/ad/1?geo_id=123"` - # @!attribute [rw] manifest_options - # @return [::Google::Cloud::Video::Stitcher::V1::ManifestOptions] - # Additional options that affect the output of the manifest. - # @!attribute [rw] gam_settings - # @return [::Google::Cloud::Video::Stitcher::V1::LiveSession::GamSettings] - # This field should be set with appropriate values if GAM is being used for - # ads. - # @!attribute [rw] live_config - # @return [::String] - # Required. The resource name of the live config for this session, in the - # form of `projects/{project}/locations/{location}/liveConfigs/{id}`. - # @!attribute [rw] ad_tracking - # @return [::Google::Cloud::Video::Stitcher::V1::AdTracking] - # Determines how the ad should be tracked. This overrides the value set in - # the live config for this session. - class LiveSession - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines fields related to Google Ad Manager (GAM). - # @!attribute [rw] stream_id - # @return [::String] - # Required. The stream ID generated by Ad Manager. This must be set if GAM - # is being used for ads and the session uses client-side ad tracking. - # @!attribute [rw] targeting_parameters - # @return [::Google::Protobuf::Map{::String => ::String}] - # [Targeting - # parameters](https://support.google.com/admanager/answer/7320899) to send - # to Ad Manager to generate a stream ID. This should only be set if the - # session uses server-side ad tracking. - class GamSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class TargetingParametersEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AdTagMacrosEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Options for manifest generation. - # @!attribute [rw] include_renditions - # @return [::Array<::Google::Cloud::Video::Stitcher::V1::RenditionFilter>] - # If specified, the output manifest will only return renditions matching the - # specified filters. - # @!attribute [rw] bitrate_order - # @return [::Google::Cloud::Video::Stitcher::V1::ManifestOptions::OrderPolicy] - # If specified, the output manifest will orders the video and muxed - # renditions by bitrate according to the ordering policy. - class ManifestOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines the ordering policy during manifest generation. - module OrderPolicy - # Ordering policy is not specified. - ORDER_POLICY_UNSPECIFIED = 0 - - # Order by ascending. - ASCENDING = 1 - - # Order by descending. - DESCENDING = 2 - end - end - - # Filters for a video or muxed redition. - # @!attribute [rw] bitrate_bps - # @return [::Integer] - # Bitrate in bits per second for the rendition. If set, only renditions with - # the exact bitrate will match. - # @!attribute [rw] codecs - # @return [::String] - # Codecs for the rendition. If set, only renditions with the exact value - # will match. - class RenditionFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/slates.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/slates.rb deleted file mode 100644 index eb7aadf122b5..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/slates.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! - - -module Google - module Cloud - module Video - module Stitcher - module V1 - # Slate object - # @!attribute [r] name - # @return [::String] - # Output only. The name of the slate, in the form of - # `projects/{project_number}/locations/{location}/slates/{id}`. - # @!attribute [rw] uri - # @return [::String] - # The URI to fetch the source content for the slate. This URI must return an - # MP4 video with at least one audio track. - # @!attribute [rw] gam_slate - # @return [::Google::Cloud::Video::Stitcher::V1::Slate::GamSlate] - # gam_slate has all the GAM-related attributes of slates. - class Slate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # GamSlate object has Google Ad Manager (GAM) related properties for the - # slate. - # @!attribute [rw] network_code - # @return [::String] - # Required. Ad Manager network code to associate with the live config. - # @!attribute [r] gam_slate_id - # @return [::Integer] - # Output only. The identifier generated for the slate by GAM. - class GamSlate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/stitch_details.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/stitch_details.rb deleted file mode 100644 index a858eb22ece3..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/stitch_details.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Video - module Stitcher - module V1 - # Information related to the interstitial of a VOD session. This resource is - # only available for VOD sessions that do not implement Google Ad Manager ad - # insertion. - # @!attribute [rw] name - # @return [::String] - # The name of the stitch detail in the specified VOD session, in the form of - # `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. - # @!attribute [rw] ad_stitch_details - # @return [::Array<::Google::Cloud::Video::Stitcher::V1::AdStitchDetail>] - # A list of ad processing details for the fetched ad playlist. - class VodStitchDetail - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for a stitched ad. - # @!attribute [rw] ad_break_id - # @return [::String] - # Required. The ad break ID of the processed ad. - # @!attribute [rw] ad_id - # @return [::String] - # Required. The ad ID of the processed ad. - # @!attribute [rw] ad_time_offset - # @return [::Google::Protobuf::Duration] - # Required. The time offset of the processed ad. - # @!attribute [rw] skip_reason - # @return [::String] - # Optional. Indicates the reason why the ad has been skipped. - # @!attribute [rw] media - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Optional. The metadata of the chosen media file for the ad. - class AdStitchDetail - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class MediaEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/video_stitcher_service.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/video_stitcher_service.rb deleted file mode 100644 index a546864575f8..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/video_stitcher_service.rb +++ /dev/null @@ -1,619 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Video - module Stitcher - module V1 - # Request message for VideoStitcherService.createCdnKey. - # @!attribute [rw] parent - # @return [::String] - # Required. The project in which the CDN key should be created, in the form - # of `projects/{project_number}/locations/{location}`. - # @!attribute [rw] cdn_key - # @return [::Google::Cloud::Video::Stitcher::V1::CdnKey] - # Required. The CDN key resource to create. - # @!attribute [rw] cdn_key_id - # @return [::String] - # Required. The ID to use for the CDN key, which will become the final - # component of the CDN key's resource name. - # - # This value should conform to RFC-1034, which restricts to - # lower-case letters, numbers, and hyphen, with the first character a - # letter, the last a letter or a number, and a 63 character maximum. - class CreateCdnKeyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.listCdnKeys. - # @!attribute [rw] parent - # @return [::String] - # Required. The project that contains the list of CDN keys, in the form of - # `projects/{project_number}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Filtering results - # @!attribute [rw] order_by - # @return [::String] - # Hint for how to order the results - class ListCdnKeysRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for VideoStitcher.ListCdnKeys. - # @!attribute [rw] cdn_keys - # @return [::Array<::Google::Cloud::Video::Stitcher::V1::CdnKey>] - # List of CDN keys. - # @!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 ListCdnKeysResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.getCdnKey. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the CDN key to be retrieved, in the form of - # `projects/{project}/locations/{location}/cdnKeys/{id}`. - class GetCdnKeyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.deleteCdnKey. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the CDN key to be deleted, in the form of - # `projects/{project_number}/locations/{location}/cdnKeys/{id}`. - class DeleteCdnKeyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.updateCdnKey. - # @!attribute [rw] cdn_key - # @return [::Google::Cloud::Video::Stitcher::V1::CdnKey] - # Required. The CDN key resource which replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The update mask applies to the resource. - # For the `FieldMask` definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - class UpdateCdnKeyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.createVodSession - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location in which the VOD session should be - # created, in the form of `projects/{project_number}/locations/{location}`. - # @!attribute [rw] vod_session - # @return [::Google::Cloud::Video::Stitcher::V1::VodSession] - # Required. Parameters for creating a session. - class CreateVodSessionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.getVodSession - # @!attribute [rw] name - # @return [::String] - # Required. The name of the VOD session to be retrieved, in the form of - # `projects/{project_number}/locations/{location}/vodSessions/{id}`. - class GetVodSessionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.listVodStitchDetails. - # @!attribute [rw] parent - # @return [::String] - # Required. The VOD session where the stitch details belong to, in the form - # of `projects/{project}/locations/{location}/vodSessions/{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 returned from a previous List request, if any. - class ListVodStitchDetailsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for VideoStitcherService.listVodStitchDetails. - # @!attribute [rw] vod_stitch_details - # @return [::Array<::Google::Cloud::Video::Stitcher::V1::VodStitchDetail>] - # A List of stitch Details. - # @!attribute [rw] next_page_token - # @return [::String] - # The pagination token. - class ListVodStitchDetailsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.getVodStitchDetail. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the stitch detail in the specified VOD session, in - # the form of - # `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. - class GetVodStitchDetailRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.listVodAdTagDetails. - # @!attribute [rw] parent - # @return [::String] - # Required. The VOD session which the ad tag details belong to, in the form - # of `projects/{project}/locations/{location}/vodSessions/{vod_session_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 returned from a previous List request, if any. - class ListVodAdTagDetailsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for VideoStitcherService.listVodAdTagDetails. - # @!attribute [rw] vod_ad_tag_details - # @return [::Array<::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail>] - # A List of ad tag details. - # @!attribute [rw] next_page_token - # @return [::String] - # The pagination token. - class ListVodAdTagDetailsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.getVodAdTagDetail - # @!attribute [rw] name - # @return [::String] - # Required. The name of the ad tag detail for the specified VOD session, in - # the form of - # `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. - class GetVodAdTagDetailRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.listLiveAdTagDetails. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource parent in the form of - # `projects/{project}/locations/{location}/liveSessions/{live_session}`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return. - # @!attribute [rw] page_token - # @return [::String] - # The pagination token returned from a previous List request. - class ListLiveAdTagDetailsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for VideoStitcherService.listLiveAdTagDetails. - # @!attribute [rw] live_ad_tag_details - # @return [::Array<::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail>] - # A list of live session ad tag details. - # @!attribute [rw] next_page_token - # @return [::String] - # The pagination token. - class ListLiveAdTagDetailsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.getLiveAdTagDetail - # @!attribute [rw] name - # @return [::String] - # Required. The resource name in the form of - # `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. - class GetLiveAdTagDetailRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.createSlate. - # @!attribute [rw] parent - # @return [::String] - # Required. The project in which the slate should be created, in the form of - # `projects/{project_number}/locations/{location}`. - # @!attribute [rw] slate_id - # @return [::String] - # Required. The unique identifier for the slate. - # This value should conform to RFC-1034, which restricts to - # lower-case letters, numbers, and hyphen, with the first character a - # letter, the last a letter or a number, and a 63 character maximum. - # @!attribute [rw] slate - # @return [::Google::Cloud::Video::Stitcher::V1::Slate] - # Required. The slate to create. - # @!attribute [rw] request_id - # @return [::String] - # A 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 CreateSlateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.getSlate. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the slate to be retrieved, of the slate, in the form - # of `projects/{project_number}/locations/{location}/slates/{id}`. - class GetSlateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.listSlates. - # @!attribute [rw] parent - # @return [::String] - # Required. The project to list slates, in the form of - # `projects/{project_number}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Filtering results - # @!attribute [rw] order_by - # @return [::String] - # Hint for how to order the results - class ListSlatesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for VideoStitcherService.listSlates. - # @!attribute [rw] slates - # @return [::Array<::Google::Cloud::Video::Stitcher::V1::Slate>] - # The list of slates - # @!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 ListSlatesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.updateSlate. - # @!attribute [rw] slate - # @return [::Google::Cloud::Video::Stitcher::V1::Slate] - # Required. The resource with updated fields. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The update mask which specifies fields which should be updated. - class UpdateSlateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.deleteSlate. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the slate to be deleted, in the form of - # `projects/{project_number}/locations/{location}/slates/{id}`. - class DeleteSlateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.createLiveSession. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location in which the live session should be - # created, in the form of `projects/{project_number}/locations/{location}`. - # @!attribute [rw] live_session - # @return [::Google::Cloud::Video::Stitcher::V1::LiveSession] - # Required. Parameters for creating a live session. - class CreateLiveSessionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.getSession. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the live session, in the form of - # `projects/{project_number}/locations/{location}/liveSessions/{id}`. - class GetLiveSessionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.createLiveConfig - # @!attribute [rw] parent - # @return [::String] - # Required. The project in which the live config should be created, in - # the form of `projects/{project_number}/locations/{location}`. - # @!attribute [rw] live_config_id - # @return [::String] - # Required. The unique identifier ID to use for the live config. - # @!attribute [rw] live_config - # @return [::Google::Cloud::Video::Stitcher::V1::LiveConfig] - # Required. The live config resource to create. - # @!attribute [rw] request_id - # @return [::String] - # A 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 CreateLiveConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.listLiveConfig. - # @!attribute [rw] parent - # @return [::String] - # Required. The project that contains the list of live configs, in the - # form of `projects/{project_number}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous List request, if any. - # @!attribute [rw] filter - # @return [::String] - # Optional. The filter to apply to list results (see - # [Filtering](https://google.aip.dev/160)). - # @!attribute [rw] order_by - # @return [::String] - # Optional. Specifies the ordering of results following - # [Cloud API - # syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). - class ListLiveConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for VideoStitcher.ListLiveConfig. - # @!attribute [rw] live_configs - # @return [::Array<::Google::Cloud::Video::Stitcher::V1::LiveConfig>] - # List of live configs. - # @!attribute [rw] next_page_token - # @return [::String] - # The pagination token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListLiveConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.getLiveConfig. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the live config to be retrieved, in the form - # of - # `projects/{project_number}/locations/{location}/liveConfigs/{id}`. - class GetLiveConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.deleteLiveConfig. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the live config to be deleted, in the form of - # `projects/{project_number}/locations/{location}/liveConfigs/{id}`. - class DeleteLiveConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.updateLiveConfig. - # @!attribute [rw] live_config - # @return [::Google::Cloud::Video::Stitcher::V1::LiveConfig] - # Required. The LiveConfig resource which replaces the resource on the - # server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The update mask applies to the resource. - # For the `FieldMask` definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - class UpdateLiveConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.createVodConfig - # @!attribute [rw] parent - # @return [::String] - # Required. The project in which the VOD config should be created, in - # the form of `projects/{project_number}/locations/{location}`. - # @!attribute [rw] vod_config_id - # @return [::String] - # Required. The unique identifier ID to use for the VOD config. - # @!attribute [rw] vod_config - # @return [::Google::Cloud::Video::Stitcher::V1::VodConfig] - # Required. The VOD config resource to create. - # @!attribute [rw] request_id - # @return [::String] - # Optional. A 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 CreateVodConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.listVodConfig. - # @!attribute [rw] parent - # @return [::String] - # Required. The project that contains the list of VOD configs, in the - # form of `projects/{project_number}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of items to return. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The next_page_token value returned from a previous List request, - # if any. - # @!attribute [rw] filter - # @return [::String] - # Optional. The filter to apply to list results (see - # [Filtering](https://google.aip.dev/160)). - # @!attribute [rw] order_by - # @return [::String] - # Optional. Specifies the ordering of results following - # [Cloud API - # syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). - class ListVodConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for VideoStitcher.ListVodConfig. - # @!attribute [rw] vod_configs - # @return [::Array<::Google::Cloud::Video::Stitcher::V1::VodConfig>] - # List of VOD configs. - # @!attribute [rw] next_page_token - # @return [::String] - # The pagination token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListVodConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.getVodConfig. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the VOD config to be retrieved, in the form - # of `projects/{project_number}/locations/{location}/vodConfigs/{id}`. - class GetVodConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.deleteVodConfig. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the VOD config to be deleted, in the form of - # `projects/{project_number}/locations/{location}/vodConfigs/{id}`. - class DeleteVodConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for VideoStitcherService.updateVodConfig. - # @!attribute [rw] vod_config - # @return [::Google::Cloud::Video::Stitcher::V1::VodConfig] - # Required. The VOD config resource which replaces the resource on the - # server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The update mask applies to the resource. - # For the `FieldMask` definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - class UpdateVodConfigRequest - 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. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/vod_configs.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/vod_configs.rb deleted file mode 100644 index 97013d984b08..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/cloud/video/stitcher/v1/vod_configs.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 Video - module Stitcher - module V1 - # Metadata used to register VOD configs. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the VOD config, in the form of - # `projects/{project}/locations/{location}/vodConfigs/{id}`. - # @!attribute [rw] source_uri - # @return [::String] - # Required. Source URI for the VOD stream manifest. - # @!attribute [rw] ad_tag_uri - # @return [::String] - # Required. The default ad tag associated with this VOD config. - # @!attribute [rw] gam_vod_config - # @return [::Google::Cloud::Video::Stitcher::V1::GamVodConfig] - # Optional. Google Ad Manager (GAM) metadata. - # @!attribute [r] state - # @return [::Google::Cloud::Video::Stitcher::V1::VodConfig::State] - # Output only. State of the VOD config. - # @!attribute [rw] source_fetch_options - # @return [::Google::Cloud::Video::Stitcher::V1::FetchOptions] - # Options for fetching source manifests and segments. - class VodConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # State of the VOD config. - module State - # State is not specified. - STATE_UNSPECIFIED = 0 - - # VOD config is being created. - CREATING = 1 - - # VOD config is ready for use. - READY = 2 - - # VOD config is queued up for deletion. - DELETING = 3 - end - end - - # Metadata used for GAM ad decisioning. - # @!attribute [rw] network_code - # @return [::String] - # Required. Ad Manager network code to associate with the VOD config. - class GamVodConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/Gemfile deleted file mode 100644 index fc1885b12214..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-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-video-stitcher-v1", path: "../" -else - gem "google-cloud-video-stitcher-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-video-stitcher-v1/snippets/snippet_metadata_google.cloud.video.stitcher.v1.json b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/snippet_metadata_google.cloud.video.stitcher.v1.json deleted file mode 100644 index 89b9526e4d64..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/snippet_metadata_google.cloud.video.stitcher.v1.json +++ /dev/null @@ -1,1215 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-video-stitcher-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.video.stitcher.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_CreateCdnKey_sync", - "title": "Snippet for the create_cdn_key call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_cdn_key.", - "file": "video_stitcher_service/create_cdn_key.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_cdn_key", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_cdn_key", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "CreateCdnKey", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.CreateCdnKey", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_ListCdnKeys_sync", - "title": "Snippet for the list_cdn_keys call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_cdn_keys.", - "file": "video_stitcher_service/list_cdn_keys.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_cdn_keys", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_cdn_keys", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::ListCdnKeysRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::Stitcher::V1::ListCdnKeysResponse", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "ListCdnKeys", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.ListCdnKeys", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_GetCdnKey_sync", - "title": "Snippet for the get_cdn_key call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_cdn_key.", - "file": "video_stitcher_service/get_cdn_key.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_cdn_key", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_cdn_key", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::GetCdnKeyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::Stitcher::V1::CdnKey", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "GetCdnKey", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.GetCdnKey", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_DeleteCdnKey_sync", - "title": "Snippet for the delete_cdn_key call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#delete_cdn_key.", - "file": "video_stitcher_service/delete_cdn_key.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_cdn_key", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#delete_cdn_key", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::DeleteCdnKeyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "DeleteCdnKey", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.DeleteCdnKey", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_UpdateCdnKey_sync", - "title": "Snippet for the update_cdn_key call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#update_cdn_key.", - "file": "video_stitcher_service/update_cdn_key.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_cdn_key", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#update_cdn_key", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::UpdateCdnKeyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "UpdateCdnKey", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.UpdateCdnKey", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_CreateVodSession_sync", - "title": "Snippet for the create_vod_session call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_vod_session.", - "file": "video_stitcher_service/create_vod_session.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_vod_session", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_vod_session", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::CreateVodSessionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::Stitcher::V1::VodSession", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "CreateVodSession", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.CreateVodSession", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_GetVodSession_sync", - "title": "Snippet for the get_vod_session call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_vod_session.", - "file": "video_stitcher_service/get_vod_session.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_vod_session", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_vod_session", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::GetVodSessionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::Stitcher::V1::VodSession", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "GetVodSession", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.GetVodSession", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_ListVodStitchDetails_sync", - "title": "Snippet for the list_vod_stitch_details call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_vod_stitch_details.", - "file": "video_stitcher_service/list_vod_stitch_details.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_vod_stitch_details", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_vod_stitch_details", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsResponse", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "ListVodStitchDetails", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.ListVodStitchDetails", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_GetVodStitchDetail_sync", - "title": "Snippet for the get_vod_stitch_detail call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_vod_stitch_detail.", - "file": "video_stitcher_service/get_vod_stitch_detail.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_vod_stitch_detail", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_vod_stitch_detail", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::GetVodStitchDetailRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::Stitcher::V1::VodStitchDetail", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "GetVodStitchDetail", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.GetVodStitchDetail", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_ListVodAdTagDetails_sync", - "title": "Snippet for the list_vod_ad_tag_details call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_vod_ad_tag_details.", - "file": "video_stitcher_service/list_vod_ad_tag_details.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_vod_ad_tag_details", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_vod_ad_tag_details", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsResponse", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "ListVodAdTagDetails", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.ListVodAdTagDetails", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_GetVodAdTagDetail_sync", - "title": "Snippet for the get_vod_ad_tag_detail call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_vod_ad_tag_detail.", - "file": "video_stitcher_service/get_vod_ad_tag_detail.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_vod_ad_tag_detail", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_vod_ad_tag_detail", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::GetVodAdTagDetailRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "GetVodAdTagDetail", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.GetVodAdTagDetail", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_ListLiveAdTagDetails_sync", - "title": "Snippet for the list_live_ad_tag_details call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_live_ad_tag_details.", - "file": "video_stitcher_service/list_live_ad_tag_details.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_live_ad_tag_details", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_live_ad_tag_details", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsResponse", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "ListLiveAdTagDetails", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.ListLiveAdTagDetails", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_GetLiveAdTagDetail_sync", - "title": "Snippet for the get_live_ad_tag_detail call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_live_ad_tag_detail.", - "file": "video_stitcher_service/get_live_ad_tag_detail.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_live_ad_tag_detail", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_live_ad_tag_detail", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::GetLiveAdTagDetailRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "GetLiveAdTagDetail", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.GetLiveAdTagDetail", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_CreateSlate_sync", - "title": "Snippet for the create_slate call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_slate.", - "file": "video_stitcher_service/create_slate.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_slate", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_slate", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::CreateSlateRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "CreateSlate", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.CreateSlate", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_ListSlates_sync", - "title": "Snippet for the list_slates call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_slates.", - "file": "video_stitcher_service/list_slates.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_slates", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_slates", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::ListSlatesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::Stitcher::V1::ListSlatesResponse", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "ListSlates", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.ListSlates", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_GetSlate_sync", - "title": "Snippet for the get_slate call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_slate.", - "file": "video_stitcher_service/get_slate.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_slate", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_slate", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::GetSlateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::Stitcher::V1::Slate", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "GetSlate", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.GetSlate", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_UpdateSlate_sync", - "title": "Snippet for the update_slate call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#update_slate.", - "file": "video_stitcher_service/update_slate.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_slate", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#update_slate", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::UpdateSlateRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "UpdateSlate", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.UpdateSlate", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_DeleteSlate_sync", - "title": "Snippet for the delete_slate call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#delete_slate.", - "file": "video_stitcher_service/delete_slate.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_slate", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#delete_slate", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::DeleteSlateRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "DeleteSlate", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.DeleteSlate", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_CreateLiveSession_sync", - "title": "Snippet for the create_live_session call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_live_session.", - "file": "video_stitcher_service/create_live_session.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_live_session", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_live_session", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::CreateLiveSessionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::Stitcher::V1::LiveSession", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "CreateLiveSession", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.CreateLiveSession", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_GetLiveSession_sync", - "title": "Snippet for the get_live_session call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_live_session.", - "file": "video_stitcher_service/get_live_session.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_live_session", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_live_session", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::GetLiveSessionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::Stitcher::V1::LiveSession", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "GetLiveSession", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.GetLiveSession", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_CreateLiveConfig_sync", - "title": "Snippet for the create_live_config call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_live_config.", - "file": "video_stitcher_service/create_live_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_live_config", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_live_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::CreateLiveConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "CreateLiveConfig", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.CreateLiveConfig", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_ListLiveConfigs_sync", - "title": "Snippet for the list_live_configs call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_live_configs.", - "file": "video_stitcher_service/list_live_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_live_configs", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_live_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::ListLiveConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::Stitcher::V1::ListLiveConfigsResponse", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "ListLiveConfigs", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.ListLiveConfigs", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_GetLiveConfig_sync", - "title": "Snippet for the get_live_config call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_live_config.", - "file": "video_stitcher_service/get_live_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_live_config", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_live_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::GetLiveConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::Stitcher::V1::LiveConfig", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "GetLiveConfig", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.GetLiveConfig", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_DeleteLiveConfig_sync", - "title": "Snippet for the delete_live_config call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#delete_live_config.", - "file": "video_stitcher_service/delete_live_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_live_config", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#delete_live_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::DeleteLiveConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "DeleteLiveConfig", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.DeleteLiveConfig", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_UpdateLiveConfig_sync", - "title": "Snippet for the update_live_config call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#update_live_config.", - "file": "video_stitcher_service/update_live_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_live_config", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#update_live_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::UpdateLiveConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "UpdateLiveConfig", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.UpdateLiveConfig", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_CreateVodConfig_sync", - "title": "Snippet for the create_vod_config call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_vod_config.", - "file": "video_stitcher_service/create_vod_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_vod_config", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_vod_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::CreateVodConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "CreateVodConfig", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.CreateVodConfig", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_ListVodConfigs_sync", - "title": "Snippet for the list_vod_configs call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_vod_configs.", - "file": "video_stitcher_service/list_vod_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_vod_configs", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_vod_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::ListVodConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::Stitcher::V1::ListVodConfigsResponse", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "ListVodConfigs", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.ListVodConfigs", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_GetVodConfig_sync", - "title": "Snippet for the get_vod_config call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_vod_config.", - "file": "video_stitcher_service/get_vod_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_vod_config", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_vod_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::GetVodConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::Stitcher::V1::VodConfig", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "GetVodConfig", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.GetVodConfig", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_DeleteVodConfig_sync", - "title": "Snippet for the delete_vod_config call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#delete_vod_config.", - "file": "video_stitcher_service/delete_vod_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_vod_config", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#delete_vod_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::DeleteVodConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "DeleteVodConfig", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.DeleteVodConfig", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "videostitcher_v1_generated_VideoStitcherService_UpdateVodConfig_sync", - "title": "Snippet for the update_vod_config call in the VideoStitcherService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#update_vod_config.", - "file": "video_stitcher_service/update_vod_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_vod_config", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#update_vod_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Stitcher::V1::UpdateVodConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "VideoStitcherService::Client", - "full_name": "::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client" - }, - "method": { - "short_name": "UpdateVodConfig", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService.UpdateVodConfig", - "service": { - "short_name": "VideoStitcherService", - "full_name": "google.cloud.video.stitcher.v1.VideoStitcherService" - } - } - }, - "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-video-stitcher-v1/snippets/video_stitcher_service/create_cdn_key.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_cdn_key.rb deleted file mode 100644 index 4f93f07d50b5..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_cdn_key.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 videostitcher_v1_generated_VideoStitcherService_CreateCdnKey_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the create_cdn_key call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_cdn_key. -# -def create_cdn_key - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest.new - - # Call the create_cdn_key method. - result = client.create_cdn_key request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END videostitcher_v1_generated_VideoStitcherService_CreateCdnKey_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_live_config.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_live_config.rb deleted file mode 100644 index ad64692796d6..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_live_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 videostitcher_v1_generated_VideoStitcherService_CreateLiveConfig_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the create_live_config call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_live_config. -# -def create_live_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::CreateLiveConfigRequest.new - - # Call the create_live_config method. - result = client.create_live_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 videostitcher_v1_generated_VideoStitcherService_CreateLiveConfig_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_live_session.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_live_session.rb deleted file mode 100644 index 812a9460fcc3..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_live_session.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 videostitcher_v1_generated_VideoStitcherService_CreateLiveSession_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the create_live_session call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_live_session. -# -def create_live_session - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::CreateLiveSessionRequest.new - - # Call the create_live_session method. - result = client.create_live_session request - - # The returned object is of type Google::Cloud::Video::Stitcher::V1::LiveSession. - p result -end -# [END videostitcher_v1_generated_VideoStitcherService_CreateLiveSession_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_slate.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_slate.rb deleted file mode 100644 index 377c3d09e374..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_slate.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 videostitcher_v1_generated_VideoStitcherService_CreateSlate_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the create_slate call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_slate. -# -def create_slate - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::CreateSlateRequest.new - - # Call the create_slate method. - result = client.create_slate request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END videostitcher_v1_generated_VideoStitcherService_CreateSlate_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_vod_config.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_vod_config.rb deleted file mode 100644 index 3075faa25311..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_vod_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 videostitcher_v1_generated_VideoStitcherService_CreateVodConfig_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the create_vod_config call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_vod_config. -# -def create_vod_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::CreateVodConfigRequest.new - - # Call the create_vod_config method. - result = client.create_vod_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 videostitcher_v1_generated_VideoStitcherService_CreateVodConfig_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_vod_session.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_vod_session.rb deleted file mode 100644 index 8aa06069b767..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/create_vod_session.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 videostitcher_v1_generated_VideoStitcherService_CreateVodSession_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the create_vod_session call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#create_vod_session. -# -def create_vod_session - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::CreateVodSessionRequest.new - - # Call the create_vod_session method. - result = client.create_vod_session request - - # The returned object is of type Google::Cloud::Video::Stitcher::V1::VodSession. - p result -end -# [END videostitcher_v1_generated_VideoStitcherService_CreateVodSession_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_cdn_key.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_cdn_key.rb deleted file mode 100644 index ba59795b9966..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_cdn_key.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 videostitcher_v1_generated_VideoStitcherService_DeleteCdnKey_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the delete_cdn_key call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#delete_cdn_key. -# -def delete_cdn_key - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::DeleteCdnKeyRequest.new - - # Call the delete_cdn_key method. - result = client.delete_cdn_key request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END videostitcher_v1_generated_VideoStitcherService_DeleteCdnKey_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_live_config.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_live_config.rb deleted file mode 100644 index 355999513abb..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_live_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 videostitcher_v1_generated_VideoStitcherService_DeleteLiveConfig_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the delete_live_config call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#delete_live_config. -# -def delete_live_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::DeleteLiveConfigRequest.new - - # Call the delete_live_config method. - result = client.delete_live_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 videostitcher_v1_generated_VideoStitcherService_DeleteLiveConfig_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_slate.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_slate.rb deleted file mode 100644 index 732238f243d3..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_slate.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 videostitcher_v1_generated_VideoStitcherService_DeleteSlate_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the delete_slate call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#delete_slate. -# -def delete_slate - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::DeleteSlateRequest.new - - # Call the delete_slate method. - result = client.delete_slate request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END videostitcher_v1_generated_VideoStitcherService_DeleteSlate_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_vod_config.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_vod_config.rb deleted file mode 100644 index 7cc05a585be9..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/delete_vod_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 videostitcher_v1_generated_VideoStitcherService_DeleteVodConfig_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the delete_vod_config call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#delete_vod_config. -# -def delete_vod_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::DeleteVodConfigRequest.new - - # Call the delete_vod_config method. - result = client.delete_vod_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 videostitcher_v1_generated_VideoStitcherService_DeleteVodConfig_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_cdn_key.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_cdn_key.rb deleted file mode 100644 index d07f32a355f1..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_cdn_key.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 videostitcher_v1_generated_VideoStitcherService_GetCdnKey_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the get_cdn_key call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_cdn_key. -# -def get_cdn_key - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::GetCdnKeyRequest.new - - # Call the get_cdn_key method. - result = client.get_cdn_key request - - # The returned object is of type Google::Cloud::Video::Stitcher::V1::CdnKey. - p result -end -# [END videostitcher_v1_generated_VideoStitcherService_GetCdnKey_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_live_ad_tag_detail.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_live_ad_tag_detail.rb deleted file mode 100644 index 943a2e729227..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_live_ad_tag_detail.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 videostitcher_v1_generated_VideoStitcherService_GetLiveAdTagDetail_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the get_live_ad_tag_detail call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_live_ad_tag_detail. -# -def get_live_ad_tag_detail - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::GetLiveAdTagDetailRequest.new - - # Call the get_live_ad_tag_detail method. - result = client.get_live_ad_tag_detail request - - # The returned object is of type Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail. - p result -end -# [END videostitcher_v1_generated_VideoStitcherService_GetLiveAdTagDetail_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_live_config.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_live_config.rb deleted file mode 100644 index 358e9f7675da..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_live_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 videostitcher_v1_generated_VideoStitcherService_GetLiveConfig_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the get_live_config call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_live_config. -# -def get_live_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::GetLiveConfigRequest.new - - # Call the get_live_config method. - result = client.get_live_config request - - # The returned object is of type Google::Cloud::Video::Stitcher::V1::LiveConfig. - p result -end -# [END videostitcher_v1_generated_VideoStitcherService_GetLiveConfig_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_live_session.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_live_session.rb deleted file mode 100644 index b967344c678d..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_live_session.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 videostitcher_v1_generated_VideoStitcherService_GetLiveSession_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the get_live_session call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_live_session. -# -def get_live_session - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::GetLiveSessionRequest.new - - # Call the get_live_session method. - result = client.get_live_session request - - # The returned object is of type Google::Cloud::Video::Stitcher::V1::LiveSession. - p result -end -# [END videostitcher_v1_generated_VideoStitcherService_GetLiveSession_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_slate.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_slate.rb deleted file mode 100644 index 7d01a07c8397..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_slate.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 videostitcher_v1_generated_VideoStitcherService_GetSlate_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the get_slate call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_slate. -# -def get_slate - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::GetSlateRequest.new - - # Call the get_slate method. - result = client.get_slate request - - # The returned object is of type Google::Cloud::Video::Stitcher::V1::Slate. - p result -end -# [END videostitcher_v1_generated_VideoStitcherService_GetSlate_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_ad_tag_detail.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_ad_tag_detail.rb deleted file mode 100644 index 1b0faf9532e1..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_ad_tag_detail.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 videostitcher_v1_generated_VideoStitcherService_GetVodAdTagDetail_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the get_vod_ad_tag_detail call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_vod_ad_tag_detail. -# -def get_vod_ad_tag_detail - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::GetVodAdTagDetailRequest.new - - # Call the get_vod_ad_tag_detail method. - result = client.get_vod_ad_tag_detail request - - # The returned object is of type Google::Cloud::Video::Stitcher::V1::VodAdTagDetail. - p result -end -# [END videostitcher_v1_generated_VideoStitcherService_GetVodAdTagDetail_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_config.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_config.rb deleted file mode 100644 index 86bc718feb01..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_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 videostitcher_v1_generated_VideoStitcherService_GetVodConfig_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the get_vod_config call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_vod_config. -# -def get_vod_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::GetVodConfigRequest.new - - # Call the get_vod_config method. - result = client.get_vod_config request - - # The returned object is of type Google::Cloud::Video::Stitcher::V1::VodConfig. - p result -end -# [END videostitcher_v1_generated_VideoStitcherService_GetVodConfig_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_session.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_session.rb deleted file mode 100644 index 3cac0a5c987e..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_session.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 videostitcher_v1_generated_VideoStitcherService_GetVodSession_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the get_vod_session call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_vod_session. -# -def get_vod_session - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::GetVodSessionRequest.new - - # Call the get_vod_session method. - result = client.get_vod_session request - - # The returned object is of type Google::Cloud::Video::Stitcher::V1::VodSession. - p result -end -# [END videostitcher_v1_generated_VideoStitcherService_GetVodSession_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_stitch_detail.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_stitch_detail.rb deleted file mode 100644 index 10da147a720c..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/get_vod_stitch_detail.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 videostitcher_v1_generated_VideoStitcherService_GetVodStitchDetail_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the get_vod_stitch_detail call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#get_vod_stitch_detail. -# -def get_vod_stitch_detail - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::GetVodStitchDetailRequest.new - - # Call the get_vod_stitch_detail method. - result = client.get_vod_stitch_detail request - - # The returned object is of type Google::Cloud::Video::Stitcher::V1::VodStitchDetail. - p result -end -# [END videostitcher_v1_generated_VideoStitcherService_GetVodStitchDetail_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_cdn_keys.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_cdn_keys.rb deleted file mode 100644 index 63aca6016057..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_cdn_keys.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 videostitcher_v1_generated_VideoStitcherService_ListCdnKeys_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the list_cdn_keys call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_cdn_keys. -# -def list_cdn_keys - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::ListCdnKeysRequest.new - - # Call the list_cdn_keys method. - result = client.list_cdn_keys request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Video::Stitcher::V1::CdnKey. - p item - end -end -# [END videostitcher_v1_generated_VideoStitcherService_ListCdnKeys_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_live_ad_tag_details.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_live_ad_tag_details.rb deleted file mode 100644 index 44638cb1c0c4..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_live_ad_tag_details.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 videostitcher_v1_generated_VideoStitcherService_ListLiveAdTagDetails_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the list_live_ad_tag_details call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_live_ad_tag_details. -# -def list_live_ad_tag_details - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsRequest.new - - # Call the list_live_ad_tag_details method. - result = client.list_live_ad_tag_details request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail. - p item - end -end -# [END videostitcher_v1_generated_VideoStitcherService_ListLiveAdTagDetails_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_live_configs.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_live_configs.rb deleted file mode 100644 index 9507da1fae8e..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_live_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 videostitcher_v1_generated_VideoStitcherService_ListLiveConfigs_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the list_live_configs call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_live_configs. -# -def list_live_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::ListLiveConfigsRequest.new - - # Call the list_live_configs method. - result = client.list_live_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::Video::Stitcher::V1::LiveConfig. - p item - end -end -# [END videostitcher_v1_generated_VideoStitcherService_ListLiveConfigs_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_slates.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_slates.rb deleted file mode 100644 index 12315d4f5058..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_slates.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 videostitcher_v1_generated_VideoStitcherService_ListSlates_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the list_slates call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_slates. -# -def list_slates - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::ListSlatesRequest.new - - # Call the list_slates method. - result = client.list_slates request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Video::Stitcher::V1::Slate. - p item - end -end -# [END videostitcher_v1_generated_VideoStitcherService_ListSlates_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_vod_ad_tag_details.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_vod_ad_tag_details.rb deleted file mode 100644 index e51bb58489ef..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_vod_ad_tag_details.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 videostitcher_v1_generated_VideoStitcherService_ListVodAdTagDetails_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the list_vod_ad_tag_details call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_vod_ad_tag_details. -# -def list_vod_ad_tag_details - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsRequest.new - - # Call the list_vod_ad_tag_details method. - result = client.list_vod_ad_tag_details request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail. - p item - end -end -# [END videostitcher_v1_generated_VideoStitcherService_ListVodAdTagDetails_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_vod_configs.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_vod_configs.rb deleted file mode 100644 index 773b2529e272..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_vod_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 videostitcher_v1_generated_VideoStitcherService_ListVodConfigs_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the list_vod_configs call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_vod_configs. -# -def list_vod_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::ListVodConfigsRequest.new - - # Call the list_vod_configs method. - result = client.list_vod_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::Video::Stitcher::V1::VodConfig. - p item - end -end -# [END videostitcher_v1_generated_VideoStitcherService_ListVodConfigs_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_vod_stitch_details.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_vod_stitch_details.rb deleted file mode 100644 index 748fefa9f26d..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/list_vod_stitch_details.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 videostitcher_v1_generated_VideoStitcherService_ListVodStitchDetails_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the list_vod_stitch_details call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#list_vod_stitch_details. -# -def list_vod_stitch_details - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsRequest.new - - # Call the list_vod_stitch_details method. - result = client.list_vod_stitch_details request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Video::Stitcher::V1::VodStitchDetail. - p item - end -end -# [END videostitcher_v1_generated_VideoStitcherService_ListVodStitchDetails_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_cdn_key.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_cdn_key.rb deleted file mode 100644 index 0ad9ba8e41a9..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_cdn_key.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 videostitcher_v1_generated_VideoStitcherService_UpdateCdnKey_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the update_cdn_key call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#update_cdn_key. -# -def update_cdn_key - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::UpdateCdnKeyRequest.new - - # Call the update_cdn_key method. - result = client.update_cdn_key request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END videostitcher_v1_generated_VideoStitcherService_UpdateCdnKey_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_live_config.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_live_config.rb deleted file mode 100644 index bd120b70ec7f..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_live_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 videostitcher_v1_generated_VideoStitcherService_UpdateLiveConfig_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the update_live_config call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#update_live_config. -# -def update_live_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::UpdateLiveConfigRequest.new - - # Call the update_live_config method. - result = client.update_live_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 videostitcher_v1_generated_VideoStitcherService_UpdateLiveConfig_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_slate.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_slate.rb deleted file mode 100644 index 5cecebc76ecd..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_slate.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 videostitcher_v1_generated_VideoStitcherService_UpdateSlate_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the update_slate call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#update_slate. -# -def update_slate - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::UpdateSlateRequest.new - - # Call the update_slate method. - result = client.update_slate request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END videostitcher_v1_generated_VideoStitcherService_UpdateSlate_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_vod_config.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_vod_config.rb deleted file mode 100644 index 4d4ad3375e4c..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/snippets/video_stitcher_service/update_vod_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 videostitcher_v1_generated_VideoStitcherService_UpdateVodConfig_sync] -require "google/cloud/video/stitcher/v1" - -## -# Snippet for the update_vod_config call in the VideoStitcherService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client#update_vod_config. -# -def update_vod_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Stitcher::V1::UpdateVodConfigRequest.new - - # Call the update_vod_config method. - result = client.update_vod_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 videostitcher_v1_generated_VideoStitcherService_UpdateVodConfig_sync] diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/test/google/cloud/video/stitcher/v1/video_stitcher_service_operations_test.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/test/google/cloud/video/stitcher/v1/video_stitcher_service_operations_test.rb deleted file mode 100644 index f44cef1362e3..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/test/google/cloud/video/stitcher/v1/video_stitcher_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/video/stitcher/v1/video_stitcher_service_pb" -require "google/cloud/video/stitcher/v1/video_stitcher_service_services_pb" -require "google/cloud/video/stitcher/v1/video_stitcher_service" - -class ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::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::Video::Stitcher::V1::VideoStitcherService::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::Video::Stitcher::V1::VideoStitcherService::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::Video::Stitcher::V1::VideoStitcherService::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::Video::Stitcher::V1::VideoStitcherService::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::Video::Stitcher::V1::VideoStitcherService::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::Video::Stitcher::V1::VideoStitcherService::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::Video::Stitcher::V1::VideoStitcherService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/test/google/cloud/video/stitcher/v1/video_stitcher_service_paths_test.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/test/google/cloud/video/stitcher/v1/video_stitcher_service_paths_test.rb deleted file mode 100644 index 031dc2b0572f..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/test/google/cloud/video/stitcher/v1/video_stitcher_service_paths_test.rb +++ /dev/null @@ -1,163 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/video/stitcher/v1/video_stitcher_service" - -class ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::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_cdn_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::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.cdn_key_path project: "value0", location: "value1", cdn_key: "value2" - assert_equal "projects/value0/locations/value1/cdnKeys/value2", path - end - end - - def test_live_ad_tag_detail_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.live_ad_tag_detail_path project: "value0", location: "value1", live_session: "value2", live_ad_tag_detail: "value3" - assert_equal "projects/value0/locations/value1/liveSessions/value2/liveAdTagDetails/value3", path - end - end - - def test_live_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::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.live_config_path project: "value0", location: "value1", live_config: "value2" - assert_equal "projects/value0/locations/value1/liveConfigs/value2", path - end - end - - def test_live_session_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.live_session_path project: "value0", location: "value1", live_session: "value2" - assert_equal "projects/value0/locations/value1/liveSessions/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::Video::Stitcher::V1::VideoStitcherService::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_slate_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.slate_path project: "value0", location: "value1", slate: "value2" - assert_equal "projects/value0/locations/value1/slates/value2", path - end - end - - def test_vod_ad_tag_detail_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.vod_ad_tag_detail_path project: "value0", location: "value1", vod_session: "value2", vod_ad_tag_detail: "value3" - assert_equal "projects/value0/locations/value1/vodSessions/value2/vodAdTagDetails/value3", path - end - end - - def test_vod_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::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.vod_config_path project: "value0", location: "value1", vod_config: "value2" - assert_equal "projects/value0/locations/value1/vodConfigs/value2", path - end - end - - def test_vod_session_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.vod_session_path project: "value0", location: "value1", vod_session: "value2" - assert_equal "projects/value0/locations/value1/vodSessions/value2", path - end - end - - def test_vod_stitch_detail_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.vod_stitch_detail_path project: "value0", location: "value1", vod_session: "value2", vod_stitch_detail: "value3" - assert_equal "projects/value0/locations/value1/vodSessions/value2/vodStitchDetails/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/test/google/cloud/video/stitcher/v1/video_stitcher_service_test.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/test/google/cloud/video/stitcher/v1/video_stitcher_service_test.rb deleted file mode 100644 index 3dda07e9810b..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/test/google/cloud/video/stitcher/v1/video_stitcher_service_test.rb +++ /dev/null @@ -1,2031 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/video/stitcher/v1/video_stitcher_service_pb" -require "google/cloud/video/stitcher/v1/video_stitcher_service" - -class ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::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_cdn_key - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - cdn_key = {} - cdn_key_id = "hello world" - - create_cdn_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_cdn_key, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::Stitcher::V1::CdnKey), request["cdn_key"] - assert_equal "hello world", request["cdn_key_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_cdn_key_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_cdn_key({ parent: parent, cdn_key: cdn_key, cdn_key_id: cdn_key_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_cdn_key parent: parent, cdn_key: cdn_key, cdn_key_id: cdn_key_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_cdn_key ::Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest.new(parent: parent, cdn_key: cdn_key, cdn_key_id: cdn_key_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_cdn_key({ parent: parent, cdn_key: cdn_key, cdn_key_id: cdn_key_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_cdn_key(::Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest.new(parent: parent, cdn_key: cdn_key, cdn_key_id: cdn_key_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_cdn_key_client_stub.call_rpc_count - end - end - - def test_list_cdn_keys - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::Stitcher::V1::ListCdnKeysResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_cdn_keys_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_cdn_keys, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::ListCdnKeysRequest, 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_cdn_keys_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_cdn_keys({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_cdn_keys parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_cdn_keys ::Google::Cloud::Video::Stitcher::V1::ListCdnKeysRequest.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_cdn_keys({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_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_cdn_keys(::Google::Cloud::Video::Stitcher::V1::ListCdnKeysRequest.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_cdn_keys_client_stub.call_rpc_count - end - end - - def test_get_cdn_key - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::Stitcher::V1::CdnKey.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_cdn_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_cdn_key, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::GetCdnKeyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_cdn_key_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_cdn_key({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_cdn_key name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_cdn_key ::Google::Cloud::Video::Stitcher::V1::GetCdnKeyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_cdn_key({ 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_cdn_key(::Google::Cloud::Video::Stitcher::V1::GetCdnKeyRequest.new(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_cdn_key_client_stub.call_rpc_count - end - end - - def test_delete_cdn_key - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_cdn_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_cdn_key, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::DeleteCdnKeyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_cdn_key_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_cdn_key({ name: 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_cdn_key name: 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_cdn_key ::Google::Cloud::Video::Stitcher::V1::DeleteCdnKeyRequest.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_cdn_key({ 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_cdn_key(::Google::Cloud::Video::Stitcher::V1::DeleteCdnKeyRequest.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_cdn_key_client_stub.call_rpc_count - end - end - - def test_update_cdn_key - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - cdn_key = {} - update_mask = {} - - update_cdn_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_cdn_key, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::UpdateCdnKeyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::Stitcher::V1::CdnKey), request["cdn_key"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_cdn_key_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_cdn_key({ cdn_key: cdn_key, 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_cdn_key cdn_key: cdn_key, 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_cdn_key ::Google::Cloud::Video::Stitcher::V1::UpdateCdnKeyRequest.new(cdn_key: cdn_key, 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_cdn_key({ cdn_key: cdn_key, 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_cdn_key(::Google::Cloud::Video::Stitcher::V1::UpdateCdnKeyRequest.new(cdn_key: cdn_key, 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_cdn_key_client_stub.call_rpc_count - end - end - - def test_create_vod_session - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::Stitcher::V1::VodSession.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - vod_session = {} - - create_vod_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_vod_session, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::CreateVodSessionRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::Stitcher::V1::VodSession), request["vod_session"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_vod_session_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_vod_session({ parent: parent, vod_session: vod_session }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_vod_session parent: parent, vod_session: vod_session do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_vod_session ::Google::Cloud::Video::Stitcher::V1::CreateVodSessionRequest.new(parent: parent, vod_session: vod_session) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_vod_session({ parent: parent, vod_session: vod_session }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_vod_session(::Google::Cloud::Video::Stitcher::V1::CreateVodSessionRequest.new(parent: parent, vod_session: vod_session), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_vod_session_client_stub.call_rpc_count - end - end - - def test_get_vod_session - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::Stitcher::V1::VodSession.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_vod_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_vod_session, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::GetVodSessionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_vod_session_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_vod_session({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_vod_session name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_vod_session ::Google::Cloud::Video::Stitcher::V1::GetVodSessionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_vod_session({ 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_vod_session(::Google::Cloud::Video::Stitcher::V1::GetVodSessionRequest.new(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_vod_session_client_stub.call_rpc_count - end - end - - def test_list_vod_stitch_details - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_vod_stitch_details_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_vod_stitch_details, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsRequest, 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_vod_stitch_details_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_vod_stitch_details({ 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_vod_stitch_details 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_vod_stitch_details ::Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsRequest.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_vod_stitch_details({ 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_vod_stitch_details(::Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsRequest.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_vod_stitch_details_client_stub.call_rpc_count - end - end - - def test_get_vod_stitch_detail - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::Stitcher::V1::VodStitchDetail.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_vod_stitch_detail_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_vod_stitch_detail, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::GetVodStitchDetailRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_vod_stitch_detail_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_vod_stitch_detail({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_vod_stitch_detail name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_vod_stitch_detail ::Google::Cloud::Video::Stitcher::V1::GetVodStitchDetailRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_vod_stitch_detail({ 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_vod_stitch_detail(::Google::Cloud::Video::Stitcher::V1::GetVodStitchDetailRequest.new(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_vod_stitch_detail_client_stub.call_rpc_count - end - end - - def test_list_vod_ad_tag_details - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_vod_ad_tag_details_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_vod_ad_tag_details, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsRequest, 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_vod_ad_tag_details_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_vod_ad_tag_details({ 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_vod_ad_tag_details 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_vod_ad_tag_details ::Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsRequest.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_vod_ad_tag_details({ 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_vod_ad_tag_details(::Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsRequest.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_vod_ad_tag_details_client_stub.call_rpc_count - end - end - - def test_get_vod_ad_tag_detail - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_vod_ad_tag_detail_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_vod_ad_tag_detail, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::GetVodAdTagDetailRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_vod_ad_tag_detail_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_vod_ad_tag_detail({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_vod_ad_tag_detail name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_vod_ad_tag_detail ::Google::Cloud::Video::Stitcher::V1::GetVodAdTagDetailRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_vod_ad_tag_detail({ 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_vod_ad_tag_detail(::Google::Cloud::Video::Stitcher::V1::GetVodAdTagDetailRequest.new(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_vod_ad_tag_detail_client_stub.call_rpc_count - end - end - - def test_list_live_ad_tag_details - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_live_ad_tag_details_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_live_ad_tag_details, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsRequest, 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_live_ad_tag_details_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_live_ad_tag_details({ 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_live_ad_tag_details 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_live_ad_tag_details ::Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsRequest.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_live_ad_tag_details({ 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_live_ad_tag_details(::Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsRequest.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_live_ad_tag_details_client_stub.call_rpc_count - end - end - - def test_get_live_ad_tag_detail - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_live_ad_tag_detail_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_live_ad_tag_detail, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::GetLiveAdTagDetailRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_live_ad_tag_detail_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_live_ad_tag_detail({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_live_ad_tag_detail name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_live_ad_tag_detail ::Google::Cloud::Video::Stitcher::V1::GetLiveAdTagDetailRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_live_ad_tag_detail({ 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_live_ad_tag_detail(::Google::Cloud::Video::Stitcher::V1::GetLiveAdTagDetailRequest.new(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_live_ad_tag_detail_client_stub.call_rpc_count - end - end - - def test_create_slate - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - slate_id = "hello world" - slate = {} - request_id = "hello world" - - create_slate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_slate, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::CreateSlateRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["slate_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::Stitcher::V1::Slate), request["slate"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_slate_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_slate({ parent: parent, slate_id: slate_id, slate: slate, 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_slate parent: parent, slate_id: slate_id, slate: slate, 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_slate ::Google::Cloud::Video::Stitcher::V1::CreateSlateRequest.new(parent: parent, slate_id: slate_id, slate: slate, 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_slate({ parent: parent, slate_id: slate_id, slate: slate, 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_slate(::Google::Cloud::Video::Stitcher::V1::CreateSlateRequest.new(parent: parent, slate_id: slate_id, slate: slate, 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_slate_client_stub.call_rpc_count - end - end - - def test_list_slates - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::Stitcher::V1::ListSlatesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_slates_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_slates, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::ListSlatesRequest, 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_slates_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_slates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_slates parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_slates ::Google::Cloud::Video::Stitcher::V1::ListSlatesRequest.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_slates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_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_slates(::Google::Cloud::Video::Stitcher::V1::ListSlatesRequest.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_slates_client_stub.call_rpc_count - end - end - - def test_get_slate - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::Stitcher::V1::Slate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_slate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_slate, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::GetSlateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_slate_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_slate({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_slate name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_slate ::Google::Cloud::Video::Stitcher::V1::GetSlateRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_slate({ 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_slate(::Google::Cloud::Video::Stitcher::V1::GetSlateRequest.new(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_slate_client_stub.call_rpc_count - end - end - - def test_update_slate - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - slate = {} - update_mask = {} - - update_slate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_slate, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::UpdateSlateRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::Stitcher::V1::Slate), request["slate"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_slate_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_slate({ slate: slate, 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_slate slate: slate, 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_slate ::Google::Cloud::Video::Stitcher::V1::UpdateSlateRequest.new(slate: slate, 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_slate({ slate: slate, 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_slate(::Google::Cloud::Video::Stitcher::V1::UpdateSlateRequest.new(slate: slate, 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_slate_client_stub.call_rpc_count - end - end - - def test_delete_slate - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_slate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_slate, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::DeleteSlateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_slate_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_slate({ name: 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_slate name: 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_slate ::Google::Cloud::Video::Stitcher::V1::DeleteSlateRequest.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_slate({ 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_slate(::Google::Cloud::Video::Stitcher::V1::DeleteSlateRequest.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_slate_client_stub.call_rpc_count - end - end - - def test_create_live_session - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::Stitcher::V1::LiveSession.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - live_session = {} - - create_live_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_live_session, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::CreateLiveSessionRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::Stitcher::V1::LiveSession), request["live_session"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_live_session_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_live_session({ parent: parent, live_session: live_session }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_live_session parent: parent, live_session: live_session do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_live_session ::Google::Cloud::Video::Stitcher::V1::CreateLiveSessionRequest.new(parent: parent, live_session: live_session) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_live_session({ parent: parent, live_session: live_session }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_live_session(::Google::Cloud::Video::Stitcher::V1::CreateLiveSessionRequest.new(parent: parent, live_session: live_session), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_live_session_client_stub.call_rpc_count - end - end - - def test_get_live_session - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::Stitcher::V1::LiveSession.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_live_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_live_session, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::GetLiveSessionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_live_session_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_live_session({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_live_session name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_live_session ::Google::Cloud::Video::Stitcher::V1::GetLiveSessionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_live_session({ 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_live_session(::Google::Cloud::Video::Stitcher::V1::GetLiveSessionRequest.new(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_live_session_client_stub.call_rpc_count - end - end - - def test_create_live_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" - live_config_id = "hello world" - live_config = {} - request_id = "hello world" - - create_live_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_live_config, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::CreateLiveConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["live_config_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::Stitcher::V1::LiveConfig), request["live_config"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_live_config_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_live_config({ parent: parent, live_config_id: live_config_id, live_config: live_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_live_config parent: parent, live_config_id: live_config_id, live_config: live_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_live_config ::Google::Cloud::Video::Stitcher::V1::CreateLiveConfigRequest.new(parent: parent, live_config_id: live_config_id, live_config: live_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_live_config({ parent: parent, live_config_id: live_config_id, live_config: live_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_live_config(::Google::Cloud::Video::Stitcher::V1::CreateLiveConfigRequest.new(parent: parent, live_config_id: live_config_id, live_config: live_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_live_config_client_stub.call_rpc_count - end - end - - def test_list_live_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::Stitcher::V1::ListLiveConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_live_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_live_configs, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::ListLiveConfigsRequest, 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_live_configs_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_live_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_live_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_live_configs ::Google::Cloud::Video::Stitcher::V1::ListLiveConfigsRequest.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_live_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_live_configs(::Google::Cloud::Video::Stitcher::V1::ListLiveConfigsRequest.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_live_configs_client_stub.call_rpc_count - end - end - - def test_get_live_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::Stitcher::V1::LiveConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_live_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_live_config, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::GetLiveConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_live_config_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_live_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_live_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_live_config ::Google::Cloud::Video::Stitcher::V1::GetLiveConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_live_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_live_config(::Google::Cloud::Video::Stitcher::V1::GetLiveConfigRequest.new(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_live_config_client_stub.call_rpc_count - end - end - - def test_delete_live_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" - - delete_live_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_live_config, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::DeleteLiveConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_live_config_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_live_config({ name: 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_live_config name: 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_live_config ::Google::Cloud::Video::Stitcher::V1::DeleteLiveConfigRequest.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_live_config({ 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_live_config(::Google::Cloud::Video::Stitcher::V1::DeleteLiveConfigRequest.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_live_config_client_stub.call_rpc_count - end - end - - def test_update_live_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. - live_config = {} - update_mask = {} - - update_live_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_live_config, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::UpdateLiveConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::Stitcher::V1::LiveConfig), request["live_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_live_config_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_live_config({ live_config: live_config, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_live_config live_config: live_config, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_live_config ::Google::Cloud::Video::Stitcher::V1::UpdateLiveConfigRequest.new(live_config: live_config, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_live_config({ live_config: live_config, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_live_config(::Google::Cloud::Video::Stitcher::V1::UpdateLiveConfigRequest.new(live_config: live_config, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_live_config_client_stub.call_rpc_count - end - end - - def test_create_vod_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" - vod_config_id = "hello world" - vod_config = {} - request_id = "hello world" - - create_vod_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_vod_config, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::CreateVodConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["vod_config_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::Stitcher::V1::VodConfig), request["vod_config"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_vod_config_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_vod_config({ parent: parent, vod_config_id: vod_config_id, vod_config: vod_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_vod_config parent: parent, vod_config_id: vod_config_id, vod_config: vod_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_vod_config ::Google::Cloud::Video::Stitcher::V1::CreateVodConfigRequest.new(parent: parent, vod_config_id: vod_config_id, vod_config: vod_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_vod_config({ parent: parent, vod_config_id: vod_config_id, vod_config: vod_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_vod_config(::Google::Cloud::Video::Stitcher::V1::CreateVodConfigRequest.new(parent: parent, vod_config_id: vod_config_id, vod_config: vod_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_vod_config_client_stub.call_rpc_count - end - end - - def test_list_vod_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::Stitcher::V1::ListVodConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_vod_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_vod_configs, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::ListVodConfigsRequest, 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_vod_configs_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_vod_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_vod_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_vod_configs ::Google::Cloud::Video::Stitcher::V1::ListVodConfigsRequest.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_vod_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_vod_configs(::Google::Cloud::Video::Stitcher::V1::ListVodConfigsRequest.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_vod_configs_client_stub.call_rpc_count - end - end - - def test_get_vod_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::Stitcher::V1::VodConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_vod_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_vod_config, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::GetVodConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_vod_config_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_vod_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_vod_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_vod_config ::Google::Cloud::Video::Stitcher::V1::GetVodConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_vod_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_vod_config(::Google::Cloud::Video::Stitcher::V1::GetVodConfigRequest.new(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_vod_config_client_stub.call_rpc_count - end - end - - def test_delete_vod_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" - - delete_vod_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_vod_config, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::DeleteVodConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_vod_config_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_vod_config({ name: 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_vod_config name: 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_vod_config ::Google::Cloud::Video::Stitcher::V1::DeleteVodConfigRequest.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_vod_config({ 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_vod_config(::Google::Cloud::Video::Stitcher::V1::DeleteVodConfigRequest.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_vod_config_client_stub.call_rpc_count - end - end - - def test_update_vod_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. - vod_config = {} - update_mask = {} - - update_vod_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_vod_config, name - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::UpdateVodConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::Stitcher::V1::VodConfig), request["vod_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_vod_config_client_stub do - # Create client - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_vod_config({ vod_config: vod_config, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_vod_config vod_config: vod_config, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_vod_config ::Google::Cloud::Video::Stitcher::V1::UpdateVodConfigRequest.new(vod_config: vod_config, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_vod_config({ vod_config: vod_config, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_vod_config(::Google::Cloud::Video::Stitcher::V1::UpdateVodConfigRequest.new(vod_config: vod_config, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_vod_config_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::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::Video::Stitcher::V1::VideoStitcherService::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::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::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::Video::Stitcher::V1::VideoStitcherService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-video-stitcher-v1/test/helper.rb b/owl-bot-staging/google-cloud-video-stitcher-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-video-stitcher-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/.gitignore b/owl-bot-staging/google-cloud-video-transcoder-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-video-transcoder-v1/.repo-metadata.json deleted file mode 100644 index 210f3e4c0ac8..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "transcoder.googleapis.com", - "api_shortname": "transcoder", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-video-transcoder-v1/latest", - "distribution_name": "google-cloud-video-transcoder-v1", - "is_cloud": true, - "language": "ruby", - "name": "transcoder", - "name_pretty": "Transcoder V1 API", - "product_documentation": "https://cloud.google.com/transcoder/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The Transcoder API allows you to convert video files and package them for optimized delivery to web, mobile and connected TVs. Note that google-cloud-video-transcoder-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video-transcoder instead. See the readme for more details.", - "ruby-cloud-env-prefix": "TRANSCODER", - "ruby-cloud-product-url": "https://cloud.google.com/transcoder/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/.rubocop.yml b/owl-bot-staging/google-cloud-video-transcoder-v1/.rubocop.yml deleted file mode 100644 index cf8b44206f29..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-video-transcoder-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-video-transcoder-v1.rb" diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/.toys.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1/.yardopts b/owl-bot-staging/google-cloud-video-transcoder-v1/.yardopts deleted file mode 100644 index 4e4d74b6bdd7..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Transcoder 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-video-transcoder-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-video-transcoder-v1/AUTHENTICATION.md deleted file mode 100644 index eb68199aa7f3..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-video-transcoder-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-video-transcoder-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/video/transcoder/v1" - -client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/video/transcoder/v1" - -::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::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-video-transcoder-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/video/transcoder/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::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-video-transcoder-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-video-transcoder-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/Gemfile b/owl-bot-staging/google-cloud-video-transcoder-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/LICENSE.md b/owl-bot-staging/google-cloud-video-transcoder-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1/README.md b/owl-bot-staging/google-cloud-video-transcoder-v1/README.md deleted file mode 100644 index 2fcb1128e3c1..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Transcoder V1 API - -This API converts video files into formats suitable for consumer distribution. For more information, see the Transcoder API overview. - -The Transcoder API allows you to convert video files and package them for optimized delivery to web, mobile and connected TVs. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Transcoder V1 API. Most users should consider using -the main client gem, -[google-cloud-video-transcoder](https://rubygems.org/gems/google-cloud-video-transcoder). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-video-transcoder-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/transcoder.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/video/transcoder/v1" - -client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new -request = ::Google::Cloud::Video::Transcoder::V1::CreateJobRequest.new # (request fields as keyword arguments...) -response = client.create_job request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-video-transcoder-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/transcoder/) -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/video/transcoder/v1" -require "logger" - -client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::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-video-transcoder`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-video-transcoder-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-video-transcoder`. -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-video-transcoder-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-video-transcoder-v1/Rakefile b/owl-bot-staging/google-cloud-video-transcoder-v1/Rakefile deleted file mode 100644 index 2273913846e4..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["TRANSCODER_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["TRANSCODER_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["TRANSCODER_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 TRANSCODER_TEST_PROJECT=test123 TRANSCODER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/video/transcoder/v1/transcoder_service/credentials" - ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["TRANSCODER_PROJECT"] = project - ENV["TRANSCODER_TEST_PROJECT"] = project - ENV["TRANSCODER_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-video-transcoder-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-video-transcoder-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-video-transcoder-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-video-transcoder-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-video-transcoder-v1" - header "google-cloud-video-transcoder-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-video-transcoder-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-video-transcoder-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-video-transcoder-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-video-transcoder-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-video-transcoder-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-video-transcoder-v1/gapic_metadata.json deleted file mode 100644 index e266e5e3689d..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/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.video.transcoder.v1", - "libraryPackage": "::Google::Cloud::Video::Transcoder::V1", - "services": { - "TranscoderService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client", - "rpcs": { - "CreateJob": { - "methods": [ - "create_job" - ] - }, - "ListJobs": { - "methods": [ - "list_jobs" - ] - }, - "GetJob": { - "methods": [ - "get_job" - ] - }, - "DeleteJob": { - "methods": [ - "delete_job" - ] - }, - "CreateJobTemplate": { - "methods": [ - "create_job_template" - ] - }, - "ListJobTemplates": { - "methods": [ - "list_job_templates" - ] - }, - "GetJobTemplate": { - "methods": [ - "get_job_template" - ] - }, - "DeleteJobTemplate": { - "methods": [ - "delete_job_template" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/google-cloud-video-transcoder-v1.gemspec b/owl-bot-staging/google-cloud-video-transcoder-v1/google-cloud-video-transcoder-v1.gemspec deleted file mode 100644 index 0f6d4448ef8a..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/google-cloud-video-transcoder-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/video/transcoder/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-video-transcoder-v1" - gem.version = Google::Cloud::Video::Transcoder::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The Transcoder API allows you to convert video files and package them for optimized delivery to web, mobile and connected TVs. Note that google-cloud-video-transcoder-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video-transcoder instead. See the readme for more details." - gem.summary = "This API converts video files into formats suitable for consumer distribution. For more information, see the Transcoder API overview." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google-cloud-video-transcoder-v1.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google-cloud-video-transcoder-v1.rb deleted file mode 100644 index a5c2e317a7b1..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google-cloud-video-transcoder-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/video/transcoder/v1" diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1.rb deleted file mode 100644 index 21b4690a134e..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/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/video/transcoder/v1/transcoder_service" -require "google/cloud/video/transcoder/v1/version" - -module Google - module Cloud - module Video - module Transcoder - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/video/transcoder/v1" - # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/video/transcoder/v1" - # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/video/transcoder/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/resources_pb.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/resources_pb.rb deleted file mode 100644 index cfe53f158e3e..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/resources_pb.rb +++ /dev/null @@ -1,94 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/video/transcoder/v1/resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n0google/cloud/video/transcoder/v1/resources.proto\x12 google.cloud.video.transcoder.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xb9\t\n\x03Job\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x16\n\tinput_uri\x18\x02 \x01(\tB\x03\xe0\x41\x04\x12\x17\n\noutput_uri\x18\x03 \x01(\tB\x03\xe0\x41\x04\x12\x1a\n\x0btemplate_id\x18\x04 \x01(\tB\x03\xe0\x41\x04H\x00\x12=\n\x06\x63onfig\x18\x05 \x01(\x0b\x32+.google.cloud.video.transcoder.v1.JobConfigH\x00\x12I\n\x05state\x18\x08 \x01(\x0e\x32\x35.google.cloud.video.transcoder.v1.Job.ProcessingStateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12!\n\x19ttl_after_completion_days\x18\x0f \x01(\x05\x12\x41\n\x06labels\x18\x10 \x03(\x0b\x32\x31.google.cloud.video.transcoder.v1.Job.LabelsEntry\x12&\n\x05\x65rror\x18\x11 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x42\n\x04mode\x18\x14 \x01(\x0e\x32\x34.google.cloud.video.transcoder.v1.Job.ProcessingMode\x12\x1b\n\x13\x62\x61tch_mode_priority\x18\x15 \x01(\x05\x12U\n\x0coptimization\x18\x16 \x01(\x0e\x32:.google.cloud.video.transcoder.v1.Job.OptimizationStrategyB\x03\xe0\x41\x01\x12\x1e\n\x11\x66ill_content_gaps\x18\x19 \x01(\x08\x42\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\"h\n\x0fProcessingState\x12 \n\x1cPROCESSING_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\"m\n\x0eProcessingMode\x12\x1f\n\x1bPROCESSING_MODE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bPROCESSING_MODE_INTERACTIVE\x10\x01\x12\x19\n\x15PROCESSING_MODE_BATCH\x10\x02\"[\n\x14OptimizationStrategy\x12%\n!OPTIMIZATION_STRATEGY_UNSPECIFIED\x10\x00\x12\x0e\n\nAUTODETECT\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02:V\xea\x41S\n\x1dtranscoder.googleapis.com/Job\x12\x32projects/{project}/locations/{location}/jobs/{job}B\x0c\n\njob_config\"\xc3\x02\n\x0bJobTemplate\x12\x0c\n\x04name\x18\x01 \x01(\t\x12;\n\x06\x63onfig\x18\x02 \x01(\x0b\x32+.google.cloud.video.transcoder.v1.JobConfig\x12I\n\x06labels\x18\x03 \x03(\x0b\x32\x39.google.cloud.video.transcoder.v1.JobTemplate.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:o\xea\x41l\n%transcoder.googleapis.com/JobTemplate\x12\x43projects/{project}/locations/{location}/jobTemplates/{job_template}\"\xe3\x05\n\tJobConfig\x12\x37\n\x06inputs\x18\x01 \x03(\x0b\x32\'.google.cloud.video.transcoder.v1.Input\x12=\n\tedit_list\x18\x02 \x03(\x0b\x32*.google.cloud.video.transcoder.v1.EditAtom\x12N\n\x12\x65lementary_streams\x18\x03 \x03(\x0b\x32\x32.google.cloud.video.transcoder.v1.ElementaryStream\x12@\n\x0bmux_streams\x18\x04 \x03(\x0b\x32+.google.cloud.video.transcoder.v1.MuxStream\x12=\n\tmanifests\x18\x05 \x03(\x0b\x32*.google.cloud.video.transcoder.v1.Manifest\x12\x38\n\x06output\x18\x06 \x01(\x0b\x32(.google.cloud.video.transcoder.v1.Output\x12<\n\tad_breaks\x18\x07 \x03(\x0b\x32).google.cloud.video.transcoder.v1.AdBreak\x12O\n\x12pubsub_destination\x18\x08 \x01(\x0b\x32\x33.google.cloud.video.transcoder.v1.PubsubDestination\x12\x44\n\rsprite_sheets\x18\t \x03(\x0b\x32-.google.cloud.video.transcoder.v1.SpriteSheet\x12;\n\x08overlays\x18\n \x03(\x0b\x32).google.cloud.video.transcoder.v1.Overlay\x12\x41\n\x0b\x65ncryptions\x18\x0b \x03(\x0b\x32,.google.cloud.video.transcoder.v1.Encryption\"\xc2\x01\n\x05Input\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12S\n\x14preprocessing_config\x18\x03 \x01(\x0b\x32\x35.google.cloud.video.transcoder.v1.PreprocessingConfig\x12J\n\nattributes\x18\x04 \x01(\x0b\x32\x31.google.cloud.video.transcoder.v1.InputAttributesB\x03\xe0\x41\x01\"\x15\n\x06Output\x12\x0b\n\x03uri\x18\x01 \x01(\t\"\x91\x01\n\x08\x45\x64itAtom\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0e\n\x06inputs\x18\x02 \x03(\t\x12\x32\n\x0f\x65nd_time_offset\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11start_time_offset\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\"?\n\x07\x41\x64\x42reak\x12\x34\n\x11start_time_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x87\x02\n\x10\x45lementaryStream\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x45\n\x0cvideo_stream\x18\x01 \x01(\x0b\x32-.google.cloud.video.transcoder.v1.VideoStreamH\x00\x12\x45\n\x0c\x61udio_stream\x18\x02 \x01(\x0b\x32-.google.cloud.video.transcoder.v1.AudioStreamH\x00\x12\x43\n\x0btext_stream\x18\x03 \x01(\x0b\x32,.google.cloud.video.transcoder.v1.TextStreamH\x00\x42\x13\n\x11\x65lementary_stream\"\xc5\x02\n\tMuxStream\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x11\n\tfile_name\x18\x02 \x01(\t\x12\x11\n\tcontainer\x18\x03 \x01(\t\x12\x1a\n\x12\x65lementary_streams\x18\x04 \x03(\t\x12K\n\x10segment_settings\x18\x05 \x01(\x0b\x32\x31.google.cloud.video.transcoder.v1.SegmentSettings\x12\x15\n\rencryption_id\x18\x07 \x01(\t\x12K\n\x04\x66mp4\x18\x08 \x01(\x0b\x32\x36.google.cloud.video.transcoder.v1.MuxStream.Fmp4ConfigB\x03\xe0\x41\x01H\x00\x1a$\n\nFmp4Config\x12\x16\n\tcodec_tag\x18\x01 \x01(\tB\x03\xe0\x41\x01\x42\x12\n\x10\x63ontainer_config\"\x91\x04\n\x08Manifest\x12\x11\n\tfile_name\x18\x01 \x01(\t\x12J\n\x04type\x18\x02 \x01(\x0e\x32\x37.google.cloud.video.transcoder.v1.Manifest.ManifestTypeB\x03\xe0\x41\x02\x12\x18\n\x0bmux_streams\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12\x45\n\x04\x64\x61sh\x18\x04 \x01(\x0b\x32\x35.google.cloud.video.transcoder.v1.Manifest.DashConfigH\x00\x1a\xef\x01\n\nDashConfig\x12n\n\x18segment_reference_scheme\x18\x01 \x01(\x0e\x32L.google.cloud.video.transcoder.v1.Manifest.DashConfig.SegmentReferenceScheme\"q\n\x16SegmentReferenceScheme\x12(\n$SEGMENT_REFERENCE_SCHEME_UNSPECIFIED\x10\x00\x12\x10\n\x0cSEGMENT_LIST\x10\x01\x12\x1b\n\x17SEGMENT_TEMPLATE_NUMBER\x10\x02\"@\n\x0cManifestType\x12\x1d\n\x19MANIFEST_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03HLS\x10\x01\x12\x08\n\x04\x44\x41SH\x10\x02\x42\x11\n\x0fmanifest_config\"\"\n\x11PubsubDestination\x12\r\n\x05topic\x18\x01 \x01(\t\"\xfd\x02\n\x0bSpriteSheet\x12\x0e\n\x06\x66ormat\x18\x01 \x01(\t\x12\x18\n\x0b\x66ile_prefix\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13sprite_width_pixels\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\x12!\n\x14sprite_height_pixels\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x14\n\x0c\x63olumn_count\x18\x05 \x01(\x05\x12\x11\n\trow_count\x18\x06 \x01(\x05\x12\x34\n\x11start_time_offset\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0f\x65nd_time_offset\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\x0btotal_count\x18\t \x01(\x05H\x00\x12-\n\x08interval\x18\n \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x0f\n\x07quality\x18\x0b \x01(\x05\x42\x15\n\x13\x65xtraction_strategy\"\x8b\t\n\x07Overlay\x12>\n\x05image\x18\x01 \x01(\x0b\x32/.google.cloud.video.transcoder.v1.Overlay.Image\x12G\n\nanimations\x18\x02 \x03(\x0b\x32\x33.google.cloud.video.transcoder.v1.Overlay.Animation\x1a,\n\x14NormalizedCoordinate\x12\t\n\x01x\x18\x01 \x01(\x01\x12\t\n\x01y\x18\x02 \x01(\x01\x1a|\n\x05Image\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\nresolution\x18\x02 \x01(\x0b\x32>.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate\x12\r\n\x05\x61lpha\x18\x03 \x01(\x01\x1a\x93\x01\n\x0f\x41nimationStatic\x12J\n\x02xy\x18\x01 \x01(\x0b\x32>.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate\x12\x34\n\x11start_time_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x91\x02\n\rAnimationFade\x12J\n\tfade_type\x18\x01 \x01(\x0e\x32\x32.google.cloud.video.transcoder.v1.Overlay.FadeTypeB\x03\xe0\x41\x02\x12J\n\x02xy\x18\x02 \x01(\x0b\x32>.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate\x12\x34\n\x11start_time_offset\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0f\x65nd_time_offset\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x44\n\x0c\x41nimationEnd\x12\x34\n\x11start_time_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x98\x02\n\tAnimation\x12U\n\x10\x61nimation_static\x18\x01 \x01(\x0b\x32\x39.google.cloud.video.transcoder.v1.Overlay.AnimationStaticH\x00\x12Q\n\x0e\x61nimation_fade\x18\x02 \x01(\x0b\x32\x37.google.cloud.video.transcoder.v1.Overlay.AnimationFadeH\x00\x12O\n\ranimation_end\x18\x03 \x01(\x0b\x32\x36.google.cloud.video.transcoder.v1.Overlay.AnimationEndH\x00\x42\x10\n\x0e\x61nimation_type\"@\n\x08\x46\x61\x64\x65Type\x12\x19\n\x15\x46\x41\x44\x45_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x46\x41\x44\x45_IN\x10\x01\x12\x0c\n\x08\x46\x41\x44\x45_OUT\x10\x02\"\xf3\n\n\x13PreprocessingConfig\x12J\n\x05\x63olor\x18\x01 \x01(\x0b\x32;.google.cloud.video.transcoder.v1.PreprocessingConfig.Color\x12N\n\x07\x64\x65noise\x18\x02 \x01(\x0b\x32=.google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise\x12N\n\x07\x64\x65\x62lock\x18\x03 \x01(\x0b\x32=.google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock\x12J\n\x05\x61udio\x18\x04 \x01(\x0b\x32;.google.cloud.video.transcoder.v1.PreprocessingConfig.Audio\x12H\n\x04\x63rop\x18\x05 \x01(\x0b\x32:.google.cloud.video.transcoder.v1.PreprocessingConfig.Crop\x12\x46\n\x03pad\x18\x06 \x01(\x0b\x32\x39.google.cloud.video.transcoder.v1.PreprocessingConfig.Pad\x12V\n\x0b\x64\x65interlace\x18\x07 \x01(\x0b\x32\x41.google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace\x1a\x41\n\x05\x43olor\x12\x12\n\nsaturation\x18\x01 \x01(\x01\x12\x10\n\x08\x63ontrast\x18\x02 \x01(\x01\x12\x12\n\nbrightness\x18\x03 \x01(\x01\x1a)\n\x07\x44\x65noise\x12\x10\n\x08strength\x18\x01 \x01(\x01\x12\x0c\n\x04tune\x18\x02 \x01(\t\x1a,\n\x07\x44\x65\x62lock\x12\x10\n\x08strength\x18\x01 \x01(\x01\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\x1a<\n\x05\x41udio\x12\x0c\n\x04lufs\x18\x01 \x01(\x01\x12\x12\n\nhigh_boost\x18\x02 \x01(\x08\x12\x11\n\tlow_boost\x18\x03 \x01(\x08\x1a\\\n\x04\x43rop\x12\x12\n\ntop_pixels\x18\x01 \x01(\x05\x12\x15\n\rbottom_pixels\x18\x02 \x01(\x05\x12\x13\n\x0bleft_pixels\x18\x03 \x01(\x05\x12\x14\n\x0cright_pixels\x18\x04 \x01(\x05\x1a[\n\x03Pad\x12\x12\n\ntop_pixels\x18\x01 \x01(\x05\x12\x15\n\rbottom_pixels\x18\x02 \x01(\x05\x12\x13\n\x0bleft_pixels\x18\x03 \x01(\x05\x12\x14\n\x0cright_pixels\x18\x04 \x01(\x05\x1a\xa4\x03\n\x0b\x44\x65interlace\x12^\n\x05yadif\x18\x01 \x01(\x0b\x32M.google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.YadifConfigH\x00\x12^\n\x05\x62wdif\x18\x02 \x01(\x0b\x32M.google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.BwdifConfigH\x00\x1ap\n\x0bYadifConfig\x12\x0c\n\x04mode\x18\x01 \x01(\t\x12#\n\x1b\x64isable_spatial_interlacing\x18\x02 \x01(\x08\x12\x0e\n\x06parity\x18\x03 \x01(\t\x12\x1e\n\x16\x64\x65interlace_all_frames\x18\x04 \x01(\x08\x1aK\n\x0b\x42wdifConfig\x12\x0c\n\x04mode\x18\x01 \x01(\t\x12\x0e\n\x06parity\x18\x02 \x01(\t\x12\x1e\n\x16\x64\x65interlace_all_frames\x18\x03 \x01(\x08\x42\x16\n\x14\x64\x65interlacing_filter\"\x93\x01\n\x0fTrackDefinition\x12\x18\n\x0binput_track\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x16\n\tlanguages\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x64\x65tect_languages\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12\x64\x65tected_languages\x18\x04 \x03(\tB\x03\xe0\x41\x03\x42\x0e\n\x0c_input_track\"d\n\x0fInputAttributes\x12Q\n\x11track_definitions\x18\x01 \x03(\x0b\x32\x31.google.cloud.video.transcoder.v1.TrackDefinitionB\x03\xe0\x41\x01\"\x96\x16\n\x0bVideoStream\x12O\n\x04h264\x18\x01 \x01(\x0b\x32?.google.cloud.video.transcoder.v1.VideoStream.H264CodecSettingsH\x00\x12O\n\x04h265\x18\x02 \x01(\x0b\x32?.google.cloud.video.transcoder.v1.VideoStream.H265CodecSettingsH\x00\x12M\n\x03vp9\x18\x03 \x01(\x0b\x32>.google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettingsH\x00\x1a\x14\n\x12H264ColorFormatSDR\x1a\x14\n\x12H264ColorFormatHLG\x1a\xad\x06\n\x11H264CodecSettings\x12\x14\n\x0cwidth_pixels\x18\x01 \x01(\x05\x12\x15\n\rheight_pixels\x18\x02 \x01(\x05\x12\x17\n\nframe_rate\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\x12v\n\x1e\x66rame_rate_conversion_strategy\x18\x17 \x01(\x0e\x32I.google.cloud.video.transcoder.v1.VideoStream.FrameRateConversionStrategyB\x03\xe0\x41\x01\x12\x18\n\x0b\x62itrate_bps\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x14\n\x0cpixel_format\x18\x05 \x01(\t\x12\x19\n\x11rate_control_mode\x18\x06 \x01(\t\x12\x11\n\tcrf_level\x18\x07 \x01(\x05\x12\x16\n\x0e\x61llow_open_gop\x18\x08 \x01(\x08\x12\x19\n\x0fgop_frame_count\x18\t \x01(\x05H\x00\x12\x31\n\x0cgop_duration\x18\n \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x17\n\x0f\x65nable_two_pass\x18\x0b \x01(\x08\x12\x15\n\rvbv_size_bits\x18\x0c \x01(\x05\x12\x19\n\x11vbv_fullness_bits\x18\r \x01(\x05\x12\x15\n\rentropy_coder\x18\x0e \x01(\t\x12\x11\n\tb_pyramid\x18\x0f \x01(\x08\x12\x15\n\rb_frame_count\x18\x10 \x01(\x05\x12\x13\n\x0b\x61q_strength\x18\x11 \x01(\x01\x12\x0f\n\x07profile\x18\x12 \x01(\t\x12\x0c\n\x04tune\x18\x13 \x01(\t\x12\x0e\n\x06preset\x18\x14 \x01(\t\x12T\n\x03sdr\x18\x15 \x01(\x0b\x32@.google.cloud.video.transcoder.v1.VideoStream.H264ColorFormatSDRB\x03\xe0\x41\x01H\x01\x12T\n\x03hlg\x18\x16 \x01(\x0b\x32@.google.cloud.video.transcoder.v1.VideoStream.H264ColorFormatHLGB\x03\xe0\x41\x01H\x01\x42\n\n\x08gop_modeB\x0e\n\x0c\x63olor_format\x1a\x14\n\x12H265ColorFormatSDR\x1a\x14\n\x12H265ColorFormatHLG\x1a\x16\n\x14H265ColorFormatHDR10\x1a\xf0\x06\n\x11H265CodecSettings\x12\x14\n\x0cwidth_pixels\x18\x01 \x01(\x05\x12\x15\n\rheight_pixels\x18\x02 \x01(\x05\x12\x17\n\nframe_rate\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\x12v\n\x1e\x66rame_rate_conversion_strategy\x18\x17 \x01(\x0e\x32I.google.cloud.video.transcoder.v1.VideoStream.FrameRateConversionStrategyB\x03\xe0\x41\x01\x12\x18\n\x0b\x62itrate_bps\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x14\n\x0cpixel_format\x18\x05 \x01(\t\x12\x19\n\x11rate_control_mode\x18\x06 \x01(\t\x12\x11\n\tcrf_level\x18\x07 \x01(\x05\x12\x16\n\x0e\x61llow_open_gop\x18\x08 \x01(\x08\x12\x19\n\x0fgop_frame_count\x18\t \x01(\x05H\x00\x12\x31\n\x0cgop_duration\x18\n \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x17\n\x0f\x65nable_two_pass\x18\x0b \x01(\x08\x12\x15\n\rvbv_size_bits\x18\x0c \x01(\x05\x12\x19\n\x11vbv_fullness_bits\x18\r \x01(\x05\x12\x11\n\tb_pyramid\x18\x0e \x01(\x08\x12\x15\n\rb_frame_count\x18\x0f \x01(\x05\x12\x13\n\x0b\x61q_strength\x18\x10 \x01(\x01\x12\x0f\n\x07profile\x18\x11 \x01(\t\x12\x0c\n\x04tune\x18\x12 \x01(\t\x12\x0e\n\x06preset\x18\x13 \x01(\t\x12T\n\x03sdr\x18\x14 \x01(\x0b\x32@.google.cloud.video.transcoder.v1.VideoStream.H265ColorFormatSDRB\x03\xe0\x41\x01H\x01\x12T\n\x03hlg\x18\x15 \x01(\x0b\x32@.google.cloud.video.transcoder.v1.VideoStream.H265ColorFormatHLGB\x03\xe0\x41\x01H\x01\x12X\n\x05hdr10\x18\x16 \x01(\x0b\x32\x42.google.cloud.video.transcoder.v1.VideoStream.H265ColorFormatHDR10B\x03\xe0\x41\x01H\x01\x42\n\n\x08gop_modeB\x0e\n\x0c\x63olor_format\x1a\x13\n\x11Vp9ColorFormatSDR\x1a\x13\n\x11Vp9ColorFormatHLG\x1a\xd3\x04\n\x10Vp9CodecSettings\x12\x14\n\x0cwidth_pixels\x18\x01 \x01(\x05\x12\x15\n\rheight_pixels\x18\x02 \x01(\x05\x12\x17\n\nframe_rate\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\x12v\n\x1e\x66rame_rate_conversion_strategy\x18\r \x01(\x0e\x32I.google.cloud.video.transcoder.v1.VideoStream.FrameRateConversionStrategyB\x03\xe0\x41\x01\x12\x18\n\x0b\x62itrate_bps\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x14\n\x0cpixel_format\x18\x05 \x01(\t\x12\x19\n\x11rate_control_mode\x18\x06 \x01(\t\x12\x11\n\tcrf_level\x18\x07 \x01(\x05\x12\x19\n\x0fgop_frame_count\x18\x08 \x01(\x05H\x00\x12\x31\n\x0cgop_duration\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x0f\n\x07profile\x18\n \x01(\t\x12S\n\x03sdr\x18\x0b \x01(\x0b\x32?.google.cloud.video.transcoder.v1.VideoStream.Vp9ColorFormatSDRB\x03\xe0\x41\x01H\x01\x12S\n\x03hlg\x18\x0c \x01(\x0b\x32?.google.cloud.video.transcoder.v1.VideoStream.Vp9ColorFormatHLGB\x03\xe0\x41\x01H\x01\x42\n\n\x08gop_modeB\x0e\n\x0c\x63olor_format\"q\n\x1b\x46rameRateConversionStrategy\x12.\n*FRAME_RATE_CONVERSION_STRATEGY_UNSPECIFIED\x10\x00\x12\x0e\n\nDOWNSAMPLE\x10\x01\x12\x12\n\x0e\x44ROP_DUPLICATE\x10\x02\x42\x10\n\x0e\x63odec_settings\"\x9e\x03\n\x0b\x41udioStream\x12\r\n\x05\x63odec\x18\x01 \x01(\t\x12\x18\n\x0b\x62itrate_bps\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12\x15\n\rchannel_count\x18\x03 \x01(\x05\x12\x16\n\x0e\x63hannel_layout\x18\x04 \x03(\t\x12K\n\x07mapping\x18\x05 \x03(\x0b\x32:.google.cloud.video.transcoder.v1.AudioStream.AudioMapping\x12\x19\n\x11sample_rate_hertz\x18\x06 \x01(\x05\x12\x15\n\rlanguage_code\x18\x07 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x08 \x01(\t\x1a\xa1\x01\n\x0c\x41udioMapping\x12\x15\n\x08\x61tom_key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tinput_key\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0binput_track\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1a\n\rinput_channel\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1b\n\x0eoutput_channel\x18\x05 \x01(\x05\x42\x03\xe0\x41\x02\x12\x0f\n\x07gain_db\x18\x06 \x01(\x01\"\xeb\x01\n\nTextStream\x12\r\n\x05\x63odec\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\t\x12I\n\x07mapping\x18\x03 \x03(\x0b\x32\x38.google.cloud.video.transcoder.v1.TextStream.TextMapping\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\t\x1aV\n\x0bTextMapping\x12\x15\n\x08\x61tom_key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tinput_key\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0binput_track\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\"h\n\x0fSegmentSettings\x12\x33\n\x10segment_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12 \n\x13individual_segments\x18\x03 \x01(\x08\x42\x03\xe0\x41\x02\"\xef\x07\n\nEncryption\x12\x0f\n\x02id\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12P\n\x07\x61\x65s_128\x18\x03 \x01(\x0b\x32=.google.cloud.video.transcoder.v1.Encryption.Aes128EncryptionH\x00\x12V\n\nsample_aes\x18\x04 \x01(\x0b\x32@.google.cloud.video.transcoder.v1.Encryption.SampleAesEncryptionH\x00\x12V\n\tmpeg_cenc\x18\x05 \x01(\x0b\x32\x41.google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryptionH\x00\x12\x65\n\x19secret_manager_key_source\x18\x07 \x01(\x0b\x32@.google.cloud.video.transcoder.v1.Encryption.SecretManagerSourceH\x01\x12Q\n\x0b\x64rm_systems\x18\x08 \x01(\x0b\x32\x37.google.cloud.video.transcoder.v1.Encryption.DrmSystemsB\x03\xe0\x41\x02\x1a\x12\n\x10\x41\x65s128Encryption\x1a\x15\n\x13SampleAesEncryption\x1a+\n\x14MpegCommonEncryption\x12\x13\n\x06scheme\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\x32\n\x13SecretManagerSource\x12\x1b\n\x0esecret_version\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\n\n\x08Widevine\x1a\n\n\x08\x46\x61irplay\x1a\x0b\n\tPlayready\x1a\n\n\x08\x43learkey\x1a\xb2\x02\n\nDrmSystems\x12G\n\x08widevine\x18\x01 \x01(\x0b\x32\x35.google.cloud.video.transcoder.v1.Encryption.Widevine\x12G\n\x08\x66\x61irplay\x18\x02 \x01(\x0b\x32\x35.google.cloud.video.transcoder.v1.Encryption.Fairplay\x12I\n\tplayready\x18\x03 \x01(\x0b\x32\x36.google.cloud.video.transcoder.v1.Encryption.Playready\x12G\n\x08\x63learkey\x18\x04 \x01(\x0b\x32\x35.google.cloud.video.transcoder.v1.Encryption.ClearkeyB\x11\n\x0f\x65ncryption_modeB\x0f\n\rsecret_sourceB~\n$com.google.cloud.video.transcoder.v1B\x0eResourcesProtoP\x01ZDcloud.google.com/go/video/transcoder/apiv1/transcoderpb;transcoderpbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Video - module Transcoder - module V1 - Job = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Job").msgclass - Job::ProcessingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Job.ProcessingState").enummodule - Job::ProcessingMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Job.ProcessingMode").enummodule - Job::OptimizationStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Job.OptimizationStrategy").enummodule - JobTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.JobTemplate").msgclass - JobConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.JobConfig").msgclass - Input = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Input").msgclass - Output = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Output").msgclass - EditAtom = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.EditAtom").msgclass - AdBreak = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.AdBreak").msgclass - ElementaryStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.ElementaryStream").msgclass - MuxStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.MuxStream").msgclass - MuxStream::Fmp4Config = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.MuxStream.Fmp4Config").msgclass - Manifest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Manifest").msgclass - Manifest::DashConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Manifest.DashConfig").msgclass - Manifest::DashConfig::SegmentReferenceScheme = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Manifest.DashConfig.SegmentReferenceScheme").enummodule - Manifest::ManifestType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Manifest.ManifestType").enummodule - PubsubDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.PubsubDestination").msgclass - SpriteSheet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.SpriteSheet").msgclass - Overlay = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Overlay").msgclass - Overlay::NormalizedCoordinate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate").msgclass - Overlay::Image = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Overlay.Image").msgclass - Overlay::AnimationStatic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Overlay.AnimationStatic").msgclass - Overlay::AnimationFade = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Overlay.AnimationFade").msgclass - Overlay::AnimationEnd = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Overlay.AnimationEnd").msgclass - Overlay::Animation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Overlay.Animation").msgclass - Overlay::FadeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Overlay.FadeType").enummodule - PreprocessingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.PreprocessingConfig").msgclass - PreprocessingConfig::Color = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.PreprocessingConfig.Color").msgclass - PreprocessingConfig::Denoise = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise").msgclass - PreprocessingConfig::Deblock = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock").msgclass - PreprocessingConfig::Audio = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.PreprocessingConfig.Audio").msgclass - PreprocessingConfig::Crop = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.PreprocessingConfig.Crop").msgclass - PreprocessingConfig::Pad = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.PreprocessingConfig.Pad").msgclass - PreprocessingConfig::Deinterlace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace").msgclass - PreprocessingConfig::Deinterlace::YadifConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.YadifConfig").msgclass - PreprocessingConfig::Deinterlace::BwdifConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.BwdifConfig").msgclass - TrackDefinition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.TrackDefinition").msgclass - InputAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.InputAttributes").msgclass - VideoStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream").msgclass - VideoStream::H264ColorFormatSDR = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.H264ColorFormatSDR").msgclass - VideoStream::H264ColorFormatHLG = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.H264ColorFormatHLG").msgclass - VideoStream::H264CodecSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings").msgclass - VideoStream::H265ColorFormatSDR = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.H265ColorFormatSDR").msgclass - VideoStream::H265ColorFormatHLG = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.H265ColorFormatHLG").msgclass - VideoStream::H265ColorFormatHDR10 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.H265ColorFormatHDR10").msgclass - VideoStream::H265CodecSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings").msgclass - VideoStream::Vp9ColorFormatSDR = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.Vp9ColorFormatSDR").msgclass - VideoStream::Vp9ColorFormatHLG = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.Vp9ColorFormatHLG").msgclass - VideoStream::Vp9CodecSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings").msgclass - VideoStream::FrameRateConversionStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.VideoStream.FrameRateConversionStrategy").enummodule - AudioStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.AudioStream").msgclass - AudioStream::AudioMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.AudioStream.AudioMapping").msgclass - TextStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.TextStream").msgclass - TextStream::TextMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.TextStream.TextMapping").msgclass - SegmentSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.SegmentSettings").msgclass - Encryption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Encryption").msgclass - Encryption::Aes128Encryption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Encryption.Aes128Encryption").msgclass - Encryption::SampleAesEncryption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption").msgclass - Encryption::MpegCommonEncryption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption").msgclass - Encryption::SecretManagerSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Encryption.SecretManagerSource").msgclass - Encryption::Widevine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Encryption.Widevine").msgclass - Encryption::Fairplay = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Encryption.Fairplay").msgclass - Encryption::Playready = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Encryption.Playready").msgclass - Encryption::Clearkey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Encryption.Clearkey").msgclass - Encryption::DrmSystems = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.Encryption.DrmSystems").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/rest.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/rest.rb deleted file mode 100644 index 33b964a4549d..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/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/video/transcoder/v1/transcoder_service/rest" -require "google/cloud/video/transcoder/v1/version" - -module Google - module Cloud - module Video - module Transcoder - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/video/transcoder/v1/rest" - # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/services_pb.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/services_pb.rb deleted file mode 100644 index aa0933efd6fe..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/services_pb.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/video/transcoder/v1/services.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/video/transcoder/v1/resources_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n/google/cloud/video/transcoder/v1/services.proto\x12 google.cloud.video.transcoder.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/video/transcoder/v1/resources.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x86\x01\n\x10\x43reateJobRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x37\n\x03job\x18\x02 \x01(\x0b\x32%.google.cloud.video.transcoder.v1.JobB\x03\xe0\x41\x02\"\x95\x01\n\x0fListJobsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\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\"D\n\rGetJobRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dtranscoder.googleapis.com/Job\"^\n\x10\x44\x65leteJobRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dtranscoder.googleapis.com/Job\x12\x15\n\rallow_missing\x18\x02 \x01(\x08\"u\n\x10ListJobsResponse\x12\x33\n\x04jobs\x18\x01 \x03(\x0b\x32%.google.cloud.video.transcoder.v1.Job\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xbd\x01\n\x18\x43reateJobTemplateRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12H\n\x0cjob_template\x18\x02 \x01(\x0b\x32-.google.cloud.video.transcoder.v1.JobTemplateB\x03\xe0\x41\x02\x12\x1c\n\x0fjob_template_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x9d\x01\n\x17ListJobTemplatesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\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\"T\n\x15GetJobTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%transcoder.googleapis.com/JobTemplate\"n\n\x18\x44\x65leteJobTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%transcoder.googleapis.com/JobTemplate\x12\x15\n\rallow_missing\x18\x02 \x01(\x08\"\x8e\x01\n\x18ListJobTemplatesResponse\x12\x44\n\rjob_templates\x18\x01 \x03(\x0b\x32-.google.cloud.video.transcoder.v1.JobTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t2\x92\x0c\n\x11TranscoderService\x12\xaa\x01\n\tCreateJob\x12\x32.google.cloud.video.transcoder.v1.CreateJobRequest\x1a%.google.cloud.video.transcoder.v1.Job\"B\xda\x41\nparent,job\x82\xd3\xe4\x93\x02/\"(/v1/{parent=projects/*/locations/*}/jobs:\x03job\x12\xac\x01\n\x08ListJobs\x12\x31.google.cloud.video.transcoder.v1.ListJobsRequest\x1a\x32.google.cloud.video.transcoder.v1.ListJobsResponse\"9\xda\x41\x06parent\x82\xd3\xe4\x93\x02*\x12(/v1/{parent=projects/*/locations/*}/jobs\x12\x99\x01\n\x06GetJob\x12/.google.cloud.video.transcoder.v1.GetJobRequest\x1a%.google.cloud.video.transcoder.v1.Job\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v1/{name=projects/*/locations/*/jobs/*}\x12\x90\x01\n\tDeleteJob\x12\x32.google.cloud.video.transcoder.v1.DeleteJobRequest\x1a\x16.google.protobuf.Empty\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02**(/v1/{name=projects/*/locations/*/jobs/*}\x12\xec\x01\n\x11\x43reateJobTemplate\x12:.google.cloud.video.transcoder.v1.CreateJobTemplateRequest\x1a-.google.cloud.video.transcoder.v1.JobTemplate\"l\xda\x41#parent,job_template,job_template_id\x82\xd3\xe4\x93\x02@\"0/v1/{parent=projects/*/locations/*}/jobTemplates:\x0cjob_template\x12\xcc\x01\n\x10ListJobTemplates\x12\x39.google.cloud.video.transcoder.v1.ListJobTemplatesRequest\x1a:.google.cloud.video.transcoder.v1.ListJobTemplatesResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/jobTemplates\x12\xb9\x01\n\x0eGetJobTemplate\x12\x37.google.cloud.video.transcoder.v1.GetJobTemplateRequest\x1a-.google.cloud.video.transcoder.v1.JobTemplate\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/jobTemplates/*}\x12\xa8\x01\n\x11\x44\x65leteJobTemplate\x12:.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest\x1a\x16.google.protobuf.Empty\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/locations/*/jobTemplates/*}\x1aM\xca\x41\x19transcoder.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xea\x01\n$com.google.cloud.video.transcoder.v1B\rServicesProtoP\x01ZDcloud.google.com/go/video/transcoder/apiv1/transcoderpb;transcoderpb\xaa\x02 Google.Cloud.Video.Transcoder.V1\xca\x02 Google\\Cloud\\Video\\Transcoder\\V1\xea\x02$Google::Cloud::Video::Transcoder::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Video - module Transcoder - module V1 - CreateJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.CreateJobRequest").msgclass - ListJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.ListJobsRequest").msgclass - GetJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.GetJobRequest").msgclass - DeleteJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.DeleteJobRequest").msgclass - ListJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.ListJobsResponse").msgclass - CreateJobTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.CreateJobTemplateRequest").msgclass - ListJobTemplatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.ListJobTemplatesRequest").msgclass - GetJobTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.GetJobTemplateRequest").msgclass - DeleteJobTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.DeleteJobTemplateRequest").msgclass - ListJobTemplatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.video.transcoder.v1.ListJobTemplatesResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/services_services_pb.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/services_services_pb.rb deleted file mode 100644 index f71f55e3383f..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/services_services_pb.rb +++ /dev/null @@ -1,66 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/video/transcoder/v1/services.proto for package 'Google.Cloud.Video.Transcoder.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/video/transcoder/v1/services_pb' - -module Google - module Cloud - module Video - module Transcoder - module V1 - module TranscoderService - # Using the Transcoder API, you can queue asynchronous jobs for transcoding - # media into various output formats. Output formats may include different - # streaming standards such as HTTP Live Streaming (HLS) and Dynamic Adaptive - # Streaming over HTTP (DASH). You can also customize jobs using advanced - # features such as Digital Rights Management (DRM), audio equalization, content - # concatenation, and digital ad-stitch ready content generation. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.video.transcoder.v1.TranscoderService' - - # Creates a job in the specified region. - rpc :CreateJob, ::Google::Cloud::Video::Transcoder::V1::CreateJobRequest, ::Google::Cloud::Video::Transcoder::V1::Job - # Lists jobs in the specified region. - rpc :ListJobs, ::Google::Cloud::Video::Transcoder::V1::ListJobsRequest, ::Google::Cloud::Video::Transcoder::V1::ListJobsResponse - # Returns the job data. - rpc :GetJob, ::Google::Cloud::Video::Transcoder::V1::GetJobRequest, ::Google::Cloud::Video::Transcoder::V1::Job - # Deletes a job. - rpc :DeleteJob, ::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest, ::Google::Protobuf::Empty - # Creates a job template in the specified region. - rpc :CreateJobTemplate, ::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest, ::Google::Cloud::Video::Transcoder::V1::JobTemplate - # Lists job templates in the specified region. - rpc :ListJobTemplates, ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest, ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesResponse - # Returns the job template data. - rpc :GetJobTemplate, ::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest, ::Google::Cloud::Video::Transcoder::V1::JobTemplate - # Deletes a job template. - rpc :DeleteJobTemplate, ::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service.rb deleted file mode 100644 index c168f1bf53ac..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/video/transcoder/v1/version" - -require "google/cloud/video/transcoder/v1/transcoder_service/credentials" -require "google/cloud/video/transcoder/v1/transcoder_service/paths" -require "google/cloud/video/transcoder/v1/transcoder_service/client" -require "google/cloud/video/transcoder/v1/transcoder_service/rest" - -module Google - module Cloud - module Video - module Transcoder - module V1 - ## - # Using the Transcoder API, you can queue asynchronous jobs for transcoding - # media into various output formats. Output formats may include different - # streaming standards such as HTTP Live Streaming (HLS) and Dynamic Adaptive - # Streaming over HTTP (DASH). You can also customize jobs using advanced - # features such as Digital Rights Management (DRM), audio equalization, content - # concatenation, and digital ad-stitch ready content generation. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/video/transcoder/v1/transcoder_service" - # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/video/transcoder/v1/transcoder_service/rest" - # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new - # - module TranscoderService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "transcoder_service", "helpers.rb" -require "google/cloud/video/transcoder/v1/transcoder_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/client.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/client.rb deleted file mode 100644 index 4add10a8b4aa..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/client.rb +++ /dev/null @@ -1,1211 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/video/transcoder/v1/services_pb" - -module Google - module Cloud - module Video - module Transcoder - module V1 - module TranscoderService - ## - # Client for the TranscoderService service. - # - # Using the Transcoder API, you can queue asynchronous jobs for transcoding - # media into various output formats. Output formats may include different - # streaming standards such as HTTP Live Streaming (HLS) and Dynamic Adaptive - # Streaming over HTTP (DASH). You can also customize jobs using advanced - # features such as Digital Rights Management (DRM), audio equalization, content - # concatenation, and digital ad-stitch ready content generation. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "transcoder.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :transcoder_service_stub - - ## - # Configure the TranscoderService Client class. - # - # See {::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TranscoderService clients - # ::Google::Cloud::Video::Transcoder::V1::TranscoderService::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", "Video", "Transcoder", "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_job.timeout = 60.0 - - default_config.rpcs.list_jobs.timeout = 60.0 - default_config.rpcs.list_jobs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_job.timeout = 60.0 - default_config.rpcs.get_job.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_job.timeout = 60.0 - - default_config.rpcs.create_job_template.timeout = 60.0 - - default_config.rpcs.list_job_templates.timeout = 60.0 - default_config.rpcs.list_job_templates.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_job_template.timeout = 60.0 - default_config.rpcs.get_job_template.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_job_template.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TranscoderService 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::Video::Transcoder::V1::TranscoderService::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 - @transcoder_service_stub.universe_domain - end - - ## - # Create a new TranscoderService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TranscoderService 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/video/transcoder/v1/services_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 - - @transcoder_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Video::Transcoder::V1::TranscoderService::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 - ) - - @transcoder_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 - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @transcoder_service_stub.logger - end - - # Service calls - - ## - # Creates a job in the specified region. - # - # @overload create_job(request, options = nil) - # Pass arguments to `create_job` via a request object, either of type - # {::Google::Cloud::Video::Transcoder::V1::CreateJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Transcoder::V1::CreateJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_job(parent: nil, job: nil) - # Pass arguments to `create_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent location to create and process this job. - # Format: `projects/{project}/locations/{location}` - # @param job [::Google::Cloud::Video::Transcoder::V1::Job, ::Hash] - # Required. Parameters for creating transcoding job. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Video::Transcoder::V1::Job] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Video::Transcoder::V1::Job] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/transcoder/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Transcoder::V1::CreateJobRequest.new - # - # # Call the create_job method. - # result = client.create_job request - # - # # The returned object is of type Google::Cloud::Video::Transcoder::V1::Job. - # p result - # - def create_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::CreateJobRequest - - # Converts hash and nil to 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_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @transcoder_service_stub.call_rpc :create_job, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists jobs in the specified region. - # - # @overload list_jobs(request, options = nil) - # Pass arguments to `list_jobs` via a request object, either of type - # {::Google::Cloud::Video::Transcoder::V1::ListJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Transcoder::V1::ListJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Format: `projects/{project}/locations/{location}` - # @param page_size [::Integer] - # The maximum number of items to return. - # @param page_token [::String] - # The `next_page_token` value returned from a previous List request, if - # any. - # @param filter [::String] - # The filter expression, following the syntax outlined in - # https://google.aip.dev/160. - # @param order_by [::String] - # One or more fields to compare and use to sort the output. - # See https://google.aip.dev/132#ordering. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Transcoder::V1::Job>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Transcoder::V1::Job>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/transcoder/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Transcoder::V1::ListJobsRequest.new - # - # # Call the list_jobs method. - # result = client.list_jobs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Video::Transcoder::V1::Job. - # p item - # end - # - def list_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::ListJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_jobs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_jobs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @transcoder_service_stub.call_rpc :list_jobs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @transcoder_service_stub, :list_jobs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the job data. - # - # @overload get_job(request, options = nil) - # Pass arguments to `get_job` via a request object, either of type - # {::Google::Cloud::Video::Transcoder::V1::GetJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Transcoder::V1::GetJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_job(name: nil) - # Pass arguments to `get_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the job to retrieve. - # Format: `projects/{project}/locations/{location}/jobs/{job}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Video::Transcoder::V1::Job] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Video::Transcoder::V1::Job] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/transcoder/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Transcoder::V1::GetJobRequest.new - # - # # Call the get_job method. - # result = client.get_job request - # - # # The returned object is of type Google::Cloud::Video::Transcoder::V1::Job. - # p result - # - def get_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::GetJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @transcoder_service_stub.call_rpc :get_job, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a job. - # - # @overload delete_job(request, options = nil) - # Pass arguments to `delete_job` via a request object, either of type - # {::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_job(name: nil, allow_missing: nil) - # Pass arguments to `delete_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the job to delete. - # Format: `projects/{project}/locations/{location}/jobs/{job}` - # @param allow_missing [::Boolean] - # If set to true, and the job is not found, the request will succeed but no - # action will be taken on the server. - # - # @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/video/transcoder/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Transcoder::V1::DeleteJobRequest.new - # - # # Call the delete_job method. - # result = client.delete_job request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest - - # Converts hash and nil to 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_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @transcoder_service_stub.call_rpc :delete_job, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a job template in the specified region. - # - # @overload create_job_template(request, options = nil) - # Pass arguments to `create_job_template` via a request object, either of type - # {::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_job_template(parent: nil, job_template: nil, job_template_id: nil) - # Pass arguments to `create_job_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 location to create this job template. - # Format: `projects/{project}/locations/{location}` - # @param job_template [::Google::Cloud::Video::Transcoder::V1::JobTemplate, ::Hash] - # Required. Parameters for creating job template. - # @param job_template_id [::String] - # Required. The ID to use for the job template, which will become the final - # component of the job template's resource name. - # - # This value should be 4-63 characters, and valid characters must match the - # regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Video::Transcoder::V1::JobTemplate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Video::Transcoder::V1::JobTemplate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/transcoder/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest.new - # - # # Call the create_job_template method. - # result = client.create_job_template request - # - # # The returned object is of type Google::Cloud::Video::Transcoder::V1::JobTemplate. - # p result - # - def create_job_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest - - # Converts hash and nil to 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_job_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_job_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_job_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @transcoder_service_stub.call_rpc :create_job_template, request, 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 job templates in the specified region. - # - # @overload list_job_templates(request, options = nil) - # Pass arguments to `list_job_templates` via a request object, either of type - # {::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_job_templates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_job_templates` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 location from which to retrieve the collection of job - # templates. Format: `projects/{project}/locations/{location}` - # @param page_size [::Integer] - # The maximum number of items to return. - # @param page_token [::String] - # The `next_page_token` value returned from a previous List request, if - # any. - # @param filter [::String] - # The filter expression, following the syntax outlined in - # https://google.aip.dev/160. - # @param order_by [::String] - # One or more fields to compare and use to sort the output. - # See https://google.aip.dev/132#ordering. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Transcoder::V1::JobTemplate>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Transcoder::V1::JobTemplate>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/transcoder/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest.new - # - # # Call the list_job_templates method. - # result = client.list_job_templates request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Video::Transcoder::V1::JobTemplate. - # p item - # end - # - def list_job_templates request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_job_templates.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_job_templates.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_job_templates.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @transcoder_service_stub.call_rpc :list_job_templates, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @transcoder_service_stub, :list_job_templates, 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 the job template data. - # - # @overload get_job_template(request, options = nil) - # Pass arguments to `get_job_template` via a request object, either of type - # {::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_job_template(name: nil) - # Pass arguments to `get_job_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 job template to retrieve. - # Format: - # `projects/{project}/locations/{location}/jobTemplates/{job_template}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Video::Transcoder::V1::JobTemplate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Video::Transcoder::V1::JobTemplate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video/transcoder/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest.new - # - # # Call the get_job_template method. - # result = client.get_job_template request - # - # # The returned object is of type Google::Cloud::Video::Transcoder::V1::JobTemplate. - # p result - # - def get_job_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_job_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_job_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_job_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @transcoder_service_stub.call_rpc :get_job_template, request, 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 job template. - # - # @overload delete_job_template(request, options = nil) - # Pass arguments to `delete_job_template` via a request object, either of type - # {::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_job_template(name: nil, allow_missing: nil) - # Pass arguments to `delete_job_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 job template to delete. - # `projects/{project}/locations/{location}/jobTemplates/{job_template}` - # @param allow_missing [::Boolean] - # If set to true, and the job template is not found, the request will succeed - # but no action will be taken on the server. - # - # @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/video/transcoder/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest.new - # - # # Call the delete_job_template method. - # result = client.delete_job_template request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_job_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest - - # Converts hash and nil to 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_job_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_job_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_job_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @transcoder_service_stub.call_rpc :delete_job_template, request, 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 TranscoderService API. - # - # This class represents the configuration for TranscoderService, - # 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::Video::Transcoder::V1::TranscoderService::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_job to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_job.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_job.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::Video::Transcoder::V1::TranscoderService::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 = "transcoder.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 TranscoderService 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_job` - # @return [::Gapic::Config::Method] - # - attr_reader :create_job - ## - # RPC-specific configuration for `list_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_jobs - ## - # RPC-specific configuration for `get_job` - # @return [::Gapic::Config::Method] - # - attr_reader :get_job - ## - # RPC-specific configuration for `delete_job` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_job - ## - # RPC-specific configuration for `create_job_template` - # @return [::Gapic::Config::Method] - # - attr_reader :create_job_template - ## - # RPC-specific configuration for `list_job_templates` - # @return [::Gapic::Config::Method] - # - attr_reader :list_job_templates - ## - # RPC-specific configuration for `get_job_template` - # @return [::Gapic::Config::Method] - # - attr_reader :get_job_template - ## - # RPC-specific configuration for `delete_job_template` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_job_template - - # @private - def initialize parent_rpcs = nil - create_job_config = parent_rpcs.create_job if parent_rpcs.respond_to? :create_job - @create_job = ::Gapic::Config::Method.new create_job_config - list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs - @list_jobs = ::Gapic::Config::Method.new list_jobs_config - get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job - @get_job = ::Gapic::Config::Method.new get_job_config - delete_job_config = parent_rpcs.delete_job if parent_rpcs.respond_to? :delete_job - @delete_job = ::Gapic::Config::Method.new delete_job_config - create_job_template_config = parent_rpcs.create_job_template if parent_rpcs.respond_to? :create_job_template - @create_job_template = ::Gapic::Config::Method.new create_job_template_config - list_job_templates_config = parent_rpcs.list_job_templates if parent_rpcs.respond_to? :list_job_templates - @list_job_templates = ::Gapic::Config::Method.new list_job_templates_config - get_job_template_config = parent_rpcs.get_job_template if parent_rpcs.respond_to? :get_job_template - @get_job_template = ::Gapic::Config::Method.new get_job_template_config - delete_job_template_config = parent_rpcs.delete_job_template if parent_rpcs.respond_to? :delete_job_template - @delete_job_template = ::Gapic::Config::Method.new delete_job_template_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/credentials.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/credentials.rb deleted file mode 100644 index 19b2f1cfdb4a..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/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 Video - module Transcoder - module V1 - module TranscoderService - # Credentials for the TranscoderService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "TRANSCODER_CREDENTIALS", - "TRANSCODER_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "TRANSCODER_CREDENTIALS_JSON", - "TRANSCODER_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-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/paths.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/paths.rb deleted file mode 100644 index 905796280879..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/paths.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 Video - module Transcoder - module V1 - module TranscoderService - # Path helper methods for the TranscoderService API. - module Paths - ## - # Create a fully-qualified Job resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/jobs/{job}` - # - # @param project [String] - # @param location [String] - # @param job [String] - # - # @return [::String] - def job_path project:, location:, job: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/jobs/#{job}" - end - - ## - # Create a fully-qualified JobTemplate resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/jobTemplates/{job_template}` - # - # @param project [String] - # @param location [String] - # @param job_template [String] - # - # @return [::String] - def job_template_path project:, location:, job_template: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/jobTemplates/#{job_template}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/rest.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/rest.rb deleted file mode 100644 index cb501da2f910..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_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/video/transcoder/v1/version" - -require "google/cloud/video/transcoder/v1/transcoder_service/credentials" -require "google/cloud/video/transcoder/v1/transcoder_service/paths" -require "google/cloud/video/transcoder/v1/transcoder_service/rest/client" - -module Google - module Cloud - module Video - module Transcoder - module V1 - ## - # Using the Transcoder API, you can queue asynchronous jobs for transcoding - # media into various output formats. Output formats may include different - # streaming standards such as HTTP Live Streaming (HLS) and Dynamic Adaptive - # Streaming over HTTP (DASH). You can also customize jobs using advanced - # features such as Digital Rights Management (DRM), audio equalization, content - # concatenation, and digital ad-stitch ready content generation. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/video/transcoder/v1/transcoder_service/rest" - # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new - # - module TranscoderService - # 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/video/transcoder/v1/transcoder_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/rest/client.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/rest/client.rb deleted file mode 100644 index 2d78c87e397f..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/rest/client.rb +++ /dev/null @@ -1,1112 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/video/transcoder/v1/services_pb" -require "google/cloud/video/transcoder/v1/transcoder_service/rest/service_stub" - -module Google - module Cloud - module Video - module Transcoder - module V1 - module TranscoderService - module Rest - ## - # REST client for the TranscoderService service. - # - # Using the Transcoder API, you can queue asynchronous jobs for transcoding - # media into various output formats. Output formats may include different - # streaming standards such as HTTP Live Streaming (HLS) and Dynamic Adaptive - # Streaming over HTTP (DASH). You can also customize jobs using advanced - # features such as Digital Rights Management (DRM), audio equalization, content - # concatenation, and digital ad-stitch ready content generation. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "transcoder.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :transcoder_service_stub - - ## - # Configure the TranscoderService Client class. - # - # See {::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all TranscoderService clients - # ::Google::Cloud::Video::Transcoder::V1::TranscoderService::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", "Video", "Transcoder", "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_job.timeout = 60.0 - - default_config.rpcs.list_jobs.timeout = 60.0 - default_config.rpcs.list_jobs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_job.timeout = 60.0 - default_config.rpcs.get_job.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_job.timeout = 60.0 - - default_config.rpcs.create_job_template.timeout = 60.0 - - default_config.rpcs.list_job_templates.timeout = 60.0 - default_config.rpcs.list_job_templates.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_job_template.timeout = 60.0 - default_config.rpcs.get_job_template.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_job_template.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the TranscoderService 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::Video::Transcoder::V1::TranscoderService::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 - @transcoder_service_stub.universe_domain - end - - ## - # Create a new TranscoderService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the TranscoderService 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 - - @transcoder_service_stub = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @transcoder_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 - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @transcoder_service_stub.logger - end - - # Service calls - - ## - # Creates a job in the specified region. - # - # @overload create_job(request, options = nil) - # Pass arguments to `create_job` via a request object, either of type - # {::Google::Cloud::Video::Transcoder::V1::CreateJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Transcoder::V1::CreateJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_job(parent: nil, job: nil) - # Pass arguments to `create_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent location to create and process this job. - # Format: `projects/{project}/locations/{location}` - # @param job [::Google::Cloud::Video::Transcoder::V1::Job, ::Hash] - # Required. Parameters for creating transcoding job. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::Transcoder::V1::Job] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::Transcoder::V1::Job] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/video/transcoder/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Transcoder::V1::CreateJobRequest.new - # - # # Call the create_job method. - # result = client.create_job request - # - # # The returned object is of type Google::Cloud::Video::Transcoder::V1::Job. - # p result - # - def create_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::CreateJobRequest - - # Converts hash and nil to an 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_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @transcoder_service_stub.create_job request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists jobs in the specified region. - # - # @overload list_jobs(request, options = nil) - # Pass arguments to `list_jobs` via a request object, either of type - # {::Google::Cloud::Video::Transcoder::V1::ListJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Transcoder::V1::ListJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Format: `projects/{project}/locations/{location}` - # @param page_size [::Integer] - # The maximum number of items to return. - # @param page_token [::String] - # The `next_page_token` value returned from a previous List request, if - # any. - # @param filter [::String] - # The filter expression, following the syntax outlined in - # https://google.aip.dev/160. - # @param order_by [::String] - # One or more fields to compare and use to sort the output. - # 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::Video::Transcoder::V1::Job>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Video::Transcoder::V1::Job>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/video/transcoder/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Transcoder::V1::ListJobsRequest.new - # - # # Call the list_jobs method. - # result = client.list_jobs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Video::Transcoder::V1::Job. - # p item - # end - # - def list_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::ListJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_jobs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_jobs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @transcoder_service_stub.list_jobs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @transcoder_service_stub, :list_jobs, "jobs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the job data. - # - # @overload get_job(request, options = nil) - # Pass arguments to `get_job` via a request object, either of type - # {::Google::Cloud::Video::Transcoder::V1::GetJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Transcoder::V1::GetJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_job(name: nil) - # Pass arguments to `get_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the job to retrieve. - # Format: `projects/{project}/locations/{location}/jobs/{job}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::Transcoder::V1::Job] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::Transcoder::V1::Job] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/video/transcoder/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Transcoder::V1::GetJobRequest.new - # - # # Call the get_job method. - # result = client.get_job request - # - # # The returned object is of type Google::Cloud::Video::Transcoder::V1::Job. - # p result - # - def get_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::GetJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @transcoder_service_stub.get_job request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a job. - # - # @overload delete_job(request, options = nil) - # Pass arguments to `delete_job` via a request object, either of type - # {::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_job(name: nil, allow_missing: nil) - # Pass arguments to `delete_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the job to delete. - # Format: `projects/{project}/locations/{location}/jobs/{job}` - # @param allow_missing [::Boolean] - # If set to true, and the job is not found, the request will succeed but no - # action will be taken on the server. - # @yield [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/video/transcoder/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Transcoder::V1::DeleteJobRequest.new - # - # # Call the delete_job method. - # result = client.delete_job request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest - - # Converts hash and nil to an 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_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @transcoder_service_stub.delete_job request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a job template in the specified region. - # - # @overload create_job_template(request, options = nil) - # Pass arguments to `create_job_template` via a request object, either of type - # {::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_job_template(parent: nil, job_template: nil, job_template_id: nil) - # Pass arguments to `create_job_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 location to create this job template. - # Format: `projects/{project}/locations/{location}` - # @param job_template [::Google::Cloud::Video::Transcoder::V1::JobTemplate, ::Hash] - # Required. Parameters for creating job template. - # @param job_template_id [::String] - # Required. The ID to use for the job template, which will become the final - # component of the job template's resource name. - # - # This value should be 4-63 characters, and valid characters must match the - # regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::Transcoder::V1::JobTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::Transcoder::V1::JobTemplate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/video/transcoder/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest.new - # - # # Call the create_job_template method. - # result = client.create_job_template request - # - # # The returned object is of type Google::Cloud::Video::Transcoder::V1::JobTemplate. - # p result - # - def create_job_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest - - # Converts hash and nil to an 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_job_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_job_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_job_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @transcoder_service_stub.create_job_template request, 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 job templates in the specified region. - # - # @overload list_job_templates(request, options = nil) - # Pass arguments to `list_job_templates` via a request object, either of type - # {::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_job_templates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_job_templates` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 location from which to retrieve the collection of job - # templates. Format: `projects/{project}/locations/{location}` - # @param page_size [::Integer] - # The maximum number of items to return. - # @param page_token [::String] - # The `next_page_token` value returned from a previous List request, if - # any. - # @param filter [::String] - # The filter expression, following the syntax outlined in - # https://google.aip.dev/160. - # @param order_by [::String] - # One or more fields to compare and use to sort the output. - # 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::Video::Transcoder::V1::JobTemplate>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Video::Transcoder::V1::JobTemplate>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/video/transcoder/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest.new - # - # # Call the list_job_templates method. - # result = client.list_job_templates request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Video::Transcoder::V1::JobTemplate. - # p item - # end - # - def list_job_templates request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_job_templates.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_job_templates.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_job_templates.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @transcoder_service_stub.list_job_templates request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @transcoder_service_stub, :list_job_templates, "job_templates", 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 the job template data. - # - # @overload get_job_template(request, options = nil) - # Pass arguments to `get_job_template` via a request object, either of type - # {::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_job_template(name: nil) - # Pass arguments to `get_job_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 job template to retrieve. - # Format: - # `projects/{project}/locations/{location}/jobTemplates/{job_template}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::Transcoder::V1::JobTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::Transcoder::V1::JobTemplate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/video/transcoder/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest.new - # - # # Call the get_job_template method. - # result = client.get_job_template request - # - # # The returned object is of type Google::Cloud::Video::Transcoder::V1::JobTemplate. - # p result - # - def get_job_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_job_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_job_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_job_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @transcoder_service_stub.get_job_template request, 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 job template. - # - # @overload delete_job_template(request, options = nil) - # Pass arguments to `delete_job_template` via a request object, either of type - # {::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_job_template(name: nil, allow_missing: nil) - # Pass arguments to `delete_job_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 job template to delete. - # `projects/{project}/locations/{location}/jobTemplates/{job_template}` - # @param allow_missing [::Boolean] - # If set to true, and the job template is not found, the request will succeed - # but no action will be taken on the server. - # @yield [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/video/transcoder/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest.new - # - # # Call the delete_job_template method. - # result = client.delete_job_template request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_job_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest - - # Converts hash and nil to an 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_job_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Video::Transcoder::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_job_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_job_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @transcoder_service_stub.delete_job_template request, 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 TranscoderService REST API. - # - # This class represents the configuration for TranscoderService 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::Video::Transcoder::V1::TranscoderService::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_job to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_job.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_job.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 = "transcoder.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 TranscoderService 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_job` - # @return [::Gapic::Config::Method] - # - attr_reader :create_job - ## - # RPC-specific configuration for `list_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_jobs - ## - # RPC-specific configuration for `get_job` - # @return [::Gapic::Config::Method] - # - attr_reader :get_job - ## - # RPC-specific configuration for `delete_job` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_job - ## - # RPC-specific configuration for `create_job_template` - # @return [::Gapic::Config::Method] - # - attr_reader :create_job_template - ## - # RPC-specific configuration for `list_job_templates` - # @return [::Gapic::Config::Method] - # - attr_reader :list_job_templates - ## - # RPC-specific configuration for `get_job_template` - # @return [::Gapic::Config::Method] - # - attr_reader :get_job_template - ## - # RPC-specific configuration for `delete_job_template` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_job_template - - # @private - def initialize parent_rpcs = nil - create_job_config = parent_rpcs.create_job if parent_rpcs.respond_to? :create_job - @create_job = ::Gapic::Config::Method.new create_job_config - list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs - @list_jobs = ::Gapic::Config::Method.new list_jobs_config - get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job - @get_job = ::Gapic::Config::Method.new get_job_config - delete_job_config = parent_rpcs.delete_job if parent_rpcs.respond_to? :delete_job - @delete_job = ::Gapic::Config::Method.new delete_job_config - create_job_template_config = parent_rpcs.create_job_template if parent_rpcs.respond_to? :create_job_template - @create_job_template = ::Gapic::Config::Method.new create_job_template_config - list_job_templates_config = parent_rpcs.list_job_templates if parent_rpcs.respond_to? :list_job_templates - @list_job_templates = ::Gapic::Config::Method.new list_job_templates_config - get_job_template_config = parent_rpcs.get_job_template if parent_rpcs.respond_to? :get_job_template - @get_job_template = ::Gapic::Config::Method.new get_job_template_config - delete_job_template_config = parent_rpcs.delete_job_template if parent_rpcs.respond_to? :delete_job_template - @delete_job_template = ::Gapic::Config::Method.new delete_job_template_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-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_service/rest/service_stub.rb deleted file mode 100644 index 424ce193ad4a..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/transcoder_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/video/transcoder/v1/services_pb" - -module Google - module Cloud - module Video - module Transcoder - module V1 - module TranscoderService - module Rest - ## - # REST service stub for the TranscoderService 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_job REST call - # - # @param request_pb [::Google::Cloud::Video::Transcoder::V1::CreateJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::Transcoder::V1::Job] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::Transcoder::V1::Job] - # A result object deserialized from the server's reply - def create_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_job", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Video::Transcoder::V1::Job.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_jobs REST call - # - # @param request_pb [::Google::Cloud::Video::Transcoder::V1::ListJobsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::Transcoder::V1::ListJobsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::Transcoder::V1::ListJobsResponse] - # A result object deserialized from the server's reply - def list_jobs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_jobs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_jobs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Video::Transcoder::V1::ListJobsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_job REST call - # - # @param request_pb [::Google::Cloud::Video::Transcoder::V1::GetJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::Transcoder::V1::Job] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::Transcoder::V1::Job] - # A result object deserialized from the server's reply - def get_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_job", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Video::Transcoder::V1::Job.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_job REST call - # - # @param request_pb [::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_job", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_job_template REST call - # - # @param request_pb [::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::Transcoder::V1::JobTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::Transcoder::V1::JobTemplate] - # A result object deserialized from the server's reply - def create_job_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_job_template_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_job_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Video::Transcoder::V1::JobTemplate.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_job_templates REST call - # - # @param request_pb [::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesResponse] - # A result object deserialized from the server's reply - def list_job_templates request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_job_templates_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_job_templates", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_job_template REST call - # - # @param request_pb [::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Video::Transcoder::V1::JobTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Video::Transcoder::V1::JobTemplate] - # A result object deserialized from the server's reply - def get_job_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_job_template_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_job_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Video::Transcoder::V1::JobTemplate.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_job_template REST call - # - # @param request_pb [::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_job_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_job_template_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_job_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the create_job REST call - # - # @param request_pb [::Google::Cloud::Video::Transcoder::V1::CreateJobRequest] - # 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_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/jobs", - body: "job", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_jobs REST call - # - # @param request_pb [::Google::Cloud::Video::Transcoder::V1::ListJobsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_jobs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/jobs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_job REST call - # - # @param request_pb [::Google::Cloud::Video::Transcoder::V1::GetJobRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_job REST call - # - # @param request_pb [::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest] - # 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_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_job_template REST call - # - # @param request_pb [::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest] - # 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_job_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/jobTemplates", - body: "job_template", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_job_templates REST call - # - # @param request_pb [::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_job_templates_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/jobTemplates", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_job_template REST call - # - # @param request_pb [::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_job_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/jobTemplates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_job_template REST call - # - # @param request_pb [::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest] - # 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_job_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/jobTemplates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/version.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/v1/version.rb deleted file mode 100644 index b41a794a563b..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/lib/google/cloud/video/transcoder/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 Video - module Transcoder - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/README.md deleted file mode 100644 index 56ec23d53a1c..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Transcoder 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-video-transcoder-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # 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. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - # - # Example: - # - # 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 - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # 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 - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # 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 - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1/proto_docs/google/cloud/video/transcoder/v1/resources.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/cloud/video/transcoder/v1/resources.rb deleted file mode 100644 index b05f0efb6de7..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/cloud/video/transcoder/v1/resources.rb +++ /dev/null @@ -1,1763 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Video - module Transcoder - module V1 - # Transcoding job resource. - # @!attribute [rw] name - # @return [::String] - # The resource name of the job. - # Format: `projects/{project_number}/locations/{location}/jobs/{job}` - # @!attribute [rw] input_uri - # @return [::String] - # Input only. Specify the `input_uri` to populate empty `uri` fields in each - # element of `Job.config.inputs` or `JobTemplate.config.inputs` when using - # template. URI of the media. Input files must be at least 5 seconds in - # duration and stored in Cloud Storage (for example, - # `gs://bucket/inputs/file.mp4`). See [Supported input and output - # formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - # @!attribute [rw] output_uri - # @return [::String] - # Input only. Specify the `output_uri` to populate an empty - # `Job.config.output.uri` or `JobTemplate.config.output.uri` when using - # template. URI for the output file(s). For example, - # `gs://my-bucket/outputs/`. See [Supported input and output - # formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - # @!attribute [rw] template_id - # @return [::String] - # Input only. Specify the `template_id` to use for populating `Job.config`. - # The default is `preset/web-hd`, which is the only supported preset. - # - # User defined JobTemplate: `{job_template_id}` - # - # Note: The following fields are mutually exclusive: `template_id`, `config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] config - # @return [::Google::Cloud::Video::Transcoder::V1::JobConfig] - # The configuration for this job. - # - # Note: The following fields are mutually exclusive: `config`, `template_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] state - # @return [::Google::Cloud::Video::Transcoder::V1::Job::ProcessingState] - # Output only. The current state of the job. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the job was created. - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the transcoding started. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the transcoding finished. - # @!attribute [rw] ttl_after_completion_days - # @return [::Integer] - # Job time to live value in days, which will be effective after job - # completion. Job should be deleted automatically after the given TTL. Enter - # a value between 1 and 90. The default is 30. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # The labels associated with this job. You can use these to organize and - # group your jobs. - # @!attribute [r] error - # @return [::Google::Rpc::Status] - # Output only. An error object that describes the reason for the failure. - # This property is always present when - # {::Google::Cloud::Video::Transcoder::V1::Job::ProcessingState ProcessingState} is - # `FAILED`. - # @!attribute [rw] mode - # @return [::Google::Cloud::Video::Transcoder::V1::Job::ProcessingMode] - # The processing mode of the job. - # The default is `PROCESSING_MODE_INTERACTIVE`. - # @!attribute [rw] batch_mode_priority - # @return [::Integer] - # The processing priority of a batch job. - # This field can only be set for batch mode jobs. The default value is 0. - # This value cannot be negative. Higher values correspond to higher - # priorities for the job. - # @!attribute [rw] optimization - # @return [::Google::Cloud::Video::Transcoder::V1::Job::OptimizationStrategy] - # Optional. The optimization strategy of the job. The default is - # `AUTODETECT`. - # @!attribute [rw] fill_content_gaps - # @return [::Boolean] - # Optional. Insert silence and duplicate frames when timestamp gaps are - # detected in a given stream. - class Job - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The current state of the job. - module ProcessingState - # The processing state is not specified. - PROCESSING_STATE_UNSPECIFIED = 0 - - # The job is enqueued and will be picked up for processing soon. - PENDING = 1 - - # The job is being processed. - RUNNING = 2 - - # The job has been completed successfully. - SUCCEEDED = 3 - - # The job has failed. For additional information, see - # [Troubleshooting](https://cloud.google.com/transcoder/docs/troubleshooting). - FAILED = 4 - end - - # The processing mode of the job. - module ProcessingMode - # The job processing mode is not specified. - PROCESSING_MODE_UNSPECIFIED = 0 - - # The job processing mode is interactive mode. - # Interactive job will either be ran or rejected if quota does not allow - # for it. - PROCESSING_MODE_INTERACTIVE = 1 - - # The job processing mode is batch mode. - # Batch mode allows queuing of jobs. - PROCESSING_MODE_BATCH = 2 - end - - # The optimization strategy of the job. The default is `AUTODETECT`. - module OptimizationStrategy - # The optimization strategy is not specified. - OPTIMIZATION_STRATEGY_UNSPECIFIED = 0 - - # Prioritize job processing speed. - AUTODETECT = 1 - - # Disable all optimizations. - DISABLED = 2 - end - end - - # Transcoding job template resource. - # @!attribute [rw] name - # @return [::String] - # The resource name of the job template. - # Format: - # `projects/{project_number}/locations/{location}/jobTemplates/{job_template}` - # @!attribute [rw] config - # @return [::Google::Cloud::Video::Transcoder::V1::JobConfig] - # The configuration for this template. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # The labels associated with this job template. You can use these to organize - # and group your job templates. - class JobTemplate - 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 - - # Job configuration - # @!attribute [rw] inputs - # @return [::Array<::Google::Cloud::Video::Transcoder::V1::Input>] - # List of input assets stored in Cloud Storage. - # @!attribute [rw] edit_list - # @return [::Array<::Google::Cloud::Video::Transcoder::V1::EditAtom>] - # List of edit atoms. Defines the ultimate timeline of the resulting - # file or manifest. - # @!attribute [rw] elementary_streams - # @return [::Array<::Google::Cloud::Video::Transcoder::V1::ElementaryStream>] - # List of elementary streams. - # @!attribute [rw] mux_streams - # @return [::Array<::Google::Cloud::Video::Transcoder::V1::MuxStream>] - # List of multiplexing settings for output streams. - # @!attribute [rw] manifests - # @return [::Array<::Google::Cloud::Video::Transcoder::V1::Manifest>] - # List of output manifests. - # @!attribute [rw] output - # @return [::Google::Cloud::Video::Transcoder::V1::Output] - # Output configuration. - # @!attribute [rw] ad_breaks - # @return [::Array<::Google::Cloud::Video::Transcoder::V1::AdBreak>] - # List of ad breaks. Specifies where to insert ad break tags in the output - # manifests. - # @!attribute [rw] pubsub_destination - # @return [::Google::Cloud::Video::Transcoder::V1::PubsubDestination] - # Destination on Pub/Sub. - # @!attribute [rw] sprite_sheets - # @return [::Array<::Google::Cloud::Video::Transcoder::V1::SpriteSheet>] - # List of output sprite sheets. - # Spritesheets require at least one VideoStream in the Jobconfig. - # @!attribute [rw] overlays - # @return [::Array<::Google::Cloud::Video::Transcoder::V1::Overlay>] - # List of overlays on the output video, in descending Z-order. - # @!attribute [rw] encryptions - # @return [::Array<::Google::Cloud::Video::Transcoder::V1::Encryption>] - # List of encryption configurations for the content. - # Each configuration has an ID. Specify this ID in the - # {::Google::Cloud::Video::Transcoder::V1::MuxStream#encryption_id MuxStream.encryption_id} - # field to indicate the configuration to use for that `MuxStream` output. - class JobConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Input asset. - # @!attribute [rw] key - # @return [::String] - # A unique key for this input. Must be specified when using advanced - # mapping and edit lists. - # @!attribute [rw] uri - # @return [::String] - # URI of the media. Input files must be at least 5 seconds in duration and - # stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). - # If empty, the value is populated from - # {::Google::Cloud::Video::Transcoder::V1::Job#input_uri Job.input_uri}. See - # [Supported input and output - # formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - # @!attribute [rw] preprocessing_config - # @return [::Google::Cloud::Video::Transcoder::V1::PreprocessingConfig] - # Preprocessing configurations. - # @!attribute [rw] attributes - # @return [::Google::Cloud::Video::Transcoder::V1::InputAttributes] - # Optional. Input Attributes. - class Input - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Location of output file(s) in a Cloud Storage bucket. - # @!attribute [rw] uri - # @return [::String] - # URI for the output file(s). For example, `gs://my-bucket/outputs/`. Must be - # a directory and not a top-level bucket. If empty, the value is populated - # from {::Google::Cloud::Video::Transcoder::V1::Job#output_uri Job.output_uri}. See - # [Supported input and output - # formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - class Output - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Edit atom. - # @!attribute [rw] key - # @return [::String] - # A unique key for this atom. Must be specified when using advanced - # mapping. - # @!attribute [rw] inputs - # @return [::Array<::String>] - # List of {::Google::Cloud::Video::Transcoder::V1::Input#key Input.key} values - # identifying files that should be used in this atom. The listed `inputs` - # must have the same timeline. - # @!attribute [rw] end_time_offset - # @return [::Google::Protobuf::Duration] - # End time in seconds for the atom, relative to the input file timeline. - # When `end_time_offset` is not specified, the `inputs` are used until - # the end of the atom. - # @!attribute [rw] start_time_offset - # @return [::Google::Protobuf::Duration] - # Start time in seconds for the atom, relative to the input file timeline. - # The default is `0s`. - class EditAtom - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Ad break. - # @!attribute [rw] start_time_offset - # @return [::Google::Protobuf::Duration] - # Start time in seconds for the ad break, relative to the output file - # timeline. The default is `0s`. - class AdBreak - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Encoding of an input file such as an audio, video, or text track. - # Elementary streams must be packaged before - # mapping and sharing between different output formats. - # @!attribute [rw] key - # @return [::String] - # A unique key for this elementary stream. - # @!attribute [rw] video_stream - # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream] - # Encoding of a video stream. - # - # Note: The following fields are mutually exclusive: `video_stream`, `audio_stream`, `text_stream`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] audio_stream - # @return [::Google::Cloud::Video::Transcoder::V1::AudioStream] - # Encoding of an audio stream. - # - # Note: The following fields are mutually exclusive: `audio_stream`, `video_stream`, `text_stream`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_stream - # @return [::Google::Cloud::Video::Transcoder::V1::TextStream] - # Encoding of a text stream. For example, closed captions or subtitles. - # - # Note: The following fields are mutually exclusive: `text_stream`, `video_stream`, `audio_stream`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ElementaryStream - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Multiplexing settings for output stream. - # @!attribute [rw] key - # @return [::String] - # A unique key for this multiplexed stream. - # @!attribute [rw] file_name - # @return [::String] - # The name of the generated file. The default is - # {::Google::Cloud::Video::Transcoder::V1::MuxStream#key MuxStream.key} with the - # extension suffix corresponding to the - # {::Google::Cloud::Video::Transcoder::V1::MuxStream#container MuxStream.container}. - # - # Individual segments also have an incremental 10-digit zero-padded suffix - # starting from 0 before the extension, such as `mux_stream0000000123.ts`. - # @!attribute [rw] container - # @return [::String] - # The container format. The default is `mp4` - # - # Supported streaming formats: - # - # - `ts` - # - `fmp4`- the corresponding file extension is `.m4s` - # - # Supported standalone file formats: - # - # - `mp4` - # - `mp3` - # - `ogg` - # - `vtt` - # - # See also: - # [Supported input and output - # formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) - # @!attribute [rw] elementary_streams - # @return [::Array<::String>] - # List of - # {::Google::Cloud::Video::Transcoder::V1::ElementaryStream#key ElementaryStream.key} - # values multiplexed in this stream. - # @!attribute [rw] segment_settings - # @return [::Google::Cloud::Video::Transcoder::V1::SegmentSettings] - # Segment settings for `ts`, `fmp4` and `vtt`. - # @!attribute [rw] encryption_id - # @return [::String] - # Identifier of the encryption configuration to use. If omitted, output will - # be unencrypted. - # @!attribute [rw] fmp4 - # @return [::Google::Cloud::Video::Transcoder::V1::MuxStream::Fmp4Config] - # Optional. `fmp4` container configuration. - class MuxStream - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # `fmp4` container configuration. - # @!attribute [rw] codec_tag - # @return [::String] - # Optional. Specify the codec tag string that will be used in the media - # bitstream. When not specified, the codec appropriate value is used. - # - # Supported H265 codec tags: - # - # - `hvc1` (default) - # - `hev1` - class Fmp4Config - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Manifest configuration. - # @!attribute [rw] file_name - # @return [::String] - # The name of the generated file. The default is `manifest` with the - # extension suffix corresponding to the - # {::Google::Cloud::Video::Transcoder::V1::Manifest#type Manifest.type}. - # @!attribute [rw] type - # @return [::Google::Cloud::Video::Transcoder::V1::Manifest::ManifestType] - # Required. Type of the manifest. - # @!attribute [rw] mux_streams - # @return [::Array<::String>] - # Required. List of user supplied - # {::Google::Cloud::Video::Transcoder::V1::MuxStream#key MuxStream.key} values that - # should appear in this manifest. - # - # When {::Google::Cloud::Video::Transcoder::V1::Manifest#type Manifest.type} is - # `HLS`, a media manifest with name - # {::Google::Cloud::Video::Transcoder::V1::MuxStream#key MuxStream.key} and `.m3u8` - # extension is generated for each element in this list. - # @!attribute [rw] dash - # @return [::Google::Cloud::Video::Transcoder::V1::Manifest::DashConfig] - # `DASH` manifest configuration. - class Manifest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # `DASH` manifest configuration. - # @!attribute [rw] segment_reference_scheme - # @return [::Google::Cloud::Video::Transcoder::V1::Manifest::DashConfig::SegmentReferenceScheme] - # The segment reference scheme for a `DASH` manifest. The default is - # `SEGMENT_LIST`. - class DashConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The segment reference scheme for a `DASH` manifest. - module SegmentReferenceScheme - # The segment reference scheme is not specified. - SEGMENT_REFERENCE_SCHEME_UNSPECIFIED = 0 - - # Explicitly lists the URLs of media files for each segment. For example, - # if - # {::Google::Cloud::Video::Transcoder::V1::SegmentSettings#individual_segments SegmentSettings.individual_segments} - # is `true`, then the manifest contains fields similar to the following: - # ```xml - # - # - # - # - # ... - # ``` - SEGMENT_LIST = 1 - - # {::Google::Cloud::Video::Transcoder::V1::SegmentSettings#individual_segments SegmentSettings.individual_segments} - # must be set to `true` to use this segment reference scheme. Uses the - # DASH specification - # `` tag to determine the URLs of media files for each - # segment. For example: - # ```xml - # - # ... - # ``` - SEGMENT_TEMPLATE_NUMBER = 2 - end - end - - # The manifest type, which corresponds to the adaptive streaming format used. - module ManifestType - # The manifest type is not specified. - MANIFEST_TYPE_UNSPECIFIED = 0 - - # Create an HLS manifest. The corresponding file extension is `.m3u8`. - HLS = 1 - - # Create an MPEG-DASH manifest. The corresponding file extension is `.mpd`. - DASH = 2 - end - end - - # A Pub/Sub destination. - # @!attribute [rw] topic - # @return [::String] - # The name of the Pub/Sub topic to publish job completion notification - # to. For example: `projects/{project}/topics/{topic}`. - class PubsubDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Sprite sheet configuration. - # @!attribute [rw] format - # @return [::String] - # Format type. The default is `jpeg`. - # - # Supported formats: - # - # - `jpeg` - # @!attribute [rw] file_prefix - # @return [::String] - # Required. File name prefix for the generated sprite sheets. - # - # Each sprite sheet has an incremental 10-digit zero-padded suffix starting - # from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. - # @!attribute [rw] sprite_width_pixels - # @return [::Integer] - # Required. The width of sprite in pixels. Must be an even integer. To - # preserve the source aspect ratio, set the - # {::Google::Cloud::Video::Transcoder::V1::SpriteSheet#sprite_width_pixels SpriteSheet.sprite_width_pixels} - # field or the - # {::Google::Cloud::Video::Transcoder::V1::SpriteSheet#sprite_height_pixels SpriteSheet.sprite_height_pixels} - # field, but not both (the API will automatically calculate the missing - # field). - # - # For portrait videos that contain horizontal ASR and rotation metadata, - # provide the width, in pixels, per the horizontal ASR. The API calculates - # the height per the horizontal ASR. The API detects any rotation metadata - # and swaps the requested height and width for the output. - # @!attribute [rw] sprite_height_pixels - # @return [::Integer] - # Required. The height of sprite in pixels. Must be an even integer. To - # preserve the source aspect ratio, set the - # {::Google::Cloud::Video::Transcoder::V1::SpriteSheet#sprite_height_pixels SpriteSheet.sprite_height_pixels} - # field or the - # {::Google::Cloud::Video::Transcoder::V1::SpriteSheet#sprite_width_pixels SpriteSheet.sprite_width_pixels} - # field, but not both (the API will automatically calculate the missing - # field). - # - # For portrait videos that contain horizontal ASR and rotation metadata, - # provide the height, in pixels, per the horizontal ASR. The API calculates - # the width per the horizontal ASR. The API detects any rotation metadata - # and swaps the requested height and width for the output. - # @!attribute [rw] column_count - # @return [::Integer] - # The maximum number of sprites per row in a sprite sheet. The default is 0, - # which indicates no maximum limit. - # @!attribute [rw] row_count - # @return [::Integer] - # The maximum number of rows per sprite sheet. When the sprite sheet is full, - # a new sprite sheet is created. The default is 0, which indicates no maximum - # limit. - # @!attribute [rw] start_time_offset - # @return [::Google::Protobuf::Duration] - # Start time in seconds, relative to the output file timeline. Determines the - # first sprite to pick. The default is `0s`. - # @!attribute [rw] end_time_offset - # @return [::Google::Protobuf::Duration] - # End time in seconds, relative to the output file timeline. When - # `end_time_offset` is not specified, the sprites are generated until the end - # of the output file. - # @!attribute [rw] total_count - # @return [::Integer] - # Total number of sprites. Create the specified number of sprites - # distributed evenly across the timeline of the output media. The default - # is 100. - # - # Note: The following fields are mutually exclusive: `total_count`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] interval - # @return [::Google::Protobuf::Duration] - # Starting from `0s`, create sprites at regular intervals. Specify the - # interval value in seconds. - # - # Note: The following fields are mutually exclusive: `interval`, `total_count`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] quality - # @return [::Integer] - # The quality of the generated sprite sheet. Enter a value between 1 - # and 100, where 1 is the lowest quality and 100 is the highest quality. - # The default is 100. A high quality value corresponds to a low image data - # compression ratio. - class SpriteSheet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Overlay configuration. - # @!attribute [rw] image - # @return [::Google::Cloud::Video::Transcoder::V1::Overlay::Image] - # Image overlay. - # @!attribute [rw] animations - # @return [::Array<::Google::Cloud::Video::Transcoder::V1::Overlay::Animation>] - # List of animations. The list should be chronological, without any time - # overlap. - class Overlay - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # 2D normalized coordinates. Default: `{0.0, 0.0}` - # @!attribute [rw] x - # @return [::Float] - # Normalized x coordinate. - # @!attribute [rw] y - # @return [::Float] - # Normalized y coordinate. - class NormalizedCoordinate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Overlaid image. - # @!attribute [rw] uri - # @return [::String] - # Required. URI of the image in Cloud Storage. For example, - # `gs://bucket/inputs/image.png`. Only PNG and JPEG images are supported. - # @!attribute [rw] resolution - # @return [::Google::Cloud::Video::Transcoder::V1::Overlay::NormalizedCoordinate] - # Normalized image resolution, based on output video resolution. Valid - # values: `0.0`–`1.0`. To respect the original image aspect ratio, set - # either `x` or `y` to `0.0`. To use the original image resolution, set - # both `x` and `y` to `0.0`. - # @!attribute [rw] alpha - # @return [::Float] - # Target image opacity. Valid values are from `1.0` (solid, default) to - # `0.0` (transparent), exclusive. Set this to a value greater than `0.0`. - class Image - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Display static overlay object. - # @!attribute [rw] xy - # @return [::Google::Cloud::Video::Transcoder::V1::Overlay::NormalizedCoordinate] - # Normalized coordinates based on output video resolution. Valid - # values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay - # object. For example, use the x and y coordinates \\{0,0} to position the - # top-left corner of the overlay animation in the top-left corner of the - # output video. - # @!attribute [rw] start_time_offset - # @return [::Google::Protobuf::Duration] - # The time to start displaying the overlay object, in seconds. Default: 0 - class AnimationStatic - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Display overlay object with fade animation. - # @!attribute [rw] fade_type - # @return [::Google::Cloud::Video::Transcoder::V1::Overlay::FadeType] - # Required. Type of fade animation: `FADE_IN` or `FADE_OUT`. - # @!attribute [rw] xy - # @return [::Google::Cloud::Video::Transcoder::V1::Overlay::NormalizedCoordinate] - # Normalized coordinates based on output video resolution. Valid - # values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay - # object. For example, use the x and y coordinates \\{0,0} to position the - # top-left corner of the overlay animation in the top-left corner of the - # output video. - # @!attribute [rw] start_time_offset - # @return [::Google::Protobuf::Duration] - # The time to start the fade animation, in seconds. Default: 0 - # @!attribute [rw] end_time_offset - # @return [::Google::Protobuf::Duration] - # The time to end the fade animation, in seconds. Default: - # `start_time_offset` + 1s - class AnimationFade - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # End previous overlay animation from the video. Without `AnimationEnd`, the - # overlay object will keep the state of previous animation until the end of - # the video. - # @!attribute [rw] start_time_offset - # @return [::Google::Protobuf::Duration] - # The time to end overlay object, in seconds. Default: 0 - class AnimationEnd - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Animation types. - # @!attribute [rw] animation_static - # @return [::Google::Cloud::Video::Transcoder::V1::Overlay::AnimationStatic] - # Display static overlay object. - # - # Note: The following fields are mutually exclusive: `animation_static`, `animation_fade`, `animation_end`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] animation_fade - # @return [::Google::Cloud::Video::Transcoder::V1::Overlay::AnimationFade] - # Display overlay object with fade animation. - # - # Note: The following fields are mutually exclusive: `animation_fade`, `animation_static`, `animation_end`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] animation_end - # @return [::Google::Cloud::Video::Transcoder::V1::Overlay::AnimationEnd] - # End previous animation. - # - # Note: The following fields are mutually exclusive: `animation_end`, `animation_static`, `animation_fade`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Animation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Fade type for the overlay: `FADE_IN` or `FADE_OUT`. - module FadeType - # The fade type is not specified. - FADE_TYPE_UNSPECIFIED = 0 - - # Fade the overlay object into view. - FADE_IN = 1 - - # Fade the overlay object out of view. - FADE_OUT = 2 - end - end - - # Preprocessing configurations. - # @!attribute [rw] color - # @return [::Google::Cloud::Video::Transcoder::V1::PreprocessingConfig::Color] - # Color preprocessing configuration. - # @!attribute [rw] denoise - # @return [::Google::Cloud::Video::Transcoder::V1::PreprocessingConfig::Denoise] - # Denoise preprocessing configuration. - # @!attribute [rw] deblock - # @return [::Google::Cloud::Video::Transcoder::V1::PreprocessingConfig::Deblock] - # Deblock preprocessing configuration. - # @!attribute [rw] audio - # @return [::Google::Cloud::Video::Transcoder::V1::PreprocessingConfig::Audio] - # Audio preprocessing configuration. - # @!attribute [rw] crop - # @return [::Google::Cloud::Video::Transcoder::V1::PreprocessingConfig::Crop] - # Specify the video cropping configuration. - # @!attribute [rw] pad - # @return [::Google::Cloud::Video::Transcoder::V1::PreprocessingConfig::Pad] - # Specify the video pad filter configuration. - # @!attribute [rw] deinterlace - # @return [::Google::Cloud::Video::Transcoder::V1::PreprocessingConfig::Deinterlace] - # Specify the video deinterlace configuration. - class PreprocessingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Color preprocessing configuration. - # - # **Note:** This configuration is not supported. - # @!attribute [rw] saturation - # @return [::Float] - # Control color saturation of the video. Enter a value between -1 and 1, - # where -1 is fully desaturated and 1 is maximum saturation. 0 is no - # change. The default is 0. - # @!attribute [rw] contrast - # @return [::Float] - # Control black and white contrast of the video. Enter a value between -1 - # and 1, where -1 is minimum contrast and 1 is maximum contrast. 0 is no - # change. The default is 0. - # @!attribute [rw] brightness - # @return [::Float] - # Control brightness of the video. Enter a value between -1 and 1, where -1 - # is minimum brightness and 1 is maximum brightness. 0 is no change. The - # default is 0. - class Color - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Denoise preprocessing configuration. - # - # **Note:** This configuration is not supported. - # @!attribute [rw] strength - # @return [::Float] - # Set strength of the denoise. Enter a value between 0 and 1. The higher - # the value, the smoother the image. 0 is no denoising. The default is 0. - # @!attribute [rw] tune - # @return [::String] - # Set the denoiser mode. The default is `standard`. - # - # Supported denoiser modes: - # - # - `standard` - # - `grain` - class Denoise - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Deblock preprocessing configuration. - # - # **Note:** This configuration is not supported. - # @!attribute [rw] strength - # @return [::Float] - # Set strength of the deblocker. Enter a value between 0 and 1. The higher - # the value, the stronger the block removal. 0 is no deblocking. The - # default is 0. - # @!attribute [rw] enabled - # @return [::Boolean] - # Enable deblocker. The default is `false`. - class Deblock - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Audio preprocessing configuration. - # @!attribute [rw] lufs - # @return [::Float] - # Specify audio loudness normalization in loudness units relative to full - # scale (LUFS). Enter a value between -24 and 0 (the default), where: - # - # * -24 is the Advanced Television Systems Committee (ATSC A/85) standard - # * -23 is the EU R128 broadcast standard - # * -19 is the prior standard for online mono audio - # * -18 is the ReplayGain standard - # * -16 is the prior standard for stereo audio - # * -14 is the new online audio standard recommended by Spotify, as well - # as Amazon Echo - # * 0 disables normalization - # @!attribute [rw] high_boost - # @return [::Boolean] - # Enable boosting high frequency components. The default is `false`. - # - # **Note:** This field is not supported. - # @!attribute [rw] low_boost - # @return [::Boolean] - # Enable boosting low frequency components. The default is `false`. - # - # **Note:** This field is not supported. - class Audio - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video cropping configuration for the input video. The cropped input video - # is scaled to match the output resolution. - # @!attribute [rw] top_pixels - # @return [::Integer] - # The number of pixels to crop from the top. The default is 0. - # @!attribute [rw] bottom_pixels - # @return [::Integer] - # The number of pixels to crop from the bottom. The default is 0. - # @!attribute [rw] left_pixels - # @return [::Integer] - # The number of pixels to crop from the left. The default is 0. - # @!attribute [rw] right_pixels - # @return [::Integer] - # The number of pixels to crop from the right. The default is 0. - class Crop - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Pad filter configuration for the input video. The padded input video - # is scaled after padding with black to match the output resolution. - # @!attribute [rw] top_pixels - # @return [::Integer] - # The number of pixels to add to the top. The default is 0. - # @!attribute [rw] bottom_pixels - # @return [::Integer] - # The number of pixels to add to the bottom. The default is 0. - # @!attribute [rw] left_pixels - # @return [::Integer] - # The number of pixels to add to the left. The default is 0. - # @!attribute [rw] right_pixels - # @return [::Integer] - # The number of pixels to add to the right. The default is 0. - class Pad - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Deinterlace configuration for input video. - # @!attribute [rw] yadif - # @return [::Google::Cloud::Video::Transcoder::V1::PreprocessingConfig::Deinterlace::YadifConfig] - # Specifies the Yet Another Deinterlacing Filter Configuration. - # - # Note: The following fields are mutually exclusive: `yadif`, `bwdif`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bwdif - # @return [::Google::Cloud::Video::Transcoder::V1::PreprocessingConfig::Deinterlace::BwdifConfig] - # Specifies the Bob Weaver Deinterlacing Filter Configuration. - # - # Note: The following fields are mutually exclusive: `bwdif`, `yadif`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Deinterlace - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Yet Another Deinterlacing Filter Configuration. - # @!attribute [rw] mode - # @return [::String] - # Specifies the deinterlacing mode to adopt. - # The default is `send_frame`. - # Supported values: - # - # - `send_frame`: Output one frame for each frame - # - `send_field`: Output one frame for each field - # @!attribute [rw] disable_spatial_interlacing - # @return [::Boolean] - # Disable spacial interlacing. - # The default is `false`. - # @!attribute [rw] parity - # @return [::String] - # The picture field parity assumed for the input interlaced video. - # The default is `auto`. - # Supported values: - # - # - `tff`: Assume the top field is first - # - `bff`: Assume the bottom field is first - # - `auto`: Enable automatic detection of field parity - # @!attribute [rw] deinterlace_all_frames - # @return [::Boolean] - # Deinterlace all frames rather than just the frames identified as - # interlaced. The default is `false`. - class YadifConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Bob Weaver Deinterlacing Filter Configuration. - # @!attribute [rw] mode - # @return [::String] - # Specifies the deinterlacing mode to adopt. - # The default is `send_frame`. - # Supported values: - # - # - `send_frame`: Output one frame for each frame - # - `send_field`: Output one frame for each field - # @!attribute [rw] parity - # @return [::String] - # The picture field parity assumed for the input interlaced video. - # The default is `auto`. - # Supported values: - # - # - `tff`: Assume the top field is first - # - `bff`: Assume the bottom field is first - # - `auto`: Enable automatic detection of field parity - # @!attribute [rw] deinterlace_all_frames - # @return [::Boolean] - # Deinterlace all frames rather than just the frames identified as - # interlaced. The default is `false`. - class BwdifConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Track definition for the input asset. - # @!attribute [rw] input_track - # @return [::Integer] - # The input track. - # @!attribute [rw] languages - # @return [::Array<::String>] - # Optional. A list of languages spoken in the input asset, represented by a - # BCP 47 language code, such as "en-US" or "sr-Latn". For more information, - # see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - # @!attribute [rw] detect_languages - # @return [::Boolean] - # Optional. Whether to automatically detect the languages present in the - # track. If true, the system will attempt to identify all the languages - # present in the track and populate the languages field. - # @!attribute [r] detected_languages - # @return [::Array<::String>] - # Output only. A list of languages detected in the input asset, represented - # by a BCP 47 language code, such as "en-US" or "sr-Latn". For more - # information, see - # https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - # This field is only populated if the detect_languages field is set to true. - class TrackDefinition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Input attributes that provide additional information about the input asset. - # @!attribute [rw] track_definitions - # @return [::Array<::Google::Cloud::Video::Transcoder::V1::TrackDefinition>] - # Optional. A list of track definitions for the input asset. - class InputAttributes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video stream resource. - # @!attribute [rw] h264 - # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::H264CodecSettings] - # H264 codec settings. - # - # Note: The following fields are mutually exclusive: `h264`, `h265`, `vp9`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] h265 - # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::H265CodecSettings] - # H265 codec settings. - # - # Note: The following fields are mutually exclusive: `h265`, `h264`, `vp9`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] vp9 - # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::Vp9CodecSettings] - # VP9 codec settings. - # - # Note: The following fields are mutually exclusive: `vp9`, `h264`, `h265`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class VideoStream - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Convert the input video to a Standard Dynamic Range (SDR) video. - class H264ColorFormatSDR - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Convert the input video to a Hybrid Log Gamma (HLG) video. - class H264ColorFormatHLG - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # H264 codec settings. - # @!attribute [rw] width_pixels - # @return [::Integer] - # The width of the video in pixels. Must be an even integer. - # When not specified, the width is adjusted to match the specified height - # and input aspect ratio. If both are omitted, the input width is used. - # - # For portrait videos that contain horizontal ASR and rotation metadata, - # provide the width, in pixels, per the horizontal ASR. The API calculates - # the height per the horizontal ASR. The API detects any rotation metadata - # and swaps the requested height and width for the output. - # @!attribute [rw] height_pixels - # @return [::Integer] - # The height of the video in pixels. Must be an even integer. - # When not specified, the height is adjusted to match the specified width - # and input aspect ratio. If both are omitted, the input height is used. - # - # For portrait videos that contain horizontal ASR and rotation metadata, - # provide the height, in pixels, per the horizontal ASR. The API calculates - # the width per the horizontal ASR. The API detects any rotation metadata - # and swaps the requested height and width for the output. - # @!attribute [rw] frame_rate - # @return [::Float] - # Required. The target video frame rate in frames per second (FPS). Must be - # less than or equal to 120. - # @!attribute [rw] frame_rate_conversion_strategy - # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::FrameRateConversionStrategy] - # Optional. Frame rate conversion strategy for desired frame rate. The - # default is `DOWNSAMPLE`. - # @!attribute [rw] bitrate_bps - # @return [::Integer] - # Required. The video bitrate in bits per second. The minimum value is - # 1,000. The maximum value is 800,000,000. - # @!attribute [rw] pixel_format - # @return [::String] - # Pixel format to use. The default is `yuv420p`. - # - # Supported pixel formats: - # - # - `yuv420p` pixel format - # - `yuv422p` pixel format - # - `yuv444p` pixel format - # - `yuv420p10` 10-bit HDR pixel format - # - `yuv422p10` 10-bit HDR pixel format - # - `yuv444p10` 10-bit HDR pixel format - # - `yuv420p12` 12-bit HDR pixel format - # - `yuv422p12` 12-bit HDR pixel format - # - `yuv444p12` 12-bit HDR pixel format - # @!attribute [rw] rate_control_mode - # @return [::String] - # Specify the mode. The default is `vbr`. - # - # Supported rate control modes: - # - # - `vbr` - variable bitrate - # - `crf` - constant rate factor - # @!attribute [rw] crf_level - # @return [::Integer] - # Target CRF level. Must be between 10 and 36, where 10 is the highest - # quality and 36 is the most efficient compression. The default is 21. - # @!attribute [rw] allow_open_gop - # @return [::Boolean] - # Specifies whether an open Group of Pictures (GOP) structure should be - # allowed or not. The default is `false`. - # @!attribute [rw] gop_frame_count - # @return [::Integer] - # Select the GOP size based on the specified frame count. Must be greater - # than zero. - # - # Note: The following fields are mutually exclusive: `gop_frame_count`, `gop_duration`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gop_duration - # @return [::Google::Protobuf::Duration] - # Select the GOP size based on the specified duration. The default is - # `3s`. Note that `gopDuration` must be less than or equal to - # [`segmentDuration`](#SegmentSettings), and - # [`segmentDuration`](#SegmentSettings) must be divisible by - # `gopDuration`. - # - # Note: The following fields are mutually exclusive: `gop_duration`, `gop_frame_count`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] enable_two_pass - # @return [::Boolean] - # Use two-pass encoding strategy to achieve better video quality. - # {::Google::Cloud::Video::Transcoder::V1::VideoStream::H264CodecSettings#rate_control_mode H264CodecSettings.rate_control_mode} - # must be `vbr`. The default is `false`. - # @!attribute [rw] vbv_size_bits - # @return [::Integer] - # Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - # greater than zero. The default is equal to - # {::Google::Cloud::Video::Transcoder::V1::VideoStream::H264CodecSettings#bitrate_bps H264CodecSettings.bitrate_bps}. - # @!attribute [rw] vbv_fullness_bits - # @return [::Integer] - # Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - # Must be greater than zero. The default is equal to 90% of - # {::Google::Cloud::Video::Transcoder::V1::VideoStream::H264CodecSettings#vbv_size_bits H264CodecSettings.vbv_size_bits}. - # @!attribute [rw] entropy_coder - # @return [::String] - # The entropy coder to use. The default is `cabac`. - # - # Supported entropy coders: - # - # - `cavlc` - # - `cabac` - # @!attribute [rw] b_pyramid - # @return [::Boolean] - # Allow B-pyramid for reference frame selection. This may not be supported - # on all decoders. The default is `false`. - # @!attribute [rw] b_frame_count - # @return [::Integer] - # The number of consecutive B-frames. Must be greater than or equal to - # zero. Must be less than - # {::Google::Cloud::Video::Transcoder::V1::VideoStream::H264CodecSettings#gop_frame_count H264CodecSettings.gop_frame_count} - # if set. The default is 0. - # @!attribute [rw] aq_strength - # @return [::Float] - # Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - # and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - # higher value equals a lower bitrate but smoother image. The default is 0. - # @!attribute [rw] profile - # @return [::String] - # Enforces the specified codec profile. The following profiles are - # supported: - # - # * `baseline` - # * `main` - # * `high` (default) - # - # The available options are - # [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). - # Note that certain values for this field may cause the - # transcoder to override other fields you set in the `H264CodecSettings` - # message. - # @!attribute [rw] tune - # @return [::String] - # Enforces the specified codec tune. The available options are - # [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). - # Note that certain values for this field may cause the - # transcoder to override other fields you set in the `H264CodecSettings` - # message. - # @!attribute [rw] preset - # @return [::String] - # Enforces the specified codec preset. The default is `veryfast`. The - # available options are - # [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Preset). - # Note that certain values for this field may cause the - # transcoder to override other fields you set in the `H264CodecSettings` - # message. - # @!attribute [rw] sdr - # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::H264ColorFormatSDR] - # Optional. SDR color format setting for H264. - # - # Note: The following fields are mutually exclusive: `sdr`, `hlg`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] hlg - # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::H264ColorFormatHLG] - # Optional. HLG color format setting for H264. - # - # Note: The following fields are mutually exclusive: `hlg`, `sdr`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class H264CodecSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Convert the input video to a Standard Dynamic Range (SDR) video. - class H265ColorFormatSDR - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Convert the input video to a Hybrid Log Gamma (HLG) video. - class H265ColorFormatHLG - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Convert the input video to a High Dynamic Range 10 (HDR10) video. - class H265ColorFormatHDR10 - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # H265 codec settings. - # @!attribute [rw] width_pixels - # @return [::Integer] - # The width of the video in pixels. Must be an even integer. - # When not specified, the width is adjusted to match the specified height - # and input aspect ratio. If both are omitted, the input width is used. - # - # For portrait videos that contain horizontal ASR and rotation metadata, - # provide the width, in pixels, per the horizontal ASR. The API calculates - # the height per the horizontal ASR. The API detects any rotation metadata - # and swaps the requested height and width for the output. - # @!attribute [rw] height_pixels - # @return [::Integer] - # The height of the video in pixels. Must be an even integer. - # When not specified, the height is adjusted to match the specified width - # and input aspect ratio. If both are omitted, the input height is used. - # - # For portrait videos that contain horizontal ASR and rotation metadata, - # provide the height, in pixels, per the horizontal ASR. The API calculates - # the width per the horizontal ASR. The API detects any rotation metadata - # and swaps the requested height and width for the output. - # @!attribute [rw] frame_rate - # @return [::Float] - # Required. The target video frame rate in frames per second (FPS). Must be - # less than or equal to 120. - # @!attribute [rw] frame_rate_conversion_strategy - # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::FrameRateConversionStrategy] - # Optional. Frame rate conversion strategy for desired frame rate. The - # default is `DOWNSAMPLE`. - # @!attribute [rw] bitrate_bps - # @return [::Integer] - # Required. The video bitrate in bits per second. The minimum value is - # 1,000. The maximum value is 800,000,000. - # @!attribute [rw] pixel_format - # @return [::String] - # Pixel format to use. The default is `yuv420p`. - # - # Supported pixel formats: - # - # - `yuv420p` pixel format - # - `yuv422p` pixel format - # - `yuv444p` pixel format - # - `yuv420p10` 10-bit HDR pixel format - # - `yuv422p10` 10-bit HDR pixel format - # - `yuv444p10` 10-bit HDR pixel format - # - `yuv420p12` 12-bit HDR pixel format - # - `yuv422p12` 12-bit HDR pixel format - # - `yuv444p12` 12-bit HDR pixel format - # @!attribute [rw] rate_control_mode - # @return [::String] - # Specify the mode. The default is `vbr`. - # - # Supported rate control modes: - # - # - `vbr` - variable bitrate - # - `crf` - constant rate factor - # @!attribute [rw] crf_level - # @return [::Integer] - # Target CRF level. Must be between 10 and 36, where 10 is the highest - # quality and 36 is the most efficient compression. The default is 21. - # @!attribute [rw] allow_open_gop - # @return [::Boolean] - # Specifies whether an open Group of Pictures (GOP) structure should be - # allowed or not. The default is `false`. - # @!attribute [rw] gop_frame_count - # @return [::Integer] - # Select the GOP size based on the specified frame count. Must be greater - # than zero. - # - # Note: The following fields are mutually exclusive: `gop_frame_count`, `gop_duration`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gop_duration - # @return [::Google::Protobuf::Duration] - # Select the GOP size based on the specified duration. The default is - # `3s`. Note that `gopDuration` must be less than or equal to - # [`segmentDuration`](#SegmentSettings), and - # [`segmentDuration`](#SegmentSettings) must be divisible by - # `gopDuration`. - # - # Note: The following fields are mutually exclusive: `gop_duration`, `gop_frame_count`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] enable_two_pass - # @return [::Boolean] - # Use two-pass encoding strategy to achieve better video quality. - # {::Google::Cloud::Video::Transcoder::V1::VideoStream::H265CodecSettings#rate_control_mode H265CodecSettings.rate_control_mode} - # must be `vbr`. The default is `false`. - # @!attribute [rw] vbv_size_bits - # @return [::Integer] - # Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - # greater than zero. The default is equal to `VideoStream.bitrate_bps`. - # @!attribute [rw] vbv_fullness_bits - # @return [::Integer] - # Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - # Must be greater than zero. The default is equal to 90% of - # {::Google::Cloud::Video::Transcoder::V1::VideoStream::H265CodecSettings#vbv_size_bits H265CodecSettings.vbv_size_bits}. - # @!attribute [rw] b_pyramid - # @return [::Boolean] - # Allow B-pyramid for reference frame selection. This may not be supported - # on all decoders. The default is `false`. - # @!attribute [rw] b_frame_count - # @return [::Integer] - # The number of consecutive B-frames. Must be greater than or equal to - # zero. Must be less than - # {::Google::Cloud::Video::Transcoder::V1::VideoStream::H265CodecSettings#gop_frame_count H265CodecSettings.gop_frame_count} - # if set. The default is 0. - # @!attribute [rw] aq_strength - # @return [::Float] - # Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - # and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - # higher value equals a lower bitrate but smoother image. The default is 0. - # @!attribute [rw] profile - # @return [::String] - # Enforces the specified codec profile. The following profiles are - # supported: - # - # * 8-bit profiles - # * `main` (default) - # * `main-intra` - # * `mainstillpicture` - # * 10-bit profiles - # * `main10` (default) - # * `main10-intra` - # * `main422-10` - # * `main422-10-intra` - # * `main444-10` - # * `main444-10-intra` - # * 12-bit profiles - # * `main12` (default) - # * `main12-intra` - # * `main422-12` - # * `main422-12-intra` - # * `main444-12` - # * `main444-12-intra` - # - # The available options are - # [FFmpeg-compatible](https://x265.readthedocs.io/). - # Note that certain values for this field may cause the - # transcoder to override other fields you set in the `H265CodecSettings` - # message. - # @!attribute [rw] tune - # @return [::String] - # Enforces the specified codec tune. The available options are - # [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). - # Note that certain values for this field may cause the - # transcoder to override other fields you set in the `H265CodecSettings` - # message. - # @!attribute [rw] preset - # @return [::String] - # Enforces the specified codec preset. The default is `veryfast`. The - # available options are - # [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). - # Note that certain values for this field may cause the - # transcoder to override other fields you set in the `H265CodecSettings` - # message. - # @!attribute [rw] sdr - # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::H265ColorFormatSDR] - # Optional. SDR color format setting for H265. - # - # Note: The following fields are mutually exclusive: `sdr`, `hlg`, `hdr10`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] hlg - # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::H265ColorFormatHLG] - # Optional. HLG color format setting for H265. - # - # Note: The following fields are mutually exclusive: `hlg`, `sdr`, `hdr10`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] hdr10 - # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::H265ColorFormatHDR10] - # Optional. HDR10 color format setting for H265. - # - # Note: The following fields are mutually exclusive: `hdr10`, `sdr`, `hlg`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class H265CodecSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Convert the input video to a Standard Dynamic Range (SDR) video. - class Vp9ColorFormatSDR - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Convert the input video to a Hybrid Log Gamma (HLG) video. - class Vp9ColorFormatHLG - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # VP9 codec settings. - # @!attribute [rw] width_pixels - # @return [::Integer] - # The width of the video in pixels. Must be an even integer. - # When not specified, the width is adjusted to match the specified height - # and input aspect ratio. If both are omitted, the input width is used. - # - # For portrait videos that contain horizontal ASR and rotation metadata, - # provide the width, in pixels, per the horizontal ASR. The API calculates - # the height per the horizontal ASR. The API detects any rotation metadata - # and swaps the requested height and width for the output. - # @!attribute [rw] height_pixels - # @return [::Integer] - # The height of the video in pixels. Must be an even integer. - # When not specified, the height is adjusted to match the specified width - # and input aspect ratio. If both are omitted, the input height is used. - # - # For portrait videos that contain horizontal ASR and rotation metadata, - # provide the height, in pixels, per the horizontal ASR. The API calculates - # the width per the horizontal ASR. The API detects any rotation metadata - # and swaps the requested height and width for the output. - # @!attribute [rw] frame_rate - # @return [::Float] - # Required. The target video frame rate in frames per second (FPS). Must be - # less than or equal to 120. - # @!attribute [rw] frame_rate_conversion_strategy - # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::FrameRateConversionStrategy] - # Optional. Frame rate conversion strategy for desired frame rate. The - # default is `DOWNSAMPLE`. - # @!attribute [rw] bitrate_bps - # @return [::Integer] - # Required. The video bitrate in bits per second. The minimum value is - # 1,000. The maximum value is 480,000,000. - # @!attribute [rw] pixel_format - # @return [::String] - # Pixel format to use. The default is `yuv420p`. - # - # Supported pixel formats: - # - # - `yuv420p` pixel format - # - `yuv422p` pixel format - # - `yuv444p` pixel format - # - `yuv420p10` 10-bit HDR pixel format - # - `yuv422p10` 10-bit HDR pixel format - # - `yuv444p10` 10-bit HDR pixel format - # - `yuv420p12` 12-bit HDR pixel format - # - `yuv422p12` 12-bit HDR pixel format - # - `yuv444p12` 12-bit HDR pixel format - # @!attribute [rw] rate_control_mode - # @return [::String] - # Specify the mode. The default is `vbr`. - # - # Supported rate control modes: - # - # - `vbr` - variable bitrate - # @!attribute [rw] crf_level - # @return [::Integer] - # Target CRF level. Must be between 10 and 36, where 10 is the highest - # quality and 36 is the most efficient compression. The default is 21. - # - # **Note:** This field is not supported. - # @!attribute [rw] gop_frame_count - # @return [::Integer] - # Select the GOP size based on the specified frame count. Must be greater - # than zero. - # - # Note: The following fields are mutually exclusive: `gop_frame_count`, `gop_duration`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gop_duration - # @return [::Google::Protobuf::Duration] - # Select the GOP size based on the specified duration. The default is - # `3s`. Note that `gopDuration` must be less than or equal to - # [`segmentDuration`](#SegmentSettings), and - # [`segmentDuration`](#SegmentSettings) must be divisible by - # `gopDuration`. - # - # Note: The following fields are mutually exclusive: `gop_duration`, `gop_frame_count`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] profile - # @return [::String] - # Enforces the specified codec profile. The following profiles are - # supported: - # - # * `profile0` (default) - # * `profile1` - # * `profile2` - # * `profile3` - # - # The available options are - # [WebM-compatible](https://www.webmproject.org/vp9/profiles/). - # Note that certain values for this field may cause the - # transcoder to override other fields you set in the `Vp9CodecSettings` - # message. - # @!attribute [rw] sdr - # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::Vp9ColorFormatSDR] - # Optional. SDR color format setting for VP9. - # - # Note: The following fields are mutually exclusive: `sdr`, `hlg`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] hlg - # @return [::Google::Cloud::Video::Transcoder::V1::VideoStream::Vp9ColorFormatHLG] - # Optional. HLG color format setting for VP9. - # - # Note: The following fields are mutually exclusive: `hlg`, `sdr`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Vp9CodecSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The conversion strategy for desired frame rate. - module FrameRateConversionStrategy - # Unspecified frame rate conversion strategy. - FRAME_RATE_CONVERSION_STRATEGY_UNSPECIFIED = 0 - - # Selectively retain frames to reduce the output frame rate. - # Every _n_ th frame is kept, where `n = ceil(input frame rate / target - # frame rate)`. When _n_ = 1 (that is, the target frame rate is greater - # than the input frame rate), the output frame rate matches the input frame - # rate. When _n_ > 1, frames are dropped and the output frame rate is - # equal to `(input frame rate / n)`. For more information, see - # [Calculate frame - # rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate). - DOWNSAMPLE = 1 - - # Drop or duplicate frames to match the specified frame rate. - DROP_DUPLICATE = 2 - end - end - - # Audio stream resource. - # @!attribute [rw] codec - # @return [::String] - # The codec for this audio stream. The default is `aac`. - # - # Supported audio codecs: - # - # - `aac` - # - `aac-he` - # - `aac-he-v2` - # - `mp3` - # - `ac3` - # - `eac3` - # - `vorbis` - # @!attribute [rw] bitrate_bps - # @return [::Integer] - # Required. Audio bitrate in bits per second. Must be between 1 and - # 10,000,000. - # @!attribute [rw] channel_count - # @return [::Integer] - # Number of audio channels. Must be between 1 and 6. The default is 2. - # @!attribute [rw] channel_layout - # @return [::Array<::String>] - # A list of channel names specifying layout of the audio channels. - # This only affects the metadata embedded in the container headers, if - # supported by the specified format. The default is `["fl", "fr"]`. - # - # Supported channel names: - # - # - `fl` - Front left channel - # - `fr` - Front right channel - # - `sl` - Side left channel - # - `sr` - Side right channel - # - `fc` - Front center channel - # - `lfe` - Low frequency - # @!attribute [rw] mapping - # @return [::Array<::Google::Cloud::Video::Transcoder::V1::AudioStream::AudioMapping>] - # The mapping for the - # {::Google::Cloud::Video::Transcoder::V1::JobConfig#edit_list JobConfig.edit_list} - # atoms with audio - # {::Google::Cloud::Video::Transcoder::V1::EditAtom#inputs EditAtom.inputs}. - # @!attribute [rw] sample_rate_hertz - # @return [::Integer] - # The audio sample rate in Hertz. The default is 48000 Hertz. - # @!attribute [rw] language_code - # @return [::String] - # The BCP-47 language code, such as `en-US` or `sr-Latn`. For more - # information, see - # https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not - # supported in MP4 files. - # @!attribute [rw] display_name - # @return [::String] - # The name for this particular audio stream that - # will be added to the HLS/DASH manifest. Not supported in MP4 files. - class AudioStream - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The mapping for the - # {::Google::Cloud::Video::Transcoder::V1::JobConfig#edit_list JobConfig.edit_list} - # atoms with audio - # {::Google::Cloud::Video::Transcoder::V1::EditAtom#inputs EditAtom.inputs}. - # @!attribute [rw] atom_key - # @return [::String] - # Required. The - # {::Google::Cloud::Video::Transcoder::V1::EditAtom#key EditAtom.key} that - # references the atom with audio inputs in the - # {::Google::Cloud::Video::Transcoder::V1::JobConfig#edit_list JobConfig.edit_list}. - # @!attribute [rw] input_key - # @return [::String] - # Required. The {::Google::Cloud::Video::Transcoder::V1::Input#key Input.key} - # that identifies the input file. - # @!attribute [rw] input_track - # @return [::Integer] - # Required. The zero-based index of the track in the input file. - # @!attribute [rw] input_channel - # @return [::Integer] - # Required. The zero-based index of the channel in the input audio stream. - # @!attribute [rw] output_channel - # @return [::Integer] - # Required. The zero-based index of the channel in the output audio stream. - # @!attribute [rw] gain_db - # @return [::Float] - # Audio volume control in dB. Negative values decrease volume, - # positive values increase. The default is 0. - class AudioMapping - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Encoding of a text stream. For example, closed captions or subtitles. - # @!attribute [rw] codec - # @return [::String] - # The codec for this text stream. The default is `webvtt`. - # - # Supported text codecs: - # - # - `srt` - # - `ttml` - # - `cea608` - # - `cea708` - # - `webvtt` - # @!attribute [rw] language_code - # @return [::String] - # The BCP-47 language code, such as `en-US` or `sr-Latn`. For more - # information, see - # https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not - # supported in MP4 files. - # @!attribute [rw] mapping - # @return [::Array<::Google::Cloud::Video::Transcoder::V1::TextStream::TextMapping>] - # The mapping for the - # {::Google::Cloud::Video::Transcoder::V1::JobConfig#edit_list JobConfig.edit_list} - # atoms with text - # {::Google::Cloud::Video::Transcoder::V1::EditAtom#inputs EditAtom.inputs}. - # @!attribute [rw] display_name - # @return [::String] - # The name for this particular text stream that - # will be added to the HLS/DASH manifest. Not supported in MP4 files. - class TextStream - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The mapping for the - # {::Google::Cloud::Video::Transcoder::V1::JobConfig#edit_list JobConfig.edit_list} - # atoms with text - # {::Google::Cloud::Video::Transcoder::V1::EditAtom#inputs EditAtom.inputs}. - # @!attribute [rw] atom_key - # @return [::String] - # Required. The - # {::Google::Cloud::Video::Transcoder::V1::EditAtom#key EditAtom.key} that - # references atom with text inputs in the - # {::Google::Cloud::Video::Transcoder::V1::JobConfig#edit_list JobConfig.edit_list}. - # @!attribute [rw] input_key - # @return [::String] - # Required. The {::Google::Cloud::Video::Transcoder::V1::Input#key Input.key} - # that identifies the input file. - # @!attribute [rw] input_track - # @return [::Integer] - # Required. The zero-based index of the track in the input file. - class TextMapping - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Segment settings for `ts`, `fmp4` and `vtt`. - # @!attribute [rw] segment_duration - # @return [::Google::Protobuf::Duration] - # Duration of the segments in seconds. The default is `6.0s`. Note that - # `segmentDuration` must be greater than or equal to - # [`gopDuration`](#videostream), and `segmentDuration` must be divisible by - # [`gopDuration`](#videostream). - # @!attribute [rw] individual_segments - # @return [::Boolean] - # Required. Create an individual segment file. The default is `false`. - class SegmentSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Encryption settings. - # @!attribute [rw] id - # @return [::String] - # Required. Identifier for this set of encryption options. - # @!attribute [rw] aes_128 - # @return [::Google::Cloud::Video::Transcoder::V1::Encryption::Aes128Encryption] - # Configuration for AES-128 encryption. - # - # Note: The following fields are mutually exclusive: `aes_128`, `sample_aes`, `mpeg_cenc`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] sample_aes - # @return [::Google::Cloud::Video::Transcoder::V1::Encryption::SampleAesEncryption] - # Configuration for SAMPLE-AES encryption. - # - # Note: The following fields are mutually exclusive: `sample_aes`, `aes_128`, `mpeg_cenc`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] mpeg_cenc - # @return [::Google::Cloud::Video::Transcoder::V1::Encryption::MpegCommonEncryption] - # Configuration for MPEG Common Encryption (MPEG-CENC). - # - # Note: The following fields are mutually exclusive: `mpeg_cenc`, `aes_128`, `sample_aes`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] secret_manager_key_source - # @return [::Google::Cloud::Video::Transcoder::V1::Encryption::SecretManagerSource] - # Keys are stored in Google Secret Manager. - # @!attribute [rw] drm_systems - # @return [::Google::Cloud::Video::Transcoder::V1::Encryption::DrmSystems] - # Required. DRM system(s) to use; at least one must be specified. If a - # DRM system is omitted, it is considered disabled. - class Encryption - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for AES-128 encryption. - class Aes128Encryption - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for SAMPLE-AES encryption. - class SampleAesEncryption - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for MPEG Common Encryption (MPEG-CENC). - # @!attribute [rw] scheme - # @return [::String] - # Required. Specify the encryption scheme. - # - # Supported encryption schemes: - # - # - `cenc` - # - `cbcs` - class MpegCommonEncryption - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for secrets stored in Google Secret Manager. - # @!attribute [rw] secret_version - # @return [::String] - # Required. The name of the Secret Version containing the encryption key in - # the following format: - # `projects/{project}/secrets/{secret_id}/versions/{version_number}` - # - # Note that only numbered versions are supported. Aliases like "latest" are - # not supported. - class SecretManagerSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Widevine configuration. - class Widevine - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Fairplay configuration. - class Fairplay - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Playready configuration. - class Playready - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Clearkey configuration. - class Clearkey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines configuration for DRM systems in use. - # @!attribute [rw] widevine - # @return [::Google::Cloud::Video::Transcoder::V1::Encryption::Widevine] - # Widevine configuration. - # @!attribute [rw] fairplay - # @return [::Google::Cloud::Video::Transcoder::V1::Encryption::Fairplay] - # Fairplay configuration. - # @!attribute [rw] playready - # @return [::Google::Cloud::Video::Transcoder::V1::Encryption::Playready] - # Playready configuration. - # @!attribute [rw] clearkey - # @return [::Google::Cloud::Video::Transcoder::V1::Encryption::Clearkey] - # Clearkey configuration. - class DrmSystems - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/cloud/video/transcoder/v1/services.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/cloud/video/transcoder/v1/services.rb deleted file mode 100644 index 3a670aa7f739..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/cloud/video/transcoder/v1/services.rb +++ /dev/null @@ -1,190 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Video - module Transcoder - module V1 - # Request message for `TranscoderService.CreateJob`. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent location to create and process this job. - # Format: `projects/{project}/locations/{location}` - # @!attribute [rw] job - # @return [::Google::Cloud::Video::Transcoder::V1::Job] - # Required. Parameters for creating transcoding job. - class CreateJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TranscoderService.ListJobs`. - # The parent location from which to retrieve the collection of jobs. - # @!attribute [rw] parent - # @return [::String] - # Required. Format: `projects/{project}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return. - # @!attribute [rw] page_token - # @return [::String] - # The `next_page_token` value returned from a previous List request, if - # any. - # @!attribute [rw] filter - # @return [::String] - # The filter expression, following the syntax outlined in - # https://google.aip.dev/160. - # @!attribute [rw] order_by - # @return [::String] - # One or more fields to compare and use to sort the output. - # See https://google.aip.dev/132#ordering. - class ListJobsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TranscoderService.GetJob`. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the job to retrieve. - # Format: `projects/{project}/locations/{location}/jobs/{job}` - class GetJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TranscoderService.DeleteJob`. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the job to delete. - # Format: `projects/{project}/locations/{location}/jobs/{job}` - # @!attribute [rw] allow_missing - # @return [::Boolean] - # If set to true, and the job is not found, the request will succeed but no - # action will be taken on the server. - class DeleteJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TranscoderService.ListJobs`. - # @!attribute [rw] jobs - # @return [::Array<::Google::Cloud::Video::Transcoder::V1::Job>] - # List of jobs in the specified region. - # @!attribute [rw] next_page_token - # @return [::String] - # The pagination token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # List of regions that could not be reached. - class ListJobsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TranscoderService.CreateJobTemplate`. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent location to create this job template. - # Format: `projects/{project}/locations/{location}` - # @!attribute [rw] job_template - # @return [::Google::Cloud::Video::Transcoder::V1::JobTemplate] - # Required. Parameters for creating job template. - # @!attribute [rw] job_template_id - # @return [::String] - # Required. The ID to use for the job template, which will become the final - # component of the job template's resource name. - # - # This value should be 4-63 characters, and valid characters must match the - # regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. - class CreateJobTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TranscoderService.ListJobTemplates`. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent location from which to retrieve the collection of job - # templates. Format: `projects/{project}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return. - # @!attribute [rw] page_token - # @return [::String] - # The `next_page_token` value returned from a previous List request, if - # any. - # @!attribute [rw] filter - # @return [::String] - # The filter expression, following the syntax outlined in - # https://google.aip.dev/160. - # @!attribute [rw] order_by - # @return [::String] - # One or more fields to compare and use to sort the output. - # See https://google.aip.dev/132#ordering. - class ListJobTemplatesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TranscoderService.GetJobTemplate`. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the job template to retrieve. - # Format: - # `projects/{project}/locations/{location}/jobTemplates/{job_template}` - class GetJobTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TranscoderService.DeleteJobTemplate`. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the job template to delete. - # `projects/{project}/locations/{location}/jobTemplates/{job_template}` - # @!attribute [rw] allow_missing - # @return [::Boolean] - # If set to true, and the job template is not found, the request will succeed - # but no action will be taken on the server. - class DeleteJobTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TranscoderService.ListJobTemplates`. - # @!attribute [rw] job_templates - # @return [::Array<::Google::Cloud::Video::Transcoder::V1::JobTemplate>] - # List of job templates in the specified region. - # @!attribute [rw] next_page_token - # @return [::String] - # The pagination token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # List of regions that could not be reached. - class ListJobTemplatesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/Gemfile deleted file mode 100644 index 97b2f4237f53..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-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-video-transcoder-v1", path: "../" -else - gem "google-cloud-video-transcoder-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-video-transcoder-v1/snippets/snippet_metadata_google.cloud.video.transcoder.v1.json b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/snippet_metadata_google.cloud.video.transcoder.v1.json deleted file mode 100644 index 20712ba598b0..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/snippet_metadata_google.cloud.video.transcoder.v1.json +++ /dev/null @@ -1,335 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-video-transcoder-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.video.transcoder.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "transcoder_v1_generated_TranscoderService_CreateJob_sync", - "title": "Snippet for the create_job call in the TranscoderService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#create_job.", - "file": "transcoder_service/create_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_job", - "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#create_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Transcoder::V1::CreateJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::Transcoder::V1::Job", - "client": { - "short_name": "TranscoderService::Client", - "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client" - }, - "method": { - "short_name": "CreateJob", - "full_name": "google.cloud.video.transcoder.v1.TranscoderService.CreateJob", - "service": { - "short_name": "TranscoderService", - "full_name": "google.cloud.video.transcoder.v1.TranscoderService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "transcoder_v1_generated_TranscoderService_ListJobs_sync", - "title": "Snippet for the list_jobs call in the TranscoderService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#list_jobs.", - "file": "transcoder_service/list_jobs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_jobs", - "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#list_jobs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Transcoder::V1::ListJobsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::Transcoder::V1::ListJobsResponse", - "client": { - "short_name": "TranscoderService::Client", - "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client" - }, - "method": { - "short_name": "ListJobs", - "full_name": "google.cloud.video.transcoder.v1.TranscoderService.ListJobs", - "service": { - "short_name": "TranscoderService", - "full_name": "google.cloud.video.transcoder.v1.TranscoderService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "transcoder_v1_generated_TranscoderService_GetJob_sync", - "title": "Snippet for the get_job call in the TranscoderService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#get_job.", - "file": "transcoder_service/get_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_job", - "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#get_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Transcoder::V1::GetJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::Transcoder::V1::Job", - "client": { - "short_name": "TranscoderService::Client", - "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client" - }, - "method": { - "short_name": "GetJob", - "full_name": "google.cloud.video.transcoder.v1.TranscoderService.GetJob", - "service": { - "short_name": "TranscoderService", - "full_name": "google.cloud.video.transcoder.v1.TranscoderService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "transcoder_v1_generated_TranscoderService_DeleteJob_sync", - "title": "Snippet for the delete_job call in the TranscoderService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#delete_job.", - "file": "transcoder_service/delete_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_job", - "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#delete_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "TranscoderService::Client", - "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client" - }, - "method": { - "short_name": "DeleteJob", - "full_name": "google.cloud.video.transcoder.v1.TranscoderService.DeleteJob", - "service": { - "short_name": "TranscoderService", - "full_name": "google.cloud.video.transcoder.v1.TranscoderService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "transcoder_v1_generated_TranscoderService_CreateJobTemplate_sync", - "title": "Snippet for the create_job_template call in the TranscoderService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#create_job_template.", - "file": "transcoder_service/create_job_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_job_template", - "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#create_job_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::Transcoder::V1::JobTemplate", - "client": { - "short_name": "TranscoderService::Client", - "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client" - }, - "method": { - "short_name": "CreateJobTemplate", - "full_name": "google.cloud.video.transcoder.v1.TranscoderService.CreateJobTemplate", - "service": { - "short_name": "TranscoderService", - "full_name": "google.cloud.video.transcoder.v1.TranscoderService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "transcoder_v1_generated_TranscoderService_ListJobTemplates_sync", - "title": "Snippet for the list_job_templates call in the TranscoderService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#list_job_templates.", - "file": "transcoder_service/list_job_templates.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_job_templates", - "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#list_job_templates", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesResponse", - "client": { - "short_name": "TranscoderService::Client", - "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client" - }, - "method": { - "short_name": "ListJobTemplates", - "full_name": "google.cloud.video.transcoder.v1.TranscoderService.ListJobTemplates", - "service": { - "short_name": "TranscoderService", - "full_name": "google.cloud.video.transcoder.v1.TranscoderService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "transcoder_v1_generated_TranscoderService_GetJobTemplate_sync", - "title": "Snippet for the get_job_template call in the TranscoderService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#get_job_template.", - "file": "transcoder_service/get_job_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_job_template", - "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#get_job_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Video::Transcoder::V1::JobTemplate", - "client": { - "short_name": "TranscoderService::Client", - "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client" - }, - "method": { - "short_name": "GetJobTemplate", - "full_name": "google.cloud.video.transcoder.v1.TranscoderService.GetJobTemplate", - "service": { - "short_name": "TranscoderService", - "full_name": "google.cloud.video.transcoder.v1.TranscoderService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "transcoder_v1_generated_TranscoderService_DeleteJobTemplate_sync", - "title": "Snippet for the delete_job_template call in the TranscoderService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#delete_job_template.", - "file": "transcoder_service/delete_job_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_job_template", - "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#delete_job_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "TranscoderService::Client", - "full_name": "::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client" - }, - "method": { - "short_name": "DeleteJobTemplate", - "full_name": "google.cloud.video.transcoder.v1.TranscoderService.DeleteJobTemplate", - "service": { - "short_name": "TranscoderService", - "full_name": "google.cloud.video.transcoder.v1.TranscoderService" - } - } - }, - "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-video-transcoder-v1/snippets/transcoder_service/create_job.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/create_job.rb deleted file mode 100644 index e57e49dfae29..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/create_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START transcoder_v1_generated_TranscoderService_CreateJob_sync] -require "google/cloud/video/transcoder/v1" - -## -# Snippet for the create_job call in the TranscoderService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#create_job. -# -def create_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Transcoder::V1::CreateJobRequest.new - - # Call the create_job method. - result = client.create_job request - - # The returned object is of type Google::Cloud::Video::Transcoder::V1::Job. - p result -end -# [END transcoder_v1_generated_TranscoderService_CreateJob_sync] diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/create_job_template.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/create_job_template.rb deleted file mode 100644 index f3584b0dd7ff..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/create_job_template.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 transcoder_v1_generated_TranscoderService_CreateJobTemplate_sync] -require "google/cloud/video/transcoder/v1" - -## -# Snippet for the create_job_template call in the TranscoderService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#create_job_template. -# -def create_job_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest.new - - # Call the create_job_template method. - result = client.create_job_template request - - # The returned object is of type Google::Cloud::Video::Transcoder::V1::JobTemplate. - p result -end -# [END transcoder_v1_generated_TranscoderService_CreateJobTemplate_sync] diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/delete_job.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/delete_job.rb deleted file mode 100644 index 7f91ab7e899c..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/delete_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START transcoder_v1_generated_TranscoderService_DeleteJob_sync] -require "google/cloud/video/transcoder/v1" - -## -# Snippet for the delete_job call in the TranscoderService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#delete_job. -# -def delete_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Transcoder::V1::DeleteJobRequest.new - - # Call the delete_job method. - result = client.delete_job request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END transcoder_v1_generated_TranscoderService_DeleteJob_sync] diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/delete_job_template.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/delete_job_template.rb deleted file mode 100644 index b32f99c777ed..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/delete_job_template.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 transcoder_v1_generated_TranscoderService_DeleteJobTemplate_sync] -require "google/cloud/video/transcoder/v1" - -## -# Snippet for the delete_job_template call in the TranscoderService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#delete_job_template. -# -def delete_job_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest.new - - # Call the delete_job_template method. - result = client.delete_job_template request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END transcoder_v1_generated_TranscoderService_DeleteJobTemplate_sync] diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/get_job.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/get_job.rb deleted file mode 100644 index fc2aa2bcc67b..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/get_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START transcoder_v1_generated_TranscoderService_GetJob_sync] -require "google/cloud/video/transcoder/v1" - -## -# Snippet for the get_job call in the TranscoderService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#get_job. -# -def get_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Transcoder::V1::GetJobRequest.new - - # Call the get_job method. - result = client.get_job request - - # The returned object is of type Google::Cloud::Video::Transcoder::V1::Job. - p result -end -# [END transcoder_v1_generated_TranscoderService_GetJob_sync] diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/get_job_template.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/get_job_template.rb deleted file mode 100644 index b2e5796596f9..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/get_job_template.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 transcoder_v1_generated_TranscoderService_GetJobTemplate_sync] -require "google/cloud/video/transcoder/v1" - -## -# Snippet for the get_job_template call in the TranscoderService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#get_job_template. -# -def get_job_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest.new - - # Call the get_job_template method. - result = client.get_job_template request - - # The returned object is of type Google::Cloud::Video::Transcoder::V1::JobTemplate. - p result -end -# [END transcoder_v1_generated_TranscoderService_GetJobTemplate_sync] diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/list_job_templates.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/list_job_templates.rb deleted file mode 100644 index 1d7806f8df76..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/list_job_templates.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 transcoder_v1_generated_TranscoderService_ListJobTemplates_sync] -require "google/cloud/video/transcoder/v1" - -## -# Snippet for the list_job_templates call in the TranscoderService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#list_job_templates. -# -def list_job_templates - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest.new - - # Call the list_job_templates method. - result = client.list_job_templates request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Video::Transcoder::V1::JobTemplate. - p item - end -end -# [END transcoder_v1_generated_TranscoderService_ListJobTemplates_sync] diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/list_jobs.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/list_jobs.rb deleted file mode 100644 index 538fdc5f9444..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/snippets/transcoder_service/list_jobs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START transcoder_v1_generated_TranscoderService_ListJobs_sync] -require "google/cloud/video/transcoder/v1" - -## -# Snippet for the list_jobs call in the TranscoderService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Video::Transcoder::V1::TranscoderService::Client#list_jobs. -# -def list_jobs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Video::Transcoder::V1::ListJobsRequest.new - - # Call the list_jobs method. - result = client.list_jobs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Video::Transcoder::V1::Job. - p item - end -end -# [END transcoder_v1_generated_TranscoderService_ListJobs_sync] diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/test/google/cloud/video/transcoder/v1/transcoder_service_paths_test.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/test/google/cloud/video/transcoder/v1/transcoder_service_paths_test.rb deleted file mode 100644 index 91c6c6dedbd6..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/test/google/cloud/video/transcoder/v1/transcoder_service_paths_test.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/video/transcoder/v1/transcoder_service" - -class ::Google::Cloud::Video::Transcoder::V1::TranscoderService::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_job_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.job_path project: "value0", location: "value1", job: "value2" - assert_equal "projects/value0/locations/value1/jobs/value2", path - end - end - - def test_job_template_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.job_template_path project: "value0", location: "value1", job_template: "value2" - assert_equal "projects/value0/locations/value1/jobTemplates/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::Video::Transcoder::V1::TranscoderService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/test/google/cloud/video/transcoder/v1/transcoder_service_rest_test.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/test/google/cloud/video/transcoder/v1/transcoder_service_rest_test.rb deleted file mode 100644 index b8f33856e029..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/test/google/cloud/video/transcoder/v1/transcoder_service_rest_test.rb +++ /dev/null @@ -1,544 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/video/transcoder/v1/services_pb" -require "google/cloud/video/transcoder/v1/transcoder_service/rest" - - -class ::Google::Cloud::Video::Transcoder::V1::TranscoderService::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_job - # Create test objects. - client_result = ::Google::Cloud::Video::Transcoder::V1::Job.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - job = {} - - create_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::ServiceStub.stub :transcode_create_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_job_client_stub do - # Create client - client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_job({ parent: parent, job: job }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_job parent: parent, job: job do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_job ::Google::Cloud::Video::Transcoder::V1::CreateJobRequest.new(parent: parent, job: job) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_job({ parent: parent, job: job }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_job(::Google::Cloud::Video::Transcoder::V1::CreateJobRequest.new(parent: parent, job: job), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_job_client_stub.call_count - end - end - end - - def test_list_jobs - # Create test objects. - client_result = ::Google::Cloud::Video::Transcoder::V1::ListJobsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::ServiceStub.stub :transcode_list_jobs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_jobs_client_stub do - # Create client - client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_jobs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_jobs ::Google::Cloud::Video::Transcoder::V1::ListJobsRequest.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_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_jobs(::Google::Cloud::Video::Transcoder::V1::ListJobsRequest.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_jobs_client_stub.call_count - end - end - end - - def test_get_job - # Create test objects. - client_result = ::Google::Cloud::Video::Transcoder::V1::Job.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::ServiceStub.stub :transcode_get_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_job_client_stub do - # Create client - client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_job({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_job name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_job ::Google::Cloud::Video::Transcoder::V1::GetJobRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_job({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_job(::Google::Cloud::Video::Transcoder::V1::GetJobRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_job_client_stub.call_count - end - end - end - - def test_delete_job - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - allow_missing = true - - delete_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::ServiceStub.stub :transcode_delete_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_job_client_stub do - # Create client - client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_job({ name: name, allow_missing: allow_missing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_job name: name, allow_missing: allow_missing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_job ::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest.new(name: name, allow_missing: allow_missing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_job({ name: name, allow_missing: allow_missing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_job(::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest.new(name: name, allow_missing: allow_missing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_job_client_stub.call_count - end - end - end - - def test_create_job_template - # Create test objects. - client_result = ::Google::Cloud::Video::Transcoder::V1::JobTemplate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - job_template = {} - job_template_id = "hello world" - - create_job_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::ServiceStub.stub :transcode_create_job_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_job_template_client_stub do - # Create client - client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_job_template({ parent: parent, job_template: job_template, job_template_id: job_template_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_job_template parent: parent, job_template: job_template, job_template_id: job_template_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_job_template ::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest.new(parent: parent, job_template: job_template, job_template_id: job_template_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_job_template({ parent: parent, job_template: job_template, job_template_id: job_template_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_job_template(::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest.new(parent: parent, job_template: job_template, job_template_id: job_template_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_job_template_client_stub.call_count - end - end - end - - def test_list_job_templates - # Create test objects. - client_result = ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesResponse.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_job_templates_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::ServiceStub.stub :transcode_list_job_templates_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_job_templates_client_stub do - # Create client - client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_job_templates({ parent: parent, page_size: 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_job_templates parent: parent, page_size: 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_job_templates ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest.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_job_templates({ parent: parent, page_size: page_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_job_templates(::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest.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_job_templates_client_stub.call_count - end - end - end - - def test_get_job_template - # Create test objects. - client_result = ::Google::Cloud::Video::Transcoder::V1::JobTemplate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_job_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::ServiceStub.stub :transcode_get_job_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_job_template_client_stub do - # Create client - client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_job_template({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_job_template name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_job_template ::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_job_template({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_job_template(::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_job_template_client_stub.call_count - end - end - end - - def test_delete_job_template - # 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" - allow_missing = true - - delete_job_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::ServiceStub.stub :transcode_delete_job_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_job_template_client_stub do - # Create client - client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_job_template({ name: name, allow_missing: allow_missing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_job_template name: name, allow_missing: allow_missing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_job_template ::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest.new(name: name, allow_missing: allow_missing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_job_template({ name: name, allow_missing: allow_missing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_job_template(::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest.new(name: name, allow_missing: allow_missing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_job_template_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::Video::Transcoder::V1::TranscoderService::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::Video::Transcoder::V1::TranscoderService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/test/google/cloud/video/transcoder/v1/transcoder_service_test.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/test/google/cloud/video/transcoder/v1/transcoder_service_test.rb deleted file mode 100644 index e6311ef452dc..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/test/google/cloud/video/transcoder/v1/transcoder_service_test.rb +++ /dev/null @@ -1,604 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/video/transcoder/v1/services_pb" -require "google/cloud/video/transcoder/v1/transcoder_service" - -class ::Google::Cloud::Video::Transcoder::V1::TranscoderService::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_job - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::Transcoder::V1::Job.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - job = {} - - create_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_job, name - assert_kind_of ::Google::Cloud::Video::Transcoder::V1::CreateJobRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::Transcoder::V1::Job), request["job"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_job_client_stub do - # Create client - client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_job({ parent: parent, job: job }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_job parent: parent, job: job do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_job ::Google::Cloud::Video::Transcoder::V1::CreateJobRequest.new(parent: parent, job: job) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_job({ parent: parent, job: job }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_job(::Google::Cloud::Video::Transcoder::V1::CreateJobRequest.new(parent: parent, job: job), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_job_client_stub.call_rpc_count - end - end - - def test_list_jobs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::Transcoder::V1::ListJobsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_jobs, name - assert_kind_of ::Google::Cloud::Video::Transcoder::V1::ListJobsRequest, 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_jobs_client_stub do - # Create client - client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_jobs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_jobs ::Google::Cloud::Video::Transcoder::V1::ListJobsRequest.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_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_jobs(::Google::Cloud::Video::Transcoder::V1::ListJobsRequest.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_jobs_client_stub.call_rpc_count - end - end - - def test_get_job - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::Transcoder::V1::Job.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_job, name - assert_kind_of ::Google::Cloud::Video::Transcoder::V1::GetJobRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_job_client_stub do - # Create client - client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_job({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_job name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_job ::Google::Cloud::Video::Transcoder::V1::GetJobRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_job({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_job(::Google::Cloud::Video::Transcoder::V1::GetJobRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_job_client_stub.call_rpc_count - end - end - - def test_delete_job - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - allow_missing = true - - delete_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_job, name - assert_kind_of ::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["allow_missing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_job_client_stub do - # Create client - client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_job({ name: name, allow_missing: allow_missing }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_job name: name, allow_missing: allow_missing do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_job ::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest.new(name: name, allow_missing: allow_missing) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_job({ name: name, allow_missing: allow_missing }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_job(::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest.new(name: name, allow_missing: allow_missing), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_job_client_stub.call_rpc_count - end - end - - def test_create_job_template - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::Transcoder::V1::JobTemplate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - job_template = {} - job_template_id = "hello world" - - create_job_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_job_template, name - assert_kind_of ::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Video::Transcoder::V1::JobTemplate), request["job_template"] - assert_equal "hello world", request["job_template_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_job_template_client_stub do - # Create client - client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_job_template({ parent: parent, job_template: job_template, job_template_id: job_template_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_job_template parent: parent, job_template: job_template, job_template_id: job_template_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_job_template ::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest.new(parent: parent, job_template: job_template, job_template_id: job_template_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_job_template({ parent: parent, job_template: job_template, job_template_id: job_template_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_job_template(::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest.new(parent: parent, job_template: job_template, job_template_id: job_template_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_job_template_client_stub.call_rpc_count - end - end - - def test_list_job_templates - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_job_templates_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_job_templates, name - assert_kind_of ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest, 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_job_templates_client_stub do - # Create client - client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_job_templates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_job_templates parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_job_templates ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest.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_job_templates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_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_job_templates(::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest.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_job_templates_client_stub.call_rpc_count - end - end - - def test_get_job_template - # Create GRPC objects. - grpc_response = ::Google::Cloud::Video::Transcoder::V1::JobTemplate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_job_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_job_template, name - assert_kind_of ::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_job_template_client_stub do - # Create client - client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_job_template({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_job_template name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_job_template ::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_job_template({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_job_template(::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_job_template_client_stub.call_rpc_count - end - end - - def test_delete_job_template - # 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" - allow_missing = true - - delete_job_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_job_template, name - assert_kind_of ::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["allow_missing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_job_template_client_stub do - # Create client - client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_job_template({ name: name, allow_missing: allow_missing }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_job_template name: name, allow_missing: allow_missing do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_job_template ::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest.new(name: name, allow_missing: allow_missing) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_job_template({ name: name, allow_missing: allow_missing }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_job_template(::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest.new(name: name, allow_missing: allow_missing), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_job_template_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::Video::Transcoder::V1::TranscoderService::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::Video::Transcoder::V1::TranscoderService::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::Video::Transcoder::V1::TranscoderService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-video-transcoder-v1/test/helper.rb b/owl-bot-staging/google-cloud-video-transcoder-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-video-transcoder-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/.gitignore b/owl-bot-staging/google-cloud-video_intelligence-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-video_intelligence-v1/.repo-metadata.json deleted file mode 100644 index fd72c6eaa8bc..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "videointelligence.googleapis.com", - "api_shortname": "videointelligence", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-video_intelligence-v1/latest", - "distribution_name": "google-cloud-video_intelligence-v1", - "is_cloud": true, - "language": "ruby", - "name": "videointelligence", - "name_pretty": "Cloud Video Intelligence V1 API", - "product_documentation": "https://cloud.google.com/video-intelligence", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API. Note that google-cloud-video_intelligence-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video_intelligence instead. See the readme for more details.", - "ruby-cloud-env-prefix": "VIDEO_INTELLIGENCE", - "ruby-cloud-product-url": "https://cloud.google.com/video-intelligence", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/.rubocop.yml b/owl-bot-staging/google-cloud-video_intelligence-v1/.rubocop.yml deleted file mode 100644 index 697ce3ad8472..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-video_intelligence-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-video_intelligence-v1.rb" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/.toys.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1/.yardopts b/owl-bot-staging/google-cloud-video_intelligence-v1/.yardopts deleted file mode 100644 index a5654de497b4..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Video Intelligence 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-video_intelligence-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-video_intelligence-v1/AUTHENTICATION.md deleted file mode 100644 index c0eda224807f..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-video_intelligence-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-video_intelligence-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/video_intelligence/v1" - -client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/video_intelligence/v1" - -::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::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-video_intelligence-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/video_intelligence/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::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-video_intelligence-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-video_intelligence-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/Gemfile b/owl-bot-staging/google-cloud-video_intelligence-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/LICENSE.md b/owl-bot-staging/google-cloud-video_intelligence-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1/README.md b/owl-bot-staging/google-cloud-video_intelligence-v1/README.md deleted file mode 100644 index dd633f99baa3..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Cloud Video Intelligence V1 API - -Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming 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 Cloud Video Intelligence V1 API. Most users should consider using -the main client gem, -[google-cloud-video_intelligence](https://rubygems.org/gems/google-cloud-video_intelligence). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-video_intelligence-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/videointelligence.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/video_intelligence/v1" - -client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new -request = ::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest.new # (request fields as keyword arguments...) -response = client.annotate_video request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-video_intelligence-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/video-intelligence) -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/video_intelligence/v1" -require "logger" - -client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::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-video_intelligence`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-video_intelligence-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-video_intelligence`. -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-video_intelligence-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-video_intelligence-v1/Rakefile b/owl-bot-staging/google-cloud-video_intelligence-v1/Rakefile deleted file mode 100644 index be41ab6af9b2..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["VIDEO_INTELLIGENCE_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["VIDEO_INTELLIGENCE_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["VIDEO_INTELLIGENCE_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 VIDEO_INTELLIGENCE_TEST_PROJECT=test123 VIDEO_INTELLIGENCE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/video_intelligence/v1/video_intelligence_service/credentials" - ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["VIDEO_INTELLIGENCE_PROJECT"] = project - ENV["VIDEO_INTELLIGENCE_TEST_PROJECT"] = project - ENV["VIDEO_INTELLIGENCE_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-video_intelligence-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-video_intelligence-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-video_intelligence-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-video_intelligence-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-video_intelligence-v1" - header "google-cloud-video_intelligence-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-video_intelligence-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-video_intelligence-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-video_intelligence-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-video_intelligence-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-video_intelligence-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-video_intelligence-v1/gapic_metadata.json deleted file mode 100644 index c63f91c761e5..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/gapic_metadata.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.videointelligence.v1", - "libraryPackage": "::Google::Cloud::VideoIntelligence::V1", - "services": { - "VideoIntelligenceService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client", - "rpcs": { - "AnnotateVideo": { - "methods": [ - "annotate_video" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/google-cloud-video_intelligence-v1.gemspec b/owl-bot-staging/google-cloud-video_intelligence-v1/google-cloud-video_intelligence-v1.gemspec deleted file mode 100644 index bd13d57851fe..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/google-cloud-video_intelligence-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/video_intelligence/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-video_intelligence-v1" - gem.version = Google::Cloud::VideoIntelligence::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API. Note that google-cloud-video_intelligence-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video_intelligence instead. See the readme for more details." - gem.summary = "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming 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.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google-cloud-video_intelligence-v1.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google-cloud-video_intelligence-v1.rb deleted file mode 100644 index 5cf564001ea9..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google-cloud-video_intelligence-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/video_intelligence/v1" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1.rb deleted file mode 100644 index dc3277529713..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/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/video_intelligence/v1/video_intelligence_service" -require "google/cloud/video_intelligence/v1/version" - -module Google - module Cloud - module VideoIntelligence - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/video_intelligence/v1" - # client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/video_intelligence/v1" - # client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/video_intelligence/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/rest.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/rest.rb deleted file mode 100644 index 4c8ddf732c3a..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/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/video_intelligence/v1/video_intelligence_service/rest" -require "google/cloud/video_intelligence/v1/version" - -module Google - module Cloud - module VideoIntelligence - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/video_intelligence/v1/rest" - # client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/version.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/version.rb deleted file mode 100644 index 6775de1f8f63..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/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 VideoIntelligence - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service.rb deleted file mode 100644 index 0c182f50e7b8..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service.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/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/video_intelligence/v1/version" - -require "google/cloud/video_intelligence/v1/video_intelligence_service/credentials" -require "google/cloud/video_intelligence/v1/video_intelligence_service/operations" -require "google/cloud/video_intelligence/v1/video_intelligence_service/client" -require "google/cloud/video_intelligence/v1/video_intelligence_service/rest" - -module Google - module Cloud - module VideoIntelligence - module V1 - ## - # Service that implements the Video Intelligence API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/video_intelligence/v1/video_intelligence_service" - # client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/video_intelligence/v1/video_intelligence_service/rest" - # client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client.new - # - module VideoIntelligenceService - end - end - end - end -end - -helper_path = ::File.join __dir__, "video_intelligence_service", "helpers.rb" -require "google/cloud/video_intelligence/v1/video_intelligence_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/client.rb deleted file mode 100644 index 6853d23a2ffd..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/client.rb +++ /dev/null @@ -1,526 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/videointelligence/v1/video_intelligence_pb" - -module Google - module Cloud - module VideoIntelligence - module V1 - module VideoIntelligenceService - ## - # Client for the VideoIntelligenceService service. - # - # Service that implements the Video Intelligence API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :video_intelligence_service_stub - - ## - # Configure the VideoIntelligenceService Client class. - # - # See {::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all VideoIntelligenceService clients - # ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::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", "VideoIntelligence", "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.annotate_video.timeout = 600.0 - default_config.rpcs.annotate_video.retry_policy = { - initial_delay: 1.0, max_delay: 120.0, multiplier: 2.5, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the VideoIntelligenceService 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::VideoIntelligence::V1::VideoIntelligenceService::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 - @video_intelligence_service_stub.universe_domain - end - - ## - # Create a new VideoIntelligenceService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the VideoIntelligenceService 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/videointelligence/v1/video_intelligence_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 - - @video_intelligence_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::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 - ) - - @video_intelligence_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 - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @video_intelligence_service_stub.logger - end - - # Service calls - - ## - # Performs asynchronous video annotation. Progress and results can be - # retrieved through the `google.longrunning.Operations` interface. - # `Operation.metadata` contains `AnnotateVideoProgress` (progress). - # `Operation.response` contains `AnnotateVideoResponse` (results). - # - # @overload annotate_video(request, options = nil) - # Pass arguments to `annotate_video` via a request object, either of type - # {::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload annotate_video(input_uri: nil, input_content: nil, features: nil, video_context: nil, output_uri: nil, location_id: nil) - # Pass arguments to `annotate_video` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param input_uri [::String] - # Input video location. Currently, only - # [Cloud Storage](https://cloud.google.com/storage/) URIs are - # supported. URIs must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - # more information, see [Request - # URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify - # multiple videos, a video URI may include wildcards in the `object-id`. - # Supported wildcards: '*' to match 0 or more characters; - # '?' to match 1 character. If unset, the input video should be embedded - # in the request as `input_content`. If set, `input_content` must be unset. - # @param input_content [::String] - # The video data bytes. - # If unset, the input video(s) should be specified via the `input_uri`. - # If set, `input_uri` must be unset. - # @param features [::Array<::Google::Cloud::VideoIntelligence::V1::Feature>] - # Required. Requested video annotation features. - # @param video_context [::Google::Cloud::VideoIntelligence::V1::VideoContext, ::Hash] - # Additional video context and/or feature-specific parameters. - # @param output_uri [::String] - # Optional. Location where the output (in JSON format) should be stored. - # Currently, only [Cloud Storage](https://cloud.google.com/storage/) - # URIs are supported. These must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - # more information, see [Request - # URIs](https://cloud.google.com/storage/docs/request-endpoints). - # @param location_id [::String] - # Optional. Cloud region where annotation should take place. Supported cloud - # regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no - # region is specified, the region will be determined based on video file - # 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/video_intelligence/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest.new - # - # # Call the annotate_video method. - # result = client.annotate_video request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def annotate_video request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.annotate_video.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::VideoIntelligence::V1::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.annotate_video.timeout, - metadata: metadata, - retry_policy: @config.rpcs.annotate_video.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_intelligence_service_stub.call_rpc :annotate_video, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 VideoIntelligenceService API. - # - # This class represents the configuration for VideoIntelligenceService, - # 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::VideoIntelligence::V1::VideoIntelligenceService::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 - # # annotate_video to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.annotate_video.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.annotate_video.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::VideoIntelligence::V1::VideoIntelligenceService::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 = "videointelligence.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 VideoIntelligenceService 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 `annotate_video` - # @return [::Gapic::Config::Method] - # - attr_reader :annotate_video - - # @private - def initialize parent_rpcs = nil - annotate_video_config = parent_rpcs.annotate_video if parent_rpcs.respond_to? :annotate_video - @annotate_video = ::Gapic::Config::Method.new annotate_video_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/credentials.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/credentials.rb deleted file mode 100644 index 7e5f41c8e344..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_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 VideoIntelligence - module V1 - module VideoIntelligenceService - # Credentials for the VideoIntelligenceService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "VIDEO_INTELLIGENCE_CREDENTIALS", - "VIDEO_INTELLIGENCE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "VIDEO_INTELLIGENCE_CREDENTIALS_JSON", - "VIDEO_INTELLIGENCE_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-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/operations.rb deleted file mode 100644 index 72a71611c2c5..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_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 VideoIntelligence - module V1 - module VideoIntelligenceService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the VideoIntelligenceService 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 VideoIntelligenceService 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::VideoIntelligence::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::VideoIntelligence::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::VideoIntelligence::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::VideoIntelligence::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::VideoIntelligence::V1::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 = "videointelligence.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-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest.rb deleted file mode 100644 index 5e8aa73048ff..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest.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 "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/video_intelligence/v1/version" - -require "google/cloud/video_intelligence/v1/video_intelligence_service/credentials" -require "google/cloud/video_intelligence/v1/video_intelligence_service/rest/operations" -require "google/cloud/video_intelligence/v1/video_intelligence_service/rest/client" - -module Google - module Cloud - module VideoIntelligence - module V1 - ## - # Service that implements the Video Intelligence API. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/video_intelligence/v1/video_intelligence_service/rest" - # client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client.new - # - module VideoIntelligenceService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/video_intelligence/v1/video_intelligence_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest/client.rb deleted file mode 100644 index 760b8450aae2..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest/client.rb +++ /dev/null @@ -1,484 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/videointelligence/v1/video_intelligence_pb" -require "google/cloud/video_intelligence/v1/video_intelligence_service/rest/service_stub" - -module Google - module Cloud - module VideoIntelligence - module V1 - module VideoIntelligenceService - module Rest - ## - # REST client for the VideoIntelligenceService service. - # - # Service that implements the Video Intelligence API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :video_intelligence_service_stub - - ## - # Configure the VideoIntelligenceService Client class. - # - # See {::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all VideoIntelligenceService clients - # ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::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", "VideoIntelligence", "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.annotate_video.timeout = 600.0 - default_config.rpcs.annotate_video.retry_policy = { - initial_delay: 1.0, max_delay: 120.0, multiplier: 2.5, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the VideoIntelligenceService 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::VideoIntelligence::V1::VideoIntelligenceService::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 - @video_intelligence_service_stub.universe_domain - end - - ## - # Create a new VideoIntelligenceService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the VideoIntelligenceService 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::VideoIntelligence::V1::VideoIntelligenceService::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 - - @video_intelligence_service_stub = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @video_intelligence_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 - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @video_intelligence_service_stub.logger - end - - # Service calls - - ## - # Performs asynchronous video annotation. Progress and results can be - # retrieved through the `google.longrunning.Operations` interface. - # `Operation.metadata` contains `AnnotateVideoProgress` (progress). - # `Operation.response` contains `AnnotateVideoResponse` (results). - # - # @overload annotate_video(request, options = nil) - # Pass arguments to `annotate_video` via a request object, either of type - # {::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload annotate_video(input_uri: nil, input_content: nil, features: nil, video_context: nil, output_uri: nil, location_id: nil) - # Pass arguments to `annotate_video` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param input_uri [::String] - # Input video location. Currently, only - # [Cloud Storage](https://cloud.google.com/storage/) URIs are - # supported. URIs must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - # more information, see [Request - # URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify - # multiple videos, a video URI may include wildcards in the `object-id`. - # Supported wildcards: '*' to match 0 or more characters; - # '?' to match 1 character. If unset, the input video should be embedded - # in the request as `input_content`. If set, `input_content` must be unset. - # @param input_content [::String] - # The video data bytes. - # If unset, the input video(s) should be specified via the `input_uri`. - # If set, `input_uri` must be unset. - # @param features [::Array<::Google::Cloud::VideoIntelligence::V1::Feature>] - # Required. Requested video annotation features. - # @param video_context [::Google::Cloud::VideoIntelligence::V1::VideoContext, ::Hash] - # Additional video context and/or feature-specific parameters. - # @param output_uri [::String] - # Optional. Location where the output (in JSON format) should be stored. - # Currently, only [Cloud Storage](https://cloud.google.com/storage/) - # URIs are supported. These must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - # more information, see [Request - # URIs](https://cloud.google.com/storage/docs/request-endpoints). - # @param location_id [::String] - # Optional. Cloud region where annotation should take place. Supported cloud - # regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no - # region is specified, the region will be determined based on video file - # 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/video_intelligence/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest.new - # - # # Call the annotate_video method. - # result = client.annotate_video request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def annotate_video request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.annotate_video.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::VideoIntelligence::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.annotate_video.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.annotate_video.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_intelligence_service_stub.annotate_video request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 VideoIntelligenceService REST API. - # - # This class represents the configuration for VideoIntelligenceService 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::VideoIntelligence::V1::VideoIntelligenceService::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 - # # annotate_video to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.annotate_video.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.annotate_video.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 = "videointelligence.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 VideoIntelligenceService 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 `annotate_video` - # @return [::Gapic::Config::Method] - # - attr_reader :annotate_video - - # @private - def initialize parent_rpcs = nil - annotate_video_config = parent_rpcs.annotate_video if parent_rpcs.respond_to? :annotate_video - @annotate_video = ::Gapic::Config::Method.new annotate_video_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest/operations.rb deleted file mode 100644 index 9b39f97ac2df..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest/operations.rb +++ /dev/null @@ -1,946 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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 VideoIntelligence - module V1 - module VideoIntelligenceService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the VideoIntelligenceService 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 VideoIntelligenceService 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::VideoIntelligence::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "videointelligence.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] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/operations/{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] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/operations/{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] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/operations/{name}:cancel", - 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-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest/service_stub.rb deleted file mode 100644 index b9e70ec29668..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/video_intelligence/v1/video_intelligence_service/rest/service_stub.rb +++ /dev/null @@ -1,141 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/videointelligence/v1/video_intelligence_pb" - -module Google - module Cloud - module VideoIntelligence - module V1 - module VideoIntelligenceService - module Rest - ## - # REST service stub for the VideoIntelligenceService 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 annotate_video REST call - # - # @param request_pb [::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def annotate_video request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_annotate_video_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "annotate_video", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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 annotate_video REST call - # - # @param request_pb [::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_annotate_video_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/videos:annotate", - body: "*", - matches: [] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/videointelligence/v1/video_intelligence_pb.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/videointelligence/v1/video_intelligence_pb.rb deleted file mode 100644 index 08d7103b5122..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/videointelligence/v1/video_intelligence_pb.rb +++ /dev/null @@ -1,74 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/videointelligence/v1/video_intelligence.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n:google/cloud/videointelligence/v1/video_intelligence.proto\x12!google.cloud.videointelligence.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xfe\x01\n\x14\x41nnotateVideoRequest\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\x15\n\rinput_content\x18\x06 \x01(\x0c\x12\x41\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0e\x32*.google.cloud.videointelligence.v1.FeatureB\x03\xe0\x41\x02\x12\x46\n\rvideo_context\x18\x03 \x01(\x0b\x32/.google.cloud.videointelligence.v1.VideoContext\x12\x17\n\noutput_uri\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0blocation_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xc1\x06\n\x0cVideoContext\x12\x41\n\x08segments\x18\x01 \x03(\x0b\x32/.google.cloud.videointelligence.v1.VideoSegment\x12W\n\x16label_detection_config\x18\x02 \x01(\x0b\x32\x37.google.cloud.videointelligence.v1.LabelDetectionConfig\x12\x62\n\x1cshot_change_detection_config\x18\x03 \x01(\x0b\x32<.google.cloud.videointelligence.v1.ShotChangeDetectionConfig\x12l\n!explicit_content_detection_config\x18\x04 \x01(\x0b\x32\x41.google.cloud.videointelligence.v1.ExplicitContentDetectionConfig\x12U\n\x15\x66\x61\x63\x65_detection_config\x18\x05 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1.FaceDetectionConfig\x12\x61\n\x1bspeech_transcription_config\x18\x06 \x01(\x0b\x32<.google.cloud.videointelligence.v1.SpeechTranscriptionConfig\x12U\n\x15text_detection_config\x18\x08 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1.TextDetectionConfig\x12Y\n\x17person_detection_config\x18\x0b \x01(\x0b\x32\x38.google.cloud.videointelligence.v1.PersonDetectionConfig\x12W\n\x16object_tracking_config\x18\r \x01(\x0b\x32\x37.google.cloud.videointelligence.v1.ObjectTrackingConfig\"\xdd\x01\n\x14LabelDetectionConfig\x12S\n\x14label_detection_mode\x18\x01 \x01(\x0e\x32\x35.google.cloud.videointelligence.v1.LabelDetectionMode\x12\x19\n\x11stationary_camera\x18\x02 \x01(\x08\x12\r\n\x05model\x18\x03 \x01(\t\x12\"\n\x1a\x66rame_confidence_threshold\x18\x04 \x01(\x02\x12\"\n\x1avideo_confidence_threshold\x18\x05 \x01(\x02\"*\n\x19ShotChangeDetectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\"%\n\x14ObjectTrackingConfig\x12\r\n\x05model\x18\x01 \x01(\t\"`\n\x13\x46\x61\x63\x65\x44\x65tectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\x12\x1e\n\x16include_bounding_boxes\x18\x02 \x01(\x08\x12\x1a\n\x12include_attributes\x18\x05 \x01(\x08\"s\n\x15PersonDetectionConfig\x12\x1e\n\x16include_bounding_boxes\x18\x01 \x01(\x08\x12\x1e\n\x16include_pose_landmarks\x18\x02 \x01(\x08\x12\x1a\n\x12include_attributes\x18\x03 \x01(\x08\"/\n\x1e\x45xplicitContentDetectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\"<\n\x13TextDetectionConfig\x12\x16\n\x0elanguage_hints\x18\x01 \x03(\t\x12\r\n\x05model\x18\x02 \x01(\t\"x\n\x0cVideoSegment\x12\x34\n\x11start_time_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0f\x65nd_time_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"d\n\x0cLabelSegment\x12@\n\x07segment\x18\x01 \x01(\x0b\x32/.google.cloud.videointelligence.v1.VideoSegment\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"P\n\nLabelFrame\x12.\n\x0btime_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"G\n\x06\x45ntity\x12\x11\n\tentity_id\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x15\n\rlanguage_code\x18\x03 \x01(\t\"\xa5\x02\n\x0fLabelAnnotation\x12\x39\n\x06\x65ntity\x18\x01 \x01(\x0b\x32).google.cloud.videointelligence.v1.Entity\x12\x44\n\x11\x63\x61tegory_entities\x18\x02 \x03(\x0b\x32).google.cloud.videointelligence.v1.Entity\x12\x41\n\x08segments\x18\x03 \x03(\x0b\x32/.google.cloud.videointelligence.v1.LabelSegment\x12=\n\x06\x66rames\x18\x04 \x03(\x0b\x32-.google.cloud.videointelligence.v1.LabelFrame\x12\x0f\n\x07version\x18\x05 \x01(\t\"\x95\x01\n\x14\x45xplicitContentFrame\x12.\n\x0btime_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12M\n\x16pornography_likelihood\x18\x02 \x01(\x0e\x32-.google.cloud.videointelligence.v1.Likelihood\"u\n\x19\x45xplicitContentAnnotation\x12G\n\x06\x66rames\x18\x01 \x03(\x0b\x32\x37.google.cloud.videointelligence.v1.ExplicitContentFrame\x12\x0f\n\x07version\x18\x02 \x01(\t\"Q\n\x15NormalizedBoundingBox\x12\x0c\n\x04left\x18\x01 \x01(\x02\x12\x0b\n\x03top\x18\x02 \x01(\x02\x12\r\n\x05right\x18\x03 \x01(\x02\x12\x0e\n\x06\x62ottom\x18\x04 \x01(\x02\"w\n\x17\x46\x61\x63\x65\x44\x65tectionAnnotation\x12\x38\n\x06tracks\x18\x03 \x03(\x0b\x32(.google.cloud.videointelligence.v1.Track\x12\x11\n\tthumbnail\x18\x04 \x01(\x0c\x12\x0f\n\x07version\x18\x05 \x01(\t\"f\n\x19PersonDetectionAnnotation\x12\x38\n\x06tracks\x18\x01 \x03(\x0b\x32(.google.cloud.videointelligence.v1.Track\x12\x0f\n\x07version\x18\x02 \x01(\t\"O\n\x0b\x46\x61\x63\x65Segment\x12@\n\x07segment\x18\x01 \x01(\x0b\x32/.google.cloud.videointelligence.v1.VideoSegment\"\x9c\x01\n\tFaceFrame\x12[\n\x19normalized_bounding_boxes\x18\x01 \x03(\x0b\x32\x38.google.cloud.videointelligence.v1.NormalizedBoundingBox\x12.\n\x0btime_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration:\x02\x18\x01\"\xa7\x01\n\x0e\x46\x61\x63\x65\x41nnotation\x12\x11\n\tthumbnail\x18\x01 \x01(\x0c\x12@\n\x08segments\x18\x02 \x03(\x0b\x32..google.cloud.videointelligence.v1.FaceSegment\x12<\n\x06\x66rames\x18\x03 \x03(\x0b\x32,.google.cloud.videointelligence.v1.FaceFrame:\x02\x18\x01\"\xba\x02\n\x11TimestampedObject\x12Y\n\x17normalized_bounding_box\x18\x01 \x01(\x0b\x32\x38.google.cloud.videointelligence.v1.NormalizedBoundingBox\x12.\n\x0btime_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12M\n\nattributes\x18\x03 \x03(\x0b\x32\x34.google.cloud.videointelligence.v1.DetectedAttributeB\x03\xe0\x41\x01\x12K\n\tlandmarks\x18\x04 \x03(\x0b\x32\x33.google.cloud.videointelligence.v1.DetectedLandmarkB\x03\xe0\x41\x01\"\x84\x02\n\x05Track\x12@\n\x07segment\x18\x01 \x01(\x0b\x32/.google.cloud.videointelligence.v1.VideoSegment\x12Q\n\x13timestamped_objects\x18\x02 \x03(\x0b\x32\x34.google.cloud.videointelligence.v1.TimestampedObject\x12M\n\nattributes\x18\x03 \x03(\x0b\x32\x34.google.cloud.videointelligence.v1.DetectedAttributeB\x03\xe0\x41\x01\x12\x17\n\nconfidence\x18\x04 \x01(\x02\x42\x03\xe0\x41\x01\"D\n\x11\x44\x65tectedAttribute\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12\r\n\x05value\x18\x03 \x01(\t\"x\n\x10\x44\x65tectedLandmark\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x42\n\x05point\x18\x02 \x01(\x0b\x32\x33.google.cloud.videointelligence.v1.NormalizedVertex\x12\x12\n\nconfidence\x18\x03 \x01(\x02\"\xe9\n\n\x16VideoAnnotationResults\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12@\n\x07segment\x18\n \x01(\x0b\x32/.google.cloud.videointelligence.v1.VideoSegment\x12U\n\x19segment_label_annotations\x18\x02 \x03(\x0b\x32\x32.google.cloud.videointelligence.v1.LabelAnnotation\x12^\n\"segment_presence_label_annotations\x18\x17 \x03(\x0b\x32\x32.google.cloud.videointelligence.v1.LabelAnnotation\x12R\n\x16shot_label_annotations\x18\x03 \x03(\x0b\x32\x32.google.cloud.videointelligence.v1.LabelAnnotation\x12[\n\x1fshot_presence_label_annotations\x18\x18 \x03(\x0b\x32\x32.google.cloud.videointelligence.v1.LabelAnnotation\x12S\n\x17\x66rame_label_annotations\x18\x04 \x03(\x0b\x32\x32.google.cloud.videointelligence.v1.LabelAnnotation\x12O\n\x10\x66\x61\x63\x65_annotations\x18\x05 \x03(\x0b\x32\x31.google.cloud.videointelligence.v1.FaceAnnotationB\x02\x18\x01\x12^\n\x1a\x66\x61\x63\x65_detection_annotations\x18\r \x03(\x0b\x32:.google.cloud.videointelligence.v1.FaceDetectionAnnotation\x12I\n\x10shot_annotations\x18\x06 \x03(\x0b\x32/.google.cloud.videointelligence.v1.VideoSegment\x12Y\n\x13\x65xplicit_annotation\x18\x07 \x01(\x0b\x32<.google.cloud.videointelligence.v1.ExplicitContentAnnotation\x12U\n\x15speech_transcriptions\x18\x0b \x03(\x0b\x32\x36.google.cloud.videointelligence.v1.SpeechTranscription\x12K\n\x10text_annotations\x18\x0c \x03(\x0b\x32\x31.google.cloud.videointelligence.v1.TextAnnotation\x12W\n\x12object_annotations\x18\x0e \x03(\x0b\x32;.google.cloud.videointelligence.v1.ObjectTrackingAnnotation\x12\x62\n\x1clogo_recognition_annotations\x18\x13 \x03(\x0b\x32<.google.cloud.videointelligence.v1.LogoRecognitionAnnotation\x12\x62\n\x1cperson_detection_annotations\x18\x14 \x03(\x0b\x32<.google.cloud.videointelligence.v1.PersonDetectionAnnotation\x12!\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.Status\"n\n\x15\x41nnotateVideoResponse\x12U\n\x12\x61nnotation_results\x18\x01 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1.VideoAnnotationResults\"\xa6\x02\n\x17VideoAnnotationProgress\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\x18\n\x10progress_percent\x18\x02 \x01(\x05\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12;\n\x07\x66\x65\x61ture\x18\x05 \x01(\x0e\x32*.google.cloud.videointelligence.v1.Feature\x12@\n\x07segment\x18\x06 \x01(\x0b\x32/.google.cloud.videointelligence.v1.VideoSegment\"p\n\x15\x41nnotateVideoProgress\x12W\n\x13\x61nnotation_progress\x18\x01 \x03(\x0b\x32:.google.cloud.videointelligence.v1.VideoAnnotationProgress\"\x81\x03\n\x19SpeechTranscriptionConfig\x12\x1a\n\rlanguage_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10max_alternatives\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1d\n\x10\x66ilter_profanity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12N\n\x0fspeech_contexts\x18\x04 \x03(\x0b\x32\x30.google.cloud.videointelligence.v1.SpeechContextB\x03\xe0\x41\x01\x12)\n\x1c\x65nable_automatic_punctuation\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x19\n\x0c\x61udio_tracks\x18\x06 \x03(\x05\x42\x03\xe0\x41\x01\x12\'\n\x1a\x65nable_speaker_diarization\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12&\n\x19\x64iarization_speaker_count\x18\x08 \x01(\x05\x42\x03\xe0\x41\x01\x12#\n\x16\x65nable_word_confidence\x18\t \x01(\x08\x42\x03\xe0\x41\x01\"%\n\rSpeechContext\x12\x14\n\x07phrases\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x88\x01\n\x13SpeechTranscription\x12U\n\x0c\x61lternatives\x18\x01 \x03(\x0b\x32?.google.cloud.videointelligence.v1.SpeechRecognitionAlternative\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\x8c\x01\n\x1cSpeechRecognitionAlternative\x12\x12\n\ntranscript\x18\x01 \x01(\t\x12\x17\n\nconfidence\x18\x02 \x01(\x02\x42\x03\xe0\x41\x03\x12?\n\x05words\x18\x03 \x03(\x0b\x32+.google.cloud.videointelligence.v1.WordInfoB\x03\xe0\x41\x03\"\xa7\x01\n\x08WordInfo\x12-\n\nstart_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12+\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0c\n\x04word\x18\x03 \x01(\t\x12\x17\n\nconfidence\x18\x04 \x01(\x02\x42\x03\xe0\x41\x03\x12\x18\n\x0bspeaker_tag\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\"(\n\x10NormalizedVertex\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\"_\n\x16NormalizedBoundingPoly\x12\x45\n\x08vertices\x18\x01 \x03(\x0b\x32\x33.google.cloud.videointelligence.v1.NormalizedVertex\"\xa1\x01\n\x0bTextSegment\x12@\n\x07segment\x18\x01 \x01(\x0b\x32/.google.cloud.videointelligence.v1.VideoSegment\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12<\n\x06\x66rames\x18\x03 \x03(\x0b\x32,.google.cloud.videointelligence.v1.TextFrame\"\x94\x01\n\tTextFrame\x12W\n\x14rotated_bounding_box\x18\x01 \x01(\x0b\x32\x39.google.cloud.videointelligence.v1.NormalizedBoundingPoly\x12.\n\x0btime_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"q\n\x0eTextAnnotation\x12\x0c\n\x04text\x18\x01 \x01(\t\x12@\n\x08segments\x18\x02 \x03(\x0b\x32..google.cloud.videointelligence.v1.TextSegment\x12\x0f\n\x07version\x18\x03 \x01(\t\"\xa0\x01\n\x13ObjectTrackingFrame\x12Y\n\x17normalized_bounding_box\x18\x01 \x01(\x0b\x32\x38.google.cloud.videointelligence.v1.NormalizedBoundingBox\x12.\n\x0btime_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xa8\x02\n\x18ObjectTrackingAnnotation\x12\x42\n\x07segment\x18\x03 \x01(\x0b\x32/.google.cloud.videointelligence.v1.VideoSegmentH\x00\x12\x12\n\x08track_id\x18\x05 \x01(\x03H\x00\x12\x39\n\x06\x65ntity\x18\x01 \x01(\x0b\x32).google.cloud.videointelligence.v1.Entity\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x12\x46\n\x06\x66rames\x18\x02 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1.ObjectTrackingFrame\x12\x0f\n\x07version\x18\x06 \x01(\tB\x0c\n\ntrack_info\"\xd3\x01\n\x19LogoRecognitionAnnotation\x12\x39\n\x06\x65ntity\x18\x01 \x01(\x0b\x32).google.cloud.videointelligence.v1.Entity\x12\x38\n\x06tracks\x18\x02 \x03(\x0b\x32(.google.cloud.videointelligence.v1.Track\x12\x41\n\x08segments\x18\x03 \x03(\x0b\x32/.google.cloud.videointelligence.v1.VideoSegment*\xf5\x01\n\x07\x46\x65\x61ture\x12\x17\n\x13\x46\x45\x41TURE_UNSPECIFIED\x10\x00\x12\x13\n\x0fLABEL_DETECTION\x10\x01\x12\x19\n\x15SHOT_CHANGE_DETECTION\x10\x02\x12\x1e\n\x1a\x45XPLICIT_CONTENT_DETECTION\x10\x03\x12\x12\n\x0e\x46\x41\x43\x45_DETECTION\x10\x04\x12\x18\n\x14SPEECH_TRANSCRIPTION\x10\x06\x12\x12\n\x0eTEXT_DETECTION\x10\x07\x12\x13\n\x0fOBJECT_TRACKING\x10\t\x12\x14\n\x10LOGO_RECOGNITION\x10\x0c\x12\x14\n\x10PERSON_DETECTION\x10\x0e*r\n\x12LabelDetectionMode\x12$\n LABEL_DETECTION_MODE_UNSPECIFIED\x10\x00\x12\r\n\tSHOT_MODE\x10\x01\x12\x0e\n\nFRAME_MODE\x10\x02\x12\x17\n\x13SHOT_AND_FRAME_MODE\x10\x03*t\n\nLikelihood\x12\x1a\n\x16LIKELIHOOD_UNSPECIFIED\x10\x00\x12\x11\n\rVERY_UNLIKELY\x10\x01\x12\x0c\n\x08UNLIKELY\x10\x02\x12\x0c\n\x08POSSIBLE\x10\x03\x12\n\n\x06LIKELY\x10\x04\x12\x0f\n\x0bVERY_LIKELY\x10\x05\x32\xc0\x02\n\x18VideoIntelligenceService\x12\xcd\x01\n\rAnnotateVideo\x12\x37.google.cloud.videointelligence.v1.AnnotateVideoRequest\x1a\x1d.google.longrunning.Operation\"d\xca\x41.\n\x15\x41nnotateVideoResponse\x12\x15\x41nnotateVideoProgress\xda\x41\x12input_uri,features\x82\xd3\xe4\x93\x02\x18\"\x13/v1/videos:annotate:\x01*\x1aT\xca\x41 videointelligence.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x8c\x02\n%com.google.cloud.videointelligence.v1B\x1dVideoIntelligenceServiceProtoP\x01ZScloud.google.com/go/videointelligence/apiv1/videointelligencepb;videointelligencepb\xaa\x02!Google.Cloud.VideoIntelligence.V1\xca\x02!Google\\Cloud\\VideoIntelligence\\V1\xea\x02$Google::Cloud::VideoIntelligence::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module VideoIntelligence - module V1 - AnnotateVideoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.AnnotateVideoRequest").msgclass - VideoContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.VideoContext").msgclass - LabelDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.LabelDetectionConfig").msgclass - ShotChangeDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.ShotChangeDetectionConfig").msgclass - ObjectTrackingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.ObjectTrackingConfig").msgclass - FaceDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.FaceDetectionConfig").msgclass - PersonDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.PersonDetectionConfig").msgclass - ExplicitContentDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.ExplicitContentDetectionConfig").msgclass - TextDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.TextDetectionConfig").msgclass - VideoSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.VideoSegment").msgclass - LabelSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.LabelSegment").msgclass - LabelFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.LabelFrame").msgclass - Entity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.Entity").msgclass - LabelAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.LabelAnnotation").msgclass - ExplicitContentFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.ExplicitContentFrame").msgclass - ExplicitContentAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.ExplicitContentAnnotation").msgclass - NormalizedBoundingBox = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.NormalizedBoundingBox").msgclass - FaceDetectionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.FaceDetectionAnnotation").msgclass - PersonDetectionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.PersonDetectionAnnotation").msgclass - FaceSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.FaceSegment").msgclass - FaceFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.FaceFrame").msgclass - FaceAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.FaceAnnotation").msgclass - TimestampedObject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.TimestampedObject").msgclass - Track = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.Track").msgclass - DetectedAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.DetectedAttribute").msgclass - DetectedLandmark = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.DetectedLandmark").msgclass - VideoAnnotationResults = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.VideoAnnotationResults").msgclass - AnnotateVideoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.AnnotateVideoResponse").msgclass - VideoAnnotationProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.VideoAnnotationProgress").msgclass - AnnotateVideoProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.AnnotateVideoProgress").msgclass - SpeechTranscriptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.SpeechTranscriptionConfig").msgclass - SpeechContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.SpeechContext").msgclass - SpeechTranscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.SpeechTranscription").msgclass - SpeechRecognitionAlternative = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.SpeechRecognitionAlternative").msgclass - WordInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.WordInfo").msgclass - NormalizedVertex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.NormalizedVertex").msgclass - NormalizedBoundingPoly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.NormalizedBoundingPoly").msgclass - TextSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.TextSegment").msgclass - TextFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.TextFrame").msgclass - TextAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.TextAnnotation").msgclass - ObjectTrackingFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.ObjectTrackingFrame").msgclass - ObjectTrackingAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.ObjectTrackingAnnotation").msgclass - LogoRecognitionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.LogoRecognitionAnnotation").msgclass - Feature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.Feature").enummodule - LabelDetectionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.LabelDetectionMode").enummodule - Likelihood = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1.Likelihood").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/videointelligence/v1/video_intelligence_services_pb.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/videointelligence/v1/video_intelligence_services_pb.rb deleted file mode 100644 index 0627d01c95d4..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/lib/google/cloud/videointelligence/v1/video_intelligence_services_pb.rb +++ /dev/null @@ -1,48 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/videointelligence/v1/video_intelligence.proto for package 'Google.Cloud.VideoIntelligence.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/videointelligence/v1/video_intelligence_pb' - -module Google - module Cloud - module VideoIntelligence - module V1 - module VideoIntelligenceService - # Service that implements the Video Intelligence API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.videointelligence.v1.VideoIntelligenceService' - - # Performs asynchronous video annotation. Progress and results can be - # retrieved through the `google.longrunning.Operations` interface. - # `Operation.metadata` contains `AnnotateVideoProgress` (progress). - # `Operation.response` contains `AnnotateVideoResponse` (results). - rpc :AnnotateVideo, ::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/README.md deleted file mode 100644 index 1067402de074..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Video Intelligence 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-video_intelligence-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # 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. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - # - # Example: - # - # 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 - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # 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 - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # 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 - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1/proto_docs/google/cloud/videointelligence/v1/video_intelligence.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/cloud/videointelligence/v1/video_intelligence.rb deleted file mode 100644 index ef693ed03d79..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/cloud/videointelligence/v1/video_intelligence.rb +++ /dev/null @@ -1,998 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module VideoIntelligence - module V1 - # Video annotation request. - # @!attribute [rw] input_uri - # @return [::String] - # Input video location. Currently, only - # [Cloud Storage](https://cloud.google.com/storage/) URIs are - # supported. URIs must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - # more information, see [Request - # URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify - # multiple videos, a video URI may include wildcards in the `object-id`. - # Supported wildcards: '*' to match 0 or more characters; - # '?' to match 1 character. If unset, the input video should be embedded - # in the request as `input_content`. If set, `input_content` must be unset. - # @!attribute [rw] input_content - # @return [::String] - # The video data bytes. - # If unset, the input video(s) should be specified via the `input_uri`. - # If set, `input_uri` must be unset. - # @!attribute [rw] features - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::Feature>] - # Required. Requested video annotation features. - # @!attribute [rw] video_context - # @return [::Google::Cloud::VideoIntelligence::V1::VideoContext] - # Additional video context and/or feature-specific parameters. - # @!attribute [rw] output_uri - # @return [::String] - # Optional. Location where the output (in JSON format) should be stored. - # Currently, only [Cloud Storage](https://cloud.google.com/storage/) - # URIs are supported. These must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - # more information, see [Request - # URIs](https://cloud.google.com/storage/docs/request-endpoints). - # @!attribute [rw] location_id - # @return [::String] - # Optional. Cloud region where annotation should take place. Supported cloud - # regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no - # region is specified, the region will be determined based on video file - # location. - class AnnotateVideoRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video context and/or feature-specific parameters. - # @!attribute [rw] segments - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::VideoSegment>] - # Video segments to annotate. The segments may overlap and are not required - # to be contiguous or span the whole video. If unspecified, each video is - # treated as a single segment. - # @!attribute [rw] label_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1::LabelDetectionConfig] - # Config for LABEL_DETECTION. - # @!attribute [rw] shot_change_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1::ShotChangeDetectionConfig] - # Config for SHOT_CHANGE_DETECTION. - # @!attribute [rw] explicit_content_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1::ExplicitContentDetectionConfig] - # Config for EXPLICIT_CONTENT_DETECTION. - # @!attribute [rw] face_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1::FaceDetectionConfig] - # Config for FACE_DETECTION. - # @!attribute [rw] speech_transcription_config - # @return [::Google::Cloud::VideoIntelligence::V1::SpeechTranscriptionConfig] - # Config for SPEECH_TRANSCRIPTION. - # @!attribute [rw] text_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1::TextDetectionConfig] - # Config for TEXT_DETECTION. - # @!attribute [rw] person_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1::PersonDetectionConfig] - # Config for PERSON_DETECTION. - # @!attribute [rw] object_tracking_config - # @return [::Google::Cloud::VideoIntelligence::V1::ObjectTrackingConfig] - # Config for OBJECT_TRACKING. - class VideoContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for LABEL_DETECTION. - # @!attribute [rw] label_detection_mode - # @return [::Google::Cloud::VideoIntelligence::V1::LabelDetectionMode] - # What labels should be detected with LABEL_DETECTION, in addition to - # video-level labels or segment-level labels. - # If unspecified, defaults to `SHOT_MODE`. - # @!attribute [rw] stationary_camera - # @return [::Boolean] - # Whether the video has been shot from a stationary (i.e., non-moving) - # camera. When set to true, might improve detection accuracy for moving - # objects. Should be used with `SHOT_AND_FRAME_MODE` enabled. - # @!attribute [rw] model - # @return [::String] - # Model to use for label detection. - # Supported values: "builtin/stable" (the default if unset) and - # "builtin/latest". - # @!attribute [rw] frame_confidence_threshold - # @return [::Float] - # The confidence threshold we perform filtering on the labels from - # frame-level detection. If not set, it is set to 0.4 by default. The valid - # range for this threshold is [0.1, 0.9]. Any value set outside of this - # range will be clipped. - # Note: For best results, follow the default threshold. We will update - # the default threshold everytime when we release a new model. - # @!attribute [rw] video_confidence_threshold - # @return [::Float] - # The confidence threshold we perform filtering on the labels from - # video-level and shot-level detections. If not set, it's set to 0.3 by - # default. The valid range for this threshold is [0.1, 0.9]. Any value set - # outside of this range will be clipped. - # Note: For best results, follow the default threshold. We will update - # the default threshold everytime when we release a new model. - class LabelDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for SHOT_CHANGE_DETECTION. - # @!attribute [rw] model - # @return [::String] - # Model to use for shot change detection. - # Supported values: "builtin/stable" (the default if unset) and - # "builtin/latest". - class ShotChangeDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for OBJECT_TRACKING. - # @!attribute [rw] model - # @return [::String] - # Model to use for object tracking. - # Supported values: "builtin/stable" (the default if unset) and - # "builtin/latest". - class ObjectTrackingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for FACE_DETECTION. - # @!attribute [rw] model - # @return [::String] - # Model to use for face detection. - # Supported values: "builtin/stable" (the default if unset) and - # "builtin/latest". - # @!attribute [rw] include_bounding_boxes - # @return [::Boolean] - # Whether bounding boxes are included in the face annotation output. - # @!attribute [rw] include_attributes - # @return [::Boolean] - # Whether to enable face attributes detection, such as glasses, dark_glasses, - # mouth_open etc. Ignored if 'include_bounding_boxes' is set to false. - class FaceDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for PERSON_DETECTION. - # @!attribute [rw] include_bounding_boxes - # @return [::Boolean] - # Whether bounding boxes are included in the person detection annotation - # output. - # @!attribute [rw] include_pose_landmarks - # @return [::Boolean] - # Whether to enable pose landmarks detection. Ignored if - # 'include_bounding_boxes' is set to false. - # @!attribute [rw] include_attributes - # @return [::Boolean] - # Whether to enable person attributes detection, such as cloth color (black, - # blue, etc), type (coat, dress, etc), pattern (plain, floral, etc), hair, - # etc. - # Ignored if 'include_bounding_boxes' is set to false. - class PersonDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for EXPLICIT_CONTENT_DETECTION. - # @!attribute [rw] model - # @return [::String] - # Model to use for explicit content detection. - # Supported values: "builtin/stable" (the default if unset) and - # "builtin/latest". - class ExplicitContentDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for TEXT_DETECTION. - # @!attribute [rw] language_hints - # @return [::Array<::String>] - # Language hint can be specified if the language to be detected is known a - # priori. It can increase the accuracy of the detection. Language hint must - # be language code in BCP-47 format. - # - # Automatic language detection is performed if no hint is provided. - # @!attribute [rw] model - # @return [::String] - # Model to use for text detection. - # Supported values: "builtin/stable" (the default if unset) and - # "builtin/latest". - class TextDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video segment. - # @!attribute [rw] start_time_offset - # @return [::Google::Protobuf::Duration] - # Time-offset, relative to the beginning of the video, - # corresponding to the start of the segment (inclusive). - # @!attribute [rw] end_time_offset - # @return [::Google::Protobuf::Duration] - # Time-offset, relative to the beginning of the video, - # corresponding to the end of the segment (inclusive). - class VideoSegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video segment level annotation results for label detection. - # @!attribute [rw] segment - # @return [::Google::Cloud::VideoIntelligence::V1::VideoSegment] - # Video segment where a label was detected. - # @!attribute [rw] confidence - # @return [::Float] - # Confidence that the label is accurate. Range: [0, 1]. - class LabelSegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video frame level annotation results for label detection. - # @!attribute [rw] time_offset - # @return [::Google::Protobuf::Duration] - # Time-offset, relative to the beginning of the video, corresponding to the - # video frame for this location. - # @!attribute [rw] confidence - # @return [::Float] - # Confidence that the label is accurate. Range: [0, 1]. - class LabelFrame - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Detected entity from video analysis. - # @!attribute [rw] entity_id - # @return [::String] - # Opaque entity ID. Some IDs may be available in - # [Google Knowledge Graph Search - # API](https://developers.google.com/knowledge-graph/). - # @!attribute [rw] description - # @return [::String] - # Textual description, e.g., `Fixed-gear bicycle`. - # @!attribute [rw] language_code - # @return [::String] - # Language code for `description` in BCP-47 format. - class Entity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Label annotation. - # @!attribute [rw] entity - # @return [::Google::Cloud::VideoIntelligence::V1::Entity] - # Detected entity. - # @!attribute [rw] category_entities - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::Entity>] - # Common categories for the detected entity. - # For example, when the label is `Terrier`, the category is likely `dog`. And - # in some cases there might be more than one categories e.g., `Terrier` could - # also be a `pet`. - # @!attribute [rw] segments - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::LabelSegment>] - # All video segments where a label was detected. - # @!attribute [rw] frames - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::LabelFrame>] - # All video frames where a label was detected. - # @!attribute [rw] version - # @return [::String] - # Feature version. - class LabelAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video frame level annotation results for explicit content. - # @!attribute [rw] time_offset - # @return [::Google::Protobuf::Duration] - # Time-offset, relative to the beginning of the video, corresponding to the - # video frame for this location. - # @!attribute [rw] pornography_likelihood - # @return [::Google::Cloud::VideoIntelligence::V1::Likelihood] - # Likelihood of the pornography content.. - class ExplicitContentFrame - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Explicit content annotation (based on per-frame visual signals only). - # If no explicit content has been detected in a frame, no annotations are - # present for that frame. - # @!attribute [rw] frames - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::ExplicitContentFrame>] - # All video frames where explicit content was detected. - # @!attribute [rw] version - # @return [::String] - # Feature version. - class ExplicitContentAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Normalized bounding box. - # The normalized vertex coordinates are relative to the original image. - # Range: [0, 1]. - # @!attribute [rw] left - # @return [::Float] - # Left X coordinate. - # @!attribute [rw] top - # @return [::Float] - # Top Y coordinate. - # @!attribute [rw] right - # @return [::Float] - # Right X coordinate. - # @!attribute [rw] bottom - # @return [::Float] - # Bottom Y coordinate. - class NormalizedBoundingBox - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Face detection annotation. - # @!attribute [rw] tracks - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::Track>] - # The face tracks with attributes. - # @!attribute [rw] thumbnail - # @return [::String] - # The thumbnail of a person's face. - # @!attribute [rw] version - # @return [::String] - # Feature version. - class FaceDetectionAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Person detection annotation per video. - # @!attribute [rw] tracks - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::Track>] - # The detected tracks of a person. - # @!attribute [rw] version - # @return [::String] - # Feature version. - class PersonDetectionAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video segment level annotation results for face detection. - # @!attribute [rw] segment - # @return [::Google::Cloud::VideoIntelligence::V1::VideoSegment] - # Video segment where a face was detected. - class FaceSegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Deprecated. No effect. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] normalized_bounding_boxes - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::NormalizedBoundingBox>] - # Normalized Bounding boxes in a frame. - # There can be more than one boxes if the same face is detected in multiple - # locations within the current frame. - # @!attribute [rw] time_offset - # @return [::Google::Protobuf::Duration] - # Time-offset, relative to the beginning of the video, - # corresponding to the video frame for this location. - class FaceFrame - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Deprecated. No effect. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] thumbnail - # @return [::String] - # Thumbnail of a representative face view (in JPEG format). - # @!attribute [rw] segments - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::FaceSegment>] - # All video segments where a face was detected. - # @!attribute [rw] frames - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::FaceFrame>] - # All video frames where a face was detected. - class FaceAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # For tracking related features. - # An object at time_offset with attributes, and located with - # normalized_bounding_box. - # @!attribute [rw] normalized_bounding_box - # @return [::Google::Cloud::VideoIntelligence::V1::NormalizedBoundingBox] - # Normalized Bounding box in a frame, where the object is located. - # @!attribute [rw] time_offset - # @return [::Google::Protobuf::Duration] - # Time-offset, relative to the beginning of the video, - # corresponding to the video frame for this object. - # @!attribute [rw] attributes - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::DetectedAttribute>] - # Optional. The attributes of the object in the bounding box. - # @!attribute [rw] landmarks - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::DetectedLandmark>] - # Optional. The detected landmarks. - class TimestampedObject - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A track of an object instance. - # @!attribute [rw] segment - # @return [::Google::Cloud::VideoIntelligence::V1::VideoSegment] - # Video segment of a track. - # @!attribute [rw] timestamped_objects - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::TimestampedObject>] - # The object with timestamp and attributes per frame in the track. - # @!attribute [rw] attributes - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::DetectedAttribute>] - # Optional. Attributes in the track level. - # @!attribute [rw] confidence - # @return [::Float] - # Optional. The confidence score of the tracked object. - class Track - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A generic detected attribute represented by name in string format. - # @!attribute [rw] name - # @return [::String] - # The name of the attribute, for example, glasses, dark_glasses, mouth_open. - # A full list of supported type names will be provided in the document. - # @!attribute [rw] confidence - # @return [::Float] - # Detected attribute confidence. Range [0, 1]. - # @!attribute [rw] value - # @return [::String] - # Text value of the detection result. For example, the value for "HairColor" - # can be "black", "blonde", etc. - class DetectedAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A generic detected landmark represented by name in string format and a 2D - # location. - # @!attribute [rw] name - # @return [::String] - # The name of this landmark, for example, left_hand, right_shoulder. - # @!attribute [rw] point - # @return [::Google::Cloud::VideoIntelligence::V1::NormalizedVertex] - # The 2D point of the detected landmark using the normalized image - # coordindate system. The normalized coordinates have the range from 0 to 1. - # @!attribute [rw] confidence - # @return [::Float] - # The confidence score of the detected landmark. Range [0, 1]. - class DetectedLandmark - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotation results for a single video. - # @!attribute [rw] input_uri - # @return [::String] - # Video file location in - # [Cloud Storage](https://cloud.google.com/storage/). - # @!attribute [rw] segment - # @return [::Google::Cloud::VideoIntelligence::V1::VideoSegment] - # Video segment on which the annotation is run. - # @!attribute [rw] segment_label_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::LabelAnnotation>] - # Topical label annotations on video level or user-specified segment level. - # There is exactly one element for each unique label. - # @!attribute [rw] segment_presence_label_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::LabelAnnotation>] - # Presence label annotations on video level or user-specified segment level. - # There is exactly one element for each unique label. Compared to the - # existing topical `segment_label_annotations`, this field presents more - # fine-grained, segment-level labels detected in video content and is made - # available only when the client sets `LabelDetectionConfig.model` to - # "builtin/latest" in the request. - # @!attribute [rw] shot_label_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::LabelAnnotation>] - # Topical label annotations on shot level. - # There is exactly one element for each unique label. - # @!attribute [rw] shot_presence_label_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::LabelAnnotation>] - # Presence label annotations on shot level. There is exactly one element for - # each unique label. Compared to the existing topical - # `shot_label_annotations`, this field presents more fine-grained, shot-level - # labels detected in video content and is made available only when the client - # sets `LabelDetectionConfig.model` to "builtin/latest" in the request. - # @!attribute [rw] frame_label_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::LabelAnnotation>] - # Label annotations on frame level. - # There is exactly one element for each unique label. - # @!attribute [rw] face_annotations - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::FaceAnnotation>] - # Deprecated. Please use `face_detection_annotations` instead. - # @!attribute [rw] face_detection_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::FaceDetectionAnnotation>] - # Face detection annotations. - # @!attribute [rw] shot_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::VideoSegment>] - # Shot annotations. Each shot is represented as a video segment. - # @!attribute [rw] explicit_annotation - # @return [::Google::Cloud::VideoIntelligence::V1::ExplicitContentAnnotation] - # Explicit content annotation. - # @!attribute [rw] speech_transcriptions - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::SpeechTranscription>] - # Speech transcription. - # @!attribute [rw] text_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::TextAnnotation>] - # OCR text detection and tracking. - # Annotations for list of detected text snippets. Each will have list of - # frame information associated with it. - # @!attribute [rw] object_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::ObjectTrackingAnnotation>] - # Annotations for list of objects detected and tracked in video. - # @!attribute [rw] logo_recognition_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::LogoRecognitionAnnotation>] - # Annotations for list of logos detected, tracked and recognized in video. - # @!attribute [rw] person_detection_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::PersonDetectionAnnotation>] - # Person detection annotations. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # If set, indicates an error. Note that for a single `AnnotateVideoRequest` - # some videos may succeed and some may fail. - class VideoAnnotationResults - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video annotation response. Included in the `response` - # field of the `Operation` returned by the `GetOperation` - # call of the `google::longrunning::Operations` service. - # @!attribute [rw] annotation_results - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::VideoAnnotationResults>] - # Annotation results for all videos specified in `AnnotateVideoRequest`. - class AnnotateVideoResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotation progress for a single video. - # @!attribute [rw] input_uri - # @return [::String] - # Video file location in - # [Cloud Storage](https://cloud.google.com/storage/). - # @!attribute [rw] progress_percent - # @return [::Integer] - # Approximate percentage processed thus far. Guaranteed to be - # 100 when fully processed. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Time when the request was received. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Time of the most recent update. - # @!attribute [rw] feature - # @return [::Google::Cloud::VideoIntelligence::V1::Feature] - # Specifies which feature is being tracked if the request contains more than - # one feature. - # @!attribute [rw] segment - # @return [::Google::Cloud::VideoIntelligence::V1::VideoSegment] - # Specifies which segment is being tracked if the request contains more than - # one segment. - class VideoAnnotationProgress - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video annotation progress. Included in the `metadata` - # field of the `Operation` returned by the `GetOperation` - # call of the `google::longrunning::Operations` service. - # @!attribute [rw] annotation_progress - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::VideoAnnotationProgress>] - # Progress metadata for all videos specified in `AnnotateVideoRequest`. - class AnnotateVideoProgress - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for SPEECH_TRANSCRIPTION. - # @!attribute [rw] language_code - # @return [::String] - # Required. *Required* The language of the supplied audio as a - # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - # Example: "en-US". - # See [Language Support](https://cloud.google.com/speech/docs/languages) - # for a list of the currently supported language codes. - # @!attribute [rw] max_alternatives - # @return [::Integer] - # Optional. Maximum number of recognition hypotheses to be returned. - # Specifically, the maximum number of `SpeechRecognitionAlternative` messages - # within each `SpeechTranscription`. The server may return fewer than - # `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will - # return a maximum of one. If omitted, will return a maximum of one. - # @!attribute [rw] filter_profanity - # @return [::Boolean] - # Optional. If set to `true`, the server will attempt to filter out - # profanities, replacing all but the initial character in each filtered word - # with asterisks, e.g. "f***". If set to `false` or omitted, profanities - # won't be filtered out. - # @!attribute [rw] speech_contexts - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::SpeechContext>] - # Optional. A means to provide context to assist the speech recognition. - # @!attribute [rw] enable_automatic_punctuation - # @return [::Boolean] - # Optional. If 'true', adds punctuation to recognition result hypotheses. - # This feature is only available in select languages. Setting this for - # requests in other languages has no effect at all. The default 'false' value - # does not add punctuation to result hypotheses. NOTE: "This is currently - # offered as an experimental service, complimentary to all users. In the - # future this may be exclusively available as a premium feature." - # @!attribute [rw] audio_tracks - # @return [::Array<::Integer>] - # Optional. For file formats, such as MXF or MKV, supporting multiple audio - # tracks, specify up to two tracks. Default: track 0. - # @!attribute [rw] enable_speaker_diarization - # @return [::Boolean] - # Optional. If 'true', enables speaker detection for each recognized word in - # the top alternative of the recognition result using a speaker_tag provided - # in the WordInfo. - # Note: When this is true, we send all the words from the beginning of the - # audio for the top alternative in every consecutive response. - # This is done in order to improve our speaker tags as our models learn to - # identify the speakers in the conversation over time. - # @!attribute [rw] diarization_speaker_count - # @return [::Integer] - # Optional. If set, specifies the estimated number of speakers in the - # conversation. If not set, defaults to '2'. Ignored unless - # enable_speaker_diarization is set to true. - # @!attribute [rw] enable_word_confidence - # @return [::Boolean] - # Optional. If `true`, the top result includes a list of words and the - # confidence for those words. If `false`, no word-level confidence - # information is returned. The default is `false`. - class SpeechTranscriptionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides "hints" to the speech recognizer to favor specific words and phrases - # in the results. - # @!attribute [rw] phrases - # @return [::Array<::String>] - # Optional. A list of strings containing words and phrases "hints" so that - # the speech recognition is more likely to recognize them. This can be used - # to improve the accuracy for specific words and phrases, for example, if - # specific commands are typically spoken by the user. This can also be used - # to add additional words to the vocabulary of the recognizer. See - # [usage limits](https://cloud.google.com/speech/limits#content). - class SpeechContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A speech recognition result corresponding to a portion of the audio. - # @!attribute [rw] alternatives - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::SpeechRecognitionAlternative>] - # May contain one or more recognition hypotheses (up to the maximum specified - # in `max_alternatives`). These alternatives are ordered in terms of - # accuracy, with the top (first) alternative being the most probable, as - # ranked by the recognizer. - # @!attribute [r] language_code - # @return [::String] - # Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - # language tag of the language in this result. This language code was - # detected to have the most likelihood of being spoken in the audio. - class SpeechTranscription - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Alternative hypotheses (a.k.a. n-best list). - # @!attribute [rw] transcript - # @return [::String] - # Transcript text representing the words that the user spoke. - # @!attribute [r] confidence - # @return [::Float] - # Output only. The confidence estimate between 0.0 and 1.0. A higher number - # indicates an estimated greater likelihood that the recognized words are - # correct. This field is set only for the top alternative. - # This field is not guaranteed to be accurate and users should not rely on it - # to be always provided. - # The default of 0.0 is a sentinel value indicating `confidence` was not set. - # @!attribute [r] words - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::WordInfo>] - # Output only. A list of word-specific information for each recognized word. - # Note: When `enable_speaker_diarization` is set to true, you will see all - # the words from the beginning of the audio. - class SpeechRecognitionAlternative - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Word-specific information for recognized words. Word information is only - # included in the response when certain request parameters are set, such - # as `enable_word_time_offsets`. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Duration] - # Time offset relative to the beginning of the audio, and - # corresponding to the start of the spoken word. This field is only set if - # `enable_word_time_offsets=true` and only in the top hypothesis. This is an - # experimental feature and the accuracy of the time offset can vary. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Duration] - # Time offset relative to the beginning of the audio, and - # corresponding to the end of the spoken word. This field is only set if - # `enable_word_time_offsets=true` and only in the top hypothesis. This is an - # experimental feature and the accuracy of the time offset can vary. - # @!attribute [rw] word - # @return [::String] - # The word corresponding to this set of information. - # @!attribute [r] confidence - # @return [::Float] - # Output only. The confidence estimate between 0.0 and 1.0. A higher number - # indicates an estimated greater likelihood that the recognized words are - # correct. This field is set only for the top alternative. - # This field is not guaranteed to be accurate and users should not rely on it - # to be always provided. - # The default of 0.0 is a sentinel value indicating `confidence` was not set. - # @!attribute [r] speaker_tag - # @return [::Integer] - # Output only. A distinct integer value is assigned for every speaker within - # the audio. This field specifies which one of those speakers was detected to - # have spoken this word. Value ranges from 1 up to diarization_speaker_count, - # and is only set if speaker diarization is enabled. - class WordInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A vertex represents a 2D point in the image. - # NOTE: the normalized vertex coordinates are relative to the original image - # and range from 0 to 1. - # @!attribute [rw] x - # @return [::Float] - # X coordinate. - # @!attribute [rw] y - # @return [::Float] - # Y coordinate. - class NormalizedVertex - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Normalized bounding polygon for text (that might not be aligned with axis). - # Contains list of the corner points in clockwise order starting from - # top-left corner. For example, for a rectangular bounding box: - # When the text is horizontal it might look like: - # 0----1 - # | | - # 3----2 - # - # When it's clockwise rotated 180 degrees around the top-left corner it - # becomes: - # 2----3 - # | | - # 1----0 - # - # and the vertex order will still be (0, 1, 2, 3). Note that values can be less - # than 0, or greater than 1 due to trignometric calculations for location of - # the box. - # @!attribute [rw] vertices - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::NormalizedVertex>] - # Normalized vertices of the bounding polygon. - class NormalizedBoundingPoly - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video segment level annotation results for text detection. - # @!attribute [rw] segment - # @return [::Google::Cloud::VideoIntelligence::V1::VideoSegment] - # Video segment where a text snippet was detected. - # @!attribute [rw] confidence - # @return [::Float] - # Confidence for the track of detected text. It is calculated as the highest - # over all frames where OCR detected text appears. - # @!attribute [rw] frames - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::TextFrame>] - # Information related to the frames where OCR detected text appears. - class TextSegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video frame level annotation results for text annotation (OCR). - # Contains information regarding timestamp and bounding box locations for the - # frames containing detected OCR text snippets. - # @!attribute [rw] rotated_bounding_box - # @return [::Google::Cloud::VideoIntelligence::V1::NormalizedBoundingPoly] - # Bounding polygon of the detected text for this frame. - # @!attribute [rw] time_offset - # @return [::Google::Protobuf::Duration] - # Timestamp of this frame. - class TextFrame - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotations related to one detected OCR text snippet. This will contain the - # corresponding text, confidence value, and frame level information for each - # detection. - # @!attribute [rw] text - # @return [::String] - # The detected text. - # @!attribute [rw] segments - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::TextSegment>] - # All video segments where OCR detected text appears. - # @!attribute [rw] version - # @return [::String] - # Feature version. - class TextAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video frame level annotations for object detection and tracking. This field - # stores per frame location, time offset, and confidence. - # @!attribute [rw] normalized_bounding_box - # @return [::Google::Cloud::VideoIntelligence::V1::NormalizedBoundingBox] - # The normalized bounding box location of this object track for the frame. - # @!attribute [rw] time_offset - # @return [::Google::Protobuf::Duration] - # The timestamp of the frame in microseconds. - class ObjectTrackingFrame - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotations corresponding to one tracked object. - # @!attribute [rw] segment - # @return [::Google::Cloud::VideoIntelligence::V1::VideoSegment] - # Non-streaming batch mode ONLY. - # Each object track corresponds to one video segment where it appears. - # - # Note: The following fields are mutually exclusive: `segment`, `track_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] track_id - # @return [::Integer] - # Streaming mode ONLY. - # In streaming mode, we do not know the end time of a tracked object - # before it is completed. Hence, there is no VideoSegment info returned. - # Instead, we provide a unique identifiable integer track_id so that - # the customers can correlate the results of the ongoing - # ObjectTrackAnnotation of the same track_id over time. - # - # Note: The following fields are mutually exclusive: `track_id`, `segment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] entity - # @return [::Google::Cloud::VideoIntelligence::V1::Entity] - # Entity to specify the object category that this track is labeled as. - # @!attribute [rw] confidence - # @return [::Float] - # Object category's labeling confidence of this track. - # @!attribute [rw] frames - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::ObjectTrackingFrame>] - # Information corresponding to all frames where this object track appears. - # Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame - # messages in frames. - # Streaming mode: it can only be one ObjectTrackingFrame message in frames. - # @!attribute [rw] version - # @return [::String] - # Feature version. - class ObjectTrackingAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotation corresponding to one detected, tracked and recognized logo class. - # @!attribute [rw] entity - # @return [::Google::Cloud::VideoIntelligence::V1::Entity] - # Entity category information to specify the logo class that all the logo - # tracks within this LogoRecognitionAnnotation are recognized as. - # @!attribute [rw] tracks - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::Track>] - # All logo tracks where the recognized logo appears. Each track corresponds - # to one logo instance appearing in consecutive frames. - # @!attribute [rw] segments - # @return [::Array<::Google::Cloud::VideoIntelligence::V1::VideoSegment>] - # All video segments where the recognized logo appears. There might be - # multiple instances of the same logo class appearing in one VideoSegment. - class LogoRecognitionAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video annotation feature. - module Feature - # Unspecified. - FEATURE_UNSPECIFIED = 0 - - # Label detection. Detect objects, such as dog or flower. - LABEL_DETECTION = 1 - - # Shot change detection. - SHOT_CHANGE_DETECTION = 2 - - # Explicit content detection. - EXPLICIT_CONTENT_DETECTION = 3 - - # Human face detection. - FACE_DETECTION = 4 - - # Speech transcription. - SPEECH_TRANSCRIPTION = 6 - - # OCR text detection and tracking. - TEXT_DETECTION = 7 - - # Object detection and tracking. - OBJECT_TRACKING = 9 - - # Logo detection, tracking, and recognition. - LOGO_RECOGNITION = 12 - - # Person detection. - PERSON_DETECTION = 14 - end - - # Label detection mode. - module LabelDetectionMode - # Unspecified. - LABEL_DETECTION_MODE_UNSPECIFIED = 0 - - # Detect shot-level labels. - SHOT_MODE = 1 - - # Detect frame-level labels. - FRAME_MODE = 2 - - # Detect both shot-level and frame-level labels. - SHOT_AND_FRAME_MODE = 3 - end - - # Bucketized representation of likelihood. - module Likelihood - # Unspecified likelihood. - LIKELIHOOD_UNSPECIFIED = 0 - - # Very unlikely. - VERY_UNLIKELY = 1 - - # Unlikely. - UNLIKELY = 2 - - # Possible. - POSSIBLE = 3 - - # Likely. - LIKELY = 4 - - # Very likely. - VERY_LIKELY = 5 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-video_intelligence-v1/snippets/Gemfile deleted file mode 100644 index d8b6f1a66fae..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-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-video_intelligence-v1", path: "../" -else - gem "google-cloud-video_intelligence-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-video_intelligence-v1/snippets/snippet_metadata_google.cloud.videointelligence.v1.json b/owl-bot-staging/google-cloud-video_intelligence-v1/snippets/snippet_metadata_google.cloud.videointelligence.v1.json deleted file mode 100644 index 2d46b33efc64..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/snippets/snippet_metadata_google.cloud.videointelligence.v1.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-video_intelligence-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.videointelligence.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "videointelligence_v1_generated_VideoIntelligenceService_AnnotateVideo_sync", - "title": "Snippet for the annotate_video call in the VideoIntelligenceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client#annotate_video.", - "file": "video_intelligence_service/annotate_video.rb", - "language": "RUBY", - "client_method": { - "short_name": "annotate_video", - "full_name": "::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client#annotate_video", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "VideoIntelligenceService::Client", - "full_name": "::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client" - }, - "method": { - "short_name": "AnnotateVideo", - "full_name": "google.cloud.videointelligence.v1.VideoIntelligenceService.AnnotateVideo", - "service": { - "short_name": "VideoIntelligenceService", - "full_name": "google.cloud.videointelligence.v1.VideoIntelligenceService" - } - } - }, - "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-video_intelligence-v1/snippets/video_intelligence_service/annotate_video.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/snippets/video_intelligence_service/annotate_video.rb deleted file mode 100644 index e8e3ca4809e6..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/snippets/video_intelligence_service/annotate_video.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 videointelligence_v1_generated_VideoIntelligenceService_AnnotateVideo_sync] -require "google/cloud/video_intelligence/v1" - -## -# Snippet for the annotate_video call in the VideoIntelligenceService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client#annotate_video. -# -def annotate_video - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest.new - - # Call the annotate_video method. - result = client.annotate_video request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END videointelligence_v1_generated_VideoIntelligenceService_AnnotateVideo_sync] diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/test/google/cloud/video_intelligence/v1/video_intelligence_service_operations_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/test/google/cloud/video_intelligence/v1/video_intelligence_service_operations_test.rb deleted file mode 100644 index d7c0fe61046d..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/test/google/cloud/video_intelligence/v1/video_intelligence_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/videointelligence/v1/video_intelligence_pb" -require "google/cloud/videointelligence/v1/video_intelligence_services_pb" -require "google/cloud/video_intelligence/v1/video_intelligence_service" - -class ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::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::VideoIntelligence::V1::VideoIntelligenceService::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::VideoIntelligence::V1::VideoIntelligenceService::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::VideoIntelligence::V1::VideoIntelligenceService::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::VideoIntelligence::V1::VideoIntelligenceService::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::VideoIntelligence::V1::VideoIntelligenceService::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::VideoIntelligence::V1::VideoIntelligenceService::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::VideoIntelligence::V1::VideoIntelligenceService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/test/google/cloud/video_intelligence/v1/video_intelligence_service_rest_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/test/google/cloud/video_intelligence/v1/video_intelligence_service_rest_test.rb deleted file mode 100644 index 694a3cfb8e36..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/test/google/cloud/video_intelligence/v1/video_intelligence_service_rest_test.rb +++ /dev/null @@ -1,158 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/videointelligence/v1/video_intelligence_pb" -require "google/cloud/video_intelligence/v1/video_intelligence_service/rest" - - -class ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::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_annotate_video - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - input_uri = "hello world" - input_content = "hello world" - features = [:FEATURE_UNSPECIFIED] - video_context = {} - output_uri = "hello world" - location_id = "hello world" - - annotate_video_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::ServiceStub.stub :transcode_annotate_video_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, annotate_video_client_stub do - # Create client - client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.annotate_video input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.annotate_video ::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.annotate_video(::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, annotate_video_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::VideoIntelligence::V1::VideoIntelligenceService::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::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/test/google/cloud/video_intelligence/v1/video_intelligence_service_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/test/google/cloud/video_intelligence/v1/video_intelligence_service_test.rb deleted file mode 100644 index 9a7512281622..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/test/google/cloud/video_intelligence/v1/video_intelligence_service_test.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! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/videointelligence/v1/video_intelligence_pb" -require "google/cloud/video_intelligence/v1/video_intelligence_service" - -class ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::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_annotate_video - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - input_uri = "hello world" - input_content = "hello world" - features = [:FEATURE_UNSPECIFIED] - video_context = {} - output_uri = "hello world" - location_id = "hello world" - - annotate_video_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :annotate_video, name - assert_kind_of ::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest, request - assert_equal "hello world", request["input_uri"] - assert_equal "hello world", request["input_content"] - assert_equal [:FEATURE_UNSPECIFIED], request["features"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::VideoIntelligence::V1::VideoContext), request["video_context"] - assert_equal "hello world", request["output_uri"] - assert_equal "hello world", request["location_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, annotate_video_client_stub do - # Create client - client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video ::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video(::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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, annotate_video_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::VideoIntelligence::V1::VideoIntelligenceService::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::VideoIntelligence::V1::VideoIntelligenceService::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::VideoIntelligence::V1::VideoIntelligenceService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::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::VideoIntelligence::V1::VideoIntelligenceService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1/test/helper.rb b/owl-bot-staging/google-cloud-video_intelligence-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.gitignore b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.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-video_intelligence-v1beta2/.repo-metadata.json b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.repo-metadata.json deleted file mode 100644 index 4004255462b0..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "videointelligence.googleapis.com", - "api_shortname": "videointelligence", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-video_intelligence-v1beta2/latest", - "distribution_name": "google-cloud-video_intelligence-v1beta2", - "is_cloud": true, - "language": "ruby", - "name": "videointelligence", - "name_pretty": "Cloud Video Intelligence V1beta2 API", - "product_documentation": "https://cloud.google.com/video-intelligence", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API. Note that google-cloud-video_intelligence-v1beta2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video_intelligence instead. See the readme for more details.", - "ruby-cloud-env-prefix": "VIDEO_INTELLIGENCE", - "ruby-cloud-product-url": "https://cloud.google.com/video-intelligence", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.rubocop.yml b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.rubocop.yml deleted file mode 100644 index 6a40a2f1ed20..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-video_intelligence-v1beta2.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-video_intelligence-v1beta2.rb" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.toys.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.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-video_intelligence-v1beta2/.yardopts b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.yardopts deleted file mode 100644 index d0ca4b201896..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Video Intelligence V1beta2 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-video_intelligence-v1beta2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/AUTHENTICATION.md deleted file mode 100644 index 4e6e68e28cee..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-video_intelligence-v1beta2 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-video_intelligence-v1beta2 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/video_intelligence/v1beta2" - -client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/video_intelligence/v1beta2" - -::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::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-video_intelligence-v1beta2 -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/video_intelligence/v1beta2" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::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-video_intelligence-v1beta2/CHANGELOG.md b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/Gemfile b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/LICENSE.md b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/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-video_intelligence-v1beta2/README.md b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/README.md deleted file mode 100644 index 1c0a33caf125..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Cloud Video Intelligence V1beta2 API - -Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming 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 Cloud Video Intelligence V1beta2 API. Most users should consider using -the main client gem, -[google-cloud-video_intelligence](https://rubygems.org/gems/google-cloud-video_intelligence). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-video_intelligence-v1beta2 -``` - -## 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/videointelligence.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/video_intelligence/v1beta2" - -client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new -request = ::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest.new # (request fields as keyword arguments...) -response = client.annotate_video request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-video_intelligence-v1beta2/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/video-intelligence) -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/video_intelligence/v1beta2" -require "logger" - -client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::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-video_intelligence`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-video_intelligence-v1beta2`. -_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-video_intelligence`. -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-video_intelligence-v1beta2`. - -### 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-video_intelligence-v1beta2/Rakefile b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/Rakefile deleted file mode 100644 index bfbc82c01ab0..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/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-video_intelligence-v1beta2 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["VIDEO_INTELLIGENCE_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["VIDEO_INTELLIGENCE_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["VIDEO_INTELLIGENCE_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 VIDEO_INTELLIGENCE_TEST_PROJECT=test123 VIDEO_INTELLIGENCE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/credentials" - ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["VIDEO_INTELLIGENCE_PROJECT"] = project - ENV["VIDEO_INTELLIGENCE_TEST_PROJECT"] = project - ENV["VIDEO_INTELLIGENCE_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-video_intelligence-v1beta2 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-video_intelligence-v1beta2 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-video_intelligence-v1beta2 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-video_intelligence-v1beta2 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-video_intelligence-v1beta2" - header "google-cloud-video_intelligence-v1beta2 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-video_intelligence-v1beta2 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-video_intelligence-v1beta2 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-video_intelligence-v1beta2 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-video_intelligence-v1beta2 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-video_intelligence-v1beta2/gapic_metadata.json b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/gapic_metadata.json deleted file mode 100644 index f83ec6e5ee0e..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/gapic_metadata.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.videointelligence.v1beta2", - "libraryPackage": "::Google::Cloud::VideoIntelligence::V1beta2", - "services": { - "VideoIntelligenceService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client", - "rpcs": { - "AnnotateVideo": { - "methods": [ - "annotate_video" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/google-cloud-video_intelligence-v1beta2.gemspec b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/google-cloud-video_intelligence-v1beta2.gemspec deleted file mode 100644 index 39aa5d048236..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/google-cloud-video_intelligence-v1beta2.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/video_intelligence/v1beta2/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-video_intelligence-v1beta2" - gem.version = Google::Cloud::VideoIntelligence::V1beta2::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API. Note that google-cloud-video_intelligence-v1beta2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video_intelligence instead. See the readme for more details." - gem.summary = "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming 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.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google-cloud-video_intelligence-v1beta2.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google-cloud-video_intelligence-v1beta2.rb deleted file mode 100644 index 0362a2f88ccc..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google-cloud-video_intelligence-v1beta2.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/video_intelligence/v1beta2" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2.rb deleted file mode 100644 index 32ede984a16b..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2.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/video_intelligence/v1beta2/video_intelligence_service" -require "google/cloud/video_intelligence/v1beta2/version" - -module Google - module Cloud - module VideoIntelligence - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/video_intelligence/v1beta2" - # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/video_intelligence/v1beta2" - # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Client.new - # - module V1beta2 - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta2", "_helpers.rb" -require "google/cloud/video_intelligence/v1beta2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/rest.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/rest.rb deleted file mode 100644 index 846afc6e1e0a..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/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/video_intelligence/v1beta2/video_intelligence_service/rest" -require "google/cloud/video_intelligence/v1beta2/version" - -module Google - module Cloud - module VideoIntelligence - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/video_intelligence/v1beta2/rest" - # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Client.new - # - module V1beta2 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/version.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/version.rb deleted file mode 100644 index b0069d8a14eb..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/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 VideoIntelligence - module V1beta2 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service.rb deleted file mode 100644 index 313d03dfd30c..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service.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/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/video_intelligence/v1beta2/version" - -require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/credentials" -require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/operations" -require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/client" -require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest" - -module Google - module Cloud - module VideoIntelligence - module V1beta2 - ## - # Service that implements Google Cloud Video Intelligence API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/video_intelligence/v1beta2/video_intelligence_service" - # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest" - # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Client.new - # - module VideoIntelligenceService - end - end - end - end -end - -helper_path = ::File.join __dir__, "video_intelligence_service", "helpers.rb" -require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/client.rb deleted file mode 100644 index 1068f7ec41df..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/client.rb +++ /dev/null @@ -1,525 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/videointelligence/v1beta2/video_intelligence_pb" - -module Google - module Cloud - module VideoIntelligence - module V1beta2 - module VideoIntelligenceService - ## - # Client for the VideoIntelligenceService service. - # - # Service that implements Google Cloud Video Intelligence API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :video_intelligence_service_stub - - ## - # Configure the VideoIntelligenceService Client class. - # - # See {::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all VideoIntelligenceService clients - # ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::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", "VideoIntelligence", "V1beta2"] - 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.annotate_video.timeout = 600.0 - default_config.rpcs.annotate_video.retry_policy = { - initial_delay: 1.0, max_delay: 120.0, multiplier: 2.5, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the VideoIntelligenceService 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::VideoIntelligence::V1beta2::VideoIntelligenceService::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 - @video_intelligence_service_stub.universe_domain - end - - ## - # Create a new VideoIntelligenceService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the VideoIntelligenceService 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/videointelligence/v1beta2/video_intelligence_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 - - @video_intelligence_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::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 - ) - - @video_intelligence_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 - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @video_intelligence_service_stub.logger - end - - # Service calls - - ## - # Performs asynchronous video annotation. Progress and results can be - # retrieved through the `google.longrunning.Operations` interface. - # `Operation.metadata` contains `AnnotateVideoProgress` (progress). - # `Operation.response` contains `AnnotateVideoResponse` (results). - # - # @overload annotate_video(request, options = nil) - # Pass arguments to `annotate_video` via a request object, either of type - # {::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload annotate_video(input_uri: nil, input_content: nil, features: nil, video_context: nil, output_uri: nil, location_id: nil) - # Pass arguments to `annotate_video` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param input_uri [::String] - # Input video location. Currently, only - # [Google Cloud Storage](https://cloud.google.com/storage/) URIs are - # supported, which must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - # more information, see [Request - # URIs](https://cloud.google.com/storage/docs/request-endpoints). A video URI - # may include wildcards in `object-id`, and thus identify multiple videos. - # Supported wildcards: '*' to match 0 or more characters; - # '?' to match 1 character. If unset, the input video should be embedded - # in the request as `input_content`. If set, `input_content` should be unset. - # @param input_content [::String] - # The video data bytes. - # If unset, the input video(s) should be specified via `input_uri`. - # If set, `input_uri` should be unset. - # @param features [::Array<::Google::Cloud::VideoIntelligence::V1beta2::Feature>] - # Required. Requested video annotation features. - # @param video_context [::Google::Cloud::VideoIntelligence::V1beta2::VideoContext, ::Hash] - # Additional video context and/or feature-specific parameters. - # @param output_uri [::String] - # Optional. Location where the output (in JSON format) should be stored. - # Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) - # URIs are supported, which must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - # more information, see [Request - # URIs](https://cloud.google.com/storage/docs/request-endpoints). - # @param location_id [::String] - # Optional. Cloud region where annotation should take place. Supported cloud - # regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region - # is specified, a region will be determined based on video file 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/video_intelligence/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest.new - # - # # Call the annotate_video method. - # result = client.annotate_video request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def annotate_video request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.annotate_video.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::VideoIntelligence::V1beta2::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.annotate_video.timeout, - metadata: metadata, - retry_policy: @config.rpcs.annotate_video.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_intelligence_service_stub.call_rpc :annotate_video, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 VideoIntelligenceService API. - # - # This class represents the configuration for VideoIntelligenceService, - # 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::VideoIntelligence::V1beta2::VideoIntelligenceService::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 - # # annotate_video to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.annotate_video.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.annotate_video.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::VideoIntelligence::V1beta2::VideoIntelligenceService::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 = "videointelligence.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 VideoIntelligenceService 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 `annotate_video` - # @return [::Gapic::Config::Method] - # - attr_reader :annotate_video - - # @private - def initialize parent_rpcs = nil - annotate_video_config = parent_rpcs.annotate_video if parent_rpcs.respond_to? :annotate_video - @annotate_video = ::Gapic::Config::Method.new annotate_video_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/credentials.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/credentials.rb deleted file mode 100644 index 68c0723523ce..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_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 VideoIntelligence - module V1beta2 - module VideoIntelligenceService - # Credentials for the VideoIntelligenceService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "VIDEO_INTELLIGENCE_CREDENTIALS", - "VIDEO_INTELLIGENCE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "VIDEO_INTELLIGENCE_CREDENTIALS_JSON", - "VIDEO_INTELLIGENCE_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-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/operations.rb deleted file mode 100644 index 9341d71bf6e2..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_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 VideoIntelligence - module V1beta2 - module VideoIntelligenceService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the VideoIntelligenceService 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 VideoIntelligenceService 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::VideoIntelligence::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::VideoIntelligence::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::VideoIntelligence::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::VideoIntelligence::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::VideoIntelligence::V1beta2::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 = "videointelligence.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-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest.rb deleted file mode 100644 index c593a033e77f..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest.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 "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/video_intelligence/v1beta2/version" - -require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/credentials" -require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/operations" -require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/client" - -module Google - module Cloud - module VideoIntelligence - module V1beta2 - ## - # Service that implements Google Cloud Video Intelligence API. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest" - # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Client.new - # - module VideoIntelligenceService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/client.rb deleted file mode 100644 index c815dffe7c6e..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/client.rb +++ /dev/null @@ -1,483 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/videointelligence/v1beta2/video_intelligence_pb" -require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/service_stub" - -module Google - module Cloud - module VideoIntelligence - module V1beta2 - module VideoIntelligenceService - module Rest - ## - # REST client for the VideoIntelligenceService service. - # - # Service that implements Google Cloud Video Intelligence API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :video_intelligence_service_stub - - ## - # Configure the VideoIntelligenceService Client class. - # - # See {::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all VideoIntelligenceService clients - # ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::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", "VideoIntelligence", "V1beta2"] - 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.annotate_video.timeout = 600.0 - default_config.rpcs.annotate_video.retry_policy = { - initial_delay: 1.0, max_delay: 120.0, multiplier: 2.5, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the VideoIntelligenceService 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::VideoIntelligence::V1beta2::VideoIntelligenceService::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 - @video_intelligence_service_stub.universe_domain - end - - ## - # Create a new VideoIntelligenceService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the VideoIntelligenceService 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::VideoIntelligence::V1beta2::VideoIntelligenceService::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 - - @video_intelligence_service_stub = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @video_intelligence_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 - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @video_intelligence_service_stub.logger - end - - # Service calls - - ## - # Performs asynchronous video annotation. Progress and results can be - # retrieved through the `google.longrunning.Operations` interface. - # `Operation.metadata` contains `AnnotateVideoProgress` (progress). - # `Operation.response` contains `AnnotateVideoResponse` (results). - # - # @overload annotate_video(request, options = nil) - # Pass arguments to `annotate_video` via a request object, either of type - # {::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload annotate_video(input_uri: nil, input_content: nil, features: nil, video_context: nil, output_uri: nil, location_id: nil) - # Pass arguments to `annotate_video` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param input_uri [::String] - # Input video location. Currently, only - # [Google Cloud Storage](https://cloud.google.com/storage/) URIs are - # supported, which must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - # more information, see [Request - # URIs](https://cloud.google.com/storage/docs/request-endpoints). A video URI - # may include wildcards in `object-id`, and thus identify multiple videos. - # Supported wildcards: '*' to match 0 or more characters; - # '?' to match 1 character. If unset, the input video should be embedded - # in the request as `input_content`. If set, `input_content` should be unset. - # @param input_content [::String] - # The video data bytes. - # If unset, the input video(s) should be specified via `input_uri`. - # If set, `input_uri` should be unset. - # @param features [::Array<::Google::Cloud::VideoIntelligence::V1beta2::Feature>] - # Required. Requested video annotation features. - # @param video_context [::Google::Cloud::VideoIntelligence::V1beta2::VideoContext, ::Hash] - # Additional video context and/or feature-specific parameters. - # @param output_uri [::String] - # Optional. Location where the output (in JSON format) should be stored. - # Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) - # URIs are supported, which must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - # more information, see [Request - # URIs](https://cloud.google.com/storage/docs/request-endpoints). - # @param location_id [::String] - # Optional. Cloud region where annotation should take place. Supported cloud - # regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region - # is specified, a region will be determined based on video file 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/video_intelligence/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest.new - # - # # Call the annotate_video method. - # result = client.annotate_video request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def annotate_video request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.annotate_video.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::VideoIntelligence::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.annotate_video.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.annotate_video.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_intelligence_service_stub.annotate_video request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 VideoIntelligenceService REST API. - # - # This class represents the configuration for VideoIntelligenceService 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::VideoIntelligence::V1beta2::VideoIntelligenceService::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 - # # annotate_video to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.annotate_video.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.annotate_video.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 = "videointelligence.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 VideoIntelligenceService 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 `annotate_video` - # @return [::Gapic::Config::Method] - # - attr_reader :annotate_video - - # @private - def initialize parent_rpcs = nil - annotate_video_config = parent_rpcs.annotate_video if parent_rpcs.respond_to? :annotate_video - @annotate_video = ::Gapic::Config::Method.new annotate_video_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/operations.rb deleted file mode 100644 index bb4303a54c2f..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/operations.rb +++ /dev/null @@ -1,946 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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 VideoIntelligence - module V1beta2 - module VideoIntelligenceService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the VideoIntelligenceService 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 VideoIntelligenceService 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::VideoIntelligence::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "videointelligence.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: "/v1beta2/{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: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/operations/{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: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta2/operations/{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: "/v1beta2/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1beta2/operations/{name}:cancel", - 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-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/service_stub.rb deleted file mode 100644 index e3dfedc1a5c5..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest/service_stub.rb +++ /dev/null @@ -1,141 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/videointelligence/v1beta2/video_intelligence_pb" - -module Google - module Cloud - module VideoIntelligence - module V1beta2 - module VideoIntelligenceService - module Rest - ## - # REST service stub for the VideoIntelligenceService 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 annotate_video REST call - # - # @param request_pb [::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def annotate_video request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_annotate_video_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "annotate_video", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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 annotate_video REST call - # - # @param request_pb [::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_annotate_video_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta2/videos:annotate", - body: "*", - matches: [] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/videointelligence/v1beta2/video_intelligence_pb.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/videointelligence/v1beta2/video_intelligence_pb.rb deleted file mode 100644 index a62a077b7c24..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/videointelligence/v1beta2/video_intelligence_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/videointelligence/v1beta2/video_intelligence.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n?google/cloud/videointelligence/v1beta2/video_intelligence.proto\x12&google.cloud.videointelligence.v1beta2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x88\x02\n\x14\x41nnotateVideoRequest\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\x15\n\rinput_content\x18\x06 \x01(\x0c\x12\x46\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0e\x32/.google.cloud.videointelligence.v1beta2.FeatureB\x03\xe0\x41\x02\x12K\n\rvideo_context\x18\x03 \x01(\x0b\x32\x34.google.cloud.videointelligence.v1beta2.VideoContext\x12\x17\n\noutput_uri\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0blocation_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xec\x03\n\x0cVideoContext\x12\x46\n\x08segments\x18\x01 \x03(\x0b\x32\x34.google.cloud.videointelligence.v1beta2.VideoSegment\x12\\\n\x16label_detection_config\x18\x02 \x01(\x0b\x32<.google.cloud.videointelligence.v1beta2.LabelDetectionConfig\x12g\n\x1cshot_change_detection_config\x18\x03 \x01(\x0b\x32\x41.google.cloud.videointelligence.v1beta2.ShotChangeDetectionConfig\x12q\n!explicit_content_detection_config\x18\x04 \x01(\x0b\x32\x46.google.cloud.videointelligence.v1beta2.ExplicitContentDetectionConfig\x12Z\n\x15\x66\x61\x63\x65_detection_config\x18\x05 \x01(\x0b\x32;.google.cloud.videointelligence.v1beta2.FaceDetectionConfig\"\x9a\x01\n\x14LabelDetectionConfig\x12X\n\x14label_detection_mode\x18\x01 \x01(\x0e\x32:.google.cloud.videointelligence.v1beta2.LabelDetectionMode\x12\x19\n\x11stationary_camera\x18\x02 \x01(\x08\x12\r\n\x05model\x18\x03 \x01(\t\"*\n\x19ShotChangeDetectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\"/\n\x1e\x45xplicitContentDetectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\"D\n\x13\x46\x61\x63\x65\x44\x65tectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\x12\x1e\n\x16include_bounding_boxes\x18\x02 \x01(\x08\"x\n\x0cVideoSegment\x12\x34\n\x11start_time_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0f\x65nd_time_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"i\n\x0cLabelSegment\x12\x45\n\x07segment\x18\x01 \x01(\x0b\x32\x34.google.cloud.videointelligence.v1beta2.VideoSegment\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"P\n\nLabelFrame\x12.\n\x0btime_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"G\n\x06\x45ntity\x12\x11\n\tentity_id\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x15\n\rlanguage_code\x18\x03 \x01(\t\"\xa8\x02\n\x0fLabelAnnotation\x12>\n\x06\x65ntity\x18\x01 \x01(\x0b\x32..google.cloud.videointelligence.v1beta2.Entity\x12I\n\x11\x63\x61tegory_entities\x18\x02 \x03(\x0b\x32..google.cloud.videointelligence.v1beta2.Entity\x12\x46\n\x08segments\x18\x03 \x03(\x0b\x32\x34.google.cloud.videointelligence.v1beta2.LabelSegment\x12\x42\n\x06\x66rames\x18\x04 \x03(\x0b\x32\x32.google.cloud.videointelligence.v1beta2.LabelFrame\"\x9a\x01\n\x14\x45xplicitContentFrame\x12.\n\x0btime_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12R\n\x16pornography_likelihood\x18\x02 \x01(\x0e\x32\x32.google.cloud.videointelligence.v1beta2.Likelihood\"i\n\x19\x45xplicitContentAnnotation\x12L\n\x06\x66rames\x18\x01 \x03(\x0b\x32<.google.cloud.videointelligence.v1beta2.ExplicitContentFrame\"Q\n\x15NormalizedBoundingBox\x12\x0c\n\x04left\x18\x01 \x01(\x02\x12\x0b\n\x03top\x18\x02 \x01(\x02\x12\r\n\x05right\x18\x03 \x01(\x02\x12\x0e\n\x06\x62ottom\x18\x04 \x01(\x02\"T\n\x0b\x46\x61\x63\x65Segment\x12\x45\n\x07segment\x18\x01 \x01(\x0b\x32\x34.google.cloud.videointelligence.v1beta2.VideoSegment\"\x9d\x01\n\tFaceFrame\x12`\n\x19normalized_bounding_boxes\x18\x01 \x03(\x0b\x32=.google.cloud.videointelligence.v1beta2.NormalizedBoundingBox\x12.\n\x0btime_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xad\x01\n\x0e\x46\x61\x63\x65\x41nnotation\x12\x11\n\tthumbnail\x18\x01 \x01(\x0c\x12\x45\n\x08segments\x18\x02 \x03(\x0b\x32\x33.google.cloud.videointelligence.v1beta2.FaceSegment\x12\x41\n\x06\x66rames\x18\x03 \x03(\x0b\x32\x31.google.cloud.videointelligence.v1beta2.FaceFrame\"\xdf\x04\n\x16VideoAnnotationResults\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12Z\n\x19segment_label_annotations\x18\x02 \x03(\x0b\x32\x37.google.cloud.videointelligence.v1beta2.LabelAnnotation\x12W\n\x16shot_label_annotations\x18\x03 \x03(\x0b\x32\x37.google.cloud.videointelligence.v1beta2.LabelAnnotation\x12X\n\x17\x66rame_label_annotations\x18\x04 \x03(\x0b\x32\x37.google.cloud.videointelligence.v1beta2.LabelAnnotation\x12P\n\x10\x66\x61\x63\x65_annotations\x18\x05 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1beta2.FaceAnnotation\x12N\n\x10shot_annotations\x18\x06 \x03(\x0b\x32\x34.google.cloud.videointelligence.v1beta2.VideoSegment\x12^\n\x13\x65xplicit_annotation\x18\x07 \x01(\x0b\x32\x41.google.cloud.videointelligence.v1beta2.ExplicitContentAnnotation\x12!\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.Status\"s\n\x15\x41nnotateVideoResponse\x12Z\n\x12\x61nnotation_results\x18\x01 \x03(\x0b\x32>.google.cloud.videointelligence.v1beta2.VideoAnnotationResults\"\xa7\x01\n\x17VideoAnnotationProgress\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\x18\n\x10progress_percent\x18\x02 \x01(\x05\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"u\n\x15\x41nnotateVideoProgress\x12\\\n\x13\x61nnotation_progress\x18\x01 \x03(\x0b\x32?.google.cloud.videointelligence.v1beta2.VideoAnnotationProgress*\x86\x01\n\x07\x46\x65\x61ture\x12\x17\n\x13\x46\x45\x41TURE_UNSPECIFIED\x10\x00\x12\x13\n\x0fLABEL_DETECTION\x10\x01\x12\x19\n\x15SHOT_CHANGE_DETECTION\x10\x02\x12\x1e\n\x1a\x45XPLICIT_CONTENT_DETECTION\x10\x03\x12\x12\n\x0e\x46\x41\x43\x45_DETECTION\x10\x04*r\n\x12LabelDetectionMode\x12$\n LABEL_DETECTION_MODE_UNSPECIFIED\x10\x00\x12\r\n\tSHOT_MODE\x10\x01\x12\x0e\n\nFRAME_MODE\x10\x02\x12\x17\n\x13SHOT_AND_FRAME_MODE\x10\x03*t\n\nLikelihood\x12\x1a\n\x16LIKELIHOOD_UNSPECIFIED\x10\x00\x12\x11\n\rVERY_UNLIKELY\x10\x01\x12\x0c\n\x08UNLIKELY\x10\x02\x12\x0c\n\x08POSSIBLE\x10\x03\x12\n\n\x06LIKELY\x10\x04\x12\x0f\n\x0bVERY_LIKELY\x10\x05\x32\xca\x02\n\x18VideoIntelligenceService\x12\xd7\x01\n\rAnnotateVideo\x12<.google.cloud.videointelligence.v1beta2.AnnotateVideoRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41.\n\x15\x41nnotateVideoResponse\x12\x15\x41nnotateVideoProgress\xda\x41\x12input_uri,features\x82\xd3\xe4\x93\x02\x1d\"\x18/v1beta2/videos:annotate:\x01*\x1aT\xca\x41 videointelligence.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa5\x02\n*com.google.cloud.videointelligence.v1beta2B\x1dVideoIntelligenceServiceProtoP\x01ZXcloud.google.com/go/videointelligence/apiv1beta2/videointelligencepb;videointelligencepb\xaa\x02&Google.Cloud.VideoIntelligence.V1Beta2\xca\x02&Google\\Cloud\\VideoIntelligence\\V1beta2\xea\x02)Google::Cloud::VideoIntelligence::V1beta2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module VideoIntelligence - module V1beta2 - AnnotateVideoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.AnnotateVideoRequest").msgclass - VideoContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.VideoContext").msgclass - LabelDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.LabelDetectionConfig").msgclass - ShotChangeDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.ShotChangeDetectionConfig").msgclass - ExplicitContentDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.ExplicitContentDetectionConfig").msgclass - FaceDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.FaceDetectionConfig").msgclass - VideoSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.VideoSegment").msgclass - LabelSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.LabelSegment").msgclass - LabelFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.LabelFrame").msgclass - Entity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.Entity").msgclass - LabelAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.LabelAnnotation").msgclass - ExplicitContentFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.ExplicitContentFrame").msgclass - ExplicitContentAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.ExplicitContentAnnotation").msgclass - NormalizedBoundingBox = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.NormalizedBoundingBox").msgclass - FaceSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.FaceSegment").msgclass - FaceFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.FaceFrame").msgclass - FaceAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.FaceAnnotation").msgclass - VideoAnnotationResults = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.VideoAnnotationResults").msgclass - AnnotateVideoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.AnnotateVideoResponse").msgclass - VideoAnnotationProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.VideoAnnotationProgress").msgclass - AnnotateVideoProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.AnnotateVideoProgress").msgclass - Feature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.Feature").enummodule - LabelDetectionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.LabelDetectionMode").enummodule - Likelihood = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1beta2.Likelihood").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/videointelligence/v1beta2/video_intelligence_services_pb.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/videointelligence/v1beta2/video_intelligence_services_pb.rb deleted file mode 100644 index 70241bfb714b..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/lib/google/cloud/videointelligence/v1beta2/video_intelligence_services_pb.rb +++ /dev/null @@ -1,49 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/videointelligence/v1beta2/video_intelligence.proto for package 'Google.Cloud.VideoIntelligence.V1beta2' -# 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/videointelligence/v1beta2/video_intelligence_pb' - -module Google - module Cloud - module VideoIntelligence - module V1beta2 - module VideoIntelligenceService - # Service that implements Google Cloud Video Intelligence API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.videointelligence.v1beta2.VideoIntelligenceService' - - # Performs asynchronous video annotation. Progress and results can be - # retrieved through the `google.longrunning.Operations` interface. - # `Operation.metadata` contains `AnnotateVideoProgress` (progress). - # `Operation.response` contains `AnnotateVideoResponse` (results). - rpc :AnnotateVideo, ::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/README.md b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/README.md deleted file mode 100644 index 01348c5923d9..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Video Intelligence V1beta2 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-video_intelligence-v1beta2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # 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. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - # - # Example: - # - # 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 - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # 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 - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # 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 - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/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-video_intelligence-v1beta2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/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-video_intelligence-v1beta2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/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-video_intelligence-v1beta2/proto_docs/google/cloud/videointelligence/v1beta2/video_intelligence.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/cloud/videointelligence/v1beta2/video_intelligence.rb deleted file mode 100644 index b3db26f3a9e6..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/cloud/videointelligence/v1beta2/video_intelligence.rb +++ /dev/null @@ -1,441 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module VideoIntelligence - module V1beta2 - # Video annotation request. - # @!attribute [rw] input_uri - # @return [::String] - # Input video location. Currently, only - # [Google Cloud Storage](https://cloud.google.com/storage/) URIs are - # supported, which must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - # more information, see [Request - # URIs](https://cloud.google.com/storage/docs/request-endpoints). A video URI - # may include wildcards in `object-id`, and thus identify multiple videos. - # Supported wildcards: '*' to match 0 or more characters; - # '?' to match 1 character. If unset, the input video should be embedded - # in the request as `input_content`. If set, `input_content` should be unset. - # @!attribute [rw] input_content - # @return [::String] - # The video data bytes. - # If unset, the input video(s) should be specified via `input_uri`. - # If set, `input_uri` should be unset. - # @!attribute [rw] features - # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::Feature>] - # Required. Requested video annotation features. - # @!attribute [rw] video_context - # @return [::Google::Cloud::VideoIntelligence::V1beta2::VideoContext] - # Additional video context and/or feature-specific parameters. - # @!attribute [rw] output_uri - # @return [::String] - # Optional. Location where the output (in JSON format) should be stored. - # Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) - # URIs are supported, which must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - # more information, see [Request - # URIs](https://cloud.google.com/storage/docs/request-endpoints). - # @!attribute [rw] location_id - # @return [::String] - # Optional. Cloud region where annotation should take place. Supported cloud - # regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region - # is specified, a region will be determined based on video file location. - class AnnotateVideoRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video context and/or feature-specific parameters. - # @!attribute [rw] segments - # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::VideoSegment>] - # Video segments to annotate. The segments may overlap and are not required - # to be contiguous or span the whole video. If unspecified, each video is - # treated as a single segment. - # @!attribute [rw] label_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1beta2::LabelDetectionConfig] - # Config for LABEL_DETECTION. - # @!attribute [rw] shot_change_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1beta2::ShotChangeDetectionConfig] - # Config for SHOT_CHANGE_DETECTION. - # @!attribute [rw] explicit_content_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1beta2::ExplicitContentDetectionConfig] - # Config for EXPLICIT_CONTENT_DETECTION. - # @!attribute [rw] face_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1beta2::FaceDetectionConfig] - # Config for FACE_DETECTION. - class VideoContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for LABEL_DETECTION. - # @!attribute [rw] label_detection_mode - # @return [::Google::Cloud::VideoIntelligence::V1beta2::LabelDetectionMode] - # What labels should be detected with LABEL_DETECTION, in addition to - # video-level labels or segment-level labels. - # If unspecified, defaults to `SHOT_MODE`. - # @!attribute [rw] stationary_camera - # @return [::Boolean] - # Whether the video has been shot from a stationary (i.e. non-moving) camera. - # When set to true, might improve detection accuracy for moving objects. - # Should be used with `SHOT_AND_FRAME_MODE` enabled. - # @!attribute [rw] model - # @return [::String] - # Model to use for label detection. - # Supported values: "builtin/stable" (the default if unset) and - # "builtin/latest". - class LabelDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for SHOT_CHANGE_DETECTION. - # @!attribute [rw] model - # @return [::String] - # Model to use for shot change detection. - # Supported values: "builtin/stable" (the default if unset) and - # "builtin/latest". - class ShotChangeDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for EXPLICIT_CONTENT_DETECTION. - # @!attribute [rw] model - # @return [::String] - # Model to use for explicit content detection. - # Supported values: "builtin/stable" (the default if unset) and - # "builtin/latest". - class ExplicitContentDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for FACE_DETECTION. - # @!attribute [rw] model - # @return [::String] - # Model to use for face detection. - # Supported values: "builtin/stable" (the default if unset) and - # "builtin/latest". - # @!attribute [rw] include_bounding_boxes - # @return [::Boolean] - # Whether bounding boxes be included in the face annotation output. - class FaceDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video segment. - # @!attribute [rw] start_time_offset - # @return [::Google::Protobuf::Duration] - # Time-offset, relative to the beginning of the video, - # corresponding to the start of the segment (inclusive). - # @!attribute [rw] end_time_offset - # @return [::Google::Protobuf::Duration] - # Time-offset, relative to the beginning of the video, - # corresponding to the end of the segment (inclusive). - class VideoSegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video segment level annotation results for label detection. - # @!attribute [rw] segment - # @return [::Google::Cloud::VideoIntelligence::V1beta2::VideoSegment] - # Video segment where a label was detected. - # @!attribute [rw] confidence - # @return [::Float] - # Confidence that the label is accurate. Range: [0, 1]. - class LabelSegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video frame level annotation results for label detection. - # @!attribute [rw] time_offset - # @return [::Google::Protobuf::Duration] - # Time-offset, relative to the beginning of the video, corresponding to the - # video frame for this location. - # @!attribute [rw] confidence - # @return [::Float] - # Confidence that the label is accurate. Range: [0, 1]. - class LabelFrame - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Detected entity from video analysis. - # @!attribute [rw] entity_id - # @return [::String] - # Opaque entity ID. Some IDs may be available in - # [Google Knowledge Graph Search - # API](https://developers.google.com/knowledge-graph/). - # @!attribute [rw] description - # @return [::String] - # Textual description, e.g. `Fixed-gear bicycle`. - # @!attribute [rw] language_code - # @return [::String] - # Language code for `description` in BCP-47 format. - class Entity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Label annotation. - # @!attribute [rw] entity - # @return [::Google::Cloud::VideoIntelligence::V1beta2::Entity] - # Detected entity. - # @!attribute [rw] category_entities - # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::Entity>] - # Common categories for the detected entity. - # E.g. when the label is `Terrier` the category is likely `dog`. And in some - # cases there might be more than one categories e.g. `Terrier` could also be - # a `pet`. - # @!attribute [rw] segments - # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::LabelSegment>] - # All video segments where a label was detected. - # @!attribute [rw] frames - # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::LabelFrame>] - # All video frames where a label was detected. - class LabelAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video frame level annotation results for explicit content. - # @!attribute [rw] time_offset - # @return [::Google::Protobuf::Duration] - # Time-offset, relative to the beginning of the video, corresponding to the - # video frame for this location. - # @!attribute [rw] pornography_likelihood - # @return [::Google::Cloud::VideoIntelligence::V1beta2::Likelihood] - # Likelihood of the pornography content.. - class ExplicitContentFrame - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Explicit content annotation (based on per-frame visual signals only). - # If no explicit content has been detected in a frame, no annotations are - # present for that frame. - # @!attribute [rw] frames - # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::ExplicitContentFrame>] - # All video frames where explicit content was detected. - class ExplicitContentAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Normalized bounding box. - # The normalized vertex coordinates are relative to the original image. - # Range: [0, 1]. - # @!attribute [rw] left - # @return [::Float] - # Left X coordinate. - # @!attribute [rw] top - # @return [::Float] - # Top Y coordinate. - # @!attribute [rw] right - # @return [::Float] - # Right X coordinate. - # @!attribute [rw] bottom - # @return [::Float] - # Bottom Y coordinate. - class NormalizedBoundingBox - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video segment level annotation results for face detection. - # @!attribute [rw] segment - # @return [::Google::Cloud::VideoIntelligence::V1beta2::VideoSegment] - # Video segment where a face was detected. - class FaceSegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video frame level annotation results for face detection. - # @!attribute [rw] normalized_bounding_boxes - # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::NormalizedBoundingBox>] - # Normalized Bounding boxes in a frame. - # There can be more than one boxes if the same face is detected in multiple - # locations within the current frame. - # @!attribute [rw] time_offset - # @return [::Google::Protobuf::Duration] - # Time-offset, relative to the beginning of the video, - # corresponding to the video frame for this location. - class FaceFrame - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Face annotation. - # @!attribute [rw] thumbnail - # @return [::String] - # Thumbnail of a representative face view (in JPEG format). - # @!attribute [rw] segments - # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::FaceSegment>] - # All video segments where a face was detected. - # @!attribute [rw] frames - # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::FaceFrame>] - # All video frames where a face was detected. - class FaceAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotation results for a single video. - # @!attribute [rw] input_uri - # @return [::String] - # Video file location in - # [Google Cloud Storage](https://cloud.google.com/storage/). - # @!attribute [rw] segment_label_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::LabelAnnotation>] - # Label annotations on video level or user specified segment level. - # There is exactly one element for each unique label. - # @!attribute [rw] shot_label_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::LabelAnnotation>] - # Label annotations on shot level. - # There is exactly one element for each unique label. - # @!attribute [rw] frame_label_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::LabelAnnotation>] - # Label annotations on frame level. - # There is exactly one element for each unique label. - # @!attribute [rw] face_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::FaceAnnotation>] - # Face annotations. There is exactly one element for each unique face. - # @!attribute [rw] shot_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::VideoSegment>] - # Shot annotations. Each shot is represented as a video segment. - # @!attribute [rw] explicit_annotation - # @return [::Google::Cloud::VideoIntelligence::V1beta2::ExplicitContentAnnotation] - # Explicit content annotation. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # If set, indicates an error. Note that for a single `AnnotateVideoRequest` - # some videos may succeed and some may fail. - class VideoAnnotationResults - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video annotation response. Included in the `response` - # field of the `Operation` returned by the `GetOperation` - # call of the `google::longrunning::Operations` service. - # @!attribute [rw] annotation_results - # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::VideoAnnotationResults>] - # Annotation results for all videos specified in `AnnotateVideoRequest`. - class AnnotateVideoResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotation progress for a single video. - # @!attribute [rw] input_uri - # @return [::String] - # Video file location in - # [Google Cloud Storage](https://cloud.google.com/storage/). - # @!attribute [rw] progress_percent - # @return [::Integer] - # Approximate percentage processed thus far. - # Guaranteed to be 100 when fully processed. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Time when the request was received. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Time of the most recent update. - class VideoAnnotationProgress - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video annotation progress. Included in the `metadata` - # field of the `Operation` returned by the `GetOperation` - # call of the `google::longrunning::Operations` service. - # @!attribute [rw] annotation_progress - # @return [::Array<::Google::Cloud::VideoIntelligence::V1beta2::VideoAnnotationProgress>] - # Progress metadata for all videos specified in `AnnotateVideoRequest`. - class AnnotateVideoProgress - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video annotation feature. - module Feature - # Unspecified. - FEATURE_UNSPECIFIED = 0 - - # Label detection. Detect objects, such as dog or flower. - LABEL_DETECTION = 1 - - # Shot change detection. - SHOT_CHANGE_DETECTION = 2 - - # Explicit content detection. - EXPLICIT_CONTENT_DETECTION = 3 - - # Human face detection and tracking. - FACE_DETECTION = 4 - end - - # Label detection mode. - module LabelDetectionMode - # Unspecified. - LABEL_DETECTION_MODE_UNSPECIFIED = 0 - - # Detect shot-level labels. - SHOT_MODE = 1 - - # Detect frame-level labels. - FRAME_MODE = 2 - - # Detect both shot-level and frame-level labels. - SHOT_AND_FRAME_MODE = 3 - end - - # Bucketized representation of likelihood. - module Likelihood - # Unspecified likelihood. - LIKELIHOOD_UNSPECIFIED = 0 - - # Very unlikely. - VERY_UNLIKELY = 1 - - # Unlikely. - UNLIKELY = 2 - - # Possible. - POSSIBLE = 3 - - # Likely. - LIKELY = 4 - - # Very likely. - VERY_LIKELY = 5 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/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-video_intelligence-v1beta2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/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-video_intelligence-v1beta2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/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-video_intelligence-v1beta2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/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-video_intelligence-v1beta2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/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-video_intelligence-v1beta2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/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-video_intelligence-v1beta2/snippets/Gemfile b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/snippets/Gemfile deleted file mode 100644 index e128c730ef50..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/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-video_intelligence-v1beta2", path: "../" -else - gem "google-cloud-video_intelligence-v1beta2" -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-video_intelligence-v1beta2/snippets/snippet_metadata_google.cloud.videointelligence.v1beta2.json b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/snippets/snippet_metadata_google.cloud.videointelligence.v1beta2.json deleted file mode 100644 index ef0acd63362a..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/snippets/snippet_metadata_google.cloud.videointelligence.v1beta2.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-video_intelligence-v1beta2", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.videointelligence.v1beta2", - "version": "v1beta2" - } - ] - }, - "snippets": [ - { - "region_tag": "videointelligence_v1beta2_generated_VideoIntelligenceService_AnnotateVideo_sync", - "title": "Snippet for the annotate_video call in the VideoIntelligenceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client#annotate_video.", - "file": "video_intelligence_service/annotate_video.rb", - "language": "RUBY", - "client_method": { - "short_name": "annotate_video", - "full_name": "::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client#annotate_video", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "VideoIntelligenceService::Client", - "full_name": "::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client" - }, - "method": { - "short_name": "AnnotateVideo", - "full_name": "google.cloud.videointelligence.v1beta2.VideoIntelligenceService.AnnotateVideo", - "service": { - "short_name": "VideoIntelligenceService", - "full_name": "google.cloud.videointelligence.v1beta2.VideoIntelligenceService" - } - } - }, - "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-video_intelligence-v1beta2/snippets/video_intelligence_service/annotate_video.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/snippets/video_intelligence_service/annotate_video.rb deleted file mode 100644 index 473b6ffb1f4f..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/snippets/video_intelligence_service/annotate_video.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 videointelligence_v1beta2_generated_VideoIntelligenceService_AnnotateVideo_sync] -require "google/cloud/video_intelligence/v1beta2" - -## -# Snippet for the annotate_video call in the VideoIntelligenceService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client#annotate_video. -# -def annotate_video - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest.new - - # Call the annotate_video method. - result = client.annotate_video request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END videointelligence_v1beta2_generated_VideoIntelligenceService_AnnotateVideo_sync] diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/google/cloud/video_intelligence/v1beta2/video_intelligence_service_operations_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/google/cloud/video_intelligence/v1beta2/video_intelligence_service_operations_test.rb deleted file mode 100644 index dc8974408ccf..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/google/cloud/video_intelligence/v1beta2/video_intelligence_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/videointelligence/v1beta2/video_intelligence_pb" -require "google/cloud/videointelligence/v1beta2/video_intelligence_services_pb" -require "google/cloud/video_intelligence/v1beta2/video_intelligence_service" - -class ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::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::VideoIntelligence::V1beta2::VideoIntelligenceService::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::VideoIntelligence::V1beta2::VideoIntelligenceService::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::VideoIntelligence::V1beta2::VideoIntelligenceService::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::VideoIntelligence::V1beta2::VideoIntelligenceService::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::VideoIntelligence::V1beta2::VideoIntelligenceService::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::VideoIntelligence::V1beta2::VideoIntelligenceService::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::VideoIntelligence::V1beta2::VideoIntelligenceService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/google/cloud/video_intelligence/v1beta2/video_intelligence_service_rest_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/google/cloud/video_intelligence/v1beta2/video_intelligence_service_rest_test.rb deleted file mode 100644 index 2560d4fc9a73..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/google/cloud/video_intelligence/v1beta2/video_intelligence_service_rest_test.rb +++ /dev/null @@ -1,158 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/videointelligence/v1beta2/video_intelligence_pb" -require "google/cloud/video_intelligence/v1beta2/video_intelligence_service/rest" - - -class ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::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_annotate_video - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - input_uri = "hello world" - input_content = "hello world" - features = [:FEATURE_UNSPECIFIED] - video_context = {} - output_uri = "hello world" - location_id = "hello world" - - annotate_video_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::ServiceStub.stub :transcode_annotate_video_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, annotate_video_client_stub do - # Create client - client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.annotate_video input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.annotate_video ::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.annotate_video(::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, annotate_video_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::VideoIntelligence::V1beta2::VideoIntelligenceService::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::VideoIntelligence::V1beta2::VideoIntelligenceService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/google/cloud/video_intelligence/v1beta2/video_intelligence_service_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/google/cloud/video_intelligence/v1beta2/video_intelligence_service_test.rb deleted file mode 100644 index cb3613677fdc..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/google/cloud/video_intelligence/v1beta2/video_intelligence_service_test.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! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/videointelligence/v1beta2/video_intelligence_pb" -require "google/cloud/video_intelligence/v1beta2/video_intelligence_service" - -class ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::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_annotate_video - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - input_uri = "hello world" - input_content = "hello world" - features = [:FEATURE_UNSPECIFIED] - video_context = {} - output_uri = "hello world" - location_id = "hello world" - - annotate_video_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :annotate_video, name - assert_kind_of ::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest, request - assert_equal "hello world", request["input_uri"] - assert_equal "hello world", request["input_content"] - assert_equal [:FEATURE_UNSPECIFIED], request["features"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::VideoIntelligence::V1beta2::VideoContext), request["video_context"] - assert_equal "hello world", request["output_uri"] - assert_equal "hello world", request["location_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, annotate_video_client_stub do - # Create client - client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video ::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video(::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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, annotate_video_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::VideoIntelligence::V1beta2::VideoIntelligenceService::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::VideoIntelligence::V1beta2::VideoIntelligenceService::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::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::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::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/helper.rb b/owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1beta2/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.gitignore b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.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-video_intelligence-v1p1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.repo-metadata.json deleted file mode 100644 index e84b79568fa2..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "videointelligence.googleapis.com", - "api_shortname": "videointelligence", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-video_intelligence-v1p1beta1/latest", - "distribution_name": "google-cloud-video_intelligence-v1p1beta1", - "is_cloud": true, - "language": "ruby", - "name": "videointelligence", - "name_pretty": "Cloud Video Intelligence V1p1beta1 API", - "product_documentation": "https://cloud.google.com/video-intelligence", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API. Note that google-cloud-video_intelligence-v1p1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video_intelligence instead. See the readme for more details.", - "ruby-cloud-env-prefix": "VIDEO_INTELLIGENCE", - "ruby-cloud-product-url": "https://cloud.google.com/video-intelligence", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.rubocop.yml deleted file mode 100644 index 06f967ab8cea..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-video_intelligence-v1p1beta1.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-video_intelligence-v1p1beta1.rb" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.toys.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.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-video_intelligence-v1p1beta1/.yardopts b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.yardopts deleted file mode 100644 index a2d1103c19fc..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Video Intelligence V1p1beta1 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-video_intelligence-v1p1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/AUTHENTICATION.md deleted file mode 100644 index 81b01d85ef28..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-video_intelligence-v1p1beta1 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-video_intelligence-v1p1beta1 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/video_intelligence/v1p1beta1" - -client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/video_intelligence/v1p1beta1" - -::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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-video_intelligence-v1p1beta1 -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/video_intelligence/v1p1beta1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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-video_intelligence-v1p1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/Gemfile b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/LICENSE.md b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/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-video_intelligence-v1p1beta1/README.md b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/README.md deleted file mode 100644 index fad0b994865a..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Cloud Video Intelligence V1p1beta1 API - -Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming 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 Cloud Video Intelligence V1p1beta1 API. Most users should consider using -the main client gem, -[google-cloud-video_intelligence](https://rubygems.org/gems/google-cloud-video_intelligence). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-video_intelligence-v1p1beta1 -``` - -## 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/videointelligence.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/video_intelligence/v1p1beta1" - -client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new -request = ::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest.new # (request fields as keyword arguments...) -response = client.annotate_video request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-video_intelligence-v1p1beta1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/video-intelligence) -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/video_intelligence/v1p1beta1" -require "logger" - -client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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-video_intelligence`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-video_intelligence-v1p1beta1`. -_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-video_intelligence`. -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-video_intelligence-v1p1beta1`. - -### 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-video_intelligence-v1p1beta1/Rakefile b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/Rakefile deleted file mode 100644 index 5ca04360d456..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/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-video_intelligence-v1p1beta1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["VIDEO_INTELLIGENCE_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["VIDEO_INTELLIGENCE_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["VIDEO_INTELLIGENCE_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 VIDEO_INTELLIGENCE_TEST_PROJECT=test123 VIDEO_INTELLIGENCE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/credentials" - ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["VIDEO_INTELLIGENCE_PROJECT"] = project - ENV["VIDEO_INTELLIGENCE_TEST_PROJECT"] = project - ENV["VIDEO_INTELLIGENCE_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-video_intelligence-v1p1beta1 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-video_intelligence-v1p1beta1 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-video_intelligence-v1p1beta1 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-video_intelligence-v1p1beta1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-video_intelligence-v1p1beta1" - header "google-cloud-video_intelligence-v1p1beta1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-video_intelligence-v1p1beta1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-video_intelligence-v1p1beta1 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-video_intelligence-v1p1beta1 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-video_intelligence-v1p1beta1 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-video_intelligence-v1p1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/gapic_metadata.json deleted file mode 100644 index ffae5fe9d9ce..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/gapic_metadata.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.videointelligence.v1p1beta1", - "libraryPackage": "::Google::Cloud::VideoIntelligence::V1p1beta1", - "services": { - "VideoIntelligenceService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client", - "rpcs": { - "AnnotateVideo": { - "methods": [ - "annotate_video" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/google-cloud-video_intelligence-v1p1beta1.gemspec b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/google-cloud-video_intelligence-v1p1beta1.gemspec deleted file mode 100644 index e5459c05aef7..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/google-cloud-video_intelligence-v1p1beta1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/video_intelligence/v1p1beta1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-video_intelligence-v1p1beta1" - gem.version = Google::Cloud::VideoIntelligence::V1p1beta1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API. Note that google-cloud-video_intelligence-v1p1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video_intelligence instead. See the readme for more details." - gem.summary = "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming 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.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google-cloud-video_intelligence-v1p1beta1.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google-cloud-video_intelligence-v1p1beta1.rb deleted file mode 100644 index 475d62fd8050..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google-cloud-video_intelligence-v1p1beta1.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/video_intelligence/v1p1beta1" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1.rb deleted file mode 100644 index 12c22992512f..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1.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/video_intelligence/v1p1beta1/video_intelligence_service" -require "google/cloud/video_intelligence/v1p1beta1/version" - -module Google - module Cloud - module VideoIntelligence - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/video_intelligence/v1p1beta1" - # client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/video_intelligence/v1p1beta1" - # client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client.new - # - module V1p1beta1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1p1beta1", "_helpers.rb" -require "google/cloud/video_intelligence/v1p1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/rest.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/rest.rb deleted file mode 100644 index 80e0dd487e17..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/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/video_intelligence/v1p1beta1/video_intelligence_service/rest" -require "google/cloud/video_intelligence/v1p1beta1/version" - -module Google - module Cloud - module VideoIntelligence - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/video_intelligence/v1p1beta1/rest" - # client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client.new - # - module V1p1beta1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/version.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/version.rb deleted file mode 100644 index f1c3432a41fd..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/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 VideoIntelligence - module V1p1beta1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service.rb deleted file mode 100644 index 7f2c31d43920..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service.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/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/video_intelligence/v1p1beta1/version" - -require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/credentials" -require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/operations" -require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/client" -require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest" - -module Google - module Cloud - module VideoIntelligence - module V1p1beta1 - ## - # Service that implements Google Cloud Video Intelligence API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service" - # client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest" - # client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client.new - # - module VideoIntelligenceService - end - end - end - end -end - -helper_path = ::File.join __dir__, "video_intelligence_service", "helpers.rb" -require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/client.rb deleted file mode 100644 index 49c3feb116a1..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/client.rb +++ /dev/null @@ -1,525 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/videointelligence/v1p1beta1/video_intelligence_pb" - -module Google - module Cloud - module VideoIntelligence - module V1p1beta1 - module VideoIntelligenceService - ## - # Client for the VideoIntelligenceService service. - # - # Service that implements Google Cloud Video Intelligence API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :video_intelligence_service_stub - - ## - # Configure the VideoIntelligenceService Client class. - # - # See {::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all VideoIntelligenceService clients - # ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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", "VideoIntelligence", "V1p1beta1"] - 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.annotate_video.timeout = 600.0 - default_config.rpcs.annotate_video.retry_policy = { - initial_delay: 1.0, max_delay: 120.0, multiplier: 2.5, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the VideoIntelligenceService 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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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 - @video_intelligence_service_stub.universe_domain - end - - ## - # Create a new VideoIntelligenceService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the VideoIntelligenceService 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/videointelligence/v1p1beta1/video_intelligence_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 - - @video_intelligence_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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 - ) - - @video_intelligence_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 - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @video_intelligence_service_stub.logger - end - - # Service calls - - ## - # Performs asynchronous video annotation. Progress and results can be - # retrieved through the `google.longrunning.Operations` interface. - # `Operation.metadata` contains `AnnotateVideoProgress` (progress). - # `Operation.response` contains `AnnotateVideoResponse` (results). - # - # @overload annotate_video(request, options = nil) - # Pass arguments to `annotate_video` via a request object, either of type - # {::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload annotate_video(input_uri: nil, input_content: nil, features: nil, video_context: nil, output_uri: nil, location_id: nil) - # Pass arguments to `annotate_video` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param input_uri [::String] - # Input video location. Currently, only - # [Google Cloud Storage](https://cloud.google.com/storage/) URIs are - # supported, which must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - # more information, see [Request - # URIs](https://cloud.google.com/storage/docs/request-endpoints). A video URI - # may include wildcards in `object-id`, and thus identify multiple videos. - # Supported wildcards: '*' to match 0 or more characters; - # '?' to match 1 character. If unset, the input video should be embedded - # in the request as `input_content`. If set, `input_content` should be unset. - # @param input_content [::String] - # The video data bytes. - # If unset, the input video(s) should be specified via `input_uri`. - # If set, `input_uri` should be unset. - # @param features [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::Feature>] - # Required. Requested video annotation features. - # @param video_context [::Google::Cloud::VideoIntelligence::V1p1beta1::VideoContext, ::Hash] - # Additional video context and/or feature-specific parameters. - # @param output_uri [::String] - # Optional. Location where the output (in JSON format) should be stored. - # Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) - # URIs are supported, which must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - # more information, see [Request - # URIs](https://cloud.google.com/storage/docs/request-endpoints). - # @param location_id [::String] - # Optional. Cloud region where annotation should take place. Supported cloud - # regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region - # is specified, a region will be determined based on video file 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/video_intelligence/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest.new - # - # # Call the annotate_video method. - # result = client.annotate_video request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def annotate_video request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.annotate_video.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::VideoIntelligence::V1p1beta1::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.annotate_video.timeout, - metadata: metadata, - retry_policy: @config.rpcs.annotate_video.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_intelligence_service_stub.call_rpc :annotate_video, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 VideoIntelligenceService API. - # - # This class represents the configuration for VideoIntelligenceService, - # 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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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 - # # annotate_video to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.annotate_video.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.annotate_video.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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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 = "videointelligence.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 VideoIntelligenceService 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 `annotate_video` - # @return [::Gapic::Config::Method] - # - attr_reader :annotate_video - - # @private - def initialize parent_rpcs = nil - annotate_video_config = parent_rpcs.annotate_video if parent_rpcs.respond_to? :annotate_video - @annotate_video = ::Gapic::Config::Method.new annotate_video_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/credentials.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/credentials.rb deleted file mode 100644 index 6758d6d0ee15..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_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 VideoIntelligence - module V1p1beta1 - module VideoIntelligenceService - # Credentials for the VideoIntelligenceService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "VIDEO_INTELLIGENCE_CREDENTIALS", - "VIDEO_INTELLIGENCE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "VIDEO_INTELLIGENCE_CREDENTIALS_JSON", - "VIDEO_INTELLIGENCE_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-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/operations.rb deleted file mode 100644 index 662a00a2e73b..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_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 VideoIntelligence - module V1p1beta1 - module VideoIntelligenceService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the VideoIntelligenceService 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 VideoIntelligenceService 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::VideoIntelligence::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::VideoIntelligence::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::VideoIntelligence::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::VideoIntelligence::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::VideoIntelligence::V1p1beta1::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 = "videointelligence.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-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest.rb deleted file mode 100644 index c61e6347f685..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest.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 "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/video_intelligence/v1p1beta1/version" - -require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/credentials" -require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/operations" -require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/client" - -module Google - module Cloud - module VideoIntelligence - module V1p1beta1 - ## - # Service that implements Google Cloud Video Intelligence API. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest" - # client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client.new - # - module VideoIntelligenceService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/client.rb deleted file mode 100644 index 5a52c7e2aa1c..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/client.rb +++ /dev/null @@ -1,483 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/videointelligence/v1p1beta1/video_intelligence_pb" -require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/service_stub" - -module Google - module Cloud - module VideoIntelligence - module V1p1beta1 - module VideoIntelligenceService - module Rest - ## - # REST client for the VideoIntelligenceService service. - # - # Service that implements Google Cloud Video Intelligence API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :video_intelligence_service_stub - - ## - # Configure the VideoIntelligenceService Client class. - # - # See {::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all VideoIntelligenceService clients - # ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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", "VideoIntelligence", "V1p1beta1"] - 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.annotate_video.timeout = 600.0 - default_config.rpcs.annotate_video.retry_policy = { - initial_delay: 1.0, max_delay: 120.0, multiplier: 2.5, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the VideoIntelligenceService 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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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 - @video_intelligence_service_stub.universe_domain - end - - ## - # Create a new VideoIntelligenceService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the VideoIntelligenceService 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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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 - - @video_intelligence_service_stub = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @video_intelligence_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 - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @video_intelligence_service_stub.logger - end - - # Service calls - - ## - # Performs asynchronous video annotation. Progress and results can be - # retrieved through the `google.longrunning.Operations` interface. - # `Operation.metadata` contains `AnnotateVideoProgress` (progress). - # `Operation.response` contains `AnnotateVideoResponse` (results). - # - # @overload annotate_video(request, options = nil) - # Pass arguments to `annotate_video` via a request object, either of type - # {::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload annotate_video(input_uri: nil, input_content: nil, features: nil, video_context: nil, output_uri: nil, location_id: nil) - # Pass arguments to `annotate_video` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param input_uri [::String] - # Input video location. Currently, only - # [Google Cloud Storage](https://cloud.google.com/storage/) URIs are - # supported, which must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - # more information, see [Request - # URIs](https://cloud.google.com/storage/docs/request-endpoints). A video URI - # may include wildcards in `object-id`, and thus identify multiple videos. - # Supported wildcards: '*' to match 0 or more characters; - # '?' to match 1 character. If unset, the input video should be embedded - # in the request as `input_content`. If set, `input_content` should be unset. - # @param input_content [::String] - # The video data bytes. - # If unset, the input video(s) should be specified via `input_uri`. - # If set, `input_uri` should be unset. - # @param features [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::Feature>] - # Required. Requested video annotation features. - # @param video_context [::Google::Cloud::VideoIntelligence::V1p1beta1::VideoContext, ::Hash] - # Additional video context and/or feature-specific parameters. - # @param output_uri [::String] - # Optional. Location where the output (in JSON format) should be stored. - # Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) - # URIs are supported, which must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - # more information, see [Request - # URIs](https://cloud.google.com/storage/docs/request-endpoints). - # @param location_id [::String] - # Optional. Cloud region where annotation should take place. Supported cloud - # regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region - # is specified, a region will be determined based on video file 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/video_intelligence/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest.new - # - # # Call the annotate_video method. - # result = client.annotate_video request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def annotate_video request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.annotate_video.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::VideoIntelligence::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.annotate_video.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.annotate_video.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_intelligence_service_stub.annotate_video request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 VideoIntelligenceService REST API. - # - # This class represents the configuration for VideoIntelligenceService 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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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 - # # annotate_video to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.annotate_video.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.annotate_video.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 = "videointelligence.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 VideoIntelligenceService 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 `annotate_video` - # @return [::Gapic::Config::Method] - # - attr_reader :annotate_video - - # @private - def initialize parent_rpcs = nil - annotate_video_config = parent_rpcs.annotate_video if parent_rpcs.respond_to? :annotate_video - @annotate_video = ::Gapic::Config::Method.new annotate_video_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/operations.rb deleted file mode 100644 index 5f631972f630..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/operations.rb +++ /dev/null @@ -1,946 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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 VideoIntelligence - module V1p1beta1 - module VideoIntelligenceService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the VideoIntelligenceService 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 VideoIntelligenceService 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::VideoIntelligence::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "videointelligence.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: "/v1p1beta1/{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: "/v1p1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1p1beta1/operations/{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: "/v1p1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1p1beta1/operations/{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: "/v1p1beta1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1p1beta1/operations/{name}:cancel", - 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-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/service_stub.rb deleted file mode 100644 index 193f07193710..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest/service_stub.rb +++ /dev/null @@ -1,141 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/videointelligence/v1p1beta1/video_intelligence_pb" - -module Google - module Cloud - module VideoIntelligence - module V1p1beta1 - module VideoIntelligenceService - module Rest - ## - # REST service stub for the VideoIntelligenceService 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 annotate_video REST call - # - # @param request_pb [::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def annotate_video request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_annotate_video_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "annotate_video", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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 annotate_video REST call - # - # @param request_pb [::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_annotate_video_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1p1beta1/videos:annotate", - body: "*", - matches: [] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/videointelligence/v1p1beta1/video_intelligence_pb.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/videointelligence/v1p1beta1/video_intelligence_pb.rb deleted file mode 100644 index 2dcd4aa0a444..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/videointelligence/v1p1beta1/video_intelligence_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/videointelligence/v1p1beta1/video_intelligence.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\nAgoogle/cloud/videointelligence/v1p1beta1/video_intelligence.proto\x12(google.cloud.videointelligence.v1p1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x8c\x02\n\x14\x41nnotateVideoRequest\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\x15\n\rinput_content\x18\x06 \x01(\x0c\x12H\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0e\x32\x31.google.cloud.videointelligence.v1p1beta1.FeatureB\x03\xe0\x41\x02\x12M\n\rvideo_context\x18\x03 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p1beta1.VideoContext\x12\x17\n\noutput_uri\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0blocation_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x82\x04\n\x0cVideoContext\x12H\n\x08segments\x18\x01 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1p1beta1.VideoSegment\x12^\n\x16label_detection_config\x18\x02 \x01(\x0b\x32>.google.cloud.videointelligence.v1p1beta1.LabelDetectionConfig\x12i\n\x1cshot_change_detection_config\x18\x03 \x01(\x0b\x32\x43.google.cloud.videointelligence.v1p1beta1.ShotChangeDetectionConfig\x12s\n!explicit_content_detection_config\x18\x04 \x01(\x0b\x32H.google.cloud.videointelligence.v1p1beta1.ExplicitContentDetectionConfig\x12h\n\x1bspeech_transcription_config\x18\x06 \x01(\x0b\x32\x43.google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig\"\x9c\x01\n\x14LabelDetectionConfig\x12Z\n\x14label_detection_mode\x18\x01 \x01(\x0e\x32<.google.cloud.videointelligence.v1p1beta1.LabelDetectionMode\x12\x19\n\x11stationary_camera\x18\x02 \x01(\x08\x12\r\n\x05model\x18\x03 \x01(\t\"*\n\x19ShotChangeDetectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\"/\n\x1e\x45xplicitContentDetectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\"x\n\x0cVideoSegment\x12\x34\n\x11start_time_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0f\x65nd_time_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"k\n\x0cLabelSegment\x12G\n\x07segment\x18\x01 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p1beta1.VideoSegment\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"P\n\nLabelFrame\x12.\n\x0btime_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"G\n\x06\x45ntity\x12\x11\n\tentity_id\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x15\n\rlanguage_code\x18\x03 \x01(\t\"\xb0\x02\n\x0fLabelAnnotation\x12@\n\x06\x65ntity\x18\x01 \x01(\x0b\x32\x30.google.cloud.videointelligence.v1p1beta1.Entity\x12K\n\x11\x63\x61tegory_entities\x18\x02 \x03(\x0b\x32\x30.google.cloud.videointelligence.v1p1beta1.Entity\x12H\n\x08segments\x18\x03 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1p1beta1.LabelSegment\x12\x44\n\x06\x66rames\x18\x04 \x03(\x0b\x32\x34.google.cloud.videointelligence.v1p1beta1.LabelFrame\"\x9c\x01\n\x14\x45xplicitContentFrame\x12.\n\x0btime_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12T\n\x16pornography_likelihood\x18\x02 \x01(\x0e\x32\x34.google.cloud.videointelligence.v1p1beta1.Likelihood\"k\n\x19\x45xplicitContentAnnotation\x12N\n\x06\x66rames\x18\x01 \x03(\x0b\x32>.google.cloud.videointelligence.v1p1beta1.ExplicitContentFrame\"\xf5\x04\n\x16VideoAnnotationResults\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\\\n\x19segment_label_annotations\x18\x02 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p1beta1.LabelAnnotation\x12Y\n\x16shot_label_annotations\x18\x03 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p1beta1.LabelAnnotation\x12Z\n\x17\x66rame_label_annotations\x18\x04 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p1beta1.LabelAnnotation\x12P\n\x10shot_annotations\x18\x06 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1p1beta1.VideoSegment\x12`\n\x13\x65xplicit_annotation\x18\x07 \x01(\x0b\x32\x43.google.cloud.videointelligence.v1p1beta1.ExplicitContentAnnotation\x12\\\n\x15speech_transcriptions\x18\x0b \x03(\x0b\x32=.google.cloud.videointelligence.v1p1beta1.SpeechTranscription\x12!\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.Status\"u\n\x15\x41nnotateVideoResponse\x12\\\n\x12\x61nnotation_results\x18\x01 \x03(\x0b\x32@.google.cloud.videointelligence.v1p1beta1.VideoAnnotationResults\"\xa7\x01\n\x17VideoAnnotationProgress\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\x18\n\x10progress_percent\x18\x02 \x01(\x05\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"w\n\x15\x41nnotateVideoProgress\x12^\n\x13\x61nnotation_progress\x18\x01 \x03(\x0b\x32\x41.google.cloud.videointelligence.v1p1beta1.VideoAnnotationProgress\"\x92\x02\n\x19SpeechTranscriptionConfig\x12\x1a\n\rlanguage_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10max_alternatives\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1d\n\x10\x66ilter_profanity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12U\n\x0fspeech_contexts\x18\x04 \x03(\x0b\x32\x37.google.cloud.videointelligence.v1p1beta1.SpeechContextB\x03\xe0\x41\x01\x12)\n\x1c\x65nable_automatic_punctuation\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x19\n\x0c\x61udio_tracks\x18\x06 \x03(\x05\x42\x03\xe0\x41\x01\"%\n\rSpeechContext\x12\x14\n\x07phrases\x18\x01 \x03(\tB\x03\xe0\x41\x01\"s\n\x13SpeechTranscription\x12\\\n\x0c\x61lternatives\x18\x01 \x03(\x0b\x32\x46.google.cloud.videointelligence.v1p1beta1.SpeechRecognitionAlternative\"\x8e\x01\n\x1cSpeechRecognitionAlternative\x12\x12\n\ntranscript\x18\x01 \x01(\t\x12\x17\n\nconfidence\x18\x02 \x01(\x02\x42\x03\xe0\x41\x03\x12\x41\n\x05words\x18\x03 \x03(\x0b\x32\x32.google.cloud.videointelligence.v1p1beta1.WordInfo\"t\n\x08WordInfo\x12-\n\nstart_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12+\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0c\n\x04word\x18\x03 \x01(\t*\x8c\x01\n\x07\x46\x65\x61ture\x12\x17\n\x13\x46\x45\x41TURE_UNSPECIFIED\x10\x00\x12\x13\n\x0fLABEL_DETECTION\x10\x01\x12\x19\n\x15SHOT_CHANGE_DETECTION\x10\x02\x12\x1e\n\x1a\x45XPLICIT_CONTENT_DETECTION\x10\x03\x12\x18\n\x14SPEECH_TRANSCRIPTION\x10\x06*r\n\x12LabelDetectionMode\x12$\n LABEL_DETECTION_MODE_UNSPECIFIED\x10\x00\x12\r\n\tSHOT_MODE\x10\x01\x12\x0e\n\nFRAME_MODE\x10\x02\x12\x17\n\x13SHOT_AND_FRAME_MODE\x10\x03*t\n\nLikelihood\x12\x1a\n\x16LIKELIHOOD_UNSPECIFIED\x10\x00\x12\x11\n\rVERY_UNLIKELY\x10\x01\x12\x0c\n\x08UNLIKELY\x10\x02\x12\x0c\n\x08POSSIBLE\x10\x03\x12\n\n\x06LIKELY\x10\x04\x12\x0f\n\x0bVERY_LIKELY\x10\x05\x32\xce\x02\n\x18VideoIntelligenceService\x12\xdb\x01\n\rAnnotateVideo\x12>.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41.\n\x15\x41nnotateVideoResponse\x12\x15\x41nnotateVideoProgress\xda\x41\x12input_uri,features\x82\xd3\xe4\x93\x02\x1f\"\x1a/v1p1beta1/videos:annotate:\x01*\x1aT\xca\x41 videointelligence.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xaf\x02\n,com.google.cloud.videointelligence.v1p1beta1B\x1dVideoIntelligenceServiceProtoP\x01ZZcloud.google.com/go/videointelligence/apiv1p1beta1/videointelligencepb;videointelligencepb\xaa\x02(Google.Cloud.VideoIntelligence.V1P1Beta1\xca\x02(Google\\Cloud\\VideoIntelligence\\V1p1beta1\xea\x02+Google::Cloud::VideoIntelligence::V1p1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module VideoIntelligence - module V1p1beta1 - AnnotateVideoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest").msgclass - VideoContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.VideoContext").msgclass - LabelDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.LabelDetectionConfig").msgclass - ShotChangeDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.ShotChangeDetectionConfig").msgclass - ExplicitContentDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.ExplicitContentDetectionConfig").msgclass - VideoSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.VideoSegment").msgclass - LabelSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.LabelSegment").msgclass - LabelFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.LabelFrame").msgclass - Entity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.Entity").msgclass - LabelAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.LabelAnnotation").msgclass - ExplicitContentFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.ExplicitContentFrame").msgclass - ExplicitContentAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.ExplicitContentAnnotation").msgclass - VideoAnnotationResults = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.VideoAnnotationResults").msgclass - AnnotateVideoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.AnnotateVideoResponse").msgclass - VideoAnnotationProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.VideoAnnotationProgress").msgclass - AnnotateVideoProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.AnnotateVideoProgress").msgclass - SpeechTranscriptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.SpeechTranscriptionConfig").msgclass - SpeechContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.SpeechContext").msgclass - SpeechTranscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.SpeechTranscription").msgclass - SpeechRecognitionAlternative = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.SpeechRecognitionAlternative").msgclass - WordInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.WordInfo").msgclass - Feature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.Feature").enummodule - LabelDetectionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.LabelDetectionMode").enummodule - Likelihood = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p1beta1.Likelihood").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/videointelligence/v1p1beta1/video_intelligence_services_pb.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/videointelligence/v1p1beta1/video_intelligence_services_pb.rb deleted file mode 100644 index 53aeb5996063..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/lib/google/cloud/videointelligence/v1p1beta1/video_intelligence_services_pb.rb +++ /dev/null @@ -1,49 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/videointelligence/v1p1beta1/video_intelligence.proto for package 'Google.Cloud.VideoIntelligence.V1p1beta1' -# 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/videointelligence/v1p1beta1/video_intelligence_pb' - -module Google - module Cloud - module VideoIntelligence - module V1p1beta1 - module VideoIntelligenceService - # Service that implements Google Cloud Video Intelligence API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.videointelligence.v1p1beta1.VideoIntelligenceService' - - # Performs asynchronous video annotation. Progress and results can be - # retrieved through the `google.longrunning.Operations` interface. - # `Operation.metadata` contains `AnnotateVideoProgress` (progress). - # `Operation.response` contains `AnnotateVideoResponse` (results). - rpc :AnnotateVideo, ::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/README.md deleted file mode 100644 index 06963a9dbbb8..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Video Intelligence V1p1beta1 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-video_intelligence-v1p1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # 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. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - # - # Example: - # - # 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 - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # 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 - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # 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 - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/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-video_intelligence-v1p1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/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-video_intelligence-v1p1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/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-video_intelligence-v1p1beta1/proto_docs/google/cloud/videointelligence/v1p1beta1/video_intelligence.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/cloud/videointelligence/v1p1beta1/video_intelligence.rb deleted file mode 100644 index f08d47aa7016..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/cloud/videointelligence/v1p1beta1/video_intelligence.rb +++ /dev/null @@ -1,479 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module VideoIntelligence - module V1p1beta1 - # Video annotation request. - # @!attribute [rw] input_uri - # @return [::String] - # Input video location. Currently, only - # [Google Cloud Storage](https://cloud.google.com/storage/) URIs are - # supported, which must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - # more information, see [Request - # URIs](https://cloud.google.com/storage/docs/request-endpoints). A video URI - # may include wildcards in `object-id`, and thus identify multiple videos. - # Supported wildcards: '*' to match 0 or more characters; - # '?' to match 1 character. If unset, the input video should be embedded - # in the request as `input_content`. If set, `input_content` should be unset. - # @!attribute [rw] input_content - # @return [::String] - # The video data bytes. - # If unset, the input video(s) should be specified via `input_uri`. - # If set, `input_uri` should be unset. - # @!attribute [rw] features - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::Feature>] - # Required. Requested video annotation features. - # @!attribute [rw] video_context - # @return [::Google::Cloud::VideoIntelligence::V1p1beta1::VideoContext] - # Additional video context and/or feature-specific parameters. - # @!attribute [rw] output_uri - # @return [::String] - # Optional. Location where the output (in JSON format) should be stored. - # Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) - # URIs are supported, which must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - # more information, see [Request - # URIs](https://cloud.google.com/storage/docs/request-endpoints). - # @!attribute [rw] location_id - # @return [::String] - # Optional. Cloud region where annotation should take place. Supported cloud - # regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region - # is specified, a region will be determined based on video file location. - class AnnotateVideoRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video context and/or feature-specific parameters. - # @!attribute [rw] segments - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::VideoSegment>] - # Video segments to annotate. The segments may overlap and are not required - # to be contiguous or span the whole video. If unspecified, each video is - # treated as a single segment. - # @!attribute [rw] label_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1p1beta1::LabelDetectionConfig] - # Config for LABEL_DETECTION. - # @!attribute [rw] shot_change_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1p1beta1::ShotChangeDetectionConfig] - # Config for SHOT_CHANGE_DETECTION. - # @!attribute [rw] explicit_content_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1p1beta1::ExplicitContentDetectionConfig] - # Config for EXPLICIT_CONTENT_DETECTION. - # @!attribute [rw] speech_transcription_config - # @return [::Google::Cloud::VideoIntelligence::V1p1beta1::SpeechTranscriptionConfig] - # Config for SPEECH_TRANSCRIPTION. - class VideoContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for LABEL_DETECTION. - # @!attribute [rw] label_detection_mode - # @return [::Google::Cloud::VideoIntelligence::V1p1beta1::LabelDetectionMode] - # What labels should be detected with LABEL_DETECTION, in addition to - # video-level labels or segment-level labels. - # If unspecified, defaults to `SHOT_MODE`. - # @!attribute [rw] stationary_camera - # @return [::Boolean] - # Whether the video has been shot from a stationary (i.e. non-moving) camera. - # When set to true, might improve detection accuracy for moving objects. - # Should be used with `SHOT_AND_FRAME_MODE` enabled. - # @!attribute [rw] model - # @return [::String] - # Model to use for label detection. - # Supported values: "builtin/stable" (the default if unset) and - # "builtin/latest". - class LabelDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for SHOT_CHANGE_DETECTION. - # @!attribute [rw] model - # @return [::String] - # Model to use for shot change detection. - # Supported values: "builtin/stable" (the default if unset) and - # "builtin/latest". - class ShotChangeDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for EXPLICIT_CONTENT_DETECTION. - # @!attribute [rw] model - # @return [::String] - # Model to use for explicit content detection. - # Supported values: "builtin/stable" (the default if unset) and - # "builtin/latest". - class ExplicitContentDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video segment. - # @!attribute [rw] start_time_offset - # @return [::Google::Protobuf::Duration] - # Time-offset, relative to the beginning of the video, - # corresponding to the start of the segment (inclusive). - # @!attribute [rw] end_time_offset - # @return [::Google::Protobuf::Duration] - # Time-offset, relative to the beginning of the video, - # corresponding to the end of the segment (inclusive). - class VideoSegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video segment level annotation results for label detection. - # @!attribute [rw] segment - # @return [::Google::Cloud::VideoIntelligence::V1p1beta1::VideoSegment] - # Video segment where a label was detected. - # @!attribute [rw] confidence - # @return [::Float] - # Confidence that the label is accurate. Range: [0, 1]. - class LabelSegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video frame level annotation results for label detection. - # @!attribute [rw] time_offset - # @return [::Google::Protobuf::Duration] - # Time-offset, relative to the beginning of the video, corresponding to the - # video frame for this location. - # @!attribute [rw] confidence - # @return [::Float] - # Confidence that the label is accurate. Range: [0, 1]. - class LabelFrame - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Detected entity from video analysis. - # @!attribute [rw] entity_id - # @return [::String] - # Opaque entity ID. Some IDs may be available in - # [Google Knowledge Graph Search - # API](https://developers.google.com/knowledge-graph/). - # @!attribute [rw] description - # @return [::String] - # Textual description, e.g. `Fixed-gear bicycle`. - # @!attribute [rw] language_code - # @return [::String] - # Language code for `description` in BCP-47 format. - class Entity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Label annotation. - # @!attribute [rw] entity - # @return [::Google::Cloud::VideoIntelligence::V1p1beta1::Entity] - # Detected entity. - # @!attribute [rw] category_entities - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::Entity>] - # Common categories for the detected entity. - # E.g. when the label is `Terrier` the category is likely `dog`. And in some - # cases there might be more than one categories e.g. `Terrier` could also be - # a `pet`. - # @!attribute [rw] segments - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::LabelSegment>] - # All video segments where a label was detected. - # @!attribute [rw] frames - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::LabelFrame>] - # All video frames where a label was detected. - class LabelAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video frame level annotation results for explicit content. - # @!attribute [rw] time_offset - # @return [::Google::Protobuf::Duration] - # Time-offset, relative to the beginning of the video, corresponding to the - # video frame for this location. - # @!attribute [rw] pornography_likelihood - # @return [::Google::Cloud::VideoIntelligence::V1p1beta1::Likelihood] - # Likelihood of the pornography content.. - class ExplicitContentFrame - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Explicit content annotation (based on per-frame visual signals only). - # If no explicit content has been detected in a frame, no annotations are - # present for that frame. - # @!attribute [rw] frames - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::ExplicitContentFrame>] - # All video frames where explicit content was detected. - class ExplicitContentAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotation results for a single video. - # @!attribute [rw] input_uri - # @return [::String] - # Output only. Video file location in - # [Google Cloud Storage](https://cloud.google.com/storage/). - # @!attribute [rw] segment_label_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::LabelAnnotation>] - # Label annotations on video level or user specified segment level. - # There is exactly one element for each unique label. - # @!attribute [rw] shot_label_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::LabelAnnotation>] - # Label annotations on shot level. - # There is exactly one element for each unique label. - # @!attribute [rw] frame_label_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::LabelAnnotation>] - # Label annotations on frame level. - # There is exactly one element for each unique label. - # @!attribute [rw] shot_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::VideoSegment>] - # Shot annotations. Each shot is represented as a video segment. - # @!attribute [rw] explicit_annotation - # @return [::Google::Cloud::VideoIntelligence::V1p1beta1::ExplicitContentAnnotation] - # Explicit content annotation. - # @!attribute [rw] speech_transcriptions - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::SpeechTranscription>] - # Speech transcription. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # Output only. If set, indicates an error. Note that for a single - # `AnnotateVideoRequest` some videos may succeed and some may fail. - class VideoAnnotationResults - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video annotation response. Included in the `response` - # field of the `Operation` returned by the `GetOperation` - # call of the `google::longrunning::Operations` service. - # @!attribute [rw] annotation_results - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::VideoAnnotationResults>] - # Annotation results for all videos specified in `AnnotateVideoRequest`. - class AnnotateVideoResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotation progress for a single video. - # @!attribute [rw] input_uri - # @return [::String] - # Output only. Video file location in - # [Google Cloud Storage](https://cloud.google.com/storage/). - # @!attribute [rw] progress_percent - # @return [::Integer] - # Output only. Approximate percentage processed thus far. Guaranteed to be - # 100 when fully processed. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the request was received. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time of the most recent update. - class VideoAnnotationProgress - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video annotation progress. Included in the `metadata` - # field of the `Operation` returned by the `GetOperation` - # call of the `google::longrunning::Operations` service. - # @!attribute [rw] annotation_progress - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::VideoAnnotationProgress>] - # Progress metadata for all videos specified in `AnnotateVideoRequest`. - class AnnotateVideoProgress - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for SPEECH_TRANSCRIPTION. - # @!attribute [rw] language_code - # @return [::String] - # Required. *Required* The language of the supplied audio as a - # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - # Example: "en-US". - # See [Language Support](https://cloud.google.com/speech/docs/languages) - # for a list of the currently supported language codes. - # @!attribute [rw] max_alternatives - # @return [::Integer] - # Optional. Maximum number of recognition hypotheses to be returned. - # Specifically, the maximum number of `SpeechRecognitionAlternative` messages - # within each `SpeechTranscription`. The server may return fewer than - # `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will - # return a maximum of one. If omitted, will return a maximum of one. - # @!attribute [rw] filter_profanity - # @return [::Boolean] - # Optional. If set to `true`, the server will attempt to filter out - # profanities, replacing all but the initial character in each filtered word - # with asterisks, e.g. "f***". If set to `false` or omitted, profanities - # won't be filtered out. - # @!attribute [rw] speech_contexts - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::SpeechContext>] - # Optional. A means to provide context to assist the speech recognition. - # @!attribute [rw] enable_automatic_punctuation - # @return [::Boolean] - # Optional. If 'true', adds punctuation to recognition result hypotheses. - # This feature is only available in select languages. Setting this for - # requests in other languages has no effect at all. The default 'false' value - # does not add punctuation to result hypotheses. NOTE: "This is currently - # offered as an experimental service, complimentary to all users. In the - # future this may be exclusively available as a premium feature." - # @!attribute [rw] audio_tracks - # @return [::Array<::Integer>] - # Optional. For file formats, such as MXF or MKV, supporting multiple audio - # tracks, specify up to two tracks. Default: track 0. - class SpeechTranscriptionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides "hints" to the speech recognizer to favor specific words and phrases - # in the results. - # @!attribute [rw] phrases - # @return [::Array<::String>] - # Optional. A list of strings containing words and phrases "hints" so that - # the speech recognition is more likely to recognize them. This can be used - # to improve the accuracy for specific words and phrases, for example, if - # specific commands are typically spoken by the user. This can also be used - # to add additional words to the vocabulary of the recognizer. See - # [usage limits](https://cloud.google.com/speech/limits#content). - class SpeechContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A speech recognition result corresponding to a portion of the audio. - # @!attribute [rw] alternatives - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::SpeechRecognitionAlternative>] - # May contain one or more recognition hypotheses (up to the maximum specified - # in `max_alternatives`). These alternatives are ordered in terms of - # accuracy, with the top (first) alternative being the most probable, as - # ranked by the recognizer. - class SpeechTranscription - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Alternative hypotheses (a.k.a. n-best list). - # @!attribute [rw] transcript - # @return [::String] - # Output only. Transcript text representing the words that the user spoke. - # @!attribute [r] confidence - # @return [::Float] - # Output only. The confidence estimate between 0.0 and 1.0. A higher number - # indicates an estimated greater likelihood that the recognized words are - # correct. This field is set only for the top alternative. - # This field is not guaranteed to be accurate and users should not rely on it - # to be always provided. - # The default of 0.0 is a sentinel value indicating `confidence` was not set. - # @!attribute [rw] words - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p1beta1::WordInfo>] - # Output only. A list of word-specific information for each recognized word. - class SpeechRecognitionAlternative - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Word-specific information for recognized words. Word information is only - # included in the response when certain request parameters are set, such - # as `enable_word_time_offsets`. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Duration] - # Output only. Time offset relative to the beginning of the audio, and - # corresponding to the start of the spoken word. This field is only set if - # `enable_word_time_offsets=true` and only in the top hypothesis. This is an - # experimental feature and the accuracy of the time offset can vary. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Duration] - # Output only. Time offset relative to the beginning of the audio, and - # corresponding to the end of the spoken word. This field is only set if - # `enable_word_time_offsets=true` and only in the top hypothesis. This is an - # experimental feature and the accuracy of the time offset can vary. - # @!attribute [rw] word - # @return [::String] - # Output only. The word corresponding to this set of information. - class WordInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video annotation feature. - module Feature - # Unspecified. - FEATURE_UNSPECIFIED = 0 - - # Label detection. Detect objects, such as dog or flower. - LABEL_DETECTION = 1 - - # Shot change detection. - SHOT_CHANGE_DETECTION = 2 - - # Explicit content detection. - EXPLICIT_CONTENT_DETECTION = 3 - - # Speech transcription. - SPEECH_TRANSCRIPTION = 6 - end - - # Label detection mode. - module LabelDetectionMode - # Unspecified. - LABEL_DETECTION_MODE_UNSPECIFIED = 0 - - # Detect shot-level labels. - SHOT_MODE = 1 - - # Detect frame-level labels. - FRAME_MODE = 2 - - # Detect both shot-level and frame-level labels. - SHOT_AND_FRAME_MODE = 3 - end - - # Bucketized representation of likelihood. - module Likelihood - # Unspecified likelihood. - LIKELIHOOD_UNSPECIFIED = 0 - - # Very unlikely. - VERY_UNLIKELY = 1 - - # Unlikely. - UNLIKELY = 2 - - # Possible. - POSSIBLE = 3 - - # Likely. - LIKELY = 4 - - # Very likely. - VERY_LIKELY = 5 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/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-video_intelligence-v1p1beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/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-video_intelligence-v1p1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/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-video_intelligence-v1p1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/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-video_intelligence-v1p1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/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-video_intelligence-v1p1beta1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/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-video_intelligence-v1p1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/snippets/Gemfile deleted file mode 100644 index 2d2fbb5d740a..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/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-video_intelligence-v1p1beta1", path: "../" -else - gem "google-cloud-video_intelligence-v1p1beta1" -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-video_intelligence-v1p1beta1/snippets/snippet_metadata_google.cloud.videointelligence.v1p1beta1.json b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/snippets/snippet_metadata_google.cloud.videointelligence.v1p1beta1.json deleted file mode 100644 index 124ae10d2592..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/snippets/snippet_metadata_google.cloud.videointelligence.v1p1beta1.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-video_intelligence-v1p1beta1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.videointelligence.v1p1beta1", - "version": "v1p1beta1" - } - ] - }, - "snippets": [ - { - "region_tag": "videointelligence_v1p1beta1_generated_VideoIntelligenceService_AnnotateVideo_sync", - "title": "Snippet for the annotate_video call in the VideoIntelligenceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client#annotate_video.", - "file": "video_intelligence_service/annotate_video.rb", - "language": "RUBY", - "client_method": { - "short_name": "annotate_video", - "full_name": "::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client#annotate_video", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "VideoIntelligenceService::Client", - "full_name": "::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client" - }, - "method": { - "short_name": "AnnotateVideo", - "full_name": "google.cloud.videointelligence.v1p1beta1.VideoIntelligenceService.AnnotateVideo", - "service": { - "short_name": "VideoIntelligenceService", - "full_name": "google.cloud.videointelligence.v1p1beta1.VideoIntelligenceService" - } - } - }, - "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-video_intelligence-v1p1beta1/snippets/video_intelligence_service/annotate_video.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/snippets/video_intelligence_service/annotate_video.rb deleted file mode 100644 index e815c58e72cf..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/snippets/video_intelligence_service/annotate_video.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 videointelligence_v1p1beta1_generated_VideoIntelligenceService_AnnotateVideo_sync] -require "google/cloud/video_intelligence/v1p1beta1" - -## -# Snippet for the annotate_video call in the VideoIntelligenceService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client#annotate_video. -# -def annotate_video - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest.new - - # Call the annotate_video method. - result = client.annotate_video request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END videointelligence_v1p1beta1_generated_VideoIntelligenceService_AnnotateVideo_sync] diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_operations_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_operations_test.rb deleted file mode 100644 index 38365ebb437d..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/google/cloud/video_intelligence/v1p1beta1/video_intelligence_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/videointelligence/v1p1beta1/video_intelligence_pb" -require "google/cloud/videointelligence/v1p1beta1/video_intelligence_services_pb" -require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service" - -class ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_rest_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_rest_test.rb deleted file mode 100644 index 8cc3c3f40336..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_rest_test.rb +++ /dev/null @@ -1,158 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/videointelligence/v1p1beta1/video_intelligence_pb" -require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service/rest" - - -class ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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_annotate_video - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - input_uri = "hello world" - input_content = "hello world" - features = [:FEATURE_UNSPECIFIED] - video_context = {} - output_uri = "hello world" - location_id = "hello world" - - annotate_video_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::ServiceStub.stub :transcode_annotate_video_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, annotate_video_client_stub do - # Create client - client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.annotate_video input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.annotate_video ::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.annotate_video(::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, annotate_video_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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_test.rb deleted file mode 100644 index d7c34a426e49..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_test.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! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/videointelligence/v1p1beta1/video_intelligence_pb" -require "google/cloud/video_intelligence/v1p1beta1/video_intelligence_service" - -class ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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_annotate_video - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - input_uri = "hello world" - input_content = "hello world" - features = [:FEATURE_UNSPECIFIED] - video_context = {} - output_uri = "hello world" - location_id = "hello world" - - annotate_video_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :annotate_video, name - assert_kind_of ::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest, request - assert_equal "hello world", request["input_uri"] - assert_equal "hello world", request["input_content"] - assert_equal [:FEATURE_UNSPECIFIED], request["features"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoContext), request["video_context"] - assert_equal "hello world", request["output_uri"] - assert_equal "hello world", request["location_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, annotate_video_client_stub do - # Create client - client = ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video ::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video(::Google::Cloud::VideoIntelligence::V1p1beta1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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, annotate_video_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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::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::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::VideoIntelligence::V1p1beta1::VideoIntelligenceService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/helper.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p1beta1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.gitignore b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.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-video_intelligence-v1p2beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.repo-metadata.json deleted file mode 100644 index 8230f83917bf..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "videointelligence.googleapis.com", - "api_shortname": "videointelligence", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-video_intelligence-v1p2beta1/latest", - "distribution_name": "google-cloud-video_intelligence-v1p2beta1", - "is_cloud": true, - "language": "ruby", - "name": "videointelligence", - "name_pretty": "Cloud Video Intelligence V1p2beta1 API", - "product_documentation": "https://cloud.google.com/video-intelligence", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API. Note that google-cloud-video_intelligence-v1p2beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video_intelligence instead. See the readme for more details.", - "ruby-cloud-env-prefix": "VIDEO_INTELLIGENCE", - "ruby-cloud-product-url": "https://cloud.google.com/video-intelligence", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.rubocop.yml b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.rubocop.yml deleted file mode 100644 index 334ea0e42e58..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-video_intelligence-v1p2beta1.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-video_intelligence-v1p2beta1.rb" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.toys.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.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-video_intelligence-v1p2beta1/.yardopts b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.yardopts deleted file mode 100644 index 0538001fd5b8..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Video Intelligence V1p2beta1 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-video_intelligence-v1p2beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/AUTHENTICATION.md deleted file mode 100644 index 202c74ac9973..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-video_intelligence-v1p2beta1 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-video_intelligence-v1p2beta1 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/video_intelligence/v1p2beta1" - -client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/video_intelligence/v1p2beta1" - -::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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-video_intelligence-v1p2beta1 -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/video_intelligence/v1p2beta1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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-video_intelligence-v1p2beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/Gemfile b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/LICENSE.md b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/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-video_intelligence-v1p2beta1/README.md b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/README.md deleted file mode 100644 index 0fee75515965..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Cloud Video Intelligence V1p2beta1 API - -Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming 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 Cloud Video Intelligence V1p2beta1 API. Most users should consider using -the main client gem, -[google-cloud-video_intelligence](https://rubygems.org/gems/google-cloud-video_intelligence). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-video_intelligence-v1p2beta1 -``` - -## 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/videointelligence.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/video_intelligence/v1p2beta1" - -client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.new -request = ::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest.new # (request fields as keyword arguments...) -response = client.annotate_video request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-video_intelligence-v1p2beta1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/video-intelligence) -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/video_intelligence/v1p2beta1" -require "logger" - -client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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-video_intelligence`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-video_intelligence-v1p2beta1`. -_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-video_intelligence`. -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-video_intelligence-v1p2beta1`. - -### 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-video_intelligence-v1p2beta1/Rakefile b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/Rakefile deleted file mode 100644 index ba2b0edee9ea..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/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-video_intelligence-v1p2beta1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["VIDEO_INTELLIGENCE_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["VIDEO_INTELLIGENCE_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["VIDEO_INTELLIGENCE_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 VIDEO_INTELLIGENCE_TEST_PROJECT=test123 VIDEO_INTELLIGENCE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/credentials" - ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["VIDEO_INTELLIGENCE_PROJECT"] = project - ENV["VIDEO_INTELLIGENCE_TEST_PROJECT"] = project - ENV["VIDEO_INTELLIGENCE_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-video_intelligence-v1p2beta1 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-video_intelligence-v1p2beta1 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-video_intelligence-v1p2beta1 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-video_intelligence-v1p2beta1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-video_intelligence-v1p2beta1" - header "google-cloud-video_intelligence-v1p2beta1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-video_intelligence-v1p2beta1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-video_intelligence-v1p2beta1 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-video_intelligence-v1p2beta1 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-video_intelligence-v1p2beta1 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-video_intelligence-v1p2beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/gapic_metadata.json deleted file mode 100644 index da4d73c9c709..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/gapic_metadata.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.videointelligence.v1p2beta1", - "libraryPackage": "::Google::Cloud::VideoIntelligence::V1p2beta1", - "services": { - "VideoIntelligenceService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client", - "rpcs": { - "AnnotateVideo": { - "methods": [ - "annotate_video" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/google-cloud-video_intelligence-v1p2beta1.gemspec b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/google-cloud-video_intelligence-v1p2beta1.gemspec deleted file mode 100644 index b334769ff6ca..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/google-cloud-video_intelligence-v1p2beta1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/video_intelligence/v1p2beta1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-video_intelligence-v1p2beta1" - gem.version = Google::Cloud::VideoIntelligence::V1p2beta1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API. Note that google-cloud-video_intelligence-v1p2beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video_intelligence instead. See the readme for more details." - gem.summary = "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming 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.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google-cloud-video_intelligence-v1p2beta1.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google-cloud-video_intelligence-v1p2beta1.rb deleted file mode 100644 index 9c679f753c91..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google-cloud-video_intelligence-v1p2beta1.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/video_intelligence/v1p2beta1" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1.rb deleted file mode 100644 index 90127baade2f..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1.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/video_intelligence/v1p2beta1/video_intelligence_service" -require "google/cloud/video_intelligence/v1p2beta1/version" - -module Google - module Cloud - module VideoIntelligence - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/video_intelligence/v1p2beta1" - # client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/video_intelligence/v1p2beta1" - # client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Client.new - # - module V1p2beta1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1p2beta1", "_helpers.rb" -require "google/cloud/video_intelligence/v1p2beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/rest.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/rest.rb deleted file mode 100644 index 8735000bb9f1..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/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/video_intelligence/v1p2beta1/video_intelligence_service/rest" -require "google/cloud/video_intelligence/v1p2beta1/version" - -module Google - module Cloud - module VideoIntelligence - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/video_intelligence/v1p2beta1/rest" - # client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Client.new - # - module V1p2beta1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/version.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/version.rb deleted file mode 100644 index 9f9cba15b4b4..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/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 VideoIntelligence - module V1p2beta1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service.rb deleted file mode 100644 index db73f2bad942..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service.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/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/video_intelligence/v1p2beta1/version" - -require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/credentials" -require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/operations" -require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/client" -require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest" - -module Google - module Cloud - module VideoIntelligence - module V1p2beta1 - ## - # Service that implements Google Cloud Video Intelligence API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service" - # client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest" - # client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Client.new - # - module VideoIntelligenceService - end - end - end - end -end - -helper_path = ::File.join __dir__, "video_intelligence_service", "helpers.rb" -require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/client.rb deleted file mode 100644 index 7a684b23a9ed..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/client.rb +++ /dev/null @@ -1,523 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/videointelligence/v1p2beta1/video_intelligence_pb" - -module Google - module Cloud - module VideoIntelligence - module V1p2beta1 - module VideoIntelligenceService - ## - # Client for the VideoIntelligenceService service. - # - # Service that implements Google Cloud Video Intelligence API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :video_intelligence_service_stub - - ## - # Configure the VideoIntelligenceService Client class. - # - # See {::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all VideoIntelligenceService clients - # ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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", "VideoIntelligence", "V1p2beta1"] - 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.annotate_video.timeout = 600.0 - default_config.rpcs.annotate_video.retry_policy = { - initial_delay: 1.0, max_delay: 120.0, multiplier: 2.5, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the VideoIntelligenceService 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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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 - @video_intelligence_service_stub.universe_domain - end - - ## - # Create a new VideoIntelligenceService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the VideoIntelligenceService 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/videointelligence/v1p2beta1/video_intelligence_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 - - @video_intelligence_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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 - ) - - @video_intelligence_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 - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @video_intelligence_service_stub.logger - end - - # Service calls - - ## - # Performs asynchronous video annotation. Progress and results can be - # retrieved through the `google.longrunning.Operations` interface. - # `Operation.metadata` contains `AnnotateVideoProgress` (progress). - # `Operation.response` contains `AnnotateVideoResponse` (results). - # - # @overload annotate_video(request, options = nil) - # Pass arguments to `annotate_video` via a request object, either of type - # {::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload annotate_video(input_uri: nil, input_content: nil, features: nil, video_context: nil, output_uri: nil, location_id: nil) - # Pass arguments to `annotate_video` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param input_uri [::String] - # Input video location. Currently, only - # [Google Cloud Storage](https://cloud.google.com/storage/) URIs are - # supported, which must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see - # [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). - # A video URI may include wildcards in `object-id`, and thus identify - # multiple videos. Supported wildcards: '*' to match 0 or more characters; - # '?' to match 1 character. If unset, the input video should be embedded - # in the request as `input_content`. If set, `input_content` should be unset. - # @param input_content [::String] - # The video data bytes. - # If unset, the input video(s) should be specified via `input_uri`. - # If set, `input_uri` should be unset. - # @param features [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::Feature>] - # Required. Requested video annotation features. - # @param video_context [::Google::Cloud::VideoIntelligence::V1p2beta1::VideoContext, ::Hash] - # Additional video context and/or feature-specific parameters. - # @param output_uri [::String] - # Optional. Location where the output (in JSON format) should be stored. - # Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) - # URIs are supported, which must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see - # [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). - # @param location_id [::String] - # Optional. Cloud region where annotation should take place. Supported cloud - # regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region - # is specified, a region will be determined based on video file 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/video_intelligence/v1p2beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest.new - # - # # Call the annotate_video method. - # result = client.annotate_video request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def annotate_video request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.annotate_video.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::VideoIntelligence::V1p2beta1::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.annotate_video.timeout, - metadata: metadata, - retry_policy: @config.rpcs.annotate_video.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_intelligence_service_stub.call_rpc :annotate_video, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 VideoIntelligenceService API. - # - # This class represents the configuration for VideoIntelligenceService, - # 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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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 - # # annotate_video to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.annotate_video.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.annotate_video.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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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 = "videointelligence.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 VideoIntelligenceService 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 `annotate_video` - # @return [::Gapic::Config::Method] - # - attr_reader :annotate_video - - # @private - def initialize parent_rpcs = nil - annotate_video_config = parent_rpcs.annotate_video if parent_rpcs.respond_to? :annotate_video - @annotate_video = ::Gapic::Config::Method.new annotate_video_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/credentials.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/credentials.rb deleted file mode 100644 index fe67e737e5cf..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_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 VideoIntelligence - module V1p2beta1 - module VideoIntelligenceService - # Credentials for the VideoIntelligenceService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "VIDEO_INTELLIGENCE_CREDENTIALS", - "VIDEO_INTELLIGENCE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "VIDEO_INTELLIGENCE_CREDENTIALS_JSON", - "VIDEO_INTELLIGENCE_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-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/operations.rb deleted file mode 100644 index cd05e3cf0072..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_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 VideoIntelligence - module V1p2beta1 - module VideoIntelligenceService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the VideoIntelligenceService 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 VideoIntelligenceService 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::VideoIntelligence::V1p2beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::VideoIntelligence::V1p2beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::VideoIntelligence::V1p2beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::VideoIntelligence::V1p2beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::VideoIntelligence::V1p2beta1::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 = "videointelligence.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-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest.rb deleted file mode 100644 index d266c03a77a7..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest.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 "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/video_intelligence/v1p2beta1/version" - -require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/credentials" -require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/operations" -require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/client" - -module Google - module Cloud - module VideoIntelligence - module V1p2beta1 - ## - # Service that implements Google Cloud Video Intelligence API. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest" - # client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Client.new - # - module VideoIntelligenceService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/client.rb deleted file mode 100644 index 5e9e2bcc6d33..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/client.rb +++ /dev/null @@ -1,481 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/videointelligence/v1p2beta1/video_intelligence_pb" -require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/service_stub" - -module Google - module Cloud - module VideoIntelligence - module V1p2beta1 - module VideoIntelligenceService - module Rest - ## - # REST client for the VideoIntelligenceService service. - # - # Service that implements Google Cloud Video Intelligence API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :video_intelligence_service_stub - - ## - # Configure the VideoIntelligenceService Client class. - # - # See {::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all VideoIntelligenceService clients - # ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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", "VideoIntelligence", "V1p2beta1"] - 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.annotate_video.timeout = 600.0 - default_config.rpcs.annotate_video.retry_policy = { - initial_delay: 1.0, max_delay: 120.0, multiplier: 2.5, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the VideoIntelligenceService 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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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 - @video_intelligence_service_stub.universe_domain - end - - ## - # Create a new VideoIntelligenceService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the VideoIntelligenceService 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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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 - - @video_intelligence_service_stub = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @video_intelligence_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 - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @video_intelligence_service_stub.logger - end - - # Service calls - - ## - # Performs asynchronous video annotation. Progress and results can be - # retrieved through the `google.longrunning.Operations` interface. - # `Operation.metadata` contains `AnnotateVideoProgress` (progress). - # `Operation.response` contains `AnnotateVideoResponse` (results). - # - # @overload annotate_video(request, options = nil) - # Pass arguments to `annotate_video` via a request object, either of type - # {::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload annotate_video(input_uri: nil, input_content: nil, features: nil, video_context: nil, output_uri: nil, location_id: nil) - # Pass arguments to `annotate_video` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param input_uri [::String] - # Input video location. Currently, only - # [Google Cloud Storage](https://cloud.google.com/storage/) URIs are - # supported, which must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see - # [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). - # A video URI may include wildcards in `object-id`, and thus identify - # multiple videos. Supported wildcards: '*' to match 0 or more characters; - # '?' to match 1 character. If unset, the input video should be embedded - # in the request as `input_content`. If set, `input_content` should be unset. - # @param input_content [::String] - # The video data bytes. - # If unset, the input video(s) should be specified via `input_uri`. - # If set, `input_uri` should be unset. - # @param features [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::Feature>] - # Required. Requested video annotation features. - # @param video_context [::Google::Cloud::VideoIntelligence::V1p2beta1::VideoContext, ::Hash] - # Additional video context and/or feature-specific parameters. - # @param output_uri [::String] - # Optional. Location where the output (in JSON format) should be stored. - # Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) - # URIs are supported, which must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see - # [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). - # @param location_id [::String] - # Optional. Cloud region where annotation should take place. Supported cloud - # regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region - # is specified, a region will be determined based on video file 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/video_intelligence/v1p2beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest.new - # - # # Call the annotate_video method. - # result = client.annotate_video request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def annotate_video request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.annotate_video.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::VideoIntelligence::V1p2beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.annotate_video.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.annotate_video.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_intelligence_service_stub.annotate_video request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 VideoIntelligenceService REST API. - # - # This class represents the configuration for VideoIntelligenceService 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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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 - # # annotate_video to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.annotate_video.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.annotate_video.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 = "videointelligence.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 VideoIntelligenceService 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 `annotate_video` - # @return [::Gapic::Config::Method] - # - attr_reader :annotate_video - - # @private - def initialize parent_rpcs = nil - annotate_video_config = parent_rpcs.annotate_video if parent_rpcs.respond_to? :annotate_video - @annotate_video = ::Gapic::Config::Method.new annotate_video_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/operations.rb deleted file mode 100644 index f7e1a28c14d8..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/operations.rb +++ /dev/null @@ -1,946 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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 VideoIntelligence - module V1p2beta1 - module VideoIntelligenceService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the VideoIntelligenceService 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 VideoIntelligenceService 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::VideoIntelligence::V1p2beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1p2beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1p2beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1p2beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "videointelligence.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: "/v1p2beta1/{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: "/v1p2beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1p2beta1/operations/{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: "/v1p2beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1p2beta1/operations/{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: "/v1p2beta1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1p2beta1/operations/{name}:cancel", - 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-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/service_stub.rb deleted file mode 100644 index 3758000da7a7..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest/service_stub.rb +++ /dev/null @@ -1,141 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/videointelligence/v1p2beta1/video_intelligence_pb" - -module Google - module Cloud - module VideoIntelligence - module V1p2beta1 - module VideoIntelligenceService - module Rest - ## - # REST service stub for the VideoIntelligenceService 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 annotate_video REST call - # - # @param request_pb [::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def annotate_video request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_annotate_video_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "annotate_video", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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 annotate_video REST call - # - # @param request_pb [::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_annotate_video_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1p2beta1/videos:annotate", - body: "*", - matches: [] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/videointelligence/v1p2beta1/video_intelligence_pb.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/videointelligence/v1p2beta1/video_intelligence_pb.rb deleted file mode 100644 index d1fca6dad5f1..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/videointelligence/v1p2beta1/video_intelligence_pb.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/videointelligence/v1p2beta1/video_intelligence.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\nAgoogle/cloud/videointelligence/v1p2beta1/video_intelligence.proto\x12(google.cloud.videointelligence.v1p2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x8c\x02\n\x14\x41nnotateVideoRequest\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\x15\n\rinput_content\x18\x06 \x01(\x0c\x12H\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0e\x32\x31.google.cloud.videointelligence.v1p2beta1.FeatureB\x03\xe0\x41\x02\x12M\n\rvideo_context\x18\x03 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p2beta1.VideoContext\x12\x17\n\noutput_uri\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0blocation_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xf6\x03\n\x0cVideoContext\x12H\n\x08segments\x18\x01 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1p2beta1.VideoSegment\x12^\n\x16label_detection_config\x18\x02 \x01(\x0b\x32>.google.cloud.videointelligence.v1p2beta1.LabelDetectionConfig\x12i\n\x1cshot_change_detection_config\x18\x03 \x01(\x0b\x32\x43.google.cloud.videointelligence.v1p2beta1.ShotChangeDetectionConfig\x12s\n!explicit_content_detection_config\x18\x04 \x01(\x0b\x32H.google.cloud.videointelligence.v1p2beta1.ExplicitContentDetectionConfig\x12\\\n\x15text_detection_config\x18\x08 \x01(\x0b\x32=.google.cloud.videointelligence.v1p2beta1.TextDetectionConfig\"\x9c\x01\n\x14LabelDetectionConfig\x12Z\n\x14label_detection_mode\x18\x01 \x01(\x0e\x32<.google.cloud.videointelligence.v1p2beta1.LabelDetectionMode\x12\x19\n\x11stationary_camera\x18\x02 \x01(\x08\x12\r\n\x05model\x18\x03 \x01(\t\"*\n\x19ShotChangeDetectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\"/\n\x1e\x45xplicitContentDetectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\"-\n\x13TextDetectionConfig\x12\x16\n\x0elanguage_hints\x18\x01 \x03(\t\"x\n\x0cVideoSegment\x12\x34\n\x11start_time_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0f\x65nd_time_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"k\n\x0cLabelSegment\x12G\n\x07segment\x18\x01 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p2beta1.VideoSegment\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"P\n\nLabelFrame\x12.\n\x0btime_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"G\n\x06\x45ntity\x12\x11\n\tentity_id\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x15\n\rlanguage_code\x18\x03 \x01(\t\"\xb0\x02\n\x0fLabelAnnotation\x12@\n\x06\x65ntity\x18\x01 \x01(\x0b\x32\x30.google.cloud.videointelligence.v1p2beta1.Entity\x12K\n\x11\x63\x61tegory_entities\x18\x02 \x03(\x0b\x32\x30.google.cloud.videointelligence.v1p2beta1.Entity\x12H\n\x08segments\x18\x03 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1p2beta1.LabelSegment\x12\x44\n\x06\x66rames\x18\x04 \x03(\x0b\x32\x34.google.cloud.videointelligence.v1p2beta1.LabelFrame\"\x9c\x01\n\x14\x45xplicitContentFrame\x12.\n\x0btime_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12T\n\x16pornography_likelihood\x18\x02 \x01(\x0e\x32\x34.google.cloud.videointelligence.v1p2beta1.Likelihood\"k\n\x19\x45xplicitContentAnnotation\x12N\n\x06\x66rames\x18\x01 \x03(\x0b\x32>.google.cloud.videointelligence.v1p2beta1.ExplicitContentFrame\"Q\n\x15NormalizedBoundingBox\x12\x0c\n\x04left\x18\x01 \x01(\x02\x12\x0b\n\x03top\x18\x02 \x01(\x02\x12\r\n\x05right\x18\x03 \x01(\x02\x12\x0e\n\x06\x62ottom\x18\x04 \x01(\x02\"\xcb\x05\n\x16VideoAnnotationResults\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\\\n\x19segment_label_annotations\x18\x02 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p2beta1.LabelAnnotation\x12Y\n\x16shot_label_annotations\x18\x03 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p2beta1.LabelAnnotation\x12Z\n\x17\x66rame_label_annotations\x18\x04 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p2beta1.LabelAnnotation\x12P\n\x10shot_annotations\x18\x06 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1p2beta1.VideoSegment\x12`\n\x13\x65xplicit_annotation\x18\x07 \x01(\x0b\x32\x43.google.cloud.videointelligence.v1p2beta1.ExplicitContentAnnotation\x12R\n\x10text_annotations\x18\x0c \x03(\x0b\x32\x38.google.cloud.videointelligence.v1p2beta1.TextAnnotation\x12^\n\x12object_annotations\x18\x0e \x03(\x0b\x32\x42.google.cloud.videointelligence.v1p2beta1.ObjectTrackingAnnotation\x12!\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.Status\"u\n\x15\x41nnotateVideoResponse\x12\\\n\x12\x61nnotation_results\x18\x01 \x03(\x0b\x32@.google.cloud.videointelligence.v1p2beta1.VideoAnnotationResults\"\xa7\x01\n\x17VideoAnnotationProgress\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\x18\n\x10progress_percent\x18\x02 \x01(\x05\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"w\n\x15\x41nnotateVideoProgress\x12^\n\x13\x61nnotation_progress\x18\x01 \x03(\x0b\x32\x41.google.cloud.videointelligence.v1p2beta1.VideoAnnotationProgress\"(\n\x10NormalizedVertex\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\"f\n\x16NormalizedBoundingPoly\x12L\n\x08vertices\x18\x01 \x03(\x0b\x32:.google.cloud.videointelligence.v1p2beta1.NormalizedVertex\"\xaf\x01\n\x0bTextSegment\x12G\n\x07segment\x18\x01 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p2beta1.VideoSegment\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12\x43\n\x06\x66rames\x18\x03 \x03(\x0b\x32\x33.google.cloud.videointelligence.v1p2beta1.TextFrame\"\x9b\x01\n\tTextFrame\x12^\n\x14rotated_bounding_box\x18\x01 \x01(\x0b\x32@.google.cloud.videointelligence.v1p2beta1.NormalizedBoundingPoly\x12.\n\x0btime_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"g\n\x0eTextAnnotation\x12\x0c\n\x04text\x18\x01 \x01(\t\x12G\n\x08segments\x18\x02 \x03(\x0b\x32\x35.google.cloud.videointelligence.v1p2beta1.TextSegment\"\xa7\x01\n\x13ObjectTrackingFrame\x12`\n\x17normalized_bounding_box\x18\x01 \x01(\x0b\x32?.google.cloud.videointelligence.v1p2beta1.NormalizedBoundingBox\x12.\n\x0btime_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xac\x02\n\x18ObjectTrackingAnnotation\x12I\n\x07segment\x18\x03 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p2beta1.VideoSegmentH\x00\x12\x12\n\x08track_id\x18\x05 \x01(\x03H\x00\x12@\n\x06\x65ntity\x18\x01 \x01(\x0b\x32\x30.google.cloud.videointelligence.v1p2beta1.Entity\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x12M\n\x06\x66rames\x18\x02 \x03(\x0b\x32=.google.cloud.videointelligence.v1p2beta1.ObjectTrackingFrameB\x0c\n\ntrack_info*\x9b\x01\n\x07\x46\x65\x61ture\x12\x17\n\x13\x46\x45\x41TURE_UNSPECIFIED\x10\x00\x12\x13\n\x0fLABEL_DETECTION\x10\x01\x12\x19\n\x15SHOT_CHANGE_DETECTION\x10\x02\x12\x1e\n\x1a\x45XPLICIT_CONTENT_DETECTION\x10\x03\x12\x12\n\x0eTEXT_DETECTION\x10\x07\x12\x13\n\x0fOBJECT_TRACKING\x10\t*r\n\x12LabelDetectionMode\x12$\n LABEL_DETECTION_MODE_UNSPECIFIED\x10\x00\x12\r\n\tSHOT_MODE\x10\x01\x12\x0e\n\nFRAME_MODE\x10\x02\x12\x17\n\x13SHOT_AND_FRAME_MODE\x10\x03*t\n\nLikelihood\x12\x1a\n\x16LIKELIHOOD_UNSPECIFIED\x10\x00\x12\x11\n\rVERY_UNLIKELY\x10\x01\x12\x0c\n\x08UNLIKELY\x10\x02\x12\x0c\n\x08POSSIBLE\x10\x03\x12\n\n\x06LIKELY\x10\x04\x12\x0f\n\x0bVERY_LIKELY\x10\x05\x32\xce\x02\n\x18VideoIntelligenceService\x12\xdb\x01\n\rAnnotateVideo\x12>.google.cloud.videointelligence.v1p2beta1.AnnotateVideoRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41.\n\x15\x41nnotateVideoResponse\x12\x15\x41nnotateVideoProgress\xda\x41\x12input_uri,features\x82\xd3\xe4\x93\x02\x1f\"\x1a/v1p2beta1/videos:annotate:\x01*\x1aT\xca\x41 videointelligence.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xaf\x02\n,com.google.cloud.videointelligence.v1p2beta1B\x1dVideoIntelligenceServiceProtoP\x01ZZcloud.google.com/go/videointelligence/apiv1p2beta1/videointelligencepb;videointelligencepb\xaa\x02(Google.Cloud.VideoIntelligence.V1P2Beta1\xca\x02(Google\\Cloud\\VideoIntelligence\\V1p2beta1\xea\x02+Google::Cloud::VideoIntelligence::V1p2beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module VideoIntelligence - module V1p2beta1 - AnnotateVideoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.AnnotateVideoRequest").msgclass - VideoContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.VideoContext").msgclass - LabelDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.LabelDetectionConfig").msgclass - ShotChangeDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.ShotChangeDetectionConfig").msgclass - ExplicitContentDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.ExplicitContentDetectionConfig").msgclass - TextDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.TextDetectionConfig").msgclass - VideoSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.VideoSegment").msgclass - LabelSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.LabelSegment").msgclass - LabelFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.LabelFrame").msgclass - Entity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.Entity").msgclass - LabelAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.LabelAnnotation").msgclass - ExplicitContentFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.ExplicitContentFrame").msgclass - ExplicitContentAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.ExplicitContentAnnotation").msgclass - NormalizedBoundingBox = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.NormalizedBoundingBox").msgclass - VideoAnnotationResults = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.VideoAnnotationResults").msgclass - AnnotateVideoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.AnnotateVideoResponse").msgclass - VideoAnnotationProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.VideoAnnotationProgress").msgclass - AnnotateVideoProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.AnnotateVideoProgress").msgclass - NormalizedVertex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.NormalizedVertex").msgclass - NormalizedBoundingPoly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.NormalizedBoundingPoly").msgclass - TextSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.TextSegment").msgclass - TextFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.TextFrame").msgclass - TextAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.TextAnnotation").msgclass - ObjectTrackingFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.ObjectTrackingFrame").msgclass - ObjectTrackingAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.ObjectTrackingAnnotation").msgclass - Feature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.Feature").enummodule - LabelDetectionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.LabelDetectionMode").enummodule - Likelihood = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p2beta1.Likelihood").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/videointelligence/v1p2beta1/video_intelligence_services_pb.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/videointelligence/v1p2beta1/video_intelligence_services_pb.rb deleted file mode 100644 index 9a4d9534961b..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/lib/google/cloud/videointelligence/v1p2beta1/video_intelligence_services_pb.rb +++ /dev/null @@ -1,49 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/videointelligence/v1p2beta1/video_intelligence.proto for package 'Google.Cloud.VideoIntelligence.V1p2beta1' -# 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/videointelligence/v1p2beta1/video_intelligence_pb' - -module Google - module Cloud - module VideoIntelligence - module V1p2beta1 - module VideoIntelligenceService - # Service that implements Google Cloud Video Intelligence API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.videointelligence.v1p2beta1.VideoIntelligenceService' - - # Performs asynchronous video annotation. Progress and results can be - # retrieved through the `google.longrunning.Operations` interface. - # `Operation.metadata` contains `AnnotateVideoProgress` (progress). - # `Operation.response` contains `AnnotateVideoResponse` (results). - rpc :AnnotateVideo, ::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/README.md deleted file mode 100644 index 0cebb7431296..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Video Intelligence V1p2beta1 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-video_intelligence-v1p2beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # 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. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - # - # Example: - # - # 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 - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # 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 - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # 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 - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/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-video_intelligence-v1p2beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/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-video_intelligence-v1p2beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/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-video_intelligence-v1p2beta1/proto_docs/google/cloud/videointelligence/v1p2beta1/video_intelligence.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/cloud/videointelligence/v1p2beta1/video_intelligence.rb deleted file mode 100644 index 960a7e17a23e..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/cloud/videointelligence/v1p2beta1/video_intelligence.rb +++ /dev/null @@ -1,534 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module VideoIntelligence - module V1p2beta1 - # Video annotation request. - # @!attribute [rw] input_uri - # @return [::String] - # Input video location. Currently, only - # [Google Cloud Storage](https://cloud.google.com/storage/) URIs are - # supported, which must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see - # [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). - # A video URI may include wildcards in `object-id`, and thus identify - # multiple videos. Supported wildcards: '*' to match 0 or more characters; - # '?' to match 1 character. If unset, the input video should be embedded - # in the request as `input_content`. If set, `input_content` should be unset. - # @!attribute [rw] input_content - # @return [::String] - # The video data bytes. - # If unset, the input video(s) should be specified via `input_uri`. - # If set, `input_uri` should be unset. - # @!attribute [rw] features - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::Feature>] - # Required. Requested video annotation features. - # @!attribute [rw] video_context - # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::VideoContext] - # Additional video context and/or feature-specific parameters. - # @!attribute [rw] output_uri - # @return [::String] - # Optional. Location where the output (in JSON format) should be stored. - # Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) - # URIs are supported, which must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see - # [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). - # @!attribute [rw] location_id - # @return [::String] - # Optional. Cloud region where annotation should take place. Supported cloud - # regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region - # is specified, a region will be determined based on video file location. - class AnnotateVideoRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video context and/or feature-specific parameters. - # @!attribute [rw] segments - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::VideoSegment>] - # Video segments to annotate. The segments may overlap and are not required - # to be contiguous or span the whole video. If unspecified, each video is - # treated as a single segment. - # @!attribute [rw] label_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::LabelDetectionConfig] - # Config for LABEL_DETECTION. - # @!attribute [rw] shot_change_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::ShotChangeDetectionConfig] - # Config for SHOT_CHANGE_DETECTION. - # @!attribute [rw] explicit_content_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::ExplicitContentDetectionConfig] - # Config for EXPLICIT_CONTENT_DETECTION. - # @!attribute [rw] text_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::TextDetectionConfig] - # Config for TEXT_DETECTION. - class VideoContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for LABEL_DETECTION. - # @!attribute [rw] label_detection_mode - # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::LabelDetectionMode] - # What labels should be detected with LABEL_DETECTION, in addition to - # video-level labels or segment-level labels. - # If unspecified, defaults to `SHOT_MODE`. - # @!attribute [rw] stationary_camera - # @return [::Boolean] - # Whether the video has been shot from a stationary (i.e. non-moving) camera. - # When set to true, might improve detection accuracy for moving objects. - # Should be used with `SHOT_AND_FRAME_MODE` enabled. - # @!attribute [rw] model - # @return [::String] - # Model to use for label detection. - # Supported values: "builtin/stable" (the default if unset) and - # "builtin/latest". - class LabelDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for SHOT_CHANGE_DETECTION. - # @!attribute [rw] model - # @return [::String] - # Model to use for shot change detection. - # Supported values: "builtin/stable" (the default if unset) and - # "builtin/latest". - class ShotChangeDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for EXPLICIT_CONTENT_DETECTION. - # @!attribute [rw] model - # @return [::String] - # Model to use for explicit content detection. - # Supported values: "builtin/stable" (the default if unset) and - # "builtin/latest". - class ExplicitContentDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for TEXT_DETECTION. - # @!attribute [rw] language_hints - # @return [::Array<::String>] - # Language hint can be specified if the language to be detected is known a - # priori. It can increase the accuracy of the detection. Language hint must - # be language code in BCP-47 format. - # - # Automatic language detection is performed if no hint is provided. - class TextDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video segment. - # @!attribute [rw] start_time_offset - # @return [::Google::Protobuf::Duration] - # Time-offset, relative to the beginning of the video, - # corresponding to the start of the segment (inclusive). - # @!attribute [rw] end_time_offset - # @return [::Google::Protobuf::Duration] - # Time-offset, relative to the beginning of the video, - # corresponding to the end of the segment (inclusive). - class VideoSegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video segment level annotation results for label detection. - # @!attribute [rw] segment - # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::VideoSegment] - # Video segment where a label was detected. - # @!attribute [rw] confidence - # @return [::Float] - # Confidence that the label is accurate. Range: [0, 1]. - class LabelSegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video frame level annotation results for label detection. - # @!attribute [rw] time_offset - # @return [::Google::Protobuf::Duration] - # Time-offset, relative to the beginning of the video, corresponding to the - # video frame for this location. - # @!attribute [rw] confidence - # @return [::Float] - # Confidence that the label is accurate. Range: [0, 1]. - class LabelFrame - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Detected entity from video analysis. - # @!attribute [rw] entity_id - # @return [::String] - # Opaque entity ID. Some IDs may be available in - # [Google Knowledge Graph Search - # API](https://developers.google.com/knowledge-graph/). - # @!attribute [rw] description - # @return [::String] - # Textual description, e.g. `Fixed-gear bicycle`. - # @!attribute [rw] language_code - # @return [::String] - # Language code for `description` in BCP-47 format. - class Entity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Label annotation. - # @!attribute [rw] entity - # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::Entity] - # Detected entity. - # @!attribute [rw] category_entities - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::Entity>] - # Common categories for the detected entity. - # E.g. when the label is `Terrier` the category is likely `dog`. And in some - # cases there might be more than one categories e.g. `Terrier` could also be - # a `pet`. - # @!attribute [rw] segments - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::LabelSegment>] - # All video segments where a label was detected. - # @!attribute [rw] frames - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::LabelFrame>] - # All video frames where a label was detected. - class LabelAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video frame level annotation results for explicit content. - # @!attribute [rw] time_offset - # @return [::Google::Protobuf::Duration] - # Time-offset, relative to the beginning of the video, corresponding to the - # video frame for this location. - # @!attribute [rw] pornography_likelihood - # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::Likelihood] - # Likelihood of the pornography content.. - class ExplicitContentFrame - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Explicit content annotation (based on per-frame visual signals only). - # If no explicit content has been detected in a frame, no annotations are - # present for that frame. - # @!attribute [rw] frames - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::ExplicitContentFrame>] - # All video frames where explicit content was detected. - class ExplicitContentAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Normalized bounding box. - # The normalized vertex coordinates are relative to the original image. - # Range: [0, 1]. - # @!attribute [rw] left - # @return [::Float] - # Left X coordinate. - # @!attribute [rw] top - # @return [::Float] - # Top Y coordinate. - # @!attribute [rw] right - # @return [::Float] - # Right X coordinate. - # @!attribute [rw] bottom - # @return [::Float] - # Bottom Y coordinate. - class NormalizedBoundingBox - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotation results for a single video. - # @!attribute [rw] input_uri - # @return [::String] - # Video file location in - # [Google Cloud Storage](https://cloud.google.com/storage/). - # @!attribute [rw] segment_label_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::LabelAnnotation>] - # Label annotations on video level or user specified segment level. - # There is exactly one element for each unique label. - # @!attribute [rw] shot_label_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::LabelAnnotation>] - # Label annotations on shot level. - # There is exactly one element for each unique label. - # @!attribute [rw] frame_label_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::LabelAnnotation>] - # Label annotations on frame level. - # There is exactly one element for each unique label. - # @!attribute [rw] shot_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::VideoSegment>] - # Shot annotations. Each shot is represented as a video segment. - # @!attribute [rw] explicit_annotation - # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::ExplicitContentAnnotation] - # Explicit content annotation. - # @!attribute [rw] text_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::TextAnnotation>] - # OCR text detection and tracking. - # Annotations for list of detected text snippets. Each will have list of - # frame information associated with it. - # @!attribute [rw] object_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::ObjectTrackingAnnotation>] - # Annotations for list of objects detected and tracked in video. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # If set, indicates an error. Note that for a single `AnnotateVideoRequest` - # some videos may succeed and some may fail. - class VideoAnnotationResults - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video annotation response. Included in the `response` - # field of the `Operation` returned by the `GetOperation` - # call of the `google::longrunning::Operations` service. - # @!attribute [rw] annotation_results - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::VideoAnnotationResults>] - # Annotation results for all videos specified in `AnnotateVideoRequest`. - class AnnotateVideoResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotation progress for a single video. - # @!attribute [rw] input_uri - # @return [::String] - # Video file location in - # [Google Cloud Storage](https://cloud.google.com/storage/). - # @!attribute [rw] progress_percent - # @return [::Integer] - # Approximate percentage processed thus far. Guaranteed to be - # 100 when fully processed. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Time when the request was received. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Time of the most recent update. - class VideoAnnotationProgress - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video annotation progress. Included in the `metadata` - # field of the `Operation` returned by the `GetOperation` - # call of the `google::longrunning::Operations` service. - # @!attribute [rw] annotation_progress - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::VideoAnnotationProgress>] - # Progress metadata for all videos specified in `AnnotateVideoRequest`. - class AnnotateVideoProgress - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A vertex represents a 2D point in the image. - # NOTE: the normalized vertex coordinates are relative to the original image - # and range from 0 to 1. - # @!attribute [rw] x - # @return [::Float] - # X coordinate. - # @!attribute [rw] y - # @return [::Float] - # Y coordinate. - class NormalizedVertex - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Normalized bounding polygon for text (that might not be aligned with axis). - # Contains list of the corner points in clockwise order starting from - # top-left corner. For example, for a rectangular bounding box: - # When the text is horizontal it might look like: - # 0----1 - # | | - # 3----2 - # - # When it's clockwise rotated 180 degrees around the top-left corner it - # becomes: - # 2----3 - # | | - # 1----0 - # - # and the vertex order will still be (0, 1, 2, 3). Note that values can be less - # than 0, or greater than 1 due to trignometric calculations for location of - # the box. - # @!attribute [rw] vertices - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::NormalizedVertex>] - # Normalized vertices of the bounding polygon. - class NormalizedBoundingPoly - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video segment level annotation results for text detection. - # @!attribute [rw] segment - # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::VideoSegment] - # Video segment where a text snippet was detected. - # @!attribute [rw] confidence - # @return [::Float] - # Confidence for the track of detected text. It is calculated as the highest - # over all frames where OCR detected text appears. - # @!attribute [rw] frames - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::TextFrame>] - # Information related to the frames where OCR detected text appears. - class TextSegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video frame level annotation results for text annotation (OCR). - # Contains information regarding timestamp and bounding box locations for the - # frames containing detected OCR text snippets. - # @!attribute [rw] rotated_bounding_box - # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::NormalizedBoundingPoly] - # Bounding polygon of the detected text for this frame. - # @!attribute [rw] time_offset - # @return [::Google::Protobuf::Duration] - # Timestamp of this frame. - class TextFrame - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotations related to one detected OCR text snippet. This will contain the - # corresponding text, confidence value, and frame level information for each - # detection. - # @!attribute [rw] text - # @return [::String] - # The detected text. - # @!attribute [rw] segments - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::TextSegment>] - # All video segments where OCR detected text appears. - class TextAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video frame level annotations for object detection and tracking. This field - # stores per frame location, time offset, and confidence. - # @!attribute [rw] normalized_bounding_box - # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::NormalizedBoundingBox] - # The normalized bounding box location of this object track for the frame. - # @!attribute [rw] time_offset - # @return [::Google::Protobuf::Duration] - # The timestamp of the frame in microseconds. - class ObjectTrackingFrame - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotations corresponding to one tracked object. - # @!attribute [rw] segment - # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::VideoSegment] - # Non-streaming batch mode ONLY. - # Each object track corresponds to one video segment where it appears. - # - # Note: The following fields are mutually exclusive: `segment`, `track_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] track_id - # @return [::Integer] - # Streaming mode ONLY. - # In streaming mode, we do not know the end time of a tracked object - # before it is completed. Hence, there is no VideoSegment info returned. - # Instead, we provide a unique identifiable integer track_id so that - # the customers can correlate the results of the ongoing - # ObjectTrackAnnotation of the same track_id over time. - # - # Note: The following fields are mutually exclusive: `track_id`, `segment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] entity - # @return [::Google::Cloud::VideoIntelligence::V1p2beta1::Entity] - # Entity to specify the object category that this track is labeled as. - # @!attribute [rw] confidence - # @return [::Float] - # Object category's labeling confidence of this track. - # @!attribute [rw] frames - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p2beta1::ObjectTrackingFrame>] - # Information corresponding to all frames where this object track appears. - class ObjectTrackingAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video annotation feature. - module Feature - # Unspecified. - FEATURE_UNSPECIFIED = 0 - - # Label detection. Detect objects, such as dog or flower. - LABEL_DETECTION = 1 - - # Shot change detection. - SHOT_CHANGE_DETECTION = 2 - - # Explicit content detection. - EXPLICIT_CONTENT_DETECTION = 3 - - # OCR text detection and tracking. - TEXT_DETECTION = 7 - - # Object detection and tracking. - OBJECT_TRACKING = 9 - end - - # Label detection mode. - module LabelDetectionMode - # Unspecified. - LABEL_DETECTION_MODE_UNSPECIFIED = 0 - - # Detect shot-level labels. - SHOT_MODE = 1 - - # Detect frame-level labels. - FRAME_MODE = 2 - - # Detect both shot-level and frame-level labels. - SHOT_AND_FRAME_MODE = 3 - end - - # Bucketized representation of likelihood. - module Likelihood - # Unspecified likelihood. - LIKELIHOOD_UNSPECIFIED = 0 - - # Very unlikely. - VERY_UNLIKELY = 1 - - # Unlikely. - UNLIKELY = 2 - - # Possible. - POSSIBLE = 3 - - # Likely. - LIKELY = 4 - - # Very likely. - VERY_LIKELY = 5 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/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-video_intelligence-v1p2beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/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-video_intelligence-v1p2beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/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-video_intelligence-v1p2beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/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-video_intelligence-v1p2beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/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-video_intelligence-v1p2beta1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/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-video_intelligence-v1p2beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/snippets/Gemfile deleted file mode 100644 index 8f1241ae6a82..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/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-video_intelligence-v1p2beta1", path: "../" -else - gem "google-cloud-video_intelligence-v1p2beta1" -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-video_intelligence-v1p2beta1/snippets/snippet_metadata_google.cloud.videointelligence.v1p2beta1.json b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/snippets/snippet_metadata_google.cloud.videointelligence.v1p2beta1.json deleted file mode 100644 index 9d132735f087..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/snippets/snippet_metadata_google.cloud.videointelligence.v1p2beta1.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-video_intelligence-v1p2beta1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.videointelligence.v1p2beta1", - "version": "v1p2beta1" - } - ] - }, - "snippets": [ - { - "region_tag": "videointelligence_v1p2beta1_generated_VideoIntelligenceService_AnnotateVideo_sync", - "title": "Snippet for the annotate_video call in the VideoIntelligenceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client#annotate_video.", - "file": "video_intelligence_service/annotate_video.rb", - "language": "RUBY", - "client_method": { - "short_name": "annotate_video", - "full_name": "::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client#annotate_video", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "VideoIntelligenceService::Client", - "full_name": "::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client" - }, - "method": { - "short_name": "AnnotateVideo", - "full_name": "google.cloud.videointelligence.v1p2beta1.VideoIntelligenceService.AnnotateVideo", - "service": { - "short_name": "VideoIntelligenceService", - "full_name": "google.cloud.videointelligence.v1p2beta1.VideoIntelligenceService" - } - } - }, - "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-video_intelligence-v1p2beta1/snippets/video_intelligence_service/annotate_video.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/snippets/video_intelligence_service/annotate_video.rb deleted file mode 100644 index e2be4b971a1d..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/snippets/video_intelligence_service/annotate_video.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 videointelligence_v1p2beta1_generated_VideoIntelligenceService_AnnotateVideo_sync] -require "google/cloud/video_intelligence/v1p2beta1" - -## -# Snippet for the annotate_video call in the VideoIntelligenceService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client#annotate_video. -# -def annotate_video - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest.new - - # Call the annotate_video method. - result = client.annotate_video request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END videointelligence_v1p2beta1_generated_VideoIntelligenceService_AnnotateVideo_sync] diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_operations_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_operations_test.rb deleted file mode 100644 index 302732f0a876..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/google/cloud/video_intelligence/v1p2beta1/video_intelligence_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/videointelligence/v1p2beta1/video_intelligence_pb" -require "google/cloud/videointelligence/v1p2beta1/video_intelligence_services_pb" -require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service" - -class ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_rest_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_rest_test.rb deleted file mode 100644 index 3e0a034e4d7d..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_rest_test.rb +++ /dev/null @@ -1,158 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/videointelligence/v1p2beta1/video_intelligence_pb" -require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service/rest" - - -class ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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_annotate_video - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - input_uri = "hello world" - input_content = "hello world" - features = [:FEATURE_UNSPECIFIED] - video_context = {} - output_uri = "hello world" - location_id = "hello world" - - annotate_video_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::ServiceStub.stub :transcode_annotate_video_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, annotate_video_client_stub do - # Create client - client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.annotate_video input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.annotate_video ::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.annotate_video(::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, annotate_video_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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_test.rb deleted file mode 100644 index f4205d2f29c5..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_test.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! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/videointelligence/v1p2beta1/video_intelligence_pb" -require "google/cloud/video_intelligence/v1p2beta1/video_intelligence_service" - -class ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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_annotate_video - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - input_uri = "hello world" - input_content = "hello world" - features = [:FEATURE_UNSPECIFIED] - video_context = {} - output_uri = "hello world" - location_id = "hello world" - - annotate_video_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :annotate_video, name - assert_kind_of ::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest, request - assert_equal "hello world", request["input_uri"] - assert_equal "hello world", request["input_content"] - assert_equal [:FEATURE_UNSPECIFIED], request["features"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoContext), request["video_context"] - assert_equal "hello world", request["output_uri"] - assert_equal "hello world", request["location_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, annotate_video_client_stub do - # Create client - client = ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video ::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video(::Google::Cloud::VideoIntelligence::V1p2beta1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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, annotate_video_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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::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::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::VideoIntelligence::V1p2beta1::VideoIntelligenceService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/helper.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p2beta1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.gitignore b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.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-video_intelligence-v1p3beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.repo-metadata.json deleted file mode 100644 index d4c1d914c4da..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "videointelligence.googleapis.com", - "api_shortname": "videointelligence", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-video_intelligence-v1p3beta1/latest", - "distribution_name": "google-cloud-video_intelligence-v1p3beta1", - "is_cloud": true, - "language": "ruby", - "name": "videointelligence", - "name_pretty": "Cloud Video Intelligence V1p3beta1 API", - "product_documentation": "https://cloud.google.com/video-intelligence", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API. Note that google-cloud-video_intelligence-v1p3beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video_intelligence instead. See the readme for more details.", - "ruby-cloud-env-prefix": "VIDEO_INTELLIGENCE", - "ruby-cloud-product-url": "https://cloud.google.com/video-intelligence", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.rubocop.yml b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.rubocop.yml deleted file mode 100644 index 09a0a6fd85df..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-video_intelligence-v1p3beta1.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-video_intelligence-v1p3beta1.rb" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.toys.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.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-video_intelligence-v1p3beta1/.yardopts b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.yardopts deleted file mode 100644 index d124e945b546..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Video Intelligence V1p3beta1 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-video_intelligence-v1p3beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/AUTHENTICATION.md deleted file mode 100644 index 96456e9c7604..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-video_intelligence-v1p3beta1 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-video_intelligence-v1p3beta1 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/video_intelligence/v1p3beta1" - -client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/video_intelligence/v1p3beta1" - -::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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-video_intelligence-v1p3beta1 -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/video_intelligence/v1p3beta1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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-video_intelligence-v1p3beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/Gemfile b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/LICENSE.md b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/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-video_intelligence-v1p3beta1/README.md b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/README.md deleted file mode 100644 index 938c258af608..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Cloud Video Intelligence V1p3beta1 API - -Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming 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 Cloud Video Intelligence V1p3beta1 API. Most users should consider using -the main client gem, -[google-cloud-video_intelligence](https://rubygems.org/gems/google-cloud-video_intelligence). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-video_intelligence-v1p3beta1 -``` - -## 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/videointelligence.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/video_intelligence/v1p3beta1" - -client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.new -request = ::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest.new # (request fields as keyword arguments...) -response = client.annotate_video request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-video_intelligence-v1p3beta1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/video-intelligence) -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/video_intelligence/v1p3beta1" -require "logger" - -client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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-video_intelligence`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-video_intelligence-v1p3beta1`. -_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-video_intelligence`. -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-video_intelligence-v1p3beta1`. - -### 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-video_intelligence-v1p3beta1/Rakefile b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/Rakefile deleted file mode 100644 index 242985151f80..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/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-video_intelligence-v1p3beta1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["VIDEO_INTELLIGENCE_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["VIDEO_INTELLIGENCE_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["VIDEO_INTELLIGENCE_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 VIDEO_INTELLIGENCE_TEST_PROJECT=test123 VIDEO_INTELLIGENCE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/credentials" - ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["VIDEO_INTELLIGENCE_PROJECT"] = project - ENV["VIDEO_INTELLIGENCE_TEST_PROJECT"] = project - ENV["VIDEO_INTELLIGENCE_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-video_intelligence-v1p3beta1 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-video_intelligence-v1p3beta1 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-video_intelligence-v1p3beta1 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-video_intelligence-v1p3beta1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-video_intelligence-v1p3beta1" - header "google-cloud-video_intelligence-v1p3beta1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-video_intelligence-v1p3beta1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-video_intelligence-v1p3beta1 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-video_intelligence-v1p3beta1 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-video_intelligence-v1p3beta1 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-video_intelligence-v1p3beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/gapic_metadata.json deleted file mode 100644 index c850b466a839..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/gapic_metadata.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.videointelligence.v1p3beta1", - "libraryPackage": "::Google::Cloud::VideoIntelligence::V1p3beta1", - "services": { - "VideoIntelligenceService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client", - "rpcs": { - "AnnotateVideo": { - "methods": [ - "annotate_video" - ] - } - } - } - } - }, - "StreamingVideoIntelligenceService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client", - "rpcs": { - "StreamingAnnotateVideo": { - "methods": [ - "streaming_annotate_video" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/google-cloud-video_intelligence-v1p3beta1.gemspec b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/google-cloud-video_intelligence-v1p3beta1.gemspec deleted file mode 100644 index dd7ea0904a09..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/google-cloud-video_intelligence-v1p3beta1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/video_intelligence/v1p3beta1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-video_intelligence-v1p3beta1" - gem.version = Google::Cloud::VideoIntelligence::V1p3beta1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API. Note that google-cloud-video_intelligence-v1p3beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-video_intelligence instead. See the readme for more details." - gem.summary = "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming 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.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google-cloud-video_intelligence-v1p3beta1.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google-cloud-video_intelligence-v1p3beta1.rb deleted file mode 100644 index a636cadcfbd6..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google-cloud-video_intelligence-v1p3beta1.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/video_intelligence/v1p3beta1" diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1.rb deleted file mode 100644 index c960edc62709..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/video_intelligence/v1p3beta1/video_intelligence_service" -require "google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service" -require "google/cloud/video_intelligence/v1p3beta1/version" - -module Google - module Cloud - module VideoIntelligence - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/video_intelligence/v1p3beta1" - # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/video_intelligence/v1p3beta1" - # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Client.new - # - module V1p3beta1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1p3beta1", "_helpers.rb" -require "google/cloud/video_intelligence/v1p3beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/rest.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/rest.rb deleted file mode 100644 index d27389ee8029..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/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/video_intelligence/v1p3beta1/video_intelligence_service/rest" -require "google/cloud/video_intelligence/v1p3beta1/version" - -module Google - module Cloud - module VideoIntelligence - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/video_intelligence/v1p3beta1/rest" - # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Client.new - # - module V1p3beta1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service.rb deleted file mode 100644 index 9f1a517eab6f..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service.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! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/video_intelligence/v1p3beta1/version" - -require "google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service/credentials" -require "google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service/client" - -module Google - module Cloud - module VideoIntelligence - module V1p3beta1 - ## - # Service that implements streaming Video Intelligence API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service" - # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client.new - # - module StreamingVideoIntelligenceService - end - end - end - end -end - -helper_path = ::File.join __dir__, "streaming_video_intelligence_service", "helpers.rb" -require "google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service/client.rb deleted file mode 100644 index c2c6849c0fd3..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service/client.rb +++ /dev/null @@ -1,472 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/videointelligence/v1p3beta1/video_intelligence_pb" - -module Google - module Cloud - module VideoIntelligence - module V1p3beta1 - module StreamingVideoIntelligenceService - ## - # Client for the StreamingVideoIntelligenceService service. - # - # Service that implements streaming Video Intelligence API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :streaming_video_intelligence_service_stub - - ## - # Configure the StreamingVideoIntelligenceService Client class. - # - # See {::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all StreamingVideoIntelligenceService clients - # ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::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", "VideoIntelligence", "V1p3beta1"] - 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.streaming_annotate_video.timeout = 10_800.0 - default_config.rpcs.streaming_annotate_video.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the StreamingVideoIntelligenceService 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::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::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 - @streaming_video_intelligence_service_stub.universe_domain - end - - ## - # Create a new StreamingVideoIntelligenceService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the StreamingVideoIntelligenceService 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/videointelligence/v1p3beta1/video_intelligence_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 - - @streaming_video_intelligence_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::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 - ) - - @streaming_video_intelligence_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 - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @streaming_video_intelligence_service_stub.logger - end - - # Service calls - - ## - # Performs video annotation with bidirectional streaming: emitting results - # while sending video/audio bytes. - # This method is only available via the gRPC API (not REST). - # - # @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest, ::Hash>] - # An enumerable of {::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest} 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::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoResponse>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoResponse>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/video_intelligence/v1p3beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client.new - # - # # Create an input stream. - # input = Gapic::StreamInput.new - # - # # Call the streaming_annotate_video method to start streaming. - # output = client.streaming_annotate_video 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::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest.new - # input << Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest.new - # input.close - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoResponse - # output.each do |current_response| - # p current_response - # end - # - def streaming_annotate_video 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::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest - 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.streaming_annotate_video.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::VideoIntelligence::V1p3beta1::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.streaming_annotate_video.timeout, - metadata: metadata, - retry_policy: @config.rpcs.streaming_annotate_video.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @streaming_video_intelligence_service_stub.call_rpc :streaming_annotate_video, request, 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 StreamingVideoIntelligenceService API. - # - # This class represents the configuration for StreamingVideoIntelligenceService, - # 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::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::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 - # # streaming_annotate_video to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.streaming_annotate_video.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.streaming_annotate_video.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::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::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 = "videointelligence.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 StreamingVideoIntelligenceService 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 `streaming_annotate_video` - # @return [::Gapic::Config::Method] - # - attr_reader :streaming_annotate_video - - # @private - def initialize parent_rpcs = nil - streaming_annotate_video_config = parent_rpcs.streaming_annotate_video if parent_rpcs.respond_to? :streaming_annotate_video - @streaming_annotate_video = ::Gapic::Config::Method.new streaming_annotate_video_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service/credentials.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service/credentials.rb deleted file mode 100644 index 145a185003c1..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_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 VideoIntelligence - module V1p3beta1 - module StreamingVideoIntelligenceService - # Credentials for the StreamingVideoIntelligenceService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "VIDEO_INTELLIGENCE_CREDENTIALS", - "VIDEO_INTELLIGENCE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "VIDEO_INTELLIGENCE_CREDENTIALS_JSON", - "VIDEO_INTELLIGENCE_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-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/version.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/version.rb deleted file mode 100644 index 767b2db494e9..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/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 VideoIntelligence - module V1p3beta1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service.rb deleted file mode 100644 index 8c8e6e62883a..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service.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/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/video_intelligence/v1p3beta1/version" - -require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/credentials" -require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/operations" -require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/client" -require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest" - -module Google - module Cloud - module VideoIntelligence - module V1p3beta1 - ## - # Service that implements the Video Intelligence API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service" - # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest" - # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Client.new - # - module VideoIntelligenceService - end - end - end - end -end - -helper_path = ::File.join __dir__, "video_intelligence_service", "helpers.rb" -require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/client.rb deleted file mode 100644 index ccd37b864497..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/client.rb +++ /dev/null @@ -1,526 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/videointelligence/v1p3beta1/video_intelligence_pb" - -module Google - module Cloud - module VideoIntelligence - module V1p3beta1 - module VideoIntelligenceService - ## - # Client for the VideoIntelligenceService service. - # - # Service that implements the Video Intelligence API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :video_intelligence_service_stub - - ## - # Configure the VideoIntelligenceService Client class. - # - # See {::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all VideoIntelligenceService clients - # ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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", "VideoIntelligence", "V1p3beta1"] - 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.annotate_video.timeout = 600.0 - default_config.rpcs.annotate_video.retry_policy = { - initial_delay: 1.0, max_delay: 120.0, multiplier: 2.5, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the VideoIntelligenceService 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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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 - @video_intelligence_service_stub.universe_domain - end - - ## - # Create a new VideoIntelligenceService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the VideoIntelligenceService 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/videointelligence/v1p3beta1/video_intelligence_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 - - @video_intelligence_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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 - ) - - @video_intelligence_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 - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @video_intelligence_service_stub.logger - end - - # Service calls - - ## - # Performs asynchronous video annotation. Progress and results can be - # retrieved through the `google.longrunning.Operations` interface. - # `Operation.metadata` contains `AnnotateVideoProgress` (progress). - # `Operation.response` contains `AnnotateVideoResponse` (results). - # - # @overload annotate_video(request, options = nil) - # Pass arguments to `annotate_video` via a request object, either of type - # {::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload annotate_video(input_uri: nil, input_content: nil, features: nil, video_context: nil, output_uri: nil, location_id: nil) - # Pass arguments to `annotate_video` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param input_uri [::String] - # Input video location. Currently, only - # [Cloud Storage](https://cloud.google.com/storage/) URIs are - # supported. URIs must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - # more information, see [Request - # URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify - # multiple videos, a video URI may include wildcards in the `object-id`. - # Supported wildcards: '*' to match 0 or more characters; - # '?' to match 1 character. If unset, the input video should be embedded - # in the request as `input_content`. If set, `input_content` must be unset. - # @param input_content [::String] - # The video data bytes. - # If unset, the input video(s) should be specified via the `input_uri`. - # If set, `input_uri` must be unset. - # @param features [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::Feature>] - # Required. Requested video annotation features. - # @param video_context [::Google::Cloud::VideoIntelligence::V1p3beta1::VideoContext, ::Hash] - # Additional video context and/or feature-specific parameters. - # @param output_uri [::String] - # Optional. Location where the output (in JSON format) should be stored. - # Currently, only [Cloud Storage](https://cloud.google.com/storage/) - # URIs are supported. These must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - # more information, see [Request - # URIs](https://cloud.google.com/storage/docs/request-endpoints). - # @param location_id [::String] - # Optional. Cloud region where annotation should take place. Supported cloud - # regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no - # region is specified, the region will be determined based on video file - # 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/video_intelligence/v1p3beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest.new - # - # # Call the annotate_video method. - # result = client.annotate_video request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def annotate_video request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.annotate_video.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::VideoIntelligence::V1p3beta1::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.annotate_video.timeout, - metadata: metadata, - retry_policy: @config.rpcs.annotate_video.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_intelligence_service_stub.call_rpc :annotate_video, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 VideoIntelligenceService API. - # - # This class represents the configuration for VideoIntelligenceService, - # 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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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 - # # annotate_video to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.annotate_video.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.annotate_video.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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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 = "videointelligence.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 VideoIntelligenceService 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 `annotate_video` - # @return [::Gapic::Config::Method] - # - attr_reader :annotate_video - - # @private - def initialize parent_rpcs = nil - annotate_video_config = parent_rpcs.annotate_video if parent_rpcs.respond_to? :annotate_video - @annotate_video = ::Gapic::Config::Method.new annotate_video_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/credentials.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/credentials.rb deleted file mode 100644 index 0f1bf89bf76e..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_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 VideoIntelligence - module V1p3beta1 - module VideoIntelligenceService - # Credentials for the VideoIntelligenceService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "VIDEO_INTELLIGENCE_CREDENTIALS", - "VIDEO_INTELLIGENCE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "VIDEO_INTELLIGENCE_CREDENTIALS_JSON", - "VIDEO_INTELLIGENCE_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-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/operations.rb deleted file mode 100644 index 2692b0512d28..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_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 VideoIntelligence - module V1p3beta1 - module VideoIntelligenceService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the VideoIntelligenceService 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 VideoIntelligenceService 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::VideoIntelligence::V1p3beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::VideoIntelligence::V1p3beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::VideoIntelligence::V1p3beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::VideoIntelligence::V1p3beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::VideoIntelligence::V1p3beta1::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 = "videointelligence.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-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest.rb deleted file mode 100644 index fe53fa81bca5..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest.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 "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/video_intelligence/v1p3beta1/version" - -require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/credentials" -require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/operations" -require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/client" - -module Google - module Cloud - module VideoIntelligence - module V1p3beta1 - ## - # Service that implements the Video Intelligence API. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest" - # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Client.new - # - module VideoIntelligenceService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/client.rb deleted file mode 100644 index ed791536b9d2..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/client.rb +++ /dev/null @@ -1,484 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/videointelligence/v1p3beta1/video_intelligence_pb" -require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/service_stub" - -module Google - module Cloud - module VideoIntelligence - module V1p3beta1 - module VideoIntelligenceService - module Rest - ## - # REST client for the VideoIntelligenceService service. - # - # Service that implements the Video Intelligence API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :video_intelligence_service_stub - - ## - # Configure the VideoIntelligenceService Client class. - # - # See {::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all VideoIntelligenceService clients - # ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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", "VideoIntelligence", "V1p3beta1"] - 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.annotate_video.timeout = 600.0 - default_config.rpcs.annotate_video.retry_policy = { - initial_delay: 1.0, max_delay: 120.0, multiplier: 2.5, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the VideoIntelligenceService 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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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 - @video_intelligence_service_stub.universe_domain - end - - ## - # Create a new VideoIntelligenceService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the VideoIntelligenceService 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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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 - - @video_intelligence_service_stub = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @video_intelligence_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 - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @video_intelligence_service_stub.logger - end - - # Service calls - - ## - # Performs asynchronous video annotation. Progress and results can be - # retrieved through the `google.longrunning.Operations` interface. - # `Operation.metadata` contains `AnnotateVideoProgress` (progress). - # `Operation.response` contains `AnnotateVideoResponse` (results). - # - # @overload annotate_video(request, options = nil) - # Pass arguments to `annotate_video` via a request object, either of type - # {::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload annotate_video(input_uri: nil, input_content: nil, features: nil, video_context: nil, output_uri: nil, location_id: nil) - # Pass arguments to `annotate_video` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param input_uri [::String] - # Input video location. Currently, only - # [Cloud Storage](https://cloud.google.com/storage/) URIs are - # supported. URIs must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - # more information, see [Request - # URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify - # multiple videos, a video URI may include wildcards in the `object-id`. - # Supported wildcards: '*' to match 0 or more characters; - # '?' to match 1 character. If unset, the input video should be embedded - # in the request as `input_content`. If set, `input_content` must be unset. - # @param input_content [::String] - # The video data bytes. - # If unset, the input video(s) should be specified via the `input_uri`. - # If set, `input_uri` must be unset. - # @param features [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::Feature>] - # Required. Requested video annotation features. - # @param video_context [::Google::Cloud::VideoIntelligence::V1p3beta1::VideoContext, ::Hash] - # Additional video context and/or feature-specific parameters. - # @param output_uri [::String] - # Optional. Location where the output (in JSON format) should be stored. - # Currently, only [Cloud Storage](https://cloud.google.com/storage/) - # URIs are supported. These must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - # more information, see [Request - # URIs](https://cloud.google.com/storage/docs/request-endpoints). - # @param location_id [::String] - # Optional. Cloud region where annotation should take place. Supported cloud - # regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no - # region is specified, the region will be determined based on video file - # 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/video_intelligence/v1p3beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest.new - # - # # Call the annotate_video method. - # result = client.annotate_video request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def annotate_video request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.annotate_video.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::VideoIntelligence::V1p3beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.annotate_video.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.annotate_video.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @video_intelligence_service_stub.annotate_video request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 VideoIntelligenceService REST API. - # - # This class represents the configuration for VideoIntelligenceService 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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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 - # # annotate_video to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.annotate_video.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.annotate_video.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 = "videointelligence.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 VideoIntelligenceService 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 `annotate_video` - # @return [::Gapic::Config::Method] - # - attr_reader :annotate_video - - # @private - def initialize parent_rpcs = nil - annotate_video_config = parent_rpcs.annotate_video if parent_rpcs.respond_to? :annotate_video - @annotate_video = ::Gapic::Config::Method.new annotate_video_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/operations.rb deleted file mode 100644 index 614ce2db4860..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_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 VideoIntelligence - module V1p3beta1 - module VideoIntelligenceService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "videointelligence.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the VideoIntelligenceService 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 VideoIntelligenceService 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::VideoIntelligence::V1p3beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1p3beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1p3beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::VideoIntelligence::V1p3beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "videointelligence.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}", - matches: [ - ["name", %r{^operations/?$}, 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{^operations(?:/.*)?$}, true] - ] - ) - 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-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/service_stub.rb deleted file mode 100644 index 011112a7e872..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest/service_stub.rb +++ /dev/null @@ -1,141 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/videointelligence/v1p3beta1/video_intelligence_pb" - -module Google - module Cloud - module VideoIntelligence - module V1p3beta1 - module VideoIntelligenceService - module Rest - ## - # REST service stub for the VideoIntelligenceService 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 annotate_video REST call - # - # @param request_pb [::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def annotate_video request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_annotate_video_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "annotate_video", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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 annotate_video REST call - # - # @param request_pb [::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_annotate_video_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1p3beta1/videos:annotate", - body: "*", - matches: [] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/videointelligence/v1p3beta1/video_intelligence_pb.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/videointelligence/v1p3beta1/video_intelligence_pb.rb deleted file mode 100644 index 218d9820781b..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/videointelligence/v1p3beta1/video_intelligence_pb.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\nAgoogle/cloud/videointelligence/v1p3beta1/video_intelligence.proto\x12(google.cloud.videointelligence.v1p3beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x8c\x02\n\x14\x41nnotateVideoRequest\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\x15\n\rinput_content\x18\x06 \x01(\x0c\x12H\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0e\x32\x31.google.cloud.videointelligence.v1p3beta1.FeatureB\x03\xe0\x41\x02\x12M\n\rvideo_context\x18\x03 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p3beta1.VideoContext\x12\x17\n\noutput_uri\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0blocation_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x80\x07\n\x0cVideoContext\x12H\n\x08segments\x18\x01 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1p3beta1.VideoSegment\x12^\n\x16label_detection_config\x18\x02 \x01(\x0b\x32>.google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig\x12i\n\x1cshot_change_detection_config\x18\x03 \x01(\x0b\x32\x43.google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig\x12s\n!explicit_content_detection_config\x18\x04 \x01(\x0b\x32H.google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig\x12\\\n\x15\x66\x61\x63\x65_detection_config\x18\x05 \x01(\x0b\x32=.google.cloud.videointelligence.v1p3beta1.FaceDetectionConfig\x12h\n\x1bspeech_transcription_config\x18\x06 \x01(\x0b\x32\x43.google.cloud.videointelligence.v1p3beta1.SpeechTranscriptionConfig\x12\\\n\x15text_detection_config\x18\x08 \x01(\x0b\x32=.google.cloud.videointelligence.v1p3beta1.TextDetectionConfig\x12`\n\x17person_detection_config\x18\x0b \x01(\x0b\x32?.google.cloud.videointelligence.v1p3beta1.PersonDetectionConfig\x12^\n\x16object_tracking_config\x18\r \x01(\x0b\x32>.google.cloud.videointelligence.v1p3beta1.ObjectTrackingConfig\"\xe4\x01\n\x14LabelDetectionConfig\x12Z\n\x14label_detection_mode\x18\x01 \x01(\x0e\x32<.google.cloud.videointelligence.v1p3beta1.LabelDetectionMode\x12\x19\n\x11stationary_camera\x18\x02 \x01(\x08\x12\r\n\x05model\x18\x03 \x01(\t\x12\"\n\x1a\x66rame_confidence_threshold\x18\x04 \x01(\x02\x12\"\n\x1avideo_confidence_threshold\x18\x05 \x01(\x02\"*\n\x19ShotChangeDetectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\"%\n\x14ObjectTrackingConfig\x12\r\n\x05model\x18\x01 \x01(\t\"/\n\x1e\x45xplicitContentDetectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\"`\n\x13\x46\x61\x63\x65\x44\x65tectionConfig\x12\r\n\x05model\x18\x01 \x01(\t\x12\x1e\n\x16include_bounding_boxes\x18\x02 \x01(\x08\x12\x1a\n\x12include_attributes\x18\x05 \x01(\x08\"s\n\x15PersonDetectionConfig\x12\x1e\n\x16include_bounding_boxes\x18\x01 \x01(\x08\x12\x1e\n\x16include_pose_landmarks\x18\x02 \x01(\x08\x12\x1a\n\x12include_attributes\x18\x03 \x01(\x08\"<\n\x13TextDetectionConfig\x12\x16\n\x0elanguage_hints\x18\x01 \x03(\t\x12\r\n\x05model\x18\x02 \x01(\t\"x\n\x0cVideoSegment\x12\x34\n\x11start_time_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0f\x65nd_time_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"k\n\x0cLabelSegment\x12G\n\x07segment\x18\x01 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p3beta1.VideoSegment\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"P\n\nLabelFrame\x12.\n\x0btime_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"G\n\x06\x45ntity\x12\x11\n\tentity_id\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x15\n\rlanguage_code\x18\x03 \x01(\t\"\xb0\x02\n\x0fLabelAnnotation\x12@\n\x06\x65ntity\x18\x01 \x01(\x0b\x32\x30.google.cloud.videointelligence.v1p3beta1.Entity\x12K\n\x11\x63\x61tegory_entities\x18\x02 \x03(\x0b\x32\x30.google.cloud.videointelligence.v1p3beta1.Entity\x12H\n\x08segments\x18\x03 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1p3beta1.LabelSegment\x12\x44\n\x06\x66rames\x18\x04 \x03(\x0b\x32\x34.google.cloud.videointelligence.v1p3beta1.LabelFrame\"\x9c\x01\n\x14\x45xplicitContentFrame\x12.\n\x0btime_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12T\n\x16pornography_likelihood\x18\x02 \x01(\x0e\x32\x34.google.cloud.videointelligence.v1p3beta1.Likelihood\"k\n\x19\x45xplicitContentAnnotation\x12N\n\x06\x66rames\x18\x01 \x03(\x0b\x32>.google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame\"Q\n\x15NormalizedBoundingBox\x12\x0c\n\x04left\x18\x01 \x01(\x02\x12\x0b\n\x03top\x18\x02 \x01(\x02\x12\r\n\x05right\x18\x03 \x01(\x02\x12\x0e\n\x06\x62ottom\x18\x04 \x01(\x02\"\xcf\x02\n\x11TimestampedObject\x12`\n\x17normalized_bounding_box\x18\x01 \x01(\x0b\x32?.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox\x12.\n\x0btime_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12T\n\nattributes\x18\x03 \x03(\x0b\x32;.google.cloud.videointelligence.v1p3beta1.DetectedAttributeB\x03\xe0\x41\x01\x12R\n\tlandmarks\x18\x04 \x03(\x0b\x32:.google.cloud.videointelligence.v1p3beta1.DetectedLandmarkB\x03\xe0\x41\x01\"\x99\x02\n\x05Track\x12G\n\x07segment\x18\x01 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p3beta1.VideoSegment\x12X\n\x13timestamped_objects\x18\x02 \x03(\x0b\x32;.google.cloud.videointelligence.v1p3beta1.TimestampedObject\x12T\n\nattributes\x18\x03 \x03(\x0b\x32;.google.cloud.videointelligence.v1p3beta1.DetectedAttributeB\x03\xe0\x41\x01\x12\x17\n\nconfidence\x18\x04 \x01(\x02\x42\x03\xe0\x41\x01\"D\n\x11\x44\x65tectedAttribute\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12\r\n\x05value\x18\x03 \x01(\t\"D\n\tCelebrity\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\"\xab\x02\n\x0e\x43\x65lebrityTrack\x12\x61\n\x0b\x63\x65lebrities\x18\x01 \x03(\x0b\x32L.google.cloud.videointelligence.v1p3beta1.CelebrityTrack.RecognizedCelebrity\x12\x43\n\nface_track\x18\x03 \x01(\x0b\x32/.google.cloud.videointelligence.v1p3beta1.Track\x1aq\n\x13RecognizedCelebrity\x12\x46\n\tcelebrity\x18\x01 \x01(\x0b\x32\x33.google.cloud.videointelligence.v1p3beta1.Celebrity\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"t\n\x1e\x43\x65lebrityRecognitionAnnotation\x12R\n\x10\x63\x65lebrity_tracks\x18\x01 \x03(\x0b\x32\x38.google.cloud.videointelligence.v1p3beta1.CelebrityTrack\"\x7f\n\x10\x44\x65tectedLandmark\x12\x0c\n\x04name\x18\x01 \x01(\t\x12I\n\x05point\x18\x02 \x01(\x0b\x32:.google.cloud.videointelligence.v1p3beta1.NormalizedVertex\x12\x12\n\nconfidence\x18\x03 \x01(\x02\"m\n\x17\x46\x61\x63\x65\x44\x65tectionAnnotation\x12?\n\x06tracks\x18\x03 \x03(\x0b\x32/.google.cloud.videointelligence.v1p3beta1.Track\x12\x11\n\tthumbnail\x18\x04 \x01(\x0c\"\\\n\x19PersonDetectionAnnotation\x12?\n\x06tracks\x18\x01 \x03(\x0b\x32/.google.cloud.videointelligence.v1p3beta1.Track\"\xef\x0b\n\x16VideoAnnotationResults\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12G\n\x07segment\x18\n \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p3beta1.VideoSegment\x12\\\n\x19segment_label_annotations\x18\x02 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p3beta1.LabelAnnotation\x12\x65\n\"segment_presence_label_annotations\x18\x17 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p3beta1.LabelAnnotation\x12Y\n\x16shot_label_annotations\x18\x03 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p3beta1.LabelAnnotation\x12\x62\n\x1fshot_presence_label_annotations\x18\x18 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p3beta1.LabelAnnotation\x12Z\n\x17\x66rame_label_annotations\x18\x04 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p3beta1.LabelAnnotation\x12\x65\n\x1a\x66\x61\x63\x65_detection_annotations\x18\r \x03(\x0b\x32\x41.google.cloud.videointelligence.v1p3beta1.FaceDetectionAnnotation\x12P\n\x10shot_annotations\x18\x06 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1p3beta1.VideoSegment\x12`\n\x13\x65xplicit_annotation\x18\x07 \x01(\x0b\x32\x43.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation\x12\\\n\x15speech_transcriptions\x18\x0b \x03(\x0b\x32=.google.cloud.videointelligence.v1p3beta1.SpeechTranscription\x12R\n\x10text_annotations\x18\x0c \x03(\x0b\x32\x38.google.cloud.videointelligence.v1p3beta1.TextAnnotation\x12^\n\x12object_annotations\x18\x0e \x03(\x0b\x32\x42.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation\x12i\n\x1clogo_recognition_annotations\x18\x13 \x03(\x0b\x32\x43.google.cloud.videointelligence.v1p3beta1.LogoRecognitionAnnotation\x12i\n\x1cperson_detection_annotations\x18\x14 \x03(\x0b\x32\x43.google.cloud.videointelligence.v1p3beta1.PersonDetectionAnnotation\x12s\n!celebrity_recognition_annotations\x18\x15 \x01(\x0b\x32H.google.cloud.videointelligence.v1p3beta1.CelebrityRecognitionAnnotation\x12!\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.Status\"u\n\x15\x41nnotateVideoResponse\x12\\\n\x12\x61nnotation_results\x18\x01 \x03(\x0b\x32@.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults\"\xb4\x02\n\x17VideoAnnotationProgress\x12\x11\n\tinput_uri\x18\x01 \x01(\t\x12\x18\n\x10progress_percent\x18\x02 \x01(\x05\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x07\x66\x65\x61ture\x18\x05 \x01(\x0e\x32\x31.google.cloud.videointelligence.v1p3beta1.Feature\x12G\n\x07segment\x18\x06 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p3beta1.VideoSegment\"w\n\x15\x41nnotateVideoProgress\x12^\n\x13\x61nnotation_progress\x18\x01 \x03(\x0b\x32\x41.google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress\"\x88\x03\n\x19SpeechTranscriptionConfig\x12\x1a\n\rlanguage_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10max_alternatives\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1d\n\x10\x66ilter_profanity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12U\n\x0fspeech_contexts\x18\x04 \x03(\x0b\x32\x37.google.cloud.videointelligence.v1p3beta1.SpeechContextB\x03\xe0\x41\x01\x12)\n\x1c\x65nable_automatic_punctuation\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x19\n\x0c\x61udio_tracks\x18\x06 \x03(\x05\x42\x03\xe0\x41\x01\x12\'\n\x1a\x65nable_speaker_diarization\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12&\n\x19\x64iarization_speaker_count\x18\x08 \x01(\x05\x42\x03\xe0\x41\x01\x12#\n\x16\x65nable_word_confidence\x18\t \x01(\x08\x42\x03\xe0\x41\x01\"%\n\rSpeechContext\x12\x14\n\x07phrases\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x8f\x01\n\x13SpeechTranscription\x12\\\n\x0c\x61lternatives\x18\x01 \x03(\x0b\x32\x46.google.cloud.videointelligence.v1p3beta1.SpeechRecognitionAlternative\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\x93\x01\n\x1cSpeechRecognitionAlternative\x12\x12\n\ntranscript\x18\x01 \x01(\t\x12\x17\n\nconfidence\x18\x02 \x01(\x02\x42\x03\xe0\x41\x03\x12\x46\n\x05words\x18\x03 \x03(\x0b\x32\x32.google.cloud.videointelligence.v1p3beta1.WordInfoB\x03\xe0\x41\x03\"\xa7\x01\n\x08WordInfo\x12-\n\nstart_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12+\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0c\n\x04word\x18\x03 \x01(\t\x12\x17\n\nconfidence\x18\x04 \x01(\x02\x42\x03\xe0\x41\x03\x12\x18\n\x0bspeaker_tag\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\"(\n\x10NormalizedVertex\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\"f\n\x16NormalizedBoundingPoly\x12L\n\x08vertices\x18\x01 \x03(\x0b\x32:.google.cloud.videointelligence.v1p3beta1.NormalizedVertex\"\xaf\x01\n\x0bTextSegment\x12G\n\x07segment\x18\x01 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p3beta1.VideoSegment\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12\x43\n\x06\x66rames\x18\x03 \x03(\x0b\x32\x33.google.cloud.videointelligence.v1p3beta1.TextFrame\"\x9b\x01\n\tTextFrame\x12^\n\x14rotated_bounding_box\x18\x01 \x01(\x0b\x32@.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly\x12.\n\x0btime_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"g\n\x0eTextAnnotation\x12\x0c\n\x04text\x18\x01 \x01(\t\x12G\n\x08segments\x18\x02 \x03(\x0b\x32\x35.google.cloud.videointelligence.v1p3beta1.TextSegment\"\xa7\x01\n\x13ObjectTrackingFrame\x12`\n\x17normalized_bounding_box\x18\x01 \x01(\x0b\x32?.google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox\x12.\n\x0btime_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xac\x02\n\x18ObjectTrackingAnnotation\x12I\n\x07segment\x18\x03 \x01(\x0b\x32\x36.google.cloud.videointelligence.v1p3beta1.VideoSegmentH\x00\x12\x12\n\x08track_id\x18\x05 \x01(\x03H\x00\x12@\n\x06\x65ntity\x18\x01 \x01(\x0b\x32\x30.google.cloud.videointelligence.v1p3beta1.Entity\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x12M\n\x06\x66rames\x18\x02 \x03(\x0b\x32=.google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrameB\x0c\n\ntrack_info\"\xe8\x01\n\x19LogoRecognitionAnnotation\x12@\n\x06\x65ntity\x18\x01 \x01(\x0b\x32\x30.google.cloud.videointelligence.v1p3beta1.Entity\x12?\n\x06tracks\x18\x02 \x03(\x0b\x32/.google.cloud.videointelligence.v1p3beta1.Track\x12H\n\x08segments\x18\x03 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1p3beta1.VideoSegment\"\xa5\x01\n\x1dStreamingAnnotateVideoRequest\x12V\n\x0cvideo_config\x18\x01 \x01(\x0b\x32>.google.cloud.videointelligence.v1p3beta1.StreamingVideoConfigH\x00\x12\x17\n\rinput_content\x18\x02 \x01(\x0cH\x00\x42\x13\n\x11streaming_request\"\x8a\x08\n\x14StreamingVideoConfig\x12t\n\x1cshot_change_detection_config\x18\x02 \x01(\x0b\x32L.google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfigH\x00\x12i\n\x16label_detection_config\x18\x03 \x01(\x0b\x32G.google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfigH\x00\x12~\n!explicit_content_detection_config\x18\x04 \x01(\x0b\x32Q.google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfigH\x00\x12i\n\x16object_tracking_config\x18\x05 \x01(\x0b\x32G.google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfigH\x00\x12|\n automl_action_recognition_config\x18\x17 \x01(\x0b\x32P.google.cloud.videointelligence.v1p3beta1.StreamingAutomlActionRecognitionConfigH\x00\x12u\n\x1c\x61utoml_classification_config\x18\x15 \x01(\x0b\x32M.google.cloud.videointelligence.v1p3beta1.StreamingAutomlClassificationConfigH\x00\x12v\n\x1d\x61utoml_object_tracking_config\x18\x16 \x01(\x0b\x32M.google.cloud.videointelligence.v1p3beta1.StreamingAutomlObjectTrackingConfigH\x00\x12K\n\x07\x66\x65\x61ture\x18\x01 \x01(\x0e\x32:.google.cloud.videointelligence.v1p3beta1.StreamingFeature\x12X\n\x0estorage_config\x18\x1e \x01(\x0b\x32@.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfigB\x12\n\x10streaming_config\"\xca\x01\n\x1eStreamingAnnotateVideoResponse\x12!\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12\x65\n\x12\x61nnotation_results\x18\x02 \x01(\x0b\x32I.google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults\x12\x1e\n\x16\x61nnotation_results_uri\x18\x03 \x01(\t\"\x8b\x03\n\x1fStreamingVideoAnnotationResults\x12P\n\x10shot_annotations\x18\x01 \x03(\x0b\x32\x36.google.cloud.videointelligence.v1p3beta1.VideoSegment\x12T\n\x11label_annotations\x18\x02 \x03(\x0b\x32\x39.google.cloud.videointelligence.v1p3beta1.LabelAnnotation\x12`\n\x13\x65xplicit_annotation\x18\x03 \x01(\x0b\x32\x43.google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation\x12^\n\x12object_annotations\x18\x04 \x03(\x0b\x32\x42.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation\"$\n\"StreamingShotChangeDetectionConfig\":\n\x1dStreamingLabelDetectionConfig\x12\x19\n\x11stationary_camera\x18\x01 \x01(\x08\")\n\'StreamingExplicitContentDetectionConfig\"\x1f\n\x1dStreamingObjectTrackingConfig\"<\n&StreamingAutomlActionRecognitionConfig\x12\x12\n\nmodel_name\x18\x01 \x01(\t\"9\n#StreamingAutomlClassificationConfig\x12\x12\n\nmodel_name\x18\x01 \x01(\t\"9\n#StreamingAutomlObjectTrackingConfig\x12\x12\n\nmodel_name\x18\x01 \x01(\t\"o\n\x16StreamingStorageConfig\x12(\n enable_storage_annotation_result\x18\x01 \x01(\x08\x12+\n#annotation_result_storage_directory\x18\x03 \x01(\t*r\n\x12LabelDetectionMode\x12$\n LABEL_DETECTION_MODE_UNSPECIFIED\x10\x00\x12\r\n\tSHOT_MODE\x10\x01\x12\x0e\n\nFRAME_MODE\x10\x02\x12\x17\n\x13SHOT_AND_FRAME_MODE\x10\x03*t\n\nLikelihood\x12\x1a\n\x16LIKELIHOOD_UNSPECIFIED\x10\x00\x12\x11\n\rVERY_UNLIKELY\x10\x01\x12\x0c\n\x08UNLIKELY\x10\x02\x12\x0c\n\x08POSSIBLE\x10\x03\x12\n\n\x06LIKELY\x10\x04\x12\x0f\n\x0bVERY_LIKELY\x10\x05*\xb6\x02\n\x10StreamingFeature\x12!\n\x1dSTREAMING_FEATURE_UNSPECIFIED\x10\x00\x12\x1d\n\x19STREAMING_LABEL_DETECTION\x10\x01\x12#\n\x1fSTREAMING_SHOT_CHANGE_DETECTION\x10\x02\x12(\n$STREAMING_EXPLICIT_CONTENT_DETECTION\x10\x03\x12\x1d\n\x19STREAMING_OBJECT_TRACKING\x10\x04\x12\'\n#STREAMING_AUTOML_ACTION_RECOGNITION\x10\x17\x12#\n\x1fSTREAMING_AUTOML_CLASSIFICATION\x10\x15\x12$\n STREAMING_AUTOML_OBJECT_TRACKING\x10\x16*\x90\x02\n\x07\x46\x65\x61ture\x12\x17\n\x13\x46\x45\x41TURE_UNSPECIFIED\x10\x00\x12\x13\n\x0fLABEL_DETECTION\x10\x01\x12\x19\n\x15SHOT_CHANGE_DETECTION\x10\x02\x12\x1e\n\x1a\x45XPLICIT_CONTENT_DETECTION\x10\x03\x12\x12\n\x0e\x46\x41\x43\x45_DETECTION\x10\x04\x12\x18\n\x14SPEECH_TRANSCRIPTION\x10\x06\x12\x12\n\x0eTEXT_DETECTION\x10\x07\x12\x13\n\x0fOBJECT_TRACKING\x10\t\x12\x14\n\x10LOGO_RECOGNITION\x10\x0c\x12\x19\n\x15\x43\x45LEBRITY_RECOGNITION\x10\r\x12\x14\n\x10PERSON_DETECTION\x10\x0e\x32\xce\x02\n\x18VideoIntelligenceService\x12\xdb\x01\n\rAnnotateVideo\x12>.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41.\n\x15\x41nnotateVideoResponse\x12\x15\x41nnotateVideoProgress\xda\x41\x12input_uri,features\x82\xd3\xe4\x93\x02\x1f\"\x1a/v1p3beta1/videos:annotate:\x01*\x1aT\xca\x41 videointelligence.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platform2\xad\x02\n!StreamingVideoIntelligenceService\x12\xb1\x01\n\x16StreamingAnnotateVideo\x12G.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest\x1aH.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse\"\x00(\x01\x30\x01\x1aT\xca\x41 videointelligence.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xaf\x02\n,com.google.cloud.videointelligence.v1p3beta1B\x1dVideoIntelligenceServiceProtoP\x01ZZcloud.google.com/go/videointelligence/apiv1p3beta1/videointelligencepb;videointelligencepb\xaa\x02(Google.Cloud.VideoIntelligence.V1P3Beta1\xca\x02(Google\\Cloud\\VideoIntelligence\\V1p3beta1\xea\x02+Google::Cloud::VideoIntelligence::V1p3beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module VideoIntelligence - module V1p3beta1 - AnnotateVideoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest").msgclass - VideoContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.VideoContext").msgclass - LabelDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig").msgclass - ShotChangeDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig").msgclass - ObjectTrackingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.ObjectTrackingConfig").msgclass - ExplicitContentDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig").msgclass - FaceDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.FaceDetectionConfig").msgclass - PersonDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.PersonDetectionConfig").msgclass - TextDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.TextDetectionConfig").msgclass - VideoSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.VideoSegment").msgclass - LabelSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.LabelSegment").msgclass - LabelFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.LabelFrame").msgclass - Entity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.Entity").msgclass - LabelAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.LabelAnnotation").msgclass - ExplicitContentFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame").msgclass - ExplicitContentAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation").msgclass - NormalizedBoundingBox = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox").msgclass - TimestampedObject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.TimestampedObject").msgclass - Track = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.Track").msgclass - DetectedAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.DetectedAttribute").msgclass - Celebrity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.Celebrity").msgclass - CelebrityTrack = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.CelebrityTrack").msgclass - CelebrityTrack::RecognizedCelebrity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.CelebrityTrack.RecognizedCelebrity").msgclass - CelebrityRecognitionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.CelebrityRecognitionAnnotation").msgclass - DetectedLandmark = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.DetectedLandmark").msgclass - FaceDetectionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.FaceDetectionAnnotation").msgclass - PersonDetectionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.PersonDetectionAnnotation").msgclass - VideoAnnotationResults = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults").msgclass - AnnotateVideoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse").msgclass - VideoAnnotationProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress").msgclass - AnnotateVideoProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress").msgclass - SpeechTranscriptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.SpeechTranscriptionConfig").msgclass - SpeechContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.SpeechContext").msgclass - SpeechTranscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.SpeechTranscription").msgclass - SpeechRecognitionAlternative = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.SpeechRecognitionAlternative").msgclass - WordInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.WordInfo").msgclass - NormalizedVertex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.NormalizedVertex").msgclass - NormalizedBoundingPoly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly").msgclass - TextSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.TextSegment").msgclass - TextFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.TextFrame").msgclass - TextAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.TextAnnotation").msgclass - ObjectTrackingFrame = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame").msgclass - ObjectTrackingAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation").msgclass - LogoRecognitionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.LogoRecognitionAnnotation").msgclass - StreamingAnnotateVideoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest").msgclass - StreamingVideoConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig").msgclass - StreamingAnnotateVideoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse").msgclass - StreamingVideoAnnotationResults = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults").msgclass - StreamingShotChangeDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingShotChangeDetectionConfig").msgclass - StreamingLabelDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig").msgclass - StreamingExplicitContentDetectionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingExplicitContentDetectionConfig").msgclass - StreamingObjectTrackingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingObjectTrackingConfig").msgclass - StreamingAutomlActionRecognitionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingAutomlActionRecognitionConfig").msgclass - StreamingAutomlClassificationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingAutomlClassificationConfig").msgclass - StreamingAutomlObjectTrackingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingAutomlObjectTrackingConfig").msgclass - StreamingStorageConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig").msgclass - LabelDetectionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.LabelDetectionMode").enummodule - Likelihood = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.Likelihood").enummodule - StreamingFeature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.StreamingFeature").enummodule - Feature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.videointelligence.v1p3beta1.Feature").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/videointelligence/v1p3beta1/video_intelligence_services_pb.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/videointelligence/v1p3beta1/video_intelligence_services_pb.rb deleted file mode 100644 index d4175f64d70e..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/lib/google/cloud/videointelligence/v1p3beta1/video_intelligence_services_pb.rb +++ /dev/null @@ -1,66 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto for package 'Google.Cloud.VideoIntelligence.V1p3beta1' -# 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/videointelligence/v1p3beta1/video_intelligence_pb' - -module Google - module Cloud - module VideoIntelligence - module V1p3beta1 - module VideoIntelligenceService - # Service that implements the Video Intelligence API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.videointelligence.v1p3beta1.VideoIntelligenceService' - - # Performs asynchronous video annotation. Progress and results can be - # retrieved through the `google.longrunning.Operations` interface. - # `Operation.metadata` contains `AnnotateVideoProgress` (progress). - # `Operation.response` contains `AnnotateVideoResponse` (results). - rpc :AnnotateVideo, ::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - module StreamingVideoIntelligenceService - # Service that implements streaming Video Intelligence API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.videointelligence.v1p3beta1.StreamingVideoIntelligenceService' - - # Performs video annotation with bidirectional streaming: emitting results - # while sending video/audio bytes. - # This method is only available via the gRPC API (not REST). - rpc :StreamingAnnotateVideo, stream(::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest), stream(::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoResponse) - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/README.md deleted file mode 100644 index a691aaa55d46..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Video Intelligence V1p3beta1 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-video_intelligence-v1p3beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # 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. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - # - # Example: - # - # 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 - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # 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 - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # 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 - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/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-video_intelligence-v1p3beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/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-video_intelligence-v1p3beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/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-video_intelligence-v1p3beta1/proto_docs/google/cloud/videointelligence/v1p3beta1/video_intelligence.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/cloud/videointelligence/v1p3beta1/video_intelligence.rb deleted file mode 100644 index 571ca0cd3e9d..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/cloud/videointelligence/v1p3beta1/video_intelligence.rb +++ /dev/null @@ -1,1218 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module VideoIntelligence - module V1p3beta1 - # Video annotation request. - # @!attribute [rw] input_uri - # @return [::String] - # Input video location. Currently, only - # [Cloud Storage](https://cloud.google.com/storage/) URIs are - # supported. URIs must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - # more information, see [Request - # URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify - # multiple videos, a video URI may include wildcards in the `object-id`. - # Supported wildcards: '*' to match 0 or more characters; - # '?' to match 1 character. If unset, the input video should be embedded - # in the request as `input_content`. If set, `input_content` must be unset. - # @!attribute [rw] input_content - # @return [::String] - # The video data bytes. - # If unset, the input video(s) should be specified via the `input_uri`. - # If set, `input_uri` must be unset. - # @!attribute [rw] features - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::Feature>] - # Required. Requested video annotation features. - # @!attribute [rw] video_context - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::VideoContext] - # Additional video context and/or feature-specific parameters. - # @!attribute [rw] output_uri - # @return [::String] - # Optional. Location where the output (in JSON format) should be stored. - # Currently, only [Cloud Storage](https://cloud.google.com/storage/) - # URIs are supported. These must be specified in the following format: - # `gs://bucket-id/object-id` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - # more information, see [Request - # URIs](https://cloud.google.com/storage/docs/request-endpoints). - # @!attribute [rw] location_id - # @return [::String] - # Optional. Cloud region where annotation should take place. Supported cloud - # regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no - # region is specified, the region will be determined based on video file - # location. - class AnnotateVideoRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video context and/or feature-specific parameters. - # @!attribute [rw] segments - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::VideoSegment>] - # Video segments to annotate. The segments may overlap and are not required - # to be contiguous or span the whole video. If unspecified, each video is - # treated as a single segment. - # @!attribute [rw] label_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::LabelDetectionConfig] - # Config for LABEL_DETECTION. - # @!attribute [rw] shot_change_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::ShotChangeDetectionConfig] - # Config for SHOT_CHANGE_DETECTION. - # @!attribute [rw] explicit_content_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::ExplicitContentDetectionConfig] - # Config for EXPLICIT_CONTENT_DETECTION. - # @!attribute [rw] face_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::FaceDetectionConfig] - # Config for FACE_DETECTION. - # @!attribute [rw] speech_transcription_config - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::SpeechTranscriptionConfig] - # Config for SPEECH_TRANSCRIPTION. - # @!attribute [rw] text_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::TextDetectionConfig] - # Config for TEXT_DETECTION. - # @!attribute [rw] person_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::PersonDetectionConfig] - # Config for PERSON_DETECTION. - # @!attribute [rw] object_tracking_config - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::ObjectTrackingConfig] - # Config for OBJECT_TRACKING. - class VideoContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for LABEL_DETECTION. - # @!attribute [rw] label_detection_mode - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::LabelDetectionMode] - # What labels should be detected with LABEL_DETECTION, in addition to - # video-level labels or segment-level labels. - # If unspecified, defaults to `SHOT_MODE`. - # @!attribute [rw] stationary_camera - # @return [::Boolean] - # Whether the video has been shot from a stationary (i.e., non-moving) - # camera. When set to true, might improve detection accuracy for moving - # objects. Should be used with `SHOT_AND_FRAME_MODE` enabled. - # @!attribute [rw] model - # @return [::String] - # Model to use for label detection. - # Supported values: "builtin/stable" (the default if unset) and - # "builtin/latest". - # @!attribute [rw] frame_confidence_threshold - # @return [::Float] - # The confidence threshold we perform filtering on the labels from - # frame-level detection. If not set, it is set to 0.4 by default. The valid - # range for this threshold is [0.1, 0.9]. Any value set outside of this - # range will be clipped. - # Note: For best results, follow the default threshold. We will update - # the default threshold everytime when we release a new model. - # @!attribute [rw] video_confidence_threshold - # @return [::Float] - # The confidence threshold we perform filtering on the labels from - # video-level and shot-level detections. If not set, it's set to 0.3 by - # default. The valid range for this threshold is [0.1, 0.9]. Any value set - # outside of this range will be clipped. - # Note: For best results, follow the default threshold. We will update - # the default threshold everytime when we release a new model. - class LabelDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for SHOT_CHANGE_DETECTION. - # @!attribute [rw] model - # @return [::String] - # Model to use for shot change detection. - # Supported values: "builtin/stable" (the default if unset) and - # "builtin/latest". - class ShotChangeDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for OBJECT_TRACKING. - # @!attribute [rw] model - # @return [::String] - # Model to use for object tracking. - # Supported values: "builtin/stable" (the default if unset) and - # "builtin/latest". - class ObjectTrackingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for EXPLICIT_CONTENT_DETECTION. - # @!attribute [rw] model - # @return [::String] - # Model to use for explicit content detection. - # Supported values: "builtin/stable" (the default if unset) and - # "builtin/latest". - class ExplicitContentDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for FACE_DETECTION. - # @!attribute [rw] model - # @return [::String] - # Model to use for face detection. - # Supported values: "builtin/stable" (the default if unset) and - # "builtin/latest". - # @!attribute [rw] include_bounding_boxes - # @return [::Boolean] - # Whether bounding boxes are included in the face annotation output. - # @!attribute [rw] include_attributes - # @return [::Boolean] - # Whether to enable face attributes detection, such as glasses, dark_glasses, - # mouth_open etc. Ignored if 'include_bounding_boxes' is set to false. - class FaceDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for PERSON_DETECTION. - # @!attribute [rw] include_bounding_boxes - # @return [::Boolean] - # Whether bounding boxes are included in the person detection annotation - # output. - # @!attribute [rw] include_pose_landmarks - # @return [::Boolean] - # Whether to enable pose landmarks detection. Ignored if - # 'include_bounding_boxes' is set to false. - # @!attribute [rw] include_attributes - # @return [::Boolean] - # Whether to enable person attributes detection, such as cloth color (black, - # blue, etc), type (coat, dress, etc), pattern (plain, floral, etc), hair, - # etc. - # Ignored if 'include_bounding_boxes' is set to false. - class PersonDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for TEXT_DETECTION. - # @!attribute [rw] language_hints - # @return [::Array<::String>] - # Language hint can be specified if the language to be detected is known a - # priori. It can increase the accuracy of the detection. Language hint must - # be language code in BCP-47 format. - # - # Automatic language detection is performed if no hint is provided. - # @!attribute [rw] model - # @return [::String] - # Model to use for text detection. - # Supported values: "builtin/stable" (the default if unset) and - # "builtin/latest". - class TextDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video segment. - # @!attribute [rw] start_time_offset - # @return [::Google::Protobuf::Duration] - # Time-offset, relative to the beginning of the video, - # corresponding to the start of the segment (inclusive). - # @!attribute [rw] end_time_offset - # @return [::Google::Protobuf::Duration] - # Time-offset, relative to the beginning of the video, - # corresponding to the end of the segment (inclusive). - class VideoSegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video segment level annotation results for label detection. - # @!attribute [rw] segment - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::VideoSegment] - # Video segment where a label was detected. - # @!attribute [rw] confidence - # @return [::Float] - # Confidence that the label is accurate. Range: [0, 1]. - class LabelSegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video frame level annotation results for label detection. - # @!attribute [rw] time_offset - # @return [::Google::Protobuf::Duration] - # Time-offset, relative to the beginning of the video, corresponding to the - # video frame for this location. - # @!attribute [rw] confidence - # @return [::Float] - # Confidence that the label is accurate. Range: [0, 1]. - class LabelFrame - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Detected entity from video analysis. - # @!attribute [rw] entity_id - # @return [::String] - # Opaque entity ID. Some IDs may be available in - # [Google Knowledge Graph Search - # API](https://developers.google.com/knowledge-graph/). - # @!attribute [rw] description - # @return [::String] - # Textual description, e.g., `Fixed-gear bicycle`. - # @!attribute [rw] language_code - # @return [::String] - # Language code for `description` in BCP-47 format. - class Entity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Label annotation. - # @!attribute [rw] entity - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::Entity] - # Detected entity. - # @!attribute [rw] category_entities - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::Entity>] - # Common categories for the detected entity. - # For example, when the label is `Terrier`, the category is likely `dog`. And - # in some cases there might be more than one categories e.g., `Terrier` could - # also be a `pet`. - # @!attribute [rw] segments - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::LabelSegment>] - # All video segments where a label was detected. - # @!attribute [rw] frames - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::LabelFrame>] - # All video frames where a label was detected. - class LabelAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video frame level annotation results for explicit content. - # @!attribute [rw] time_offset - # @return [::Google::Protobuf::Duration] - # Time-offset, relative to the beginning of the video, corresponding to the - # video frame for this location. - # @!attribute [rw] pornography_likelihood - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::Likelihood] - # Likelihood of the pornography content.. - class ExplicitContentFrame - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Explicit content annotation (based on per-frame visual signals only). - # If no explicit content has been detected in a frame, no annotations are - # present for that frame. - # @!attribute [rw] frames - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::ExplicitContentFrame>] - # All video frames where explicit content was detected. - class ExplicitContentAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Normalized bounding box. - # The normalized vertex coordinates are relative to the original image. - # Range: [0, 1]. - # @!attribute [rw] left - # @return [::Float] - # Left X coordinate. - # @!attribute [rw] top - # @return [::Float] - # Top Y coordinate. - # @!attribute [rw] right - # @return [::Float] - # Right X coordinate. - # @!attribute [rw] bottom - # @return [::Float] - # Bottom Y coordinate. - class NormalizedBoundingBox - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # For tracking related features. - # An object at time_offset with attributes, and located with - # normalized_bounding_box. - # @!attribute [rw] normalized_bounding_box - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::NormalizedBoundingBox] - # Normalized Bounding box in a frame, where the object is located. - # @!attribute [rw] time_offset - # @return [::Google::Protobuf::Duration] - # Time-offset, relative to the beginning of the video, - # corresponding to the video frame for this object. - # @!attribute [rw] attributes - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::DetectedAttribute>] - # Optional. The attributes of the object in the bounding box. - # @!attribute [rw] landmarks - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::DetectedLandmark>] - # Optional. The detected landmarks. - class TimestampedObject - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A track of an object instance. - # @!attribute [rw] segment - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::VideoSegment] - # Video segment of a track. - # @!attribute [rw] timestamped_objects - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::TimestampedObject>] - # The object with timestamp and attributes per frame in the track. - # @!attribute [rw] attributes - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::DetectedAttribute>] - # Optional. Attributes in the track level. - # @!attribute [rw] confidence - # @return [::Float] - # Optional. The confidence score of the tracked object. - class Track - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A generic detected attribute represented by name in string format. - # @!attribute [rw] name - # @return [::String] - # The name of the attribute, for example, glasses, dark_glasses, mouth_open. - # A full list of supported type names will be provided in the document. - # @!attribute [rw] confidence - # @return [::Float] - # Detected attribute confidence. Range [0, 1]. - # @!attribute [rw] value - # @return [::String] - # Text value of the detection result. For example, the value for "HairColor" - # can be "black", "blonde", etc. - class DetectedAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Celebrity definition. - # @!attribute [rw] name - # @return [::String] - # The resource name of the celebrity. Have the format - # `video-intelligence/kg-mid` indicates a celebrity from preloaded gallery. - # kg-mid is the id in Google knowledge graph, which is unique for the - # celebrity. - # @!attribute [rw] display_name - # @return [::String] - # The celebrity name. - # @!attribute [rw] description - # @return [::String] - # Textual description of additional information about the celebrity, if - # applicable. - class Celebrity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The annotation result of a celebrity face track. RecognizedCelebrity field - # could be empty if the face track does not have any matched celebrities. - # @!attribute [rw] celebrities - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::CelebrityTrack::RecognizedCelebrity>] - # Top N match of the celebrities for the face in this track. - # @!attribute [rw] face_track - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::Track] - # A track of a person's face. - class CelebrityTrack - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The recognized celebrity with confidence score. - # @!attribute [rw] celebrity - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::Celebrity] - # The recognized celebrity. - # @!attribute [rw] confidence - # @return [::Float] - # Recognition confidence. Range [0, 1]. - class RecognizedCelebrity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Celebrity recognition annotation per video. - # @!attribute [rw] celebrity_tracks - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::CelebrityTrack>] - # The tracks detected from the input video, including recognized celebrities - # and other detected faces in the video. - class CelebrityRecognitionAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A generic detected landmark represented by name in string format and a 2D - # location. - # @!attribute [rw] name - # @return [::String] - # The name of this landmark, for example, left_hand, right_shoulder. - # @!attribute [rw] point - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::NormalizedVertex] - # The 2D point of the detected landmark using the normalized image - # coordindate system. The normalized coordinates have the range from 0 to 1. - # @!attribute [rw] confidence - # @return [::Float] - # The confidence score of the detected landmark. Range [0, 1]. - class DetectedLandmark - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Face detection annotation. - # @!attribute [rw] tracks - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::Track>] - # The face tracks with attributes. - # @!attribute [rw] thumbnail - # @return [::String] - # The thumbnail of a person's face. - class FaceDetectionAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Person detection annotation per video. - # @!attribute [rw] tracks - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::Track>] - # The detected tracks of a person. - class PersonDetectionAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotation results for a single video. - # @!attribute [rw] input_uri - # @return [::String] - # Video file location in - # [Cloud Storage](https://cloud.google.com/storage/). - # @!attribute [rw] segment - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::VideoSegment] - # Video segment on which the annotation is run. - # @!attribute [rw] segment_label_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::LabelAnnotation>] - # Topical label annotations on video level or user-specified segment level. - # There is exactly one element for each unique label. - # @!attribute [rw] segment_presence_label_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::LabelAnnotation>] - # Presence label annotations on video level or user-specified segment level. - # There is exactly one element for each unique label. Compared to the - # existing topical `segment_label_annotations`, this field presents more - # fine-grained, segment-level labels detected in video content and is made - # available only when the client sets `LabelDetectionConfig.model` to - # "builtin/latest" in the request. - # @!attribute [rw] shot_label_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::LabelAnnotation>] - # Topical label annotations on shot level. - # There is exactly one element for each unique label. - # @!attribute [rw] shot_presence_label_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::LabelAnnotation>] - # Presence label annotations on shot level. There is exactly one element for - # each unique label. Compared to the existing topical - # `shot_label_annotations`, this field presents more fine-grained, shot-level - # labels detected in video content and is made available only when the client - # sets `LabelDetectionConfig.model` to "builtin/latest" in the request. - # @!attribute [rw] frame_label_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::LabelAnnotation>] - # Label annotations on frame level. - # There is exactly one element for each unique label. - # @!attribute [rw] face_detection_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::FaceDetectionAnnotation>] - # Face detection annotations. - # @!attribute [rw] shot_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::VideoSegment>] - # Shot annotations. Each shot is represented as a video segment. - # @!attribute [rw] explicit_annotation - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::ExplicitContentAnnotation] - # Explicit content annotation. - # @!attribute [rw] speech_transcriptions - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::SpeechTranscription>] - # Speech transcription. - # @!attribute [rw] text_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::TextAnnotation>] - # OCR text detection and tracking. - # Annotations for list of detected text snippets. Each will have list of - # frame information associated with it. - # @!attribute [rw] object_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::ObjectTrackingAnnotation>] - # Annotations for list of objects detected and tracked in video. - # @!attribute [rw] logo_recognition_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::LogoRecognitionAnnotation>] - # Annotations for list of logos detected, tracked and recognized in video. - # @!attribute [rw] person_detection_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::PersonDetectionAnnotation>] - # Person detection annotations. - # @!attribute [rw] celebrity_recognition_annotations - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::CelebrityRecognitionAnnotation] - # Celebrity recognition annotations. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # If set, indicates an error. Note that for a single `AnnotateVideoRequest` - # some videos may succeed and some may fail. - class VideoAnnotationResults - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video annotation response. Included in the `response` - # field of the `Operation` returned by the `GetOperation` - # call of the `google::longrunning::Operations` service. - # @!attribute [rw] annotation_results - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::VideoAnnotationResults>] - # Annotation results for all videos specified in `AnnotateVideoRequest`. - class AnnotateVideoResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotation progress for a single video. - # @!attribute [rw] input_uri - # @return [::String] - # Video file location in - # [Cloud Storage](https://cloud.google.com/storage/). - # @!attribute [rw] progress_percent - # @return [::Integer] - # Approximate percentage processed thus far. Guaranteed to be - # 100 when fully processed. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Time when the request was received. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Time of the most recent update. - # @!attribute [rw] feature - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::Feature] - # Specifies which feature is being tracked if the request contains more than - # one feature. - # @!attribute [rw] segment - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::VideoSegment] - # Specifies which segment is being tracked if the request contains more than - # one segment. - class VideoAnnotationProgress - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video annotation progress. Included in the `metadata` - # field of the `Operation` returned by the `GetOperation` - # call of the `google::longrunning::Operations` service. - # @!attribute [rw] annotation_progress - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::VideoAnnotationProgress>] - # Progress metadata for all videos specified in `AnnotateVideoRequest`. - class AnnotateVideoProgress - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for SPEECH_TRANSCRIPTION. - # @!attribute [rw] language_code - # @return [::String] - # Required. *Required* The language of the supplied audio as a - # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - # Example: "en-US". - # See [Language Support](https://cloud.google.com/speech/docs/languages) - # for a list of the currently supported language codes. - # @!attribute [rw] max_alternatives - # @return [::Integer] - # Optional. Maximum number of recognition hypotheses to be returned. - # Specifically, the maximum number of `SpeechRecognitionAlternative` messages - # within each `SpeechTranscription`. The server may return fewer than - # `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will - # return a maximum of one. If omitted, will return a maximum of one. - # @!attribute [rw] filter_profanity - # @return [::Boolean] - # Optional. If set to `true`, the server will attempt to filter out - # profanities, replacing all but the initial character in each filtered word - # with asterisks, e.g. "f***". If set to `false` or omitted, profanities - # won't be filtered out. - # @!attribute [rw] speech_contexts - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::SpeechContext>] - # Optional. A means to provide context to assist the speech recognition. - # @!attribute [rw] enable_automatic_punctuation - # @return [::Boolean] - # Optional. If 'true', adds punctuation to recognition result hypotheses. - # This feature is only available in select languages. Setting this for - # requests in other languages has no effect at all. The default 'false' value - # does not add punctuation to result hypotheses. NOTE: "This is currently - # offered as an experimental service, complimentary to all users. In the - # future this may be exclusively available as a premium feature." - # @!attribute [rw] audio_tracks - # @return [::Array<::Integer>] - # Optional. For file formats, such as MXF or MKV, supporting multiple audio - # tracks, specify up to two tracks. Default: track 0. - # @!attribute [rw] enable_speaker_diarization - # @return [::Boolean] - # Optional. If 'true', enables speaker detection for each recognized word in - # the top alternative of the recognition result using a speaker_tag provided - # in the WordInfo. - # Note: When this is true, we send all the words from the beginning of the - # audio for the top alternative in every consecutive response. - # This is done in order to improve our speaker tags as our models learn to - # identify the speakers in the conversation over time. - # @!attribute [rw] diarization_speaker_count - # @return [::Integer] - # Optional. If set, specifies the estimated number of speakers in the - # conversation. If not set, defaults to '2'. Ignored unless - # enable_speaker_diarization is set to true. - # @!attribute [rw] enable_word_confidence - # @return [::Boolean] - # Optional. If `true`, the top result includes a list of words and the - # confidence for those words. If `false`, no word-level confidence - # information is returned. The default is `false`. - class SpeechTranscriptionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides "hints" to the speech recognizer to favor specific words and phrases - # in the results. - # @!attribute [rw] phrases - # @return [::Array<::String>] - # Optional. A list of strings containing words and phrases "hints" so that - # the speech recognition is more likely to recognize them. This can be used - # to improve the accuracy for specific words and phrases, for example, if - # specific commands are typically spoken by the user. This can also be used - # to add additional words to the vocabulary of the recognizer. See - # [usage limits](https://cloud.google.com/speech/limits#content). - class SpeechContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A speech recognition result corresponding to a portion of the audio. - # @!attribute [rw] alternatives - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::SpeechRecognitionAlternative>] - # May contain one or more recognition hypotheses (up to the maximum specified - # in `max_alternatives`). These alternatives are ordered in terms of - # accuracy, with the top (first) alternative being the most probable, as - # ranked by the recognizer. - # @!attribute [r] language_code - # @return [::String] - # Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - # language tag of the language in this result. This language code was - # detected to have the most likelihood of being spoken in the audio. - class SpeechTranscription - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Alternative hypotheses (a.k.a. n-best list). - # @!attribute [rw] transcript - # @return [::String] - # Transcript text representing the words that the user spoke. - # @!attribute [r] confidence - # @return [::Float] - # Output only. The confidence estimate between 0.0 and 1.0. A higher number - # indicates an estimated greater likelihood that the recognized words are - # correct. This field is set only for the top alternative. - # This field is not guaranteed to be accurate and users should not rely on it - # to be always provided. - # The default of 0.0 is a sentinel value indicating `confidence` was not set. - # @!attribute [r] words - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::WordInfo>] - # Output only. A list of word-specific information for each recognized word. - # Note: When `enable_speaker_diarization` is set to true, you will see all - # the words from the beginning of the audio. - class SpeechRecognitionAlternative - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Word-specific information for recognized words. Word information is only - # included in the response when certain request parameters are set, such - # as `enable_word_time_offsets`. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Duration] - # Time offset relative to the beginning of the audio, and - # corresponding to the start of the spoken word. This field is only set if - # `enable_word_time_offsets=true` and only in the top hypothesis. This is an - # experimental feature and the accuracy of the time offset can vary. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Duration] - # Time offset relative to the beginning of the audio, and - # corresponding to the end of the spoken word. This field is only set if - # `enable_word_time_offsets=true` and only in the top hypothesis. This is an - # experimental feature and the accuracy of the time offset can vary. - # @!attribute [rw] word - # @return [::String] - # The word corresponding to this set of information. - # @!attribute [r] confidence - # @return [::Float] - # Output only. The confidence estimate between 0.0 and 1.0. A higher number - # indicates an estimated greater likelihood that the recognized words are - # correct. This field is set only for the top alternative. - # This field is not guaranteed to be accurate and users should not rely on it - # to be always provided. - # The default of 0.0 is a sentinel value indicating `confidence` was not set. - # @!attribute [r] speaker_tag - # @return [::Integer] - # Output only. A distinct integer value is assigned for every speaker within - # the audio. This field specifies which one of those speakers was detected to - # have spoken this word. Value ranges from 1 up to diarization_speaker_count, - # and is only set if speaker diarization is enabled. - class WordInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A vertex represents a 2D point in the image. - # NOTE: the normalized vertex coordinates are relative to the original image - # and range from 0 to 1. - # @!attribute [rw] x - # @return [::Float] - # X coordinate. - # @!attribute [rw] y - # @return [::Float] - # Y coordinate. - class NormalizedVertex - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Normalized bounding polygon for text (that might not be aligned with axis). - # Contains list of the corner points in clockwise order starting from - # top-left corner. For example, for a rectangular bounding box: - # When the text is horizontal it might look like: - # 0----1 - # | | - # 3----2 - # - # When it's clockwise rotated 180 degrees around the top-left corner it - # becomes: - # 2----3 - # | | - # 1----0 - # - # and the vertex order will still be (0, 1, 2, 3). Note that values can be less - # than 0, or greater than 1 due to trignometric calculations for location of - # the box. - # @!attribute [rw] vertices - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::NormalizedVertex>] - # Normalized vertices of the bounding polygon. - class NormalizedBoundingPoly - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video segment level annotation results for text detection. - # @!attribute [rw] segment - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::VideoSegment] - # Video segment where a text snippet was detected. - # @!attribute [rw] confidence - # @return [::Float] - # Confidence for the track of detected text. It is calculated as the highest - # over all frames where OCR detected text appears. - # @!attribute [rw] frames - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::TextFrame>] - # Information related to the frames where OCR detected text appears. - class TextSegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video frame level annotation results for text annotation (OCR). - # Contains information regarding timestamp and bounding box locations for the - # frames containing detected OCR text snippets. - # @!attribute [rw] rotated_bounding_box - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::NormalizedBoundingPoly] - # Bounding polygon of the detected text for this frame. - # @!attribute [rw] time_offset - # @return [::Google::Protobuf::Duration] - # Timestamp of this frame. - class TextFrame - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotations related to one detected OCR text snippet. This will contain the - # corresponding text, confidence value, and frame level information for each - # detection. - # @!attribute [rw] text - # @return [::String] - # The detected text. - # @!attribute [rw] segments - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::TextSegment>] - # All video segments where OCR detected text appears. - class TextAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Video frame level annotations for object detection and tracking. This field - # stores per frame location, time offset, and confidence. - # @!attribute [rw] normalized_bounding_box - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::NormalizedBoundingBox] - # The normalized bounding box location of this object track for the frame. - # @!attribute [rw] time_offset - # @return [::Google::Protobuf::Duration] - # The timestamp of the frame in microseconds. - class ObjectTrackingFrame - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotations corresponding to one tracked object. - # @!attribute [rw] segment - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::VideoSegment] - # Non-streaming batch mode ONLY. - # Each object track corresponds to one video segment where it appears. - # - # Note: The following fields are mutually exclusive: `segment`, `track_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] track_id - # @return [::Integer] - # Streaming mode ONLY. - # In streaming mode, we do not know the end time of a tracked object - # before it is completed. Hence, there is no VideoSegment info returned. - # Instead, we provide a unique identifiable integer track_id so that - # the customers can correlate the results of the ongoing - # ObjectTrackAnnotation of the same track_id over time. - # - # Note: The following fields are mutually exclusive: `track_id`, `segment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] entity - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::Entity] - # Entity to specify the object category that this track is labeled as. - # @!attribute [rw] confidence - # @return [::Float] - # Object category's labeling confidence of this track. - # @!attribute [rw] frames - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::ObjectTrackingFrame>] - # Information corresponding to all frames where this object track appears. - # Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame - # messages in frames. - # Streaming mode: it can only be one ObjectTrackingFrame message in frames. - class ObjectTrackingAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotation corresponding to one detected, tracked and recognized logo class. - # @!attribute [rw] entity - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::Entity] - # Entity category information to specify the logo class that all the logo - # tracks within this LogoRecognitionAnnotation are recognized as. - # @!attribute [rw] tracks - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::Track>] - # All logo tracks where the recognized logo appears. Each track corresponds - # to one logo instance appearing in consecutive frames. - # @!attribute [rw] segments - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::VideoSegment>] - # All video segments where the recognized logo appears. There might be - # multiple instances of the same logo class appearing in one VideoSegment. - class LogoRecognitionAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The top-level message sent by the client for the `StreamingAnnotateVideo` - # method. Multiple `StreamingAnnotateVideoRequest` messages are sent. - # The first message must only contain a `StreamingVideoConfig` message. - # All subsequent messages must only contain `input_content` data. - # @!attribute [rw] video_config - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoConfig] - # Provides information to the annotator, specifing how to process the - # request. The first `AnnotateStreamingVideoRequest` message must only - # contain a `video_config` message. - # - # Note: The following fields are mutually exclusive: `video_config`, `input_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] input_content - # @return [::String] - # The video data to be annotated. Chunks of video data are sequentially - # sent in `StreamingAnnotateVideoRequest` messages. Except the initial - # `StreamingAnnotateVideoRequest` message containing only - # `video_config`, all subsequent `AnnotateStreamingVideoRequest` - # messages must only contain `input_content` field. - # Note: as with all bytes fields, protobuffers use a pure binary - # representation (not base64). - # - # Note: The following fields are mutually exclusive: `input_content`, `video_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class StreamingAnnotateVideoRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides information to the annotator that specifies how to process the - # request. - # @!attribute [rw] shot_change_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingShotChangeDetectionConfig] - # Config for STREAMING_SHOT_CHANGE_DETECTION. - # - # Note: The following fields are mutually exclusive: `shot_change_detection_config`, `label_detection_config`, `explicit_content_detection_config`, `object_tracking_config`, `automl_action_recognition_config`, `automl_classification_config`, `automl_object_tracking_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] label_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingLabelDetectionConfig] - # Config for STREAMING_LABEL_DETECTION. - # - # Note: The following fields are mutually exclusive: `label_detection_config`, `shot_change_detection_config`, `explicit_content_detection_config`, `object_tracking_config`, `automl_action_recognition_config`, `automl_classification_config`, `automl_object_tracking_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] explicit_content_detection_config - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingExplicitContentDetectionConfig] - # Config for STREAMING_EXPLICIT_CONTENT_DETECTION. - # - # Note: The following fields are mutually exclusive: `explicit_content_detection_config`, `shot_change_detection_config`, `label_detection_config`, `object_tracking_config`, `automl_action_recognition_config`, `automl_classification_config`, `automl_object_tracking_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] object_tracking_config - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingObjectTrackingConfig] - # Config for STREAMING_OBJECT_TRACKING. - # - # Note: The following fields are mutually exclusive: `object_tracking_config`, `shot_change_detection_config`, `label_detection_config`, `explicit_content_detection_config`, `automl_action_recognition_config`, `automl_classification_config`, `automl_object_tracking_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] automl_action_recognition_config - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAutomlActionRecognitionConfig] - # Config for STREAMING_AUTOML_ACTION_RECOGNITION. - # - # Note: The following fields are mutually exclusive: `automl_action_recognition_config`, `shot_change_detection_config`, `label_detection_config`, `explicit_content_detection_config`, `object_tracking_config`, `automl_classification_config`, `automl_object_tracking_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] automl_classification_config - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAutomlClassificationConfig] - # Config for STREAMING_AUTOML_CLASSIFICATION. - # - # Note: The following fields are mutually exclusive: `automl_classification_config`, `shot_change_detection_config`, `label_detection_config`, `explicit_content_detection_config`, `object_tracking_config`, `automl_action_recognition_config`, `automl_object_tracking_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] automl_object_tracking_config - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAutomlObjectTrackingConfig] - # Config for STREAMING_AUTOML_OBJECT_TRACKING. - # - # Note: The following fields are mutually exclusive: `automl_object_tracking_config`, `shot_change_detection_config`, `label_detection_config`, `explicit_content_detection_config`, `object_tracking_config`, `automl_action_recognition_config`, `automl_classification_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] feature - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingFeature] - # Requested annotation feature. - # @!attribute [rw] storage_config - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingStorageConfig] - # Streaming storage option. By default: storage is disabled. - class StreamingVideoConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `StreamingAnnotateVideoResponse` is the only message returned to the client - # by `StreamingAnnotateVideo`. A series of zero or more - # `StreamingAnnotateVideoResponse` messages are streamed back to the client. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # If set, returns a {::Google::Rpc::Status google.rpc.Status} message that - # specifies the error for the operation. - # @!attribute [rw] annotation_results - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoAnnotationResults] - # Streaming annotation results. - # @!attribute [rw] annotation_results_uri - # @return [::String] - # Google Cloud Storage(GCS) URI that stores annotation results of one - # streaming session in JSON format. - # It is the annotation_result_storage_directory - # from the request followed by '/cloud_project_number-session_id'. - class StreamingAnnotateVideoResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Streaming annotation results corresponding to a portion of the video - # that is currently being processed. - # @!attribute [rw] shot_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::VideoSegment>] - # Shot annotation results. Each shot is represented as a video segment. - # @!attribute [rw] label_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::LabelAnnotation>] - # Label annotation results. - # @!attribute [rw] explicit_annotation - # @return [::Google::Cloud::VideoIntelligence::V1p3beta1::ExplicitContentAnnotation] - # Explicit content annotation results. - # @!attribute [rw] object_annotations - # @return [::Array<::Google::Cloud::VideoIntelligence::V1p3beta1::ObjectTrackingAnnotation>] - # Object tracking results. - class StreamingVideoAnnotationResults - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for STREAMING_SHOT_CHANGE_DETECTION. - class StreamingShotChangeDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for STREAMING_LABEL_DETECTION. - # @!attribute [rw] stationary_camera - # @return [::Boolean] - # Whether the video has been captured from a stationary (i.e. non-moving) - # camera. When set to true, might improve detection accuracy for moving - # objects. Default: false. - class StreamingLabelDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for STREAMING_EXPLICIT_CONTENT_DETECTION. - class StreamingExplicitContentDetectionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for STREAMING_OBJECT_TRACKING. - class StreamingObjectTrackingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for STREAMING_AUTOML_ACTION_RECOGNITION. - # @!attribute [rw] model_name - # @return [::String] - # Resource name of AutoML model. - # Format: `projects/{project_id}/locations/{location_id}/models/{model_id}` - class StreamingAutomlActionRecognitionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for STREAMING_AUTOML_CLASSIFICATION. - # @!attribute [rw] model_name - # @return [::String] - # Resource name of AutoML model. - # Format: - # `projects/{project_number}/locations/{location_id}/models/{model_id}` - class StreamingAutomlClassificationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for STREAMING_AUTOML_OBJECT_TRACKING. - # @!attribute [rw] model_name - # @return [::String] - # Resource name of AutoML model. - # Format: `projects/{project_id}/locations/{location_id}/models/{model_id}` - class StreamingAutomlObjectTrackingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for streaming storage option. - # @!attribute [rw] enable_storage_annotation_result - # @return [::Boolean] - # Enable streaming storage. Default: false. - # @!attribute [rw] annotation_result_storage_directory - # @return [::String] - # Cloud Storage URI to store all annotation results for one client. Client - # should specify this field as the top-level storage directory. Annotation - # results of different sessions will be put into different sub-directories - # denoted by project_name and session_id. All sub-directories will be auto - # generated by program and will be made accessible to client in response - # proto. URIs must be specified in the following format: - # `gs://bucket-id/object-id` `bucket-id` should be a valid Cloud Storage - # bucket created by client and bucket permission shall also be configured - # properly. `object-id` can be arbitrary string that make sense to client. - # Other URI formats will return error and cause Cloud Storage write failure. - class StreamingStorageConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Label detection mode. - module LabelDetectionMode - # Unspecified. - LABEL_DETECTION_MODE_UNSPECIFIED = 0 - - # Detect shot-level labels. - SHOT_MODE = 1 - - # Detect frame-level labels. - FRAME_MODE = 2 - - # Detect both shot-level and frame-level labels. - SHOT_AND_FRAME_MODE = 3 - end - - # Bucketized representation of likelihood. - module Likelihood - # Unspecified likelihood. - LIKELIHOOD_UNSPECIFIED = 0 - - # Very unlikely. - VERY_UNLIKELY = 1 - - # Unlikely. - UNLIKELY = 2 - - # Possible. - POSSIBLE = 3 - - # Likely. - LIKELY = 4 - - # Very likely. - VERY_LIKELY = 5 - end - - # Streaming video annotation feature. - module StreamingFeature - # Unspecified. - STREAMING_FEATURE_UNSPECIFIED = 0 - - # Label detection. Detect objects, such as dog or flower. - STREAMING_LABEL_DETECTION = 1 - - # Shot change detection. - STREAMING_SHOT_CHANGE_DETECTION = 2 - - # Explicit content detection. - STREAMING_EXPLICIT_CONTENT_DETECTION = 3 - - # Object detection and tracking. - STREAMING_OBJECT_TRACKING = 4 - - # Action recognition based on AutoML model. - STREAMING_AUTOML_ACTION_RECOGNITION = 23 - - # Video classification based on AutoML model. - STREAMING_AUTOML_CLASSIFICATION = 21 - - # Object detection and tracking based on AutoML model. - STREAMING_AUTOML_OBJECT_TRACKING = 22 - end - - # Video annotation feature. - module Feature - # Unspecified. - FEATURE_UNSPECIFIED = 0 - - # Label detection. Detect objects, such as dog or flower. - LABEL_DETECTION = 1 - - # Shot change detection. - SHOT_CHANGE_DETECTION = 2 - - # Explicit content detection. - EXPLICIT_CONTENT_DETECTION = 3 - - # Human face detection. - FACE_DETECTION = 4 - - # Speech transcription. - SPEECH_TRANSCRIPTION = 6 - - # OCR text detection and tracking. - TEXT_DETECTION = 7 - - # Object detection and tracking. - OBJECT_TRACKING = 9 - - # Logo detection, tracking, and recognition. - LOGO_RECOGNITION = 12 - - # Celebrity recognition. - CELEBRITY_RECOGNITION = 13 - - # Person detection. - PERSON_DETECTION = 14 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/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-video_intelligence-v1p3beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/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-video_intelligence-v1p3beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/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-video_intelligence-v1p3beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/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-video_intelligence-v1p3beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/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-video_intelligence-v1p3beta1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/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-video_intelligence-v1p3beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/Gemfile deleted file mode 100644 index 0ee93eb7f8a8..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/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-video_intelligence-v1p3beta1", path: "../" -else - gem "google-cloud-video_intelligence-v1p3beta1" -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-video_intelligence-v1p3beta1/snippets/snippet_metadata_google.cloud.videointelligence.v1p3beta1.json b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/snippet_metadata_google.cloud.videointelligence.v1p3beta1.json deleted file mode 100644 index 2a7adfe7c1fe..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/snippet_metadata_google.cloud.videointelligence.v1p3beta1.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-video_intelligence-v1p3beta1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.videointelligence.v1p3beta1", - "version": "v1p3beta1" - } - ] - }, - "snippets": [ - { - "region_tag": "videointelligence_v1p3beta1_generated_VideoIntelligenceService_AnnotateVideo_sync", - "title": "Snippet for the annotate_video call in the VideoIntelligenceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client#annotate_video.", - "file": "video_intelligence_service/annotate_video.rb", - "language": "RUBY", - "client_method": { - "short_name": "annotate_video", - "full_name": "::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client#annotate_video", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "VideoIntelligenceService::Client", - "full_name": "::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client" - }, - "method": { - "short_name": "AnnotateVideo", - "full_name": "google.cloud.videointelligence.v1p3beta1.VideoIntelligenceService.AnnotateVideo", - "service": { - "short_name": "VideoIntelligenceService", - "full_name": "google.cloud.videointelligence.v1p3beta1.VideoIntelligenceService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "videointelligence_v1p3beta1_generated_StreamingVideoIntelligenceService_StreamingAnnotateVideo_sync", - "title": "Snippet for the streaming_annotate_video call in the StreamingVideoIntelligenceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client#streaming_annotate_video.", - "file": "streaming_video_intelligence_service/streaming_annotate_video.rb", - "language": "RUBY", - "client_method": { - "short_name": "streaming_annotate_video", - "full_name": "::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client#streaming_annotate_video", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoResponse", - "client": { - "short_name": "StreamingVideoIntelligenceService::Client", - "full_name": "::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client" - }, - "method": { - "short_name": "StreamingAnnotateVideo", - "full_name": "google.cloud.videointelligence.v1p3beta1.StreamingVideoIntelligenceService.StreamingAnnotateVideo", - "service": { - "short_name": "StreamingVideoIntelligenceService", - "full_name": "google.cloud.videointelligence.v1p3beta1.StreamingVideoIntelligenceService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 55, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/streaming_video_intelligence_service/streaming_annotate_video.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/streaming_video_intelligence_service/streaming_annotate_video.rb deleted file mode 100644 index 935501f422fe..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/streaming_video_intelligence_service/streaming_annotate_video.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 videointelligence_v1p3beta1_generated_StreamingVideoIntelligenceService_StreamingAnnotateVideo_sync] -require "google/cloud/video_intelligence/v1p3beta1" - -## -# Snippet for the streaming_annotate_video call in the StreamingVideoIntelligenceService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client#streaming_annotate_video. -# -def streaming_annotate_video - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client.new - - # Create an input stream. - input = Gapic::StreamInput.new - - # Call the streaming_annotate_video method to start streaming. - output = client.streaming_annotate_video 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::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest.new - input << Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest.new - input.close - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoResponse - output.each do |current_response| - p current_response - end -end -# [END videointelligence_v1p3beta1_generated_StreamingVideoIntelligenceService_StreamingAnnotateVideo_sync] diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/video_intelligence_service/annotate_video.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/video_intelligence_service/annotate_video.rb deleted file mode 100644 index 91bcf248009d..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/snippets/video_intelligence_service/annotate_video.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 videointelligence_v1p3beta1_generated_VideoIntelligenceService_AnnotateVideo_sync] -require "google/cloud/video_intelligence/v1p3beta1" - -## -# Snippet for the annotate_video call in the VideoIntelligenceService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client#annotate_video. -# -def annotate_video - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest.new - - # Call the annotate_video method. - result = client.annotate_video request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END videointelligence_v1p3beta1_generated_VideoIntelligenceService_AnnotateVideo_sync] diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service_test.rb deleted file mode 100644 index 03710f9f7cf3..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service_test.rb +++ /dev/null @@ -1,193 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/videointelligence/v1p3beta1/video_intelligence_pb" -require "google/cloud/video_intelligence/v1p3beta1/streaming_video_intelligence_service" - -class ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::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_streaming_annotate_video - # Create GRPC objects. - grpc_response = ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoResponse.new - grpc_operation = GRPC::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. - video_config = {} - - streaming_annotate_video_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :streaming_annotate_video, name - assert_kind_of Enumerable, request - refute_nil options - request - end - - Gapic::ServiceStub.stub :new, streaming_annotate_video_client_stub do - # Create client - client = ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use enumerable object with hash and protobuf object. - request_hash = { video_config: video_config } - request_proto = ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest.new video_config: video_config - enum_input = [request_hash, request_proto].to_enum - client.streaming_annotate_video enum_input do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoResponse, r - end - assert_equal grpc_operation, operation - end - - # Use stream input object (from gapic-common). - request_hash = { video_config: video_config } - request_proto = ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest.new video_config: video_config - stream_input = Gapic::StreamInput.new - client.streaming_annotate_video stream_input do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoResponse, 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 = { video_config: video_config } - request_proto = ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest.new video_config: video_config - enum_input = [request_hash, request_proto].to_enum - client.streaming_annotate_video enum_input, grpc_options do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoResponse, r - end - assert_equal grpc_operation, operation - end - - # Use stream input object (from gapic-common) with options. - request_hash = { video_config: video_config } - request_proto = ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest.new video_config: video_config - stream_input = Gapic::StreamInput.new - client.streaming_annotate_video stream_input, grpc_options do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoResponse, 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, streaming_annotate_video_client_stub.call_rpc_count - streaming_annotate_video_client_stub.requests.each do |request| - request.to_a.each do |r| - assert_kind_of ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingAnnotateVideoRequest, r - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoConfig), r["video_config"] - assert_equal :video_config, r.streaming_request - end - end - 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::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::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::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::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::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::VideoIntelligence::V1p3beta1::StreamingVideoIntelligenceService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service_operations_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service_operations_test.rb deleted file mode 100644 index b7be8023dfd0..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/video_intelligence_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/videointelligence/v1p3beta1/video_intelligence_pb" -require "google/cloud/videointelligence/v1p3beta1/video_intelligence_services_pb" -require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service" - -class ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service_rest_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service_rest_test.rb deleted file mode 100644 index e65a7efeb119..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service_rest_test.rb +++ /dev/null @@ -1,158 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/videointelligence/v1p3beta1/video_intelligence_pb" -require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service/rest" - - -class ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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_annotate_video - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - input_uri = "hello world" - input_content = "hello world" - features = [:FEATURE_UNSPECIFIED] - video_context = {} - output_uri = "hello world" - location_id = "hello world" - - annotate_video_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::ServiceStub.stub :transcode_annotate_video_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, annotate_video_client_stub do - # Create client - client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.annotate_video input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.annotate_video ::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.annotate_video(::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, annotate_video_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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service_test.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service_test.rb deleted file mode 100644 index 7141d86e1c4d..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/google/cloud/video_intelligence/v1p3beta1/video_intelligence_service_test.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! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/videointelligence/v1p3beta1/video_intelligence_pb" -require "google/cloud/video_intelligence/v1p3beta1/video_intelligence_service" - -class ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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_annotate_video - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - input_uri = "hello world" - input_content = "hello world" - features = [:FEATURE_UNSPECIFIED] - video_context = {} - output_uri = "hello world" - location_id = "hello world" - - annotate_video_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :annotate_video, name - assert_kind_of ::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest, request - assert_equal "hello world", request["input_uri"] - assert_equal "hello world", request["input_content"] - assert_equal [:FEATURE_UNSPECIFIED], request["features"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoContext), request["video_context"] - assert_equal "hello world", request["output_uri"] - assert_equal "hello world", request["location_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, annotate_video_client_stub do - # Create client - client = ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video ::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video({ input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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.annotate_video(::Google::Cloud::VideoIntelligence::V1p3beta1::AnnotateVideoRequest.new(input_uri: input_uri, input_content: input_content, features: features, video_context: video_context, output_uri: output_uri, location_id: location_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, annotate_video_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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::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::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::VideoIntelligence::V1p3beta1::VideoIntelligenceService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/helper.rb b/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-video_intelligence-v1p3beta1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-vision-v1/.gitignore b/owl-bot-staging/google-cloud-vision-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-vision-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-vision-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-vision-v1/.repo-metadata.json deleted file mode 100644 index 14cf50628165..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "vision.googleapis.com", - "api_shortname": "vision", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-vision-v1/latest", - "distribution_name": "google-cloud-vision-v1", - "is_cloud": true, - "language": "ruby", - "name": "vision", - "name_pretty": "Cloud Vision V1 API", - "product_documentation": "https://cloud.google.com/vision", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Cloud Vision API allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content. Note that google-cloud-vision-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-vision instead. See the readme for more details.", - "ruby-cloud-env-prefix": "VISION", - "ruby-cloud-product-url": "https://cloud.google.com/vision", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-vision-v1/.rubocop.yml b/owl-bot-staging/google-cloud-vision-v1/.rubocop.yml deleted file mode 100644 index 94d0134a2110..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-vision-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-vision-v1.rb" diff --git a/owl-bot-staging/google-cloud-vision-v1/.toys.rb b/owl-bot-staging/google-cloud-vision-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-vision-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-vision-v1/.yardopts b/owl-bot-staging/google-cloud-vision-v1/.yardopts deleted file mode 100644 index d7051d552590..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Vision 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-vision-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-vision-v1/AUTHENTICATION.md deleted file mode 100644 index 96386136a3ed..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-vision-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-vision-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/vision/v1" - -client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/vision/v1" - -::Google::Cloud::Vision::V1::ProductSearch::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Vision::V1::ProductSearch::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-vision-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/vision/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Vision::V1::ProductSearch::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-vision-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-vision-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-vision-v1/Gemfile b/owl-bot-staging/google-cloud-vision-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-vision-v1/LICENSE.md b/owl-bot-staging/google-cloud-vision-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-vision-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-vision-v1/README.md b/owl-bot-staging/google-cloud-vision-v1/README.md deleted file mode 100644 index 76211e7edaa7..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Vision V1 API - -Integrates Google Vision features, including image labeling, face, logo, and landmark detection, optical character recognition (OCR), and detection of explicit content, into applications. - -Cloud Vision API allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content. - -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 Vision V1 API. Most users should consider using -the main client gem, -[google-cloud-vision](https://rubygems.org/gems/google-cloud-vision). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-vision-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/vision.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/vision/v1" - -client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new -request = ::Google::Cloud::Vision::V1::CreateProductSetRequest.new # (request fields as keyword arguments...) -response = client.create_product_set request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-vision-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/vision) -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/vision/v1" -require "logger" - -client = ::Google::Cloud::Vision::V1::ProductSearch::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-vision`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-vision-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-vision`. -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-vision-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-vision-v1/Rakefile b/owl-bot-staging/google-cloud-vision-v1/Rakefile deleted file mode 100644 index d701662730ed..000000000000 --- a/owl-bot-staging/google-cloud-vision-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-vision-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["VISION_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["VISION_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["VISION_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 VISION_TEST_PROJECT=test123 VISION_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/vision/v1/product_search/credentials" - ::Google::Cloud::Vision::V1::ProductSearch::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["VISION_PROJECT"] = project - ENV["VISION_TEST_PROJECT"] = project - ENV["VISION_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-vision-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-vision-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-vision-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-vision-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-vision-v1" - header "google-cloud-vision-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-vision-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-vision-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-vision-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-vision-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-vision-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-vision-v1/gapic_metadata.json deleted file mode 100644 index d773615236cd..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/gapic_metadata.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.vision.v1", - "libraryPackage": "::Google::Cloud::Vision::V1", - "services": { - "ProductSearch": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Vision::V1::ProductSearch::Client", - "rpcs": { - "CreateProductSet": { - "methods": [ - "create_product_set" - ] - }, - "ListProductSets": { - "methods": [ - "list_product_sets" - ] - }, - "GetProductSet": { - "methods": [ - "get_product_set" - ] - }, - "UpdateProductSet": { - "methods": [ - "update_product_set" - ] - }, - "DeleteProductSet": { - "methods": [ - "delete_product_set" - ] - }, - "CreateProduct": { - "methods": [ - "create_product" - ] - }, - "ListProducts": { - "methods": [ - "list_products" - ] - }, - "GetProduct": { - "methods": [ - "get_product" - ] - }, - "UpdateProduct": { - "methods": [ - "update_product" - ] - }, - "DeleteProduct": { - "methods": [ - "delete_product" - ] - }, - "CreateReferenceImage": { - "methods": [ - "create_reference_image" - ] - }, - "DeleteReferenceImage": { - "methods": [ - "delete_reference_image" - ] - }, - "ListReferenceImages": { - "methods": [ - "list_reference_images" - ] - }, - "GetReferenceImage": { - "methods": [ - "get_reference_image" - ] - }, - "AddProductToProductSet": { - "methods": [ - "add_product_to_product_set" - ] - }, - "RemoveProductFromProductSet": { - "methods": [ - "remove_product_from_product_set" - ] - }, - "ListProductsInProductSet": { - "methods": [ - "list_products_in_product_set" - ] - }, - "ImportProductSets": { - "methods": [ - "import_product_sets" - ] - }, - "PurgeProducts": { - "methods": [ - "purge_products" - ] - } - } - } - } - }, - "ImageAnnotator": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Vision::V1::ImageAnnotator::Client", - "rpcs": { - "BatchAnnotateImages": { - "methods": [ - "batch_annotate_images" - ] - }, - "BatchAnnotateFiles": { - "methods": [ - "batch_annotate_files" - ] - }, - "AsyncBatchAnnotateImages": { - "methods": [ - "async_batch_annotate_images" - ] - }, - "AsyncBatchAnnotateFiles": { - "methods": [ - "async_batch_annotate_files" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-vision-v1/google-cloud-vision-v1.gemspec b/owl-bot-staging/google-cloud-vision-v1/google-cloud-vision-v1.gemspec deleted file mode 100644 index a114f0e9a4b4..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/google-cloud-vision-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/vision/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-vision-v1" - gem.version = Google::Cloud::Vision::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Cloud Vision API allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content. Note that google-cloud-vision-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-vision instead. See the readme for more details." - gem.summary = "Integrates Google Vision features, including image labeling, face, logo, and landmark detection, optical character recognition (OCR), and detection of explicit content, into applications." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google-cloud-vision-v1.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google-cloud-vision-v1.rb deleted file mode 100644 index 8ff4e05d45fb..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google-cloud-vision-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/vision/v1" diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1.rb deleted file mode 100644 index b3608a1e85d7..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/vision/v1/product_search" -require "google/cloud/vision/v1/image_annotator" -require "google/cloud/vision/v1/version" - -module Google - module Cloud - module Vision - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/vision/v1" - # client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/vision/v1" - # client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/vision/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/geometry_pb.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/geometry_pb.rb deleted file mode 100644 index c5e7d5019963..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/geometry_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/vision/v1/geometry.proto - -require 'google/protobuf' - - -descriptor_data = "\n%google/cloud/vision/v1/geometry.proto\x12\x16google.cloud.vision.v1\"\x1e\n\x06Vertex\x12\t\n\x01x\x18\x01 \x01(\x05\x12\t\n\x01y\x18\x02 \x01(\x05\"(\n\x10NormalizedVertex\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\"\x87\x01\n\x0c\x42oundingPoly\x12\x30\n\x08vertices\x18\x01 \x03(\x0b\x32\x1e.google.cloud.vision.v1.Vertex\x12\x45\n\x13normalized_vertices\x18\x02 \x03(\x0b\x32(.google.cloud.vision.v1.NormalizedVertex\"+\n\x08Position\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\x12\t\n\x01z\x18\x03 \x01(\x02\x42n\n\x1a\x63om.google.cloud.vision.v1B\rGeometryProtoP\x01Z5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Vision - module V1 - Vertex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Vertex").msgclass - NormalizedVertex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.NormalizedVertex").msgclass - BoundingPoly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.BoundingPoly").msgclass - Position = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Position").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator.rb deleted file mode 100644 index 9fd85e7dbecf..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/vision/v1/version" - -require "google/cloud/vision/v1/image_annotator/credentials" -require "google/cloud/vision/v1/image_annotator/paths" -require "google/cloud/vision/v1/image_annotator/operations" -require "google/cloud/vision/v1/image_annotator/client" -require "google/cloud/vision/v1/image_annotator/rest" - -module Google - module Cloud - module Vision - module V1 - ## - # Service that performs Google Cloud Vision API detection tasks over client - # images, such as face, landmark, logo, label, and text detection. The - # ImageAnnotator service returns detected entities from the images. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/vision/v1/image_annotator" - # client = ::Google::Cloud::Vision::V1::ImageAnnotator::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/vision/v1/image_annotator/rest" - # client = ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new - # - module ImageAnnotator - end - end - end - end -end - -helper_path = ::File.join __dir__, "image_annotator", "helpers.rb" -require "google/cloud/vision/v1/image_annotator/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/client.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/client.rb deleted file mode 100644 index c2df772dc124..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/client.rb +++ /dev/null @@ -1,874 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/vision/v1/image_annotator_pb" - -module Google - module Cloud - module Vision - module V1 - module ImageAnnotator - ## - # Client for the ImageAnnotator service. - # - # Service that performs Google Cloud Vision API detection tasks over client - # images, such as face, landmark, logo, label, and text detection. The - # ImageAnnotator service returns detected entities from the images. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "vision.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :image_annotator_stub - - ## - # Configure the ImageAnnotator Client class. - # - # See {::Google::Cloud::Vision::V1::ImageAnnotator::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ImageAnnotator clients - # ::Google::Cloud::Vision::V1::ImageAnnotator::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", "Vision", "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.batch_annotate_images.timeout = 600.0 - default_config.rpcs.batch_annotate_images.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.batch_annotate_files.timeout = 600.0 - default_config.rpcs.batch_annotate_files.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.async_batch_annotate_images.timeout = 600.0 - default_config.rpcs.async_batch_annotate_images.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.async_batch_annotate_files.timeout = 600.0 - default_config.rpcs.async_batch_annotate_files.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ImageAnnotator 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::Vision::V1::ImageAnnotator::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 - @image_annotator_stub.universe_domain - end - - ## - # Create a new ImageAnnotator client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Vision::V1::ImageAnnotator::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Vision::V1::ImageAnnotator::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ImageAnnotator 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/vision/v1/image_annotator_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 - - @image_annotator_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Vision::V1::ImageAnnotator::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 - ) - - @image_annotator_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 - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Vision::V1::ImageAnnotator::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @image_annotator_stub.logger - end - - # Service calls - - ## - # Run image detection and annotation for a batch of images. - # - # @overload batch_annotate_images(request, options = nil) - # Pass arguments to `batch_annotate_images` via a request object, either of type - # {::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_annotate_images(requests: nil, parent: nil, labels: nil) - # Pass arguments to `batch_annotate_images` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param requests [::Array<::Google::Cloud::Vision::V1::AnnotateImageRequest, ::Hash>] - # Required. Individual image annotation requests for this batch. - # @param parent [::String] - # Optional. Target project and location to make a call. - # - # Format: `projects/{project-id}/locations/{location-id}`. - # - # If no parent is specified, a region will be chosen automatically. - # - # Supported location-ids: - # `us`: USA country only, - # `asia`: East asia areas, like Japan, Taiwan, - # `eu`: The European Union. - # - # Example: `projects/project-A/locations/eu`. - # @param labels [::Hash{::String => ::String}] - # Optional. The labels with user-defined metadata for the request. - # - # Label keys and values can be no longer than 63 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # Label values are optional. Label keys must start with a letter. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Vision::V1::BatchAnnotateImagesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Vision::V1::BatchAnnotateImagesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::BatchAnnotateImagesRequest.new - # - # # Call the batch_annotate_images method. - # result = client.batch_annotate_images request - # - # # The returned object is of type Google::Cloud::Vision::V1::BatchAnnotateImagesResponse. - # p result - # - def batch_annotate_images request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest - - # Converts hash and nil to 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_annotate_images.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::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.batch_annotate_images.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_annotate_images.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @image_annotator_stub.call_rpc :batch_annotate_images, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Service that performs image detection and annotation for a batch of files. - # Now only "application/pdf", "image/tiff" and "image/gif" are supported. - # - # This service will extract at most 5 (customers can specify which 5 in - # AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each - # file provided and perform detection and annotation for each image - # extracted. - # - # @overload batch_annotate_files(request, options = nil) - # Pass arguments to `batch_annotate_files` via a request object, either of type - # {::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_annotate_files(requests: nil, parent: nil, labels: nil) - # Pass arguments to `batch_annotate_files` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param requests [::Array<::Google::Cloud::Vision::V1::AnnotateFileRequest, ::Hash>] - # Required. The list of file annotation requests. Right now we support only - # one AnnotateFileRequest in BatchAnnotateFilesRequest. - # @param parent [::String] - # Optional. Target project and location to make a call. - # - # Format: `projects/{project-id}/locations/{location-id}`. - # - # If no parent is specified, a region will be chosen automatically. - # - # Supported location-ids: - # `us`: USA country only, - # `asia`: East asia areas, like Japan, Taiwan, - # `eu`: The European Union. - # - # Example: `projects/project-A/locations/eu`. - # @param labels [::Hash{::String => ::String}] - # Optional. The labels with user-defined metadata for the request. - # - # Label keys and values can be no longer than 63 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # Label values are optional. Label keys must start with a letter. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Vision::V1::BatchAnnotateFilesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Vision::V1::BatchAnnotateFilesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::BatchAnnotateFilesRequest.new - # - # # Call the batch_annotate_files method. - # result = client.batch_annotate_files request - # - # # The returned object is of type Google::Cloud::Vision::V1::BatchAnnotateFilesResponse. - # p result - # - def batch_annotate_files request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest - - # Converts hash and nil to 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_annotate_files.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::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.batch_annotate_files.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_annotate_files.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @image_annotator_stub.call_rpc :batch_annotate_files, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Run asynchronous image detection and annotation for a list of images. - # - # Progress and results can be retrieved through the - # `google.longrunning.Operations` interface. - # `Operation.metadata` contains `OperationMetadata` (metadata). - # `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). - # - # This service will write image annotation outputs to json files in customer - # GCS bucket, each json file containing BatchAnnotateImagesResponse proto. - # - # @overload async_batch_annotate_images(request, options = nil) - # Pass arguments to `async_batch_annotate_images` via a request object, either of type - # {::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload async_batch_annotate_images(requests: nil, output_config: nil, parent: nil, labels: nil) - # Pass arguments to `async_batch_annotate_images` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param requests [::Array<::Google::Cloud::Vision::V1::AnnotateImageRequest, ::Hash>] - # Required. Individual image annotation requests for this batch. - # @param output_config [::Google::Cloud::Vision::V1::OutputConfig, ::Hash] - # Required. The desired output location and metadata (e.g. format). - # @param parent [::String] - # Optional. Target project and location to make a call. - # - # Format: `projects/{project-id}/locations/{location-id}`. - # - # If no parent is specified, a region will be chosen automatically. - # - # Supported location-ids: - # `us`: USA country only, - # `asia`: East asia areas, like Japan, Taiwan, - # `eu`: The European Union. - # - # Example: `projects/project-A/locations/eu`. - # @param labels [::Hash{::String => ::String}] - # Optional. The labels with user-defined metadata for the request. - # - # Label keys and values can be no longer than 63 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # Label values are optional. Label keys must start with a letter. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest.new - # - # # Call the async_batch_annotate_images method. - # result = client.async_batch_annotate_images request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def async_batch_annotate_images request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.async_batch_annotate_images.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::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.async_batch_annotate_images.timeout, - metadata: metadata, - retry_policy: @config.rpcs.async_batch_annotate_images.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @image_annotator_stub.call_rpc :async_batch_annotate_images, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Run asynchronous image detection and annotation for a list of generic - # files, such as PDF files, which may contain multiple pages and multiple - # images per page. Progress and results can be retrieved through the - # `google.longrunning.Operations` interface. - # `Operation.metadata` contains `OperationMetadata` (metadata). - # `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). - # - # @overload async_batch_annotate_files(request, options = nil) - # Pass arguments to `async_batch_annotate_files` via a request object, either of type - # {::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload async_batch_annotate_files(requests: nil, parent: nil, labels: nil) - # Pass arguments to `async_batch_annotate_files` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param requests [::Array<::Google::Cloud::Vision::V1::AsyncAnnotateFileRequest, ::Hash>] - # Required. Individual async file annotation requests for this batch. - # @param parent [::String] - # Optional. Target project and location to make a call. - # - # Format: `projects/{project-id}/locations/{location-id}`. - # - # If no parent is specified, a region will be chosen automatically. - # - # Supported location-ids: - # `us`: USA country only, - # `asia`: East asia areas, like Japan, Taiwan, - # `eu`: The European Union. - # - # Example: `projects/project-A/locations/eu`. - # @param labels [::Hash{::String => ::String}] - # Optional. The labels with user-defined metadata for the request. - # - # Label keys and values can be no longer than 63 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # Label values are optional. Label keys must start with a letter. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest.new - # - # # Call the async_batch_annotate_files method. - # result = client.async_batch_annotate_files request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def async_batch_annotate_files request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.async_batch_annotate_files.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::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.async_batch_annotate_files.timeout, - metadata: metadata, - retry_policy: @config.rpcs.async_batch_annotate_files.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @image_annotator_stub.call_rpc :async_batch_annotate_files, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 ImageAnnotator API. - # - # This class represents the configuration for ImageAnnotator, - # 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::Vision::V1::ImageAnnotator::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 - # # batch_annotate_images to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Vision::V1::ImageAnnotator::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.batch_annotate_images.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Vision::V1::ImageAnnotator::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.batch_annotate_images.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::Vision::V1::ImageAnnotator::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 = "vision.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 ImageAnnotator 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 `batch_annotate_images` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_annotate_images - ## - # RPC-specific configuration for `batch_annotate_files` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_annotate_files - ## - # RPC-specific configuration for `async_batch_annotate_images` - # @return [::Gapic::Config::Method] - # - attr_reader :async_batch_annotate_images - ## - # RPC-specific configuration for `async_batch_annotate_files` - # @return [::Gapic::Config::Method] - # - attr_reader :async_batch_annotate_files - - # @private - def initialize parent_rpcs = nil - batch_annotate_images_config = parent_rpcs.batch_annotate_images if parent_rpcs.respond_to? :batch_annotate_images - @batch_annotate_images = ::Gapic::Config::Method.new batch_annotate_images_config - batch_annotate_files_config = parent_rpcs.batch_annotate_files if parent_rpcs.respond_to? :batch_annotate_files - @batch_annotate_files = ::Gapic::Config::Method.new batch_annotate_files_config - async_batch_annotate_images_config = parent_rpcs.async_batch_annotate_images if parent_rpcs.respond_to? :async_batch_annotate_images - @async_batch_annotate_images = ::Gapic::Config::Method.new async_batch_annotate_images_config - async_batch_annotate_files_config = parent_rpcs.async_batch_annotate_files if parent_rpcs.respond_to? :async_batch_annotate_files - @async_batch_annotate_files = ::Gapic::Config::Method.new async_batch_annotate_files_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/credentials.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/credentials.rb deleted file mode 100644 index eadc70647265..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/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 Vision - module V1 - module ImageAnnotator - # Credentials for the ImageAnnotator API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-vision" - ] - self.env_vars = [ - "VISION_CREDENTIALS", - "VISION_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "VISION_CREDENTIALS_JSON", - "VISION_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-vision-v1/lib/google/cloud/vision/v1/image_annotator/operations.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/operations.rb deleted file mode 100644 index dc4246627b9b..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/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 Vision - module V1 - module ImageAnnotator - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "vision.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the ImageAnnotator 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 ImageAnnotator 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::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Vision::V1::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 = "vision.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-vision-v1/lib/google/cloud/vision/v1/image_annotator/paths.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/paths.rb deleted file mode 100644 index 9b56f1615b26..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/paths.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Vision - module V1 - module ImageAnnotator - # Path helper methods for the ImageAnnotator API. - module Paths - ## - # Create a fully-qualified ProductSet resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/productSets/{product_set}` - # - # @param project [String] - # @param location [String] - # @param product_set [String] - # - # @return [::String] - def product_set_path project:, location:, product_set: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/productSets/#{product_set}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest.rb deleted file mode 100644 index 6486a7f9d90d..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/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/vision/v1/version" - -require "google/cloud/vision/v1/image_annotator/credentials" -require "google/cloud/vision/v1/image_annotator/paths" -require "google/cloud/vision/v1/image_annotator/rest/operations" -require "google/cloud/vision/v1/image_annotator/rest/client" - -module Google - module Cloud - module Vision - module V1 - ## - # Service that performs Google Cloud Vision API detection tasks over client - # images, such as face, landmark, logo, label, and text detection. The - # ImageAnnotator service returns detected entities from the images. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/vision/v1/image_annotator/rest" - # client = ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new - # - module ImageAnnotator - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/vision/v1/image_annotator/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest/client.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest/client.rb deleted file mode 100644 index 5d335f788660..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest/client.rb +++ /dev/null @@ -1,835 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/vision/v1/image_annotator_pb" -require "google/cloud/vision/v1/image_annotator/rest/service_stub" - -module Google - module Cloud - module Vision - module V1 - module ImageAnnotator - module Rest - ## - # REST client for the ImageAnnotator service. - # - # Service that performs Google Cloud Vision API detection tasks over client - # images, such as face, landmark, logo, label, and text detection. The - # ImageAnnotator service returns detected entities from the images. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "vision.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :image_annotator_stub - - ## - # Configure the ImageAnnotator Client class. - # - # See {::Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ImageAnnotator clients - # ::Google::Cloud::Vision::V1::ImageAnnotator::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", "Vision", "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.batch_annotate_images.timeout = 600.0 - default_config.rpcs.batch_annotate_images.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.batch_annotate_files.timeout = 600.0 - default_config.rpcs.batch_annotate_files.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.async_batch_annotate_images.timeout = 600.0 - default_config.rpcs.async_batch_annotate_images.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.async_batch_annotate_files.timeout = 600.0 - default_config.rpcs.async_batch_annotate_files.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ImageAnnotator 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::Vision::V1::ImageAnnotator::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 - @image_annotator_stub.universe_domain - end - - ## - # Create a new ImageAnnotator REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ImageAnnotator 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::Vision::V1::ImageAnnotator::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 - - @image_annotator_stub = ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @image_annotator_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 - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Vision::V1::ImageAnnotator::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @image_annotator_stub.logger - end - - # Service calls - - ## - # Run image detection and annotation for a batch of images. - # - # @overload batch_annotate_images(request, options = nil) - # Pass arguments to `batch_annotate_images` via a request object, either of type - # {::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_annotate_images(requests: nil, parent: nil, labels: nil) - # Pass arguments to `batch_annotate_images` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param requests [::Array<::Google::Cloud::Vision::V1::AnnotateImageRequest, ::Hash>] - # Required. Individual image annotation requests for this batch. - # @param parent [::String] - # Optional. Target project and location to make a call. - # - # Format: `projects/{project-id}/locations/{location-id}`. - # - # If no parent is specified, a region will be chosen automatically. - # - # Supported location-ids: - # `us`: USA country only, - # `asia`: East asia areas, like Japan, Taiwan, - # `eu`: The European Union. - # - # Example: `projects/project-A/locations/eu`. - # @param labels [::Hash{::String => ::String}] - # Optional. The labels with user-defined metadata for the request. - # - # Label keys and values can be no longer than 63 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # Label values are optional. Label keys must start with a letter. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Vision::V1::BatchAnnotateImagesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Vision::V1::BatchAnnotateImagesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::BatchAnnotateImagesRequest.new - # - # # Call the batch_annotate_images method. - # result = client.batch_annotate_images request - # - # # The returned object is of type Google::Cloud::Vision::V1::BatchAnnotateImagesResponse. - # p result - # - def batch_annotate_images request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest - - # Converts hash and nil to an 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_annotate_images.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_annotate_images.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_annotate_images.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @image_annotator_stub.batch_annotate_images request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Service that performs image detection and annotation for a batch of files. - # Now only "application/pdf", "image/tiff" and "image/gif" are supported. - # - # This service will extract at most 5 (customers can specify which 5 in - # AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each - # file provided and perform detection and annotation for each image - # extracted. - # - # @overload batch_annotate_files(request, options = nil) - # Pass arguments to `batch_annotate_files` via a request object, either of type - # {::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_annotate_files(requests: nil, parent: nil, labels: nil) - # Pass arguments to `batch_annotate_files` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param requests [::Array<::Google::Cloud::Vision::V1::AnnotateFileRequest, ::Hash>] - # Required. The list of file annotation requests. Right now we support only - # one AnnotateFileRequest in BatchAnnotateFilesRequest. - # @param parent [::String] - # Optional. Target project and location to make a call. - # - # Format: `projects/{project-id}/locations/{location-id}`. - # - # If no parent is specified, a region will be chosen automatically. - # - # Supported location-ids: - # `us`: USA country only, - # `asia`: East asia areas, like Japan, Taiwan, - # `eu`: The European Union. - # - # Example: `projects/project-A/locations/eu`. - # @param labels [::Hash{::String => ::String}] - # Optional. The labels with user-defined metadata for the request. - # - # Label keys and values can be no longer than 63 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # Label values are optional. Label keys must start with a letter. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Vision::V1::BatchAnnotateFilesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Vision::V1::BatchAnnotateFilesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::BatchAnnotateFilesRequest.new - # - # # Call the batch_annotate_files method. - # result = client.batch_annotate_files request - # - # # The returned object is of type Google::Cloud::Vision::V1::BatchAnnotateFilesResponse. - # p result - # - def batch_annotate_files request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest - - # Converts hash and nil to an 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_annotate_files.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_annotate_files.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_annotate_files.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @image_annotator_stub.batch_annotate_files request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Run asynchronous image detection and annotation for a list of images. - # - # Progress and results can be retrieved through the - # `google.longrunning.Operations` interface. - # `Operation.metadata` contains `OperationMetadata` (metadata). - # `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). - # - # This service will write image annotation outputs to json files in customer - # GCS bucket, each json file containing BatchAnnotateImagesResponse proto. - # - # @overload async_batch_annotate_images(request, options = nil) - # Pass arguments to `async_batch_annotate_images` via a request object, either of type - # {::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload async_batch_annotate_images(requests: nil, output_config: nil, parent: nil, labels: nil) - # Pass arguments to `async_batch_annotate_images` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param requests [::Array<::Google::Cloud::Vision::V1::AnnotateImageRequest, ::Hash>] - # Required. Individual image annotation requests for this batch. - # @param output_config [::Google::Cloud::Vision::V1::OutputConfig, ::Hash] - # Required. The desired output location and metadata (e.g. format). - # @param parent [::String] - # Optional. Target project and location to make a call. - # - # Format: `projects/{project-id}/locations/{location-id}`. - # - # If no parent is specified, a region will be chosen automatically. - # - # Supported location-ids: - # `us`: USA country only, - # `asia`: East asia areas, like Japan, Taiwan, - # `eu`: The European Union. - # - # Example: `projects/project-A/locations/eu`. - # @param labels [::Hash{::String => ::String}] - # Optional. The labels with user-defined metadata for the request. - # - # Label keys and values can be no longer than 63 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # Label values are optional. Label keys must start with a letter. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest.new - # - # # Call the async_batch_annotate_images method. - # result = client.async_batch_annotate_images request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def async_batch_annotate_images request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.async_batch_annotate_images.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.async_batch_annotate_images.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.async_batch_annotate_images.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @image_annotator_stub.async_batch_annotate_images request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Run asynchronous image detection and annotation for a list of generic - # files, such as PDF files, which may contain multiple pages and multiple - # images per page. Progress and results can be retrieved through the - # `google.longrunning.Operations` interface. - # `Operation.metadata` contains `OperationMetadata` (metadata). - # `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). - # - # @overload async_batch_annotate_files(request, options = nil) - # Pass arguments to `async_batch_annotate_files` via a request object, either of type - # {::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload async_batch_annotate_files(requests: nil, parent: nil, labels: nil) - # Pass arguments to `async_batch_annotate_files` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param requests [::Array<::Google::Cloud::Vision::V1::AsyncAnnotateFileRequest, ::Hash>] - # Required. Individual async file annotation requests for this batch. - # @param parent [::String] - # Optional. Target project and location to make a call. - # - # Format: `projects/{project-id}/locations/{location-id}`. - # - # If no parent is specified, a region will be chosen automatically. - # - # Supported location-ids: - # `us`: USA country only, - # `asia`: East asia areas, like Japan, Taiwan, - # `eu`: The European Union. - # - # Example: `projects/project-A/locations/eu`. - # @param labels [::Hash{::String => ::String}] - # Optional. The labels with user-defined metadata for the request. - # - # Label keys and values can be no longer than 63 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # Label values are optional. Label keys must start with a letter. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest.new - # - # # Call the async_batch_annotate_files method. - # result = client.async_batch_annotate_files request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def async_batch_annotate_files request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.async_batch_annotate_files.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.async_batch_annotate_files.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.async_batch_annotate_files.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @image_annotator_stub.async_batch_annotate_files request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 ImageAnnotator REST API. - # - # This class represents the configuration for ImageAnnotator 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::Vision::V1::ImageAnnotator::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 - # # batch_annotate_images to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.batch_annotate_images.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.batch_annotate_images.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 = "vision.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 ImageAnnotator 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 `batch_annotate_images` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_annotate_images - ## - # RPC-specific configuration for `batch_annotate_files` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_annotate_files - ## - # RPC-specific configuration for `async_batch_annotate_images` - # @return [::Gapic::Config::Method] - # - attr_reader :async_batch_annotate_images - ## - # RPC-specific configuration for `async_batch_annotate_files` - # @return [::Gapic::Config::Method] - # - attr_reader :async_batch_annotate_files - - # @private - def initialize parent_rpcs = nil - batch_annotate_images_config = parent_rpcs.batch_annotate_images if parent_rpcs.respond_to? :batch_annotate_images - @batch_annotate_images = ::Gapic::Config::Method.new batch_annotate_images_config - batch_annotate_files_config = parent_rpcs.batch_annotate_files if parent_rpcs.respond_to? :batch_annotate_files - @batch_annotate_files = ::Gapic::Config::Method.new batch_annotate_files_config - async_batch_annotate_images_config = parent_rpcs.async_batch_annotate_images if parent_rpcs.respond_to? :async_batch_annotate_images - @async_batch_annotate_images = ::Gapic::Config::Method.new async_batch_annotate_images_config - async_batch_annotate_files_config = parent_rpcs.async_batch_annotate_files if parent_rpcs.respond_to? :async_batch_annotate_files - @async_batch_annotate_files = ::Gapic::Config::Method.new async_batch_annotate_files_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest/operations.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest/operations.rb deleted file mode 100644 index 1573ca9a6610..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest/operations.rb +++ /dev/null @@ -1,946 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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 Vision - module V1 - module ImageAnnotator - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "vision.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the ImageAnnotator 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 ImageAnnotator 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::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "vision.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}", - matches: [ - ["name", %r{^operations/?$}, 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/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^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-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest/service_stub.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest/service_stub.rb deleted file mode 100644 index 67fe142b1814..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator/rest/service_stub.rb +++ /dev/null @@ -1,385 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/vision/v1/image_annotator_pb" - -module Google - module Cloud - module Vision - module V1 - module ImageAnnotator - module Rest - ## - # REST service stub for the ImageAnnotator 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 batch_annotate_images REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Vision::V1::BatchAnnotateImagesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Vision::V1::BatchAnnotateImagesResponse] - # A result object deserialized from the server's reply - def batch_annotate_images request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_annotate_images_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_annotate_images", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Vision::V1::BatchAnnotateImagesResponse.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_annotate_files REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Vision::V1::BatchAnnotateFilesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Vision::V1::BatchAnnotateFilesResponse] - # A result object deserialized from the server's reply - def batch_annotate_files request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_annotate_files_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_annotate_files", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Vision::V1::BatchAnnotateFilesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the async_batch_annotate_images REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def async_batch_annotate_images request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_async_batch_annotate_images_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "async_batch_annotate_images", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the async_batch_annotate_files REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def async_batch_annotate_files request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_async_batch_annotate_files_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "async_batch_annotate_files", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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 batch_annotate_images REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest] - # 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_annotate_images_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/images:annotate", - body: "*", - matches: [] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/images:annotate", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/images:annotate", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_annotate_files REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest] - # 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_annotate_files_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/files:annotate", - body: "*", - matches: [] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/files:annotate", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/files:annotate", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the async_batch_annotate_images REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_async_batch_annotate_images_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/images:asyncBatchAnnotate", - body: "*", - matches: [] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/images:asyncBatchAnnotate", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/images:asyncBatchAnnotate", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the async_batch_annotate_files REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_async_batch_annotate_files_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/files:asyncBatchAnnotate", - body: "*", - matches: [] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/files:asyncBatchAnnotate", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/files:asyncBatchAnnotate", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator_pb.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator_pb.rb deleted file mode 100644 index c7084416ed81..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/image_annotator_pb.rb +++ /dev/null @@ -1,77 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/vision/v1/image_annotator.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/cloud/vision/v1/geometry_pb' -require 'google/cloud/vision/v1/product_search_pb' -require 'google/cloud/vision/v1/text_annotation_pb' -require 'google/cloud/vision/v1/web_detection_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' -require 'google/type/color_pb' -require 'google/type/latlng_pb' - - -descriptor_data = "\n,google/cloud/vision/v1/image_annotator.proto\x12\x16google.cloud.vision.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a%google/cloud/vision/v1/geometry.proto\x1a+google/cloud/vision/v1/product_search.proto\x1a,google/cloud/vision/v1/text_annotation.proto\x1a*google/cloud/vision/v1/web_detection.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x17google/type/color.proto\x1a\x18google/type/latlng.proto\"\x87\x03\n\x07\x46\x65\x61ture\x12\x32\n\x04type\x18\x01 \x01(\x0e\x32$.google.cloud.vision.v1.Feature.Type\x12\x13\n\x0bmax_results\x18\x02 \x01(\x05\x12\r\n\x05model\x18\x03 \x01(\t\"\xa3\x02\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x46\x41\x43\x45_DETECTION\x10\x01\x12\x16\n\x12LANDMARK_DETECTION\x10\x02\x12\x12\n\x0eLOGO_DETECTION\x10\x03\x12\x13\n\x0fLABEL_DETECTION\x10\x04\x12\x12\n\x0eTEXT_DETECTION\x10\x05\x12\x1b\n\x17\x44OCUMENT_TEXT_DETECTION\x10\x0b\x12\x19\n\x15SAFE_SEARCH_DETECTION\x10\x06\x12\x14\n\x10IMAGE_PROPERTIES\x10\x07\x12\x0e\n\nCROP_HINTS\x10\t\x12\x11\n\rWEB_DETECTION\x10\n\x12\x12\n\x0ePRODUCT_SEARCH\x10\x0c\x12\x17\n\x13OBJECT_LOCALIZATION\x10\x13\"7\n\x0bImageSource\x12\x15\n\rgcs_image_uri\x18\x01 \x01(\t\x12\x11\n\timage_uri\x18\x02 \x01(\t\"M\n\x05Image\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\x0c\x12\x33\n\x06source\x18\x02 \x01(\x0b\x32#.google.cloud.vision.v1.ImageSource\"\xf6\r\n\x0e\x46\x61\x63\x65\x41nnotation\x12;\n\rbounding_poly\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12>\n\x10\x66\x64_bounding_poly\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x42\n\tlandmarks\x18\x03 \x03(\x0b\x32/.google.cloud.vision.v1.FaceAnnotation.Landmark\x12\x12\n\nroll_angle\x18\x04 \x01(\x02\x12\x11\n\tpan_angle\x18\x05 \x01(\x02\x12\x12\n\ntilt_angle\x18\x06 \x01(\x02\x12\x1c\n\x14\x64\x65tection_confidence\x18\x07 \x01(\x02\x12\x1e\n\x16landmarking_confidence\x18\x08 \x01(\x02\x12:\n\x0ejoy_likelihood\x18\t \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12=\n\x11sorrow_likelihood\x18\n \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12<\n\x10\x61nger_likelihood\x18\x0b \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12?\n\x13surprise_likelihood\x18\x0c \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12\x44\n\x18under_exposed_likelihood\x18\r \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12>\n\x12\x62lurred_likelihood\x18\x0e \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12?\n\x13headwear_likelihood\x18\x0f \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x1a\xe8\x07\n\x08Landmark\x12\x42\n\x04type\x18\x03 \x01(\x0e\x32\x34.google.cloud.vision.v1.FaceAnnotation.Landmark.Type\x12\x32\n\x08position\x18\x04 \x01(\x0b\x32 .google.cloud.vision.v1.Position\"\xe3\x06\n\x04Type\x12\x14\n\x10UNKNOWN_LANDMARK\x10\x00\x12\x0c\n\x08LEFT_EYE\x10\x01\x12\r\n\tRIGHT_EYE\x10\x02\x12\x18\n\x14LEFT_OF_LEFT_EYEBROW\x10\x03\x12\x19\n\x15RIGHT_OF_LEFT_EYEBROW\x10\x04\x12\x19\n\x15LEFT_OF_RIGHT_EYEBROW\x10\x05\x12\x1a\n\x16RIGHT_OF_RIGHT_EYEBROW\x10\x06\x12\x19\n\x15MIDPOINT_BETWEEN_EYES\x10\x07\x12\x0c\n\x08NOSE_TIP\x10\x08\x12\r\n\tUPPER_LIP\x10\t\x12\r\n\tLOWER_LIP\x10\n\x12\x0e\n\nMOUTH_LEFT\x10\x0b\x12\x0f\n\x0bMOUTH_RIGHT\x10\x0c\x12\x10\n\x0cMOUTH_CENTER\x10\r\x12\x15\n\x11NOSE_BOTTOM_RIGHT\x10\x0e\x12\x14\n\x10NOSE_BOTTOM_LEFT\x10\x0f\x12\x16\n\x12NOSE_BOTTOM_CENTER\x10\x10\x12\x19\n\x15LEFT_EYE_TOP_BOUNDARY\x10\x11\x12\x19\n\x15LEFT_EYE_RIGHT_CORNER\x10\x12\x12\x1c\n\x18LEFT_EYE_BOTTOM_BOUNDARY\x10\x13\x12\x18\n\x14LEFT_EYE_LEFT_CORNER\x10\x14\x12\x1a\n\x16RIGHT_EYE_TOP_BOUNDARY\x10\x15\x12\x1a\n\x16RIGHT_EYE_RIGHT_CORNER\x10\x16\x12\x1d\n\x19RIGHT_EYE_BOTTOM_BOUNDARY\x10\x17\x12\x19\n\x15RIGHT_EYE_LEFT_CORNER\x10\x18\x12\x1f\n\x1bLEFT_EYEBROW_UPPER_MIDPOINT\x10\x19\x12 \n\x1cRIGHT_EYEBROW_UPPER_MIDPOINT\x10\x1a\x12\x14\n\x10LEFT_EAR_TRAGION\x10\x1b\x12\x15\n\x11RIGHT_EAR_TRAGION\x10\x1c\x12\x12\n\x0eLEFT_EYE_PUPIL\x10\x1d\x12\x13\n\x0fRIGHT_EYE_PUPIL\x10\x1e\x12\x15\n\x11\x46OREHEAD_GLABELLA\x10\x1f\x12\x11\n\rCHIN_GNATHION\x10 \x12\x14\n\x10\x43HIN_LEFT_GONION\x10!\x12\x15\n\x11\x43HIN_RIGHT_GONION\x10\"\x12\x15\n\x11LEFT_CHEEK_CENTER\x10#\x12\x16\n\x12RIGHT_CHEEK_CENTER\x10$\"4\n\x0cLocationInfo\x12$\n\x07lat_lng\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\"=\n\x08Property\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x14\n\x0cuint64_value\x18\x03 \x01(\x04\"\xab\x02\n\x10\x45ntityAnnotation\x12\x0b\n\x03mid\x18\x01 \x01(\t\x12\x0e\n\x06locale\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\r\n\x05score\x18\x04 \x01(\x02\x12\x16\n\nconfidence\x18\x05 \x01(\x02\x42\x02\x18\x01\x12\x12\n\ntopicality\x18\x06 \x01(\x02\x12;\n\rbounding_poly\x18\x07 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x37\n\tlocations\x18\x08 \x03(\x0b\x32$.google.cloud.vision.v1.LocationInfo\x12\x34\n\nproperties\x18\t \x03(\x0b\x32 .google.cloud.vision.v1.Property\"\x99\x01\n\x19LocalizedObjectAnnotation\x12\x0b\n\x03mid\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\r\n\x05score\x18\x04 \x01(\x02\x12;\n\rbounding_poly\x18\x05 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\"\x99\x02\n\x14SafeSearchAnnotation\x12\x31\n\x05\x61\x64ult\x18\x01 \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12\x31\n\x05spoof\x18\x02 \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12\x33\n\x07medical\x18\x03 \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12\x34\n\x08violence\x18\x04 \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12\x30\n\x04racy\x18\t \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\"a\n\x0bLatLongRect\x12(\n\x0bmin_lat_lng\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\x12(\n\x0bmax_lat_lng\x18\x02 \x01(\x0b\x32\x13.google.type.LatLng\"U\n\tColorInfo\x12!\n\x05\x63olor\x18\x01 \x01(\x0b\x32\x12.google.type.Color\x12\r\n\x05score\x18\x02 \x01(\x02\x12\x16\n\x0epixel_fraction\x18\x03 \x01(\x02\"M\n\x18\x44ominantColorsAnnotation\x12\x31\n\x06\x63olors\x18\x01 \x03(\x0b\x32!.google.cloud.vision.v1.ColorInfo\"\\\n\x0fImageProperties\x12I\n\x0f\x64ominant_colors\x18\x01 \x01(\x0b\x32\x30.google.cloud.vision.v1.DominantColorsAnnotation\"x\n\x08\x43ropHint\x12;\n\rbounding_poly\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12\x1b\n\x13importance_fraction\x18\x03 \x01(\x02\"K\n\x13\x43ropHintsAnnotation\x12\x34\n\ncrop_hints\x18\x01 \x03(\x0b\x32 .google.cloud.vision.v1.CropHint\"(\n\x0f\x43ropHintsParams\x12\x15\n\raspect_ratios\x18\x01 \x03(\x02\"5\n\x12WebDetectionParams\x12\x1f\n\x13include_geo_results\x18\x02 \x01(\x08\x42\x02\x18\x01\"c\n\x13TextDetectionParams\x12.\n&enable_text_detection_confidence_score\x18\t \x01(\x08\x12\x1c\n\x14\x61\x64vanced_ocr_options\x18\x0b \x03(\t\"\x88\x03\n\x0cImageContext\x12:\n\rlat_long_rect\x18\x01 \x01(\x0b\x32#.google.cloud.vision.v1.LatLongRect\x12\x16\n\x0elanguage_hints\x18\x02 \x03(\t\x12\x42\n\x11\x63rop_hints_params\x18\x04 \x01(\x0b\x32\'.google.cloud.vision.v1.CropHintsParams\x12J\n\x15product_search_params\x18\x05 \x01(\x0b\x32+.google.cloud.vision.v1.ProductSearchParams\x12H\n\x14web_detection_params\x18\x06 \x01(\x0b\x32*.google.cloud.vision.v1.WebDetectionParams\x12J\n\x15text_detection_params\x18\x0c \x01(\x0b\x32+.google.cloud.vision.v1.TextDetectionParams\"\xb4\x01\n\x14\x41nnotateImageRequest\x12,\n\x05image\x18\x01 \x01(\x0b\x32\x1d.google.cloud.vision.v1.Image\x12\x31\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32\x1f.google.cloud.vision.v1.Feature\x12;\n\rimage_context\x18\x03 \x01(\x0b\x32$.google.cloud.vision.v1.ImageContext\":\n\x16ImageAnnotationContext\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x13\n\x0bpage_number\x18\x02 \x01(\x05\"\xe4\x07\n\x15\x41nnotateImageResponse\x12@\n\x10\x66\x61\x63\x65_annotations\x18\x01 \x03(\x0b\x32&.google.cloud.vision.v1.FaceAnnotation\x12\x46\n\x14landmark_annotations\x18\x02 \x03(\x0b\x32(.google.cloud.vision.v1.EntityAnnotation\x12\x42\n\x10logo_annotations\x18\x03 \x03(\x0b\x32(.google.cloud.vision.v1.EntityAnnotation\x12\x43\n\x11label_annotations\x18\x04 \x03(\x0b\x32(.google.cloud.vision.v1.EntityAnnotation\x12W\n\x1clocalized_object_annotations\x18\x16 \x03(\x0b\x32\x31.google.cloud.vision.v1.LocalizedObjectAnnotation\x12\x42\n\x10text_annotations\x18\x05 \x03(\x0b\x32(.google.cloud.vision.v1.EntityAnnotation\x12\x44\n\x14\x66ull_text_annotation\x18\x0c \x01(\x0b\x32&.google.cloud.vision.v1.TextAnnotation\x12L\n\x16safe_search_annotation\x18\x06 \x01(\x0b\x32,.google.cloud.vision.v1.SafeSearchAnnotation\x12L\n\x1bimage_properties_annotation\x18\x08 \x01(\x0b\x32\'.google.cloud.vision.v1.ImageProperties\x12J\n\x15\x63rop_hints_annotation\x18\x0b \x01(\x0b\x32+.google.cloud.vision.v1.CropHintsAnnotation\x12;\n\rweb_detection\x18\r \x01(\x0b\x32$.google.cloud.vision.v1.WebDetection\x12L\n\x16product_search_results\x18\x0e \x01(\x0b\x32,.google.cloud.vision.v1.ProductSearchResults\x12!\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.Status\x12?\n\x07\x63ontext\x18\x15 \x01(\x0b\x32..google.cloud.vision.v1.ImageAnnotationContext\"\xf5\x01\n\x1a\x42\x61tchAnnotateImagesRequest\x12\x43\n\x08requests\x18\x01 \x03(\x0b\x32,.google.cloud.vision.v1.AnnotateImageRequestB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x04 \x01(\t\x12S\n\x06labels\x18\x05 \x03(\x0b\x32>.google.cloud.vision.v1.BatchAnnotateImagesRequest.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\"_\n\x1b\x42\x61tchAnnotateImagesResponse\x12@\n\tresponses\x18\x01 \x03(\x0b\x32-.google.cloud.vision.v1.AnnotateImageResponse\"\xcf\x01\n\x13\x41nnotateFileRequest\x12\x39\n\x0cinput_config\x18\x01 \x01(\x0b\x32#.google.cloud.vision.v1.InputConfig\x12\x31\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32\x1f.google.cloud.vision.v1.Feature\x12;\n\rimage_context\x18\x03 \x01(\x0b\x32$.google.cloud.vision.v1.ImageContext\x12\r\n\x05pages\x18\x04 \x03(\x05\"\xcb\x01\n\x14\x41nnotateFileResponse\x12\x39\n\x0cinput_config\x18\x01 \x01(\x0b\x32#.google.cloud.vision.v1.InputConfig\x12@\n\tresponses\x18\x02 \x03(\x0b\x32-.google.cloud.vision.v1.AnnotateImageResponse\x12\x13\n\x0btotal_pages\x18\x03 \x01(\x05\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"\xf2\x01\n\x19\x42\x61tchAnnotateFilesRequest\x12\x42\n\x08requests\x18\x01 \x03(\x0b\x32+.google.cloud.vision.v1.AnnotateFileRequestB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12R\n\x06labels\x18\x05 \x03(\x0b\x32=.google.cloud.vision.v1.BatchAnnotateFilesRequest.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\"]\n\x1a\x42\x61tchAnnotateFilesResponse\x12?\n\tresponses\x18\x01 \x03(\x0b\x32,.google.cloud.vision.v1.AnnotateFileResponse\"\x82\x02\n\x18\x41syncAnnotateFileRequest\x12\x39\n\x0cinput_config\x18\x01 \x01(\x0b\x32#.google.cloud.vision.v1.InputConfig\x12\x31\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32\x1f.google.cloud.vision.v1.Feature\x12;\n\rimage_context\x18\x03 \x01(\x0b\x32$.google.cloud.vision.v1.ImageContext\x12;\n\routput_config\x18\x04 \x01(\x0b\x32$.google.cloud.vision.v1.OutputConfig\"X\n\x19\x41syncAnnotateFileResponse\x12;\n\routput_config\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1.OutputConfig\"\xc1\x02\n\x1f\x41syncBatchAnnotateImagesRequest\x12\x43\n\x08requests\x18\x01 \x03(\x0b\x32,.google.cloud.vision.v1.AnnotateImageRequestB\x03\xe0\x41\x02\x12@\n\routput_config\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.OutputConfigB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x04 \x01(\t\x12X\n\x06labels\x18\x05 \x03(\x0b\x32\x43.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.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\"_\n AsyncBatchAnnotateImagesResponse\x12;\n\routput_config\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1.OutputConfig\"\x81\x02\n\x1e\x41syncBatchAnnotateFilesRequest\x12G\n\x08requests\x18\x01 \x03(\x0b\x32\x30.google.cloud.vision.v1.AsyncAnnotateFileRequestB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x04 \x01(\t\x12W\n\x06labels\x18\x05 \x03(\x0b\x32\x42.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.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\"g\n\x1f\x41syncBatchAnnotateFilesResponse\x12\x44\n\tresponses\x18\x01 \x03(\x0b\x32\x31.google.cloud.vision.v1.AsyncAnnotateFileResponse\"h\n\x0bInputConfig\x12\x35\n\ngcs_source\x18\x01 \x01(\x0b\x32!.google.cloud.vision.v1.GcsSource\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\x0c\x12\x11\n\tmime_type\x18\x02 \x01(\t\"c\n\x0cOutputConfig\x12?\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32&.google.cloud.vision.v1.GcsDestination\x12\x12\n\nbatch_size\x18\x02 \x01(\x05\"\x18\n\tGcsSource\x12\x0b\n\x03uri\x18\x01 \x01(\t\"\x1d\n\x0eGcsDestination\x12\x0b\n\x03uri\x18\x01 \x01(\t\"\x88\x02\n\x11OperationMetadata\x12>\n\x05state\x18\x01 \x01(\x0e\x32/.google.cloud.vision.v1.OperationMetadata.State\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43REATED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\r\n\tCANCELLED\x10\x04*e\n\nLikelihood\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x11\n\rVERY_UNLIKELY\x10\x01\x12\x0c\n\x08UNLIKELY\x10\x02\x12\x0c\n\x08POSSIBLE\x10\x03\x12\n\n\x06LIKELY\x10\x04\x12\x0f\n\x0bVERY_LIKELY\x10\x05\x32\xf5\n\n\x0eImageAnnotator\x12\x93\x02\n\x13\x42\x61tchAnnotateImages\x12\x32.google.cloud.vision.v1.BatchAnnotateImagesRequest\x1a\x33.google.cloud.vision.v1.BatchAnnotateImagesResponse\"\x92\x01\xda\x41\x08requests\x82\xd3\xe4\x93\x02\x80\x01\"\x13/v1/images:annotate:\x01*Z8\"3/v1/{parent=projects/*/locations/*}/images:annotate:\x01*Z,\"\'/v1/{parent=projects/*}/images:annotate:\x01*\x12\x8c\x02\n\x12\x42\x61tchAnnotateFiles\x12\x31.google.cloud.vision.v1.BatchAnnotateFilesRequest\x1a\x32.google.cloud.vision.v1.BatchAnnotateFilesResponse\"\x8e\x01\xda\x41\x08requests\x82\xd3\xe4\x93\x02}\"\x12/v1/files:annotate:\x01*Z7\"2/v1/{parent=projects/*/locations/*}/files:annotate:\x01*Z+\"&/v1/{parent=projects/*}/files:annotate:\x01*\x12\xeb\x02\n\x18\x41syncBatchAnnotateImages\x12\x37.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest\x1a\x1d.google.longrunning.Operation\"\xf6\x01\xca\x41\x35\n AsyncBatchAnnotateImagesResponse\x12\x11OperationMetadata\xda\x41\x16requests,output_config\x82\xd3\xe4\x93\x02\x9e\x01\"\x1d/v1/images:asyncBatchAnnotate:\x01*ZB\"=/v1/{parent=projects/*/locations/*}/images:asyncBatchAnnotate:\x01*Z6\"1/v1/{parent=projects/*}/images:asyncBatchAnnotate:\x01*\x12\xd7\x02\n\x17\x41syncBatchAnnotateFiles\x12\x36.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest\x1a\x1d.google.longrunning.Operation\"\xe4\x01\xca\x41\x34\n\x1f\x41syncBatchAnnotateFilesResponse\x12\x11OperationMetadata\xda\x41\x08requests\x82\xd3\xe4\x93\x02\x9b\x01\"\x1c/v1/files:asyncBatchAnnotate:\x01*ZA\" e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists ProductSets in an unspecified order. - # - # Possible errors: - # - # * Returns INVALID_ARGUMENT if page_size is greater than 100, or less - # than 1. - # - # @overload list_product_sets(request, options = nil) - # Pass arguments to `list_product_sets` via a request object, either of type - # {::Google::Cloud::Vision::V1::ListProductSetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::ListProductSetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_product_sets(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_product_sets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 from which ProductSets should be listed. - # - # Format is `projects/PROJECT_ID/locations/LOC_ID`. - # @param page_size [::Integer] - # The maximum number of items to return. Default 10, maximum 100. - # @param page_token [::String] - # The next_page_token returned from a previous List request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1::ProductSet>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1::ProductSet>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::ListProductSetsRequest.new - # - # # Call the list_product_sets method. - # result = client.list_product_sets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Vision::V1::ProductSet. - # p item - # end - # - def list_product_sets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::ListProductSetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_product_sets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_product_sets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_product_sets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.call_rpc :list_product_sets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @product_search_stub, :list_product_sets, 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 information associated with a ProductSet. - # - # Possible errors: - # - # * Returns NOT_FOUND if the ProductSet does not exist. - # - # @overload get_product_set(request, options = nil) - # Pass arguments to `get_product_set` via a request object, either of type - # {::Google::Cloud::Vision::V1::GetProductSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::GetProductSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_product_set(name: nil) - # Pass arguments to `get_product_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the ProductSet to get. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Vision::V1::ProductSet] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Vision::V1::ProductSet] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::GetProductSetRequest.new - # - # # Call the get_product_set method. - # result = client.get_product_set request - # - # # The returned object is of type Google::Cloud::Vision::V1::ProductSet. - # p result - # - def get_product_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::GetProductSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_product_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_product_set.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_product_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.call_rpc :get_product_set, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Makes changes to a ProductSet resource. - # Only display_name can be updated currently. - # - # Possible errors: - # - # * Returns NOT_FOUND if the ProductSet does not exist. - # * Returns INVALID_ARGUMENT if display_name is present in update_mask but - # missing from the request or longer than 4096 characters. - # - # @overload update_product_set(request, options = nil) - # Pass arguments to `update_product_set` via a request object, either of type - # {::Google::Cloud::Vision::V1::UpdateProductSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::UpdateProductSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_product_set(product_set: nil, update_mask: nil) - # Pass arguments to `update_product_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param product_set [::Google::Cloud::Vision::V1::ProductSet, ::Hash] - # Required. The ProductSet resource which replaces the one on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The {::Google::Protobuf::FieldMask FieldMask} that specifies which fields to - # update. - # If update_mask isn't specified, all mutable fields are to be updated. - # Valid mask path is `display_name`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Vision::V1::ProductSet] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Vision::V1::ProductSet] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::UpdateProductSetRequest.new - # - # # Call the update_product_set method. - # result = client.update_product_set request - # - # # The returned object is of type Google::Cloud::Vision::V1::ProductSet. - # p result - # - def update_product_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::UpdateProductSetRequest - - # Converts hash and nil to 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_product_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.product_set&.name - header_params["product_set.name"] = request.product_set.name - end - - request_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_product_set.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_product_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.call_rpc :update_product_set, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Permanently deletes a ProductSet. Products and ReferenceImages in the - # ProductSet are not deleted. - # - # The actual image files are not deleted from Google Cloud Storage. - # - # @overload delete_product_set(request, options = nil) - # Pass arguments to `delete_product_set` via a request object, either of type - # {::Google::Cloud::Vision::V1::DeleteProductSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::DeleteProductSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_product_set(name: nil) - # Pass arguments to `delete_product_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the ProductSet to delete. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_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/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::DeleteProductSetRequest.new - # - # # Call the delete_product_set method. - # result = client.delete_product_set request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_product_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::DeleteProductSetRequest - - # Converts hash and nil to 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_product_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_product_set.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_product_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.call_rpc :delete_product_set, request, 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 and returns a new product resource. - # - # Possible errors: - # - # * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 - # characters. - # * Returns INVALID_ARGUMENT if description is longer than 4096 characters. - # * Returns INVALID_ARGUMENT if product_category is missing or invalid. - # - # @overload create_product(request, options = nil) - # Pass arguments to `create_product` via a request object, either of type - # {::Google::Cloud::Vision::V1::CreateProductRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::CreateProductRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_product(parent: nil, product: nil, product_id: nil) - # Pass arguments to `create_product` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project in which the Product should be created. - # - # Format is - # `projects/PROJECT_ID/locations/LOC_ID`. - # @param product [::Google::Cloud::Vision::V1::Product, ::Hash] - # Required. The product to create. - # @param product_id [::String] - # A user-supplied resource id for this Product. If set, the server will - # attempt to use this value as the resource id. If it is already in use, an - # error is returned with code ALREADY_EXISTS. Must be at most 128 characters - # long. It cannot contain the character `/`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Vision::V1::Product] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Vision::V1::Product] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::CreateProductRequest.new - # - # # Call the create_product method. - # result = client.create_product request - # - # # The returned object is of type Google::Cloud::Vision::V1::Product. - # p result - # - def create_product request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::CreateProductRequest - - # Converts hash and nil to 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_product.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_product.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_product.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.call_rpc :create_product, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists products in an unspecified order. - # - # Possible errors: - # - # * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - # - # @overload list_products(request, options = nil) - # Pass arguments to `list_products` via a request object, either of type - # {::Google::Cloud::Vision::V1::ListProductsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::ListProductsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_products(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_products` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project OR ProductSet from which Products should be listed. - # - # Format: - # `projects/PROJECT_ID/locations/LOC_ID` - # @param page_size [::Integer] - # The maximum number of items to return. Default 10, maximum 100. - # @param page_token [::String] - # The next_page_token returned from a previous List request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1::Product>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1::Product>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::ListProductsRequest.new - # - # # Call the list_products method. - # result = client.list_products request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Vision::V1::Product. - # p item - # end - # - def list_products request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::ListProductsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_products.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_products.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_products.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.call_rpc :list_products, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @product_search_stub, :list_products, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets information associated with a Product. - # - # Possible errors: - # - # * Returns NOT_FOUND if the Product does not exist. - # - # @overload get_product(request, options = nil) - # Pass arguments to `get_product` via a request object, either of type - # {::Google::Cloud::Vision::V1::GetProductRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::GetProductRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_product(name: nil) - # Pass arguments to `get_product` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the Product to get. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Vision::V1::Product] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Vision::V1::Product] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::GetProductRequest.new - # - # # Call the get_product method. - # result = client.get_product request - # - # # The returned object is of type Google::Cloud::Vision::V1::Product. - # p result - # - def get_product request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::GetProductRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_product.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_product.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_product.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.call_rpc :get_product, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Makes changes to a Product resource. - # Only the `display_name`, `description`, and `labels` fields can be updated - # right now. - # - # If labels are updated, the change will not be reflected in queries until - # the next index time. - # - # Possible errors: - # - # * Returns NOT_FOUND if the Product does not exist. - # * Returns INVALID_ARGUMENT if display_name is present in update_mask but is - # missing from the request or longer than 4096 characters. - # * Returns INVALID_ARGUMENT if description is present in update_mask but is - # longer than 4096 characters. - # * Returns INVALID_ARGUMENT if product_category is present in update_mask. - # - # @overload update_product(request, options = nil) - # Pass arguments to `update_product` via a request object, either of type - # {::Google::Cloud::Vision::V1::UpdateProductRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::UpdateProductRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_product(product: nil, update_mask: nil) - # Pass arguments to `update_product` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param product [::Google::Cloud::Vision::V1::Product, ::Hash] - # Required. The Product resource which replaces the one on the server. - # product.name is immutable. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The {::Google::Protobuf::FieldMask FieldMask} that specifies which fields - # to update. - # If update_mask isn't specified, all mutable fields are to be updated. - # Valid mask paths include `product_labels`, `display_name`, and - # `description`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Vision::V1::Product] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Vision::V1::Product] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::UpdateProductRequest.new - # - # # Call the update_product method. - # result = client.update_product request - # - # # The returned object is of type Google::Cloud::Vision::V1::Product. - # p result - # - def update_product request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::UpdateProductRequest - - # Converts hash and nil to 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_product.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.product&.name - header_params["product.name"] = request.product.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_product.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_product.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.call_rpc :update_product, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Permanently deletes a product and its reference images. - # - # Metadata of the product and all its images will be deleted right away, but - # search queries against ProductSets containing the product may still work - # until all related caches are refreshed. - # - # @overload delete_product(request, options = nil) - # Pass arguments to `delete_product` via a request object, either of type - # {::Google::Cloud::Vision::V1::DeleteProductRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::DeleteProductRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_product(name: nil) - # Pass arguments to `delete_product` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of product to delete. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::DeleteProductRequest.new - # - # # Call the delete_product method. - # result = client.delete_product request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_product request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::DeleteProductRequest - - # Converts hash and nil to 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_product.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_product.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_product.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.call_rpc :delete_product, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates and returns a new ReferenceImage resource. - # - # The `bounding_poly` field is optional. If `bounding_poly` is not specified, - # the system will try to detect regions of interest in the image that are - # compatible with the product_category on the parent product. If it is - # specified, detection is ALWAYS skipped. The system converts polygons into - # non-rotated rectangles. - # - # Note that the pipeline will resize the image if the image resolution is too - # large to process (above 50MP). - # - # Possible errors: - # - # * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 - # characters. - # * Returns INVALID_ARGUMENT if the product does not exist. - # * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing - # compatible with the parent product's product_category is detected. - # * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - # - # @overload create_reference_image(request, options = nil) - # Pass arguments to `create_reference_image` via a request object, either of type - # {::Google::Cloud::Vision::V1::CreateReferenceImageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::CreateReferenceImageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_reference_image(parent: nil, reference_image: nil, reference_image_id: nil) - # Pass arguments to `create_reference_image` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the product in which to create the reference - # image. - # - # Format is - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - # @param reference_image [::Google::Cloud::Vision::V1::ReferenceImage, ::Hash] - # Required. The reference image to create. - # If an image ID is specified, it is ignored. - # @param reference_image_id [::String] - # A user-supplied resource id for the ReferenceImage to be added. If set, - # the server will attempt to use this value as the resource id. If it is - # already in use, an error is returned with code ALREADY_EXISTS. Must be at - # most 128 characters long. It cannot contain the character `/`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Vision::V1::ReferenceImage] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Vision::V1::ReferenceImage] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::CreateReferenceImageRequest.new - # - # # Call the create_reference_image method. - # result = client.create_reference_image request - # - # # The returned object is of type Google::Cloud::Vision::V1::ReferenceImage. - # p result - # - def create_reference_image request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::CreateReferenceImageRequest - - # Converts hash and nil to 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_reference_image.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_reference_image.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_reference_image.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.call_rpc :create_reference_image, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Permanently deletes a reference image. - # - # The image metadata will be deleted right away, but search queries - # against ProductSets containing the image may still work until all related - # caches are refreshed. - # - # The actual image files are not deleted from Google Cloud Storage. - # - # @overload delete_reference_image(request, options = nil) - # Pass arguments to `delete_reference_image` via a request object, either of type - # {::Google::Cloud::Vision::V1::DeleteReferenceImageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::DeleteReferenceImageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_reference_image(name: nil) - # Pass arguments to `delete_reference_image` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the reference image to delete. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_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/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::DeleteReferenceImageRequest.new - # - # # Call the delete_reference_image method. - # result = client.delete_reference_image request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_reference_image request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::DeleteReferenceImageRequest - - # Converts hash and nil to 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_reference_image.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_reference_image.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_reference_image.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.call_rpc :delete_reference_image, request, 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 reference images. - # - # Possible errors: - # - # * Returns NOT_FOUND if the parent product does not exist. - # * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less - # than 1. - # - # @overload list_reference_images(request, options = nil) - # Pass arguments to `list_reference_images` via a request object, either of type - # {::Google::Cloud::Vision::V1::ListReferenceImagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::ListReferenceImagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_reference_images(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_reference_images` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the product containing the reference images. - # - # Format is - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - # @param page_size [::Integer] - # The maximum number of items to return. Default 10, maximum 100. - # @param page_token [::String] - # A token identifying a page of results to be returned. This is the value - # of `nextPageToken` returned in a previous reference image list request. - # - # Defaults to the first page if not specified. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1::ReferenceImage>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1::ReferenceImage>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::ListReferenceImagesRequest.new - # - # # Call the list_reference_images method. - # result = client.list_reference_images request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Vision::V1::ReferenceImage. - # p item - # end - # - def list_reference_images request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::ListReferenceImagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_reference_images.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_reference_images.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_reference_images.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.call_rpc :list_reference_images, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @product_search_stub, :list_reference_images, 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 information associated with a ReferenceImage. - # - # Possible errors: - # - # * Returns NOT_FOUND if the specified image does not exist. - # - # @overload get_reference_image(request, options = nil) - # Pass arguments to `get_reference_image` via a request object, either of type - # {::Google::Cloud::Vision::V1::GetReferenceImageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::GetReferenceImageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_reference_image(name: nil) - # Pass arguments to `get_reference_image` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the ReferenceImage to get. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Vision::V1::ReferenceImage] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Vision::V1::ReferenceImage] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::GetReferenceImageRequest.new - # - # # Call the get_reference_image method. - # result = client.get_reference_image request - # - # # The returned object is of type Google::Cloud::Vision::V1::ReferenceImage. - # p result - # - def get_reference_image request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::GetReferenceImageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_reference_image.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_reference_image.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_reference_image.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.call_rpc :get_reference_image, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Adds a Product to the specified ProductSet. If the Product is already - # present, no change is made. - # - # One Product can be added to at most 100 ProductSets. - # - # Possible errors: - # - # * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - # - # @overload add_product_to_product_set(request, options = nil) - # Pass arguments to `add_product_to_product_set` via a request object, either of type - # {::Google::Cloud::Vision::V1::AddProductToProductSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::AddProductToProductSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload add_product_to_product_set(name: nil, product: nil) - # Pass arguments to `add_product_to_product_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for the ProductSet to modify. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - # @param product [::String] - # Required. The resource name for the Product to be added to this ProductSet. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::AddProductToProductSetRequest.new - # - # # Call the add_product_to_product_set method. - # result = client.add_product_to_product_set request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def add_product_to_product_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::AddProductToProductSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.add_product_to_product_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.add_product_to_product_set.timeout, - metadata: metadata, - retry_policy: @config.rpcs.add_product_to_product_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.call_rpc :add_product_to_product_set, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a Product from the specified ProductSet. - # - # @overload remove_product_from_product_set(request, options = nil) - # Pass arguments to `remove_product_from_product_set` via a request object, either of type - # {::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload remove_product_from_product_set(name: nil, product: nil) - # Pass arguments to `remove_product_from_product_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for the ProductSet to modify. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - # @param product [::String] - # Required. The resource name for the Product to be removed from this - # ProductSet. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest.new - # - # # Call the remove_product_from_product_set method. - # result = client.remove_product_from_product_set request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def remove_product_from_product_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.remove_product_from_product_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.remove_product_from_product_set.timeout, - metadata: metadata, - retry_policy: @config.rpcs.remove_product_from_product_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.call_rpc :remove_product_from_product_set, request, 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 Products in a ProductSet, in an unspecified order. If the - # ProductSet does not exist, the products field of the response will be - # empty. - # - # Possible errors: - # - # * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - # - # @overload list_products_in_product_set(request, options = nil) - # Pass arguments to `list_products_in_product_set` via a request object, either of type - # {::Google::Cloud::Vision::V1::ListProductsInProductSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::ListProductsInProductSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_products_in_product_set(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_products_in_product_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The ProductSet resource for which to retrieve Products. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - # @param page_size [::Integer] - # The maximum number of items to return. Default 10, maximum 100. - # @param page_token [::String] - # The next_page_token returned from a previous List request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1::Product>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1::Product>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::ListProductsInProductSetRequest.new - # - # # Call the list_products_in_product_set method. - # result = client.list_products_in_product_set request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Vision::V1::Product. - # p item - # end - # - def list_products_in_product_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::ListProductsInProductSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_products_in_product_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_products_in_product_set.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_products_in_product_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.call_rpc :list_products_in_product_set, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @product_search_stub, :list_products_in_product_set, 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 - - ## - # Asynchronous API that imports a list of reference images to specified - # product sets based on a list of image information. - # - # The {::Google::Longrunning::Operation google.longrunning.Operation} API can be - # used to keep track of the progress and results of the request. - # `Operation.metadata` contains `BatchOperationMetadata`. (progress) - # `Operation.response` contains `ImportProductSetsResponse`. (results) - # - # The input source of this method is a csv file on Google Cloud Storage. - # For the format of the csv file please see - # {::Google::Cloud::Vision::V1::ImportProductSetsGcsSource#csv_file_uri ImportProductSetsGcsSource.csv_file_uri}. - # - # @overload import_product_sets(request, options = nil) - # Pass arguments to `import_product_sets` via a request object, either of type - # {::Google::Cloud::Vision::V1::ImportProductSetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::ImportProductSetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_product_sets(parent: nil, input_config: nil) - # Pass arguments to `import_product_sets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 in which the ProductSets should be imported. - # - # Format is `projects/PROJECT_ID/locations/LOC_ID`. - # @param input_config [::Google::Cloud::Vision::V1::ImportProductSetsInputConfig, ::Hash] - # Required. The input content for the list of requests. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::ImportProductSetsRequest.new - # - # # Call the import_product_sets method. - # result = client.import_product_sets request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_product_sets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::ImportProductSetsRequest - - # Converts hash and nil to 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_product_sets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_product_sets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.import_product_sets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.call_rpc :import_product_sets, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Asynchronous API to delete all Products in a ProductSet or all Products - # that are in no ProductSet. - # - # If a Product is a member of the specified ProductSet in addition to other - # ProductSets, the Product will still be deleted. - # - # It is recommended to not delete the specified ProductSet until after this - # operation has completed. It is also recommended to not add any of the - # Products involved in the batch delete to a new ProductSet while this - # operation is running because those Products may still end up deleted. - # - # It's not possible to undo the PurgeProducts operation. Therefore, it is - # recommended to keep the csv files used in ImportProductSets (if that was - # how you originally built the Product Set) before starting PurgeProducts, in - # case you need to re-import the data after deletion. - # - # If the plan is to purge all of the Products from a ProductSet and then - # re-use the empty ProductSet to re-import new Products into the empty - # ProductSet, you must wait until the PurgeProducts operation has finished - # for that ProductSet. - # - # The {::Google::Longrunning::Operation google.longrunning.Operation} API can be - # used to keep track of the progress and results of the request. - # `Operation.metadata` contains `BatchOperationMetadata`. (progress) - # - # @overload purge_products(request, options = nil) - # Pass arguments to `purge_products` via a request object, either of type - # {::Google::Cloud::Vision::V1::PurgeProductsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::PurgeProductsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload purge_products(product_set_purge_config: nil, delete_orphan_products: nil, parent: nil, force: nil) - # Pass arguments to `purge_products` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param product_set_purge_config [::Google::Cloud::Vision::V1::ProductSetPurgeConfig, ::Hash] - # Specify which ProductSet contains the Products to be deleted. - # - # Note: The following parameters are mutually exclusive: `product_set_purge_config`, `delete_orphan_products`. 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 delete_orphan_products [::Boolean] - # If delete_orphan_products is true, all Products that are not in any - # ProductSet will be deleted. - # - # Note: The following parameters are mutually exclusive: `delete_orphan_products`, `product_set_purge_config`. 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 parent [::String] - # Required. The project and location in which the Products should be deleted. - # - # Format is `projects/PROJECT_ID/locations/LOC_ID`. - # @param force [::Boolean] - # The default value is false. Override this value to true to actually perform - # the purge. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::PurgeProductsRequest.new - # - # # Call the purge_products method. - # result = client.purge_products request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def purge_products request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::PurgeProductsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.purge_products.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.purge_products.timeout, - metadata: metadata, - retry_policy: @config.rpcs.purge_products.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.call_rpc :purge_products, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 ProductSearch API. - # - # This class represents the configuration for ProductSearch, - # 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::Vision::V1::ProductSearch::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_product_set to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Vision::V1::ProductSearch::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_product_set.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_product_set.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::Vision::V1::ProductSearch::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 = "vision.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 ProductSearch 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_product_set` - # @return [::Gapic::Config::Method] - # - attr_reader :create_product_set - ## - # RPC-specific configuration for `list_product_sets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_product_sets - ## - # RPC-specific configuration for `get_product_set` - # @return [::Gapic::Config::Method] - # - attr_reader :get_product_set - ## - # RPC-specific configuration for `update_product_set` - # @return [::Gapic::Config::Method] - # - attr_reader :update_product_set - ## - # RPC-specific configuration for `delete_product_set` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_product_set - ## - # RPC-specific configuration for `create_product` - # @return [::Gapic::Config::Method] - # - attr_reader :create_product - ## - # RPC-specific configuration for `list_products` - # @return [::Gapic::Config::Method] - # - attr_reader :list_products - ## - # RPC-specific configuration for `get_product` - # @return [::Gapic::Config::Method] - # - attr_reader :get_product - ## - # RPC-specific configuration for `update_product` - # @return [::Gapic::Config::Method] - # - attr_reader :update_product - ## - # RPC-specific configuration for `delete_product` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_product - ## - # RPC-specific configuration for `create_reference_image` - # @return [::Gapic::Config::Method] - # - attr_reader :create_reference_image - ## - # RPC-specific configuration for `delete_reference_image` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_reference_image - ## - # RPC-specific configuration for `list_reference_images` - # @return [::Gapic::Config::Method] - # - attr_reader :list_reference_images - ## - # RPC-specific configuration for `get_reference_image` - # @return [::Gapic::Config::Method] - # - attr_reader :get_reference_image - ## - # RPC-specific configuration for `add_product_to_product_set` - # @return [::Gapic::Config::Method] - # - attr_reader :add_product_to_product_set - ## - # RPC-specific configuration for `remove_product_from_product_set` - # @return [::Gapic::Config::Method] - # - attr_reader :remove_product_from_product_set - ## - # RPC-specific configuration for `list_products_in_product_set` - # @return [::Gapic::Config::Method] - # - attr_reader :list_products_in_product_set - ## - # RPC-specific configuration for `import_product_sets` - # @return [::Gapic::Config::Method] - # - attr_reader :import_product_sets - ## - # RPC-specific configuration for `purge_products` - # @return [::Gapic::Config::Method] - # - attr_reader :purge_products - - # @private - def initialize parent_rpcs = nil - create_product_set_config = parent_rpcs.create_product_set if parent_rpcs.respond_to? :create_product_set - @create_product_set = ::Gapic::Config::Method.new create_product_set_config - list_product_sets_config = parent_rpcs.list_product_sets if parent_rpcs.respond_to? :list_product_sets - @list_product_sets = ::Gapic::Config::Method.new list_product_sets_config - get_product_set_config = parent_rpcs.get_product_set if parent_rpcs.respond_to? :get_product_set - @get_product_set = ::Gapic::Config::Method.new get_product_set_config - update_product_set_config = parent_rpcs.update_product_set if parent_rpcs.respond_to? :update_product_set - @update_product_set = ::Gapic::Config::Method.new update_product_set_config - delete_product_set_config = parent_rpcs.delete_product_set if parent_rpcs.respond_to? :delete_product_set - @delete_product_set = ::Gapic::Config::Method.new delete_product_set_config - create_product_config = parent_rpcs.create_product if parent_rpcs.respond_to? :create_product - @create_product = ::Gapic::Config::Method.new create_product_config - list_products_config = parent_rpcs.list_products if parent_rpcs.respond_to? :list_products - @list_products = ::Gapic::Config::Method.new list_products_config - get_product_config = parent_rpcs.get_product if parent_rpcs.respond_to? :get_product - @get_product = ::Gapic::Config::Method.new get_product_config - update_product_config = parent_rpcs.update_product if parent_rpcs.respond_to? :update_product - @update_product = ::Gapic::Config::Method.new update_product_config - delete_product_config = parent_rpcs.delete_product if parent_rpcs.respond_to? :delete_product - @delete_product = ::Gapic::Config::Method.new delete_product_config - create_reference_image_config = parent_rpcs.create_reference_image if parent_rpcs.respond_to? :create_reference_image - @create_reference_image = ::Gapic::Config::Method.new create_reference_image_config - delete_reference_image_config = parent_rpcs.delete_reference_image if parent_rpcs.respond_to? :delete_reference_image - @delete_reference_image = ::Gapic::Config::Method.new delete_reference_image_config - list_reference_images_config = parent_rpcs.list_reference_images if parent_rpcs.respond_to? :list_reference_images - @list_reference_images = ::Gapic::Config::Method.new list_reference_images_config - get_reference_image_config = parent_rpcs.get_reference_image if parent_rpcs.respond_to? :get_reference_image - @get_reference_image = ::Gapic::Config::Method.new get_reference_image_config - add_product_to_product_set_config = parent_rpcs.add_product_to_product_set if parent_rpcs.respond_to? :add_product_to_product_set - @add_product_to_product_set = ::Gapic::Config::Method.new add_product_to_product_set_config - remove_product_from_product_set_config = parent_rpcs.remove_product_from_product_set if parent_rpcs.respond_to? :remove_product_from_product_set - @remove_product_from_product_set = ::Gapic::Config::Method.new remove_product_from_product_set_config - list_products_in_product_set_config = parent_rpcs.list_products_in_product_set if parent_rpcs.respond_to? :list_products_in_product_set - @list_products_in_product_set = ::Gapic::Config::Method.new list_products_in_product_set_config - import_product_sets_config = parent_rpcs.import_product_sets if parent_rpcs.respond_to? :import_product_sets - @import_product_sets = ::Gapic::Config::Method.new import_product_sets_config - purge_products_config = parent_rpcs.purge_products if parent_rpcs.respond_to? :purge_products - @purge_products = ::Gapic::Config::Method.new purge_products_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/credentials.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/credentials.rb deleted file mode 100644 index f631d5bbc9d2..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/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 Vision - module V1 - module ProductSearch - # Credentials for the ProductSearch API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-vision" - ] - self.env_vars = [ - "VISION_CREDENTIALS", - "VISION_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "VISION_CREDENTIALS_JSON", - "VISION_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-vision-v1/lib/google/cloud/vision/v1/product_search/operations.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/operations.rb deleted file mode 100644 index aecd6acca0a3..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/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 Vision - module V1 - module ProductSearch - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "vision.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the ProductSearch 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 ProductSearch 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::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Vision::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Vision::V1::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 = "vision.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-vision-v1/lib/google/cloud/vision/v1/product_search/paths.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/paths.rb deleted file mode 100644 index 6027e8690518..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/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 Vision - module V1 - module ProductSearch - # Path helper methods for the ProductSearch API. - module Paths - ## - # 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 Product resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/products/{product}` - # - # @param project [String] - # @param location [String] - # @param product [String] - # - # @return [::String] - def product_path project:, location:, product: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/products/#{product}" - end - - ## - # Create a fully-qualified ProductSet resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/productSets/{product_set}` - # - # @param project [String] - # @param location [String] - # @param product_set [String] - # - # @return [::String] - def product_set_path project:, location:, product_set: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/productSets/#{product_set}" - end - - ## - # Create a fully-qualified ReferenceImage resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}` - # - # @param project [String] - # @param location [String] - # @param product [String] - # @param reference_image [String] - # - # @return [::String] - def reference_image_path project:, location:, product:, reference_image: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "product cannot contain /" if product.to_s.include? "/" - - "projects/#{project}/locations/#{location}/products/#{product}/referenceImages/#{reference_image}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest.rb deleted file mode 100644 index da02d8b8ab84..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest.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! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/vision/v1/version" - -require "google/cloud/vision/v1/product_search/credentials" -require "google/cloud/vision/v1/product_search/paths" -require "google/cloud/vision/v1/product_search/rest/operations" -require "google/cloud/vision/v1/product_search/rest/client" - -module Google - module Cloud - module Vision - module V1 - ## - # Manages Products and ProductSets of reference images for use in product - # search. It uses the following resource model: - # - # - The API has a collection of {::Google::Cloud::Vision::V1::ProductSet ProductSet} - # resources, named `projects/*/locations/*/productSets/*`, which acts as a way - # to put different products into groups to limit identification. - # - # In parallel, - # - # - The API has a collection of {::Google::Cloud::Vision::V1::Product Product} - # resources, named - # `projects/*/locations/*/products/*` - # - # - Each {::Google::Cloud::Vision::V1::Product Product} has a collection of - # {::Google::Cloud::Vision::V1::ReferenceImage ReferenceImage} resources, named - # `projects/*/locations/*/products/*/referenceImages/*` - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/vision/v1/product_search/rest" - # client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new - # - module ProductSearch - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/vision/v1/product_search/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/client.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/client.rb deleted file mode 100644 index d914d68d1c6a..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/client.rb +++ /dev/null @@ -1,2383 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/vision/v1/product_search_service_pb" -require "google/cloud/vision/v1/product_search/rest/service_stub" - -module Google - module Cloud - module Vision - module V1 - module ProductSearch - module Rest - ## - # REST client for the ProductSearch service. - # - # Manages Products and ProductSets of reference images for use in product - # search. It uses the following resource model: - # - # - The API has a collection of {::Google::Cloud::Vision::V1::ProductSet ProductSet} - # resources, named `projects/*/locations/*/productSets/*`, which acts as a way - # to put different products into groups to limit identification. - # - # In parallel, - # - # - The API has a collection of {::Google::Cloud::Vision::V1::Product Product} - # resources, named - # `projects/*/locations/*/products/*` - # - # - Each {::Google::Cloud::Vision::V1::Product Product} has a collection of - # {::Google::Cloud::Vision::V1::ReferenceImage ReferenceImage} resources, named - # `projects/*/locations/*/products/*/referenceImages/*` - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "vision.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :product_search_stub - - ## - # Configure the ProductSearch Client class. - # - # See {::Google::Cloud::Vision::V1::ProductSearch::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ProductSearch clients - # ::Google::Cloud::Vision::V1::ProductSearch::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", "Vision", "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_product_set.timeout = 600.0 - default_config.rpcs.create_product_set.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [] - } - - default_config.rpcs.list_product_sets.timeout = 600.0 - default_config.rpcs.list_product_sets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_product_set.timeout = 600.0 - default_config.rpcs.get_product_set.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_product_set.timeout = 600.0 - default_config.rpcs.update_product_set.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_product_set.timeout = 600.0 - default_config.rpcs.delete_product_set.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_product.timeout = 600.0 - default_config.rpcs.create_product.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [] - } - - default_config.rpcs.list_products.timeout = 600.0 - default_config.rpcs.list_products.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_product.timeout = 600.0 - default_config.rpcs.get_product.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_product.timeout = 600.0 - default_config.rpcs.update_product.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_product.timeout = 600.0 - default_config.rpcs.delete_product.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_reference_image.timeout = 600.0 - default_config.rpcs.create_reference_image.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [] - } - - default_config.rpcs.delete_reference_image.timeout = 600.0 - default_config.rpcs.delete_reference_image.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_reference_images.timeout = 600.0 - default_config.rpcs.list_reference_images.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_reference_image.timeout = 600.0 - default_config.rpcs.get_reference_image.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.add_product_to_product_set.timeout = 600.0 - default_config.rpcs.add_product_to_product_set.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.remove_product_from_product_set.timeout = 600.0 - default_config.rpcs.remove_product_from_product_set.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_products_in_product_set.timeout = 600.0 - default_config.rpcs.list_products_in_product_set.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.import_product_sets.timeout = 600.0 - default_config.rpcs.import_product_sets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [] - } - - default_config.rpcs.purge_products.timeout = 600.0 - default_config.rpcs.purge_products.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ProductSearch 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::Vision::V1::ProductSearch::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 - @product_search_stub.universe_domain - end - - ## - # Create a new ProductSearch REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ProductSearch 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::Vision::V1::ProductSearch::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 - - @product_search_stub = ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @product_search_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 - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Vision::V1::ProductSearch::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @product_search_stub.logger - end - - # Service calls - - ## - # Creates and returns a new ProductSet resource. - # - # Possible errors: - # - # * Returns INVALID_ARGUMENT if display_name is missing, or is longer than - # 4096 characters. - # - # @overload create_product_set(request, options = nil) - # Pass arguments to `create_product_set` via a request object, either of type - # {::Google::Cloud::Vision::V1::CreateProductSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::CreateProductSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_product_set(parent: nil, product_set: nil, product_set_id: nil) - # Pass arguments to `create_product_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 in which the ProductSet should be created. - # - # Format is `projects/PROJECT_ID/locations/LOC_ID`. - # @param product_set [::Google::Cloud::Vision::V1::ProductSet, ::Hash] - # Required. The ProductSet to create. - # @param product_set_id [::String] - # A user-supplied resource id for this ProductSet. If set, the server will - # attempt to use this value as the resource id. If it is already in use, an - # error is returned with code ALREADY_EXISTS. Must be at most 128 characters - # long. It cannot contain the character `/`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Vision::V1::ProductSet] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Vision::V1::ProductSet] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::CreateProductSetRequest.new - # - # # Call the create_product_set method. - # result = client.create_product_set request - # - # # The returned object is of type Google::Cloud::Vision::V1::ProductSet. - # p result - # - def create_product_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::CreateProductSetRequest - - # Converts hash and nil to an 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_product_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_product_set.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_product_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.create_product_set request, 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 ProductSets in an unspecified order. - # - # Possible errors: - # - # * Returns INVALID_ARGUMENT if page_size is greater than 100, or less - # than 1. - # - # @overload list_product_sets(request, options = nil) - # Pass arguments to `list_product_sets` via a request object, either of type - # {::Google::Cloud::Vision::V1::ListProductSetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::ListProductSetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_product_sets(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_product_sets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 from which ProductSets should be listed. - # - # Format is `projects/PROJECT_ID/locations/LOC_ID`. - # @param page_size [::Integer] - # The maximum number of items to return. Default 10, maximum 100. - # @param page_token [::String] - # The next_page_token returned from a previous List request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1::ProductSet>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1::ProductSet>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::ListProductSetsRequest.new - # - # # Call the list_product_sets method. - # result = client.list_product_sets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Vision::V1::ProductSet. - # p item - # end - # - def list_product_sets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::ListProductSetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_product_sets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_product_sets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_product_sets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.list_product_sets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @product_search_stub, :list_product_sets, "product_sets", 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 information associated with a ProductSet. - # - # Possible errors: - # - # * Returns NOT_FOUND if the ProductSet does not exist. - # - # @overload get_product_set(request, options = nil) - # Pass arguments to `get_product_set` via a request object, either of type - # {::Google::Cloud::Vision::V1::GetProductSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::GetProductSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_product_set(name: nil) - # Pass arguments to `get_product_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the ProductSet to get. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Vision::V1::ProductSet] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Vision::V1::ProductSet] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::GetProductSetRequest.new - # - # # Call the get_product_set method. - # result = client.get_product_set request - # - # # The returned object is of type Google::Cloud::Vision::V1::ProductSet. - # p result - # - def get_product_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::GetProductSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_product_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_product_set.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_product_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.get_product_set request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Makes changes to a ProductSet resource. - # Only display_name can be updated currently. - # - # Possible errors: - # - # * Returns NOT_FOUND if the ProductSet does not exist. - # * Returns INVALID_ARGUMENT if display_name is present in update_mask but - # missing from the request or longer than 4096 characters. - # - # @overload update_product_set(request, options = nil) - # Pass arguments to `update_product_set` via a request object, either of type - # {::Google::Cloud::Vision::V1::UpdateProductSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::UpdateProductSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_product_set(product_set: nil, update_mask: nil) - # Pass arguments to `update_product_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param product_set [::Google::Cloud::Vision::V1::ProductSet, ::Hash] - # Required. The ProductSet resource which replaces the one on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The {::Google::Protobuf::FieldMask FieldMask} that specifies which fields to - # update. - # If update_mask isn't specified, all mutable fields are to be updated. - # Valid mask path is `display_name`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Vision::V1::ProductSet] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Vision::V1::ProductSet] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::UpdateProductSetRequest.new - # - # # Call the update_product_set method. - # result = client.update_product_set request - # - # # The returned object is of type Google::Cloud::Vision::V1::ProductSet. - # p result - # - def update_product_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::UpdateProductSetRequest - - # Converts hash and nil to an 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_product_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_product_set.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_product_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.update_product_set request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Permanently deletes a ProductSet. Products and ReferenceImages in the - # ProductSet are not deleted. - # - # The actual image files are not deleted from Google Cloud Storage. - # - # @overload delete_product_set(request, options = nil) - # Pass arguments to `delete_product_set` via a request object, either of type - # {::Google::Cloud::Vision::V1::DeleteProductSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::DeleteProductSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_product_set(name: nil) - # Pass arguments to `delete_product_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the ProductSet to delete. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_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/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::DeleteProductSetRequest.new - # - # # Call the delete_product_set method. - # result = client.delete_product_set request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_product_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::DeleteProductSetRequest - - # Converts hash and nil to an 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_product_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_product_set.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_product_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.delete_product_set request, 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 and returns a new product resource. - # - # Possible errors: - # - # * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 - # characters. - # * Returns INVALID_ARGUMENT if description is longer than 4096 characters. - # * Returns INVALID_ARGUMENT if product_category is missing or invalid. - # - # @overload create_product(request, options = nil) - # Pass arguments to `create_product` via a request object, either of type - # {::Google::Cloud::Vision::V1::CreateProductRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::CreateProductRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_product(parent: nil, product: nil, product_id: nil) - # Pass arguments to `create_product` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project in which the Product should be created. - # - # Format is - # `projects/PROJECT_ID/locations/LOC_ID`. - # @param product [::Google::Cloud::Vision::V1::Product, ::Hash] - # Required. The product to create. - # @param product_id [::String] - # A user-supplied resource id for this Product. If set, the server will - # attempt to use this value as the resource id. If it is already in use, an - # error is returned with code ALREADY_EXISTS. Must be at most 128 characters - # long. It cannot contain the character `/`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Vision::V1::Product] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Vision::V1::Product] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::CreateProductRequest.new - # - # # Call the create_product method. - # result = client.create_product request - # - # # The returned object is of type Google::Cloud::Vision::V1::Product. - # p result - # - def create_product request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::CreateProductRequest - - # Converts hash and nil to an 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_product.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_product.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_product.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.create_product request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists products in an unspecified order. - # - # Possible errors: - # - # * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - # - # @overload list_products(request, options = nil) - # Pass arguments to `list_products` via a request object, either of type - # {::Google::Cloud::Vision::V1::ListProductsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::ListProductsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_products(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_products` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project OR ProductSet from which Products should be listed. - # - # Format: - # `projects/PROJECT_ID/locations/LOC_ID` - # @param page_size [::Integer] - # The maximum number of items to return. Default 10, maximum 100. - # @param page_token [::String] - # The next_page_token returned from a previous List request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1::Product>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1::Product>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::ListProductsRequest.new - # - # # Call the list_products method. - # result = client.list_products request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Vision::V1::Product. - # p item - # end - # - def list_products request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::ListProductsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_products.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_products.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_products.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.list_products request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @product_search_stub, :list_products, "products", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets information associated with a Product. - # - # Possible errors: - # - # * Returns NOT_FOUND if the Product does not exist. - # - # @overload get_product(request, options = nil) - # Pass arguments to `get_product` via a request object, either of type - # {::Google::Cloud::Vision::V1::GetProductRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::GetProductRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_product(name: nil) - # Pass arguments to `get_product` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the Product to get. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Vision::V1::Product] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Vision::V1::Product] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::GetProductRequest.new - # - # # Call the get_product method. - # result = client.get_product request - # - # # The returned object is of type Google::Cloud::Vision::V1::Product. - # p result - # - def get_product request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::GetProductRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_product.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_product.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_product.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.get_product request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Makes changes to a Product resource. - # Only the `display_name`, `description`, and `labels` fields can be updated - # right now. - # - # If labels are updated, the change will not be reflected in queries until - # the next index time. - # - # Possible errors: - # - # * Returns NOT_FOUND if the Product does not exist. - # * Returns INVALID_ARGUMENT if display_name is present in update_mask but is - # missing from the request or longer than 4096 characters. - # * Returns INVALID_ARGUMENT if description is present in update_mask but is - # longer than 4096 characters. - # * Returns INVALID_ARGUMENT if product_category is present in update_mask. - # - # @overload update_product(request, options = nil) - # Pass arguments to `update_product` via a request object, either of type - # {::Google::Cloud::Vision::V1::UpdateProductRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::UpdateProductRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_product(product: nil, update_mask: nil) - # Pass arguments to `update_product` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param product [::Google::Cloud::Vision::V1::Product, ::Hash] - # Required. The Product resource which replaces the one on the server. - # product.name is immutable. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The {::Google::Protobuf::FieldMask FieldMask} that specifies which fields - # to update. - # If update_mask isn't specified, all mutable fields are to be updated. - # Valid mask paths include `product_labels`, `display_name`, and - # `description`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Vision::V1::Product] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Vision::V1::Product] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::UpdateProductRequest.new - # - # # Call the update_product method. - # result = client.update_product request - # - # # The returned object is of type Google::Cloud::Vision::V1::Product. - # p result - # - def update_product request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::UpdateProductRequest - - # Converts hash and nil to an 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_product.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_product.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_product.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.update_product request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Permanently deletes a product and its reference images. - # - # Metadata of the product and all its images will be deleted right away, but - # search queries against ProductSets containing the product may still work - # until all related caches are refreshed. - # - # @overload delete_product(request, options = nil) - # Pass arguments to `delete_product` via a request object, either of type - # {::Google::Cloud::Vision::V1::DeleteProductRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::DeleteProductRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_product(name: nil) - # Pass arguments to `delete_product` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of product to delete. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::DeleteProductRequest.new - # - # # Call the delete_product method. - # result = client.delete_product request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_product request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::DeleteProductRequest - - # Converts hash and nil to an 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_product.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_product.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_product.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.delete_product request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates and returns a new ReferenceImage resource. - # - # The `bounding_poly` field is optional. If `bounding_poly` is not specified, - # the system will try to detect regions of interest in the image that are - # compatible with the product_category on the parent product. If it is - # specified, detection is ALWAYS skipped. The system converts polygons into - # non-rotated rectangles. - # - # Note that the pipeline will resize the image if the image resolution is too - # large to process (above 50MP). - # - # Possible errors: - # - # * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 - # characters. - # * Returns INVALID_ARGUMENT if the product does not exist. - # * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing - # compatible with the parent product's product_category is detected. - # * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - # - # @overload create_reference_image(request, options = nil) - # Pass arguments to `create_reference_image` via a request object, either of type - # {::Google::Cloud::Vision::V1::CreateReferenceImageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::CreateReferenceImageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_reference_image(parent: nil, reference_image: nil, reference_image_id: nil) - # Pass arguments to `create_reference_image` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the product in which to create the reference - # image. - # - # Format is - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - # @param reference_image [::Google::Cloud::Vision::V1::ReferenceImage, ::Hash] - # Required. The reference image to create. - # If an image ID is specified, it is ignored. - # @param reference_image_id [::String] - # A user-supplied resource id for the ReferenceImage to be added. If set, - # the server will attempt to use this value as the resource id. If it is - # already in use, an error is returned with code ALREADY_EXISTS. Must be at - # most 128 characters long. It cannot contain the character `/`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Vision::V1::ReferenceImage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Vision::V1::ReferenceImage] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::CreateReferenceImageRequest.new - # - # # Call the create_reference_image method. - # result = client.create_reference_image request - # - # # The returned object is of type Google::Cloud::Vision::V1::ReferenceImage. - # p result - # - def create_reference_image request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::CreateReferenceImageRequest - - # Converts hash and nil to an 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_reference_image.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_reference_image.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_reference_image.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.create_reference_image request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Permanently deletes a reference image. - # - # The image metadata will be deleted right away, but search queries - # against ProductSets containing the image may still work until all related - # caches are refreshed. - # - # The actual image files are not deleted from Google Cloud Storage. - # - # @overload delete_reference_image(request, options = nil) - # Pass arguments to `delete_reference_image` via a request object, either of type - # {::Google::Cloud::Vision::V1::DeleteReferenceImageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::DeleteReferenceImageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_reference_image(name: nil) - # Pass arguments to `delete_reference_image` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the reference image to delete. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_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/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::DeleteReferenceImageRequest.new - # - # # Call the delete_reference_image method. - # result = client.delete_reference_image request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_reference_image request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::DeleteReferenceImageRequest - - # Converts hash and nil to an 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_reference_image.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_reference_image.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_reference_image.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.delete_reference_image request, 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 reference images. - # - # Possible errors: - # - # * Returns NOT_FOUND if the parent product does not exist. - # * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less - # than 1. - # - # @overload list_reference_images(request, options = nil) - # Pass arguments to `list_reference_images` via a request object, either of type - # {::Google::Cloud::Vision::V1::ListReferenceImagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::ListReferenceImagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_reference_images(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_reference_images` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the product containing the reference images. - # - # Format is - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - # @param page_size [::Integer] - # The maximum number of items to return. Default 10, maximum 100. - # @param page_token [::String] - # A token identifying a page of results to be returned. This is the value - # of `nextPageToken` returned in a previous reference image list request. - # - # Defaults to the first page if not specified. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1::ReferenceImage>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1::ReferenceImage>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::ListReferenceImagesRequest.new - # - # # Call the list_reference_images method. - # result = client.list_reference_images request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Vision::V1::ReferenceImage. - # p item - # end - # - def list_reference_images request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::ListReferenceImagesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_reference_images.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_reference_images.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_reference_images.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.list_reference_images request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @product_search_stub, :list_reference_images, "reference_images", 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 information associated with a ReferenceImage. - # - # Possible errors: - # - # * Returns NOT_FOUND if the specified image does not exist. - # - # @overload get_reference_image(request, options = nil) - # Pass arguments to `get_reference_image` via a request object, either of type - # {::Google::Cloud::Vision::V1::GetReferenceImageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::GetReferenceImageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_reference_image(name: nil) - # Pass arguments to `get_reference_image` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the ReferenceImage to get. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Vision::V1::ReferenceImage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Vision::V1::ReferenceImage] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::GetReferenceImageRequest.new - # - # # Call the get_reference_image method. - # result = client.get_reference_image request - # - # # The returned object is of type Google::Cloud::Vision::V1::ReferenceImage. - # p result - # - def get_reference_image request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::GetReferenceImageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_reference_image.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_reference_image.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_reference_image.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.get_reference_image request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Adds a Product to the specified ProductSet. If the Product is already - # present, no change is made. - # - # One Product can be added to at most 100 ProductSets. - # - # Possible errors: - # - # * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - # - # @overload add_product_to_product_set(request, options = nil) - # Pass arguments to `add_product_to_product_set` via a request object, either of type - # {::Google::Cloud::Vision::V1::AddProductToProductSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::AddProductToProductSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload add_product_to_product_set(name: nil, product: nil) - # Pass arguments to `add_product_to_product_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for the ProductSet to modify. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - # @param product [::String] - # Required. The resource name for the Product to be added to this ProductSet. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::AddProductToProductSetRequest.new - # - # # Call the add_product_to_product_set method. - # result = client.add_product_to_product_set request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def add_product_to_product_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::AddProductToProductSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.add_product_to_product_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.add_product_to_product_set.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.add_product_to_product_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.add_product_to_product_set request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a Product from the specified ProductSet. - # - # @overload remove_product_from_product_set(request, options = nil) - # Pass arguments to `remove_product_from_product_set` via a request object, either of type - # {::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload remove_product_from_product_set(name: nil, product: nil) - # Pass arguments to `remove_product_from_product_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for the ProductSet to modify. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - # @param product [::String] - # Required. The resource name for the Product to be removed from this - # ProductSet. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest.new - # - # # Call the remove_product_from_product_set method. - # result = client.remove_product_from_product_set request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def remove_product_from_product_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.remove_product_from_product_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.remove_product_from_product_set.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.remove_product_from_product_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.remove_product_from_product_set request, 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 Products in a ProductSet, in an unspecified order. If the - # ProductSet does not exist, the products field of the response will be - # empty. - # - # Possible errors: - # - # * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - # - # @overload list_products_in_product_set(request, options = nil) - # Pass arguments to `list_products_in_product_set` via a request object, either of type - # {::Google::Cloud::Vision::V1::ListProductsInProductSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::ListProductsInProductSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_products_in_product_set(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_products_in_product_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The ProductSet resource for which to retrieve Products. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - # @param page_size [::Integer] - # The maximum number of items to return. Default 10, maximum 100. - # @param page_token [::String] - # The next_page_token returned from a previous List request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1::Product>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1::Product>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::ListProductsInProductSetRequest.new - # - # # Call the list_products_in_product_set method. - # result = client.list_products_in_product_set request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Vision::V1::Product. - # p item - # end - # - def list_products_in_product_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::ListProductsInProductSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_products_in_product_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_products_in_product_set.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_products_in_product_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.list_products_in_product_set request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @product_search_stub, :list_products_in_product_set, "products", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Asynchronous API that imports a list of reference images to specified - # product sets based on a list of image information. - # - # The {::Google::Longrunning::Operation google.longrunning.Operation} API can be - # used to keep track of the progress and results of the request. - # `Operation.metadata` contains `BatchOperationMetadata`. (progress) - # `Operation.response` contains `ImportProductSetsResponse`. (results) - # - # The input source of this method is a csv file on Google Cloud Storage. - # For the format of the csv file please see - # {::Google::Cloud::Vision::V1::ImportProductSetsGcsSource#csv_file_uri ImportProductSetsGcsSource.csv_file_uri}. - # - # @overload import_product_sets(request, options = nil) - # Pass arguments to `import_product_sets` via a request object, either of type - # {::Google::Cloud::Vision::V1::ImportProductSetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::ImportProductSetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_product_sets(parent: nil, input_config: nil) - # Pass arguments to `import_product_sets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 in which the ProductSets should be imported. - # - # Format is `projects/PROJECT_ID/locations/LOC_ID`. - # @param input_config [::Google::Cloud::Vision::V1::ImportProductSetsInputConfig, ::Hash] - # Required. The input content for the list of requests. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::ImportProductSetsRequest.new - # - # # Call the import_product_sets method. - # result = client.import_product_sets request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_product_sets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::ImportProductSetsRequest - - # Converts hash and nil to an 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_product_sets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_product_sets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.import_product_sets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.import_product_sets request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Asynchronous API to delete all Products in a ProductSet or all Products - # that are in no ProductSet. - # - # If a Product is a member of the specified ProductSet in addition to other - # ProductSets, the Product will still be deleted. - # - # It is recommended to not delete the specified ProductSet until after this - # operation has completed. It is also recommended to not add any of the - # Products involved in the batch delete to a new ProductSet while this - # operation is running because those Products may still end up deleted. - # - # It's not possible to undo the PurgeProducts operation. Therefore, it is - # recommended to keep the csv files used in ImportProductSets (if that was - # how you originally built the Product Set) before starting PurgeProducts, in - # case you need to re-import the data after deletion. - # - # If the plan is to purge all of the Products from a ProductSet and then - # re-use the empty ProductSet to re-import new Products into the empty - # ProductSet, you must wait until the PurgeProducts operation has finished - # for that ProductSet. - # - # The {::Google::Longrunning::Operation google.longrunning.Operation} API can be - # used to keep track of the progress and results of the request. - # `Operation.metadata` contains `BatchOperationMetadata`. (progress) - # - # @overload purge_products(request, options = nil) - # Pass arguments to `purge_products` via a request object, either of type - # {::Google::Cloud::Vision::V1::PurgeProductsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Vision::V1::PurgeProductsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload purge_products(product_set_purge_config: nil, delete_orphan_products: nil, parent: nil, force: nil) - # Pass arguments to `purge_products` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param product_set_purge_config [::Google::Cloud::Vision::V1::ProductSetPurgeConfig, ::Hash] - # Specify which ProductSet contains the Products to be deleted. - # - # Note: The following parameters are mutually exclusive: `product_set_purge_config`, `delete_orphan_products`. 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 delete_orphan_products [::Boolean] - # If delete_orphan_products is true, all Products that are not in any - # ProductSet will be deleted. - # - # Note: The following parameters are mutually exclusive: `delete_orphan_products`, `product_set_purge_config`. 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 parent [::String] - # Required. The project and location in which the Products should be deleted. - # - # Format is `projects/PROJECT_ID/locations/LOC_ID`. - # @param force [::Boolean] - # The default value is false. Override this value to true to actually perform - # the purge. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/vision/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Vision::V1::PurgeProductsRequest.new - # - # # Call the purge_products method. - # result = client.purge_products request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def purge_products request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::PurgeProductsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.purge_products.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.purge_products.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.purge_products.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_search_stub.purge_products request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 ProductSearch REST API. - # - # This class represents the configuration for ProductSearch 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::Vision::V1::ProductSearch::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_product_set to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_product_set.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_product_set.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 = "vision.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 ProductSearch 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_product_set` - # @return [::Gapic::Config::Method] - # - attr_reader :create_product_set - ## - # RPC-specific configuration for `list_product_sets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_product_sets - ## - # RPC-specific configuration for `get_product_set` - # @return [::Gapic::Config::Method] - # - attr_reader :get_product_set - ## - # RPC-specific configuration for `update_product_set` - # @return [::Gapic::Config::Method] - # - attr_reader :update_product_set - ## - # RPC-specific configuration for `delete_product_set` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_product_set - ## - # RPC-specific configuration for `create_product` - # @return [::Gapic::Config::Method] - # - attr_reader :create_product - ## - # RPC-specific configuration for `list_products` - # @return [::Gapic::Config::Method] - # - attr_reader :list_products - ## - # RPC-specific configuration for `get_product` - # @return [::Gapic::Config::Method] - # - attr_reader :get_product - ## - # RPC-specific configuration for `update_product` - # @return [::Gapic::Config::Method] - # - attr_reader :update_product - ## - # RPC-specific configuration for `delete_product` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_product - ## - # RPC-specific configuration for `create_reference_image` - # @return [::Gapic::Config::Method] - # - attr_reader :create_reference_image - ## - # RPC-specific configuration for `delete_reference_image` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_reference_image - ## - # RPC-specific configuration for `list_reference_images` - # @return [::Gapic::Config::Method] - # - attr_reader :list_reference_images - ## - # RPC-specific configuration for `get_reference_image` - # @return [::Gapic::Config::Method] - # - attr_reader :get_reference_image - ## - # RPC-specific configuration for `add_product_to_product_set` - # @return [::Gapic::Config::Method] - # - attr_reader :add_product_to_product_set - ## - # RPC-specific configuration for `remove_product_from_product_set` - # @return [::Gapic::Config::Method] - # - attr_reader :remove_product_from_product_set - ## - # RPC-specific configuration for `list_products_in_product_set` - # @return [::Gapic::Config::Method] - # - attr_reader :list_products_in_product_set - ## - # RPC-specific configuration for `import_product_sets` - # @return [::Gapic::Config::Method] - # - attr_reader :import_product_sets - ## - # RPC-specific configuration for `purge_products` - # @return [::Gapic::Config::Method] - # - attr_reader :purge_products - - # @private - def initialize parent_rpcs = nil - create_product_set_config = parent_rpcs.create_product_set if parent_rpcs.respond_to? :create_product_set - @create_product_set = ::Gapic::Config::Method.new create_product_set_config - list_product_sets_config = parent_rpcs.list_product_sets if parent_rpcs.respond_to? :list_product_sets - @list_product_sets = ::Gapic::Config::Method.new list_product_sets_config - get_product_set_config = parent_rpcs.get_product_set if parent_rpcs.respond_to? :get_product_set - @get_product_set = ::Gapic::Config::Method.new get_product_set_config - update_product_set_config = parent_rpcs.update_product_set if parent_rpcs.respond_to? :update_product_set - @update_product_set = ::Gapic::Config::Method.new update_product_set_config - delete_product_set_config = parent_rpcs.delete_product_set if parent_rpcs.respond_to? :delete_product_set - @delete_product_set = ::Gapic::Config::Method.new delete_product_set_config - create_product_config = parent_rpcs.create_product if parent_rpcs.respond_to? :create_product - @create_product = ::Gapic::Config::Method.new create_product_config - list_products_config = parent_rpcs.list_products if parent_rpcs.respond_to? :list_products - @list_products = ::Gapic::Config::Method.new list_products_config - get_product_config = parent_rpcs.get_product if parent_rpcs.respond_to? :get_product - @get_product = ::Gapic::Config::Method.new get_product_config - update_product_config = parent_rpcs.update_product if parent_rpcs.respond_to? :update_product - @update_product = ::Gapic::Config::Method.new update_product_config - delete_product_config = parent_rpcs.delete_product if parent_rpcs.respond_to? :delete_product - @delete_product = ::Gapic::Config::Method.new delete_product_config - create_reference_image_config = parent_rpcs.create_reference_image if parent_rpcs.respond_to? :create_reference_image - @create_reference_image = ::Gapic::Config::Method.new create_reference_image_config - delete_reference_image_config = parent_rpcs.delete_reference_image if parent_rpcs.respond_to? :delete_reference_image - @delete_reference_image = ::Gapic::Config::Method.new delete_reference_image_config - list_reference_images_config = parent_rpcs.list_reference_images if parent_rpcs.respond_to? :list_reference_images - @list_reference_images = ::Gapic::Config::Method.new list_reference_images_config - get_reference_image_config = parent_rpcs.get_reference_image if parent_rpcs.respond_to? :get_reference_image - @get_reference_image = ::Gapic::Config::Method.new get_reference_image_config - add_product_to_product_set_config = parent_rpcs.add_product_to_product_set if parent_rpcs.respond_to? :add_product_to_product_set - @add_product_to_product_set = ::Gapic::Config::Method.new add_product_to_product_set_config - remove_product_from_product_set_config = parent_rpcs.remove_product_from_product_set if parent_rpcs.respond_to? :remove_product_from_product_set - @remove_product_from_product_set = ::Gapic::Config::Method.new remove_product_from_product_set_config - list_products_in_product_set_config = parent_rpcs.list_products_in_product_set if parent_rpcs.respond_to? :list_products_in_product_set - @list_products_in_product_set = ::Gapic::Config::Method.new list_products_in_product_set_config - import_product_sets_config = parent_rpcs.import_product_sets if parent_rpcs.respond_to? :import_product_sets - @import_product_sets = ::Gapic::Config::Method.new import_product_sets_config - purge_products_config = parent_rpcs.purge_products if parent_rpcs.respond_to? :purge_products - @purge_products = ::Gapic::Config::Method.new purge_products_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/operations.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/operations.rb deleted file mode 100644 index e9863955af84..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/operations.rb +++ /dev/null @@ -1,946 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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 Vision - module V1 - module ProductSearch - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "vision.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the ProductSearch 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 ProductSearch 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::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Vision::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "vision.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}", - matches: [ - ["name", %r{^operations/?$}, 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/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^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-vision-v1/lib/google/cloud/vision/v1/product_search/rest/service_stub.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/service_stub.rb deleted file mode 100644 index a84d30c2c0a6..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search/rest/service_stub.rb +++ /dev/null @@ -1,1249 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/vision/v1/product_search_service_pb" - -module Google - module Cloud - module Vision - module V1 - module ProductSearch - module Rest - ## - # REST service stub for the ProductSearch 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_product_set REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::CreateProductSetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Vision::V1::ProductSet] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Vision::V1::ProductSet] - # A result object deserialized from the server's reply - def create_product_set request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_product_set_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_product_set", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Vision::V1::ProductSet.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_product_sets REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::ListProductSetsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Vision::V1::ListProductSetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Vision::V1::ListProductSetsResponse] - # A result object deserialized from the server's reply - def list_product_sets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_product_sets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_product_sets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Vision::V1::ListProductSetsResponse.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_product_set REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::GetProductSetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Vision::V1::ProductSet] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Vision::V1::ProductSet] - # A result object deserialized from the server's reply - def get_product_set request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_product_set_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_product_set", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Vision::V1::ProductSet.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_product_set REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::UpdateProductSetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Vision::V1::ProductSet] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Vision::V1::ProductSet] - # A result object deserialized from the server's reply - def update_product_set request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_product_set_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_product_set", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Vision::V1::ProductSet.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_product_set REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::DeleteProductSetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_product_set request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_product_set_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_product_set", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_product REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::CreateProductRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Vision::V1::Product] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Vision::V1::Product] - # A result object deserialized from the server's reply - def create_product request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_product_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_product", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Vision::V1::Product.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_products REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::ListProductsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Vision::V1::ListProductsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Vision::V1::ListProductsResponse] - # A result object deserialized from the server's reply - def list_products request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_products_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_products", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Vision::V1::ListProductsResponse.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_product REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::GetProductRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Vision::V1::Product] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Vision::V1::Product] - # A result object deserialized from the server's reply - def get_product request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_product_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_product", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Vision::V1::Product.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_product REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::UpdateProductRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Vision::V1::Product] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Vision::V1::Product] - # A result object deserialized from the server's reply - def update_product request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_product_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_product", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Vision::V1::Product.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_product REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::DeleteProductRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_product request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_product_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_product", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_reference_image REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::CreateReferenceImageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Vision::V1::ReferenceImage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Vision::V1::ReferenceImage] - # A result object deserialized from the server's reply - def create_reference_image request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_reference_image_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_reference_image", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Vision::V1::ReferenceImage.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_reference_image REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::DeleteReferenceImageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_reference_image request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_reference_image_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_reference_image", - 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 list_reference_images REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::ListReferenceImagesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Vision::V1::ListReferenceImagesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Vision::V1::ListReferenceImagesResponse] - # A result object deserialized from the server's reply - def list_reference_images request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_reference_images_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_reference_images", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Vision::V1::ListReferenceImagesResponse.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_reference_image REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::GetReferenceImageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Vision::V1::ReferenceImage] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Vision::V1::ReferenceImage] - # A result object deserialized from the server's reply - def get_reference_image request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_reference_image_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_reference_image", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Vision::V1::ReferenceImage.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the add_product_to_product_set REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::AddProductToProductSetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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 add_product_to_product_set request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_add_product_to_product_set_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "add_product_to_product_set", - 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 remove_product_from_product_set REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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 remove_product_from_product_set request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_remove_product_from_product_set_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "remove_product_from_product_set", - 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 list_products_in_product_set REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::ListProductsInProductSetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Vision::V1::ListProductsInProductSetResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Vision::V1::ListProductsInProductSetResponse] - # A result object deserialized from the server's reply - def list_products_in_product_set request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_products_in_product_set_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_products_in_product_set", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Vision::V1::ListProductsInProductSetResponse.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_product_sets REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::ImportProductSetsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_product_sets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_import_product_sets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_product_sets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the purge_products REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::PurgeProductsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def purge_products request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_purge_products_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "purge_products", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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_product_set REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::CreateProductSetRequest] - # 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_product_set_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/productSets", - body: "product_set", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_product_sets REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::ListProductSetsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_product_sets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/productSets", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_product_set REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::GetProductSetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_product_set_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/productSets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_product_set REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::UpdateProductSetRequest] - # 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_product_set_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{product_set.name}", - body: "product_set", - matches: [ - ["product_set.name", %r{^projects/[^/]+/locations/[^/]+/productSets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_product_set REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::DeleteProductSetRequest] - # 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_product_set_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/productSets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_product REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::CreateProductRequest] - # 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_product_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/products", - body: "product", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_products REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::ListProductsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_products_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/products", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_product REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::GetProductRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_product_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/products/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_product REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::UpdateProductRequest] - # 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_product_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{product.name}", - body: "product", - matches: [ - ["product.name", %r{^projects/[^/]+/locations/[^/]+/products/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_product REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::DeleteProductRequest] - # 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_product_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/products/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_reference_image REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::CreateReferenceImageRequest] - # 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_reference_image_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/referenceImages", - body: "reference_image", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/products/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_reference_image REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::DeleteReferenceImageRequest] - # 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_reference_image_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/products/[^/]+/referenceImages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_reference_images REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::ListReferenceImagesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_reference_images_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/referenceImages", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/products/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_reference_image REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::GetReferenceImageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_reference_image_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/products/[^/]+/referenceImages/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the add_product_to_product_set REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::AddProductToProductSetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_add_product_to_product_set_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:addProduct", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/productSets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the remove_product_from_product_set REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_remove_product_from_product_set_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:removeProduct", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/productSets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_products_in_product_set REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::ListProductsInProductSetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_products_in_product_set_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/products", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/productSets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the import_product_sets REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::ImportProductSetsRequest] - # 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_product_sets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/productSets:import", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the purge_products REST call - # - # @param request_pb [::Google::Cloud::Vision::V1::PurgeProductsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_purge_products_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/products:purge", - body: "*", - 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-vision-v1/lib/google/cloud/vision/v1/product_search_pb.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search_pb.rb deleted file mode 100644 index fbd9b0d6acd4..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/vision/v1/product_search.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/vision/v1/geometry_pb' -require 'google/cloud/vision/v1/product_search_service_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n+google/cloud/vision/v1/product_search.proto\x12\x16google.cloud.vision.v1\x1a\x19google/api/resource.proto\x1a%google/cloud/vision/v1/geometry.proto\x1a\x33google/cloud/vision/v1/product_search_service.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xba\x01\n\x13ProductSearchParams\x12;\n\rbounding_poly\x18\t \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12:\n\x0bproduct_set\x18\x06 \x01(\tB%\xfa\x41\"\n vision.googleapis.com/ProductSet\x12\x1a\n\x12product_categories\x18\x07 \x03(\t\x12\x0e\n\x06\x66ilter\x18\x08 \x01(\t\"\x88\x05\n\x14ProductSearchResults\x12.\n\nindex_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x44\n\x07results\x18\x05 \x03(\x0b\x32\x33.google.cloud.vision.v1.ProductSearchResults.Result\x12[\n\x17product_grouped_results\x18\x06 \x03(\x0b\x32:.google.cloud.vision.v1.ProductSearchResults.GroupedResult\x1aX\n\x06Result\x12\x30\n\x07product\x18\x01 \x01(\x0b\x32\x1f.google.cloud.vision.v1.Product\x12\r\n\x05score\x18\x02 \x01(\x02\x12\r\n\x05image\x18\x03 \x01(\t\x1aS\n\x10ObjectAnnotation\x12\x0b\n\x03mid\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\r\n\x05score\x18\x04 \x01(\x02\x1a\xed\x01\n\rGroupedResult\x12;\n\rbounding_poly\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x44\n\x07results\x18\x02 \x03(\x0b\x32\x33.google.cloud.vision.v1.ProductSearchResults.Result\x12Y\n\x12object_annotations\x18\x03 \x03(\x0b\x32=.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotationBs\n\x1a\x63om.google.cloud.vision.v1B\x12ProductSearchProtoP\x01Z5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Vision - module V1 - ProductSearchParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSearchParams").msgclass - ProductSearchResults = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSearchResults").msgclass - ProductSearchResults::Result = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSearchResults.Result").msgclass - ProductSearchResults::ObjectAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation").msgclass - ProductSearchResults::GroupedResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSearchResults.GroupedResult").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search_service_pb.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search_service_pb.rb deleted file mode 100644 index 981a849d946a..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search_service_pb.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/vision/v1/product_search_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/vision/v1/geometry_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n3google/cloud/vision/v1/product_search_service.proto\x12\x16google.cloud.vision.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/vision/v1/geometry.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xab\x02\n\x07Product\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x1d\n\x10product_category\x18\x04 \x01(\tB\x03\xe0\x41\x05\x12@\n\x0eproduct_labels\x18\x05 \x03(\x0b\x32(.google.cloud.vision.v1.Product.KeyValue\x1a&\n\x08KeyValue\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:^\xea\x41[\n\x1dvision.googleapis.com/Product\x12:projects/{project}/locations/{location}/products/{product}\"\xfd\x01\n\nProductSet\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x33\n\nindex_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12,\n\x0bindex_error\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03:h\xea\x41\x65\n vision.googleapis.com/ProductSet\x12\x41projects/{project}/locations/{location}/productSets/{product_set}\"\xfe\x01\n\x0eReferenceImage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x0e\x62ounding_polys\x18\x03 \x03(\x0b\x32$.google.cloud.vision.v1.BoundingPolyB\x03\xe0\x41\x01:\x88\x01\xea\x41\x84\x01\n$vision.googleapis.com/ReferenceImage\x12\\projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}\"\x9c\x01\n\x14\x43reateProductRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x35\n\x07product\x18\x02 \x01(\x0b\x32\x1f.google.cloud.vision.v1.ProductB\x03\xe0\x41\x02\x12\x12\n\nproduct_id\x18\x03 \x01(\t\"w\n\x13ListProductsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"b\n\x14ListProductsResponse\x12\x31\n\x08products\x18\x01 \x03(\x0b\x32\x1f.google.cloud.vision.v1.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"H\n\x11GetProductRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\"~\n\x14UpdateProductRequest\x12\x35\n\x07product\x18\x01 \x01(\x0b\x32\x1f.google.cloud.vision.v1.ProductB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"K\n\x14\x44\x65leteProductRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\"\xaa\x01\n\x17\x43reateProductSetRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12<\n\x0bproduct_set\x18\x02 \x01(\x0b\x32\".google.cloud.vision.v1.ProductSetB\x03\xe0\x41\x02\x12\x16\n\x0eproduct_set_id\x18\x03 \x01(\t\"z\n\x16ListProductSetsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"l\n\x17ListProductSetsResponse\x12\x38\n\x0cproduct_sets\x18\x01 \x03(\x0b\x32\".google.cloud.vision.v1.ProductSet\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x14GetProductSetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n vision.googleapis.com/ProductSet\"\x88\x01\n\x17UpdateProductSetRequest\x12<\n\x0bproduct_set\x18\x01 \x01(\x0b\x32\".google.cloud.vision.v1.ProductSetB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"Q\n\x17\x44\x65leteProductSetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n vision.googleapis.com/ProductSet\"\xb6\x01\n\x1b\x43reateReferenceImageRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\x12\x44\n\x0freference_image\x18\x02 \x01(\x0b\x32&.google.cloud.vision.v1.ReferenceImageB\x03\xe0\x41\x02\x12\x1a\n\x12reference_image_id\x18\x03 \x01(\t\"z\n\x1aListReferenceImagesRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8b\x01\n\x1bListReferenceImagesResponse\x12@\n\x10reference_images\x18\x01 \x03(\x0b\x32&.google.cloud.vision.v1.ReferenceImage\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\"V\n\x18GetReferenceImageRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$vision.googleapis.com/ReferenceImage\"Y\n\x1b\x44\x65leteReferenceImageRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$vision.googleapis.com/ReferenceImage\"\x8f\x01\n\x1d\x41\x64\x64ProductToProductSetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n vision.googleapis.com/ProductSet\x12\x36\n\x07product\x18\x02 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\"\x94\x01\n\"RemoveProductFromProductSetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n vision.googleapis.com/ProductSet\x12\x36\n\x07product\x18\x02 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\"\x80\x01\n\x1fListProductsInProductSetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n vision.googleapis.com/ProductSet\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"n\n ListProductsInProductSetResponse\x12\x31\n\x08products\x18\x01 \x03(\x0b\x32\x1f.google.cloud.vision.v1.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"2\n\x1aImportProductSetsGcsSource\x12\x14\n\x0c\x63sv_file_uri\x18\x01 \x01(\t\"r\n\x1cImportProductSetsInputConfig\x12H\n\ngcs_source\x18\x01 \x01(\x0b\x32\x32.google.cloud.vision.v1.ImportProductSetsGcsSourceH\x00\x42\x08\n\x06source\"\xa6\x01\n\x18ImportProductSetsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12O\n\x0cinput_config\x18\x02 \x01(\x0b\x32\x34.google.cloud.vision.v1.ImportProductSetsInputConfigB\x03\xe0\x41\x02\"\x83\x01\n\x19ImportProductSetsResponse\x12@\n\x10reference_images\x18\x01 \x03(\x0b\x32&.google.cloud.vision.v1.ReferenceImage\x12$\n\x08statuses\x18\x02 \x03(\x0b\x32\x12.google.rpc.Status\"\x97\x02\n\x16\x42\x61tchOperationMetadata\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32\x34.google.cloud.vision.v1.BatchOperationMetadata.State\x12/\n\x0bsubmit_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"Y\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nPROCESSING\x10\x01\x12\x0e\n\nSUCCESSFUL\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\r\n\tCANCELLED\x10\x04\"/\n\x15ProductSetPurgeConfig\x12\x16\n\x0eproduct_set_id\x18\x01 \x01(\t\"\xdf\x01\n\x14PurgeProductsRequest\x12Q\n\x18product_set_purge_config\x18\x02 \x01(\x0b\x32-.google.cloud.vision.v1.ProductSetPurgeConfigH\x00\x12 \n\x16\x64\x65lete_orphan_products\x18\x03 \x01(\x08H\x00\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\r\n\x05\x66orce\x18\x04 \x01(\x08\x42\x08\n\x06target2\xf4\x1d\n\rProductSearch\x12\xd1\x01\n\x10\x43reateProductSet\x12/.google.cloud.vision.v1.CreateProductSetRequest\x1a\".google.cloud.vision.v1.ProductSet\"h\xda\x41!parent,product_set,product_set_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/productSets:\x0bproduct_set\x12\xb4\x01\n\x0fListProductSets\x12..google.cloud.vision.v1.ListProductSetsRequest\x1a/.google.cloud.vision.v1.ListProductSetsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/productSets\x12\xa1\x01\n\rGetProductSet\x12,.google.cloud.vision.v1.GetProductSetRequest\x1a\".google.cloud.vision.v1.ProductSet\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/productSets/*}\x12\xd3\x01\n\x10UpdateProductSet\x12/.google.cloud.vision.v1.UpdateProductSetRequest\x1a\".google.cloud.vision.v1.ProductSet\"j\xda\x41\x17product_set,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{product_set.name=projects/*/locations/*/productSets/*}:\x0bproduct_set\x12\x9b\x01\n\x10\x44\x65leteProductSet\x12/.google.cloud.vision.v1.DeleteProductSetRequest\x1a\x16.google.protobuf.Empty\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/productSets/*}\x12\xb9\x01\n\rCreateProduct\x12,.google.cloud.vision.v1.CreateProductRequest\x1a\x1f.google.cloud.vision.v1.Product\"Y\xda\x41\x19parent,product,product_id\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/products:\x07product\x12\xa8\x01\n\x0cListProducts\x12+.google.cloud.vision.v1.ListProductsRequest\x1a,.google.cloud.vision.v1.ListProductsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/products\x12\x95\x01\n\nGetProduct\x12).google.cloud.vision.v1.GetProductRequest\x1a\x1f.google.cloud.vision.v1.Product\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/products/*}\x12\xbb\x01\n\rUpdateProduct\x12,.google.cloud.vision.v1.UpdateProductRequest\x1a\x1f.google.cloud.vision.v1.Product\"[\xda\x41\x13product,update_mask\x82\xd3\xe4\x93\x02?24/v1/{product.name=projects/*/locations/*/products/*}:\x07product\x12\x92\x01\n\rDeleteProduct\x12,.google.cloud.vision.v1.DeleteProductRequest\x1a\x16.google.protobuf.Empty\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/products/*}\x12\xf9\x01\n\x14\x43reateReferenceImage\x12\x33.google.cloud.vision.v1.CreateReferenceImageRequest\x1a&.google.cloud.vision.v1.ReferenceImage\"\x83\x01\xda\x41)parent,reference_image,reference_image_id\x82\xd3\xe4\x93\x02Q\">/v1/{parent=projects/*/locations/*/products/*}/referenceImages:\x0freference_image\x12\xb2\x01\n\x14\x44\x65leteReferenceImage\x12\x33.google.cloud.vision.v1.DeleteReferenceImageRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/locations/*/products/*/referenceImages/*}\x12\xcf\x01\n\x13ListReferenceImages\x12\x32.google.cloud.vision.v1.ListReferenceImagesRequest\x1a\x33.google.cloud.vision.v1.ListReferenceImagesResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/products/*}/referenceImages\x12\xbc\x01\n\x11GetReferenceImage\x12\x30.google.cloud.vision.v1.GetReferenceImageRequest\x1a&.google.cloud.vision.v1.ReferenceImage\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/products/*/referenceImages/*}\x12\xbd\x01\n\x16\x41\x64\x64ProductToProductSet\x12\x35.google.cloud.vision.v1.AddProductToProductSetRequest\x1a\x16.google.protobuf.Empty\"T\xda\x41\x0cname,product\x82\xd3\xe4\x93\x02?\":/v1/{name=projects/*/locations/*/productSets/*}:addProduct:\x01*\x12\xca\x01\n\x1bRemoveProductFromProductSet\x12:.google.cloud.vision.v1.RemoveProductFromProductSetRequest\x1a\x16.google.protobuf.Empty\"W\xda\x41\x0cname,product\x82\xd3\xe4\x93\x02\x42\"=/v1/{name=projects/*/locations/*/productSets/*}:removeProduct:\x01*\x12\xd6\x01\n\x18ListProductsInProductSet\x12\x37.google.cloud.vision.v1.ListProductsInProductSetRequest\x1a\x38.google.cloud.vision.v1.ListProductsInProductSetResponse\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/productSets/*}/products\x12\xf4\x01\n\x11ImportProductSets\x12\x30.google.cloud.vision.v1.ImportProductSetsRequest\x1a\x1d.google.longrunning.Operation\"\x8d\x01\xca\x41\x33\n\x19ImportProductSetsResponse\x12\x16\x42\x61tchOperationMetadata\xda\x41\x13parent,input_config\x82\xd3\xe4\x93\x02;\"6/v1/{parent=projects/*/locations/*}/productSets:import:\x01*\x12\xd6\x01\n\rPurgeProducts\x12,.google.cloud.vision.v1.PurgeProductsRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41/\n\x15google.protobuf.Empty\x12\x16\x42\x61tchOperationMetadata\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\"2/v1/{parent=projects/*/locations/*}/products:purge:\x01*\x1av\xca\x41\x15vision.googleapis.com\xd2\x41[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-visionBz\n\x1a\x63om.google.cloud.vision.v1B\x19ProductSearchServiceProtoP\x01Z5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Vision - module V1 - Product = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Product").msgclass - Product::KeyValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Product.KeyValue").msgclass - ProductSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSet").msgclass - ReferenceImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ReferenceImage").msgclass - CreateProductRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.CreateProductRequest").msgclass - ListProductsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ListProductsRequest").msgclass - ListProductsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ListProductsResponse").msgclass - GetProductRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.GetProductRequest").msgclass - UpdateProductRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.UpdateProductRequest").msgclass - DeleteProductRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.DeleteProductRequest").msgclass - CreateProductSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.CreateProductSetRequest").msgclass - ListProductSetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ListProductSetsRequest").msgclass - ListProductSetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ListProductSetsResponse").msgclass - GetProductSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.GetProductSetRequest").msgclass - UpdateProductSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.UpdateProductSetRequest").msgclass - DeleteProductSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.DeleteProductSetRequest").msgclass - CreateReferenceImageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.CreateReferenceImageRequest").msgclass - ListReferenceImagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ListReferenceImagesRequest").msgclass - ListReferenceImagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ListReferenceImagesResponse").msgclass - GetReferenceImageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.GetReferenceImageRequest").msgclass - DeleteReferenceImageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.DeleteReferenceImageRequest").msgclass - AddProductToProductSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.AddProductToProductSetRequest").msgclass - RemoveProductFromProductSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.RemoveProductFromProductSetRequest").msgclass - ListProductsInProductSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ListProductsInProductSetRequest").msgclass - ListProductsInProductSetResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ListProductsInProductSetResponse").msgclass - ImportProductSetsGcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ImportProductSetsGcsSource").msgclass - ImportProductSetsInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ImportProductSetsInputConfig").msgclass - ImportProductSetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ImportProductSetsRequest").msgclass - ImportProductSetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ImportProductSetsResponse").msgclass - BatchOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.BatchOperationMetadata").msgclass - BatchOperationMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.BatchOperationMetadata.State").enummodule - ProductSetPurgeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSetPurgeConfig").msgclass - PurgeProductsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.PurgeProductsRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search_service_services_pb.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search_service_services_pb.rb deleted file mode 100644 index 74a7744f243b..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/product_search_service_services_pb.rb +++ /dev/null @@ -1,233 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/vision/v1/product_search_service.proto for package 'google.cloud.vision.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/vision/v1/product_search_service_pb' - -module Google - module Cloud - module Vision - module V1 - module ProductSearch - # Manages Products and ProductSets of reference images for use in product - # search. It uses the following resource model: - # - # - The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] - # resources, named `projects/*/locations/*/productSets/*`, which acts as a way - # to put different products into groups to limit identification. - # - # In parallel, - # - # - The API has a collection of [Product][google.cloud.vision.v1.Product] - # resources, named - # `projects/*/locations/*/products/*` - # - # - Each [Product][google.cloud.vision.v1.Product] has a collection of - # [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named - # `projects/*/locations/*/products/*/referenceImages/*` - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.vision.v1.ProductSearch' - - # Creates and returns a new ProductSet resource. - # - # Possible errors: - # - # * Returns INVALID_ARGUMENT if display_name is missing, or is longer than - # 4096 characters. - rpc :CreateProductSet, ::Google::Cloud::Vision::V1::CreateProductSetRequest, ::Google::Cloud::Vision::V1::ProductSet - # Lists ProductSets in an unspecified order. - # - # Possible errors: - # - # * Returns INVALID_ARGUMENT if page_size is greater than 100, or less - # than 1. - rpc :ListProductSets, ::Google::Cloud::Vision::V1::ListProductSetsRequest, ::Google::Cloud::Vision::V1::ListProductSetsResponse - # Gets information associated with a ProductSet. - # - # Possible errors: - # - # * Returns NOT_FOUND if the ProductSet does not exist. - rpc :GetProductSet, ::Google::Cloud::Vision::V1::GetProductSetRequest, ::Google::Cloud::Vision::V1::ProductSet - # Makes changes to a ProductSet resource. - # Only display_name can be updated currently. - # - # Possible errors: - # - # * Returns NOT_FOUND if the ProductSet does not exist. - # * Returns INVALID_ARGUMENT if display_name is present in update_mask but - # missing from the request or longer than 4096 characters. - rpc :UpdateProductSet, ::Google::Cloud::Vision::V1::UpdateProductSetRequest, ::Google::Cloud::Vision::V1::ProductSet - # Permanently deletes a ProductSet. Products and ReferenceImages in the - # ProductSet are not deleted. - # - # The actual image files are not deleted from Google Cloud Storage. - rpc :DeleteProductSet, ::Google::Cloud::Vision::V1::DeleteProductSetRequest, ::Google::Protobuf::Empty - # Creates and returns a new product resource. - # - # Possible errors: - # - # * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 - # characters. - # * Returns INVALID_ARGUMENT if description is longer than 4096 characters. - # * Returns INVALID_ARGUMENT if product_category is missing or invalid. - rpc :CreateProduct, ::Google::Cloud::Vision::V1::CreateProductRequest, ::Google::Cloud::Vision::V1::Product - # Lists products in an unspecified order. - # - # Possible errors: - # - # * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - rpc :ListProducts, ::Google::Cloud::Vision::V1::ListProductsRequest, ::Google::Cloud::Vision::V1::ListProductsResponse - # Gets information associated with a Product. - # - # Possible errors: - # - # * Returns NOT_FOUND if the Product does not exist. - rpc :GetProduct, ::Google::Cloud::Vision::V1::GetProductRequest, ::Google::Cloud::Vision::V1::Product - # Makes changes to a Product resource. - # Only the `display_name`, `description`, and `labels` fields can be updated - # right now. - # - # If labels are updated, the change will not be reflected in queries until - # the next index time. - # - # Possible errors: - # - # * Returns NOT_FOUND if the Product does not exist. - # * Returns INVALID_ARGUMENT if display_name is present in update_mask but is - # missing from the request or longer than 4096 characters. - # * Returns INVALID_ARGUMENT if description is present in update_mask but is - # longer than 4096 characters. - # * Returns INVALID_ARGUMENT if product_category is present in update_mask. - rpc :UpdateProduct, ::Google::Cloud::Vision::V1::UpdateProductRequest, ::Google::Cloud::Vision::V1::Product - # Permanently deletes a product and its reference images. - # - # Metadata of the product and all its images will be deleted right away, but - # search queries against ProductSets containing the product may still work - # until all related caches are refreshed. - rpc :DeleteProduct, ::Google::Cloud::Vision::V1::DeleteProductRequest, ::Google::Protobuf::Empty - # Creates and returns a new ReferenceImage resource. - # - # The `bounding_poly` field is optional. If `bounding_poly` is not specified, - # the system will try to detect regions of interest in the image that are - # compatible with the product_category on the parent product. If it is - # specified, detection is ALWAYS skipped. The system converts polygons into - # non-rotated rectangles. - # - # Note that the pipeline will resize the image if the image resolution is too - # large to process (above 50MP). - # - # Possible errors: - # - # * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 - # characters. - # * Returns INVALID_ARGUMENT if the product does not exist. - # * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing - # compatible with the parent product's product_category is detected. - # * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - rpc :CreateReferenceImage, ::Google::Cloud::Vision::V1::CreateReferenceImageRequest, ::Google::Cloud::Vision::V1::ReferenceImage - # Permanently deletes a reference image. - # - # The image metadata will be deleted right away, but search queries - # against ProductSets containing the image may still work until all related - # caches are refreshed. - # - # The actual image files are not deleted from Google Cloud Storage. - rpc :DeleteReferenceImage, ::Google::Cloud::Vision::V1::DeleteReferenceImageRequest, ::Google::Protobuf::Empty - # Lists reference images. - # - # Possible errors: - # - # * Returns NOT_FOUND if the parent product does not exist. - # * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less - # than 1. - rpc :ListReferenceImages, ::Google::Cloud::Vision::V1::ListReferenceImagesRequest, ::Google::Cloud::Vision::V1::ListReferenceImagesResponse - # Gets information associated with a ReferenceImage. - # - # Possible errors: - # - # * Returns NOT_FOUND if the specified image does not exist. - rpc :GetReferenceImage, ::Google::Cloud::Vision::V1::GetReferenceImageRequest, ::Google::Cloud::Vision::V1::ReferenceImage - # Adds a Product to the specified ProductSet. If the Product is already - # present, no change is made. - # - # One Product can be added to at most 100 ProductSets. - # - # Possible errors: - # - # * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - rpc :AddProductToProductSet, ::Google::Cloud::Vision::V1::AddProductToProductSetRequest, ::Google::Protobuf::Empty - # Removes a Product from the specified ProductSet. - rpc :RemoveProductFromProductSet, ::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest, ::Google::Protobuf::Empty - # Lists the Products in a ProductSet, in an unspecified order. If the - # ProductSet does not exist, the products field of the response will be - # empty. - # - # Possible errors: - # - # * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - rpc :ListProductsInProductSet, ::Google::Cloud::Vision::V1::ListProductsInProductSetRequest, ::Google::Cloud::Vision::V1::ListProductsInProductSetResponse - # Asynchronous API that imports a list of reference images to specified - # product sets based on a list of image information. - # - # The [google.longrunning.Operation][google.longrunning.Operation] API can be - # used to keep track of the progress and results of the request. - # `Operation.metadata` contains `BatchOperationMetadata`. (progress) - # `Operation.response` contains `ImportProductSetsResponse`. (results) - # - # The input source of this method is a csv file on Google Cloud Storage. - # For the format of the csv file please see - # [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. - rpc :ImportProductSets, ::Google::Cloud::Vision::V1::ImportProductSetsRequest, ::Google::Longrunning::Operation - # Asynchronous API to delete all Products in a ProductSet or all Products - # that are in no ProductSet. - # - # If a Product is a member of the specified ProductSet in addition to other - # ProductSets, the Product will still be deleted. - # - # It is recommended to not delete the specified ProductSet until after this - # operation has completed. It is also recommended to not add any of the - # Products involved in the batch delete to a new ProductSet while this - # operation is running because those Products may still end up deleted. - # - # It's not possible to undo the PurgeProducts operation. Therefore, it is - # recommended to keep the csv files used in ImportProductSets (if that was - # how you originally built the Product Set) before starting PurgeProducts, in - # case you need to re-import the data after deletion. - # - # If the plan is to purge all of the Products from a ProductSet and then - # re-use the empty ProductSet to re-import new Products into the empty - # ProductSet, you must wait until the PurgeProducts operation has finished - # for that ProductSet. - # - # The [google.longrunning.Operation][google.longrunning.Operation] API can be - # used to keep track of the progress and results of the request. - # `Operation.metadata` contains `BatchOperationMetadata`. (progress) - rpc :PurgeProducts, ::Google::Cloud::Vision::V1::PurgeProductsRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/rest.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/rest.rb deleted file mode 100644 index 4b55a00020cf..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/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/vision/v1/product_search/rest" -require "google/cloud/vision/v1/image_annotator/rest" -require "google/cloud/vision/v1/version" - -module Google - module Cloud - module Vision - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/vision/v1/rest" - # client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/text_annotation_pb.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/text_annotation_pb.rb deleted file mode 100644 index c4f9235f5dcf..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/text_annotation_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/vision/v1/text_annotation.proto - -require 'google/protobuf' - -require 'google/cloud/vision/v1/geometry_pb' - - -descriptor_data = "\n,google/cloud/vision/v1/text_annotation.proto\x12\x16google.cloud.vision.v1\x1a%google/cloud/vision/v1/geometry.proto\"\x96\x04\n\x0eTextAnnotation\x12+\n\x05pages\x18\x01 \x03(\x0b\x32\x1c.google.cloud.vision.v1.Page\x12\x0c\n\x04text\x18\x02 \x01(\t\x1a=\n\x10\x44\x65tectedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x1a\xd5\x01\n\rDetectedBreak\x12L\n\x04type\x18\x01 \x01(\x0e\x32>.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType\x12\x11\n\tis_prefix\x18\x02 \x01(\x08\"c\n\tBreakType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05SPACE\x10\x01\x12\x0e\n\nSURE_SPACE\x10\x02\x12\x12\n\x0e\x45OL_SURE_SPACE\x10\x03\x12\n\n\x06HYPHEN\x10\x04\x12\x0e\n\nLINE_BREAK\x10\x05\x1a\xb1\x01\n\x0cTextProperty\x12S\n\x12\x64\x65tected_languages\x18\x01 \x03(\x0b\x32\x37.google.cloud.vision.v1.TextAnnotation.DetectedLanguage\x12L\n\x0e\x64\x65tected_break\x18\x02 \x01(\x0b\x32\x34.google.cloud.vision.v1.TextAnnotation.DetectedBreak\"\xaf\x01\n\x04Page\x12\x45\n\x08property\x18\x01 \x01(\x0b\x32\x33.google.cloud.vision.v1.TextAnnotation.TextProperty\x12\r\n\x05width\x18\x02 \x01(\x05\x12\x0e\n\x06height\x18\x03 \x01(\x05\x12-\n\x06\x62locks\x18\x04 \x03(\x0b\x32\x1d.google.cloud.vision.v1.Block\x12\x12\n\nconfidence\x18\x05 \x01(\x02\"\xe6\x02\n\x05\x42lock\x12\x45\n\x08property\x18\x01 \x01(\x0b\x32\x33.google.cloud.vision.v1.TextAnnotation.TextProperty\x12:\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x35\n\nparagraphs\x18\x03 \x03(\x0b\x32!.google.cloud.vision.v1.Paragraph\x12;\n\nblock_type\x18\x04 \x01(\x0e\x32\'.google.cloud.vision.v1.Block.BlockType\x12\x12\n\nconfidence\x18\x05 \x01(\x02\"R\n\tBlockType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05TABLE\x10\x02\x12\x0b\n\x07PICTURE\x10\x03\x12\t\n\x05RULER\x10\x04\x12\x0b\n\x07\x42\x41RCODE\x10\x05\"\xcf\x01\n\tParagraph\x12\x45\n\x08property\x18\x01 \x01(\x0b\x32\x33.google.cloud.vision.v1.TextAnnotation.TextProperty\x12:\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12+\n\x05words\x18\x03 \x03(\x0b\x32\x1c.google.cloud.vision.v1.Word\x12\x12\n\nconfidence\x18\x04 \x01(\x02\"\xce\x01\n\x04Word\x12\x45\n\x08property\x18\x01 \x01(\x0b\x32\x33.google.cloud.vision.v1.TextAnnotation.TextProperty\x12:\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12/\n\x07symbols\x18\x03 \x03(\x0b\x32\x1e.google.cloud.vision.v1.Symbol\x12\x12\n\nconfidence\x18\x04 \x01(\x02\"\xad\x01\n\x06Symbol\x12\x45\n\x08property\x18\x01 \x01(\x0b\x32\x33.google.cloud.vision.v1.TextAnnotation.TextProperty\x12:\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x0c\n\x04text\x18\x03 \x01(\t\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x42t\n\x1a\x63om.google.cloud.vision.v1B\x13TextAnnotationProtoP\x01Z5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Vision - module V1 - TextAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.TextAnnotation").msgclass - TextAnnotation::DetectedLanguage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.TextAnnotation.DetectedLanguage").msgclass - TextAnnotation::DetectedBreak = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.TextAnnotation.DetectedBreak").msgclass - TextAnnotation::DetectedBreak::BreakType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType").enummodule - TextAnnotation::TextProperty = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.TextAnnotation.TextProperty").msgclass - Page = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Page").msgclass - Block = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Block").msgclass - Block::BlockType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Block.BlockType").enummodule - Paragraph = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Paragraph").msgclass - Word = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Word").msgclass - Symbol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Symbol").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/version.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/version.rb deleted file mode 100644 index 85824890f02d..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/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 Vision - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/web_detection_pb.rb b/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/web_detection_pb.rb deleted file mode 100644 index 148850eeea96..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/lib/google/cloud/vision/v1/web_detection_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/vision/v1/web_detection.proto - -require 'google/protobuf' - - -descriptor_data = "\n*google/cloud/vision/v1/web_detection.proto\x12\x16google.cloud.vision.v1\"\xd4\x06\n\x0cWebDetection\x12\x44\n\x0cweb_entities\x18\x01 \x03(\x0b\x32..google.cloud.vision.v1.WebDetection.WebEntity\x12K\n\x14\x66ull_matching_images\x18\x02 \x03(\x0b\x32-.google.cloud.vision.v1.WebDetection.WebImage\x12N\n\x17partial_matching_images\x18\x03 \x03(\x0b\x32-.google.cloud.vision.v1.WebDetection.WebImage\x12P\n\x1apages_with_matching_images\x18\x04 \x03(\x0b\x32,.google.cloud.vision.v1.WebDetection.WebPage\x12N\n\x17visually_similar_images\x18\x06 \x03(\x0b\x32-.google.cloud.vision.v1.WebDetection.WebImage\x12H\n\x11\x62\x65st_guess_labels\x18\x08 \x03(\x0b\x32-.google.cloud.vision.v1.WebDetection.WebLabel\x1a\x42\n\tWebEntity\x12\x11\n\tentity_id\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x02\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x1a&\n\x08WebImage\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x02\x1a\xd6\x01\n\x07WebPage\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x02\x12\x12\n\npage_title\x18\x03 \x01(\t\x12K\n\x14\x66ull_matching_images\x18\x04 \x03(\x0b\x32-.google.cloud.vision.v1.WebDetection.WebImage\x12N\n\x17partial_matching_images\x18\x05 \x03(\x0b\x32-.google.cloud.vision.v1.WebDetection.WebImage\x1a\x30\n\x08WebLabel\x12\r\n\x05label\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\tBr\n\x1a\x63om.google.cloud.vision.v1B\x11WebDetectionProtoP\x01Z5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Vision - module V1 - WebDetection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.WebDetection").msgclass - WebDetection::WebEntity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.WebDetection.WebEntity").msgclass - WebDetection::WebImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.WebDetection.WebImage").msgclass - WebDetection::WebPage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.WebDetection.WebPage").msgclass - WebDetection::WebLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.WebDetection.WebLabel").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-vision-v1/proto_docs/README.md deleted file mode 100644 index 3a71b88aaa8b..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Vision 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-vision-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # 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. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - # - # Example: - # - # 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 - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # 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 - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # 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 - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-vision-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-vision-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-vision-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-vision-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-vision-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-vision-v1/proto_docs/google/cloud/vision/v1/geometry.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/geometry.rb deleted file mode 100644 index 11ed57dd523a..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/geometry.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 Vision - module V1 - # A vertex represents a 2D point in the image. - # NOTE: the vertex coordinates are in the same scale as the original image. - # @!attribute [rw] x - # @return [::Integer] - # X coordinate. - # @!attribute [rw] y - # @return [::Integer] - # Y coordinate. - class Vertex - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A vertex represents a 2D point in the image. - # NOTE: the normalized vertex coordinates are relative to the original image - # and range from 0 to 1. - # @!attribute [rw] x - # @return [::Float] - # X coordinate. - # @!attribute [rw] y - # @return [::Float] - # Y coordinate. - class NormalizedVertex - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A bounding polygon for the detected image annotation. - # @!attribute [rw] vertices - # @return [::Array<::Google::Cloud::Vision::V1::Vertex>] - # The bounding polygon vertices. - # @!attribute [rw] normalized_vertices - # @return [::Array<::Google::Cloud::Vision::V1::NormalizedVertex>] - # The bounding polygon normalized vertices. - class BoundingPoly - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A 3D position in the image, used primarily for Face detection landmarks. - # A valid Position must have both x and y coordinates. - # The position coordinates are in the same scale as the original image. - # @!attribute [rw] x - # @return [::Float] - # X coordinate. - # @!attribute [rw] y - # @return [::Float] - # Y coordinate. - # @!attribute [rw] z - # @return [::Float] - # Z coordinate (or depth). - class Position - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/image_annotator.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/image_annotator.rb deleted file mode 100644 index 44f3e06e82cd..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/image_annotator.rb +++ /dev/null @@ -1,1126 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Vision - module V1 - # The type of Google Cloud Vision API detection to perform, and the maximum - # number of results to return for that type. Multiple `Feature` objects can - # be specified in the `features` list. - # @!attribute [rw] type - # @return [::Google::Cloud::Vision::V1::Feature::Type] - # The feature type. - # @!attribute [rw] max_results - # @return [::Integer] - # Maximum number of results of this type. Does not apply to - # `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. - # @!attribute [rw] model - # @return [::String] - # Model to use for the feature. - # Supported values: "builtin/stable" (the default if unset) and - # "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also - # support "builtin/weekly" for the bleeding edge release updated weekly. - class Feature - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of Google Cloud Vision API feature to be extracted. - module Type - # Unspecified feature type. - TYPE_UNSPECIFIED = 0 - - # Run face detection. - FACE_DETECTION = 1 - - # Run landmark detection. - LANDMARK_DETECTION = 2 - - # Run logo detection. - LOGO_DETECTION = 3 - - # Run label detection. - LABEL_DETECTION = 4 - - # Run text detection / optical character recognition (OCR). Text detection - # is optimized for areas of text within a larger image; if the image is - # a document, use `DOCUMENT_TEXT_DETECTION` instead. - TEXT_DETECTION = 5 - - # Run dense text document OCR. Takes precedence when both - # `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present. - DOCUMENT_TEXT_DETECTION = 11 - - # Run Safe Search to detect potentially unsafe - # or undesirable content. - SAFE_SEARCH_DETECTION = 6 - - # Compute a set of image properties, such as the - # image's dominant colors. - IMAGE_PROPERTIES = 7 - - # Run crop hints. - CROP_HINTS = 9 - - # Run web detection. - WEB_DETECTION = 10 - - # Run Product Search. - PRODUCT_SEARCH = 12 - - # Run localizer for object detection. - OBJECT_LOCALIZATION = 19 - end - end - - # External image source (Google Cloud Storage or web URL image location). - # @!attribute [rw] gcs_image_uri - # @return [::String] - # **Use `image_uri` instead.** - # - # The Google Cloud Storage URI of the form - # `gs://bucket_name/object_name`. Object versioning is not supported. See - # [Google Cloud Storage Request - # URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. - # @!attribute [rw] image_uri - # @return [::String] - # The URI of the source image. Can be either: - # - # 1. A Google Cloud Storage URI of the form - # `gs://bucket_name/object_name`. Object versioning is not supported. See - # [Google Cloud Storage Request - # URIs](https://cloud.google.com/storage/docs/reference-uris) for more - # info. - # - # 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from - # HTTP/HTTPS URLs, Google cannot guarantee that the request will be - # completed. Your request may fail if the specified host denies the - # request (e.g. due to request throttling or DOS prevention), or if Google - # throttles requests to the site for abuse prevention. You should not - # depend on externally-hosted images for production applications. - # - # When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes - # precedence. - class ImageSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Client image to perform Google Cloud Vision API tasks over. - # @!attribute [rw] content - # @return [::String] - # Image content, represented as a stream of bytes. - # Note: As with all `bytes` fields, protobuffers use a pure binary - # representation, whereas JSON representations use base64. - # - # Currently, this field only works for BatchAnnotateImages requests. It does - # not work for AsyncBatchAnnotateImages requests. - # @!attribute [rw] source - # @return [::Google::Cloud::Vision::V1::ImageSource] - # Google Cloud Storage image location, or publicly-accessible image - # URL. If both `content` and `source` are provided for an image, `content` - # takes precedence and is used to perform the image annotation request. - class Image - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A face annotation object contains the results of face detection. - # @!attribute [rw] bounding_poly - # @return [::Google::Cloud::Vision::V1::BoundingPoly] - # The bounding polygon around the face. The coordinates of the bounding box - # are in the original image's scale. - # The bounding box is computed to "frame" the face in accordance with human - # expectations. It is based on the landmarker results. - # Note that one or more x and/or y coordinates may not be generated in the - # `BoundingPoly` (the polygon will be unbounded) if only a partial face - # appears in the image to be annotated. - # @!attribute [rw] fd_bounding_poly - # @return [::Google::Cloud::Vision::V1::BoundingPoly] - # The `fd_bounding_poly` bounding polygon is tighter than the - # `boundingPoly`, and encloses only the skin part of the face. Typically, it - # is used to eliminate the face from any image analysis that detects the - # "amount of skin" visible in an image. It is not based on the - # landmarker results, only on the initial face detection, hence - # the fd (face detection) prefix. - # @!attribute [rw] landmarks - # @return [::Array<::Google::Cloud::Vision::V1::FaceAnnotation::Landmark>] - # Detected face landmarks. - # @!attribute [rw] roll_angle - # @return [::Float] - # Roll angle, which indicates the amount of clockwise/anti-clockwise rotation - # of the face relative to the image vertical about the axis perpendicular to - # the face. Range [-180,180]. - # @!attribute [rw] pan_angle - # @return [::Float] - # Yaw angle, which indicates the leftward/rightward angle that the face is - # pointing relative to the vertical plane perpendicular to the image. Range - # [-180,180]. - # @!attribute [rw] tilt_angle - # @return [::Float] - # Pitch angle, which indicates the upwards/downwards angle that the face is - # pointing relative to the image's horizontal plane. Range [-180,180]. - # @!attribute [rw] detection_confidence - # @return [::Float] - # Detection confidence. Range [0, 1]. - # @!attribute [rw] landmarking_confidence - # @return [::Float] - # Face landmarking confidence. Range [0, 1]. - # @!attribute [rw] joy_likelihood - # @return [::Google::Cloud::Vision::V1::Likelihood] - # Joy likelihood. - # @!attribute [rw] sorrow_likelihood - # @return [::Google::Cloud::Vision::V1::Likelihood] - # Sorrow likelihood. - # @!attribute [rw] anger_likelihood - # @return [::Google::Cloud::Vision::V1::Likelihood] - # Anger likelihood. - # @!attribute [rw] surprise_likelihood - # @return [::Google::Cloud::Vision::V1::Likelihood] - # Surprise likelihood. - # @!attribute [rw] under_exposed_likelihood - # @return [::Google::Cloud::Vision::V1::Likelihood] - # Under-exposed likelihood. - # @!attribute [rw] blurred_likelihood - # @return [::Google::Cloud::Vision::V1::Likelihood] - # Blurred likelihood. - # @!attribute [rw] headwear_likelihood - # @return [::Google::Cloud::Vision::V1::Likelihood] - # Headwear likelihood. - class FaceAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A face-specific landmark (for example, a face feature). - # @!attribute [rw] type - # @return [::Google::Cloud::Vision::V1::FaceAnnotation::Landmark::Type] - # Face landmark type. - # @!attribute [rw] position - # @return [::Google::Cloud::Vision::V1::Position] - # Face landmark position. - class Landmark - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Face landmark (feature) type. - # Left and right are defined from the vantage of the viewer of the image - # without considering mirror projections typical of photos. So, `LEFT_EYE`, - # typically, is the person's right eye. - module Type - # Unknown face landmark detected. Should not be filled. - UNKNOWN_LANDMARK = 0 - - # Left eye. - LEFT_EYE = 1 - - # Right eye. - RIGHT_EYE = 2 - - # Left of left eyebrow. - LEFT_OF_LEFT_EYEBROW = 3 - - # Right of left eyebrow. - RIGHT_OF_LEFT_EYEBROW = 4 - - # Left of right eyebrow. - LEFT_OF_RIGHT_EYEBROW = 5 - - # Right of right eyebrow. - RIGHT_OF_RIGHT_EYEBROW = 6 - - # Midpoint between eyes. - MIDPOINT_BETWEEN_EYES = 7 - - # Nose tip. - NOSE_TIP = 8 - - # Upper lip. - UPPER_LIP = 9 - - # Lower lip. - LOWER_LIP = 10 - - # Mouth left. - MOUTH_LEFT = 11 - - # Mouth right. - MOUTH_RIGHT = 12 - - # Mouth center. - MOUTH_CENTER = 13 - - # Nose, bottom right. - NOSE_BOTTOM_RIGHT = 14 - - # Nose, bottom left. - NOSE_BOTTOM_LEFT = 15 - - # Nose, bottom center. - NOSE_BOTTOM_CENTER = 16 - - # Left eye, top boundary. - LEFT_EYE_TOP_BOUNDARY = 17 - - # Left eye, right corner. - LEFT_EYE_RIGHT_CORNER = 18 - - # Left eye, bottom boundary. - LEFT_EYE_BOTTOM_BOUNDARY = 19 - - # Left eye, left corner. - LEFT_EYE_LEFT_CORNER = 20 - - # Right eye, top boundary. - RIGHT_EYE_TOP_BOUNDARY = 21 - - # Right eye, right corner. - RIGHT_EYE_RIGHT_CORNER = 22 - - # Right eye, bottom boundary. - RIGHT_EYE_BOTTOM_BOUNDARY = 23 - - # Right eye, left corner. - RIGHT_EYE_LEFT_CORNER = 24 - - # Left eyebrow, upper midpoint. - LEFT_EYEBROW_UPPER_MIDPOINT = 25 - - # Right eyebrow, upper midpoint. - RIGHT_EYEBROW_UPPER_MIDPOINT = 26 - - # Left ear tragion. - LEFT_EAR_TRAGION = 27 - - # Right ear tragion. - RIGHT_EAR_TRAGION = 28 - - # Left eye pupil. - LEFT_EYE_PUPIL = 29 - - # Right eye pupil. - RIGHT_EYE_PUPIL = 30 - - # Forehead glabella. - FOREHEAD_GLABELLA = 31 - - # Chin gnathion. - CHIN_GNATHION = 32 - - # Chin left gonion. - CHIN_LEFT_GONION = 33 - - # Chin right gonion. - CHIN_RIGHT_GONION = 34 - - # Left cheek center. - LEFT_CHEEK_CENTER = 35 - - # Right cheek center. - RIGHT_CHEEK_CENTER = 36 - end - end - end - - # Detected entity location information. - # @!attribute [rw] lat_lng - # @return [::Google::Type::LatLng] - # lat/long location coordinates. - class LocationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A `Property` consists of a user-supplied name/value pair. - # @!attribute [rw] name - # @return [::String] - # Name of the property. - # @!attribute [rw] value - # @return [::String] - # Value of the property. - # @!attribute [rw] uint64_value - # @return [::Integer] - # Value of numeric properties. - class Property - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Set of detected entity features. - # @!attribute [rw] mid - # @return [::String] - # Opaque entity ID. Some IDs may be available in - # [Google Knowledge Graph Search - # API](https://developers.google.com/knowledge-graph/). - # @!attribute [rw] locale - # @return [::String] - # The language code for the locale in which the entity textual - # `description` is expressed. - # @!attribute [rw] description - # @return [::String] - # Entity textual description, expressed in its `locale` language. - # @!attribute [rw] score - # @return [::Float] - # Overall score of the result. Range [0, 1]. - # @!attribute [rw] confidence - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Float] - # **Deprecated. Use `score` instead.** - # The accuracy of the entity detection in an image. - # For example, for an image in which the "Eiffel Tower" entity is detected, - # this field represents the confidence that there is a tower in the query - # image. Range [0, 1]. - # @!attribute [rw] topicality - # @return [::Float] - # The relevancy of the ICA (Image Content Annotation) label to the - # image. For example, the relevancy of "tower" is likely higher to an image - # containing the detected "Eiffel Tower" than to an image containing a - # detected distant towering building, even though the confidence that - # there is a tower in each image may be the same. Range [0, 1]. - # @!attribute [rw] bounding_poly - # @return [::Google::Cloud::Vision::V1::BoundingPoly] - # Image region to which this entity belongs. Not produced - # for `LABEL_DETECTION` features. - # @!attribute [rw] locations - # @return [::Array<::Google::Cloud::Vision::V1::LocationInfo>] - # The location information for the detected entity. Multiple - # `LocationInfo` elements can be present because one location may - # indicate the location of the scene in the image, and another location - # may indicate the location of the place where the image was taken. - # Location information is usually present for landmarks. - # @!attribute [rw] properties - # @return [::Array<::Google::Cloud::Vision::V1::Property>] - # Some entities may have optional user-supplied `Property` (name/value) - # fields, such a score or string that qualifies the entity. - class EntityAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Set of detected objects with bounding boxes. - # @!attribute [rw] mid - # @return [::String] - # Object ID that should align with EntityAnnotation mid. - # @!attribute [rw] language_code - # @return [::String] - # The BCP-47 language code, such as "en-US" or "sr-Latn". For more - # information, see - # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - # @!attribute [rw] name - # @return [::String] - # Object name, expressed in its `language_code` language. - # @!attribute [rw] score - # @return [::Float] - # Score of the result. Range [0, 1]. - # @!attribute [rw] bounding_poly - # @return [::Google::Cloud::Vision::V1::BoundingPoly] - # Image region to which this object belongs. This must be populated. - class LocalizedObjectAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Set of features pertaining to the image, computed by computer vision - # methods over safe-search verticals (for example, adult, spoof, medical, - # violence). - # @!attribute [rw] adult - # @return [::Google::Cloud::Vision::V1::Likelihood] - # Represents the adult content likelihood for the image. Adult content may - # contain elements such as nudity, pornographic images or cartoons, or - # sexual activities. - # @!attribute [rw] spoof - # @return [::Google::Cloud::Vision::V1::Likelihood] - # Spoof likelihood. The likelihood that an modification - # was made to the image's canonical version to make it appear - # funny or offensive. - # @!attribute [rw] medical - # @return [::Google::Cloud::Vision::V1::Likelihood] - # Likelihood that this is a medical image. - # @!attribute [rw] violence - # @return [::Google::Cloud::Vision::V1::Likelihood] - # Likelihood that this image contains violent content. Violent content may - # include death, serious harm, or injury to individuals or groups of - # individuals. - # @!attribute [rw] racy - # @return [::Google::Cloud::Vision::V1::Likelihood] - # Likelihood that the request image contains racy content. Racy content may - # include (but is not limited to) skimpy or sheer clothing, strategically - # covered nudity, lewd or provocative poses, or close-ups of sensitive - # body areas. - class SafeSearchAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Rectangle determined by min and max `LatLng` pairs. - # @!attribute [rw] min_lat_lng - # @return [::Google::Type::LatLng] - # Min lat/long pair. - # @!attribute [rw] max_lat_lng - # @return [::Google::Type::LatLng] - # Max lat/long pair. - class LatLongRect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Color information consists of RGB channels, score, and the fraction of - # the image that the color occupies in the image. - # @!attribute [rw] color - # @return [::Google::Type::Color] - # RGB components of the color. - # @!attribute [rw] score - # @return [::Float] - # Image-specific score for this color. Value in range [0, 1]. - # @!attribute [rw] pixel_fraction - # @return [::Float] - # The fraction of pixels the color occupies in the image. - # Value in range [0, 1]. - class ColorInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Set of dominant colors and their corresponding scores. - # @!attribute [rw] colors - # @return [::Array<::Google::Cloud::Vision::V1::ColorInfo>] - # RGB color values with their score and pixel fraction. - class DominantColorsAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Stores image properties, such as dominant colors. - # @!attribute [rw] dominant_colors - # @return [::Google::Cloud::Vision::V1::DominantColorsAnnotation] - # If present, dominant colors completed successfully. - class ImageProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Single crop hint that is used to generate a new crop when serving an image. - # @!attribute [rw] bounding_poly - # @return [::Google::Cloud::Vision::V1::BoundingPoly] - # The bounding polygon for the crop region. The coordinates of the bounding - # box are in the original image's scale. - # @!attribute [rw] confidence - # @return [::Float] - # Confidence of this being a salient region. Range [0, 1]. - # @!attribute [rw] importance_fraction - # @return [::Float] - # Fraction of importance of this salient region with respect to the original - # image. - class CropHint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Set of crop hints that are used to generate new crops when serving images. - # @!attribute [rw] crop_hints - # @return [::Array<::Google::Cloud::Vision::V1::CropHint>] - # Crop hint results. - class CropHintsAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Parameters for crop hints annotation request. - # @!attribute [rw] aspect_ratios - # @return [::Array<::Float>] - # Aspect ratios in floats, representing the ratio of the width to the height - # of the image. For example, if the desired aspect ratio is 4/3, the - # corresponding float value should be 1.33333. If not specified, the - # best possible crop is returned. The number of provided aspect ratios is - # limited to a maximum of 16; any aspect ratios provided after the 16th are - # ignored. - class CropHintsParams - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Parameters for web detection request. - # @!attribute [rw] include_geo_results - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # This field has no effect on results. - class WebDetectionParams - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Parameters for text detections. This is used to control TEXT_DETECTION and - # DOCUMENT_TEXT_DETECTION features. - # @!attribute [rw] enable_text_detection_confidence_score - # @return [::Boolean] - # By default, Cloud Vision API only includes confidence score for - # DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence - # score for TEXT_DETECTION as well. - # @!attribute [rw] advanced_ocr_options - # @return [::Array<::String>] - # A list of advanced OCR options to further fine-tune OCR behavior. - # Current valid values are: - # - # - `legacy_layout`: a heuristics layout detection algorithm, which serves as - # an alternative to the current ML-based layout detection algorithm. - # Customers can choose the best suitable layout algorithm based on their - # situation. - class TextDetectionParams - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Image context and/or feature-specific parameters. - # @!attribute [rw] lat_long_rect - # @return [::Google::Cloud::Vision::V1::LatLongRect] - # Not used. - # @!attribute [rw] language_hints - # @return [::Array<::String>] - # List of languages to use for TEXT_DETECTION. In most cases, an empty value - # yields the best results since it enables automatic language detection. For - # languages based on the Latin alphabet, setting `language_hints` is not - # needed. In rare cases, when the language of the text in the image is known, - # setting a hint will help get better results (although it will be a - # significant hindrance if the hint is wrong). Text detection returns an - # error if one or more of the specified languages is not one of the - # [supported languages](https://cloud.google.com/vision/docs/languages). - # @!attribute [rw] crop_hints_params - # @return [::Google::Cloud::Vision::V1::CropHintsParams] - # Parameters for crop hints annotation request. - # @!attribute [rw] product_search_params - # @return [::Google::Cloud::Vision::V1::ProductSearchParams] - # Parameters for product search. - # @!attribute [rw] web_detection_params - # @return [::Google::Cloud::Vision::V1::WebDetectionParams] - # Parameters for web detection. - # @!attribute [rw] text_detection_params - # @return [::Google::Cloud::Vision::V1::TextDetectionParams] - # Parameters for text detection and document text detection. - class ImageContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for performing Google Cloud Vision API tasks over a user-provided - # image, with user-requested features, and with context information. - # @!attribute [rw] image - # @return [::Google::Cloud::Vision::V1::Image] - # The image to be processed. - # @!attribute [rw] features - # @return [::Array<::Google::Cloud::Vision::V1::Feature>] - # Requested features. - # @!attribute [rw] image_context - # @return [::Google::Cloud::Vision::V1::ImageContext] - # Additional context that may accompany the image. - class AnnotateImageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # If an image was produced from a file (e.g. a PDF), this message gives - # information about the source of that image. - # @!attribute [rw] uri - # @return [::String] - # The URI of the file used to produce the image. - # @!attribute [rw] page_number - # @return [::Integer] - # If the file was a PDF or TIFF, this field gives the page number within - # the file used to produce the image. - class ImageAnnotationContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response to an image annotation request. - # @!attribute [rw] face_annotations - # @return [::Array<::Google::Cloud::Vision::V1::FaceAnnotation>] - # If present, face detection has completed successfully. - # @!attribute [rw] landmark_annotations - # @return [::Array<::Google::Cloud::Vision::V1::EntityAnnotation>] - # If present, landmark detection has completed successfully. - # @!attribute [rw] logo_annotations - # @return [::Array<::Google::Cloud::Vision::V1::EntityAnnotation>] - # If present, logo detection has completed successfully. - # @!attribute [rw] label_annotations - # @return [::Array<::Google::Cloud::Vision::V1::EntityAnnotation>] - # If present, label detection has completed successfully. - # @!attribute [rw] localized_object_annotations - # @return [::Array<::Google::Cloud::Vision::V1::LocalizedObjectAnnotation>] - # If present, localized object detection has completed successfully. - # This will be sorted descending by confidence score. - # @!attribute [rw] text_annotations - # @return [::Array<::Google::Cloud::Vision::V1::EntityAnnotation>] - # If present, text (OCR) detection has completed successfully. - # @!attribute [rw] full_text_annotation - # @return [::Google::Cloud::Vision::V1::TextAnnotation] - # If present, text (OCR) detection or document (OCR) text detection has - # completed successfully. - # This annotation provides the structural hierarchy for the OCR detected - # text. - # @!attribute [rw] safe_search_annotation - # @return [::Google::Cloud::Vision::V1::SafeSearchAnnotation] - # If present, safe-search annotation has completed successfully. - # @!attribute [rw] image_properties_annotation - # @return [::Google::Cloud::Vision::V1::ImageProperties] - # If present, image properties were extracted successfully. - # @!attribute [rw] crop_hints_annotation - # @return [::Google::Cloud::Vision::V1::CropHintsAnnotation] - # If present, crop hints have completed successfully. - # @!attribute [rw] web_detection - # @return [::Google::Cloud::Vision::V1::WebDetection] - # If present, web detection has completed successfully. - # @!attribute [rw] product_search_results - # @return [::Google::Cloud::Vision::V1::ProductSearchResults] - # If present, product search has completed successfully. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # If set, represents the error message for the operation. - # Note that filled-in image annotations are guaranteed to be - # correct, even when `error` is set. - # @!attribute [rw] context - # @return [::Google::Cloud::Vision::V1::ImageAnnotationContext] - # If present, contextual information is needed to understand where this image - # comes from. - class AnnotateImageResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Multiple image annotation requests are batched into a single service call. - # @!attribute [rw] requests - # @return [::Array<::Google::Cloud::Vision::V1::AnnotateImageRequest>] - # Required. Individual image annotation requests for this batch. - # @!attribute [rw] parent - # @return [::String] - # Optional. Target project and location to make a call. - # - # Format: `projects/{project-id}/locations/{location-id}`. - # - # If no parent is specified, a region will be chosen automatically. - # - # Supported location-ids: - # `us`: USA country only, - # `asia`: East asia areas, like Japan, Taiwan, - # `eu`: The European Union. - # - # Example: `projects/project-A/locations/eu`. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The labels with user-defined metadata for the request. - # - # Label keys and values can be no longer than 63 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # Label values are optional. Label keys must start with a letter. - class BatchAnnotateImagesRequest - 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 - - # Response to a batch image annotation request. - # @!attribute [rw] responses - # @return [::Array<::Google::Cloud::Vision::V1::AnnotateImageResponse>] - # Individual responses to image annotation requests within the batch. - class BatchAnnotateImagesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to annotate one single file, e.g. a PDF, TIFF or GIF file. - # @!attribute [rw] input_config - # @return [::Google::Cloud::Vision::V1::InputConfig] - # Required. Information about the input file. - # @!attribute [rw] features - # @return [::Array<::Google::Cloud::Vision::V1::Feature>] - # Required. Requested features. - # @!attribute [rw] image_context - # @return [::Google::Cloud::Vision::V1::ImageContext] - # Additional context that may accompany the image(s) in the file. - # @!attribute [rw] pages - # @return [::Array<::Integer>] - # Pages of the file to perform image annotation. - # - # Pages starts from 1, we assume the first page of the file is page 1. - # At most 5 pages are supported per request. Pages can be negative. - # - # Page 1 means the first page. - # Page 2 means the second page. - # Page -1 means the last page. - # Page -2 means the second to the last page. - # - # If the file is GIF instead of PDF or TIFF, page refers to GIF frames. - # - # If this field is empty, by default the service performs image annotation - # for the first 5 pages of the file. - class AnnotateFileRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response to a single file annotation request. A file may contain one or more - # images, which individually have their own responses. - # @!attribute [rw] input_config - # @return [::Google::Cloud::Vision::V1::InputConfig] - # Information about the file for which this response is generated. - # @!attribute [rw] responses - # @return [::Array<::Google::Cloud::Vision::V1::AnnotateImageResponse>] - # Individual responses to images found within the file. This field will be - # empty if the `error` field is set. - # @!attribute [rw] total_pages - # @return [::Integer] - # This field gives the total number of pages in the file. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # If set, represents the error message for the failed request. The - # `responses` field will not be set in this case. - class AnnotateFileResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A list of requests to annotate files using the BatchAnnotateFiles API. - # @!attribute [rw] requests - # @return [::Array<::Google::Cloud::Vision::V1::AnnotateFileRequest>] - # Required. The list of file annotation requests. Right now we support only - # one AnnotateFileRequest in BatchAnnotateFilesRequest. - # @!attribute [rw] parent - # @return [::String] - # Optional. Target project and location to make a call. - # - # Format: `projects/{project-id}/locations/{location-id}`. - # - # If no parent is specified, a region will be chosen automatically. - # - # Supported location-ids: - # `us`: USA country only, - # `asia`: East asia areas, like Japan, Taiwan, - # `eu`: The European Union. - # - # Example: `projects/project-A/locations/eu`. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The labels with user-defined metadata for the request. - # - # Label keys and values can be no longer than 63 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # Label values are optional. Label keys must start with a letter. - class BatchAnnotateFilesRequest - 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 list of file annotation responses. - # @!attribute [rw] responses - # @return [::Array<::Google::Cloud::Vision::V1::AnnotateFileResponse>] - # The list of file annotation responses, each response corresponding to each - # AnnotateFileRequest in BatchAnnotateFilesRequest. - class BatchAnnotateFilesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An offline file annotation request. - # @!attribute [rw] input_config - # @return [::Google::Cloud::Vision::V1::InputConfig] - # Required. Information about the input file. - # @!attribute [rw] features - # @return [::Array<::Google::Cloud::Vision::V1::Feature>] - # Required. Requested features. - # @!attribute [rw] image_context - # @return [::Google::Cloud::Vision::V1::ImageContext] - # Additional context that may accompany the image(s) in the file. - # @!attribute [rw] output_config - # @return [::Google::Cloud::Vision::V1::OutputConfig] - # Required. The desired output location and metadata (e.g. format). - class AsyncAnnotateFileRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for a single offline file annotation request. - # @!attribute [rw] output_config - # @return [::Google::Cloud::Vision::V1::OutputConfig] - # The output location and metadata from AsyncAnnotateFileRequest. - class AsyncAnnotateFileResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for async image annotation for a list of images. - # @!attribute [rw] requests - # @return [::Array<::Google::Cloud::Vision::V1::AnnotateImageRequest>] - # Required. Individual image annotation requests for this batch. - # @!attribute [rw] output_config - # @return [::Google::Cloud::Vision::V1::OutputConfig] - # Required. The desired output location and metadata (e.g. format). - # @!attribute [rw] parent - # @return [::String] - # Optional. Target project and location to make a call. - # - # Format: `projects/{project-id}/locations/{location-id}`. - # - # If no parent is specified, a region will be chosen automatically. - # - # Supported location-ids: - # `us`: USA country only, - # `asia`: East asia areas, like Japan, Taiwan, - # `eu`: The European Union. - # - # Example: `projects/project-A/locations/eu`. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The labels with user-defined metadata for the request. - # - # Label keys and values can be no longer than 63 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # Label values are optional. Label keys must start with a letter. - class AsyncBatchAnnotateImagesRequest - 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 - - # Response to an async batch image annotation request. - # @!attribute [rw] output_config - # @return [::Google::Cloud::Vision::V1::OutputConfig] - # The output location and metadata from AsyncBatchAnnotateImagesRequest. - class AsyncBatchAnnotateImagesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Multiple async file annotation requests are batched into a single service - # call. - # @!attribute [rw] requests - # @return [::Array<::Google::Cloud::Vision::V1::AsyncAnnotateFileRequest>] - # Required. Individual async file annotation requests for this batch. - # @!attribute [rw] parent - # @return [::String] - # Optional. Target project and location to make a call. - # - # Format: `projects/{project-id}/locations/{location-id}`. - # - # If no parent is specified, a region will be chosen automatically. - # - # Supported location-ids: - # `us`: USA country only, - # `asia`: East asia areas, like Japan, Taiwan, - # `eu`: The European Union. - # - # Example: `projects/project-A/locations/eu`. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The labels with user-defined metadata for the request. - # - # Label keys and values can be no longer than 63 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # Label values are optional. Label keys must start with a letter. - class AsyncBatchAnnotateFilesRequest - 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 - - # Response to an async batch file annotation request. - # @!attribute [rw] responses - # @return [::Array<::Google::Cloud::Vision::V1::AsyncAnnotateFileResponse>] - # The list of file annotation responses, one for each request in - # AsyncBatchAnnotateFilesRequest. - class AsyncBatchAnnotateFilesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The desired input location and metadata. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::Vision::V1::GcsSource] - # The Google Cloud Storage location to read the input from. - # @!attribute [rw] content - # @return [::String] - # File content, represented as a stream of bytes. - # Note: As with all `bytes` fields, protobuffers use a pure binary - # representation, whereas JSON representations use base64. - # - # Currently, this field only works for BatchAnnotateFiles requests. It does - # not work for AsyncBatchAnnotateFiles requests. - # @!attribute [rw] mime_type - # @return [::String] - # The type of the file. Currently only "application/pdf", "image/tiff" and - # "image/gif" are supported. Wildcards are not supported. - class InputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The desired output location and metadata. - # @!attribute [rw] gcs_destination - # @return [::Google::Cloud::Vision::V1::GcsDestination] - # The Google Cloud Storage location to write the output(s) to. - # @!attribute [rw] batch_size - # @return [::Integer] - # The max number of response protos to put into each output JSON file on - # Google Cloud Storage. - # The valid range is [1, 100]. If not specified, the default value is 20. - # - # For example, for one pdf file with 100 pages, 100 response protos will - # be generated. If `batch_size` = 20, then 5 json files each - # containing 20 response protos will be written under the prefix - # `gcs_destination`.`uri`. - # - # Currently, batch_size only applies to GcsDestination, with potential future - # support for other output configurations. - class OutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The Google Cloud Storage location where the input will be read from. - # @!attribute [rw] uri - # @return [::String] - # Google Cloud Storage URI for the input file. This must only be a - # Google Cloud Storage object. Wildcards are not currently supported. - class GcsSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The Google Cloud Storage location where the output will be written to. - # @!attribute [rw] uri - # @return [::String] - # Google Cloud Storage URI prefix where the results will be stored. Results - # will be in JSON format and preceded by its corresponding input URI prefix. - # This field can either represent a gcs file prefix or gcs directory. In - # either case, the uri should be unique because in order to get all of the - # output files, you will need to do a wildcard gcs search on the uri prefix - # you provide. - # - # Examples: - # - # * File Prefix: gs://bucket-name/here/filenameprefix The output files - # will be created in gs://bucket-name/here/ and the names of the - # output files will begin with "filenameprefix". - # - # * Directory Prefix: gs://bucket-name/some/location/ The output files - # will be created in gs://bucket-name/some/location/ and the names of the - # output files could be anything because there was no filename prefix - # specified. - # - # If multiple outputs, each response is still AnnotateFileResponse, each of - # which contains some subset of the full list of AnnotateImageResponse. - # Multiple outputs can happen if, for example, the output JSON is too large - # and overflows into multiple sharded files. - class GcsDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains metadata for the BatchAnnotateImages operation. - # @!attribute [rw] state - # @return [::Google::Cloud::Vision::V1::OperationMetadata::State] - # Current state of the batch operation. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time when the batch request was received. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time when the operation result was last updated. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Batch operation states. - module State - # Invalid. - STATE_UNSPECIFIED = 0 - - # Request is received. - CREATED = 1 - - # Request is actively being processed. - RUNNING = 2 - - # The batch processing is done. - DONE = 3 - - # The batch processing was cancelled. - CANCELLED = 4 - end - end - - # A bucketized representation of likelihood, which is intended to give clients - # highly stable results across model upgrades. - module Likelihood - # Unknown likelihood. - UNKNOWN = 0 - - # It is very unlikely. - VERY_UNLIKELY = 1 - - # It is unlikely. - UNLIKELY = 2 - - # It is possible. - POSSIBLE = 3 - - # It is likely. - LIKELY = 4 - - # It is very likely. - VERY_LIKELY = 5 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/product_search.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/product_search.rb deleted file mode 100644 index 318b05a5cd70..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/product_search.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 Cloud - module Vision - module V1 - # Parameters for a product search request. - # @!attribute [rw] bounding_poly - # @return [::Google::Cloud::Vision::V1::BoundingPoly] - # The bounding polygon around the area of interest in the image. - # If it is not specified, system discretion will be applied. - # @!attribute [rw] product_set - # @return [::String] - # The resource name of a {::Google::Cloud::Vision::V1::ProductSet ProductSet} to - # be searched for similar images. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - # @!attribute [rw] product_categories - # @return [::Array<::String>] - # The list of product categories to search in. Currently, we only consider - # the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", - # "packagedgoods-v1", or "general-v1" should be specified. The legacy - # categories "homegoods", "apparel", and "toys" are still supported but will - # be deprecated. For new products, please use "homegoods-v2", "apparel-v2", - # or "toys-v2" for better product search accuracy. It is recommended to - # migrate existing products to these categories as well. - # @!attribute [rw] filter - # @return [::String] - # The filtering expression. This can be used to restrict search results based - # on Product labels. We currently support an AND of OR of key-value - # expressions, where each expression within an OR must have the same key. An - # '=' should be used to connect the key and value. - # - # For example, "(color = red OR color = blue) AND brand = Google" is - # acceptable, but "(color = red OR brand = Google)" is not acceptable. - # "color: red" is not acceptable because it uses a ':' instead of an '='. - class ProductSearchParams - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Results for a product search request. - # @!attribute [rw] index_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp of the index which provided these results. Products added to the - # product set and products removed from the product set after this time are - # not reflected in the current results. - # @!attribute [rw] results - # @return [::Array<::Google::Cloud::Vision::V1::ProductSearchResults::Result>] - # List of results, one for each product match. - # @!attribute [rw] product_grouped_results - # @return [::Array<::Google::Cloud::Vision::V1::ProductSearchResults::GroupedResult>] - # List of results grouped by products detected in the query image. Each entry - # corresponds to one bounding polygon in the query image, and contains the - # matching products specific to that region. There may be duplicate product - # matches in the union of all the per-product results. - class ProductSearchResults - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Information about a product. - # @!attribute [rw] product - # @return [::Google::Cloud::Vision::V1::Product] - # The Product. - # @!attribute [rw] score - # @return [::Float] - # A confidence level on the match, ranging from 0 (no confidence) to - # 1 (full confidence). - # @!attribute [rw] image - # @return [::String] - # The resource name of the image from the product that is the closest match - # to the query. - class Result - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Prediction for what the object in the bounding box is. - # @!attribute [rw] mid - # @return [::String] - # Object ID that should align with EntityAnnotation mid. - # @!attribute [rw] language_code - # @return [::String] - # The BCP-47 language code, such as "en-US" or "sr-Latn". For more - # information, see - # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - # @!attribute [rw] name - # @return [::String] - # Object name, expressed in its `language_code` language. - # @!attribute [rw] score - # @return [::Float] - # Score of the result. Range [0, 1]. - class ObjectAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about the products similar to a single product in a query - # image. - # @!attribute [rw] bounding_poly - # @return [::Google::Cloud::Vision::V1::BoundingPoly] - # The bounding polygon around the product detected in the query image. - # @!attribute [rw] results - # @return [::Array<::Google::Cloud::Vision::V1::ProductSearchResults::Result>] - # List of results, one for each product match. - # @!attribute [rw] object_annotations - # @return [::Array<::Google::Cloud::Vision::V1::ProductSearchResults::ObjectAnnotation>] - # List of generic predictions for the object in the bounding box. - class GroupedResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/product_search_service.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/product_search_service.rb deleted file mode 100644 index eda363febf12..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/product_search_service.rb +++ /dev/null @@ -1,678 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Vision - module V1 - # A Product contains ReferenceImages. - # @!attribute [rw] name - # @return [::String] - # The resource name of the product. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - # - # This field is ignored when creating a product. - # @!attribute [rw] display_name - # @return [::String] - # The user-provided name for this Product. Must not be empty. Must be at most - # 4096 characters long. - # @!attribute [rw] description - # @return [::String] - # User-provided metadata to be stored with this product. Must be at most 4096 - # characters long. - # @!attribute [rw] product_category - # @return [::String] - # Immutable. The category for the product identified by the reference image. - # This should be one of "homegoods-v2", "apparel-v2", "toys-v2", - # "packagedgoods-v1" or "general-v1". The legacy categories "homegoods", - # "apparel", and "toys" are still supported, but these should not be used for - # new products. - # @!attribute [rw] product_labels - # @return [::Array<::Google::Cloud::Vision::V1::Product::KeyValue>] - # Key-value pairs that can be attached to a product. At query time, - # constraints can be specified based on the product_labels. - # - # Note that integer values can be provided as strings, e.g. "1199". Only - # strings with integer values can match a range-based restriction which is - # to be supported soon. - # - # Multiple values can be assigned to the same key. One product may have up to - # 500 product_labels. - # - # Notice that the total number of distinct product_labels over all products - # in one ProductSet cannot exceed 1M, otherwise the product search pipeline - # will refuse to work for that ProductSet. - class Product - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A product label represented as a key-value pair. - # @!attribute [rw] key - # @return [::String] - # The key of the label attached to the product. Cannot be empty and cannot - # exceed 128 bytes. - # @!attribute [rw] value - # @return [::String] - # The value of the label attached to the product. Cannot be empty and - # cannot exceed 128 bytes. - class KeyValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A ProductSet contains Products. A ProductSet can contain a maximum of 1 - # million reference images. If the limit is exceeded, periodic indexing will - # fail. - # @!attribute [rw] name - # @return [::String] - # The resource name of the ProductSet. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - # - # This field is ignored when creating a ProductSet. - # @!attribute [rw] display_name - # @return [::String] - # The user-provided name for this ProductSet. Must not be empty. Must be at - # most 4096 characters long. - # @!attribute [r] index_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which this ProductSet was last indexed. Query - # results will reflect all updates before this time. If this ProductSet has - # never been indexed, this timestamp is the default value - # "1970-01-01T00:00:00Z". - # - # This field is ignored when creating a ProductSet. - # @!attribute [r] index_error - # @return [::Google::Rpc::Status] - # Output only. If there was an error with indexing the product set, the field - # is populated. - # - # This field is ignored when creating a ProductSet. - class ProductSet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A `ReferenceImage` represents a product image and its associated metadata, - # such as bounding boxes. - # @!attribute [rw] name - # @return [::String] - # The resource name of the reference image. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - # - # This field is ignored when creating a reference image. - # @!attribute [rw] uri - # @return [::String] - # Required. The Google Cloud Storage URI of the reference image. - # - # The URI must start with `gs://`. - # @!attribute [rw] bounding_polys - # @return [::Array<::Google::Cloud::Vision::V1::BoundingPoly>] - # Optional. Bounding polygons around the areas of interest in the reference - # image. If this field is empty, the system will try to detect regions of - # interest. At most 10 bounding polygons will be used. - # - # The provided shape is converted into a non-rotated rectangle. Once - # converted, the small edge of the rectangle must be greater than or equal - # to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 - # is not). - class ReferenceImage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `CreateProduct` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project in which the Product should be created. - # - # Format is - # `projects/PROJECT_ID/locations/LOC_ID`. - # @!attribute [rw] product - # @return [::Google::Cloud::Vision::V1::Product] - # Required. The product to create. - # @!attribute [rw] product_id - # @return [::String] - # A user-supplied resource id for this Product. If set, the server will - # attempt to use this value as the resource id. If it is already in use, an - # error is returned with code ALREADY_EXISTS. Must be at most 128 characters - # long. It cannot contain the character `/`. - class CreateProductRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListProducts` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project OR ProductSet from which Products should be listed. - # - # Format: - # `projects/PROJECT_ID/locations/LOC_ID` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return. Default 10, maximum 100. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token returned from a previous List request, if any. - class ListProductsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListProducts` method. - # @!attribute [rw] products - # @return [::Array<::Google::Cloud::Vision::V1::Product>] - # List of products. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListProductsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetProduct` method. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the Product to get. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - class GetProductRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateProduct` method. - # @!attribute [rw] product - # @return [::Google::Cloud::Vision::V1::Product] - # Required. The Product resource which replaces the one on the server. - # product.name is immutable. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The {::Google::Protobuf::FieldMask FieldMask} that specifies which fields - # to update. - # If update_mask isn't specified, all mutable fields are to be updated. - # Valid mask paths include `product_labels`, `display_name`, and - # `description`. - class UpdateProductRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteProduct` method. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of product to delete. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - class DeleteProductRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `CreateProductSet` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project in which the ProductSet should be created. - # - # Format is `projects/PROJECT_ID/locations/LOC_ID`. - # @!attribute [rw] product_set - # @return [::Google::Cloud::Vision::V1::ProductSet] - # Required. The ProductSet to create. - # @!attribute [rw] product_set_id - # @return [::String] - # A user-supplied resource id for this ProductSet. If set, the server will - # attempt to use this value as the resource id. If it is already in use, an - # error is returned with code ALREADY_EXISTS. Must be at most 128 characters - # long. It cannot contain the character `/`. - class CreateProductSetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListProductSets` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project from which ProductSets should be listed. - # - # Format is `projects/PROJECT_ID/locations/LOC_ID`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return. Default 10, maximum 100. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token returned from a previous List request, if any. - class ListProductSetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListProductSets` method. - # @!attribute [rw] product_sets - # @return [::Array<::Google::Cloud::Vision::V1::ProductSet>] - # List of ProductSets. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListProductSetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetProductSet` method. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the ProductSet to get. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - class GetProductSetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `UpdateProductSet` method. - # @!attribute [rw] product_set - # @return [::Google::Cloud::Vision::V1::ProductSet] - # Required. The ProductSet resource which replaces the one on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The {::Google::Protobuf::FieldMask FieldMask} that specifies which fields to - # update. - # If update_mask isn't specified, all mutable fields are to be updated. - # Valid mask path is `display_name`. - class UpdateProductSetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteProductSet` method. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the ProductSet to delete. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - class DeleteProductSetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `CreateReferenceImage` method. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the product in which to create the reference - # image. - # - # Format is - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - # @!attribute [rw] reference_image - # @return [::Google::Cloud::Vision::V1::ReferenceImage] - # Required. The reference image to create. - # If an image ID is specified, it is ignored. - # @!attribute [rw] reference_image_id - # @return [::String] - # A user-supplied resource id for the ReferenceImage to be added. If set, - # the server will attempt to use this value as the resource id. If it is - # already in use, an error is returned with code ALREADY_EXISTS. Must be at - # most 128 characters long. It cannot contain the character `/`. - class CreateReferenceImageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListReferenceImages` method. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the product containing the reference images. - # - # Format is - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return. Default 10, maximum 100. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results to be returned. This is the value - # of `nextPageToken` returned in a previous reference image list request. - # - # Defaults to the first page if not specified. - class ListReferenceImagesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListReferenceImages` method. - # @!attribute [rw] reference_images - # @return [::Array<::Google::Cloud::Vision::V1::ReferenceImage>] - # The list of reference images. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return. Default 10, maximum 100. - # @!attribute [rw] next_page_token - # @return [::String] - # The next_page_token returned from a previous List request, if any. - class ListReferenceImagesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetReferenceImage` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the ReferenceImage to get. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - class GetReferenceImageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteReferenceImage` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the reference image to delete. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` - class DeleteReferenceImageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `AddProductToProductSet` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name for the ProductSet to modify. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - # @!attribute [rw] product - # @return [::String] - # Required. The resource name for the Product to be added to this ProductSet. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - class AddProductToProductSetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `RemoveProductFromProductSet` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name for the ProductSet to modify. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - # @!attribute [rw] product - # @return [::String] - # Required. The resource name for the Product to be removed from this - # ProductSet. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - class RemoveProductFromProductSetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListProductsInProductSet` method. - # @!attribute [rw] name - # @return [::String] - # Required. The ProductSet resource for which to retrieve Products. - # - # Format is: - # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return. Default 10, maximum 100. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token returned from a previous List request, if any. - class ListProductsInProductSetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListProductsInProductSet` method. - # @!attribute [rw] products - # @return [::Array<::Google::Cloud::Vision::V1::Product>] - # The list of Products. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListProductsInProductSetResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The Google Cloud Storage location for a csv file which preserves a list of - # ImportProductSetRequests in each line. - # @!attribute [rw] csv_file_uri - # @return [::String] - # The Google Cloud Storage URI of the input csv file. - # - # The URI must start with `gs://`. - # - # The format of the input csv file should be one image per line. - # In each line, there are 8 columns. - # - # 1. image-uri - # 2. image-id - # 3. product-set-id - # 4. product-id - # 5. product-category - # 6. product-display-name - # 7. labels - # 8. bounding-poly - # - # The `image-uri`, `product-set-id`, `product-id`, and `product-category` - # columns are required. All other columns are optional. - # - # If the `ProductSet` or `Product` specified by the `product-set-id` and - # `product-id` values does not exist, then the system will create a new - # `ProductSet` or `Product` for the image. In this case, the - # `product-display-name` column refers to - # {::Google::Cloud::Vision::V1::Product#display_name display_name}, the - # `product-category` column refers to - # {::Google::Cloud::Vision::V1::Product#product_category product_category}, and - # the `labels` column refers to - # {::Google::Cloud::Vision::V1::Product#product_labels product_labels}. - # - # The `image-id` column is optional but must be unique if provided. If it is - # empty, the system will automatically assign a unique id to the image. - # - # The `product-display-name` column is optional. If it is empty, the system - # sets the {::Google::Cloud::Vision::V1::Product#display_name display_name} field - # for the product to a space (" "). You can update the `display_name` later - # by using the API. - # - # If a `Product` with the specified `product-id` already exists, then the - # system ignores the `product-display-name`, `product-category`, and `labels` - # columns. - # - # The `labels` column (optional) is a line containing a list of - # comma-separated key-value pairs, in the following format: - # - # "key_1=value_1,key_2=value_2,...,key_n=value_n" - # - # The `bounding-poly` column (optional) identifies one region of - # interest from the image in the same manner as `CreateReferenceImage`. If - # you do not specify the `bounding-poly` column, then the system will try to - # detect regions of interest automatically. - # - # At most one `bounding-poly` column is allowed per line. If the image - # contains multiple regions of interest, add a line to the CSV file that - # includes the same product information, and the `bounding-poly` values for - # each region of interest. - # - # The `bounding-poly` column must contain an even number of comma-separated - # numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use - # non-negative integers for absolute bounding polygons, and float values - # in [0, 1] for normalized bounding polygons. - # - # The system will resize the image if the image resolution is too - # large to process (larger than 20MP). - class ImportProductSetsGcsSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The input content for the `ImportProductSets` method. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::Vision::V1::ImportProductSetsGcsSource] - # The Google Cloud Storage location for a csv file which preserves a list - # of ImportProductSetRequests in each line. - class ImportProductSetsInputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ImportProductSets` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project in which the ProductSets should be imported. - # - # Format is `projects/PROJECT_ID/locations/LOC_ID`. - # @!attribute [rw] input_config - # @return [::Google::Cloud::Vision::V1::ImportProductSetsInputConfig] - # Required. The input content for the list of requests. - class ImportProductSetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ImportProductSets` method. - # - # This message is returned by the - # google.longrunning.Operations.GetOperation - # method in the returned - # {::Google::Longrunning::Operation#response google.longrunning.Operation.response} - # field. - # @!attribute [rw] reference_images - # @return [::Array<::Google::Cloud::Vision::V1::ReferenceImage>] - # The list of reference_images that are imported successfully. - # @!attribute [rw] statuses - # @return [::Array<::Google::Rpc::Status>] - # The rpc status for each ImportProductSet request, including both successes - # and errors. - # - # The number of statuses here matches the number of lines in the csv file, - # and statuses[i] stores the success or failure status of processing the i-th - # line of the csv, starting from line 0. - class ImportProductSetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for the batch operations such as the current state. - # - # This is included in the `metadata` field of the `Operation` returned by the - # `GetOperation` call of the `google::longrunning::Operations` service. - # @!attribute [rw] state - # @return [::Google::Cloud::Vision::V1::BatchOperationMetadata::State] - # The current state of the batch operation. - # @!attribute [rw] submit_time - # @return [::Google::Protobuf::Timestamp] - # The time when the batch request was submitted to the server. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time when the batch request is finished and - # {::Google::Longrunning::Operation#done google.longrunning.Operation.done} is - # set to true. - class BatchOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enumerates the possible states that the batch request can be in. - module State - # Invalid. - STATE_UNSPECIFIED = 0 - - # Request is actively being processed. - PROCESSING = 1 - - # The request is done and at least one item has been successfully - # processed. - SUCCESSFUL = 2 - - # The request is done and no item has been successfully processed. - FAILED = 3 - - # The request is done after the longrunning.Operations.CancelOperation has - # been called by the user. Any records that were processed before the - # cancel command are output as specified in the request. - CANCELLED = 4 - end - end - - # Config to control which ProductSet contains the Products to be deleted. - # @!attribute [rw] product_set_id - # @return [::String] - # The ProductSet that contains the Products to delete. If a Product is a - # member of product_set_id in addition to other ProductSets, the Product will - # still be deleted. - class ProductSetPurgeConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `PurgeProducts` method. - # @!attribute [rw] product_set_purge_config - # @return [::Google::Cloud::Vision::V1::ProductSetPurgeConfig] - # Specify which ProductSet contains the Products to be deleted. - # - # Note: The following fields are mutually exclusive: `product_set_purge_config`, `delete_orphan_products`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] delete_orphan_products - # @return [::Boolean] - # If delete_orphan_products is true, all Products that are not in any - # ProductSet will be deleted. - # - # Note: The following fields are mutually exclusive: `delete_orphan_products`, `product_set_purge_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location in which the Products should be deleted. - # - # Format is `projects/PROJECT_ID/locations/LOC_ID`. - # @!attribute [rw] force - # @return [::Boolean] - # The default value is false. Override this value to true to actually perform - # the purge. - class PurgeProductsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/text_annotation.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/text_annotation.rb deleted file mode 100644 index 19520c43fbb9..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/text_annotation.rb +++ /dev/null @@ -1,286 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Vision - module V1 - # TextAnnotation contains a structured representation of OCR extracted text. - # The hierarchy of an OCR extracted text structure is like this: - # TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol - # Each structural component, starting from Page, may further have their own - # properties. Properties describe detected languages, breaks etc.. Please refer - # to the - # {::Google::Cloud::Vision::V1::TextAnnotation::TextProperty TextAnnotation.TextProperty} - # message definition below for more detail. - # @!attribute [rw] pages - # @return [::Array<::Google::Cloud::Vision::V1::Page>] - # List of pages detected by OCR. - # @!attribute [rw] text - # @return [::String] - # UTF-8 text detected on the pages. - class TextAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Detected language for a structural component. - # @!attribute [rw] language_code - # @return [::String] - # The BCP-47 language code, such as "en-US" or "sr-Latn". For more - # information, see - # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - # @!attribute [rw] confidence - # @return [::Float] - # Confidence of detected language. Range [0, 1]. - class DetectedLanguage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Detected start or end of a structural component. - # @!attribute [rw] type - # @return [::Google::Cloud::Vision::V1::TextAnnotation::DetectedBreak::BreakType] - # Detected break type. - # @!attribute [rw] is_prefix - # @return [::Boolean] - # True if break prepends the element. - class DetectedBreak - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum to denote the type of break found. New line, space etc. - module BreakType - # Unknown break label type. - UNKNOWN = 0 - - # Regular space. - SPACE = 1 - - # Sure space (very wide). - SURE_SPACE = 2 - - # Line-wrapping break. - EOL_SURE_SPACE = 3 - - # End-line hyphen that is not present in text; does not co-occur with - # `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`. - HYPHEN = 4 - - # Line break that ends a paragraph. - LINE_BREAK = 5 - end - end - - # Additional information detected on the structural component. - # @!attribute [rw] detected_languages - # @return [::Array<::Google::Cloud::Vision::V1::TextAnnotation::DetectedLanguage>] - # A list of detected languages together with confidence. - # @!attribute [rw] detected_break - # @return [::Google::Cloud::Vision::V1::TextAnnotation::DetectedBreak] - # Detected start or end of a text segment. - class TextProperty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Detected page from OCR. - # @!attribute [rw] property - # @return [::Google::Cloud::Vision::V1::TextAnnotation::TextProperty] - # Additional information detected on the page. - # @!attribute [rw] width - # @return [::Integer] - # Page width. For PDFs the unit is points. For images (including - # TIFFs) the unit is pixels. - # @!attribute [rw] height - # @return [::Integer] - # Page height. For PDFs the unit is points. For images (including - # TIFFs) the unit is pixels. - # @!attribute [rw] blocks - # @return [::Array<::Google::Cloud::Vision::V1::Block>] - # List of blocks of text, images etc on this page. - # @!attribute [rw] confidence - # @return [::Float] - # Confidence of the OCR results on the page. Range [0, 1]. - class Page - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Logical element on the page. - # @!attribute [rw] property - # @return [::Google::Cloud::Vision::V1::TextAnnotation::TextProperty] - # Additional information detected for the block. - # @!attribute [rw] bounding_box - # @return [::Google::Cloud::Vision::V1::BoundingPoly] - # The bounding box for the block. - # The vertices are in the order of top-left, top-right, bottom-right, - # bottom-left. When a rotation of the bounding box is detected the rotation - # is represented as around the top-left corner as defined when the text is - # read in the 'natural' orientation. - # For example: - # - # * when the text is horizontal it might look like: - # - # 0----1 - # | | - # 3----2 - # - # * when it's rotated 180 degrees around the top-left corner it becomes: - # - # 2----3 - # | | - # 1----0 - # - # and the vertex order will still be (0, 1, 2, 3). - # @!attribute [rw] paragraphs - # @return [::Array<::Google::Cloud::Vision::V1::Paragraph>] - # List of paragraphs in this block (if this blocks is of type text). - # @!attribute [rw] block_type - # @return [::Google::Cloud::Vision::V1::Block::BlockType] - # Detected block type (text, image etc) for this block. - # @!attribute [rw] confidence - # @return [::Float] - # Confidence of the OCR results on the block. Range [0, 1]. - class Block - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of a block (text, image etc) as identified by OCR. - module BlockType - # Unknown block type. - UNKNOWN = 0 - - # Regular text block. - TEXT = 1 - - # Table block. - TABLE = 2 - - # Image block. - PICTURE = 3 - - # Horizontal/vertical line box. - RULER = 4 - - # Barcode block. - BARCODE = 5 - end - end - - # Structural unit of text representing a number of words in certain order. - # @!attribute [rw] property - # @return [::Google::Cloud::Vision::V1::TextAnnotation::TextProperty] - # Additional information detected for the paragraph. - # @!attribute [rw] bounding_box - # @return [::Google::Cloud::Vision::V1::BoundingPoly] - # The bounding box for the paragraph. - # The vertices are in the order of top-left, top-right, bottom-right, - # bottom-left. When a rotation of the bounding box is detected the rotation - # is represented as around the top-left corner as defined when the text is - # read in the 'natural' orientation. - # For example: - # * when the text is horizontal it might look like: - # 0----1 - # | | - # 3----2 - # * when it's rotated 180 degrees around the top-left corner it becomes: - # 2----3 - # | | - # 1----0 - # and the vertex order will still be (0, 1, 2, 3). - # @!attribute [rw] words - # @return [::Array<::Google::Cloud::Vision::V1::Word>] - # List of all words in this paragraph. - # @!attribute [rw] confidence - # @return [::Float] - # Confidence of the OCR results for the paragraph. Range [0, 1]. - class Paragraph - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A word representation. - # @!attribute [rw] property - # @return [::Google::Cloud::Vision::V1::TextAnnotation::TextProperty] - # Additional information detected for the word. - # @!attribute [rw] bounding_box - # @return [::Google::Cloud::Vision::V1::BoundingPoly] - # The bounding box for the word. - # The vertices are in the order of top-left, top-right, bottom-right, - # bottom-left. When a rotation of the bounding box is detected the rotation - # is represented as around the top-left corner as defined when the text is - # read in the 'natural' orientation. - # For example: - # * when the text is horizontal it might look like: - # 0----1 - # | | - # 3----2 - # * when it's rotated 180 degrees around the top-left corner it becomes: - # 2----3 - # | | - # 1----0 - # and the vertex order will still be (0, 1, 2, 3). - # @!attribute [rw] symbols - # @return [::Array<::Google::Cloud::Vision::V1::Symbol>] - # List of symbols in the word. - # The order of the symbols follows the natural reading order. - # @!attribute [rw] confidence - # @return [::Float] - # Confidence of the OCR results for the word. Range [0, 1]. - class Word - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A single symbol representation. - # @!attribute [rw] property - # @return [::Google::Cloud::Vision::V1::TextAnnotation::TextProperty] - # Additional information detected for the symbol. - # @!attribute [rw] bounding_box - # @return [::Google::Cloud::Vision::V1::BoundingPoly] - # The bounding box for the symbol. - # The vertices are in the order of top-left, top-right, bottom-right, - # bottom-left. When a rotation of the bounding box is detected the rotation - # is represented as around the top-left corner as defined when the text is - # read in the 'natural' orientation. - # For example: - # * when the text is horizontal it might look like: - # 0----1 - # | | - # 3----2 - # * when it's rotated 180 degrees around the top-left corner it becomes: - # 2----3 - # | | - # 1----0 - # and the vertex order will still be (0, 1, 2, 3). - # @!attribute [rw] text - # @return [::String] - # The actual UTF-8 representation of the symbol. - # @!attribute [rw] confidence - # @return [::Float] - # Confidence of the OCR results for the symbol. Range [0, 1]. - class Symbol - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/web_detection.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/web_detection.rb deleted file mode 100644 index ec63a93612b9..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/cloud/vision/v1/web_detection.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 Cloud - module Vision - module V1 - # Relevant information for the image from the Internet. - # @!attribute [rw] web_entities - # @return [::Array<::Google::Cloud::Vision::V1::WebDetection::WebEntity>] - # Deduced entities from similar images on the Internet. - # @!attribute [rw] full_matching_images - # @return [::Array<::Google::Cloud::Vision::V1::WebDetection::WebImage>] - # Fully matching images from the Internet. - # Can include resized copies of the query image. - # @!attribute [rw] partial_matching_images - # @return [::Array<::Google::Cloud::Vision::V1::WebDetection::WebImage>] - # Partial matching images from the Internet. - # Those images are similar enough to share some key-point features. For - # example an original image will likely have partial matching for its crops. - # @!attribute [rw] pages_with_matching_images - # @return [::Array<::Google::Cloud::Vision::V1::WebDetection::WebPage>] - # Web pages containing the matching images from the Internet. - # @!attribute [rw] visually_similar_images - # @return [::Array<::Google::Cloud::Vision::V1::WebDetection::WebImage>] - # The visually similar image results. - # @!attribute [rw] best_guess_labels - # @return [::Array<::Google::Cloud::Vision::V1::WebDetection::WebLabel>] - # The service's best guess as to the topic of the request image. - # Inferred from similar images on the open web. - class WebDetection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Entity deduced from similar images on the Internet. - # @!attribute [rw] entity_id - # @return [::String] - # Opaque entity ID. - # @!attribute [rw] score - # @return [::Float] - # Overall relevancy score for the entity. - # Not normalized and not comparable across different image queries. - # @!attribute [rw] description - # @return [::String] - # Canonical description of the entity, in English. - class WebEntity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for online images. - # @!attribute [rw] url - # @return [::String] - # The result image URL. - # @!attribute [rw] score - # @return [::Float] - # (Deprecated) Overall relevancy score for the image. - class WebImage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for web pages. - # @!attribute [rw] url - # @return [::String] - # The result web page URL. - # @!attribute [rw] score - # @return [::Float] - # (Deprecated) Overall relevancy score for the web page. - # @!attribute [rw] page_title - # @return [::String] - # Title for the web page, may contain HTML markups. - # @!attribute [rw] full_matching_images - # @return [::Array<::Google::Cloud::Vision::V1::WebDetection::WebImage>] - # Fully matching images on the page. - # Can include resized copies of the query image. - # @!attribute [rw] partial_matching_images - # @return [::Array<::Google::Cloud::Vision::V1::WebDetection::WebImage>] - # Partial matching images on the page. - # Those images are similar enough to share some key-point features. For - # example an original image will likely have partial matching for its - # crops. - class WebPage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Label to provide extra metadata for the web detection. - # @!attribute [rw] label - # @return [::String] - # Label for extra metadata. - # @!attribute [rw] language_code - # @return [::String] - # The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". - # For more information, see - # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - class WebLabel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-vision-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-vision-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-vision-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-vision-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-vision-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-vision-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-vision-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-vision-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-vision-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-vision-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-vision-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-vision-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,148 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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`. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!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-vision-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-vision-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-vision-v1/proto_docs/google/type/color.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/type/color.rb deleted file mode 100644 index 246dafcb7710..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/type/color.rb +++ /dev/null @@ -1,173 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness. For example, the fields of this representation - # can be trivially provided to the constructor of `java.awt.Color` in Java; it - # can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS `rgba()` string in JavaScript. - # - # This reference page doesn't carry information about the absolute color - # space - # that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, - # DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color - # space. - # - # When color equality needs to be decided, implementations, unless - # documented otherwise, treat two colors as equal if all their red, - # green, blue, and alpha values each differ by at most 1e-5. - # - # Example (Java): - # - # import com.google.type.Color; - # - # // ... - # public static java.awt.Color fromProto(Color protocolor) { - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # } - # - # public static Color toProto(java.awt.Color color) { - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) { - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # } - # return resultBuilder.build(); - # } - # // ... - # - # Example (iOS / Obj-C): - # - # // ... - # static UIColor* fromProto(Color* protocolor) { - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) { - # alpha = [alpha_wrapper value]; - # } - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # } - # - # static Color* toProto(UIColor* color) { - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { - # return nil; - # } - # Color* result = [[Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) { - # [result setAlpha:floatWrapperWithValue(alpha)]; - # } - # [result autorelease]; - # return result; - # } - # // ... - # - # Example (JavaScript): - # - # // ... - # - # var protoToCssColor = function(rgb_color) { - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # - # if (!('alpha' in rgb_color)) { - # return rgbToCssColor(red, green, blue); - # } - # - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # }; - # - # var rgbToCssColor = function(red, green, blue) { - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) { - # resultBuilder.push('0'); - # } - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # }; - # - # // ... - # @!attribute [rw] red - # @return [::Float] - # The amount of red in the color as a value in the interval [0, 1]. - # @!attribute [rw] green - # @return [::Float] - # The amount of green in the color as a value in the interval [0, 1]. - # @!attribute [rw] blue - # @return [::Float] - # The amount of blue in the color as a value in the interval [0, 1]. - # @!attribute [rw] alpha - # @return [::Google::Protobuf::FloatValue] - # The fraction of this color that should be applied to the pixel. That is, - # the final pixel color is defined by the equation: - # - # `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` - # - # This means that a value of 1.0 corresponds to a solid color, whereas - # a value of 0.0 corresponds to a completely transparent color. This - # uses a wrapper message rather than a simple float scalar so that it is - # possible to distinguish between a default value and the value being unset. - # If omitted, this color object is rendered as a solid color - # (as if the alpha value had been explicitly given a value of 1.0). - class Color - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/type/latlng.rb b/owl-bot-staging/google-cloud-vision-v1/proto_docs/google/type/latlng.rb deleted file mode 100644 index c15e78a39a56..000000000000 --- a/owl-bot-staging/google-cloud-vision-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-vision-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-vision-v1/snippets/Gemfile deleted file mode 100644 index f5b6677dd9b7..000000000000 --- a/owl-bot-staging/google-cloud-vision-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-vision-v1", path: "../" -else - gem "google-cloud-vision-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-vision-v1/snippets/image_annotator/async_batch_annotate_files.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/async_batch_annotate_files.rb deleted file mode 100644 index e83f5c97d0fa..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/async_batch_annotate_files.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 vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync] -require "google/cloud/vision/v1" - -## -# Snippet for the async_batch_annotate_files call in the ImageAnnotator service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Vision::V1::ImageAnnotator::Client#async_batch_annotate_files. -# -def async_batch_annotate_files - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest.new - - # Call the async_batch_annotate_files method. - result = client.async_batch_annotate_files request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/async_batch_annotate_images.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/async_batch_annotate_images.rb deleted file mode 100644 index dfb3dc749753..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/async_batch_annotate_images.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 vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateImages_sync] -require "google/cloud/vision/v1" - -## -# Snippet for the async_batch_annotate_images call in the ImageAnnotator service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Vision::V1::ImageAnnotator::Client#async_batch_annotate_images. -# -def async_batch_annotate_images - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest.new - - # Call the async_batch_annotate_images method. - result = client.async_batch_annotate_images request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateImages_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/batch_annotate_files.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/batch_annotate_files.rb deleted file mode 100644 index 5fea86a2cde0..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/batch_annotate_files.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 vision_v1_generated_ImageAnnotator_BatchAnnotateFiles_sync] -require "google/cloud/vision/v1" - -## -# Snippet for the batch_annotate_files call in the ImageAnnotator service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Vision::V1::ImageAnnotator::Client#batch_annotate_files. -# -def batch_annotate_files - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Vision::V1::BatchAnnotateFilesRequest.new - - # Call the batch_annotate_files method. - result = client.batch_annotate_files request - - # The returned object is of type Google::Cloud::Vision::V1::BatchAnnotateFilesResponse. - p result -end -# [END vision_v1_generated_ImageAnnotator_BatchAnnotateFiles_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/batch_annotate_images.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/batch_annotate_images.rb deleted file mode 100644 index 0e012c922685..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/snippets/image_annotator/batch_annotate_images.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 vision_v1_generated_ImageAnnotator_BatchAnnotateImages_sync] -require "google/cloud/vision/v1" - -## -# Snippet for the batch_annotate_images call in the ImageAnnotator service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Vision::V1::ImageAnnotator::Client#batch_annotate_images. -# -def batch_annotate_images - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Vision::V1::BatchAnnotateImagesRequest.new - - # Call the batch_annotate_images method. - result = client.batch_annotate_images request - - # The returned object is of type Google::Cloud::Vision::V1::BatchAnnotateImagesResponse. - p result -end -# [END vision_v1_generated_ImageAnnotator_BatchAnnotateImages_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/add_product_to_product_set.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/add_product_to_product_set.rb deleted file mode 100644 index 55681168a2ab..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/add_product_to_product_set.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 vision_v1_generated_ProductSearch_AddProductToProductSet_sync] -require "google/cloud/vision/v1" - -## -# Snippet for the add_product_to_product_set call in the ProductSearch service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Vision::V1::ProductSearch::Client#add_product_to_product_set. -# -def add_product_to_product_set - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Vision::V1::ProductSearch::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Vision::V1::AddProductToProductSetRequest.new - - # Call the add_product_to_product_set method. - result = client.add_product_to_product_set request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END vision_v1_generated_ProductSearch_AddProductToProductSet_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/create_product.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/create_product.rb deleted file mode 100644 index 280ffae881fd..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/create_product.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 vision_v1_generated_ProductSearch_CreateProduct_sync] -require "google/cloud/vision/v1" - -## -# Snippet for the create_product call in the ProductSearch service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Vision::V1::ProductSearch::Client#create_product. -# -def create_product - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Vision::V1::ProductSearch::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Vision::V1::CreateProductRequest.new - - # Call the create_product method. - result = client.create_product request - - # The returned object is of type Google::Cloud::Vision::V1::Product. - p result -end -# [END vision_v1_generated_ProductSearch_CreateProduct_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/create_product_set.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/create_product_set.rb deleted file mode 100644 index e8cd77b37622..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/create_product_set.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 vision_v1_generated_ProductSearch_CreateProductSet_sync] -require "google/cloud/vision/v1" - -## -# Snippet for the create_product_set call in the ProductSearch service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Vision::V1::ProductSearch::Client#create_product_set. -# -def create_product_set - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Vision::V1::ProductSearch::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Vision::V1::CreateProductSetRequest.new - - # Call the create_product_set method. - result = client.create_product_set request - - # The returned object is of type Google::Cloud::Vision::V1::ProductSet. - p result -end -# [END vision_v1_generated_ProductSearch_CreateProductSet_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/create_reference_image.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/create_reference_image.rb deleted file mode 100644 index 1c3bb7ec393a..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/create_reference_image.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 vision_v1_generated_ProductSearch_CreateReferenceImage_sync] -require "google/cloud/vision/v1" - -## -# Snippet for the create_reference_image call in the ProductSearch service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Vision::V1::ProductSearch::Client#create_reference_image. -# -def create_reference_image - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Vision::V1::ProductSearch::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Vision::V1::CreateReferenceImageRequest.new - - # Call the create_reference_image method. - result = client.create_reference_image request - - # The returned object is of type Google::Cloud::Vision::V1::ReferenceImage. - p result -end -# [END vision_v1_generated_ProductSearch_CreateReferenceImage_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/delete_product.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/delete_product.rb deleted file mode 100644 index 50eace65ad2b..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/delete_product.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 vision_v1_generated_ProductSearch_DeleteProduct_sync] -require "google/cloud/vision/v1" - -## -# Snippet for the delete_product call in the ProductSearch service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Vision::V1::ProductSearch::Client#delete_product. -# -def delete_product - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Vision::V1::ProductSearch::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Vision::V1::DeleteProductRequest.new - - # Call the delete_product method. - result = client.delete_product request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END vision_v1_generated_ProductSearch_DeleteProduct_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/delete_product_set.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/delete_product_set.rb deleted file mode 100644 index e983c7e0da75..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/delete_product_set.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 vision_v1_generated_ProductSearch_DeleteProductSet_sync] -require "google/cloud/vision/v1" - -## -# Snippet for the delete_product_set call in the ProductSearch service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Vision::V1::ProductSearch::Client#delete_product_set. -# -def delete_product_set - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Vision::V1::ProductSearch::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Vision::V1::DeleteProductSetRequest.new - - # Call the delete_product_set method. - result = client.delete_product_set request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END vision_v1_generated_ProductSearch_DeleteProductSet_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/delete_reference_image.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/delete_reference_image.rb deleted file mode 100644 index 7c10f44db0bf..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/delete_reference_image.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 vision_v1_generated_ProductSearch_DeleteReferenceImage_sync] -require "google/cloud/vision/v1" - -## -# Snippet for the delete_reference_image call in the ProductSearch service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Vision::V1::ProductSearch::Client#delete_reference_image. -# -def delete_reference_image - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Vision::V1::ProductSearch::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Vision::V1::DeleteReferenceImageRequest.new - - # Call the delete_reference_image method. - result = client.delete_reference_image request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END vision_v1_generated_ProductSearch_DeleteReferenceImage_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/get_product.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/get_product.rb deleted file mode 100644 index db06ed938335..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/get_product.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 vision_v1_generated_ProductSearch_GetProduct_sync] -require "google/cloud/vision/v1" - -## -# Snippet for the get_product call in the ProductSearch service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Vision::V1::ProductSearch::Client#get_product. -# -def get_product - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Vision::V1::ProductSearch::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Vision::V1::GetProductRequest.new - - # Call the get_product method. - result = client.get_product request - - # The returned object is of type Google::Cloud::Vision::V1::Product. - p result -end -# [END vision_v1_generated_ProductSearch_GetProduct_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/get_product_set.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/get_product_set.rb deleted file mode 100644 index bcc3fa9dc69d..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/get_product_set.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 vision_v1_generated_ProductSearch_GetProductSet_sync] -require "google/cloud/vision/v1" - -## -# Snippet for the get_product_set call in the ProductSearch service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Vision::V1::ProductSearch::Client#get_product_set. -# -def get_product_set - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Vision::V1::ProductSearch::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Vision::V1::GetProductSetRequest.new - - # Call the get_product_set method. - result = client.get_product_set request - - # The returned object is of type Google::Cloud::Vision::V1::ProductSet. - p result -end -# [END vision_v1_generated_ProductSearch_GetProductSet_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/get_reference_image.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/get_reference_image.rb deleted file mode 100644 index f62773c4cede..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/get_reference_image.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 vision_v1_generated_ProductSearch_GetReferenceImage_sync] -require "google/cloud/vision/v1" - -## -# Snippet for the get_reference_image call in the ProductSearch service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Vision::V1::ProductSearch::Client#get_reference_image. -# -def get_reference_image - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Vision::V1::ProductSearch::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Vision::V1::GetReferenceImageRequest.new - - # Call the get_reference_image method. - result = client.get_reference_image request - - # The returned object is of type Google::Cloud::Vision::V1::ReferenceImage. - p result -end -# [END vision_v1_generated_ProductSearch_GetReferenceImage_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/import_product_sets.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/import_product_sets.rb deleted file mode 100644 index 4ae1def4b916..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/import_product_sets.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 vision_v1_generated_ProductSearch_ImportProductSets_sync] -require "google/cloud/vision/v1" - -## -# Snippet for the import_product_sets call in the ProductSearch service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Vision::V1::ProductSearch::Client#import_product_sets. -# -def import_product_sets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Vision::V1::ProductSearch::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Vision::V1::ImportProductSetsRequest.new - - # Call the import_product_sets method. - result = client.import_product_sets request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END vision_v1_generated_ProductSearch_ImportProductSets_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_product_sets.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_product_sets.rb deleted file mode 100644 index b8aafb61fb88..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_product_sets.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 vision_v1_generated_ProductSearch_ListProductSets_sync] -require "google/cloud/vision/v1" - -## -# Snippet for the list_product_sets call in the ProductSearch service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Vision::V1::ProductSearch::Client#list_product_sets. -# -def list_product_sets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Vision::V1::ProductSearch::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Vision::V1::ListProductSetsRequest.new - - # Call the list_product_sets method. - result = client.list_product_sets request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Vision::V1::ProductSet. - p item - end -end -# [END vision_v1_generated_ProductSearch_ListProductSets_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_products.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_products.rb deleted file mode 100644 index c87e2d162e8a..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_products.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 vision_v1_generated_ProductSearch_ListProducts_sync] -require "google/cloud/vision/v1" - -## -# Snippet for the list_products call in the ProductSearch service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Vision::V1::ProductSearch::Client#list_products. -# -def list_products - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Vision::V1::ProductSearch::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Vision::V1::ListProductsRequest.new - - # Call the list_products method. - result = client.list_products request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Vision::V1::Product. - p item - end -end -# [END vision_v1_generated_ProductSearch_ListProducts_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_products_in_product_set.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_products_in_product_set.rb deleted file mode 100644 index 4a002d8e80d6..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_products_in_product_set.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 vision_v1_generated_ProductSearch_ListProductsInProductSet_sync] -require "google/cloud/vision/v1" - -## -# Snippet for the list_products_in_product_set call in the ProductSearch service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Vision::V1::ProductSearch::Client#list_products_in_product_set. -# -def list_products_in_product_set - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Vision::V1::ProductSearch::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Vision::V1::ListProductsInProductSetRequest.new - - # Call the list_products_in_product_set method. - result = client.list_products_in_product_set request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Vision::V1::Product. - p item - end -end -# [END vision_v1_generated_ProductSearch_ListProductsInProductSet_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_reference_images.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_reference_images.rb deleted file mode 100644 index c82bb6635940..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/list_reference_images.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 vision_v1_generated_ProductSearch_ListReferenceImages_sync] -require "google/cloud/vision/v1" - -## -# Snippet for the list_reference_images call in the ProductSearch service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Vision::V1::ProductSearch::Client#list_reference_images. -# -def list_reference_images - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Vision::V1::ProductSearch::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Vision::V1::ListReferenceImagesRequest.new - - # Call the list_reference_images method. - result = client.list_reference_images request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Vision::V1::ReferenceImage. - p item - end -end -# [END vision_v1_generated_ProductSearch_ListReferenceImages_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/purge_products.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/purge_products.rb deleted file mode 100644 index a10e930054c8..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/purge_products.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 vision_v1_generated_ProductSearch_PurgeProducts_sync] -require "google/cloud/vision/v1" - -## -# Snippet for the purge_products call in the ProductSearch service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Vision::V1::ProductSearch::Client#purge_products. -# -def purge_products - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Vision::V1::ProductSearch::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Vision::V1::PurgeProductsRequest.new - - # Call the purge_products method. - result = client.purge_products request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END vision_v1_generated_ProductSearch_PurgeProducts_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/remove_product_from_product_set.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/remove_product_from_product_set.rb deleted file mode 100644 index 349a813e5f75..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/remove_product_from_product_set.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 vision_v1_generated_ProductSearch_RemoveProductFromProductSet_sync] -require "google/cloud/vision/v1" - -## -# Snippet for the remove_product_from_product_set call in the ProductSearch service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Vision::V1::ProductSearch::Client#remove_product_from_product_set. -# -def remove_product_from_product_set - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Vision::V1::ProductSearch::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest.new - - # Call the remove_product_from_product_set method. - result = client.remove_product_from_product_set request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END vision_v1_generated_ProductSearch_RemoveProductFromProductSet_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/update_product.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/update_product.rb deleted file mode 100644 index 3ae0104b30a5..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/update_product.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 vision_v1_generated_ProductSearch_UpdateProduct_sync] -require "google/cloud/vision/v1" - -## -# Snippet for the update_product call in the ProductSearch service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Vision::V1::ProductSearch::Client#update_product. -# -def update_product - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Vision::V1::ProductSearch::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Vision::V1::UpdateProductRequest.new - - # Call the update_product method. - result = client.update_product request - - # The returned object is of type Google::Cloud::Vision::V1::Product. - p result -end -# [END vision_v1_generated_ProductSearch_UpdateProduct_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/update_product_set.rb b/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/update_product_set.rb deleted file mode 100644 index 5a3761a60dc6..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/snippets/product_search/update_product_set.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 vision_v1_generated_ProductSearch_UpdateProductSet_sync] -require "google/cloud/vision/v1" - -## -# Snippet for the update_product_set call in the ProductSearch service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Vision::V1::ProductSearch::Client#update_product_set. -# -def update_product_set - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Vision::V1::ProductSearch::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Vision::V1::UpdateProductSetRequest.new - - # Call the update_product_set method. - result = client.update_product_set request - - # The returned object is of type Google::Cloud::Vision::V1::ProductSet. - p result -end -# [END vision_v1_generated_ProductSearch_UpdateProductSet_sync] diff --git a/owl-bot-staging/google-cloud-vision-v1/snippets/snippet_metadata_google.cloud.vision.v1.json b/owl-bot-staging/google-cloud-vision-v1/snippets/snippet_metadata_google.cloud.vision.v1.json deleted file mode 100644 index f493bfb8fe4f..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/snippets/snippet_metadata_google.cloud.vision.v1.json +++ /dev/null @@ -1,935 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-vision-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.vision.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "vision_v1_generated_ProductSearch_CreateProductSet_sync", - "title": "Snippet for the create_product_set call in the ProductSearch service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#create_product_set.", - "file": "product_search/create_product_set.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_product_set", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#create_product_set", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Vision::V1::CreateProductSetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Vision::V1::ProductSet", - "client": { - "short_name": "ProductSearch::Client", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" - }, - "method": { - "short_name": "CreateProductSet", - "full_name": "google.cloud.vision.v1.ProductSearch.CreateProductSet", - "service": { - "short_name": "ProductSearch", - "full_name": "google.cloud.vision.v1.ProductSearch" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "vision_v1_generated_ProductSearch_ListProductSets_sync", - "title": "Snippet for the list_product_sets call in the ProductSearch service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#list_product_sets.", - "file": "product_search/list_product_sets.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_product_sets", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#list_product_sets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Vision::V1::ListProductSetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Vision::V1::ListProductSetsResponse", - "client": { - "short_name": "ProductSearch::Client", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" - }, - "method": { - "short_name": "ListProductSets", - "full_name": "google.cloud.vision.v1.ProductSearch.ListProductSets", - "service": { - "short_name": "ProductSearch", - "full_name": "google.cloud.vision.v1.ProductSearch" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "vision_v1_generated_ProductSearch_GetProductSet_sync", - "title": "Snippet for the get_product_set call in the ProductSearch service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#get_product_set.", - "file": "product_search/get_product_set.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_product_set", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#get_product_set", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Vision::V1::GetProductSetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Vision::V1::ProductSet", - "client": { - "short_name": "ProductSearch::Client", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" - }, - "method": { - "short_name": "GetProductSet", - "full_name": "google.cloud.vision.v1.ProductSearch.GetProductSet", - "service": { - "short_name": "ProductSearch", - "full_name": "google.cloud.vision.v1.ProductSearch" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "vision_v1_generated_ProductSearch_UpdateProductSet_sync", - "title": "Snippet for the update_product_set call in the ProductSearch service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#update_product_set.", - "file": "product_search/update_product_set.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_product_set", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#update_product_set", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Vision::V1::UpdateProductSetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Vision::V1::ProductSet", - "client": { - "short_name": "ProductSearch::Client", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" - }, - "method": { - "short_name": "UpdateProductSet", - "full_name": "google.cloud.vision.v1.ProductSearch.UpdateProductSet", - "service": { - "short_name": "ProductSearch", - "full_name": "google.cloud.vision.v1.ProductSearch" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "vision_v1_generated_ProductSearch_DeleteProductSet_sync", - "title": "Snippet for the delete_product_set call in the ProductSearch service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#delete_product_set.", - "file": "product_search/delete_product_set.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_product_set", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#delete_product_set", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Vision::V1::DeleteProductSetRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ProductSearch::Client", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" - }, - "method": { - "short_name": "DeleteProductSet", - "full_name": "google.cloud.vision.v1.ProductSearch.DeleteProductSet", - "service": { - "short_name": "ProductSearch", - "full_name": "google.cloud.vision.v1.ProductSearch" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "vision_v1_generated_ProductSearch_CreateProduct_sync", - "title": "Snippet for the create_product call in the ProductSearch service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#create_product.", - "file": "product_search/create_product.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_product", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#create_product", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Vision::V1::CreateProductRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Vision::V1::Product", - "client": { - "short_name": "ProductSearch::Client", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" - }, - "method": { - "short_name": "CreateProduct", - "full_name": "google.cloud.vision.v1.ProductSearch.CreateProduct", - "service": { - "short_name": "ProductSearch", - "full_name": "google.cloud.vision.v1.ProductSearch" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "vision_v1_generated_ProductSearch_ListProducts_sync", - "title": "Snippet for the list_products call in the ProductSearch service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#list_products.", - "file": "product_search/list_products.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_products", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#list_products", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Vision::V1::ListProductsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Vision::V1::ListProductsResponse", - "client": { - "short_name": "ProductSearch::Client", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" - }, - "method": { - "short_name": "ListProducts", - "full_name": "google.cloud.vision.v1.ProductSearch.ListProducts", - "service": { - "short_name": "ProductSearch", - "full_name": "google.cloud.vision.v1.ProductSearch" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "vision_v1_generated_ProductSearch_GetProduct_sync", - "title": "Snippet for the get_product call in the ProductSearch service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#get_product.", - "file": "product_search/get_product.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_product", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#get_product", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Vision::V1::GetProductRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Vision::V1::Product", - "client": { - "short_name": "ProductSearch::Client", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" - }, - "method": { - "short_name": "GetProduct", - "full_name": "google.cloud.vision.v1.ProductSearch.GetProduct", - "service": { - "short_name": "ProductSearch", - "full_name": "google.cloud.vision.v1.ProductSearch" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "vision_v1_generated_ProductSearch_UpdateProduct_sync", - "title": "Snippet for the update_product call in the ProductSearch service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#update_product.", - "file": "product_search/update_product.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_product", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#update_product", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Vision::V1::UpdateProductRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Vision::V1::Product", - "client": { - "short_name": "ProductSearch::Client", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" - }, - "method": { - "short_name": "UpdateProduct", - "full_name": "google.cloud.vision.v1.ProductSearch.UpdateProduct", - "service": { - "short_name": "ProductSearch", - "full_name": "google.cloud.vision.v1.ProductSearch" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "vision_v1_generated_ProductSearch_DeleteProduct_sync", - "title": "Snippet for the delete_product call in the ProductSearch service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#delete_product.", - "file": "product_search/delete_product.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_product", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#delete_product", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Vision::V1::DeleteProductRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ProductSearch::Client", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" - }, - "method": { - "short_name": "DeleteProduct", - "full_name": "google.cloud.vision.v1.ProductSearch.DeleteProduct", - "service": { - "short_name": "ProductSearch", - "full_name": "google.cloud.vision.v1.ProductSearch" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "vision_v1_generated_ProductSearch_CreateReferenceImage_sync", - "title": "Snippet for the create_reference_image call in the ProductSearch service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#create_reference_image.", - "file": "product_search/create_reference_image.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_reference_image", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#create_reference_image", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Vision::V1::CreateReferenceImageRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Vision::V1::ReferenceImage", - "client": { - "short_name": "ProductSearch::Client", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" - }, - "method": { - "short_name": "CreateReferenceImage", - "full_name": "google.cloud.vision.v1.ProductSearch.CreateReferenceImage", - "service": { - "short_name": "ProductSearch", - "full_name": "google.cloud.vision.v1.ProductSearch" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "vision_v1_generated_ProductSearch_DeleteReferenceImage_sync", - "title": "Snippet for the delete_reference_image call in the ProductSearch service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#delete_reference_image.", - "file": "product_search/delete_reference_image.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_reference_image", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#delete_reference_image", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Vision::V1::DeleteReferenceImageRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ProductSearch::Client", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" - }, - "method": { - "short_name": "DeleteReferenceImage", - "full_name": "google.cloud.vision.v1.ProductSearch.DeleteReferenceImage", - "service": { - "short_name": "ProductSearch", - "full_name": "google.cloud.vision.v1.ProductSearch" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "vision_v1_generated_ProductSearch_ListReferenceImages_sync", - "title": "Snippet for the list_reference_images call in the ProductSearch service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#list_reference_images.", - "file": "product_search/list_reference_images.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_reference_images", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#list_reference_images", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Vision::V1::ListReferenceImagesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Vision::V1::ListReferenceImagesResponse", - "client": { - "short_name": "ProductSearch::Client", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" - }, - "method": { - "short_name": "ListReferenceImages", - "full_name": "google.cloud.vision.v1.ProductSearch.ListReferenceImages", - "service": { - "short_name": "ProductSearch", - "full_name": "google.cloud.vision.v1.ProductSearch" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "vision_v1_generated_ProductSearch_GetReferenceImage_sync", - "title": "Snippet for the get_reference_image call in the ProductSearch service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#get_reference_image.", - "file": "product_search/get_reference_image.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_reference_image", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#get_reference_image", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Vision::V1::GetReferenceImageRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Vision::V1::ReferenceImage", - "client": { - "short_name": "ProductSearch::Client", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" - }, - "method": { - "short_name": "GetReferenceImage", - "full_name": "google.cloud.vision.v1.ProductSearch.GetReferenceImage", - "service": { - "short_name": "ProductSearch", - "full_name": "google.cloud.vision.v1.ProductSearch" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "vision_v1_generated_ProductSearch_AddProductToProductSet_sync", - "title": "Snippet for the add_product_to_product_set call in the ProductSearch service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#add_product_to_product_set.", - "file": "product_search/add_product_to_product_set.rb", - "language": "RUBY", - "client_method": { - "short_name": "add_product_to_product_set", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#add_product_to_product_set", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Vision::V1::AddProductToProductSetRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ProductSearch::Client", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" - }, - "method": { - "short_name": "AddProductToProductSet", - "full_name": "google.cloud.vision.v1.ProductSearch.AddProductToProductSet", - "service": { - "short_name": "ProductSearch", - "full_name": "google.cloud.vision.v1.ProductSearch" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "vision_v1_generated_ProductSearch_RemoveProductFromProductSet_sync", - "title": "Snippet for the remove_product_from_product_set call in the ProductSearch service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#remove_product_from_product_set.", - "file": "product_search/remove_product_from_product_set.rb", - "language": "RUBY", - "client_method": { - "short_name": "remove_product_from_product_set", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#remove_product_from_product_set", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ProductSearch::Client", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" - }, - "method": { - "short_name": "RemoveProductFromProductSet", - "full_name": "google.cloud.vision.v1.ProductSearch.RemoveProductFromProductSet", - "service": { - "short_name": "ProductSearch", - "full_name": "google.cloud.vision.v1.ProductSearch" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "vision_v1_generated_ProductSearch_ListProductsInProductSet_sync", - "title": "Snippet for the list_products_in_product_set call in the ProductSearch service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#list_products_in_product_set.", - "file": "product_search/list_products_in_product_set.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_products_in_product_set", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#list_products_in_product_set", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Vision::V1::ListProductsInProductSetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Vision::V1::ListProductsInProductSetResponse", - "client": { - "short_name": "ProductSearch::Client", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" - }, - "method": { - "short_name": "ListProductsInProductSet", - "full_name": "google.cloud.vision.v1.ProductSearch.ListProductsInProductSet", - "service": { - "short_name": "ProductSearch", - "full_name": "google.cloud.vision.v1.ProductSearch" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "vision_v1_generated_ProductSearch_ImportProductSets_sync", - "title": "Snippet for the import_product_sets call in the ProductSearch service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#import_product_sets.", - "file": "product_search/import_product_sets.rb", - "language": "RUBY", - "client_method": { - "short_name": "import_product_sets", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#import_product_sets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Vision::V1::ImportProductSetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ProductSearch::Client", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" - }, - "method": { - "short_name": "ImportProductSets", - "full_name": "google.cloud.vision.v1.ProductSearch.ImportProductSets", - "service": { - "short_name": "ProductSearch", - "full_name": "google.cloud.vision.v1.ProductSearch" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "vision_v1_generated_ProductSearch_PurgeProducts_sync", - "title": "Snippet for the purge_products call in the ProductSearch service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ProductSearch::Client#purge_products.", - "file": "product_search/purge_products.rb", - "language": "RUBY", - "client_method": { - "short_name": "purge_products", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client#purge_products", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Vision::V1::PurgeProductsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ProductSearch::Client", - "full_name": "::Google::Cloud::Vision::V1::ProductSearch::Client" - }, - "method": { - "short_name": "PurgeProducts", - "full_name": "google.cloud.vision.v1.ProductSearch.PurgeProducts", - "service": { - "short_name": "ProductSearch", - "full_name": "google.cloud.vision.v1.ProductSearch" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "vision_v1_generated_ImageAnnotator_BatchAnnotateImages_sync", - "title": "Snippet for the batch_annotate_images call in the ImageAnnotator service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ImageAnnotator::Client#batch_annotate_images.", - "file": "image_annotator/batch_annotate_images.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_annotate_images", - "full_name": "::Google::Cloud::Vision::V1::ImageAnnotator::Client#batch_annotate_images", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Vision::V1::BatchAnnotateImagesResponse", - "client": { - "short_name": "ImageAnnotator::Client", - "full_name": "::Google::Cloud::Vision::V1::ImageAnnotator::Client" - }, - "method": { - "short_name": "BatchAnnotateImages", - "full_name": "google.cloud.vision.v1.ImageAnnotator.BatchAnnotateImages", - "service": { - "short_name": "ImageAnnotator", - "full_name": "google.cloud.vision.v1.ImageAnnotator" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "vision_v1_generated_ImageAnnotator_BatchAnnotateFiles_sync", - "title": "Snippet for the batch_annotate_files call in the ImageAnnotator service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ImageAnnotator::Client#batch_annotate_files.", - "file": "image_annotator/batch_annotate_files.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_annotate_files", - "full_name": "::Google::Cloud::Vision::V1::ImageAnnotator::Client#batch_annotate_files", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Vision::V1::BatchAnnotateFilesResponse", - "client": { - "short_name": "ImageAnnotator::Client", - "full_name": "::Google::Cloud::Vision::V1::ImageAnnotator::Client" - }, - "method": { - "short_name": "BatchAnnotateFiles", - "full_name": "google.cloud.vision.v1.ImageAnnotator.BatchAnnotateFiles", - "service": { - "short_name": "ImageAnnotator", - "full_name": "google.cloud.vision.v1.ImageAnnotator" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateImages_sync", - "title": "Snippet for the async_batch_annotate_images call in the ImageAnnotator service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ImageAnnotator::Client#async_batch_annotate_images.", - "file": "image_annotator/async_batch_annotate_images.rb", - "language": "RUBY", - "client_method": { - "short_name": "async_batch_annotate_images", - "full_name": "::Google::Cloud::Vision::V1::ImageAnnotator::Client#async_batch_annotate_images", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ImageAnnotator::Client", - "full_name": "::Google::Cloud::Vision::V1::ImageAnnotator::Client" - }, - "method": { - "short_name": "AsyncBatchAnnotateImages", - "full_name": "google.cloud.vision.v1.ImageAnnotator.AsyncBatchAnnotateImages", - "service": { - "short_name": "ImageAnnotator", - "full_name": "google.cloud.vision.v1.ImageAnnotator" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync", - "title": "Snippet for the async_batch_annotate_files call in the ImageAnnotator service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Vision::V1::ImageAnnotator::Client#async_batch_annotate_files.", - "file": "image_annotator/async_batch_annotate_files.rb", - "language": "RUBY", - "client_method": { - "short_name": "async_batch_annotate_files", - "full_name": "::Google::Cloud::Vision::V1::ImageAnnotator::Client#async_batch_annotate_files", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ImageAnnotator::Client", - "full_name": "::Google::Cloud::Vision::V1::ImageAnnotator::Client" - }, - "method": { - "short_name": "AsyncBatchAnnotateFiles", - "full_name": "google.cloud.vision.v1.ImageAnnotator.AsyncBatchAnnotateFiles", - "service": { - "short_name": "ImageAnnotator", - "full_name": "google.cloud.vision.v1.ImageAnnotator" - } - } - }, - "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-vision-v1/test/google/cloud/vision/v1/image_annotator_operations_test.rb b/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_operations_test.rb deleted file mode 100644 index 7266d0f044cb..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_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/vision/v1/image_annotator_pb" -require "google/cloud/vision/v1/image_annotator_services_pb" -require "google/cloud/vision/v1/image_annotator" - -class ::Google::Cloud::Vision::V1::ImageAnnotator::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::Vision::V1::ImageAnnotator::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::Vision::V1::ImageAnnotator::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::Vision::V1::ImageAnnotator::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::Vision::V1::ImageAnnotator::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::Vision::V1::ImageAnnotator::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::Vision::V1::ImageAnnotator::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::Vision::V1::ImageAnnotator::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_paths_test.rb b/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_paths_test.rb deleted file mode 100644 index 9ee050a26a01..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_paths_test.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 "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/vision/v1/image_annotator" - -class ::Google::Cloud::Vision::V1::ImageAnnotator::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_product_set_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Vision::V1::ImageAnnotator::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.product_set_path project: "value0", location: "value1", product_set: "value2" - assert_equal "projects/value0/locations/value1/productSets/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_rest_test.rb b/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_rest_test.rb deleted file mode 100644 index 258d6f3249e4..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_rest_test.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! - -require "helper" -require "gapic/rest" -require "google/cloud/vision/v1/image_annotator_pb" -require "google/cloud/vision/v1/image_annotator/rest" - - -class ::Google::Cloud::Vision::V1::ImageAnnotator::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_batch_annotate_images - # Create test objects. - client_result = ::Google::Cloud::Vision::V1::BatchAnnotateImagesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - requests = [{}] - parent = "hello world" - labels = {} - - batch_annotate_images_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::ServiceStub.stub :transcode_batch_annotate_images_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_annotate_images_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.batch_annotate_images({ requests: requests, parent: parent, labels: labels }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.batch_annotate_images requests: requests, parent: parent, labels: labels do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.batch_annotate_images ::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest.new(requests: requests, parent: parent, labels: labels) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.batch_annotate_images({ requests: requests, parent: parent, labels: labels }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.batch_annotate_images(::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest.new(requests: requests, parent: parent, labels: labels), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_annotate_images_client_stub.call_count - end - end - end - - def test_batch_annotate_files - # Create test objects. - client_result = ::Google::Cloud::Vision::V1::BatchAnnotateFilesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - requests = [{}] - parent = "hello world" - labels = {} - - batch_annotate_files_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::ServiceStub.stub :transcode_batch_annotate_files_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_annotate_files_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.batch_annotate_files({ requests: requests, parent: parent, labels: labels }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.batch_annotate_files requests: requests, parent: parent, labels: labels do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.batch_annotate_files ::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest.new(requests: requests, parent: parent, labels: labels) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.batch_annotate_files({ requests: requests, parent: parent, labels: labels }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.batch_annotate_files(::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest.new(requests: requests, parent: parent, labels: labels), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_annotate_files_client_stub.call_count - end - end - end - - def test_async_batch_annotate_images - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - requests = [{}] - output_config = {} - parent = "hello world" - labels = {} - - async_batch_annotate_images_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::ServiceStub.stub :transcode_async_batch_annotate_images_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, async_batch_annotate_images_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.async_batch_annotate_images({ requests: requests, output_config: output_config, parent: parent, labels: labels }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.async_batch_annotate_images requests: requests, output_config: output_config, parent: parent, labels: labels do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.async_batch_annotate_images ::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest.new(requests: requests, output_config: output_config, parent: parent, labels: labels) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.async_batch_annotate_images({ requests: requests, output_config: output_config, parent: parent, labels: labels }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.async_batch_annotate_images(::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest.new(requests: requests, output_config: output_config, parent: parent, labels: labels), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, async_batch_annotate_images_client_stub.call_count - end - end - end - - def test_async_batch_annotate_files - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - requests = [{}] - parent = "hello world" - labels = {} - - async_batch_annotate_files_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::ServiceStub.stub :transcode_async_batch_annotate_files_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, async_batch_annotate_files_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ImageAnnotator::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.async_batch_annotate_files({ requests: requests, parent: parent, labels: labels }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.async_batch_annotate_files requests: requests, parent: parent, labels: labels do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.async_batch_annotate_files ::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest.new(requests: requests, parent: parent, labels: labels) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.async_batch_annotate_files({ requests: requests, parent: parent, labels: labels }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.async_batch_annotate_files(::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest.new(requests: requests, parent: parent, labels: labels), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, async_batch_annotate_files_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::Vision::V1::ImageAnnotator::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::Vision::V1::ImageAnnotator::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_test.rb b/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_test.rb deleted file mode 100644 index b85a5d03baff..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/image_annotator_test.rb +++ /dev/null @@ -1,378 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/vision/v1/image_annotator_pb" -require "google/cloud/vision/v1/image_annotator" - -class ::Google::Cloud::Vision::V1::ImageAnnotator::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_batch_annotate_images - # Create GRPC objects. - grpc_response = ::Google::Cloud::Vision::V1::BatchAnnotateImagesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - requests = [{}] - parent = "hello world" - labels = {} - - batch_annotate_images_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_annotate_images, name - assert_kind_of ::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest, request - assert_kind_of ::Google::Cloud::Vision::V1::AnnotateImageRequest, request["requests"].first - assert_equal "hello world", request["parent"] - assert_equal({}, request["labels"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_annotate_images_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ImageAnnotator::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_annotate_images({ requests: requests, parent: parent, labels: labels }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.batch_annotate_images requests: requests, parent: parent, labels: labels do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.batch_annotate_images ::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest.new(requests: requests, parent: parent, labels: labels) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.batch_annotate_images({ requests: requests, parent: parent, 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_annotate_images(::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest.new(requests: requests, parent: parent, 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_annotate_images_client_stub.call_rpc_count - end - end - - def test_batch_annotate_files - # Create GRPC objects. - grpc_response = ::Google::Cloud::Vision::V1::BatchAnnotateFilesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - requests = [{}] - parent = "hello world" - labels = {} - - batch_annotate_files_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_annotate_files, name - assert_kind_of ::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest, request - assert_kind_of ::Google::Cloud::Vision::V1::AnnotateFileRequest, request["requests"].first - assert_equal "hello world", request["parent"] - assert_equal({}, request["labels"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_annotate_files_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ImageAnnotator::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_annotate_files({ requests: requests, parent: parent, labels: labels }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.batch_annotate_files requests: requests, parent: parent, labels: labels do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.batch_annotate_files ::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest.new(requests: requests, parent: parent, labels: labels) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.batch_annotate_files({ requests: requests, parent: parent, 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_annotate_files(::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest.new(requests: requests, parent: parent, 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_annotate_files_client_stub.call_rpc_count - end - end - - def test_async_batch_annotate_images - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - requests = [{}] - output_config = {} - parent = "hello world" - labels = {} - - async_batch_annotate_images_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :async_batch_annotate_images, name - assert_kind_of ::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest, request - assert_kind_of ::Google::Cloud::Vision::V1::AnnotateImageRequest, request["requests"].first - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Vision::V1::OutputConfig), request["output_config"] - assert_equal "hello world", request["parent"] - assert_equal({}, request["labels"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, async_batch_annotate_images_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ImageAnnotator::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.async_batch_annotate_images({ requests: requests, output_config: output_config, parent: parent, labels: labels }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.async_batch_annotate_images requests: requests, output_config: output_config, parent: parent, labels: labels do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.async_batch_annotate_images ::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest.new(requests: requests, output_config: output_config, parent: parent, labels: labels) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.async_batch_annotate_images({ requests: requests, output_config: output_config, parent: parent, labels: labels }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.async_batch_annotate_images(::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest.new(requests: requests, output_config: output_config, parent: parent, labels: labels), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, async_batch_annotate_images_client_stub.call_rpc_count - end - end - - def test_async_batch_annotate_files - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - requests = [{}] - parent = "hello world" - labels = {} - - async_batch_annotate_files_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :async_batch_annotate_files, name - assert_kind_of ::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest, request - assert_kind_of ::Google::Cloud::Vision::V1::AsyncAnnotateFileRequest, request["requests"].first - assert_equal "hello world", request["parent"] - assert_equal({}, request["labels"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, async_batch_annotate_files_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ImageAnnotator::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.async_batch_annotate_files({ requests: requests, parent: parent, labels: labels }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.async_batch_annotate_files requests: requests, parent: parent, labels: labels do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.async_batch_annotate_files ::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest.new(requests: requests, parent: parent, labels: labels) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.async_batch_annotate_files({ requests: requests, parent: parent, labels: labels }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.async_batch_annotate_files(::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest.new(requests: requests, parent: parent, labels: labels), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, async_batch_annotate_files_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::Vision::V1::ImageAnnotator::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::Vision::V1::ImageAnnotator::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::Vision::V1::ImageAnnotator::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Vision::V1::ImageAnnotator::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::Vision::V1::ImageAnnotator::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Vision::V1::ImageAnnotator::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_operations_test.rb b/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_operations_test.rb deleted file mode 100644 index b6544f82be91..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_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/vision/v1/product_search_service_pb" -require "google/cloud/vision/v1/product_search_service_services_pb" -require "google/cloud/vision/v1/product_search" - -class ::Google::Cloud::Vision::V1::ProductSearch::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::Vision::V1::ProductSearch::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::Vision::V1::ProductSearch::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::Vision::V1::ProductSearch::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::Vision::V1::ProductSearch::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::Vision::V1::ProductSearch::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::Vision::V1::ProductSearch::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::Vision::V1::ProductSearch::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_paths_test.rb b/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_paths_test.rb deleted file mode 100644 index d34aeda7c09e..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_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/vision/v1/product_search" - -class ::Google::Cloud::Vision::V1::ProductSearch::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_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::Vision::V1::ProductSearch::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_product_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.product_path project: "value0", location: "value1", product: "value2" - assert_equal "projects/value0/locations/value1/products/value2", path - end - end - - def test_product_set_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.product_set_path project: "value0", location: "value1", product_set: "value2" - assert_equal "projects/value0/locations/value1/productSets/value2", path - end - end - - def test_reference_image_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.reference_image_path project: "value0", location: "value1", product: "value2", reference_image: "value3" - assert_equal "projects/value0/locations/value1/products/value2/referenceImages/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_rest_test.rb b/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_rest_test.rb deleted file mode 100644 index 5bcc71106cd9..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_rest_test.rb +++ /dev/null @@ -1,1146 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/vision/v1/product_search_service_pb" -require "google/cloud/vision/v1/product_search/rest" - - -class ::Google::Cloud::Vision::V1::ProductSearch::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_product_set - # Create test objects. - client_result = ::Google::Cloud::Vision::V1::ProductSet.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - product_set = {} - product_set_id = "hello world" - - create_product_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_create_product_set_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_product_set_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_product_set({ parent: parent, product_set: product_set, product_set_id: product_set_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_product_set parent: parent, product_set: product_set, product_set_id: product_set_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_product_set ::Google::Cloud::Vision::V1::CreateProductSetRequest.new(parent: parent, product_set: product_set, product_set_id: product_set_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_product_set({ parent: parent, product_set: product_set, product_set_id: product_set_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_product_set(::Google::Cloud::Vision::V1::CreateProductSetRequest.new(parent: parent, product_set: product_set, product_set_id: product_set_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_product_set_client_stub.call_count - end - end - end - - def test_list_product_sets - # Create test objects. - client_result = ::Google::Cloud::Vision::V1::ListProductSetsResponse.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_product_sets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_list_product_sets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_product_sets_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_product_sets({ 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_product_sets 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_product_sets ::Google::Cloud::Vision::V1::ListProductSetsRequest.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_product_sets({ 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_product_sets(::Google::Cloud::Vision::V1::ListProductSetsRequest.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_product_sets_client_stub.call_count - end - end - end - - def test_get_product_set - # Create test objects. - client_result = ::Google::Cloud::Vision::V1::ProductSet.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_product_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_get_product_set_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_product_set_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_product_set({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_product_set name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_product_set ::Google::Cloud::Vision::V1::GetProductSetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_product_set({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_product_set(::Google::Cloud::Vision::V1::GetProductSetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_product_set_client_stub.call_count - end - end - end - - def test_update_product_set - # Create test objects. - client_result = ::Google::Cloud::Vision::V1::ProductSet.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - product_set = {} - update_mask = {} - - update_product_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_update_product_set_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_product_set_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_product_set({ product_set: product_set, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_product_set product_set: product_set, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_product_set ::Google::Cloud::Vision::V1::UpdateProductSetRequest.new(product_set: product_set, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_product_set({ product_set: product_set, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_product_set(::Google::Cloud::Vision::V1::UpdateProductSetRequest.new(product_set: product_set, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_product_set_client_stub.call_count - end - end - end - - def test_delete_product_set - # 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_product_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_delete_product_set_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_product_set_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_product_set({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_product_set name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_product_set ::Google::Cloud::Vision::V1::DeleteProductSetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_product_set({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_product_set(::Google::Cloud::Vision::V1::DeleteProductSetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_product_set_client_stub.call_count - end - end - end - - def test_create_product - # Create test objects. - client_result = ::Google::Cloud::Vision::V1::Product.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - product = {} - product_id = "hello world" - - create_product_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_create_product_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_product_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_product({ parent: parent, product: product, product_id: product_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_product parent: parent, product: product, product_id: product_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_product ::Google::Cloud::Vision::V1::CreateProductRequest.new(parent: parent, product: product, product_id: product_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_product({ parent: parent, product: product, product_id: product_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_product(::Google::Cloud::Vision::V1::CreateProductRequest.new(parent: parent, product: product, product_id: product_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_product_client_stub.call_count - end - end - end - - def test_list_products - # Create test objects. - client_result = ::Google::Cloud::Vision::V1::ListProductsResponse.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_products_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_list_products_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_products_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_products({ 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_products 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_products ::Google::Cloud::Vision::V1::ListProductsRequest.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_products({ 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_products(::Google::Cloud::Vision::V1::ListProductsRequest.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_products_client_stub.call_count - end - end - end - - def test_get_product - # Create test objects. - client_result = ::Google::Cloud::Vision::V1::Product.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_product_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_get_product_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_product_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_product({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_product name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_product ::Google::Cloud::Vision::V1::GetProductRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_product({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_product(::Google::Cloud::Vision::V1::GetProductRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_product_client_stub.call_count - end - end - end - - def test_update_product - # Create test objects. - client_result = ::Google::Cloud::Vision::V1::Product.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - product = {} - update_mask = {} - - update_product_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_update_product_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_product_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_product({ product: product, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_product product: product, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_product ::Google::Cloud::Vision::V1::UpdateProductRequest.new(product: product, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_product({ product: product, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_product(::Google::Cloud::Vision::V1::UpdateProductRequest.new(product: product, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_product_client_stub.call_count - end - end - end - - def test_delete_product - # 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_product_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_delete_product_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_product_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_product({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_product name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_product ::Google::Cloud::Vision::V1::DeleteProductRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_product({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_product(::Google::Cloud::Vision::V1::DeleteProductRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_product_client_stub.call_count - end - end - end - - def test_create_reference_image - # Create test objects. - client_result = ::Google::Cloud::Vision::V1::ReferenceImage.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - reference_image = {} - reference_image_id = "hello world" - - create_reference_image_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_create_reference_image_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_reference_image_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_reference_image({ parent: parent, reference_image: reference_image, reference_image_id: reference_image_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_reference_image parent: parent, reference_image: reference_image, reference_image_id: reference_image_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_reference_image ::Google::Cloud::Vision::V1::CreateReferenceImageRequest.new(parent: parent, reference_image: reference_image, reference_image_id: reference_image_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_reference_image({ parent: parent, reference_image: reference_image, reference_image_id: reference_image_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_reference_image(::Google::Cloud::Vision::V1::CreateReferenceImageRequest.new(parent: parent, reference_image: reference_image, reference_image_id: reference_image_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_reference_image_client_stub.call_count - end - end - end - - def test_delete_reference_image - # 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_reference_image_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_delete_reference_image_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_reference_image_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_reference_image({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_reference_image name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_reference_image ::Google::Cloud::Vision::V1::DeleteReferenceImageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_reference_image({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_reference_image(::Google::Cloud::Vision::V1::DeleteReferenceImageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_reference_image_client_stub.call_count - end - end - end - - def test_list_reference_images - # Create test objects. - client_result = ::Google::Cloud::Vision::V1::ListReferenceImagesResponse.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_reference_images_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_list_reference_images_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_reference_images_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_reference_images({ 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_reference_images 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_reference_images ::Google::Cloud::Vision::V1::ListReferenceImagesRequest.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_reference_images({ 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_reference_images(::Google::Cloud::Vision::V1::ListReferenceImagesRequest.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_reference_images_client_stub.call_count - end - end - end - - def test_get_reference_image - # Create test objects. - client_result = ::Google::Cloud::Vision::V1::ReferenceImage.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_reference_image_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_get_reference_image_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_reference_image_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_reference_image({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_reference_image name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_reference_image ::Google::Cloud::Vision::V1::GetReferenceImageRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_reference_image({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_reference_image(::Google::Cloud::Vision::V1::GetReferenceImageRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_reference_image_client_stub.call_count - end - end - end - - def test_add_product_to_product_set - # 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" - product = "hello world" - - add_product_to_product_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_add_product_to_product_set_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, add_product_to_product_set_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.add_product_to_product_set({ name: name, product: product }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.add_product_to_product_set name: name, product: product do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.add_product_to_product_set ::Google::Cloud::Vision::V1::AddProductToProductSetRequest.new(name: name, product: product) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.add_product_to_product_set({ name: name, product: product }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.add_product_to_product_set(::Google::Cloud::Vision::V1::AddProductToProductSetRequest.new(name: name, product: product), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, add_product_to_product_set_client_stub.call_count - end - end - end - - def test_remove_product_from_product_set - # 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" - product = "hello world" - - remove_product_from_product_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_remove_product_from_product_set_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, remove_product_from_product_set_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.remove_product_from_product_set({ name: name, product: product }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.remove_product_from_product_set name: name, product: product do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.remove_product_from_product_set ::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest.new(name: name, product: product) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.remove_product_from_product_set({ name: name, product: product }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.remove_product_from_product_set(::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest.new(name: name, product: product), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, remove_product_from_product_set_client_stub.call_count - end - end - end - - def test_list_products_in_product_set - # Create test objects. - client_result = ::Google::Cloud::Vision::V1::ListProductsInProductSetResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - page_size = 42 - page_token = "hello world" - - list_products_in_product_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_list_products_in_product_set_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_products_in_product_set_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_products_in_product_set({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_products_in_product_set name: name, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_products_in_product_set ::Google::Cloud::Vision::V1::ListProductsInProductSetRequest.new(name: name, 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_products_in_product_set({ name: name, 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_products_in_product_set(::Google::Cloud::Vision::V1::ListProductsInProductSetRequest.new(name: name, 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_products_in_product_set_client_stub.call_count - end - end - end - - def test_import_product_sets - # Create test objects. - 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" - input_config = {} - - import_product_sets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_import_product_sets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, import_product_sets_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.import_product_sets({ parent: parent, input_config: input_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.import_product_sets parent: parent, input_config: input_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.import_product_sets ::Google::Cloud::Vision::V1::ImportProductSetsRequest.new(parent: parent, input_config: input_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.import_product_sets({ parent: parent, input_config: input_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.import_product_sets(::Google::Cloud::Vision::V1::ImportProductSetsRequest.new(parent: parent, input_config: input_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, import_product_sets_client_stub.call_count - end - end - end - - def test_purge_products - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - product_set_purge_config = {} - parent = "hello world" - force = true - - purge_products_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Vision::V1::ProductSearch::Rest::ServiceStub.stub :transcode_purge_products_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, purge_products_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.purge_products({ product_set_purge_config: product_set_purge_config, parent: parent, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.purge_products product_set_purge_config: product_set_purge_config, parent: parent, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.purge_products ::Google::Cloud::Vision::V1::PurgeProductsRequest.new(product_set_purge_config: product_set_purge_config, parent: parent, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.purge_products({ product_set_purge_config: product_set_purge_config, parent: parent, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.purge_products(::Google::Cloud::Vision::V1::PurgeProductsRequest.new(product_set_purge_config: product_set_purge_config, parent: parent, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, purge_products_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::Vision::V1::ProductSearch::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::Vision::V1::ProductSearch::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_test.rb b/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_test.rb deleted file mode 100644 index e661572993f5..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/test/google/cloud/vision/v1/product_search_test.rb +++ /dev/null @@ -1,1293 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/vision/v1/product_search_service_pb" -require "google/cloud/vision/v1/product_search" - -class ::Google::Cloud::Vision::V1::ProductSearch::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_product_set - # Create GRPC objects. - grpc_response = ::Google::Cloud::Vision::V1::ProductSet.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - product_set = {} - product_set_id = "hello world" - - create_product_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_product_set, name - assert_kind_of ::Google::Cloud::Vision::V1::CreateProductSetRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Vision::V1::ProductSet), request["product_set"] - assert_equal "hello world", request["product_set_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_product_set_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_product_set({ parent: parent, product_set: product_set, product_set_id: product_set_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_product_set parent: parent, product_set: product_set, product_set_id: product_set_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_product_set ::Google::Cloud::Vision::V1::CreateProductSetRequest.new(parent: parent, product_set: product_set, product_set_id: product_set_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_product_set({ parent: parent, product_set: product_set, product_set_id: product_set_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_product_set(::Google::Cloud::Vision::V1::CreateProductSetRequest.new(parent: parent, product_set: product_set, product_set_id: product_set_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_product_set_client_stub.call_rpc_count - end - end - - def test_list_product_sets - # Create GRPC objects. - grpc_response = ::Google::Cloud::Vision::V1::ListProductSetsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_product_sets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_product_sets, name - assert_kind_of ::Google::Cloud::Vision::V1::ListProductSetsRequest, 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_product_sets_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_product_sets({ 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_product_sets 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_product_sets ::Google::Cloud::Vision::V1::ListProductSetsRequest.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_product_sets({ 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_product_sets(::Google::Cloud::Vision::V1::ListProductSetsRequest.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_product_sets_client_stub.call_rpc_count - end - end - - def test_get_product_set - # Create GRPC objects. - grpc_response = ::Google::Cloud::Vision::V1::ProductSet.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_product_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_product_set, name - assert_kind_of ::Google::Cloud::Vision::V1::GetProductSetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_product_set_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_product_set({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_product_set name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_product_set ::Google::Cloud::Vision::V1::GetProductSetRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_product_set({ 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_product_set(::Google::Cloud::Vision::V1::GetProductSetRequest.new(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_product_set_client_stub.call_rpc_count - end - end - - def test_update_product_set - # Create GRPC objects. - grpc_response = ::Google::Cloud::Vision::V1::ProductSet.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - product_set = {} - update_mask = {} - - update_product_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_product_set, name - assert_kind_of ::Google::Cloud::Vision::V1::UpdateProductSetRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Vision::V1::ProductSet), request["product_set"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_product_set_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_product_set({ product_set: product_set, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_product_set product_set: product_set, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_product_set ::Google::Cloud::Vision::V1::UpdateProductSetRequest.new(product_set: product_set, 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_product_set({ product_set: product_set, 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_product_set(::Google::Cloud::Vision::V1::UpdateProductSetRequest.new(product_set: product_set, 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_product_set_client_stub.call_rpc_count - end - end - - def test_delete_product_set - # 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_product_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_product_set, name - assert_kind_of ::Google::Cloud::Vision::V1::DeleteProductSetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_product_set_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_product_set({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_product_set name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_product_set ::Google::Cloud::Vision::V1::DeleteProductSetRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_product_set({ 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_product_set(::Google::Cloud::Vision::V1::DeleteProductSetRequest.new(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_product_set_client_stub.call_rpc_count - end - end - - def test_create_product - # Create GRPC objects. - grpc_response = ::Google::Cloud::Vision::V1::Product.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - product = {} - product_id = "hello world" - - create_product_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_product, name - assert_kind_of ::Google::Cloud::Vision::V1::CreateProductRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Vision::V1::Product), request["product"] - assert_equal "hello world", request["product_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_product_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_product({ parent: parent, product: product, product_id: product_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_product parent: parent, product: product, product_id: product_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_product ::Google::Cloud::Vision::V1::CreateProductRequest.new(parent: parent, product: product, product_id: product_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_product({ parent: parent, product: product, product_id: product_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_product(::Google::Cloud::Vision::V1::CreateProductRequest.new(parent: parent, product: product, product_id: product_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_product_client_stub.call_rpc_count - end - end - - def test_list_products - # Create GRPC objects. - grpc_response = ::Google::Cloud::Vision::V1::ListProductsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_products_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_products, name - assert_kind_of ::Google::Cloud::Vision::V1::ListProductsRequest, 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_products_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_products({ 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_products 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_products ::Google::Cloud::Vision::V1::ListProductsRequest.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_products({ 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_products(::Google::Cloud::Vision::V1::ListProductsRequest.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_products_client_stub.call_rpc_count - end - end - - def test_get_product - # Create GRPC objects. - grpc_response = ::Google::Cloud::Vision::V1::Product.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_product_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_product, name - assert_kind_of ::Google::Cloud::Vision::V1::GetProductRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_product_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_product({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_product name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_product ::Google::Cloud::Vision::V1::GetProductRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_product({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_product(::Google::Cloud::Vision::V1::GetProductRequest.new(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_product_client_stub.call_rpc_count - end - end - - def test_update_product - # Create GRPC objects. - grpc_response = ::Google::Cloud::Vision::V1::Product.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - product = {} - update_mask = {} - - update_product_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_product, name - assert_kind_of ::Google::Cloud::Vision::V1::UpdateProductRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Vision::V1::Product), request["product"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_product_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_product({ product: product, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_product product: product, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_product ::Google::Cloud::Vision::V1::UpdateProductRequest.new(product: product, 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_product({ product: product, 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_product(::Google::Cloud::Vision::V1::UpdateProductRequest.new(product: product, 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_product_client_stub.call_rpc_count - end - end - - def test_delete_product - # 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_product_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_product, name - assert_kind_of ::Google::Cloud::Vision::V1::DeleteProductRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_product_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_product({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_product name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_product ::Google::Cloud::Vision::V1::DeleteProductRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_product({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_product(::Google::Cloud::Vision::V1::DeleteProductRequest.new(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_product_client_stub.call_rpc_count - end - end - - def test_create_reference_image - # Create GRPC objects. - grpc_response = ::Google::Cloud::Vision::V1::ReferenceImage.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - reference_image = {} - reference_image_id = "hello world" - - create_reference_image_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_reference_image, name - assert_kind_of ::Google::Cloud::Vision::V1::CreateReferenceImageRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Vision::V1::ReferenceImage), request["reference_image"] - assert_equal "hello world", request["reference_image_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_reference_image_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_reference_image({ parent: parent, reference_image: reference_image, reference_image_id: reference_image_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_reference_image parent: parent, reference_image: reference_image, reference_image_id: reference_image_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_reference_image ::Google::Cloud::Vision::V1::CreateReferenceImageRequest.new(parent: parent, reference_image: reference_image, reference_image_id: reference_image_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_reference_image({ parent: parent, reference_image: reference_image, reference_image_id: reference_image_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_reference_image(::Google::Cloud::Vision::V1::CreateReferenceImageRequest.new(parent: parent, reference_image: reference_image, reference_image_id: reference_image_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_reference_image_client_stub.call_rpc_count - end - end - - def test_delete_reference_image - # 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_reference_image_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_reference_image, name - assert_kind_of ::Google::Cloud::Vision::V1::DeleteReferenceImageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_reference_image_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_reference_image({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_reference_image name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_reference_image ::Google::Cloud::Vision::V1::DeleteReferenceImageRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_reference_image({ 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_reference_image(::Google::Cloud::Vision::V1::DeleteReferenceImageRequest.new(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_reference_image_client_stub.call_rpc_count - end - end - - def test_list_reference_images - # Create GRPC objects. - grpc_response = ::Google::Cloud::Vision::V1::ListReferenceImagesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_reference_images_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_reference_images, name - assert_kind_of ::Google::Cloud::Vision::V1::ListReferenceImagesRequest, 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_reference_images_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_reference_images({ 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_reference_images 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_reference_images ::Google::Cloud::Vision::V1::ListReferenceImagesRequest.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_reference_images({ 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_reference_images(::Google::Cloud::Vision::V1::ListReferenceImagesRequest.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_reference_images_client_stub.call_rpc_count - end - end - - def test_get_reference_image - # Create GRPC objects. - grpc_response = ::Google::Cloud::Vision::V1::ReferenceImage.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_reference_image_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_reference_image, name - assert_kind_of ::Google::Cloud::Vision::V1::GetReferenceImageRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_reference_image_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_reference_image({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_reference_image name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_reference_image ::Google::Cloud::Vision::V1::GetReferenceImageRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_reference_image({ 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_reference_image(::Google::Cloud::Vision::V1::GetReferenceImageRequest.new(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_reference_image_client_stub.call_rpc_count - end - end - - def test_add_product_to_product_set - # 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" - product = "hello world" - - add_product_to_product_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :add_product_to_product_set, name - assert_kind_of ::Google::Cloud::Vision::V1::AddProductToProductSetRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["product"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, add_product_to_product_set_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.add_product_to_product_set({ name: name, product: product }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.add_product_to_product_set name: name, product: product do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.add_product_to_product_set ::Google::Cloud::Vision::V1::AddProductToProductSetRequest.new(name: name, product: product) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.add_product_to_product_set({ name: name, product: product }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.add_product_to_product_set(::Google::Cloud::Vision::V1::AddProductToProductSetRequest.new(name: name, product: product), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, add_product_to_product_set_client_stub.call_rpc_count - end - end - - def test_remove_product_from_product_set - # 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" - product = "hello world" - - remove_product_from_product_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :remove_product_from_product_set, name - assert_kind_of ::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["product"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, remove_product_from_product_set_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.remove_product_from_product_set({ name: name, product: product }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.remove_product_from_product_set name: name, product: product do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.remove_product_from_product_set ::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest.new(name: name, product: product) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.remove_product_from_product_set({ name: name, product: product }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.remove_product_from_product_set(::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest.new(name: name, product: product), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, remove_product_from_product_set_client_stub.call_rpc_count - end - end - - def test_list_products_in_product_set - # Create GRPC objects. - grpc_response = ::Google::Cloud::Vision::V1::ListProductsInProductSetResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - page_size = 42 - page_token = "hello world" - - list_products_in_product_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_products_in_product_set, name - assert_kind_of ::Google::Cloud::Vision::V1::ListProductsInProductSetRequest, request - assert_equal "hello world", request["name"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_products_in_product_set_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_products_in_product_set({ name: name, 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_products_in_product_set name: name, 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_products_in_product_set ::Google::Cloud::Vision::V1::ListProductsInProductSetRequest.new(name: name, 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_products_in_product_set({ name: name, 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_products_in_product_set(::Google::Cloud::Vision::V1::ListProductsInProductSetRequest.new(name: name, 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_products_in_product_set_client_stub.call_rpc_count - end - end - - def test_import_product_sets - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - input_config = {} - - import_product_sets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :import_product_sets, name - assert_kind_of ::Google::Cloud::Vision::V1::ImportProductSetsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Vision::V1::ImportProductSetsInputConfig), request["input_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, import_product_sets_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.import_product_sets({ parent: parent, input_config: input_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.import_product_sets parent: parent, input_config: input_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.import_product_sets ::Google::Cloud::Vision::V1::ImportProductSetsRequest.new(parent: parent, input_config: input_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.import_product_sets({ parent: parent, input_config: input_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.import_product_sets(::Google::Cloud::Vision::V1::ImportProductSetsRequest.new(parent: parent, input_config: input_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, import_product_sets_client_stub.call_rpc_count - end - end - - def test_purge_products - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - product_set_purge_config = {} - parent = "hello world" - force = true - - purge_products_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :purge_products, name - assert_kind_of ::Google::Cloud::Vision::V1::PurgeProductsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Vision::V1::ProductSetPurgeConfig), request["product_set_purge_config"] - assert_equal :product_set_purge_config, request.target - assert_equal "hello world", request["parent"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, purge_products_client_stub do - # Create client - client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.purge_products({ product_set_purge_config: product_set_purge_config, parent: parent, 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.purge_products product_set_purge_config: product_set_purge_config, parent: parent, 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.purge_products ::Google::Cloud::Vision::V1::PurgeProductsRequest.new(product_set_purge_config: product_set_purge_config, parent: parent, 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.purge_products({ product_set_purge_config: product_set_purge_config, parent: parent, 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.purge_products(::Google::Cloud::Vision::V1::PurgeProductsRequest.new(product_set_purge_config: product_set_purge_config, parent: parent, 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, purge_products_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::Vision::V1::ProductSearch::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::Vision::V1::ProductSearch::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::Vision::V1::ProductSearch::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Vision::V1::ProductSearch::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::Vision::V1::ProductSearch::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Vision::V1::ProductSearch::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-vision-v1/test/helper.rb b/owl-bot-staging/google-cloud-vision-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-vision-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct"